diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index d27721c7561ae9..29d12f43c05a68 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -126,6 +126,7 @@ BeagleBone befc betaprogram BinaryInputBasic +Binfmt bitbake bld BLE @@ -160,7 +161,9 @@ btmgmt BTN BTP btvirt +BuildKit buildwithmatter +buildX burndown ButtonIsr BytesMain @@ -178,6 +181,7 @@ CatalogVendorId CBB cbd CBOR +Ccache ccf CCMP CCS diff --git a/BUILD.gn b/BUILD.gn index b491fec0aabd05..8b27b9f4096588 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -235,7 +235,20 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { enable_host_gcc_build = enable_default_builds && host_os != "win" # Enable building chip with gcc & mbedtls. - enable_host_gcc_mbedtls_build = enable_default_builds && host_os != "win" + enable_host_gcc_mbedtls_build = false + + # Enable limited testing with gcc & mbedtls. + enable_host_gcc_mbedtls_crypto_tests = + enable_default_builds && host_os != "win" + + # Enable building chip with clang & boringssl + enable_host_clang_boringssl_build = false + + # Enable limited testing with clang & boringssl. On Mac, boringssl does + # not compile with ASAN enabled. + enable_host_clang_boringssl_crypto_tests = + enable_default_builds && host_os != "win" && + !(is_asan == true && host_os == "mac") # Enable building chip with clang & boringssl enable_host_clang_boringssl_build = false diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index c5f6392613b749..0d7e48403bd3c0 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -348,9 +348,6 @@ declare_args() { # Enable Thread sanitizer is_tsan = false - # Enable address sanitizer - is_asan = false - # Enable memory sanitizer is_msan = false diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni index 4d502a997bf2a1..842500c73f5c0c 100644 --- a/build/config/compiler/compiler.gni +++ b/build/config/compiler/compiler.gni @@ -50,4 +50,7 @@ declare_args() { # Generate code coverage analysis artifacts when enabled. use_coverage = false + + # Enable address sanitizer + is_asan = false } diff --git a/config/ameba/chip.cmake b/config/ameba/chip.cmake index 93997dd318a69d..2e665c65339d08 100644 --- a/config/ameba/chip.cmake +++ b/config/ameba/chip.cmake @@ -123,18 +123,24 @@ string(APPEND CHIP_GN_ARGS "pw_build_LINK_DEPS = [\"//third_party/connectedhomei string(APPEND CHIP_GN_ARGS "pw_rpc_CONFIG = \"//third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc:disable_global_mutex\"") endif (matter_enable_rpc) +# Build Matter Shell +if (matter_enable_shell) +string(APPEND CHIP_GN_ARGS "chip_build_libshell = true\n") +endif (matter_enable_shell) + # Build ota-requestor if (matter_enable_ota_requestor) string(APPEND CHIP_GN_ARGS "chip_enable_ota_requestor = true\n") endif (matter_enable_ota_requestor) +# Rotating ID if (matter_enable_rotating_id) string(APPEND CHIP_GN_ARGS "chip_enable_additional_data_advertising = true\n") string(APPEND CHIP_GN_ARGS "chip_enable_rotating_device_id = true\n") -else(matter_enable_rotating_id) +else (matter_enable_rotating_id) string(APPEND CHIP_GN_ARGS "chip_enable_additional_data_advertising = false\n") string(APPEND CHIP_GN_ARGS "chip_enable_rotating_device_id = false\n") -endif(matter_enable_rotating_id) +endif (matter_enable_rotating_id) file(GENERATE OUTPUT ${CHIP_OUTPUT}/args.gn CONTENT ${CHIP_GN_ARGS}) 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 f989ede4b43533..e1d48f4f655e42 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 @@ -320,44 +320,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -367,7 +378,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster BinaryInputBasic = 15 { @@ -451,7 +462,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -459,7 +470,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -565,6 +576,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -1180,7 +1192,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1565,7 +1577,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -3465,7 +3477,7 @@ server cluster ApplicationBasic = 1293 { } readonly attribute char_string<32> vendorName = 0; - readonly attribute int16u vendorID = 1; + readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; readonly attribute ApplicationStatusEnum status = 5; @@ -3606,7 +3618,7 @@ server cluster TestCluster = 4294048773 { } info event TestFabricScopedEvent = 2 { - fabric_idx arg1 = 254; + fabric_idx fabricIndex = 254; } attribute boolean boolean = 0; diff --git a/examples/all-clusters-app/ameba/README.md b/examples/all-clusters-app/ameba/README.md index 3c51bc43cabda9..ee57479ba79628 100644 --- a/examples/all-clusters-app/ameba/README.md +++ b/examples/all-clusters-app/ameba/README.md @@ -8,12 +8,13 @@ control. - [CHIP Ameba All Clusters Example](#chip-ameba-all-clusters-example) - [Supported Device](#supported-device) - [Building the Example Application](#building-the-example-application) - - [Commissioning and cluster control](#commissioning-and-cluster-control) - - [Commissioning](#commissioning) - - [BLE mode](#ble-mode) - - [IP mode](#ip-mode) - - [Cluster control](#cluster-control) + - [Commissioning](#commissioning) + - [BLE mode](#ble-mode) + - [IP mode](#ip-mode) + - [Cluster control](#cluster-control) - [Running RPC Console](#running-rpc-console) + - [Running Matter Shell](#running-matter-shell) + - [Binding and Controlling a Lighting Device](#binding-and-controlling-a-lighting-device) --- @@ -26,27 +27,19 @@ The CHIP demo application is supported on - Pull docker image: - ``` $ docker pull connectedhomeip/chip-build-ameba:latest - ``` - Run docker container: - ``` $ docker run -it -v ${CHIP_DIR}:/root/chip connectedhomeip/chip-build-ameba:latest - ``` - Setup build environment: - ``` $ source ./scripts/bootstrap.sh - ``` - To build the demo application: - ``` $ ./scripts/build/build_examples.py --target ameba-amebad-all-clusters build - ``` The output image files are stored in `out/ameba-amebad-all-clusters/asdk/image` folder. @@ -63,43 +56,25 @@ The CHIP demo application is supported on the correct locations 4. Click **Download** button. -## Commissioning and Cluster Control - ## Commissioning There are two commissioning modes supported by Ameba platform: ### BLE mode -1. In "connectedhomeip/config/ameba/args.gni" - - - Set `chip_config_network_layer_ble = true` - -2. In `connectedhomeip/src/platform/Ameba/CHIPDevicePlatformConfig.h` - - - Set `#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1` - -3. Build and Flash -4. The all-clusters example will run automatically after booting the Ameba +1. Build and Flash +2. The all-clusters example will run automatically after booting the Ameba board. -5. Test with +3. Test with [Chip-Tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool) ### IP mode -1. In `connectedhomeip/config/ameba/args.gni` - - - Set `chip_config_network_layer_ble = false` - -2. In `connectedhomeip/src/platform/Ameba/CHIPDevicePlatformConfig.h` - - - Set `#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 0` - -3. Build and Flash -4. The all-clusters example will run automatically after booting the Ameba +1. Build and Flash +2. The all-clusters example will run automatically after booting the Ameba board. -5. Connect to AP using `ATW0, ATW1, ATWC` commands -6. Test with +3. Connect to AP using `ATW0, ATW1, ATWC` commands +4. Test with [Chip-Tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool) ## Cluster Control @@ -111,43 +86,71 @@ to be On or Off. - Via [Chip-Tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool#using-the-client-to-send-matter-commands) - ``` - $ ./chip-tool onoff on ${NODE_ID_TO_ASSIGN} 1 - $ ./chip-tool onoff off ${NODE_ID_TO_ASSIGN} 1 - ``` + $ ./chip-tool onoff on 1 + $ ./chip-tool onoff off 1 ## Running RPC Console -- Connect a USB-TTL Adapter as shown below +- Connect a USB-TTL adapter as shown below - ``` Ameba USB-TTL A19 TX A18 RX GND GND - ``` -- Build the +* Build the [chip-rpc console](https://github.com/project-chip/connectedhomeip/tree/master/examples/common/pigweed/rpc_console) -- As part of building the example with RPCs enabled the chip_rpc python +* As part of building the example with RPCs enabled the chip_rpc python interactive console is installed into your venv. The python wheel files are also created in the output folder: out/debug/chip_rpc_console_wheels. To install the wheel files without rebuilding: - ``` $ pip3 install out/debug/chip_rpc_console_wheels/*.whl - ``` - Launch the chip-rpc console after resetting Ameba board - ``` $ chip-console --device /dev/tty -b 115200 - ``` -- Get and Set lighting directly using the RPC console +* Get and Set lighting directly using the RPC console - ```python + python rpcs.chip.rpc.Lighting.Get() rpcs.chip.rpc.Lighting.Set(on=True, level=128, color=protos.chip.rpc.LightingColor(hue=5, saturation=5)) - ``` + +## Running Matter Shell + +- Matter Shell is enabled whenever RPC is disabled. + +- RPC console and Matter Shell cannot be enabled at the same time as they use + the same UART port. + +- Connect Ameba to the USB-TTL adapter as shown in the RPC section. + +- Open the USB-TTL serial port and type `help` to view the available commands + +## Binding and Controlling a Lighting Device + +- This example shows how to bind a Switch Device to a Lighting Device and + control it through the Matter Shell. One binding client (Switch Device) and + one binding server (Lighting Device) is required. + +- Commission the switch (nodeID 1) and lighting device (nodeID 2) using + chip-tool. + + $ ./chip-tool pairing ble-wifi 1 20202021 3840 + $ ./chip-tool pairing ble-wifi 2 20202021 3840 + +* After successful commissioning, configure the ACL in the lighting device to + allow access from switch device and chip-tool. + + $ ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null },{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [1], "targets": null }]' 2 0 + +- Bind the lighting device to the switch device. + + $ ./chip-tool binding write binding '[{"fabricIndex": 1, "node":2, "endpoint":1, "cluster":6}]' 1 1 + +- Control the lighting device through the switch device's Matter Shell + + > switch onoff on + > switch onoff off diff --git a/examples/all-clusters-app/ameba/chip_main.cmake b/examples/all-clusters-app/ameba/chip_main.cmake index f724d8840d697d..96e025799113af 100755 --- a/examples/all-clusters-app/ameba/chip_main.cmake +++ b/examples/all-clusters-app/ameba/chip_main.cmake @@ -125,6 +125,14 @@ list( ) endif (matter_enable_rpc) +if (matter_enable_shell) +list( + APPEND ${list_chip_main_sources} + #shell + ${chip_dir}/examples/platform/ameba/shell/launch_shell.cpp +) +endif (matter_enable_shell) + if (matter_enable_ota_requestor) list( APPEND ${list_chip_main_sources} @@ -148,6 +156,7 @@ list( ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp ${chip_dir}/examples/all-clusters-app/ameba/main/chipinterface.cpp + ${chip_dir}/examples/all-clusters-app/ameba/main/BindingHandler.cpp ${chip_dir}/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp ${chip_dir}/examples/all-clusters-app/ameba/main/CHIPDeviceManager.cpp ${chip_dir}/examples/all-clusters-app/ameba/main/Globals.cpp @@ -242,9 +251,7 @@ list( -DCHIP_DEVICE_LAYER_TARGET=Ameba -DUSE_ZAP_CONFIG -DCHIP_HAVE_CONFIG_H - -DCHIP_SUPPORT_ENABLE_STORAGE_API_AUDIT -DMBEDTLS_CONFIG_FILE= - -DMATTER_ALL_CLUSTERS_APP=1 ) if (matter_enable_persistentstorage_audit) @@ -269,6 +276,14 @@ list( ) endif (matter_enable_rpc) +if (matter_enable_shell) +list( + APPEND chip_main_flags + + -DCONFIG_ENABLE_CHIP_SHELL=1 +) +endif (matter_enable_shell) + list( APPEND chip_main_cpp_flags diff --git a/examples/all-clusters-app/ameba/main/BindingHandler.cpp b/examples/all-clusters-app/ameba/main/BindingHandler.cpp new file mode 100644 index 00000000000000..93638a811bdf77 --- /dev/null +++ b/examples/all-clusters-app/ameba/main/BindingHandler.cpp @@ -0,0 +1,425 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "BindingHandler.h" +#include "app/CommandSender.h" +#include "app/clusters/bindings/BindingManager.h" +#include "app/server/Server.h" +#include "controller/InvokeInteraction.h" +#include "platform/CHIPDeviceLayer.h" +#include +#include + +#if CONFIG_ENABLE_CHIP_SHELL +#include "lib/shell/Engine.h" +#include "lib/shell/commands/Help.h" +#endif // ENABLE_CHIP_SHELL + +using namespace chip; +using namespace chip::app; + +#if CONFIG_ENABLE_CHIP_SHELL +using Shell::Engine; +using Shell::shell_command_t; +using Shell::streamer_get; +using Shell::streamer_printf; + +Engine sShellSwitchSubCommands; +Engine sShellSwitchOnOffSubCommands; + +Engine sShellSwitchGroupsSubCommands; +Engine sShellSwitchGroupsOnOffSubCommands; + +Engine sShellSwitchBindingSubCommands; +#endif // defined(ENABLE_CHIP_SHELL) + +namespace { + +void ProcessOnOffUnicastBindingCommand(CommandId commandId, const EmberBindingTableEntry & binding, DeviceProxy * peer_device) +{ + auto onSuccess = [](const ConcreteCommandPath & commandPath, const StatusIB & status, const auto & dataResponse) { + ChipLogProgress(NotSpecified, "OnOff command succeeds"); + }; + + auto onFailure = [](CHIP_ERROR error) { + ChipLogError(NotSpecified, "OnOff command failed: %" CHIP_ERROR_FORMAT, error.Format()); + }; + + switch (commandId) + { + case Clusters::OnOff::Commands::Toggle::Id: + Clusters::OnOff::Commands::Toggle::Type toggleCommand; + Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, + toggleCommand, onSuccess, onFailure); + break; + + case Clusters::OnOff::Commands::On::Id: + Clusters::OnOff::Commands::On::Type onCommand; + Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, + onCommand, onSuccess, onFailure); + break; + + case Clusters::OnOff::Commands::Off::Id: + Clusters::OnOff::Commands::Off::Type offCommand; + Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, + offCommand, onSuccess, onFailure); + break; + } +} + +void ProcessOnOffGroupBindingCommand(CommandId commandId, const EmberBindingTableEntry & binding) +{ + Messaging::ExchangeManager & exchangeMgr = Server::GetInstance().GetExchangeManager(); + + switch (commandId) + { + case Clusters::OnOff::Commands::Toggle::Id: + Clusters::OnOff::Commands::Toggle::Type toggleCommand; + Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, toggleCommand); + break; + + case Clusters::OnOff::Commands::On::Id: + Clusters::OnOff::Commands::On::Type onCommand; + Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, onCommand); + + break; + + case Clusters::OnOff::Commands::Off::Id: + Clusters::OnOff::Commands::Off::Type offCommand; + Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, offCommand); + break; + } +} + +void LightSwitchChangedHandler(const EmberBindingTableEntry & binding, DeviceProxy * peer_device, void * context) +{ + VerifyOrReturn(context != nullptr, ChipLogError(NotSpecified, "OnDeviceConnectedFn: context is null")); + BindingCommandData * data = static_cast(context); + + if (binding.type == EMBER_MULTICAST_BINDING && data->isGroup) + { + switch (data->clusterId) + { + case Clusters::OnOff::Id: + ProcessOnOffGroupBindingCommand(data->commandId, binding); + break; + } + } + else if (binding.type == EMBER_UNICAST_BINDING && !data->isGroup) + { + switch (data->clusterId) + { + case Clusters::OnOff::Id: + ProcessOnOffUnicastBindingCommand(data->commandId, binding, peer_device); + break; + } + } +} + +void InitBindingHandlerInternal(intptr_t arg) +{ + auto & server = chip::Server::GetInstance(); + chip::BindingManager::GetInstance().Init( + { &server.GetFabricTable(), server.GetCASESessionManager(), &server.GetPersistentStorage() }); + chip::BindingManager::GetInstance().RegisterBoundDeviceChangedHandler(LightSwitchChangedHandler); +} + +#ifdef CONFIG_ENABLE_CHIP_SHELL + +/******************************************************** + * Switch shell functions + *********************************************************/ + +CHIP_ERROR SwitchHelpHandler(int argc, char ** argv) +{ + sShellSwitchSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); + return CHIP_NO_ERROR; +} + +CHIP_ERROR SwitchCommandHandler(int argc, char ** argv) +{ + if (argc == 0) + { + return SwitchHelpHandler(argc, argv); + } + + return sShellSwitchSubCommands.ExecCommand(argc, argv); +} + +/******************************************************** + * OnOff switch shell functions + *********************************************************/ + +CHIP_ERROR OnOffHelpHandler(int argc, char ** argv) +{ + sShellSwitchOnOffSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); + return CHIP_NO_ERROR; +} + +CHIP_ERROR OnOffSwitchCommandHandler(int argc, char ** argv) +{ + if (argc == 0) + { + return OnOffHelpHandler(argc, argv); + } + + return sShellSwitchOnOffSubCommands.ExecCommand(argc, argv); +} + +CHIP_ERROR OnSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::On::Id; + data->clusterId = Clusters::OnOff::Id; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR OffSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::Off::Id; + data->clusterId = Clusters::OnOff::Id; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR ToggleSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::Toggle::Id; + data->clusterId = Clusters::OnOff::Id; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +/******************************************************** + * bind switch shell functions + *********************************************************/ + +CHIP_ERROR BindingHelpHandler(int argc, char ** argv) +{ + sShellSwitchBindingSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); + return CHIP_NO_ERROR; +} + +CHIP_ERROR BindingSwitchCommandHandler(int argc, char ** argv) +{ + if (argc == 0) + { + return BindingHelpHandler(argc, argv); + } + + return sShellSwitchBindingSubCommands.ExecCommand(argc, argv); +} + +CHIP_ERROR BindingGroupBindCommandHandler(int argc, char ** argv) +{ + VerifyOrReturnError(argc == 2, CHIP_ERROR_INVALID_ARGUMENT); + + EmberBindingTableEntry * entry = Platform::New(); + entry->type = EMBER_MULTICAST_BINDING; + entry->fabricIndex = atoi(argv[0]); + entry->groupId = atoi(argv[1]); + entry->local = 1; // Hardcoded to endpoint 1 for now + entry->clusterId.SetValue(6); // Hardcoded to OnOff cluster for now + + DeviceLayer::PlatformMgr().ScheduleWork(BindingWorkerFunction, reinterpret_cast(entry)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR BindingUnicastBindCommandHandler(int argc, char ** argv) +{ + VerifyOrReturnError(argc == 3, CHIP_ERROR_INVALID_ARGUMENT); + + EmberBindingTableEntry * entry = Platform::New(); + entry->type = EMBER_UNICAST_BINDING; + entry->fabricIndex = atoi(argv[0]); + entry->nodeId = atoi(argv[1]); + entry->local = 1; // Hardcoded to endpoint 1 for now + entry->remote = atoi(argv[2]); + entry->clusterId.SetValue(6); // Hardcode to OnOff cluster for now + + DeviceLayer::PlatformMgr().ScheduleWork(BindingWorkerFunction, reinterpret_cast(entry)); + return CHIP_NO_ERROR; +} + +/******************************************************** + * Groups switch shell functions + *********************************************************/ + +CHIP_ERROR GroupsHelpHandler(int argc, char ** argv) +{ + sShellSwitchGroupsSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); + return CHIP_NO_ERROR; +} + +CHIP_ERROR GroupsSwitchCommandHandler(int argc, char ** argv) +{ + if (argc == 0) + { + return GroupsHelpHandler(argc, argv); + } + + return sShellSwitchGroupsSubCommands.ExecCommand(argc, argv); +} + +/******************************************************** + * Groups OnOff switch shell functions + *********************************************************/ + +CHIP_ERROR GroupsOnOffHelpHandler(int argc, char ** argv) +{ + sShellSwitchGroupsOnOffSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); + return CHIP_NO_ERROR; +} + +CHIP_ERROR GroupsOnOffSwitchCommandHandler(int argc, char ** argv) +{ + if (argc == 0) + { + return GroupsOnOffHelpHandler(argc, argv); + } + + return sShellSwitchGroupsOnOffSubCommands.ExecCommand(argc, argv); +} + +CHIP_ERROR GroupOnSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::On::Id; + data->clusterId = Clusters::OnOff::Id; + data->isGroup = true; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR GroupOffSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::Off::Id; + data->clusterId = Clusters::OnOff::Id; + data->isGroup = true; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR GroupToggleSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::Toggle::Id; + data->clusterId = Clusters::OnOff::Id; + data->isGroup = true; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +/** + * @brief configures switch matter shell + * + */ +static void RegisterSwitchCommands() +{ + + static const shell_command_t sSwitchSubCommands[] = { + { &SwitchHelpHandler, "help", "Usage: switch " }, + { &OnOffSwitchCommandHandler, "onoff", " Usage: switch onoff " }, + { &GroupsSwitchCommandHandler, "groups", "Usage: switch groups " }, + { &BindingSwitchCommandHandler, "binding", "Usage: switch binding " } + }; + + static const shell_command_t sSwitchOnOffSubCommands[] = { + { &OnOffHelpHandler, "help", "Usage : switch ononff " }, + { &OnSwitchCommandHandler, "on", "Sends on command to bound lighting app" }, + { &OffSwitchCommandHandler, "off", "Sends off command to bound lighting app" }, + { &ToggleSwitchCommandHandler, "toggle", "Sends toggle command to bound lighting app" } + }; + + static const shell_command_t sSwitchGroupsSubCommands[] = { { &GroupsHelpHandler, "help", "Usage: switch groups " }, + { &GroupsOnOffSwitchCommandHandler, "onoff", + "Usage: switch groups onoff " } }; + + static const shell_command_t sSwitchGroupsOnOffSubCommands[] = { + { &GroupsOnOffHelpHandler, "help", "Usage: switch groups onoff " }, + { &GroupOnSwitchCommandHandler, "on", "Sends on command to bound group" }, + { &GroupOffSwitchCommandHandler, "off", "Sends off command to bound group" }, + { &GroupToggleSwitchCommandHandler, "toggle", "Sends toggle command to group" } + }; + + static const shell_command_t sSwitchBindingSubCommands[] = { + { &BindingHelpHandler, "help", "Usage: switch binding " }, + { &BindingGroupBindCommandHandler, "group", "Usage: switch binding group " }, + { &BindingUnicastBindCommandHandler, "unicast", "Usage: switch binding unicast " } + }; + + static const shell_command_t sSwitchCommand = { &SwitchCommandHandler, "switch", + "Light-switch commands. Usage: switch " }; + + sShellSwitchGroupsOnOffSubCommands.RegisterCommands(sSwitchGroupsOnOffSubCommands, ArraySize(sSwitchGroupsOnOffSubCommands)); + sShellSwitchOnOffSubCommands.RegisterCommands(sSwitchOnOffSubCommands, ArraySize(sSwitchOnOffSubCommands)); + sShellSwitchGroupsSubCommands.RegisterCommands(sSwitchGroupsSubCommands, ArraySize(sSwitchGroupsSubCommands)); + sShellSwitchBindingSubCommands.RegisterCommands(sSwitchBindingSubCommands, ArraySize(sSwitchBindingSubCommands)); + sShellSwitchSubCommands.RegisterCommands(sSwitchSubCommands, ArraySize(sSwitchSubCommands)); + + Engine::Root().RegisterCommands(&sSwitchCommand, 1); +} +#endif // ENABLE_CHIP_SHELL + +} // namespace + +/******************************************************** + * Switch functions + *********************************************************/ + +void SwitchWorkerFunction(intptr_t context) +{ + VerifyOrReturn(context != 0, ChipLogError(NotSpecified, "SwitchWorkerFunction - Invalid work data")); + + BindingCommandData * data = reinterpret_cast(context); + BindingManager::GetInstance().NotifyBoundClusterChanged(data->localEndpointId, data->clusterId, static_cast(data)); + + Platform::Delete(data); +} + +void BindingWorkerFunction(intptr_t context) +{ + VerifyOrReturn(context != 0, ChipLogError(NotSpecified, "BindingWorkerFunction - Invalid work data")); + + EmberBindingTableEntry * entry = reinterpret_cast(context); + AddBindingEntry(*entry); + + Platform::Delete(entry); +} + +CHIP_ERROR InitBindingHandler() +{ + // The initialization of binding manager will try establishing connection with unicast peers + // so it requires the Server instance to be correctly initialized. Post the init function to + // the event queue so that everything is ready when initialization is conducted. + chip::DeviceLayer::PlatformMgr().ScheduleWork(InitBindingHandlerInternal); +#if CONFIG_ENABLE_CHIP_SHELL + RegisterSwitchCommands(); +#endif + return CHIP_NO_ERROR; +} diff --git a/examples/all-clusters-app/ameba/main/chipinterface.cpp b/examples/all-clusters-app/ameba/main/chipinterface.cpp index 673f4d5238ee23..d0ca38ab0cf070 100644 --- a/examples/all-clusters-app/ameba/main/chipinterface.cpp +++ b/examples/all-clusters-app/ameba/main/chipinterface.cpp @@ -17,6 +17,7 @@ #include +#include "BindingHandler.h" #include "CHIPDeviceManager.h" #include "DeviceCallbacks.h" #include "Globals.h" @@ -41,7 +42,11 @@ #include #if CONFIG_ENABLE_PW_RPC -#include "Rpc.h" +#include +#endif + +#if CONFIG_ENABLE_CHIP_SHELL +#include #endif using namespace ::chip; @@ -110,6 +115,8 @@ static void InitServer(intptr_t context) // QR code will be used with CHIP Tool PrintOnboardingCodes(chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE)); } + + InitBindingHandler(); } extern "C" void ChipTest(void) @@ -138,6 +145,10 @@ extern "C" void ChipTest(void) chip::DeviceLayer::PlatformMgr().ScheduleWork(InitServer, 0); statusLED1.Init(STATUS_LED_GPIO_NUM); + +#if CONFIG_ENABLE_CHIP_SHELL + chip::LaunchShell(); +#endif } bool lowPowerClusterSleep() diff --git a/examples/all-clusters-app/ameba/main/include/BindingHandler.h b/examples/all-clusters-app/ameba/main/include/BindingHandler.h new file mode 100644 index 00000000000000..280c94874f04dd --- /dev/null +++ b/examples/all-clusters-app/ameba/main/include/BindingHandler.h @@ -0,0 +1,35 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "app-common/zap-generated/ids/Clusters.h" +#include "app-common/zap-generated/ids/Commands.h" +#include "lib/core/CHIPError.h" + +CHIP_ERROR InitBindingHandler(); +void SwitchWorkerFunction(intptr_t context); +void BindingWorkerFunction(intptr_t context); + +struct BindingCommandData +{ + chip::EndpointId localEndpointId = 1; + chip::CommandId commandId; + chip::ClusterId clusterId; + bool isGroup = false; +}; diff --git a/examples/all-clusters-app/esp32/README.md b/examples/all-clusters-app/esp32/README.md index 35574ac97a9083..f1bd82ba5a817d 100644 --- a/examples/all-clusters-app/esp32/README.md +++ b/examples/all-clusters-app/esp32/README.md @@ -113,6 +113,14 @@ make sure the IDF_PATH has been exported(See the manual setup steps above). $ source ./scripts/activate.sh ``` +- Enable Ccache for faster IDF builds + + It is recommended to have Ccache installed for faster builds + + ``` + $ export IDF_CCACHE_ENABLE=1 + ``` + - Target Set To set IDF target, first: @@ -278,8 +286,8 @@ the ESP32 all-clusters-app to commission it onto a Wi-Fi network: Parameters: -1. Discriminator: 3840 (configurable through menuconfig) -2. Setup-pin-code: 20202021 (configurable through menuconfig) +1. Discriminator: 3840 +2. Setup-pin-code: 20202021 3. Node-id: 12344321 (you can assign any node id) ### Cluster control diff --git a/examples/all-clusters-app/esp32/main/include/ShellCommands.h b/examples/all-clusters-app/esp32/main/include/ShellCommands.h index 3e4e8536cee962..832039dd90358b 100644 --- a/examples/all-clusters-app/esp32/main/include/ShellCommands.h +++ b/examples/all-clusters-app/esp32/main/include/ShellCommands.h @@ -140,7 +140,7 @@ class CASECommands GetInstance().SetOnConnecting(false); } - static void OnConnectionFailure(void * context, PeerId peerId, CHIP_ERROR error) + static void OnConnectionFailure(void * context, const ScopedNodeId & peerId, CHIP_ERROR error) { streamer_printf(streamer_get(), "Establish CASESession Failure!\r\n"); GetInstance().SetOnConnecting(false); @@ -156,8 +156,9 @@ class CASECommands ChipLogError(SecureChannel, "Can't get the CASESessionManager"); return; } - caseSessionManager->FindOrEstablishSession(caseCommand->GetFabricInfo()->GetPeerIdForNode(caseCommand->GetNodeId()), - &sOnConnectedCallback, &sOnConnectionFailureCallback); + caseSessionManager->FindOrEstablishSession( + ScopedNodeId(caseCommand->GetNodeId(), caseCommand->GetFabricInfo()->GetFabricIndex()), &sOnConnectedCallback, + &sOnConnectionFailureCallback); } static CHIP_ERROR ConnectToNodeHandler(int argc, char ** argv) diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp index 89d9761cab1921..3bdc63319c972d 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp @@ -32,82 +32,102 @@ using namespace chip::app; using namespace chip::app::Clusters; using namespace chip::DeviceLayer; -void AllClustersCommandDelegate::OnEventCommandReceived(const char * command) +void AllClustersCommandDelegate::OnEventCommandReceived(const char * json) { - mCurrentCommand.assign(command); + Json::Reader reader; - DeviceLayer::PlatformMgr().ScheduleWork(HandleEventCommand, reinterpret_cast(this)); + if (!reader.parse(json, mJsonValue)) + { + ChipLogError(NotSpecified, "Error parsing JSON with error %s:", reader.getFormattedErrorMessages().c_str()); + } + else + { + DeviceLayer::PlatformMgr().ScheduleWork(HandleEventCommand, reinterpret_cast(this)); + } } void AllClustersCommandDelegate::HandleEventCommand(intptr_t context) { auto * self = reinterpret_cast(context); - if (self->mCurrentCommand == "SoftwareFault") + VerifyOrReturn(!self->mJsonValue.empty(), ChipLogError(NotSpecified, "Invalid JSON event command received")); + + std::string name = self->mJsonValue["Name"].asString(); + + if (name == "SoftwareFault") { self->OnSoftwareFaultEventHandler(Clusters::SoftwareDiagnostics::Events::SoftwareFault::Id); } - else if (self->mCurrentCommand == "HardwareFaultChange") + else if (name == "HardwareFaultChange") { self->OnGeneralFaultEventHandler(Clusters::GeneralDiagnostics::Events::HardwareFaultChange::Id); } - else if (self->mCurrentCommand == "RadioFaultChange") + else if (name == "RadioFaultChange") { self->OnGeneralFaultEventHandler(Clusters::GeneralDiagnostics::Events::RadioFaultChange::Id); } - else if (self->mCurrentCommand == "NetworkFaultChange") + else if (name == "NetworkFaultChange") { self->OnGeneralFaultEventHandler(Clusters::GeneralDiagnostics::Events::NetworkFaultChange::Id); } - else if (self->mCurrentCommand == "SwitchLatched") + else if (name == "SwitchLatched") { - self->OnSwitchEventHandler(Clusters::Switch::Events::SwitchLatched::Id); + uint8_t newPosition = static_cast(self->mJsonValue["NewPosition"].asUInt()); + self->OnSwitchLatchedHandler(newPosition); } - else if (self->mCurrentCommand == "InitialPress") + else if (name == "InitialPress") { - self->OnSwitchEventHandler(Clusters::Switch::Events::InitialPress::Id); + uint8_t newPosition = static_cast(self->mJsonValue["NewPosition"].asUInt()); + self->OnSwitchInitialPressedHandler(newPosition); } - else if (self->mCurrentCommand == "LongPress") + else if (name == "LongPress") { - self->OnSwitchEventHandler(Clusters::Switch::Events::LongPress::Id); + uint8_t newPosition = static_cast(self->mJsonValue["NewPosition"].asUInt()); + self->OnSwitchLongPressedHandler(newPosition); } - else if (self->mCurrentCommand == "ShortRelease") + else if (name == "ShortRelease") { - self->OnSwitchEventHandler(Clusters::Switch::Events::ShortRelease::Id); + uint8_t previousPosition = static_cast(self->mJsonValue["PreviousPosition"].asUInt()); + self->OnSwitchShortReleasedHandler(previousPosition); } - else if (self->mCurrentCommand == "LongRelease") + else if (name == "LongRelease") { - self->OnSwitchEventHandler(Clusters::Switch::Events::LongRelease::Id); + uint8_t previousPosition = static_cast(self->mJsonValue["PreviousPosition"].asUInt()); + self->OnSwitchLongReleasedHandler(previousPosition); } - else if (self->mCurrentCommand == "MultiPressOngoing") + else if (name == "MultiPressOngoing") { - self->OnSwitchEventHandler(Clusters::Switch::Events::MultiPressOngoing::Id); + uint8_t newPosition = static_cast(self->mJsonValue["NewPosition"].asUInt()); + uint8_t count = static_cast(self->mJsonValue["CurrentNumberOfPressesCounted"].asUInt()); + self->OnSwitchMultiPressOngoingHandler(newPosition, count); } - else if (self->mCurrentCommand == "MultiPressComplete") + else if (name == "MultiPressComplete") { - self->OnSwitchEventHandler(Clusters::Switch::Events::MultiPressComplete::Id); + uint8_t previousPosition = static_cast(self->mJsonValue["PreviousPosition"].asUInt()); + uint8_t count = static_cast(self->mJsonValue["TotalNumberOfPressesCounted"].asUInt()); + self->OnSwitchMultiPressOngoingHandler(previousPosition, count); } - else if (self->mCurrentCommand == "PowerOnReboot") + else if (name == "PowerOnReboot") { self->OnRebootSignalHandler(BootReasonType::kPowerOnReboot); } - else if (self->mCurrentCommand == "BrownOutReset") + else if (name == "BrownOutReset") { self->OnRebootSignalHandler(BootReasonType::kBrownOutReset); } - else if (self->mCurrentCommand == "SoftwareWatchdogReset") + else if (name == "SoftwareWatchdogReset") { self->OnRebootSignalHandler(BootReasonType::kSoftwareWatchdogReset); } - else if (self->mCurrentCommand == "HardwareWatchdogReset") + else if (name == "HardwareWatchdogReset") { self->OnRebootSignalHandler(BootReasonType::kHardwareWatchdogReset); } - else if (self->mCurrentCommand == "SoftwareUpdateCompleted") + else if (name == "SoftwareUpdateCompleted") { self->OnRebootSignalHandler(BootReasonType::kSoftwareUpdateCompleted); } - else if (self->mCurrentCommand == "SoftwareReset") + else if (name == "SoftwareReset") { self->OnRebootSignalHandler(BootReasonType::kSoftwareReset); } @@ -115,6 +135,8 @@ void AllClustersCommandDelegate::HandleEventCommand(intptr_t context) { ChipLogError(NotSpecified, "Unhandled command: Should never happens"); } + + self->mJsonValue.clear(); } bool AllClustersCommandDelegate::IsClusterPresentOnAnyEndpoint(ClusterId clusterId) @@ -220,57 +242,87 @@ void AllClustersCommandDelegate::OnSoftwareFaultEventHandler(uint32_t eventId) Clusters::SoftwareDiagnosticsServer::Instance().OnSoftwareFaultDetect(softwareFault); } -void AllClustersCommandDelegate::OnSwitchEventHandler(uint32_t eventId) +void AllClustersCommandDelegate::OnSwitchLatchedHandler(uint8_t newPosition) { - EndpointId endpoint = 1; - uint8_t newPosition = 20; - uint8_t previousPosition = 10; - uint8_t count = 3; + EndpointId endpoint = 1; - if (eventId == Clusters::Switch::Events::SwitchLatched::Id) - { - EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); - Clusters::SwitchServer::Instance().OnSwitchLatch(endpoint, newPosition); - } - else if (eventId == Clusters::Switch::Events::InitialPress::Id) - { - EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); - Clusters::SwitchServer::Instance().OnInitialPress(endpoint, newPosition); - } - else if (eventId == Clusters::Switch::Events::LongPress::Id) - { - EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); - Clusters::SwitchServer::Instance().OnLongPress(endpoint, newPosition); - } - else if (eventId == Clusters::Switch::Events::ShortRelease::Id) - { - EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); - Clusters::SwitchServer::Instance().OnShortRelease(endpoint, previousPosition); - } - else if (eventId == Clusters::Switch::Events::LongRelease::Id) - { - EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); - Clusters::SwitchServer::Instance().OnLongRelease(endpoint, previousPosition); - } - else if (eventId == Clusters::Switch::Events::MultiPressOngoing::Id) - { - EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); - Clusters::SwitchServer::Instance().OnMultiPressOngoing(endpoint, newPosition, count); - } - else if (eventId == Clusters::Switch::Events::MultiPressComplete::Id) - { - EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); - Clusters::SwitchServer::Instance().OnMultiPressComplete(endpoint, newPosition, count); - } - else - { - ChipLogError(NotSpecified, "Unknow event ID:%d", eventId); - } + EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); + VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); + ChipLogDetail(NotSpecified, "The latching switch is moved to a new position:%d", newPosition); + + Clusters::SwitchServer::Instance().OnSwitchLatch(endpoint, newPosition); +} + +void AllClustersCommandDelegate::OnSwitchInitialPressedHandler(uint8_t newPosition) +{ + EndpointId endpoint = 1; + + EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); + VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); + ChipLogDetail(NotSpecified, "The new position when the momentary switch starts to be pressed:%d", newPosition); + + Clusters::SwitchServer::Instance().OnInitialPress(endpoint, newPosition); +} + +void AllClustersCommandDelegate::OnSwitchLongPressedHandler(uint8_t newPosition) +{ + EndpointId endpoint = 1; + + EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); + VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); + ChipLogDetail(NotSpecified, "The new position when the momentary switch has been pressed for a long time:%d", newPosition); + + Clusters::SwitchServer::Instance().OnLongPress(endpoint, newPosition); +} + +void AllClustersCommandDelegate::OnSwitchShortReleasedHandler(uint8_t previousPosition) +{ + EndpointId endpoint = 1; + + EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); + VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); + ChipLogDetail(NotSpecified, "The the previous value of the CurrentPosition when the momentary switch has been released:%d", + previousPosition); + + Clusters::SwitchServer::Instance().OnShortRelease(endpoint, previousPosition); +} + +void AllClustersCommandDelegate::OnSwitchLongReleasedHandler(uint8_t previousPosition) +{ + EndpointId endpoint = 1; + + EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); + VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); + ChipLogDetail(NotSpecified, + "The the previous value of the CurrentPosition when the momentary switch has been released after having been " + "pressed for a long time:%d", + previousPosition); + + Clusters::SwitchServer::Instance().OnLongRelease(endpoint, previousPosition); +} + +void AllClustersCommandDelegate::OnSwitchMultiPressOngoingHandler(uint8_t newPosition, uint8_t count) +{ + EndpointId endpoint = 1; + + EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); + VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); + ChipLogDetail(NotSpecified, "The new position when the momentary switch has been pressed in a multi-press sequence:%d", + newPosition); + ChipLogDetail(NotSpecified, "%d times the momentary switch has been pressed", count); + + Clusters::SwitchServer::Instance().OnMultiPressOngoing(endpoint, newPosition, count); +} + +void AllClustersCommandDelegate::OnSwitchMultiPressCompleteHandler(uint8_t previousPosition, uint8_t count) +{ + EndpointId endpoint = 1; + + EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); + VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); + ChipLogDetail(NotSpecified, "The previous position when the momentary switch has been pressed in a multi-press sequence:%d", + previousPosition); + ChipLogDetail(NotSpecified, "%d times the momentary switch has been pressed", count); + + Clusters::SwitchServer::Instance().OnMultiPressComplete(endpoint, previousPosition, count); } diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.h b/examples/all-clusters-app/linux/AllClustersCommandDelegate.h index 74285343a0f809..5a55319ed674aa 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.h +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.h @@ -20,15 +20,16 @@ #include "NamedPipeCommands.h" +#include #include class AllClustersCommandDelegate : public NamedPipeCommandDelegate { public: - void OnEventCommandReceived(const char * command) override; + void OnEventCommandReceived(const char * json) override; private: - std::string mCurrentCommand; + Json::Value mJsonValue; static void HandleEventCommand(intptr_t context); @@ -50,7 +51,39 @@ class AllClustersCommandDelegate : public NamedPipeCommandDelegate void OnSoftwareFaultEventHandler(uint32_t eventId); /** - * Should be called when a switch operation takes place on the Node. + * Should be called when the latching switch is moved to a new position. */ - void OnSwitchEventHandler(uint32_t eventId); + void OnSwitchLatchedHandler(uint8_t newPosition); + + /** + * Should be called when the momentary switch starts to be pressed. + */ + void OnSwitchInitialPressedHandler(uint8_t newPosition); + + /** + * Should be called when the momentary switch has been pressed for a "long" time. + */ + void OnSwitchLongPressedHandler(uint8_t newPosition); + + /** + * Should be called when the momentary switch has been released. + */ + void OnSwitchShortReleasedHandler(uint8_t previousPosition); + + /** + * Should be called when the momentary switch has been released after having been pressed for a long time. + */ + void OnSwitchLongReleasedHandler(uint8_t previousPosition); + + /** + * Should be called to indicate how many times the momentary switch has been pressed in a multi-press + * sequence, during that sequence. + */ + void OnSwitchMultiPressOngoingHandler(uint8_t newPosition, uint8_t count); + + /** + * Should be called to indicate how many times the momentary switch has been pressed in a multi-press + * sequence, after it has been detected that the sequence has ended. + */ + void OnSwitchMultiPressCompleteHandler(uint8_t previousPosition, uint8_t count); }; diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn index a53f45d11006d6..5e0d4a056572bb 100644 --- a/examples/all-clusters-app/linux/BUILD.gn +++ b/examples/all-clusters-app/linux/BUILD.gn @@ -36,6 +36,7 @@ source_set("chip-all-clusters-common") { "${chip_root}/examples/platform/linux:app-main", "${chip_root}/src/app/tests/suites/credentials:dac_provider", "${chip_root}/src/lib", + "${chip_root}/third_party/jsoncpp", ] include_dirs = @@ -120,3 +121,7 @@ group("linux") { deps += [ ":chip-all-clusters-app" ] } } + +group("default") { + deps = [ ":linux" ] +} diff --git a/examples/all-clusters-app/linux/README.md b/examples/all-clusters-app/linux/README.md index f92e6995ef4be1..8479fd480736fa 100644 --- a/examples/all-clusters-app/linux/README.md +++ b/examples/all-clusters-app/linux/README.md @@ -1,8 +1,37 @@ # Matter Linux/Mac All Clusters Example +## Compiling all-clusters-app for testing on Linux and Mac + +To compile all-clusters-app on Intel Mac, run: + +``` +$ ./scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target darwin-x64-all-clusters-no-ble-asan-clang build" +``` + +at the top level of the Matter tree. + +To compile on an Arm Mac, run: + +``` +$ ./scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target darwin-arm64-all-clusters-no-ble-asan-clang build" +``` + +Similarly, to compile on Linux x86-64 run: + +``` +$ ./scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target linux-x64-all-clusters-no-ble-asan-clang build" +``` + +And to compile on Linux ARM run: + +``` +$ ./scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target linux-arm64-all-clusters-no-ble-asan-clang build" +``` + ## Fuzzing integration -This example supports compilation with libfuzzer enabled. +This example also supports compilation with libfuzzer enabled. This should be +used when trying to fuzz-test the Matter SDK. ### Compiling with fuzzing enabled @@ -81,7 +110,7 @@ all-cluster-app event named pipe /tmp/chip_all_clusters_fifo-. 1. Generate event `SoftwareFault` when a software fault takes place on the Node. ``` -$ echo SoftwareFault > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":"SoftwareFault"}' > /tmp/chip_all_clusters_fifo- ``` #### Trigger `HardwareFault` events @@ -90,21 +119,21 @@ $ echo SoftwareFault > /tmp/chip_all_clusters_fifo- hardware faults currently detected by the Node. ``` -$ echo HardwareFaultChange > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":"HardwareFaultChange"}' > /tmp/chip_all_clusters_fifo- ``` 2. Generate event `RadioFaultChange` to indicate a change in the set of radio faults currently detected by the Node. ``` -$ echo RadioFaultChange > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":"RadioFaultChange"}' > /tmp/chip_all_clusters_fifo- ``` 3. Generate event `NetworkFaultChange` to indicate a change in the set of network faults currently detected by the Node. ``` -$ echo NetworkFaultChange > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":"NetworkFaultChange"}' > /tmp/chip_all_clusters_fifo- ``` 4. Generate event `BootReason` to indicate the reason that caused the device to @@ -129,7 +158,7 @@ $ echo NetworkFaultChange > /tmp/chip_all_clusters_fifo- reboot. ``` -$ echo > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":""}' > /tmp/chip_all_clusters_fifo- ``` #### Trigger Switch events @@ -138,41 +167,41 @@ $ echo > /tmp/chip_all_clusters_fifo- position. ``` -$ echo SwitchLatched > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":"SwitchLatched","NewPosition":3}' > /tmp/chip_all_clusters_fifo- ``` 2. Generate event `InitialPress`, when the momentary switch starts to be pressed. ``` -$ echo InitialPress > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":"InitialPress","NewPosition":3}' > /tmp/chip_all_clusters_fifo- ``` 3. Generate event `LongPress`, when the momentary switch has been pressed for a "long" time. ``` -$ echo LongPress > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":"LongPress","NewPosition":3}' > /tmp/chip_all_clusters_fifo- ``` 4. Generate event `ShortRelease`, when the momentary switch has been released. ``` -$ echo ShortRelease > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":"ShortRelease","PreviousPosition":3}' > /tmp/chip_all_clusters_fifo- ``` 5. Generate event `LongRelease` when the momentary switch has been released and after having been pressed for a long time. ``` -$ echo LongRelease > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":"LongRelease","PreviousPosition":3}' > /tmp/chip_all_clusters_fifo- ``` 6. Generate event `MultiPressOngoing` to indicate how many times the momentary switch has been pressed in a multi-press sequence, during that sequence. ``` -$ echo MultiPressOngoing > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":"MultiPressOngoing","NewPosition":3,"CurrentNumberOfPressesCounted":4}' > /tmp/chip_all_clusters_fifo- ``` 7. Generate event `MultiPressComplete` to indicate how many times the momentary @@ -180,5 +209,5 @@ $ echo MultiPressOngoing > /tmp/chip_all_clusters_fifo- that the sequence has ended. ``` -$ echo MultiPressComplete > /tmp/chip_all_clusters_fifo- +$ echo '{"Name":"MultiPressComplete","PreviousPosition":3,"TotalNumberOfPressesCounted":2}' > /tmp/chip_all_clusters_fifo- ``` diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp index c017d3c61a05a0..e42681d16a64e1 100644 --- a/examples/all-clusters-app/linux/main-common.cpp +++ b/examples/all-clusters-app/linux/main-common.cpp @@ -55,7 +55,7 @@ using namespace chip::DeviceLayer; namespace { -constexpr const char kChipEventFifoPathPrefix[] = "/tmp/chip_all_cluster_fifo_"; +constexpr const char kChipEventFifoPathPrefix[] = "/tmp/chip_all_clusters_fifo_"; LowPowerManager sLowPowerManager; NamedPipeCommands sChipNamedPipeCommands; AllClustersCommandDelegate sAllClustersCommandDelegate; diff --git a/examples/all-clusters-app/tizen/src/main.cpp b/examples/all-clusters-app/tizen/src/main.cpp index 89002ef05bc3e0..adeb8735752332 100644 --- a/examples/all-clusters-app/tizen/src/main.cpp +++ b/examples/all-clusters-app/tizen/src/main.cpp @@ -21,24 +21,30 @@ #include #include #include +#include #include #include using namespace chip; using namespace chip::app; -using namespace chip::app::Clusters; +using namespace chip::DeviceLayer; // Network commissioning namespace { constexpr EndpointId kNetworkCommissioningEndpointMain = 0; constexpr EndpointId kNetworkCommissioningEndpointSecondary = 0xFFFE; + +NetworkCommissioning::TizenEthernetDriver sEthernetDriver; +Clusters::NetworkCommissioning::Instance sEthernetNetworkCommissioningInstance(kNetworkCommissioningEndpointMain, &sEthernetDriver); } // namespace void ApplicationInit() { // Enable secondary endpoint only when we need it. emberAfEndpointEnableDisable(kNetworkCommissioningEndpointSecondary, false); + + sEthernetNetworkCommissioningInstance.Init(); } int main(int argc, char * argv[]) 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 9ef0f1ff6fe4ff..dac16c909b027a 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 @@ -278,44 +278,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -325,7 +336,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -396,7 +407,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -404,7 +415,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -508,6 +519,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -1103,7 +1115,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1410,7 +1422,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -3032,7 +3044,7 @@ server cluster TestCluster = 4294048773 { } info event TestFabricScopedEvent = 2 { - fabric_idx arg1 = 254; + fabric_idx fabricIndex = 254; } attribute boolean boolean = 0; diff --git a/examples/all-clusters-minimal-app/ameba/chip_main.cmake b/examples/all-clusters-minimal-app/ameba/chip_main.cmake index aa1542a1163241..287afee2116601 100755 --- a/examples/all-clusters-minimal-app/ameba/chip_main.cmake +++ b/examples/all-clusters-minimal-app/ameba/chip_main.cmake @@ -225,7 +225,6 @@ list( -DUSE_ZAP_CONFIG -DCHIP_HAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE= - -DMATTER_ALL_CLUSTERS_APP=1 ) if (matter_enable_persistentstorage_audit) diff --git a/examples/all-clusters-minimal-app/esp32/README.md b/examples/all-clusters-minimal-app/esp32/README.md index 8c2965a834013d..244b3567ad47e9 100644 --- a/examples/all-clusters-minimal-app/esp32/README.md +++ b/examples/all-clusters-minimal-app/esp32/README.md @@ -113,6 +113,14 @@ make sure the IDF_PATH has been exported(See the manual setup steps above). $ source ./scripts/activate.sh ``` +- Enable Ccache for faster IDF builds + + It is recommended to have Ccache installed for faster builds + + ``` + $ export IDF_CCACHE_ENABLE=1 + ``` + - Target Set To set IDF target, first: @@ -278,8 +286,8 @@ the ESP32 all-clusters-minimal-app to commission it onto a Wi-Fi network: Parameters: -1. Discriminator: 3840 (configurable through menuconfig) -2. Setup-pin-code: 20202021 (configurable through menuconfig) +1. Discriminator: 3840 +2. Setup-pin-code: 20202021 3. Node-id: 12344321 (you can assign any node id) ### Cluster control diff --git a/examples/all-clusters-minimal-app/esp32/main/include/ShellCommands.h b/examples/all-clusters-minimal-app/esp32/main/include/ShellCommands.h index 3e4e8536cee962..832039dd90358b 100644 --- a/examples/all-clusters-minimal-app/esp32/main/include/ShellCommands.h +++ b/examples/all-clusters-minimal-app/esp32/main/include/ShellCommands.h @@ -140,7 +140,7 @@ class CASECommands GetInstance().SetOnConnecting(false); } - static void OnConnectionFailure(void * context, PeerId peerId, CHIP_ERROR error) + static void OnConnectionFailure(void * context, const ScopedNodeId & peerId, CHIP_ERROR error) { streamer_printf(streamer_get(), "Establish CASESession Failure!\r\n"); GetInstance().SetOnConnecting(false); @@ -156,8 +156,9 @@ class CASECommands ChipLogError(SecureChannel, "Can't get the CASESessionManager"); return; } - caseSessionManager->FindOrEstablishSession(caseCommand->GetFabricInfo()->GetPeerIdForNode(caseCommand->GetNodeId()), - &sOnConnectedCallback, &sOnConnectionFailureCallback); + caseSessionManager->FindOrEstablishSession( + ScopedNodeId(caseCommand->GetNodeId(), caseCommand->GetFabricInfo()->GetFabricIndex()), &sOnConnectedCallback, + &sOnConnectionFailureCallback); } static CHIP_ERROR ConnectToNodeHandler(int argc, char ** argv) diff --git a/examples/all-clusters-minimal-app/linux/BUILD.gn b/examples/all-clusters-minimal-app/linux/BUILD.gn index cc2714427d4f3e..cf3f915fe0d828 100644 --- a/examples/all-clusters-minimal-app/linux/BUILD.gn +++ b/examples/all-clusters-minimal-app/linux/BUILD.gn @@ -101,3 +101,7 @@ group("linux") { deps = [] deps += [ ":chip-all-clusters-minimal-app" ] } + +group("default") { + deps = [ ":linux" ] +} diff --git a/examples/all-clusters-minimal-app/tizen/src/main.cpp b/examples/all-clusters-minimal-app/tizen/src/main.cpp index 89002ef05bc3e0..adeb8735752332 100644 --- a/examples/all-clusters-minimal-app/tizen/src/main.cpp +++ b/examples/all-clusters-minimal-app/tizen/src/main.cpp @@ -21,24 +21,30 @@ #include #include #include +#include #include #include using namespace chip; using namespace chip::app; -using namespace chip::app::Clusters; +using namespace chip::DeviceLayer; // Network commissioning namespace { constexpr EndpointId kNetworkCommissioningEndpointMain = 0; constexpr EndpointId kNetworkCommissioningEndpointSecondary = 0xFFFE; + +NetworkCommissioning::TizenEthernetDriver sEthernetDriver; +Clusters::NetworkCommissioning::Instance sEthernetNetworkCommissioningInstance(kNetworkCommissioningEndpointMain, &sEthernetDriver); } // namespace void ApplicationInit() { // Enable secondary endpoint only when we need it. emberAfEndpointEnableDisable(kNetworkCommissioningEndpointSecondary, false); + + sEthernetNetworkCommissioningInstance.Init(); } int main(int argc, char * argv[]) diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 192d27b2c8fff6..b47457480c4a44 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -125,44 +125,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -172,7 +183,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -254,7 +265,7 @@ client cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -262,7 +273,7 @@ client cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -322,7 +333,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -330,7 +341,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -449,6 +460,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -873,7 +885,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1255,7 +1267,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute attrib_id attributeList[] = 65531; diff --git a/examples/bridge-app/esp32/README.md b/examples/bridge-app/esp32/README.md index c9a1dfbe9020a7..465cade4b0092c 100644 --- a/examples/bridge-app/esp32/README.md +++ b/examples/bridge-app/esp32/README.md @@ -135,6 +135,14 @@ make sure the IDF_PATH has been exported(See the manual setup steps above). ESP32 based device types, please refer [examples/all-clusters-app/esp32](https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/esp32) +- Enable Ccache for faster IDF builds + + It is recommended to have Ccache installed for faster builds + + ``` + $ export IDF_CCACHE_ENABLE=1 + ``` + - To build the demo application. ``` @@ -255,8 +263,8 @@ the ESP32 all-clusters-app to commission it onto a Wi-Fi network: Parameters: -1. Discriminator: 3840 (configurable through menuconfig) -2. Setup-pin-code: 20202021 (configurable through menuconfig) +1. Discriminator: 3840 +2. Setup-pin-code: 20202021 3. Node-id: 12344321 (you can assign any node id) ### Cluster control diff --git a/examples/bridge-app/esp32/main/main.cpp b/examples/bridge-app/esp32/main/main.cpp index 0d022828740cfb..4f86e1872bcefa 100644 --- a/examples/bridge-app/esp32/main/main.cpp +++ b/examples/bridge-app/esp32/main/main.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -29,9 +30,12 @@ #include #include #include +#include #include #include +#include +#include #include #if CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER @@ -196,19 +200,6 @@ CHIP_ERROR RemoveDeviceEndpoint(Device * dev) return CHIP_ERROR_INTERNAL; } -// ZCL format -> (len, string) -uint8_t * ToZclCharString(uint8_t * zclString, const char * cString, uint8_t maxLength) -{ - size_t len = strlen(cString); - if (len > maxLength) - { - len = maxLength; - } - zclString[0] = static_cast(len); - memcpy(&zclString[1], cString, zclString[0]); - return zclString; -} - EmberAfStatus HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer, uint16_t maxReadLength) { @@ -220,7 +211,8 @@ EmberAfStatus HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::Attribut } else if ((attributeId == ZCL_NODE_LABEL_ATTRIBUTE_ID) && (maxReadLength == 32)) { - ToZclCharString(buffer, dev->GetName(), static_cast(maxReadLength - 1)); + MutableByteSpan zclNameSpan(buffer, maxReadLength); + MakeZclCharString(zclNameSpan, dev->GetName()); } else if ((attributeId == ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID) && (maxReadLength == 2)) { @@ -304,28 +296,36 @@ EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, Cluster return EMBER_ZCL_STATUS_FAILURE; } +namespace { +void CallReportingCallback(intptr_t closure) +{ + auto path = reinterpret_cast(closure); + MatterReportingAttributeChangeCallback(*path); + Platform::Delete(path); +} + +void ScheduleReportingCallback(Device * dev, ClusterId cluster, AttributeId attribute) +{ + auto * path = Platform::New(dev->GetEndpointId(), cluster, attribute); + DeviceLayer::PlatformMgr().ScheduleWork(CallReportingCallback, reinterpret_cast(path)); +} +} // anonymous namespace + void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask) { if (itemChangedMask & Device::kChanged_Reachable) { - uint8_t reachable = dev->IsReachable() ? 1 : 0; - MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID, - ZCL_REACHABLE_ATTRIBUTE_ID, ZCL_BOOLEAN_ATTRIBUTE_TYPE, &reachable); + ScheduleReportingCallback(dev, BridgedDeviceBasic::Id, BridgedDeviceBasic::Attributes::Reachable::Id); } if (itemChangedMask & Device::kChanged_State) { - uint8_t isOn = dev->IsOn() ? 1 : 0; - MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, - ZCL_BOOLEAN_ATTRIBUTE_TYPE, &isOn); + ScheduleReportingCallback(dev, OnOff::Id, OnOff::Attributes::OnOff::Id); } if (itemChangedMask & Device::kChanged_Name) { - uint8_t zclName[kNodeLabelSize + 1]; - ToZclCharString(zclName, dev->GetName(), kNodeLabelSize); - MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID, - ZCL_NODE_LABEL_ATTRIBUTE_ID, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, zclName); + ScheduleReportingCallback(dev, BridgedDeviceBasic::Id, BridgedDeviceBasic::Attributes::NodeLabel::Id); } } @@ -400,17 +400,17 @@ extern "C" void app_main() // Clear database memset(gDevices, 0, sizeof(gDevices)); + gLight1.SetReachable(true); + gLight2.SetReachable(true); + gLight3.SetReachable(true); + gLight4.SetReachable(true); + // Whenever bridged device changes its state gLight1.SetChangeCallback(&HandleDeviceStatusChanged); gLight2.SetChangeCallback(&HandleDeviceStatusChanged); gLight3.SetChangeCallback(&HandleDeviceStatusChanged); gLight4.SetChangeCallback(&HandleDeviceStatusChanged); - gLight1.SetReachable(true); - gLight2.SetReachable(true); - gLight3.SetReachable(true); - gLight4.SetReachable(true); - CHIPDeviceManager & deviceMgr = CHIPDeviceManager::GetInstance(); chip_err = deviceMgr.Init(&AppCallback); diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index 71486c8fc392bd..58e804782ddf1d 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -377,22 +378,31 @@ std::vector GetActionListInfo(chip::EndpointId parentId) return gActions; } +namespace { +void CallReportingCallback(intptr_t closure) +{ + auto path = reinterpret_cast(closure); + MatterReportingAttributeChangeCallback(*path); + Platform::Delete(path); +} + +void ScheduleReportingCallback(Device * dev, ClusterId cluster, AttributeId attribute) +{ + auto * path = Platform::New(dev->GetEndpointId(), cluster, attribute); + PlatformMgr().ScheduleWork(CallReportingCallback, reinterpret_cast(path)); +} +} // anonymous namespace + void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask) { if (itemChangedMask & Device::kChanged_Reachable) { - uint8_t reachable = dev->IsReachable() ? 1 : 0; - MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID, - ZCL_REACHABLE_ATTRIBUTE_ID, ZCL_BOOLEAN_ATTRIBUTE_TYPE, &reachable); + ScheduleReportingCallback(dev, BridgedDeviceBasic::Id, BridgedDeviceBasic::Attributes::Reachable::Id); } if (itemChangedMask & Device::kChanged_Name) { - uint8_t zclName[kNodeLabelSize]; - MutableByteSpan zclNameSpan(zclName); - MakeZclCharString(zclNameSpan, dev->GetName()); - MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID, - ZCL_NODE_LABEL_ATTRIBUTE_ID, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, zclNameSpan.data()); + ScheduleReportingCallback(dev, BridgedDeviceBasic::Id, BridgedDeviceBasic::Attributes::NodeLabel::Id); } } @@ -405,9 +415,7 @@ void HandleDeviceOnOffStatusChanged(DeviceOnOff * dev, DeviceOnOff::Changed_t it if (itemChangedMask & DeviceOnOff::kChanged_OnOff) { - uint8_t isOn = dev->IsOn() ? 1 : 0; - MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, - ZCL_BOOLEAN_ATTRIBUTE_TYPE, &isOn); + ScheduleReportingCallback(dev, OnOff::Id, OnOff::Attributes::OnOff::Id); } } @@ -872,29 +880,29 @@ int main(int argc, char * argv[]) memset(gDevices, 0, sizeof(gDevices)); // Setup Mock Devices - Light1.SetChangeCallback(&HandleDeviceOnOffStatusChanged); - Light2.SetChangeCallback(&HandleDeviceOnOffStatusChanged); - Light1.SetReachable(true); Light2.SetReachable(true); - Switch1.SetChangeCallback(&HandleDeviceSwitchStatusChanged); - Switch2.SetChangeCallback(&HandleDeviceSwitchStatusChanged); + Light1.SetChangeCallback(&HandleDeviceOnOffStatusChanged); + Light2.SetChangeCallback(&HandleDeviceOnOffStatusChanged); Switch1.SetReachable(true); Switch2.SetReachable(true); - // Setup devices for action cluster tests - ActionLight1.SetChangeCallback(&HandleDeviceOnOffStatusChanged); - ActionLight2.SetChangeCallback(&HandleDeviceOnOffStatusChanged); - ActionLight3.SetChangeCallback(&HandleDeviceOnOffStatusChanged); - ActionLight4.SetChangeCallback(&HandleDeviceOnOffStatusChanged); + Switch1.SetChangeCallback(&HandleDeviceSwitchStatusChanged); + Switch2.SetChangeCallback(&HandleDeviceSwitchStatusChanged); + // Setup devices for action cluster tests ActionLight1.SetReachable(true); ActionLight2.SetReachable(true); ActionLight3.SetReachable(true); ActionLight4.SetReachable(true); + ActionLight1.SetChangeCallback(&HandleDeviceOnOffStatusChanged); + ActionLight2.SetChangeCallback(&HandleDeviceOnOffStatusChanged); + ActionLight3.SetChangeCallback(&HandleDeviceOnOffStatusChanged); + ActionLight4.SetChangeCallback(&HandleDeviceOnOffStatusChanged); + // Define composed device with two switches ComposedDevice ComposedDevice("Composed Switcher", "Bedroom"); DeviceSwitch ComposedSwitch1("Composed Switch 1", "Bedroom", EMBER_AF_SWITCH_FEATURE_LATCHING_SWITCH); @@ -904,16 +912,16 @@ int main(int argc, char * argv[]) EMBER_AF_SWITCH_FEATURE_MOMENTARY_SWITCH_MULTI_PRESS); DevicePowerSource ComposedPowerSource("Composed Power Source", "Bedroom", EMBER_AF_POWER_SOURCE_FEATURE_BATTERY); - ComposedSwitch1.SetChangeCallback(&HandleDeviceSwitchStatusChanged); - ComposedSwitch2.SetChangeCallback(&HandleDeviceSwitchStatusChanged); - ComposedPowerSource.SetChangeCallback(&HandleDevicePowerSourceStatusChanged); - ComposedDevice.SetReachable(true); ComposedSwitch1.SetReachable(true); ComposedSwitch2.SetReachable(true); ComposedPowerSource.SetReachable(true); ComposedPowerSource.SetBatChargeLevel(58); + ComposedSwitch1.SetChangeCallback(&HandleDeviceSwitchStatusChanged); + ComposedSwitch2.SetChangeCallback(&HandleDeviceSwitchStatusChanged); + ComposedPowerSource.SetChangeCallback(&HandleDevicePowerSourceStatusChanged); + if (ChipLinuxAppInit(argc, argv) != 0) { return -1; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 97da0f40421653..cadd67a1fd1247 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -301,44 +301,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -348,7 +359,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -429,7 +440,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -437,7 +448,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -456,6 +467,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -841,7 +853,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1223,7 +1235,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index 9ea4e7a9963e51..6bf99cf5abb818 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -185,7 +185,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -193,7 +193,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -212,6 +212,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -731,7 +732,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1113,7 +1114,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index c6a9904c988bdd..d50c2189e0c6dd 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -301,44 +301,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -348,7 +359,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -429,7 +440,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -437,7 +448,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -456,6 +467,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -975,7 +987,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1357,7 +1369,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 141d0f66ecf8e0..289a20f8500804 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -198,7 +198,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -206,7 +206,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -225,6 +225,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -744,7 +745,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1126,7 +1127,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index b2b5e7487480f0..1a4a99c3aa7c54 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -294,44 +294,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -341,7 +352,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -422,7 +433,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -430,7 +441,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -449,6 +460,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -968,7 +980,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1350,7 +1362,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index ff04b5f9934278..e9ac1fb1890303 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -198,7 +198,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -206,7 +206,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -225,6 +225,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -744,7 +745,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1126,7 +1127,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index bd384a12d8524f..7943d5d9ee76c9 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -198,7 +198,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -206,7 +206,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -225,6 +225,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -744,7 +745,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1126,7 +1127,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 4570dcfa4b4ad1..08f36aa6cf63fc 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -198,7 +198,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -206,7 +206,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -225,6 +225,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -744,7 +745,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1126,7 +1127,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index 08849f0bb0845c..0b364eeaa0d0f5 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -301,44 +301,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -348,7 +359,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -429,7 +440,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -437,7 +448,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -456,6 +467,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -975,7 +987,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1357,7 +1369,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index b60a868d1b3999..c6c4ac7930da4e 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -499,7 +499,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -507,7 +507,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -526,6 +526,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -1045,7 +1046,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1427,7 +1428,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 3c6021167fc804..6654270b576023 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -346,7 +346,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -354,7 +354,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -373,6 +373,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -892,7 +893,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1274,7 +1275,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index bfdddb25db7e7e..5ea7e699ff4785 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -198,7 +198,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -206,7 +206,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -225,6 +225,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -744,7 +745,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1126,7 +1127,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index 971e68e9f8ee8d..7e7274afe8d39d 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -181,44 +181,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -228,7 +239,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -309,7 +320,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -317,7 +328,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -336,6 +347,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -855,7 +867,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1237,7 +1249,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index 0d7c1ffbde0ea6..62ca53940e28d1 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -198,7 +198,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -206,7 +206,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -225,6 +225,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -744,7 +745,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1126,7 +1127,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 638550bb8a7c23..15abcd5da025e8 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -296,7 +296,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -304,7 +304,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -323,6 +323,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -842,7 +843,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1224,7 +1225,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index bb699502abca33..960e33569fac7c 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -296,7 +296,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -304,7 +304,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -323,6 +323,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -842,7 +843,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1224,7 +1225,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/chip-tool/commands/clusters/ModelCommand.cpp b/examples/chip-tool/commands/clusters/ModelCommand.cpp index fd255abfe204b0..c67cebb1491fe0 100644 --- a/examples/chip-tool/commands/clusters/ModelCommand.cpp +++ b/examples/chip-tool/commands/clusters/ModelCommand.cpp @@ -55,7 +55,7 @@ void ModelCommand::OnDeviceConnectedFn(void * context, chip::OperationalDevicePr VerifyOrReturn(CHIP_NO_ERROR == err, command->SetCommandExitStatus(err)); } -void ModelCommand::OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR err) +void ModelCommand::OnDeviceConnectionFailureFn(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR err) { LogErrorOnFailure(err); diff --git a/examples/chip-tool/commands/clusters/ModelCommand.h b/examples/chip-tool/commands/clusters/ModelCommand.h index 4a0c2c08f5d469..d6581235863160 100644 --- a/examples/chip-tool/commands/clusters/ModelCommand.h +++ b/examples/chip-tool/commands/clusters/ModelCommand.h @@ -70,7 +70,7 @@ class ModelCommand : public CHIPCommand std::vector mEndPointId; static void OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * device); - static void OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR error); + static void OnDeviceConnectionFailureFn(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR error); chip::Callback::Callback mOnDeviceConnectedCallback; chip::Callback::Callback mOnDeviceConnectionFailureCallback; diff --git a/examples/chip-tool/commands/pairing/CloseSessionCommand.cpp b/examples/chip-tool/commands/pairing/CloseSessionCommand.cpp index b30d0accae1639..210164770a6ff7 100644 --- a/examples/chip-tool/commands/pairing/CloseSessionCommand.cpp +++ b/examples/chip-tool/commands/pairing/CloseSessionCommand.cpp @@ -78,7 +78,7 @@ void CloseSessionCommand::OnDeviceConnectedFn(void * context, OperationalDeviceP VerifyOrReturn(CHIP_NO_ERROR == err, command->SetCommandExitStatus(err)); } -void CloseSessionCommand::OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR err) +void CloseSessionCommand::OnDeviceConnectionFailureFn(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR err) { LogErrorOnFailure(err); diff --git a/examples/chip-tool/commands/pairing/CloseSessionCommand.h b/examples/chip-tool/commands/pairing/CloseSessionCommand.h index 782e334ebfe74a..270c45210f4ebe 100644 --- a/examples/chip-tool/commands/pairing/CloseSessionCommand.h +++ b/examples/chip-tool/commands/pairing/CloseSessionCommand.h @@ -47,7 +47,7 @@ class CloseSessionCommand : public CHIPCommand chip::Optional mTimeoutSecs; static void OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * device); - static void OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR error); + static void OnDeviceConnectionFailureFn(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR error); // Try to send the action CloseSession status report. CHIP_ERROR CloseSession(chip::DeviceProxy * device); diff --git a/examples/chip-tool/commands/payload/SetupPayloadGenerateCommand.cpp b/examples/chip-tool/commands/payload/SetupPayloadGenerateCommand.cpp index 74abe2a0d58d16..f95932f49de97b 100644 --- a/examples/chip-tool/commands/payload/SetupPayloadGenerateCommand.cpp +++ b/examples/chip-tool/commands/payload/SetupPayloadGenerateCommand.cpp @@ -30,7 +30,7 @@ void SetupPayloadGenerateCommand::ConfigurePayload(SetupPayload & payload) { if (mDiscriminator.HasValue()) { - payload.discriminator = mDiscriminator.Value(); + payload.discriminator.SetLongValue(mDiscriminator.Value()); } if (mSetUpPINCode.HasValue()) @@ -95,6 +95,15 @@ CHIP_ERROR SetupPayloadGenerateQRCodeCommand::Run() std::string code; ReturnErrorOnFailure(generator.payloadBase38RepresentationWithAutoTLVBuffer(code)); + // CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE includes various prefixes we don't + // control (timestamps, process ids, etc). Let's assume (hope?) that + // those prefixes use up no more than half the total available space. + constexpr size_t chunkSize = CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE / 2; + while (code.size() > chunkSize) + { + ChipLogProgress(chipTool, "QR Code: %s", code.substr(0, chunkSize).c_str()); + code = code.substr(chunkSize); + } ChipLogProgress(chipTool, "QR Code: %s", code.c_str()); return CHIP_NO_ERROR; diff --git a/examples/chip-tool/commands/payload/SetupPayloadParseCommand.cpp b/examples/chip-tool/commands/payload/SetupPayloadParseCommand.cpp index 5bf65d3976b5a3..d76b6f5d94526c 100644 --- a/examples/chip-tool/commands/payload/SetupPayloadParseCommand.cpp +++ b/examples/chip-tool/commands/payload/SetupPayloadParseCommand.cpp @@ -70,10 +70,10 @@ CHIP_ERROR SetupPayloadParseCommand::Parse(std::string codeString, chip::SetupPa CHIP_ERROR SetupPayloadParseCommand::Print(chip::SetupPayload payload) { - ChipLogProgress(SetupPayload, "Version: %u", payload.version); - ChipLogProgress(SetupPayload, "VendorID: %u", payload.vendorID); - ChipLogProgress(SetupPayload, "ProductID: %u", payload.productID); - ChipLogProgress(SetupPayload, "Custom flow: %u (%s)", to_underlying(payload.commissioningFlow), + ChipLogProgress(SetupPayload, "Version: %u", payload.version); + ChipLogProgress(SetupPayload, "VendorID: %u", payload.vendorID); + ChipLogProgress(SetupPayload, "ProductID: %u", payload.productID); + ChipLogProgress(SetupPayload, "Custom flow: %u (%s)", to_underlying(payload.commissioningFlow), CustomFlowString(payload.commissioningFlow)); { StringBuilder<128> humanFlags; @@ -106,15 +106,24 @@ CHIP_ERROR SetupPayloadParseCommand::Print(chip::SetupPayload payload) humanFlags.Add("NONE"); } - ChipLogProgress(SetupPayload, "Capabilities: 0x%02X (%s)", payload.rendezvousInformation.Raw(), humanFlags.c_str()); + ChipLogProgress(SetupPayload, "Capabilities: 0x%02X (%s)", payload.rendezvousInformation.Raw(), humanFlags.c_str()); } - ChipLogProgress(SetupPayload, "Discriminator: %u", payload.discriminator); - ChipLogProgress(SetupPayload, "Passcode: %u", payload.setUpPINCode); + if (payload.discriminator.IsShortDiscriminator()) + { + ChipLogProgress(SetupPayload, "Short discriminator: %u (0x%x)", payload.discriminator.GetShortValue(), + payload.discriminator.GetShortValue()); + } + else + { + ChipLogProgress(SetupPayload, "Long discriminator: %u (0x%x)", payload.discriminator.GetLongValue(), + payload.discriminator.GetLongValue()); + } + ChipLogProgress(SetupPayload, "Passcode: %u", payload.setUpPINCode); std::string serialNumber; if (payload.getSerialNumber(serialNumber) == CHIP_NO_ERROR) { - ChipLogProgress(SetupPayload, "SerialNumber: %s", serialNumber.c_str()); + ChipLogProgress(SetupPayload, "SerialNumber: %s", serialNumber.c_str()); } std::vector optionalVendorData = payload.getAllOptionalVendorData(); @@ -126,11 +135,11 @@ CHIP_ERROR SetupPayloadParseCommand::Print(chip::SetupPayload payload) if (isTypeString) { - ChipLogProgress(SetupPayload, "OptionalQRCodeInfo: tag=%u,string value=%s", info.tag, info.data.c_str()); + ChipLogProgress(SetupPayload, "OptionalQRCodeInfo: tag=%u,string value=%s", info.tag, info.data.c_str()); } else { - ChipLogProgress(SetupPayload, "OptionalQRCodeInfo: tag=%u,int value=%u", info.tag, info.int32); + ChipLogProgress(SetupPayload, "OptionalQRCodeInfo: tag=%u,int value=%u", info.tag, info.int32); } } diff --git a/examples/chip-tool/commands/tests/TestCommand.cpp b/examples/chip-tool/commands/tests/TestCommand.cpp index 75c4bd34482578..6de48bd810ac79 100644 --- a/examples/chip-tool/commands/tests/TestCommand.cpp +++ b/examples/chip-tool/commands/tests/TestCommand.cpp @@ -61,7 +61,7 @@ void TestCommand::OnDeviceConnectedFn(void * context, chip::OperationalDevicePro LogErrorOnFailure(command->ContinueOnChipMainThread(CHIP_NO_ERROR)); } -void TestCommand::OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR error) +void TestCommand::OnDeviceConnectionFailureFn(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR error) { ChipLogProgress(chipTool, " **** Test Setup: Device Connection Failure [deviceId=%" PRIu64 ". Error %" CHIP_ERROR_FORMAT "\n]", peerId.GetNodeId(), error.Format()); diff --git a/examples/chip-tool/commands/tests/TestCommand.h b/examples/chip-tool/commands/tests/TestCommand.h index 11bc4041304a37..e35b64df24b7a3 100644 --- a/examples/chip-tool/commands/tests/TestCommand.h +++ b/examples/chip-tool/commands/tests/TestCommand.h @@ -71,7 +71,7 @@ class TestCommand : public TestRunner, void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override{}; static void OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * device); - static void OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR error); + static void OnDeviceConnectionFailureFn(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR error); CHIP_ERROR ContinueOnChipMainThread(CHIP_ERROR err) override; diff --git a/examples/chip-tool/templates/ComplexArgumentParser-src.zapt b/examples/chip-tool/templates/ComplexArgumentParser-src.zapt index 580118b3d014a8..24614f96f4768e 100644 --- a/examples/chip-tool/templates/ComplexArgumentParser-src.zapt +++ b/examples/chip-tool/templates/ComplexArgumentParser-src.zapt @@ -11,7 +11,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, {{zapTypeToEncodable {{#unless isOptional}} {{~! Fabric index fields are not sent on writes, so don't force people to provide them. ~}} - {{#unless (isStrEqual label ../struct_fabric_idx_field)}} + {{#unless (is_num_equal fieldIdentifier 254)}} ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("{{parent.name}}.{{asLowerCamelCase label}}", "{{asLowerCamelCase label}}", value.isMember("{{asLowerCamelCase label}}"))); {{/unless}} {{/unless}} @@ -22,7 +22,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, {{zapTypeToEncodable {{#if isOptional}} if (value.isMember("{{asLowerCamelCase label}}")) { - {{else if (isStrEqual label ../struct_fabric_idx_field)}} + {{else if (is_num_equal fieldIdentifier 254)}} if (value.isMember("{{asLowerCamelCase label}}")) { {{/if}} @@ -30,7 +30,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, {{zapTypeToEncodable ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.{{asLowerCamelCase label}}, value["{{asLowerCamelCase label}}"])); {{#if isOptional}} } - {{else if (isStrEqual label ../struct_fabric_idx_field)}} + {{else if (is_num_equal fieldIdentifier 254)}} } {{/if}} diff --git a/examples/chip-tool/templates/helper.js b/examples/chip-tool/templates/helper.js index a59280c155ae2d..6fdc65cc32090d 100644 --- a/examples/chip-tool/templates/helper.js +++ b/examples/chip-tool/templates/helper.js @@ -116,14 +116,7 @@ async function structs_with_cluster_name(options) continue; } - s.items.forEach(i => { - if (i.type.toLowerCase() == "fabric_idx") { - s.struct_fabric_idx_field = i.label; - } - }) - - if (s.struct_cluster_count == 1) - { + if (s.struct_cluster_count == 1) { const clusters = await zclQuery.selectStructClusters(this.global.db, s.id); blocks.push( { id : s.id, name : s.name, struct_fabric_idx_field : s.struct_fabric_idx_field, clusterName : clusters[0].name }); @@ -137,6 +130,19 @@ async function structs_with_cluster_name(options) return templateUtil.collectBlocks(blocks, options, this); } +async function assertSameTestType(current, expected) +{ + if (current == expected) { + return ''; + } + + const filename = this.parent.parent.parent.filename; + const testName = this.parent.parent.parent.testName; + const error = `\nFile: ${filename}\nTest: ${testName}\nCluster ${this.parent.cluster} Attribute: ${this.name}: Constraint type "${ + expected}" does not match the current type "${current}".`; + throw error; +} + // // Module exports // @@ -144,3 +150,4 @@ exports.asDelimitedCommand = asDelimitedCommand; exports.asTypeMinValue = asTypeMinValue; exports.asTypeMaxValue = asTypeMaxValue; exports.structs_with_cluster_name = structs_with_cluster_name; +exports.assertSameTestType = assertSameTestType; diff --git a/examples/chip-tool/templates/logging/DataModelLogger-src.zapt b/examples/chip-tool/templates/logging/DataModelLogger-src.zapt index 1b0092461cde15..474169320f0c29 100644 --- a/examples/chip-tool/templates/logging/DataModelLogger-src.zapt +++ b/examples/chip-tool/templates/logging/DataModelLogger-src.zapt @@ -135,26 +135,26 @@ CHIP_ERROR DataModelLogger::LogEvent(const chip::app::EventHeader & header, chip ChipLogProgress(chipTool, "Endpoint: %u Cluster: " ChipLogFormatMEI " Event " ChipLogFormatMEI, header.mPath.mEndpointId, ChipLogValueMEI(header.mPath.mClusterId), ChipLogValueMEI(header.mPath.mEventId)); - ChipLogProgress(chipTool, "\t Event number: %" PRIu64, header.mEventNumber); + ChipLogProgress(chipTool, " Event number: %" PRIu64, header.mEventNumber); if (header.mPriorityLevel == chip::app::PriorityLevel::Info) { - ChipLogProgress(chipTool, "\t Priority: Info"); + ChipLogProgress(chipTool, " Priority: Info"); } else if (header.mPriorityLevel == chip::app::PriorityLevel::Critical) { - ChipLogProgress(chipTool, "\t Priority: Critical"); + ChipLogProgress(chipTool, " Priority: Critical"); } else if (header.mPriorityLevel == chip::app::PriorityLevel::Debug) { - ChipLogProgress(chipTool, "\t Priority: Debug"); + ChipLogProgress(chipTool, " Priority: Debug"); } else { - ChipLogProgress(chipTool, "\t Priority: Unknown"); + ChipLogProgress(chipTool, " Priority: Unknown"); } - ChipLogProgress(chipTool, "\t Timestamp: %" PRIu64, header.mTimestamp.mValue); + ChipLogProgress(chipTool, " Timestamp: %" PRIu64, header.mTimestamp.mValue); switch (header.mPath.mClusterId) { diff --git a/examples/chip-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt b/examples/chip-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt index da6a6b6a230b14..95c52a5b934c46 100644 --- a/examples/chip-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt +++ b/examples/chip-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt @@ -9,8 +9,9 @@ {{~#chip_tests_iterate_constraints expectedConstraints}} {{~#if (isStrEqual constraint "hasValue")}} {{~! Already handled above~}} - {{~else if (isStrEqual constraint "type")}}VerifyOrReturn(CheckConstraintType("{{asPropertyValue context=..}}", "", "{{value}}")); - + {{~else if (isStrEqual constraint "type")}} + {{~assertSameTestType (asTestType ../type ../isArray) value~}} + VerifyOrReturn(CheckConstraintType("{{asPropertyValue context=..}}", "{{asTestType ../type ../isArray}}", "{{value}}")); {{~else if (isStrEqual constraint "format")}}VerifyOrReturn(CheckConstraintFormat("{{asPropertyValue context=..}}", "", "{{value}}")); {{~else if (isStrEqual constraint "startsWith")}}VerifyOrReturn(CheckConstraintStartsWith("{{asPropertyValue context=..}}", {{asPropertyValue context=..}}, "{{value}}")); diff --git a/examples/common/tracing/decoder/secure_channel/Decoder.cpp b/examples/common/tracing/decoder/secure_channel/Decoder.cpp index a1cf96ea187fc2..04ec5522ff8391 100644 --- a/examples/common/tracing/decoder/secure_channel/Decoder.cpp +++ b/examples/common/tracing/decoder/secure_channel/Decoder.cpp @@ -35,7 +35,6 @@ constexpr const char * kPBKDFParamResponse = "Password-Based Key Derivation Para constexpr const char * kPASE_Pake1 = "Password Authenticated Session Establishment '1'"; constexpr const char * kPASE_Pake2 = "Password Authenticated Session Establishment '2'"; constexpr const char * kPASE_Pake3 = "Password Authenticated Session Establishment '3'"; -constexpr const char * kPASE_PakeError = "Password-authenticated key exchange Error"; constexpr const char * kCASE_Sigma1 = "Certificate Authenticated Session Establishment Sigma '1'"; constexpr const char * kCASE_Sigma2 = "Certificate Authenticated Session Establishment Sigma '2'"; constexpr const char * kCASE_Sigma3 = "Certificate Authenticated Session Establishment Sigma '3'"; @@ -60,7 +59,6 @@ CHIP_ERROR DecodePBDFKParamResponse(TLV::TLVReader & reader); CHIP_ERROR DecodePASEPake1(TLV::TLVReader & reader); CHIP_ERROR DecodePASEPake2(TLV::TLVReader & reader); CHIP_ERROR DecodePASEPake3(TLV::TLVReader & reader); -CHIP_ERROR DecodePASEPakeError(TLV::TLVReader & reader); CHIP_ERROR DecodeCASESigma1(TLV::TLVReader & reader); CHIP_ERROR DecodeCASESigma2(TLV::TLVReader & reader); CHIP_ERROR DecodeCASESigma3(TLV::TLVReader & reader); @@ -92,8 +90,6 @@ const char * ToProtocolMessageTypeName(uint8_t protocolCode) return kPASE_Pake2; case to_underlying(MessageType::PASE_Pake3): return kPASE_Pake3; - case to_underlying(MessageType::PASE_PakeError): - return kPASE_PakeError; case to_underlying(MessageType::CASE_Sigma1): return kCASE_Sigma1; case to_underlying(MessageType::CASE_Sigma2): @@ -132,8 +128,6 @@ CHIP_ERROR LogAsProtocolMessage(uint8_t protocolCode, const uint8_t * data, size return DecodePASEPake2(reader); case to_underlying(MessageType::PASE_Pake3): return DecodePASEPake3(reader); - case to_underlying(MessageType::PASE_PakeError): - return DecodePASEPakeError(reader); case to_underlying(MessageType::CASE_Sigma1): return DecodeCASESigma1(reader); case to_underlying(MessageType::CASE_Sigma2): @@ -323,11 +317,6 @@ CHIP_ERROR DecodePASEPake3(TLV::TLVReader & reader) return CHIP_NO_ERROR; } -CHIP_ERROR DecodePASEPakeError(TLV::TLVReader & reader) -{ - return CHIP_ERROR_NOT_IMPLEMENTED; -} - CHIP_ERROR DecodeCASESigma1(TLV::TLVReader & reader) { constexpr uint8_t kInitiatorRandomTag = 1; diff --git a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm index 490eec1e7421b9..40d265b3e171e1 100644 --- a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm @@ -38,9 +38,6 @@ ChipLogProgress(chipTool, "Running Command"); ReturnErrorOnFailure(MaybeSetUpStack()); SetIdentity(mCommissionerName.HasValue() ? mCommissionerName.Value() : kIdentityAlpha); - ChipLogDetail(chipTool, "Setting OTA Provider Delegate:"); - mOTADelegate.nodeID = [CurrentCommissioner() controllerNodeId]; - [CurrentCommissioner() setOTAProviderDelegate:mOTADelegate queue:mOTAProviderCallbackQueue]; ReturnLogErrorOnFailure(RunCommand()); ReturnLogErrorOnFailure(StartWaiting(GetWaitDuration())); @@ -67,7 +64,6 @@ CHIPToolKeypair * nocSigner = [[CHIPToolKeypair alloc] init]; storage = [[CHIPToolPersistentStorageDelegate alloc] init]; - mOTAProviderCallbackQueue = dispatch_queue_create("com.darwin-framework-tool.command", DISPATCH_QUEUE_SERIAL); mOTADelegate = [[OTAProviderDelegate alloc] init]; auto factory = [MTRControllerFactory sharedInstance]; @@ -79,6 +75,7 @@ auto params = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; params.port = @(kListenPort); params.startServer = YES; + params.otaProviderDelegate = mOTADelegate; if ([factory startup:params] == NO) { ChipLogError(chipTool, "Controller factory startup failed"); diff --git a/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm b/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm index 1ee29bf5da13b6..ebcf7ae0faaae6 100644 --- a/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm +++ b/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm @@ -17,11 +17,15 @@ #include "OTAProviderDelegate.h" #import +#include constexpr uint8_t kUpdateTokenLen = 32; @interface OTAProviderDelegate () @property NSString * mOTAFilePath; +@property NSFileHandle * mFileHandle; +@property NSNumber * mFileOffset; +@property NSNumber * mFileEndOffset; @property DeviceSoftwareVersionModel * candidate; @end @@ -30,22 +34,21 @@ @implementation OTAProviderDelegate - (instancetype)init { if (self = [super init]) { - _nodeID = @(0); _selectedCandidate = [[DeviceSoftwareVersionModel alloc] init]; _userConsentState = OTAProviderUserUnknown; } return self; } -// TODO: When BDX is added to Matter.framework, update to initialize -// it when there is an update available. - (void)handleQueryImage:(MTROtaSoftwareUpdateProviderClusterQueryImageParams * _Nonnull)params completionHandler:(void (^_Nonnull)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { NSError * error; - _selectedCandidate.status = @(MTROtaSoftwareUpdateProviderOTAQueryStatusNotAvailable); - if (![params.protocolsSupported containsObject:@(MTROtaSoftwareUpdateProviderOTADownloadProtocolBDXSynchronous)]) { + + auto isBDXProtocolSupported = + [params.protocolsSupported containsObject:@(MTROtaSoftwareUpdateProviderOTADownloadProtocolBDXSynchronous)]; + if (!isBDXProtocolSupported) { _selectedCandidate.status = @(MTROtaSoftwareUpdateProviderOTAQueryStatusDownloadProtocolNotSupported); error = [[NSError alloc] initWithDomain:@"OTAProviderDomain" @@ -55,42 +58,47 @@ - (void)handleQueryImage:(MTROtaSoftwareUpdateProviderClusterQueryImageParams * return; } - if ([self SelectOTACandidate:params.vendorId rPID:params.productId rSV:params.softwareVersion]) { - _selectedCandidate.status = @(MTROtaSoftwareUpdateProviderOTAQueryStatusUpdateAvailable); - _selectedCandidate.updateToken = [self generateUpdateToken]; - if (params.requestorCanConsent.integerValue == 1) { - _selectedCandidate.userConsentNeeded - = (_userConsentState == OTAProviderUserUnknown || _userConsentState == OTAProviderUserDenied) ? @(1) : @(0); - NSLog(@"User Consent Needed: %@", _selectedCandidate.userConsentNeeded); - } else { - NSLog(@"Requestor cannot obtain user consent. Our State: %hhu", _userConsentState); - switch (_userConsentState) { - case OTAProviderUserGranted: - NSLog(@"User Consent Granted"); - _queryImageStatus = MTROtaSoftwareUpdateProviderOTAQueryStatusUpdateAvailable; - break; - - case OTAProviderUserObtaining: - NSLog(@"User Consent Obtaining"); - _queryImageStatus = MTROtaSoftwareUpdateProviderOTAQueryStatusBusy; - break; - - case OTAProviderUserDenied: - case OTAProviderUserUnknown: - NSLog(@"User Consent Denied or Uknown"); - _queryImageStatus = MTROtaSoftwareUpdateProviderOTAQueryStatusNotAvailable; - break; - } - _selectedCandidate.status = @(_queryImageStatus); - } - } else { + auto hasCandidate = [self SelectOTACandidate:params.vendorId rPID:params.productId rSV:params.softwareVersion]; + if (!hasCandidate) { NSLog(@"Unable to select OTA Image."); _selectedCandidate.status = @(MTROtaSoftwareUpdateProviderOTAQueryStatusNotAvailable); error = [[NSError alloc] initWithDomain:@"OTAProviderDomain" code:MTRErrorCodeInvalidState userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"Unable to select Candidate.", nil) }]; + return; + } + + _selectedCandidate.updateToken = [self generateUpdateToken]; + + if (params.requestorCanConsent.integerValue == 1) { + _selectedCandidate.status = @(MTROtaSoftwareUpdateProviderOTAQueryStatusUpdateAvailable); + _selectedCandidate.userConsentNeeded + = (_userConsentState == OTAProviderUserUnknown || _userConsentState == OTAProviderUserDenied) ? @(1) : @(0); + NSLog(@"User Consent Needed: %@", _selectedCandidate.userConsentNeeded); + completionHandler(_selectedCandidate, error); + return; } + + NSLog(@"Requestor cannot obtain user consent. Our State: %hhu", _userConsentState); + switch (_userConsentState) { + case OTAProviderUserGranted: + NSLog(@"User Consent Granted"); + _queryImageStatus = MTROtaSoftwareUpdateProviderOTAQueryStatusUpdateAvailable; + break; + + case OTAProviderUserObtaining: + NSLog(@"User Consent Obtaining"); + _queryImageStatus = MTROtaSoftwareUpdateProviderOTAQueryStatusBusy; + break; + + case OTAProviderUserDenied: + case OTAProviderUserUnknown: + NSLog(@"User Consent Denied or Uknown"); + _queryImageStatus = MTROtaSoftwareUpdateProviderOTAQueryStatusNotAvailable; + break; + } + _selectedCandidate.status = @(_queryImageStatus); completionHandler(_selectedCandidate, error); } @@ -110,6 +118,85 @@ - (void)handleNotifyUpdateApplied:(MTROtaSoftwareUpdateProviderClusterNotifyUpda completionHandler(nil); } +- (void)handleBDXTransferSessionBegin:(NSString * _Nonnull)fileDesignator + offset:(NSNumber * _Nonnull)offset + completionHandler:(void (^)(NSError * error))completionHandler +{ + NSLog(@"BDX TransferSession begin with %@ (offset: %@)", fileDesignator, offset); + + auto * handle = [NSFileHandle fileHandleForReadingAtPath:fileDesignator]; + if (handle == nil) { + auto errorString = [NSString stringWithFormat:@"Error accessing file at at %@", fileDesignator]; + auto error = [[NSError alloc] initWithDomain:@"OTAProviderDomain" + code:MTRErrorCodeGeneralError + userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(errorString, nil) }]; + completionHandler(error); + return; + } + + NSError * seekError = nil; + [handle seekToOffset:[offset unsignedLongValue] error:&seekError]; + if (seekError != nil) { + auto errorString = [NSString stringWithFormat:@"Error seeking file (%@) to offset %@", fileDesignator, offset]; + auto error = [[NSError alloc] initWithDomain:@"OTAProviderDomain" + code:MTRErrorCodeGeneralError + userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(errorString, nil) }]; + completionHandler(error); + return; + } + + uint64_t endOffset; + if (![handle seekToEndReturningOffset:&endOffset error:&seekError]) { + auto errorString = [NSString stringWithFormat:@"Error seeking file (%@) to end offset", fileDesignator]; + auto error = [[NSError alloc] initWithDomain:@"OTAProviderDomain" + code:MTRErrorCodeGeneralError + userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(errorString, nil) }]; + completionHandler(error); + return; + } + + _mFileHandle = handle; + _mFileOffset = offset; + _mFileEndOffset = @(endOffset); + completionHandler(nil); +} + +- (void)handleBDXTransferSessionEnd:(NSError * _Nullable)error +{ + NSLog(@"BDX TransferSession end with error: %@", error); + _mFileHandle = nil; + _mFileOffset = nil; + _mFileEndOffset = nil; +} + +- (void)handleBDXQuery:(NSNumber * _Nonnull)blockSize + blockIndex:(NSNumber * _Nonnull)blockIndex + bytesToSkip:(NSNumber * _Nonnull)bytesToSkip + completionHandler:(void (^)(NSData * _Nullable data, BOOL isEOF))completionHandler +{ + NSLog(@"BDX Query received blockSize: %@, blockIndex: %@", blockSize, blockIndex); + + NSError * error = nil; + auto offset = [_mFileOffset unsignedLongValue] + [bytesToSkip unsignedLongLongValue] + + ([blockSize unsignedLongValue] * [blockIndex unsignedLongValue]); + [_mFileHandle seekToOffset:offset error:&error]; + if (error != nil) { + NSLog(@"Error seeking to offset %@", @(offset)); + completionHandler(nil, NO); + return; + } + + NSData * data = [_mFileHandle readDataUpToLength:[blockSize unsignedLongValue] error:&error]; + if (error != nil) { + NSLog(@"Error reading file %@", _mFileHandle); + completionHandler(nil, NO); + return; + } + + BOOL isEOF = offset + [blockSize unsignedLongValue] >= [_mFileEndOffset unsignedLongLongValue]; + completionHandler(data, isEOF); +} + - (void)SetOTAFilePath:(const char *)path { _mOTAFilePath = [NSString stringWithUTF8String:path]; @@ -130,23 +217,30 @@ - (bool)SelectOTACandidate:(NSNumber *)requestorVendorID rPID:(NSNumber *)requestorProductID rSV:(NSNumber *)requestorSoftwareVersion { + auto vendorId = [requestorVendorID unsignedIntValue]; + auto productId = [requestorProductID unsignedIntValue]; + auto softwareVersion = [requestorSoftwareVersion unsignedLongValue]; + bool candidateFound = false; NSArray * sortedArray = [_candidates sortedArrayUsingSelector:@selector(CompareSoftwareVersions:)]; for (DeviceSoftwareVersionModel * candidate : sortedArray) { - if (candidate.deviceModelData.softwareVersionValid - && ([requestorSoftwareVersion unsignedLongValue] < [candidate.softwareVersion unsignedLongValue]) - && ([requestorSoftwareVersion unsignedLongValue] >= - [candidate.deviceModelData.minApplicableSoftwareVersion unsignedLongValue]) - && ([requestorSoftwareVersion unsignedLongValue] <= - [candidate.deviceModelData.maxApplicableSoftwareVersion unsignedLongValue]) - && ([requestorVendorID unsignedIntValue] == [candidate.deviceModelData.vendorId unsignedIntValue]) - && ([requestorProductID unsignedIntValue] == [candidate.deviceModelData.productId unsignedIntValue])) { - candidateFound = true; + auto candidateSoftwareVersionValid = candidate.deviceModelData.softwareVersionValid; + auto candidateSoftwareVersion = [candidate.softwareVersion unsignedLongValue]; + auto candidateMinApplicableSoftwareVersion = [candidate.deviceModelData.minApplicableSoftwareVersion unsignedLongValue]; + auto candidateMaxApplicableSoftwareVersion = [candidate.deviceModelData.maxApplicableSoftwareVersion unsignedLongValue]; + auto candidateVendorId = [candidate.deviceModelData.vendorId unsignedIntValue]; + auto candidateProductId = [candidate.deviceModelData.productId unsignedIntValue]; + + if (candidateSoftwareVersionValid && (softwareVersion < candidateSoftwareVersion) + && (softwareVersion >= candidateMinApplicableSoftwareVersion) + && (softwareVersion <= candidateMaxApplicableSoftwareVersion) && (vendorId == candidateVendorId) + && (productId == candidateProductId)) { _selectedCandidate = candidate; - _selectedCandidate.imageURI = [NSString - stringWithFormat:@"bdx://%016llX/%@", [_nodeID unsignedLongLongValue], _selectedCandidate.deviceModelData.otaURL]; + _selectedCandidate.imageURI = candidate.deviceModelData.otaURL; + candidateFound = true; } } + return candidateFound; } diff --git a/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.h b/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.h index 64af48f8bf5364..f17147c2eb4d45 100644 --- a/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.h +++ b/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.h @@ -27,7 +27,7 @@ class OTASoftwareUpdateBase : public CHIPCommandBridge { : CHIPCommandBridge(commandName) { } - void SetCandidatesFromFilePath(char * _Nonnull filePath); + CHIP_ERROR SetCandidatesFromFilePath(char * _Nonnull filePath); CHIP_ERROR SetUserConsentStatus(char * _Nonnull status); static constexpr size_t kFilepathBufLen = 256; diff --git a/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.mm b/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.mm index fae950f04a91a6..3bc3192b743b69 100644 --- a/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.mm +++ b/examples/darwin-framework-tool/commands/provider/OTASoftwareUpdateInteractive.mm @@ -19,12 +19,9 @@ #include #include -// TODO: Objective-C Matter.framework needs to expose this. -#include - constexpr size_t kOtaHeaderMaxSize = 1024; -bool ParseOTAHeader(chip::OTAImageHeaderParser & parser, const char * otaFilePath, chip::OTAImageHeader & header) +MTROTAHeader * ParseOTAHeader(const char * otaFilePath) { uint8_t otaFileContent[kOtaHeaderMaxSize]; chip::ByteSpan buffer(otaFileContent); @@ -32,34 +29,23 @@ bool ParseOTAHeader(chip::OTAImageHeaderParser & parser, const char * otaFilePat std::ifstream otaFile(otaFilePath, std::ifstream::in); if (!otaFile.is_open() || !otaFile.good()) { ChipLogError(SoftwareUpdate, "Error opening OTA image file: %s", otaFilePath); - return false; + return nil; } otaFile.read(reinterpret_cast(otaFileContent), kOtaHeaderMaxSize); if (otaFile.bad()) { ChipLogError(SoftwareUpdate, "Error reading OTA image file: %s", otaFilePath); - return false; - } - - parser.Init(); - if (!parser.IsInitialized()) { - return false; - } - - CHIP_ERROR error = parser.AccumulateAndDecode(buffer, header); - if (error != CHIP_NO_ERROR) { - ChipLogError(SoftwareUpdate, "Error parsing OTA image header: %" CHIP_ERROR_FORMAT, error.Format()); - return false; + return nil; } - return true; + NSError * error; + return [MTROTAHeaderParser headerFromData:[NSData dataWithBytes:buffer.data() length:buffer.size()] error:&error]; } // Parses the JSON filepath and extracts DeviceSoftwareVersionModel parameters static bool ParseJsonFileAndPopulateCandidates( const char * filepath, NSMutableArray ** _Nonnull candidates) { - bool ret = false; Json::Value root; Json::CharReaderBuilder builder; JSONCPP_STRING errs; @@ -70,85 +56,115 @@ static bool ParseJsonFileAndPopulateCandidates( if (!ifs.good()) { ChipLogError(SoftwareUpdate, "Error opening ifstream with file: \"%s\"", filepath); - return ret; + return false; } if (!parseFromStream(builder, ifs, &root, &errs)) { ChipLogError(SoftwareUpdate, "Error parsing JSON from file: \"%s\"", filepath); - return ret; + return false; } const Json::Value devSofVerModValue = root["deviceSoftwareVersionModel"]; if (!devSofVerModValue || !devSofVerModValue.isArray()) { ChipLogError(SoftwareUpdate, "Error: Key deviceSoftwareVersionModel not found or its value is not of type Array"); - } else { - *candidates = [[NSMutableArray alloc] init]; - for (auto iter : devSofVerModValue) { - DeviceSoftwareVersionModel * candidate = [[DeviceSoftwareVersionModel alloc] init]; - candidate.deviceModelData.vendorId = [NSNumber numberWithUnsignedInt:iter.get("vendorId", 1).asUInt()]; - candidate.deviceModelData.productId = [NSNumber numberWithUnsignedInt:iter.get("productId", 1).asUInt()]; - candidate.softwareVersion = [NSNumber numberWithUnsignedLong:iter.get("softwareVersion", 10).asUInt64()]; - candidate.softwareVersionString = - [NSString stringWithUTF8String:iter.get("softwareVersionString", "1.0.0").asCString()]; - candidate.deviceModelData.cDVersionNumber = [NSNumber numberWithUnsignedInt:iter.get("cDVersionNumber", 0).asUInt()]; - candidate.deviceModelData.softwareVersionValid = iter.get("softwareVersionValid", true).asBool() ? YES : NO; - candidate.deviceModelData.minApplicableSoftwareVersion = - [NSNumber numberWithUnsignedLong:iter.get("minApplicableSoftwareVersion", 0).asUInt64()]; - candidate.deviceModelData.maxApplicableSoftwareVersion = - [NSNumber numberWithUnsignedLong:iter.get("maxApplicableSoftwareVersion", 1000).asUInt64()]; - candidate.deviceModelData.otaURL = [NSString stringWithUTF8String:iter.get("otaURL", "https://test.com").asCString()]; - [*candidates addObject:candidate]; - ret = true; - } + return false; } + + *candidates = [[NSMutableArray alloc] init]; + + bool ret = false; + for (auto iter : devSofVerModValue) { + DeviceSoftwareVersionModel * candidate = [[DeviceSoftwareVersionModel alloc] init]; + + auto vendorId = [NSNumber numberWithUnsignedInt:iter.get("vendorId", 1).asUInt()]; + auto productId = [NSNumber numberWithUnsignedInt:iter.get("productId", 1).asUInt()]; + auto softwareVersion = [NSNumber numberWithUnsignedLong:iter.get("softwareVersion", 10).asUInt64()]; + auto softwareVersionString = [NSString stringWithUTF8String:iter.get("softwareVersionString", "1.0.0").asCString()]; + auto cDVersionNumber = [NSNumber numberWithUnsignedInt:iter.get("cDVersionNumber", 0).asUInt()]; + auto softwareVersionValid = iter.get("softwareVersionValid", true).asBool() ? YES : NO; + auto minApplicableSoftwareVersion = + [NSNumber numberWithUnsignedLong:iter.get("minApplicableSoftwareVersion", 0).asUInt64()]; + auto maxApplicableSoftwareVersion = + [NSNumber numberWithUnsignedLong:iter.get("maxApplicableSoftwareVersion", 1000).asUInt64()]; + auto otaURL = [NSString stringWithUTF8String:iter.get("otaURL", "https://test.com").asCString()]; + + candidate.deviceModelData.vendorId = vendorId; + candidate.deviceModelData.productId = productId; + candidate.softwareVersion = softwareVersion; + candidate.softwareVersionString = softwareVersionString; + candidate.deviceModelData.cDVersionNumber = cDVersionNumber; + candidate.deviceModelData.softwareVersionValid = softwareVersionValid; + candidate.deviceModelData.minApplicableSoftwareVersion = minApplicableSoftwareVersion; + candidate.deviceModelData.maxApplicableSoftwareVersion = maxApplicableSoftwareVersion; + candidate.deviceModelData.otaURL = otaURL; + [*candidates addObject:candidate]; + ret = true; + } + return ret; } CHIP_ERROR OTASoftwareUpdateSetFilePath::RunCommand() { - SetCandidatesFromFilePath(mOTACandidatesFilePath); + auto error = SetCandidatesFromFilePath(mOTACandidatesFilePath); SetCommandExitStatus(nil); - - return CHIP_NO_ERROR; + return error; } CHIP_ERROR OTASoftwareUpdateSetStatus::RunCommand() { - CHIP_ERROR error = CHIP_NO_ERROR; - error = SetUserConsentStatus(mUserConsentStatus); + auto error = SetUserConsentStatus(mUserConsentStatus); SetCommandExitStatus(nil); - return error; } -void OTASoftwareUpdateBase::SetCandidatesFromFilePath(char * _Nonnull filePath) +CHIP_ERROR OTASoftwareUpdateBase::SetCandidatesFromFilePath(char * _Nonnull filePath) { NSMutableArray * candidates; ChipLogDetail(chipTool, "Setting candidates from file path: %s", filePath); - ParseJsonFileAndPopulateCandidates(filePath, &candidates); + VerifyOrReturnError(ParseJsonFileAndPopulateCandidates(filePath, &candidates), CHIP_ERROR_INTERNAL); + for (DeviceSoftwareVersionModel * candidate : candidates) { - chip::OTAImageHeaderParser parser; - chip::OTAImageHeader header; - ParseOTAHeader(parser, [candidate.deviceModelData.otaURL UTF8String], header); + auto otaURL = [candidate.deviceModelData.otaURL UTF8String]; + auto header = ParseOTAHeader(otaURL); + VerifyOrReturnError(header != nil, CHIP_ERROR_INVALID_ARGUMENT); + ChipLogDetail(chipTool, "Validating image list candidate %s: ", [candidate.deviceModelData.otaURL UTF8String]); - VerifyOrDie([candidate.deviceModelData.vendorId unsignedIntValue] == header.mVendorId); - VerifyOrDie([candidate.deviceModelData.productId unsignedIntValue] == header.mProductId); - VerifyOrDie([candidate.softwareVersion unsignedLongValue] == header.mSoftwareVersion); - VerifyOrDie([candidate.softwareVersionString length] == header.mSoftwareVersionString.size()); - VerifyOrDie(memcmp([candidate.softwareVersionString UTF8String], header.mSoftwareVersionString.data(), - header.mSoftwareVersionString.size()) - == 0); - if (header.mMinApplicableVersion.HasValue()) { - VerifyOrDie( - [candidate.deviceModelData.minApplicableSoftwareVersion unsignedLongValue] == header.mMinApplicableVersion.Value()); + + auto vendorId = [candidate.deviceModelData.vendorId unsignedIntValue]; + auto productId = [candidate.deviceModelData.productId unsignedIntValue]; + auto softwareVersion = [candidate.softwareVersion unsignedLongValue]; + auto softwareVersionString = [candidate.softwareVersionString UTF8String]; + auto softwareVersionStringLength = [candidate.softwareVersionString length]; + auto minApplicableSoftwareVersion = [candidate.deviceModelData.minApplicableSoftwareVersion unsignedLongValue]; + auto maxApplicableSoftwareVersion = [candidate.deviceModelData.maxApplicableSoftwareVersion unsignedLongValue]; + + auto headerVendorId = [header.vendorID unsignedIntValue]; + auto headerProductId = [header.productID unsignedIntValue]; + auto headerSoftwareVersion = [header.softwareVersion unsignedLongValue]; + auto headerSoftwareVersionString = [header.softwareVersionString UTF8String]; + auto headerSoftwareVersionStringLength = [header.softwareVersionString length]; + + VerifyOrReturnError(vendorId == headerVendorId, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(productId == headerProductId, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(softwareVersion == headerSoftwareVersion, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(softwareVersionStringLength == headerSoftwareVersionStringLength, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(memcmp(softwareVersionString, headerSoftwareVersionString, headerSoftwareVersionStringLength) == 0, + CHIP_ERROR_INVALID_ARGUMENT); + + if (header.minApplicableVersion) { + auto version = [header.minApplicableVersion unsignedLongValue]; + VerifyOrReturnError(minApplicableSoftwareVersion == version, CHIP_ERROR_INVALID_ARGUMENT); } - if (header.mMaxApplicableVersion.HasValue()) { - VerifyOrDie( - [candidate.deviceModelData.maxApplicableSoftwareVersion unsignedLongValue] == header.mMaxApplicableVersion.Value()); + + if (header.maxApplicableVersion) { + auto version = [header.maxApplicableVersion unsignedLongValue]; + VerifyOrReturnError(maxApplicableSoftwareVersion == version, CHIP_ERROR_INVALID_ARGUMENT); } - parser.Clear(); } + mOTADelegate.candidates = candidates; + return CHIP_NO_ERROR; } CHIP_ERROR OTASoftwareUpdateBase::SetUserConsentStatus(char * _Nonnull otaSTatus) diff --git a/examples/darwin-framework-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt b/examples/darwin-framework-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt index 073efc9cab618e..26293b6314d470 100644 --- a/examples/darwin-framework-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt +++ b/examples/darwin-framework-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt @@ -8,7 +8,7 @@ if ({{>actualValue}} != nil) { {{/if}} - {{#if (hasProperty expectedConstraints "type")}}VerifyOrReturn(CheckConstraintType("{{>item}}", "", "{{expectedConstraints.type}}"));{{/if}} + {{#if (hasProperty expectedConstraints "type")}}VerifyOrReturn(CheckConstraintType("{{>item}}", "{{asTestType type isArray}}", "{{expectedConstraints.type}}"));{{/if}} {{~#if (hasProperty expectedConstraints "format")}}VerifyOrReturn(CheckConstraintFormat("{{>item}}", "", "{{expectedConstraints.format}}"));{{/if}} diff --git a/examples/light-switch-app/ameba/.gitignore b/examples/light-switch-app/ameba/.gitignore new file mode 100755 index 00000000000000..234526a082ad26 --- /dev/null +++ b/examples/light-switch-app/ameba/.gitignore @@ -0,0 +1,5 @@ +*.vscode + +/build/ +/sdkconfig +/sdkconfig.old diff --git a/examples/light-switch-app/ameba/README.md b/examples/light-switch-app/ameba/README.md new file mode 100644 index 00000000000000..9d338118fa425b --- /dev/null +++ b/examples/light-switch-app/ameba/README.md @@ -0,0 +1,155 @@ +# CHIP Ameba Light Switch Example + +This example demonstrates Matter Light-Switch application on Ameba platform. + +--- + +- [CHIP Ameba Light Switch Example](#chip-ameba-light-switch-example) + - [Supported Device](#supported-device) + - [Building the Example Application](#building-the-example-application) + - [Commissioning](#commissioning) + - [BLE mode](#ble-mode) + - [IP mode](#ip-mode) + - [Cluster control](#cluster-control) + - [Running RPC Console](#running-rpc-console) + - [Running Matter Shell](#running-matter-shell) + - [Binding and Controlling a Lighting Device](#binding-and-controlling-a-lighting-device) + +--- + +## Supported Device + +The CHIP demo application is supported on +[Ameba RTL8722DM Board](https://www.amebaiot.com/en/amebad). + +## Building the Example Application + +- Pull docker image: + + $ docker pull connectedhomeip/chip-build-ameba:latest + +- Run docker container: + + $ docker run -it -v ${CHIP_DIR}:/root/chip connectedhomeip/chip-build-ameba:latest + +- Setup build environment: + + $ source ./scripts/bootstrap.sh + +- To build the demo application: + + $ ./scripts/build/build_examples.py --target ameba-amebad-light-switch build + + The output image files are stored in + `out/ameba-amebad-light-switch/asdk/image` folder. + + The bootloader image files are stored in + `out/ameba-amebad-light-switch/asdk/bootloader` folder. + +- After building the application, **Ameba Image Tool** is used to flash it to + Ameba board. + +1. Connect your device via USB and open Ameba Image Tool. +2. Select correct serial port and set baudrate as **115200**. +3. Browse and add the corresponding image files in the Flash Download list to + the correct locations +4. Click **Download** button. + +## Commissioning + +There are two commissioning modes supported by Ameba platform: + +### BLE mode + +1. Build and Flash +2. The light-switch example will run automatically after booting the Ameba + board. +3. Test with + [Chip-Tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool) + +### IP mode + +1. Build and Flash +2. The light-switch example will run automatically after booting the Ameba + board. +3. Connect to AP using `ATW0, ATW1, ATWC` commands +4. Test with + [Chip-Tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool) + +## Cluster Control + +After successful commissioning, use the OnOff cluster command to control the +OnOff attribute. This allows you to toggle a parameter implemented by the device +to be On or Off. + +- Via + [Chip-Tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool#using-the-client-to-send-matter-commands) + + $ ./chip-tool onoff on 1 + $ ./chip-tool onoff off 1 + +## Running RPC Console + +- Connect a USB-TTL adapter as shown below + + Ameba USB-TTL + A19 TX + A18 RX + GND GND + +* Build the + [chip-rpc console](https://github.com/project-chip/connectedhomeip/tree/master/examples/common/pigweed/rpc_console) + +* As part of building the example with RPCs enabled the chip_rpc python + interactive console is installed into your venv. The python wheel files are + also created in the output folder: out/debug/chip_rpc_console_wheels. To + install the wheel files without rebuilding: + + $ pip3 install out/debug/chip_rpc_console_wheels/*.whl + +- Launch the chip-rpc console after resetting Ameba board + + $ chip-console --device /dev/tty -b 115200 + +* Get and Set lighting directly using the RPC console + + python + rpcs.chip.rpc.Lighting.Get() + rpcs.chip.rpc.Lighting.Set(on=True, level=128, color=protos.chip.rpc.LightingColor(hue=5, saturation=5)) + +## Running Matter Shell + +- Matter Shell is enabled whenever RPC is disabled. + +- RPC console and Matter Shell cannot be enabled at the same time as they use + the same UART port. + +- Connect Ameba to the USB-TTL adapter as shown in the RPC section. + +- Open the USB-TTL serial port and type `help` to view the available commands + +## Binding and Controlling a Lighting Device + +- This example shows how to bind a Switch Device to a Lighting Device and + control it through the Matter Shell. One binding client (Switch Device) and + one binding server (Lighting Device) is required. + +- Commission the switch (nodeID 1) and lighting device (nodeID 2) using + chip-tool. + + $ ./chip-tool pairing ble-wifi 1 20202021 3840 + $ ./chip-tool pairing ble-wifi 2 20202021 3840 + +* After successful commissioning, configure the ACL in the lighting device to + allow access from switch device and chip-tool. + + $ ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null },{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [1], "targets": null }]' 2 0 + +- Bind the lighting device to the switch device. + + $ ./chip-tool binding write binding '[{"fabricIndex": 1, "node":2, "endpoint":1, "cluster":6}]' 1 1 + +- Control the lighting device through the switch device's Matter Shell + + > switch onoff on + > switch onoff off diff --git a/examples/light-switch-app/ameba/chip_main.cmake b/examples/light-switch-app/ameba/chip_main.cmake new file mode 100755 index 00000000000000..594300a5563a23 --- /dev/null +++ b/examples/light-switch-app/ameba/chip_main.cmake @@ -0,0 +1,298 @@ +cmake_minimum_required(VERSION 3.6) + +project(chip_main) + +set(chip_dir "${ameba_matter_root}") +set(chip_dir_output "${matter_output_path}/chip") +set(dir "${sdk_root}/component/common/api") +set(chip_main chip_main) +set(list_chip_main_sources chip_main_sources) + +if (matter_enable_rpc) +set(pigweed_dir "${chip_dir}/third_party/pigweed/repo") + +include(${pigweed_dir}/pw_build/pigweed.cmake) +include(${pigweed_dir}/pw_protobuf_compiler/proto.cmake) + +set(dir_pw_third_party_nanopb "${chip_dir}/third_party/nanopb/repo" CACHE STRING "" FORCE) + +pw_set_module_config(pw_rpc_CONFIG pw_rpc.disable_global_mutex_config) +pw_set_backend(pw_log pw_log_basic) +pw_set_backend(pw_assert.check pw_assert_log.check_backend) +pw_set_backend(pw_assert.assert pw_assert.assert_compatibility_backend) +pw_set_backend(pw_sys_io pw_sys_io.ameba) +pw_set_backend(pw_trace pw_trace_tokenized) + +add_subdirectory(${chip_dir}/third_party/pigweed/repo ${chip_dir}/examples/light-switch-app/ameba/out/pigweed) +add_subdirectory(${chip_dir}/third_party/nanopb/repo ${chip_dir}/examples/light-switch-app/ameba/out/nanopb) +add_subdirectory(${chip_dir}/examples/platform/ameba/pw_sys_io ${chip_dir}/examples/light-switch-app/ameba/out/pw_sys_io) + +pw_proto_library(attributes_service + SOURCES + ${chip_dir}/examples/common/pigweed/protos/attributes_service.proto + INPUTS + ${chip_dir}/examples/common/pigweed/protos/attributes_service.options + PREFIX + attributes_service + STRIP_PREFIX + ${chip_dir}/examples/common/pigweed/protos + DEPS + pw_protobuf.common_proto +) + +pw_proto_library(button_service + SOURCES + ${chip_dir}/examples/common/pigweed/protos/button_service.proto + PREFIX + button_service + STRIP_PREFIX + ${chip_dir}/examples/common/pigweed/protos + DEPS + pw_protobuf.common_proto +) + +pw_proto_library(descriptor_service + SOURCES + ${chip_dir}/examples/common/pigweed/protos/descriptor_service.proto + PREFIX + descriptor_service + STRIP_PREFIX + ${chip_dir}/examples/common/pigweed/protos + DEPS + pw_protobuf.common_proto +) + +pw_proto_library(device_service + SOURCES + ${chip_dir}/examples/common/pigweed/protos/device_service.proto + INPUTS + ${chip_dir}/examples/common/pigweed/protos/device_service.options + PREFIX + device_service + STRIP_PREFIX + ${chip_dir}/examples/common/pigweed/protos + DEPS + pw_protobuf.common_proto +) + +pw_proto_library(lighting_service + SOURCES + ${chip_dir}/examples/common/pigweed/protos/lighting_service.proto + PREFIX + lighting_service + STRIP_PREFIX + ${chip_dir}/examples/common/pigweed/protos + DEPS + pw_protobuf.common_proto +) + +pw_proto_library(locking_service + SOURCES + ${chip_dir}/examples/common/pigweed/protos/locking_service.proto + PREFIX + locking_service + STRIP_PREFIX + ${chip_dir}/examples/common/pigweed/protos + DEPS + pw_protobuf.common_proto +) + +pw_proto_library(wifi_service + SOURCES + ${chip_dir}/examples/common/pigweed/protos/wifi_service.proto + INPUTS + ${chip_dir}/examples/common/pigweed/protos/wifi_service.options + PREFIX + wifi_service + DEPS + pw_protobuf.common_proto + STRIP_PREFIX + ${chip_dir}/examples/common/pigweed/protos +) + +endif(matter_enable_rpc) + +include(${prj_root}/GCC-RELEASE/project_hp/asdk/includepath.cmake) + +if (matter_enable_rpc) +list( + APPEND ${list_chip_main_sources} + #rpc + ${chip_dir}/examples/platform/ameba/PigweedLogger.cpp + ${chip_dir}/examples/platform/ameba/Rpc.cpp + ${chip_dir}/examples/common/pigweed/RpcService.cpp + ${chip_dir}/examples/common/pigweed/ameba/PigweedLoggerMutex.cpp +) +endif (matter_enable_rpc) + +if (matter_enable_shell) +list( + APPEND ${list_chip_main_sources} + #shell + ${chip_dir}/examples/platform/ameba/shell/launch_shell.cpp +) +endif (matter_enable_shell) + +if (matter_enable_ota_requestor) +list( + APPEND ${list_chip_main_sources} + #OTARequestor + ${chip_dir}/src/app/clusters/ota-requestor/BDXDownloader.cpp + ${chip_dir}/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp + ${chip_dir}/src/app/clusters/ota-requestor/DefaultOTARequestorDriver.cpp + ${chip_dir}/src/app/clusters/ota-requestor/DefaultOTARequestorStorage.cpp + ${chip_dir}/src/app/clusters/ota-requestor/ota-requestor-server.cpp + ${chip_dir}/examples/platform/ameba/ota/OTAInitializer.cpp +) +endif (matter_enable_ota_requestor) + +list( + APPEND ${list_chip_main_sources} + + ${chip_dir}/zzz_generated/light-switch-app/zap-generated/callback-stub.cpp + ${chip_dir}/zzz_generated/light-switch-app/zap-generated/IMClusterCommandHandler.cpp + + ${chip_dir}/examples/light-switch-app/ameba/main/chipinterface.cpp + ${chip_dir}/examples/light-switch-app/ameba/main/BindingHandler.cpp + ${chip_dir}/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp + ${chip_dir}/examples/light-switch-app/ameba/main/CHIPDeviceManager.cpp + ${chip_dir}/examples/light-switch-app/ameba/main/Globals.cpp + ${chip_dir}/examples/light-switch-app/ameba/main/LEDWidget.cpp + ${chip_dir}/examples/light-switch-app/ameba/main/DsoHack.cpp + + ${chip_dir}/examples/providers/DeviceInfoProviderImpl.cpp +) + +add_library( + ${chip_main} + STATIC + ${chip_main_sources} +) + +chip_configure_data_model(chip_main + INCLUDE_SERVER + ZAP_FILE ${matter_example_path}/../light-switch-common/light-switch-app.zap +) + +if (matter_enable_rpc) +target_include_directories( + ${chip_main} + PUBLIC + #rpc + ${chip_dir}/examples/platform/ameba + ${chip_dir}/examples/platform/ameba/pw_sys_io/public + ${chip_dir}/examples/common + ${chip_dir}/examples/common/pigweed + ${chip_dir}/examples/common/pigweed/ameba + ${chip_dir}/src + ${chip_dir}/src/lib/support + ${pigweed_dir}/pw_rpc/nanopb/public +) +endif (matter_enable_rpc) + +target_include_directories( + ${chip_main} + PUBLIC + ${inc_path} + ${chip_dir}/zzz_generated/light-switch-app + ${chip_dir}/zzz_generated/light-switch-app/zap-generated + ${chip_dir}/zzz_generated/app-common + ${chip_dir}/examples/light-switch-app/ameba/main/include + ${chip_dir}/examples/platform/ameba + ${chip_dir}/examples/providers + ${chip_dir_output}/gen/include + ${chip_dir}/src/include/ + ${chip_dir}/src/lib/ + ${chip_dir}/src/ + ${chip_dir}/third_party/nlassert/repo/include/ + ${chip_dir}/src/app/ + ${chip_dir}/src/app/util/ + ${chip_dir}/src/app/server/ + ${chip_dir}/src/controller/data_model + ${chip_dir}/third_party/nlio/repo/include/ + ${chip_dir}/third_party/nlunit-test/repo/src +) + +if (matter_enable_rpc) +target_link_libraries(${chip_main} PUBLIC + attributes_service.nanopb_rpc + button_service.nanopb_rpc + descriptor_service.nanopb_rpc + device_service.nanopb_rpc + lighting_service.nanopb_rpc + locking_service.nanopb_rpc + wifi_service.nanopb_rpc + pw_checksum + pw_hdlc + pw_log + pw_rpc.server + pw_trace_tokenized + pw_trace_tokenized.trace_buffer + pw_trace_tokenized.rpc_service + pw_trace_tokenized.protos.nanopb_rpc + PwRpc +) + +link_directories( + ${chip_dir_output}/lib +) +endif (matter_enable_rpc) + +list( + APPEND chip_main_flags + + -DINET_CONFIG_ENABLE_IPV4=0 + -DCHIP_PROJECT=1 + -DCHIP_DEVICE_LAYER_TARGET=Ameba + -DUSE_ZAP_CONFIG + -DCHIP_HAVE_CONFIG_H + -DMBEDTLS_CONFIG_FILE= +) + +if (matter_enable_persistentstorage_audit) +list( + APPEND chip_main_flags + + -DCHIP_SUPPORT_ENABLE_STORAGE_API_AUDIT +) +endif (matter_enable_persistentstorage_audit) + +if (matter_enable_rpc) +list( + APPEND chip_main_flags + + -DPW_RPC_ATTRIBUTE_SERVICE=1 + -DPW_RPC_BUTTON_SERVICE=1 + -DPW_RPC_DESCRIPTOR_SERVICE=1 + -DPW_RPC_DEVICE_SERVICE=1 + -DPW_RPC_LIGHTING_SERVICE=1 + -DPW_RPC_LOCKING_SERVICE=1 + -DCONFIG_ENABLE_PW_RPC=1 +) +endif (matter_enable_rpc) + +if (matter_enable_shell) +list( + APPEND chip_main_flags + + -DCONFIG_ENABLE_CHIP_SHELL=1 +) +endif (matter_enable_shell) + +list( + APPEND chip_main_cpp_flags + + -Wno-unused-parameter + -std=gnu++11 + -std=c++14 + -fno-rtti +) +target_compile_definitions(${chip_main} PRIVATE ${chip_main_flags} ) +target_compile_options(${chip_main} PRIVATE ${chip_main_cpp_flags}) + +# move static library post build command +add_custom_command( + TARGET ${chip_main} + POST_BUILD + COMMAND cp lib${chip_main}.a ${CMAKE_CURRENT_SOURCE_DIR}/lib/application +) diff --git a/examples/light-switch-app/ameba/main/BindingHandler.cpp b/examples/light-switch-app/ameba/main/BindingHandler.cpp new file mode 100644 index 00000000000000..93638a811bdf77 --- /dev/null +++ b/examples/light-switch-app/ameba/main/BindingHandler.cpp @@ -0,0 +1,425 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "BindingHandler.h" +#include "app/CommandSender.h" +#include "app/clusters/bindings/BindingManager.h" +#include "app/server/Server.h" +#include "controller/InvokeInteraction.h" +#include "platform/CHIPDeviceLayer.h" +#include +#include + +#if CONFIG_ENABLE_CHIP_SHELL +#include "lib/shell/Engine.h" +#include "lib/shell/commands/Help.h" +#endif // ENABLE_CHIP_SHELL + +using namespace chip; +using namespace chip::app; + +#if CONFIG_ENABLE_CHIP_SHELL +using Shell::Engine; +using Shell::shell_command_t; +using Shell::streamer_get; +using Shell::streamer_printf; + +Engine sShellSwitchSubCommands; +Engine sShellSwitchOnOffSubCommands; + +Engine sShellSwitchGroupsSubCommands; +Engine sShellSwitchGroupsOnOffSubCommands; + +Engine sShellSwitchBindingSubCommands; +#endif // defined(ENABLE_CHIP_SHELL) + +namespace { + +void ProcessOnOffUnicastBindingCommand(CommandId commandId, const EmberBindingTableEntry & binding, DeviceProxy * peer_device) +{ + auto onSuccess = [](const ConcreteCommandPath & commandPath, const StatusIB & status, const auto & dataResponse) { + ChipLogProgress(NotSpecified, "OnOff command succeeds"); + }; + + auto onFailure = [](CHIP_ERROR error) { + ChipLogError(NotSpecified, "OnOff command failed: %" CHIP_ERROR_FORMAT, error.Format()); + }; + + switch (commandId) + { + case Clusters::OnOff::Commands::Toggle::Id: + Clusters::OnOff::Commands::Toggle::Type toggleCommand; + Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, + toggleCommand, onSuccess, onFailure); + break; + + case Clusters::OnOff::Commands::On::Id: + Clusters::OnOff::Commands::On::Type onCommand; + Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, + onCommand, onSuccess, onFailure); + break; + + case Clusters::OnOff::Commands::Off::Id: + Clusters::OnOff::Commands::Off::Type offCommand; + Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, + offCommand, onSuccess, onFailure); + break; + } +} + +void ProcessOnOffGroupBindingCommand(CommandId commandId, const EmberBindingTableEntry & binding) +{ + Messaging::ExchangeManager & exchangeMgr = Server::GetInstance().GetExchangeManager(); + + switch (commandId) + { + case Clusters::OnOff::Commands::Toggle::Id: + Clusters::OnOff::Commands::Toggle::Type toggleCommand; + Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, toggleCommand); + break; + + case Clusters::OnOff::Commands::On::Id: + Clusters::OnOff::Commands::On::Type onCommand; + Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, onCommand); + + break; + + case Clusters::OnOff::Commands::Off::Id: + Clusters::OnOff::Commands::Off::Type offCommand; + Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, offCommand); + break; + } +} + +void LightSwitchChangedHandler(const EmberBindingTableEntry & binding, DeviceProxy * peer_device, void * context) +{ + VerifyOrReturn(context != nullptr, ChipLogError(NotSpecified, "OnDeviceConnectedFn: context is null")); + BindingCommandData * data = static_cast(context); + + if (binding.type == EMBER_MULTICAST_BINDING && data->isGroup) + { + switch (data->clusterId) + { + case Clusters::OnOff::Id: + ProcessOnOffGroupBindingCommand(data->commandId, binding); + break; + } + } + else if (binding.type == EMBER_UNICAST_BINDING && !data->isGroup) + { + switch (data->clusterId) + { + case Clusters::OnOff::Id: + ProcessOnOffUnicastBindingCommand(data->commandId, binding, peer_device); + break; + } + } +} + +void InitBindingHandlerInternal(intptr_t arg) +{ + auto & server = chip::Server::GetInstance(); + chip::BindingManager::GetInstance().Init( + { &server.GetFabricTable(), server.GetCASESessionManager(), &server.GetPersistentStorage() }); + chip::BindingManager::GetInstance().RegisterBoundDeviceChangedHandler(LightSwitchChangedHandler); +} + +#ifdef CONFIG_ENABLE_CHIP_SHELL + +/******************************************************** + * Switch shell functions + *********************************************************/ + +CHIP_ERROR SwitchHelpHandler(int argc, char ** argv) +{ + sShellSwitchSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); + return CHIP_NO_ERROR; +} + +CHIP_ERROR SwitchCommandHandler(int argc, char ** argv) +{ + if (argc == 0) + { + return SwitchHelpHandler(argc, argv); + } + + return sShellSwitchSubCommands.ExecCommand(argc, argv); +} + +/******************************************************** + * OnOff switch shell functions + *********************************************************/ + +CHIP_ERROR OnOffHelpHandler(int argc, char ** argv) +{ + sShellSwitchOnOffSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); + return CHIP_NO_ERROR; +} + +CHIP_ERROR OnOffSwitchCommandHandler(int argc, char ** argv) +{ + if (argc == 0) + { + return OnOffHelpHandler(argc, argv); + } + + return sShellSwitchOnOffSubCommands.ExecCommand(argc, argv); +} + +CHIP_ERROR OnSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::On::Id; + data->clusterId = Clusters::OnOff::Id; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR OffSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::Off::Id; + data->clusterId = Clusters::OnOff::Id; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR ToggleSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::Toggle::Id; + data->clusterId = Clusters::OnOff::Id; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +/******************************************************** + * bind switch shell functions + *********************************************************/ + +CHIP_ERROR BindingHelpHandler(int argc, char ** argv) +{ + sShellSwitchBindingSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); + return CHIP_NO_ERROR; +} + +CHIP_ERROR BindingSwitchCommandHandler(int argc, char ** argv) +{ + if (argc == 0) + { + return BindingHelpHandler(argc, argv); + } + + return sShellSwitchBindingSubCommands.ExecCommand(argc, argv); +} + +CHIP_ERROR BindingGroupBindCommandHandler(int argc, char ** argv) +{ + VerifyOrReturnError(argc == 2, CHIP_ERROR_INVALID_ARGUMENT); + + EmberBindingTableEntry * entry = Platform::New(); + entry->type = EMBER_MULTICAST_BINDING; + entry->fabricIndex = atoi(argv[0]); + entry->groupId = atoi(argv[1]); + entry->local = 1; // Hardcoded to endpoint 1 for now + entry->clusterId.SetValue(6); // Hardcoded to OnOff cluster for now + + DeviceLayer::PlatformMgr().ScheduleWork(BindingWorkerFunction, reinterpret_cast(entry)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR BindingUnicastBindCommandHandler(int argc, char ** argv) +{ + VerifyOrReturnError(argc == 3, CHIP_ERROR_INVALID_ARGUMENT); + + EmberBindingTableEntry * entry = Platform::New(); + entry->type = EMBER_UNICAST_BINDING; + entry->fabricIndex = atoi(argv[0]); + entry->nodeId = atoi(argv[1]); + entry->local = 1; // Hardcoded to endpoint 1 for now + entry->remote = atoi(argv[2]); + entry->clusterId.SetValue(6); // Hardcode to OnOff cluster for now + + DeviceLayer::PlatformMgr().ScheduleWork(BindingWorkerFunction, reinterpret_cast(entry)); + return CHIP_NO_ERROR; +} + +/******************************************************** + * Groups switch shell functions + *********************************************************/ + +CHIP_ERROR GroupsHelpHandler(int argc, char ** argv) +{ + sShellSwitchGroupsSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); + return CHIP_NO_ERROR; +} + +CHIP_ERROR GroupsSwitchCommandHandler(int argc, char ** argv) +{ + if (argc == 0) + { + return GroupsHelpHandler(argc, argv); + } + + return sShellSwitchGroupsSubCommands.ExecCommand(argc, argv); +} + +/******************************************************** + * Groups OnOff switch shell functions + *********************************************************/ + +CHIP_ERROR GroupsOnOffHelpHandler(int argc, char ** argv) +{ + sShellSwitchGroupsOnOffSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); + return CHIP_NO_ERROR; +} + +CHIP_ERROR GroupsOnOffSwitchCommandHandler(int argc, char ** argv) +{ + if (argc == 0) + { + return GroupsOnOffHelpHandler(argc, argv); + } + + return sShellSwitchGroupsOnOffSubCommands.ExecCommand(argc, argv); +} + +CHIP_ERROR GroupOnSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::On::Id; + data->clusterId = Clusters::OnOff::Id; + data->isGroup = true; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR GroupOffSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::Off::Id; + data->clusterId = Clusters::OnOff::Id; + data->isGroup = true; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR GroupToggleSwitchCommandHandler(int argc, char ** argv) +{ + BindingCommandData * data = Platform::New(); + data->commandId = Clusters::OnOff::Commands::Toggle::Id; + data->clusterId = Clusters::OnOff::Id; + data->isGroup = true; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); + return CHIP_NO_ERROR; +} + +/** + * @brief configures switch matter shell + * + */ +static void RegisterSwitchCommands() +{ + + static const shell_command_t sSwitchSubCommands[] = { + { &SwitchHelpHandler, "help", "Usage: switch " }, + { &OnOffSwitchCommandHandler, "onoff", " Usage: switch onoff " }, + { &GroupsSwitchCommandHandler, "groups", "Usage: switch groups " }, + { &BindingSwitchCommandHandler, "binding", "Usage: switch binding " } + }; + + static const shell_command_t sSwitchOnOffSubCommands[] = { + { &OnOffHelpHandler, "help", "Usage : switch ononff " }, + { &OnSwitchCommandHandler, "on", "Sends on command to bound lighting app" }, + { &OffSwitchCommandHandler, "off", "Sends off command to bound lighting app" }, + { &ToggleSwitchCommandHandler, "toggle", "Sends toggle command to bound lighting app" } + }; + + static const shell_command_t sSwitchGroupsSubCommands[] = { { &GroupsHelpHandler, "help", "Usage: switch groups " }, + { &GroupsOnOffSwitchCommandHandler, "onoff", + "Usage: switch groups onoff " } }; + + static const shell_command_t sSwitchGroupsOnOffSubCommands[] = { + { &GroupsOnOffHelpHandler, "help", "Usage: switch groups onoff " }, + { &GroupOnSwitchCommandHandler, "on", "Sends on command to bound group" }, + { &GroupOffSwitchCommandHandler, "off", "Sends off command to bound group" }, + { &GroupToggleSwitchCommandHandler, "toggle", "Sends toggle command to group" } + }; + + static const shell_command_t sSwitchBindingSubCommands[] = { + { &BindingHelpHandler, "help", "Usage: switch binding " }, + { &BindingGroupBindCommandHandler, "group", "Usage: switch binding group " }, + { &BindingUnicastBindCommandHandler, "unicast", "Usage: switch binding unicast " } + }; + + static const shell_command_t sSwitchCommand = { &SwitchCommandHandler, "switch", + "Light-switch commands. Usage: switch " }; + + sShellSwitchGroupsOnOffSubCommands.RegisterCommands(sSwitchGroupsOnOffSubCommands, ArraySize(sSwitchGroupsOnOffSubCommands)); + sShellSwitchOnOffSubCommands.RegisterCommands(sSwitchOnOffSubCommands, ArraySize(sSwitchOnOffSubCommands)); + sShellSwitchGroupsSubCommands.RegisterCommands(sSwitchGroupsSubCommands, ArraySize(sSwitchGroupsSubCommands)); + sShellSwitchBindingSubCommands.RegisterCommands(sSwitchBindingSubCommands, ArraySize(sSwitchBindingSubCommands)); + sShellSwitchSubCommands.RegisterCommands(sSwitchSubCommands, ArraySize(sSwitchSubCommands)); + + Engine::Root().RegisterCommands(&sSwitchCommand, 1); +} +#endif // ENABLE_CHIP_SHELL + +} // namespace + +/******************************************************** + * Switch functions + *********************************************************/ + +void SwitchWorkerFunction(intptr_t context) +{ + VerifyOrReturn(context != 0, ChipLogError(NotSpecified, "SwitchWorkerFunction - Invalid work data")); + + BindingCommandData * data = reinterpret_cast(context); + BindingManager::GetInstance().NotifyBoundClusterChanged(data->localEndpointId, data->clusterId, static_cast(data)); + + Platform::Delete(data); +} + +void BindingWorkerFunction(intptr_t context) +{ + VerifyOrReturn(context != 0, ChipLogError(NotSpecified, "BindingWorkerFunction - Invalid work data")); + + EmberBindingTableEntry * entry = reinterpret_cast(context); + AddBindingEntry(*entry); + + Platform::Delete(entry); +} + +CHIP_ERROR InitBindingHandler() +{ + // The initialization of binding manager will try establishing connection with unicast peers + // so it requires the Server instance to be correctly initialized. Post the init function to + // the event queue so that everything is ready when initialization is conducted. + chip::DeviceLayer::PlatformMgr().ScheduleWork(InitBindingHandlerInternal); +#if CONFIG_ENABLE_CHIP_SHELL + RegisterSwitchCommands(); +#endif + return CHIP_NO_ERROR; +} diff --git a/examples/light-switch-app/ameba/main/CHIPDeviceManager.cpp b/examples/light-switch-app/ameba/main/CHIPDeviceManager.cpp new file mode 100644 index 00000000000000..4c1b55fbddb9fc --- /dev/null +++ b/examples/light-switch-app/ameba/main/CHIPDeviceManager.cpp @@ -0,0 +1,91 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * This file implements the CHIP Device Interface that is used by + * applications to interact with the CHIP stack + * + */ + +#include + +#include "CHIPDeviceManager.h" +#include +#include +#include +#include +#include + +using namespace ::chip; + +namespace chip { + +namespace DeviceManager { + +using namespace ::chip::DeviceLayer; + +void CHIPDeviceManager::CommonDeviceEventHandler(const ChipDeviceEvent * event, intptr_t arg) +{ + CHIPDeviceManagerCallbacks * cb = reinterpret_cast(arg); + if (cb != nullptr) + { + cb->DeviceEventCallback(event, reinterpret_cast(cb)); + } +} + +CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb) +{ + CHIP_ERROR err; + mCB = cb; + + err = Platform::MemoryInit(); + SuccessOrExit(err); + + // Initialize the CHIP stack. + err = PlatformMgr().InitChipStack(); + SuccessOrExit(err); + + if (CONFIG_NETWORK_LAYER_BLE) + { + ConnectivityMgr().SetBLEAdvertisingEnabled(true); + } + + // Register a function to receive events from the CHIP device layer. Note that calls to + // this function will happen on the CHIP event loop thread, not the app_main thread. + PlatformMgr().AddEventHandler(CHIPDeviceManager::CommonDeviceEventHandler, reinterpret_cast(cb)); + + // Start a task to run the CHIP Device event loop. + err = PlatformMgr().StartEventLoopTask(); + SuccessOrExit(err); + +exit: + return err; +} +} // namespace DeviceManager +} // namespace chip + +void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & path, uint8_t type, uint16_t size, uint8_t * value) +{ + chip::DeviceManager::CHIPDeviceManagerCallbacks * cb = + chip::DeviceManager::CHIPDeviceManager::GetInstance().GetCHIPDeviceManagerCallbacks(); + if (cb != nullptr) + { + cb->PostAttributeChangeCallback(path.mEndpointId, path.mClusterId, path.mAttributeId, type, size, value); + } +} diff --git a/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp b/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp new file mode 100644 index 00000000000000..f1776a46a71426 --- /dev/null +++ b/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp @@ -0,0 +1,174 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file DeviceCallbacks.cpp + * + * Implements all the callbacks to the application from the CHIP Stack + * + **/ +#include "DeviceCallbacks.h" + +#include "CHIPDeviceManager.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR +#include +#endif + +#include "Globals.h" +#include "LEDWidget.h" + +static const char * TAG = "app-devicecallbacks"; + +using namespace ::chip; +using namespace ::chip::Inet; +using namespace ::chip::System; +using namespace ::chip::DeviceLayer; +using namespace ::chip::DeviceManager; +using namespace ::chip::Logging; +using namespace ::chip::app::Clusters; + +uint32_t identifyTimerCount; +constexpr uint32_t kIdentifyTimerDelayMS = 250; +constexpr uint32_t kInitOTARequestorDelaySec = 3; + +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR +void InitOTARequestorHandler(System::Layer * systemLayer, void * appState) +{ + OTAInitializer::Instance().InitOTARequestor(); +} +#endif + +void DeviceCallbacks::DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg) +{ + switch (event->Type) + { + case DeviceEventType::kInternetConnectivityChange: + OnInternetConnectivityChange(event); + break; + + case DeviceEventType::kInterfaceIpAddressChanged: + if ((event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV4_Assigned) || + (event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV6_Assigned)) + { + // MDNS server restart on any ip assignment: if link local ipv6 is configured, that + // will not trigger a 'internet connectivity change' as there is no internet + // connectivity. MDNS still wants to refresh its listening interfaces to include the + // newly selected address. + chip::app::DnssdServer::Instance().StartServer(); + } + break; + } +} + +void DeviceCallbacks::PostAttributeChangeCallback(EndpointId endpointId, ClusterId clusterId, AttributeId attributeId, uint8_t type, + uint16_t size, uint8_t * value) +{ + switch (clusterId) + { + case OnOffSwitchConfiguration::Id: + OnOffSwitchConfigurationAttributeChangeCallback(endpointId, attributeId, type, value, size); + break; + + case Identify::Id: + OnIdentifyPostAttributeChangeCallback(endpointId, attributeId, value); + break; + + default: + break; + } +} + +void DeviceCallbacks::OnInternetConnectivityChange(const ChipDeviceEvent * event) +{ +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR + static bool isOTAInitialized = false; +#endif + if (event->InternetConnectivityChange.IPv4 == kConnectivity_Established) + { + ChipLogProgress(DeviceLayer, "IPv4 Server ready..."); + chip::app::DnssdServer::Instance().StartServer(); + } + else if (event->InternetConnectivityChange.IPv4 == kConnectivity_Lost) + { + ChipLogProgress(DeviceLayer, "Lost IPv4 connectivity..."); + } + if (event->InternetConnectivityChange.IPv6 == kConnectivity_Established) + { + ChipLogProgress(DeviceLayer, "IPv6 Server ready..."); + chip::app::DnssdServer::Instance().StartServer(); +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR + // Init OTA requestor only when we have gotten IPv6 address + if (!isOTAInitialized) + { + chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds32(kInitOTARequestorDelaySec), + InitOTARequestorHandler, nullptr); + isOTAInitialized = true; + } +#endif + } + else if (event->InternetConnectivityChange.IPv6 == kConnectivity_Lost) + { + ChipLogProgress(DeviceLayer, "Lost IPv6 connectivity..."); + } +} + +void DeviceCallbacks::OnOffSwitchConfigurationAttributeChangeCallback(EndpointId endpointId, AttributeId attributeId, uint8_t type, + uint8_t * value, uint16_t size) +{ + ChipLogProgress(Zcl, "OnOff Switch Configuration attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", + ChipLogValueMEI(attributeId), type, *value, size); +} + +void IdentifyTimerHandler(Layer * systemLayer, void * appState, CHIP_ERROR error) +{ + if (identifyTimerCount) + { + identifyTimerCount--; + } +} + +void DeviceCallbacks::OnIdentifyPostAttributeChangeCallback(EndpointId endpointId, AttributeId attributeId, uint8_t * value) +{ + VerifyOrExit(attributeId == ZCL_IDENTIFY_TIME_ATTRIBUTE_ID, + ChipLogError(DeviceLayer, "[%s] Unhandled Attribute ID: '0x%04x", TAG, attributeId)); + VerifyOrExit(endpointId == 1, ChipLogError(DeviceLayer, "[%s] Unexpected EndPoint ID: `0x%02x'", TAG, endpointId)); + + // timerCount represents the number of callback executions before we stop the timer. + // value is expressed in seconds and the timer is fired every 250ms, so just multiply value by 4. + // Also, we want timerCount to be odd number, so the ligth state ends in the same state it starts. + identifyTimerCount = (*value) * 4; +exit: + return; +} + +bool emberAfBasicClusterMfgSpecificPingCallback(chip::app::CommandHandler * commandObj) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} diff --git a/examples/light-switch-app/ameba/main/DsoHack.cpp b/examples/light-switch-app/ameba/main/DsoHack.cpp new file mode 100644 index 00000000000000..6fc5d7a63307c5 --- /dev/null +++ b/examples/light-switch-app/ameba/main/DsoHack.cpp @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This hack is needed because Ameba SDK is not linking against libstdc++ correctly. +extern "C" { +void * __dso_handle = 0; +} diff --git a/examples/light-switch-app/ameba/main/Globals.cpp b/examples/light-switch-app/ameba/main/Globals.cpp new file mode 100755 index 00000000000000..71d9b6c9f0b940 --- /dev/null +++ b/examples/light-switch-app/ameba/main/Globals.cpp @@ -0,0 +1,21 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "Globals.h" + +LEDWidget statusLED1; diff --git a/examples/light-switch-app/ameba/main/LEDWidget.cpp b/examples/light-switch-app/ameba/main/LEDWidget.cpp new file mode 100755 index 00000000000000..a050f4a4d4f0f0 --- /dev/null +++ b/examples/light-switch-app/ameba/main/LEDWidget.cpp @@ -0,0 +1,60 @@ +/* + * + * Copyright (c) 2018 Nest Labs, Inc. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file LEDWidget.cpp + * + * Implements an LED Widget controller that is usually tied to a GPIO + * It also updates the display widget if it's enabled + */ + +#include "LEDWidget.h" + +gpio_t gpio_led; + +void LEDWidget::Init(PinName gpioNum) +{ + + mGPIONum = gpioNum; + mState = false; + + if (gpioNum != (PinName) NC) + { + // Init LED control pin + gpio_init(&gpio_led, gpioNum); + gpio_dir(&gpio_led, PIN_OUTPUT); // Direction: Output + gpio_mode(&gpio_led, PullNone); // No pull + gpio_write(&gpio_led, mState); + } +} + +void LEDWidget::Set(bool state) +{ + DoSet(state); +} + +void LEDWidget::DoSet(bool state) +{ + bool stateChange = (mState != state); + mState = state; + + if (stateChange) + { + gpio_write(&gpio_led, state); + } +} diff --git a/examples/light-switch-app/ameba/main/chipinterface.cpp b/examples/light-switch-app/ameba/main/chipinterface.cpp new file mode 100644 index 00000000000000..b0a8b6dd1d6ce3 --- /dev/null +++ b/examples/light-switch-app/ameba/main/chipinterface.cpp @@ -0,0 +1,157 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include "BindingHandler.h" +#include "CHIPDeviceManager.h" +#include "DeviceCallbacks.h" +#include "Globals.h" +#include "LEDWidget.h" +#include "chip_porting.h" +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if CONFIG_ENABLE_PW_RPC +#include +#endif + +#if CONFIG_ENABLE_CHIP_SHELL +#include +#endif + +using namespace ::chip; +using namespace ::chip::Credentials; +using namespace ::chip::DeviceManager; +using namespace ::chip::DeviceLayer; +using namespace ::chip::System; + +namespace { // Network Commissioning +constexpr EndpointId kNetworkCommissioningEndpointMain = 0; +constexpr EndpointId kNetworkCommissioningEndpointSecondary = 0xFFFE; + +app::Clusters::NetworkCommissioning::Instance + sWiFiNetworkCommissioningInstance(kNetworkCommissioningEndpointMain /* Endpoint Id */, + &(NetworkCommissioning::AmebaWiFiDriver::GetInstance())); +} // namespace + +void NetWorkCommissioningInstInit() +{ + sWiFiNetworkCommissioningInstance.Init(); + + // We only have network commissioning on endpoint 0. + emberAfEndpointEnableDisable(kNetworkCommissioningEndpointSecondary, false); +} + +Identify gIdentify0 = { + chip::EndpointId{ 0 }, + [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, + [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, + EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, +}; + +Identify gIdentify1 = { + chip::EndpointId{ 1 }, + [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, + [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, + EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, +}; + +#ifdef CONFIG_PLATFORM_8721D +#define STATUS_LED_GPIO_NUM PB_5 +#elif defined(CONFIG_PLATFORM_8710C) +#define STATUS_LED_GPIO_NUM PA_20 +#else +#define STATUS_LED_GPIO_NUM NC +#endif + +static DeviceCallbacks EchoCallbacks; +chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; + +static void InitServer(intptr_t context) +{ + // Init ZCL Data Model and CHIP App Server + static chip::CommonCaseDeviceServerInitParams initParams; + initParams.InitializeStaticResourcesBeforeServerInit(); + chip::Server::GetInstance().Init(initParams); + gExampleDeviceInfoProvider.SetStorageDelegate(&Server::GetInstance().GetPersistentStorage()); + chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); + + // Initialize device attestation config + SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); + NetWorkCommissioningInstInit(); + + if (RTW_SUCCESS != wifi_is_connected_to_ap()) + { + // QR code will be used with CHIP Tool + PrintOnboardingCodes(chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE)); + } + + InitBindingHandler(); +} + +extern "C" void ChipTest(void) +{ + ChipLogProgress(DeviceLayer, "Light Switch Demo!"); + CHIP_ERROR err = CHIP_NO_ERROR; + +#if CONFIG_ENABLE_PW_RPC + chip::rpc::Init(); +#endif + + initPref(); + + CHIPDeviceManager & deviceMgr = CHIPDeviceManager::GetInstance(); + + err = deviceMgr.Init(&EchoCallbacks); + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "DeviceManagerInit() - ERROR!\r\n"); + } + else + { + ChipLogProgress(DeviceLayer, "DeviceManagerInit() - OK\r\n"); + } + + chip::DeviceLayer::PlatformMgr().ScheduleWork(InitServer, 0); + + statusLED1.Init(STATUS_LED_GPIO_NUM); + +#if CONFIG_ENABLE_CHIP_SHELL + chip::LaunchShell(); +#endif +} + +bool lowPowerClusterSleep() +{ + return true; +} diff --git a/examples/light-switch-app/ameba/main/include/BindingHandler.h b/examples/light-switch-app/ameba/main/include/BindingHandler.h new file mode 100644 index 00000000000000..280c94874f04dd --- /dev/null +++ b/examples/light-switch-app/ameba/main/include/BindingHandler.h @@ -0,0 +1,35 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "app-common/zap-generated/ids/Clusters.h" +#include "app-common/zap-generated/ids/Commands.h" +#include "lib/core/CHIPError.h" + +CHIP_ERROR InitBindingHandler(); +void SwitchWorkerFunction(intptr_t context); +void BindingWorkerFunction(intptr_t context); + +struct BindingCommandData +{ + chip::EndpointId localEndpointId = 1; + chip::CommandId commandId; + chip::ClusterId clusterId; + bool isGroup = false; +}; diff --git a/examples/light-switch-app/ameba/main/include/CHIPDeviceManager.h b/examples/light-switch-app/ameba/main/include/CHIPDeviceManager.h new file mode 100644 index 00000000000000..4a4efd1d4d39dd --- /dev/null +++ b/examples/light-switch-app/ameba/main/include/CHIPDeviceManager.h @@ -0,0 +1,124 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * This file contains definitions for the CHIP DeviceManager Interface + * + * This object will co-ordinate multiple activities such as + * initialisation, rendezvous, session mgmt and other such + * activities within the CHIP stack. This is a singleton object. + */ + +#pragma once + +#include +#include +#include + +#include + +#include +#include + +#include "af-types.h" + +namespace chip { +namespace DeviceManager { + +/** + * @brief + * This class provides a skeleton for all the callback functions. The functions will be + * called by other objects within the CHIP stack for specific events. + * Applications interested in receiving specific callbacks can specialize this class and handle + * these events in their implementation of this class. + */ +class CHIPDeviceManagerCallbacks +{ +public: + /** + * @brief + * Called when CHIP Device events (PublicEventTypes) are triggered. + * + * @param event ChipDeviceEvent that occurred + * @param arg arguments specific to the event, if any + */ + virtual void DeviceEventCallback(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg) {} + + /** + * @brief + * Called after an attribute has been changed + * + * @param endpoint endpoint id + * @param clusterID cluster id + * @param attributeId attribute id that was changed + * @param manufacturerCode manufacturer code + * @param type attribute type + * @param size size of the attribute + * @param value pointer to the new value + */ + virtual void PostAttributeChangeCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, + uint8_t type, uint16_t size, uint8_t * value) + {} + virtual ~CHIPDeviceManagerCallbacks() {} +}; + +/** + * @brief + * A common class that drives other components of the CHIP stack + */ +class DLL_EXPORT CHIPDeviceManager +{ +public: + CHIPDeviceManager(const CHIPDeviceManager &) = delete; + CHIPDeviceManager(const CHIPDeviceManager &&) = delete; + CHIPDeviceManager & operator=(const CHIPDeviceManager &) = delete; + + static CHIPDeviceManager & GetInstance() + { + static CHIPDeviceManager instance; + return instance; + } + + /** + * @brief + * Initialise CHIPDeviceManager + * + * @param cb Application's instance of the CHIPDeviceManagerCallbacks for consuming events + */ + CHIP_ERROR Init(CHIPDeviceManagerCallbacks * cb); + + /** + * @brief + * Fetch a pointer to the registered CHIPDeviceManagerCallbacks object. + * + */ + CHIPDeviceManagerCallbacks * GetCHIPDeviceManagerCallbacks() { return mCB; } + + /** + * Use internally for registration of the ChipDeviceEvents + */ + static void CommonDeviceEventHandler(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg); + +private: + CHIPDeviceManagerCallbacks * mCB = nullptr; + CHIPDeviceManager() {} +}; + +} // namespace DeviceManager +} // namespace chip diff --git a/examples/light-switch-app/ameba/main/include/DeviceCallbacks.h b/examples/light-switch-app/ameba/main/include/DeviceCallbacks.h new file mode 100644 index 00000000000000..745d1663f29a31 --- /dev/null +++ b/examples/light-switch-app/ameba/main/include/DeviceCallbacks.h @@ -0,0 +1,45 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file DeviceCallbacks.h + * + * Implementations for the DeviceManager callbacks for this application + * + **/ + +#pragma once + +#include "CHIPDeviceManager.h" +#include +#include +#include + +class DeviceCallbacks : public chip::DeviceManager::CHIPDeviceManagerCallbacks +{ +public: + void DeviceEventCallback(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg) override; + void PostAttributeChangeCallback(chip::EndpointId endpointId, chip::ClusterId clusterId, chip::AttributeId attributeId, + uint8_t type, uint16_t size, uint8_t * value) override; + +private: + void OnInternetConnectivityChange(const chip::DeviceLayer::ChipDeviceEvent * event); + void OnOffSwitchConfigurationAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t type, + uint8_t * value, uint16_t size); + void OnIdentifyPostAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); +}; diff --git a/examples/light-switch-app/ameba/main/include/Globals.h b/examples/light-switch-app/ameba/main/include/Globals.h new file mode 100755 index 00000000000000..4033f2d0a996ee --- /dev/null +++ b/examples/light-switch-app/ameba/main/include/Globals.h @@ -0,0 +1,23 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "LEDWidget.h" + +extern LEDWidget statusLED1; diff --git a/examples/light-switch-app/ameba/main/include/LEDWidget.h b/examples/light-switch-app/ameba/main/include/LEDWidget.h new file mode 100755 index 00000000000000..9f1456daa7492d --- /dev/null +++ b/examples/light-switch-app/ameba/main/include/LEDWidget.h @@ -0,0 +1,158 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +#ifdef CONFIG_PLATFORM_8710C +#include "gpio_api.h" +#include "rtl8710c_pin_name.h" + +#else + +typedef enum +{ + PORT_A = 0, + PORT_B = 1, +} GPIO_PORT; + +typedef enum +{ + PIN_INPUT = 0, + PIN_OUTPUT +} PinDirection; + +typedef enum +{ + PullNone = 0, // IN HIGHZ + PullUp = 1, + PullDown = 2, + PullDefault = PullNone +} PinMode; + +/* (((port)<<5)|(pin)) */ +typedef enum +{ + PA_0 = (PORT_A << 5 | 0), + PA_1 = (PORT_A << 5 | 1), + PA_2 = (PORT_A << 5 | 2), + PA_3 = (PORT_A << 5 | 3), + PA_4 = (PORT_A << 5 | 4), + PA_5 = (PORT_A << 5 | 5), + PA_6 = (PORT_A << 5 | 6), + PA_7 = (PORT_A << 5 | 7), + PA_8 = (PORT_A << 5 | 8), + PA_9 = (PORT_A << 5 | 9), + PA_10 = (PORT_A << 5 | 10), + PA_11 = (PORT_A << 5 | 11), + PA_12 = (PORT_A << 5 | 12), + PA_13 = (PORT_A << 5 | 13), + PA_14 = (PORT_A << 5 | 14), + PA_15 = (PORT_A << 5 | 15), + PA_16 = (PORT_A << 5 | 16), + PA_17 = (PORT_A << 5 | 17), + PA_18 = (PORT_A << 5 | 18), + PA_19 = (PORT_A << 5 | 19), + PA_20 = (PORT_A << 5 | 20), + PA_21 = (PORT_A << 5 | 21), + PA_22 = (PORT_A << 5 | 22), + PA_23 = (PORT_A << 5 | 23), + PA_24 = (PORT_A << 5 | 24), + PA_25 = (PORT_A << 5 | 25), + PA_26 = (PORT_A << 5 | 26), + PA_27 = (PORT_A << 5 | 27), + PA_28 = (PORT_A << 5 | 28), + PA_29 = (PORT_A << 5 | 29), + PA_30 = (PORT_A << 5 | 30), + PA_31 = (PORT_A << 5 | 31), + + PB_0 = (PORT_B << 5 | 0), + PB_1 = (PORT_B << 5 | 1), + PB_2 = (PORT_B << 5 | 2), + PB_3 = (PORT_B << 5 | 3), + PB_4 = (PORT_B << 5 | 4), + PB_5 = (PORT_B << 5 | 5), + PB_6 = (PORT_B << 5 | 6), + PB_7 = (PORT_B << 5 | 7), + PB_8 = (PORT_B << 5 | 8), + PB_9 = (PORT_B << 5 | 9), + PB_10 = (PORT_B << 5 | 10), + PB_11 = (PORT_B << 5 | 11), + PB_12 = (PORT_B << 5 | 12), + PB_13 = (PORT_B << 5 | 13), + PB_14 = (PORT_B << 5 | 14), + PB_15 = (PORT_B << 5 | 15), + PB_16 = (PORT_B << 5 | 16), + PB_17 = (PORT_B << 5 | 17), + PB_18 = (PORT_B << 5 | 18), + PB_19 = (PORT_B << 5 | 19), + PB_20 = (PORT_B << 5 | 20), + PB_21 = (PORT_B << 5 | 21), + PB_22 = (PORT_B << 5 | 22), + PB_23 = (PORT_B << 5 | 23), + PB_24 = (PORT_B << 5 | 24), + PB_25 = (PORT_B << 5 | 25), + PB_26 = (PORT_B << 5 | 26), + PB_27 = (PORT_B << 5 | 27), + PB_28 = (PORT_B << 5 | 28), + PB_29 = (PORT_B << 5 | 29), + PB_30 = (PORT_B << 5 | 30), + PB_31 = (PORT_B << 5 | 31), + + VBAT_MEAS = (0x7 << 5 | 2), + AD_0 = PB_4, // CH0 + AD_1 = PB_5, // CH1 + AD_2 = PB_6, // CH2 + AD_3 = PB_7, // CH3 + AD_4 = PB_1, // CH4 + AD_5 = PB_2, // CH5 + AD_6 = PB_3, // CH6 + AD_7 = VBAT_MEAS, // CH7 + + // Not connected + NC = (uint32_t) 0xFFFFFFFF +} PinName; + +typedef struct gpio_s +{ + PinName pin; +} gpio_t; + +#endif + +typedef struct gpio_s gpio_t; + +extern "C" void gpio_init(gpio_t * obj, PinName pin); +extern "C" uint32_t gpio_set(PinName pin); +extern "C" void gpio_mode(gpio_t * obj, PinMode mode); +extern "C" void gpio_dir(gpio_t * obj, PinDirection direction); +extern "C" void gpio_write(gpio_t * obj, int value); +extern "C" int gpio_read(gpio_t * obj); + +class LEDWidget +{ +public: + void Init(PinName gpioNum); + void Set(bool state); + +private: + PinName mGPIONum; + bool mState; + void DoSet(bool state); +}; diff --git a/examples/light-switch-app/ameba/third_party/connectedhomeip b/examples/light-switch-app/ameba/third_party/connectedhomeip new file mode 120000 index 00000000000000..11a54ed360106c --- /dev/null +++ b/examples/light-switch-app/ameba/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../ \ No newline at end of file diff --git a/examples/light-switch-app/esp32/README.md b/examples/light-switch-app/esp32/README.md index 9616c250526933..c0d238585163a2 100644 --- a/examples/light-switch-app/esp32/README.md +++ b/examples/light-switch-app/esp32/README.md @@ -65,6 +65,14 @@ make sure the IDF_PATH has been exported(See the manual setup steps above). $ source ./scripts/activate.sh +- Enable Ccache for faster IDF builds + + It is recommended to have Ccache installed for faster builds + + ``` + $ export IDF_CCACHE_ENABLE=1 + ``` + - Target Set $ idf.py set-target esp32 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 308151883ecf10..1229fc2c1fce3e 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 @@ -374,7 +374,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -382,7 +382,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -409,6 +409,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -931,7 +932,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1318,7 +1319,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/lighting-app/ameba/README.md b/examples/lighting-app/ameba/README.md index 19cc15e7a8234c..77b7fb016b644a 100644 --- a/examples/lighting-app/ameba/README.md +++ b/examples/lighting-app/ameba/README.md @@ -7,11 +7,10 @@ This example demonstrates the Matter Lighting application on Ameba platform. - [CHIP Ameba Lighting Example](#chip-ameba-lighting-example) - [Supported Device](#supported-device) - [Building the Example Application](#building-the-example-application) - - [Commissioning and cluster control](#commissioning-and-cluster-control) - - [Commissioning](#commissioning) - - [BLE mode](#ble-mode) - - [IP mode](#ip-mode) - - [Cluster control](#cluster-control) + - [Commissioning](#commissioning) + - [BLE mode](#ble-mode) + - [IP mode](#ip-mode) + - [Cluster control](#cluster-control) --- @@ -53,41 +52,23 @@ The CHIP demo application is supported on the correct locations 4. Click **Download** button. -## Commissioning and Cluster Control - ## Commissioning There are two commissioning modes supported by Ameba platform: ### BLE mode -1. In "connectedhomeip/config/ameba/args.gni" - - - Set `chip_config_network_layer_ble = true` - -2. In "connectedhomeip/src/platform/Ameba/CHIPDevicePlatformConfig.h" - - - Set `#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1` - -3. Build and Flash -4. The example will run automatically after booting the Ameba board. -5. Test with +1. Build and Flash +2. The example will run automatically after booting the Ameba board. +3. Test with [Chip-Tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool) ### IP mode -1. In "connectedhomeip/config/ameba/args.gni" - - - Set `chip_config_network_layer_ble = false` - -2. In "connectedhomeip/src/platform/Ameba/CHIPDevicePlatformConfig.h" - - - Set `#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 0` - -3. Build and Flash -4. The example will run automatically after booting the Ameba board. -5. Connect to AP using `ATW0, ATW1, ATWC` commands -6. Test with +1. Build and Flash +2. The example will run automatically after booting the Ameba board. +3. Connect to AP using `ATW0, ATW1, ATWC` commands +4. Test with [Chip-Tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool) ## Cluster Control diff --git a/examples/lighting-app/ameba/chip_main.cmake b/examples/lighting-app/ameba/chip_main.cmake index 447f65d5767f62..730751b16aab1b 100755 --- a/examples/lighting-app/ameba/chip_main.cmake +++ b/examples/lighting-app/ameba/chip_main.cmake @@ -242,7 +242,6 @@ list( -DUSE_ZAP_CONFIG -DCHIP_HAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE= - -DMATTER_LIGHTING_APP=1 ) if (matter_enable_persistentstorage_audit) diff --git a/examples/lighting-app/esp32/README.md b/examples/lighting-app/esp32/README.md index eae01ad14d2978..44e6d6c4ec3087 100644 --- a/examples/lighting-app/esp32/README.md +++ b/examples/lighting-app/esp32/README.md @@ -75,6 +75,14 @@ make sure the IDF_PATH has been exported(See the manual setup steps above). $ source ./scripts/activate.sh +- Enable Ccache for faster IDF builds + + It is recommended to have Ccache installed for faster builds + + ``` + $ export IDF_CCACHE_ENABLE=1 + ``` + - Target Set $ idf.py set-target esp32 diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 5f4d31853f35ed..5478b00116e3d5 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -205,44 +205,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -252,7 +263,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -314,7 +325,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -322,7 +333,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -349,6 +360,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -871,7 +883,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1253,7 +1265,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/lighting-app/qpg/include/AppTask.h b/examples/lighting-app/qpg/include/AppTask.h index edc33a5f88a0c3..510478fb9be3e3 100644 --- a/examples/lighting-app/qpg/include/AppTask.h +++ b/examples/lighting-app/qpg/include/AppTask.h @@ -48,12 +48,12 @@ class AppTask friend AppTask & GetAppTask(void); CHIP_ERROR Init(); + static void InitServer(intptr_t arg); + static void OpenCommissioning(intptr_t arg); static void ActionInitiated(LightingManager::Action_t aAction); static void ActionCompleted(LightingManager::Action_t aAction); - void CancelTimer(void); - void DispatchEvent(AppEvent * event); static void FunctionTimerEventHandler(AppEvent * aEvent); @@ -63,6 +63,7 @@ class AppTask static void TimerEventHandler(chip::System::Layer * aLayer, void * aAppState); void StartTimer(uint32_t aTimeoutMs); + void CancelTimer(void); enum Function_t { diff --git a/examples/lighting-app/qpg/src/AppTask.cpp b/examples/lighting-app/qpg/src/AppTask.cpp index 774754312989d6..13e78387cc4a99 100644 --- a/examples/lighting-app/qpg/src/AppTask.cpp +++ b/examples/lighting-app/qpg/src/AppTask.cpp @@ -208,28 +208,8 @@ CHIP_ERROR AppTask::StartAppTask() return CHIP_NO_ERROR; } -CHIP_ERROR AppTask::Init() +void AppTask::InitServer(intptr_t arg) { - CHIP_ERROR err = CHIP_NO_ERROR; - - ChipLogProgress(NotSpecified, "Current Software Version: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); - - err = LightingMgr().Init(); - if (err != CHIP_NO_ERROR) - { - ChipLogError(NotSpecified, "LightingMgr().Init() failed"); - return err; - } - LightingMgr().SetCallbacks(ActionInitiated, ActionCompleted); - - // Subscribe with our button callback to the qvCHIP button handler. - qvIO_SetBtnCallback(ButtonEventHandler); - -#if CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY - chip::app::DnssdServer::Instance().SetExtendedDiscoveryTimeoutSecs(extDiscTimeoutSecs); -#endif - - // Init ZCL Data Model static chip::CommonCaseDeviceServerInitParams initParams; (void) initParams.InitializeStaticResourcesBeforeServerInit(); @@ -243,18 +223,52 @@ CHIP_ERROR AppTask::Init() initParams.endpointNativeParams = static_cast(&nativeParams); chip::Server::GetInstance().Init(initParams); +#if CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY + chip::app::DnssdServer::Instance().SetExtendedDiscoveryTimeoutSecs(extDiscTimeoutSecs); +#endif + + // Open commissioning after boot if no fabric was available + if (chip::Server::GetInstance().GetFabricTable().FabricCount() == 0) + { + PlatformMgr().ScheduleWork(OpenCommissioning, 0); + } +} + +void AppTask::OpenCommissioning(intptr_t arg) +{ + // Enable BLE advertisements + chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow(); + ChipLogProgress(NotSpecified, "BLE advertising started. Waiting for Pairing."); +} + +CHIP_ERROR AppTask::Init() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + ChipLogProgress(NotSpecified, "Current Software Version: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + + // Init ZCL Data Model and start server + PlatformMgr().ScheduleWork(InitServer, 0); + // Initialize device attestation config SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); - UpdateClusterState(); + // Setup light + err = LightingMgr().Init(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "LightingMgr().Init() failed"); + return err; + } + LightingMgr().SetCallbacks(ActionInitiated, ActionCompleted); + // Setup button handler + qvIO_SetBtnCallback(ButtonEventHandler); + + // Log device configuration ConfigurationMgr().LogDeviceConfig(); PrintOnboardingCodes(chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE)); - // Enable BLE advertisements - chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow(); - ChipLogProgress(NotSpecified, "BLE advertising started. Waiting for Pairing."); - return err; } diff --git a/examples/lock-app/esp32/README.md b/examples/lock-app/esp32/README.md index 2d5ecd9cb9795d..dc172d6468ace9 100644 --- a/examples/lock-app/esp32/README.md +++ b/examples/lock-app/esp32/README.md @@ -57,6 +57,14 @@ make sure the IDF_PATH has been exported(See the manual setup steps above). $ source ./scripts/activate.sh +- Enable Ccache for faster IDF builds + + It is recommended to have Ccache installed for faster builds + + ``` + $ export IDF_CCACHE_ENABLE=1 + ``` + - Target Set $ idf.py set-target esp32(or esp32c3) @@ -171,8 +179,8 @@ the ESP32 all-clusters-app to commission it onto a Wi-Fi network: Parameters: -1. Discriminator: 3840 (configurable through menuconfig) -2. Setup-pin-code: 20202021 (configurable through menuconfig) +1. Discriminator: 3840 +2. Setup-pin-code: 20202021 3. Node-id: 12344321 (you can assign any node id) ### Cluster control diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 1473357623a139..1b71ec1e293514 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -207,7 +207,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -215,7 +215,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -242,6 +242,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -848,7 +849,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1195,7 +1196,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/lock-app/qpg/include/AppTask.h b/examples/lock-app/qpg/include/AppTask.h index fd6c1d888a8b7e..005d0aeb9da6e0 100644 --- a/examples/lock-app/qpg/include/AppTask.h +++ b/examples/lock-app/qpg/include/AppTask.h @@ -52,6 +52,7 @@ class AppTask friend AppTask & GetAppTask(void); CHIP_ERROR Init(); + static void InitServer(intptr_t arg); static void ActionInitiated(BoltLockManager::Action_t aAction, int32_t aActor); static void ActionCompleted(BoltLockManager::Action_t aAction); diff --git a/examples/lock-app/qpg/src/AppTask.cpp b/examples/lock-app/qpg/src/AppTask.cpp index e418e1def9fc71..86a28d5e9bb863 100644 --- a/examples/lock-app/qpg/src/AppTask.cpp +++ b/examples/lock-app/qpg/src/AppTask.cpp @@ -108,12 +108,38 @@ CHIP_ERROR AppTask::StartAppTask() return CHIP_NO_ERROR; } +void AppTask::InitServer(intptr_t arg) +{ + static chip::CommonCaseDeviceServerInitParams initParams; + (void) initParams.InitializeStaticResourcesBeforeServerInit(); + + gExampleDeviceInfoProvider.SetStorageDelegate(initParams.persistentStorageDelegate); + chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); + + chip::Inet::EndPointStateOpenThread::OpenThreadEndpointInitParam nativeParams; + nativeParams.lockCb = LockOpenThreadTask; + nativeParams.unlockCb = UnlockOpenThreadTask; + nativeParams.openThreadInstancePtr = chip::DeviceLayer::ThreadStackMgrImpl().OTInstance(); + initParams.endpointNativeParams = static_cast(&nativeParams); + chip::Server::GetInstance().Init(initParams); + +#if CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY + chip::app::DnssdServer::Instance().SetExtendedDiscoveryTimeoutSecs(extDiscTimeoutSecs); +#endif +} CHIP_ERROR AppTask::Init() { CHIP_ERROR err = CHIP_NO_ERROR; ChipLogProgress(NotSpecified, "Current Software Version: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + // Init ZCL Data Model and start server + PlatformMgr().ScheduleWork(InitServer, 0); + + // Initialize device attestation config + SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); + + // Setup Bolt err = BoltLockMgr().Init(); if (err != CHIP_NO_ERROR) { @@ -122,32 +148,11 @@ CHIP_ERROR AppTask::Init() } BoltLockMgr().SetCallbacks(ActionInitiated, ActionCompleted); - // Subscribe with our button callback to the qvCHIP button handler. + // Setup button handler qvIO_SetBtnCallback(ButtonEventHandler); qvIO_LedSet(LOCK_STATE_LED, !BoltLockMgr().IsUnlocked()); -#if CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY - chip::app::DnssdServer::Instance().SetExtendedDiscoveryTimeoutSecs(extDiscTimeoutSecs); -#endif - - // Init ZCL Data Model - static chip::CommonCaseDeviceServerInitParams initParams; - (void) initParams.InitializeStaticResourcesBeforeServerInit(); - - gExampleDeviceInfoProvider.SetStorageDelegate(initParams.persistentStorageDelegate); - chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); - - chip::Inet::EndPointStateOpenThread::OpenThreadEndpointInitParam nativeParams; - nativeParams.lockCb = LockOpenThreadTask; - nativeParams.unlockCb = UnlockOpenThreadTask; - nativeParams.openThreadInstancePtr = chip::DeviceLayer::ThreadStackMgrImpl().OTInstance(); - initParams.endpointNativeParams = static_cast(&nativeParams); - chip::Server::GetInstance().Init(initParams); - - // Initialize device attestation config - SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); - UpdateClusterState(); ConfigurationMgr().LogDeviceConfig(); @@ -164,7 +169,6 @@ void AppTask::AppTaskMain(void * pvParameter) if (err != CHIP_NO_ERROR) { ChipLogError(NotSpecified, "AppTask.Init() failed: %" CHIP_ERROR_FORMAT, err.Format()); - return; } ChipLogProgress(NotSpecified, "App Task started"); 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 75377e1ac9f1a8..0abcc87051b916 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 @@ -46,7 +46,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -54,7 +54,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; 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 07fd85e68d3432..23aeb22bb00d91 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 @@ -51,7 +51,7 @@ client cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -59,7 +59,7 @@ client cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -117,7 +117,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -125,7 +125,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -152,6 +152,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -573,7 +574,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster AdministratorCommissioning = 60 { @@ -646,7 +647,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/ota-requestor-app/ameba/README.md b/examples/ota-requestor-app/ameba/README.md index 538a1c023f35bb..73be70beeef4f2 100644 --- a/examples/ota-requestor-app/ameba/README.md +++ b/examples/ota-requestor-app/ameba/README.md @@ -37,26 +37,35 @@ A prototype application that demonstrates OTA Requestor capabilities. ## Testing the Example Application -Launch the linux [ota-provider-app](../../ota-provider-app/linux) and provide -the SW_IMAGE_FILE +1. Commission Ameba (ota-requestor-app) using chip-tool - $ ./chip-ota-provider-app -f ${SW_IMAGE_FILE} + $ ./chip-tool pairing ble-wifi 1 20202021 3840 -Commission the ota-provider-app using -[chip-tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool) +2. Launch the linux [ota-provider-app](../../ota-provider-app/linux) and + provide the SW_IMAGE_FILE - $ ./chip-tool pairing onnetwork 1 20202021 + $ ./chip-ota-provider-app -f ${SW_IMAGE_FILE} -Input `ATS$` command to start the CHIP ota-requestor task, then use chip-tool to -commission it +3. Commission the ota-provider-app using + [chip-tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool) - $ ./chip-tool pairing ble-wifi 2 20202021 3840 + $ ./chip-tool pairing onnetwork 2 20202021 -After commissioning the ota-requestor, use the chip-tool to announce the -ota-provider-app to start the OTA process +4. Write the Default OTA providers into Ameba - $ ./chip-tool otasoftwareupdaterequestor announce-ota-provider 1 0 0 0 2 0 + $ ./chip-tool otasoftwareupdaterequestor write default-ota-providers '[{"fabricIndex": 1, "providerNodeID": 2, "endpoint": 0}]' 1 0 -The OTA process should include downloading the image, verification of image -header, erasing upgraded flash partition, writing to flash and checksum -verification +5. Configure the ACL of the ota-provider-app to allow access for Ameba + + $ ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets": [{"cluster": 41, "endpoint": null, "deviceType": null}]}]' 1235 0 + +6. Use the chip-tool to announce the ota-provider-app to start the OTA process + + $ ./chip-tool otasoftwareupdaterequestor announce-ota-provider 1 0 0 0 2 0 + +7. The OTA process should include downloading the image, verification of image + header, erasing upgraded flash partition, writing to flash and checksum + verification. + +8) Once OTA signature is updated, Ameba will reboot into the new image after 10 + seconds countdown. diff --git a/examples/ota-requestor-app/ameba/chip_main.cmake b/examples/ota-requestor-app/ameba/chip_main.cmake index fc1091a86238ca..896288900cd4cc 100644 --- a/examples/ota-requestor-app/ameba/chip_main.cmake +++ b/examples/ota-requestor-app/ameba/chip_main.cmake @@ -77,7 +77,6 @@ list( -DUSE_ZAP_CONFIG -DCHIP_HAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE= - -DMATTER_OTA_REQUESTOR_APP=1 ) if (matter_enable_persistentstorage_audit) 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 80d3b3e88cf779..b5258a7d8f5dfb 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 @@ -6,6 +6,20 @@ struct LabelStruct { char_string<16> value = 1; } +server cluster Descriptor = 29 { + struct DeviceType { + devtype_id type = 0; + int16u revision = 1; + } + + readonly attribute DeviceType deviceList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + server cluster AccessControl = 31 { enum AuthMode : ENUM8 { kPase = 1; @@ -51,7 +65,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -59,7 +73,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -86,6 +100,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -576,7 +591,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster AdministratorCommissioning = 60 { @@ -649,7 +664,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -804,6 +819,15 @@ endpoint 0 { device type rootdevice = 22; binding cluster OtaSoftwareUpdateProvider; + server cluster Descriptor { + callback attribute deviceList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + ram attribute featureMap; + callback attribute clusterRevision default = 1; + } + server cluster AccessControl { callback attribute acl; callback attribute extension; @@ -944,6 +968,15 @@ endpoint 0 { endpoint 65534 { device type anonymousEndpointType = 61442; + server cluster Descriptor { + callback attribute deviceList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + ram attribute featureMap; + callback attribute clusterRevision default = 1; + } + server cluster NetworkCommissioning { callback attribute maxNetworks; callback attribute networks; diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap index 0eb046b497c634..18fdc9c37ea411 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 71, + "featureLevel": 76, "creator": "zap", "keyValuePairs": [ { @@ -19,14 +19,16 @@ { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl.json", - "version": "ZCL Test Data", - "type": "zcl-properties" + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/app-templates.json", - "version": "chip-v1", - "type": "gen-templates-json" + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ @@ -79,7 +81,6 @@ "define": "IDENTIFY_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "identify time", @@ -566,7 +567,6 @@ "define": "ON_OFF_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "OnOff", @@ -701,7 +701,6 @@ "define": "LEVEL_CONTROL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "current level", @@ -737,15 +736,209 @@ } ] }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "device list", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "server list", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "client list", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "parts list", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Access Control", "code": 31, "mfgCode": null, "define": "ACCESS_CONTROL_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Access Control", @@ -754,7 +947,6 @@ "define": "ACCESS_CONTROL_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "ACL", @@ -893,7 +1085,6 @@ "define": "BASIC_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -920,7 +1111,6 @@ "define": "BASIC_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "DataModelRevision", @@ -1415,7 +1605,6 @@ "define": "OTA_REQUESTOR_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "DefaultOtaProviders", @@ -1537,9 +1726,7 @@ "mfgCode": null, "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Localization Configuration", @@ -1548,7 +1735,6 @@ "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "ActiveLocale", @@ -1622,9 +1808,7 @@ "mfgCode": null, "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Time Format Localization", @@ -1633,7 +1817,6 @@ "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "HourFormat", @@ -1723,9 +1906,7 @@ "mfgCode": null, "define": "UNIT_LOCALIZATION_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Unit Localization", @@ -1734,7 +1915,6 @@ "define": "UNIT_LOCALIZATION_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "TemperatureUnit", @@ -2042,8 +2222,7 @@ "incoming": 1, "outgoing": 0 } - ], - "attributes": [] + ] }, { "name": "Network Commissioning", @@ -2248,7 +2427,6 @@ "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -2496,8 +2674,7 @@ "incoming": 1, "outgoing": 0 } - ], - "attributes": [] + ] }, { "name": "AdministratorCommissioning", @@ -2506,7 +2683,6 @@ "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "WindowStatus", @@ -3044,9 +3220,7 @@ "mfgCode": null, "define": "FIXED_LABEL_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Fixed Label", @@ -3055,7 +3229,6 @@ "define": "FIXED_LABEL_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "label list", @@ -3113,9 +3286,7 @@ "mfgCode": null, "define": "USER_LABEL_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "User Label", @@ -3124,7 +3295,6 @@ "define": "USER_LABEL_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "label list", @@ -3307,7 +3477,6 @@ "define": "DOOR_LOCK_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "LockState", @@ -3666,7 +3835,6 @@ "define": "BARRIER_CONTROL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "barrier moving state", @@ -3897,7 +4065,6 @@ "define": "COLOR_CONTROL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "CurrentHue", @@ -4724,7 +4891,6 @@ "define": "TEMP_MEASUREMENT_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -4751,7 +4917,6 @@ "define": "TEMP_MEASUREMENT_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "MeasuredValue", @@ -4818,25 +4983,39 @@ "reportableChange": 0 } ] - }, + } + ] + }, + { + "name": "Anonymous Endpoint Type", + "deviceTypeName": "MA-secondary-network-commissioning", + "deviceTypeCode": 61442, + "deviceTypeProfileId": 259, + "clusters": [ { - "name": "IAS Zone", - "code": 1280, + "name": "Descriptor", + "code": 29, "mfgCode": null, - "define": "IAS_ZONE_CLUSTER", + "define": "DESCRIPTOR_CLUSTER", "side": "client", "enabled": 0, - "commands": [ + "attributes": [ { - "name": "ZoneEnrollResponse", - "code": 0, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -4847,118 +5026,148 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "IAS Zone", - "code": 1280, + "name": "Descriptor", + "code": 29, "mfgCode": null, - "define": "IAS_ZONE_CLUSTER", + "define": "DESCRIPTOR_CLUSTER", "side": "server", - "enabled": 0, - "commands": [ + "enabled": 1, + "attributes": [ { - "name": "ZoneStatusChangeNotification", + "name": "device list", "code": 0, "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "ZoneEnrollRequest", + "name": "server list", "code": 1, "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + }, { - "name": "zone state", - "code": 0, + "name": "client list", + "code": 2, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "", "reportable": 1, "minInterval": 0, - "maxInterval": 65344, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "zone type", - "code": 1, + "name": "parts list", + "code": 3, "mfgCode": null, "side": "server", - "type": "enum16", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, "minInterval": 0, - "maxInterval": 65344, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "zone status", - "code": 2, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "bitmap16", - "included": 1, + "type": "array", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "IAS CIE address", - "code": 16, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "node_id", - "included": 1, + "type": "array", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Zone ID", - "code": 17, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xff", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -4968,25 +5177,17 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "1", "reportable": 1, "minInterval": 0, - "maxInterval": 65344, + "maxInterval": 65534, "reportableChange": 0 } ] - } - ] - }, - { - "name": "Anonymous Endpoint Type", - "deviceTypeName": "MA-secondary-network-commissioning", - "deviceTypeCode": 61442, - "deviceTypeProfileId": 259, - "clusters": [ + }, { "name": "Network Commissioning", "code": 49, diff --git a/examples/pigweed-app/ameba/chip_main.cmake b/examples/pigweed-app/ameba/chip_main.cmake index 3f3b13ca620dbd..77e63b672d5e35 100644 --- a/examples/pigweed-app/ameba/chip_main.cmake +++ b/examples/pigweed-app/ameba/chip_main.cmake @@ -81,7 +81,6 @@ list( -DCHIP_HAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE= -DCONFIG_ENABLE_PW_RPC=1 - -DMATTER_PIGWEED_APP=1 ) if (matter_enable_persistentstorage_audit) diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index a04c825fa58328..ca1a1ec46e847d 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -350,44 +350,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -397,7 +408,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -508,6 +519,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -985,7 +997,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1254,7 +1266,7 @@ client cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1333,7 +1345,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -2542,7 +2554,7 @@ client cluster ApplicationBasic = 1293 { } readonly attribute char_string<32> vendorName = 0; - readonly attribute int16u vendorID = 1; + readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; readonly attribute ApplicationBasicApplication application = 4; @@ -2570,7 +2582,7 @@ server cluster ApplicationBasic = 1293 { } readonly attribute char_string<32> vendorName = 0; - readonly attribute int16u vendorID = 1; + readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; readonly attribute ApplicationBasicApplication application = 4; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index a04c825fa58328..ca1a1ec46e847d 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -350,44 +350,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -397,7 +408,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -508,6 +519,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -985,7 +997,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1254,7 +1266,7 @@ client cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1333,7 +1345,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -2542,7 +2554,7 @@ client cluster ApplicationBasic = 1293 { } readonly attribute char_string<32> vendorName = 0; - readonly attribute int16u vendorID = 1; + readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; readonly attribute ApplicationBasicApplication application = 4; @@ -2570,7 +2582,7 @@ server cluster ApplicationBasic = 1293 { } readonly attribute char_string<32> vendorName = 0; - readonly attribute int16u vendorID = 1; + readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; readonly attribute ApplicationBasicApplication application = 4; diff --git a/examples/platform/ameba/shell/launch_shell.cpp b/examples/platform/ameba/shell/launch_shell.cpp new file mode 100644 index 00000000000000..dba80a25d8b950 --- /dev/null +++ b/examples/platform/ameba/shell/launch_shell.cpp @@ -0,0 +1,42 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "launch_shell.h" + +#include "FreeRTOS.h" +#include "task.h" + +#include + +namespace { + +void MatterShellTask(void * args) +{ + chip::Shell::Engine::Root().RunMainLoop(); +} + +} // namespace + +namespace chip { + +void LaunchShell() +{ + chip::Shell::Engine::Root().Init(); + xTaskCreate(&MatterShellTask, "matter_shell", 2048, NULL, tskIDLE_PRIORITY + 1, NULL); +} + +} // namespace chip diff --git a/examples/platform/ameba/shell/launch_shell.h b/examples/platform/ameba/shell/launch_shell.h new file mode 100644 index 00000000000000..604584b58982bd --- /dev/null +++ b/examples/platform/ameba/shell/launch_shell.h @@ -0,0 +1,24 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +namespace chip { + +void LaunchShell(); + +} diff --git a/examples/platform/linux/CommissionableInit.cpp b/examples/platform/linux/CommissionableInit.cpp index 8bb9ed90f42924..24fc347153c053 100644 --- a/examples/platform/linux/CommissionableInit.cpp +++ b/examples/platform/linux/CommissionableInit.cpp @@ -59,7 +59,7 @@ CHIP_ERROR InitCommissionableDataProvider(LinuxCommissionableDataProvider & prov if (options.discriminator.HasValue()) { - options.payload.discriminator = options.discriminator.Value(); + options.payload.discriminator.SetLongValue(options.discriminator.Value()); } else { @@ -72,7 +72,7 @@ CHIP_ERROR InitCommissionableDataProvider(LinuxCommissionableDataProvider & prov "given on command line. This is temporary and will disappear. Please update your scripts " "to explicitly configure discriminator. ***", static_cast(defaultTestDiscriminator)); - options.payload.discriminator = defaultTestDiscriminator; + options.payload.discriminator.SetLongValue(defaultTestDiscriminator); } // Default to minimum PBKDF iterations @@ -84,7 +84,7 @@ CHIP_ERROR InitCommissionableDataProvider(LinuxCommissionableDataProvider & prov ChipLogError(Support, "PASE PBKDF iterations set to %u", static_cast(spake2pIterationCount)); return provider.Init(options.spake2pVerifier, options.spake2pSalt, spake2pIterationCount, setupPasscode, - options.payload.discriminator); + options.payload.discriminator.GetLongValue()); } CHIP_ERROR InitConfigurationManager(ConfigurationManagerImpl & configManager, LinuxDeviceOptions & options) diff --git a/examples/platform/linux/CommissionerMain.cpp b/examples/platform/linux/CommissionerMain.cpp index 18b86e1051fe99..d70ead1203cfdf 100644 --- a/examples/platform/linux/CommissionerMain.cpp +++ b/examples/platform/linux/CommissionerMain.cpp @@ -234,7 +234,7 @@ class PairingCommand : public Controller::DevicePairingDelegate private: #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED static void OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * device); - static void OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR error); + static void OnDeviceConnectionFailureFn(void * context, const ScopedNodeId & peerId, CHIP_ERROR error); chip::Callback::Callback mOnDeviceConnectedCallback; chip::Callback::Callback mOnDeviceConnectionFailureCallback; @@ -333,7 +333,7 @@ void PairingCommand::OnDeviceConnectedFn(void * context, chip::OperationalDevice } } -void PairingCommand::OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR err) +void PairingCommand::OnDeviceConnectionFailureFn(void * context, const ScopedNodeId & peerId, CHIP_ERROR err) { ChipLogProgress(Controller, "OnDeviceConnectionFailureFn - attempt to get OperationalDeviceProxy failed"); CommissionerDiscoveryController * cdc = GetCommissionerDiscoveryController(); diff --git a/examples/platform/linux/NamedPipeCommands.cpp b/examples/platform/linux/NamedPipeCommands.cpp index 63bad2eb072ccd..4d78cd4c87aab6 100644 --- a/examples/platform/linux/NamedPipeCommands.cpp +++ b/examples/platform/linux/NamedPipeCommands.cpp @@ -24,7 +24,7 @@ #include #include -static constexpr const size_t kChipEventCmdBufSize = 80; +static constexpr const size_t kChipEventCmdBufSize = 256; CHIP_ERROR NamedPipeCommands::Start(std::string & path, NamedPipeCommandDelegate * delegate) { diff --git a/examples/platform/linux/NamedPipeCommands.h b/examples/platform/linux/NamedPipeCommands.h index 16b8cd4cd32c2a..4f908de28748d0 100644 --- a/examples/platform/linux/NamedPipeCommands.h +++ b/examples/platform/linux/NamedPipeCommands.h @@ -24,8 +24,8 @@ class NamedPipeCommandDelegate { public: - virtual ~NamedPipeCommandDelegate() = default; - virtual void OnEventCommandReceived(const char * payload) = 0; + virtual ~NamedPipeCommandDelegate() = default; + virtual void OnEventCommandReceived(const char * json) = 0; }; class NamedPipeCommands diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index ab85bf6228eb19..0ee873ccb5a72c 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -116,44 +116,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -163,7 +174,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -245,7 +256,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -253,7 +264,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -282,6 +293,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -735,7 +747,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster ThreadNetworkDiagnostics = 53 { @@ -921,7 +933,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute attrib_id attributeList[] = 65531; 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 5448d745c86373..7ea1db01b01dd7 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 @@ -160,7 +160,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -168,7 +168,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -197,6 +197,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -650,7 +651,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster ThreadNetworkDiagnostics = 53 { @@ -836,7 +837,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute attrib_id attributeList[] = 65531; diff --git a/examples/temperature-measurement-app/esp32/README.md b/examples/temperature-measurement-app/esp32/README.md index 6cf02bedbfd4d2..132a754a4a9ae8 100644 --- a/examples/temperature-measurement-app/esp32/README.md +++ b/examples/temperature-measurement-app/esp32/README.md @@ -57,6 +57,14 @@ make sure the IDF_PATH has been exported(See the manual setup steps above). $ source ./scripts/activate.sh +- Enable Ccache for faster IDF builds + + It is recommended to have Ccache installed for faster builds + + ``` + $ export IDF_CCACHE_ENABLE=1 + ``` + - Target Select $ idf.py set-target esp32(or esp32c3) @@ -171,8 +179,8 @@ the ESP32 all-clusters-app to commission it onto a Wi-Fi network: Parameters: -1. Discriminator: 3840 (configurable through menuconfig) -2. Setup-pin-code: 20202021 (configurable through menuconfig) +1. Discriminator: 3840 +2. Setup-pin-code: 20202021 3. Node-id: 12344321 (you can assign any node id) ### Cluster control diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter index 76830d443cbb17..1dd938ce8febaa 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter @@ -65,7 +65,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -73,7 +73,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -100,6 +100,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -497,7 +498,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -676,7 +677,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/thermostat/efr32/.gn b/examples/thermostat/efr32/.gn new file mode 100644 index 00000000000000..0ff42d50e06ef0 --- /dev/null +++ b/examples/thermostat/efr32/.gn @@ -0,0 +1,28 @@ +# 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") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + chip_openthread_ftd = true + import("//args.gni") +} diff --git a/examples/thermostat/efr32/BUILD.gn b/examples/thermostat/efr32/BUILD.gn new file mode 100644 index 00000000000000..435bf123f75764 --- /dev/null +++ b/examples/thermostat/efr32/BUILD.gn @@ -0,0 +1,338 @@ +# 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/efr32_sdk.gni") +import("//build_overrides/pigweed.gni") + +import("${build_root}/config/defaults.gni") +import("${efr32_sdk_build_root}/efr32_executable.gni") +import("${efr32_sdk_build_root}/efr32_sdk.gni") + +import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") +import("${chip_root}/src/platform/device.gni") + +if (chip_enable_pw_rpc) { + import("//build_overrides/pigweed.gni") + import("$dir_pw_build/target_types.gni") +} + +assert(current_os == "freertos") + +efr32_project_dir = "${chip_root}/examples/thermostat/efr32" +examples_plat_dir = "${chip_root}/examples/platform/efr32" + +declare_args() { + # Dump memory usage at link time. + chip_print_memory_usage = false + + # PIN code for PASE session establishment. + setupPinCode = 20202021 + setupDiscriminator = 3840 + + # Monitor & log memory usage at runtime. + enable_heap_monitoring = false + + # Enable Sleepy end device + enable_sleepy_device = false + + # OTA timeout in seconds + OTA_periodic_query_timeout = 86400 + + # Wifi related stuff - they are overridden by gn -args="use_wf200=true" + use_wf200 = false + use_rs911x = false + use_rs911x_sockets = false + sl_wfx_config_softap = false + sl_wfx_config_scan = true + + # Disable LCD on supported devices + disable_lcd = false + + # Argument to Disable IPv4 for wifi(rs911) + chip_enable_wifi_ipv4 = false +} + +declare_args() { + # Enables LCD Qr Code on supported devices + show_qr_code = !disable_lcd +} + +# qr code cannot be true if lcd is disabled +assert(!(disable_lcd && show_qr_code)) + +# Sanity check +assert(!(chip_enable_wifi && chip_enable_openthread)) +assert(!(use_rs911x && chip_enable_openthread)) +assert(!(use_wf200 && chip_enable_openthread)) +if (chip_enable_wifi) { + assert(use_rs911x || use_wf200) +} + +# BRD4166A --> ThunderBoard Sense 2 (No LCD) +if (efr32_board == "BRD4166A" || efr32_board == "BRD4180A") { + show_qr_code = false + disable_lcd = true +} + +# WiFi settings +if (chip_enable_wifi) { + wifi_sdk_dir = "${chip_root}/third_party/silabs/matter_support/matter/wifi" + efr32_lwip_defs = [ "LWIP_NETIF_API=1" ] + efr32_lwip_defs += [ + "LWIP_IPV4=1", + "LWIP_ARP=1", + "LWIP_ICMP=1", + "LWIP_DHCP=1", + "LWIP_IPV6_ND=1", + "LWIP_IGMP=1", + ] + + if (use_rs911x) { + wiseconnect_sdk_root = + "${chip_root}/third_party/silabs/wiseconnect-wifi-bt-sdk" + import("${wifi_sdk_dir}/rs911x/rs911x.gni") + } else { + import("${wifi_sdk_dir}/wf200/wf200.gni") + } +} + +efr32_sdk("sdk") { + sources = [ + "${efr32_project_dir}/include/CHIPProjectConfig.h", + "${examples_plat_dir}/FreeRTOSConfig.h", + ] + + include_dirs = [ + "${chip_root}/src/platform/EFR32", + "${efr32_project_dir}/include", + "${examples_plat_dir}", + "${chip_root}/src/lib", + ] + + defines = [ + "BOARD_ID=${efr32_board}", + "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE=${setupPinCode}", + "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setupDiscriminator}", + "OTA_PERIODIC_TIMEOUT=${OTA_periodic_query_timeout}", + ] + + if (chip_enable_pw_rpc) { + defines += [ + "HAL_VCOM_ENABLE=1", + "PW_RPC_ENABLED", + ] + } + + # WiFi Settings + if (chip_enable_wifi) { + if (use_rs911x) { + defines += rs911x_defs + include_dirs += rs911x_plat_incs + } else if (use_wf200) { + defines += wf200_defs + include_dirs += wf200_plat_incs + } + + if (use_rs911x_sockets) { + include_dirs += [ "${examples_plat_dir}/wifi/rsi-sockets" ] + defines += rs911x_sock_defs + } else { + # Using LWIP instead of the native TCP/IP stack + defines += efr32_lwip_defs + } + + if (sl_wfx_config_softap) { + defines += [ "SL_WFX_CONFIG_SOFTAP" ] + } + if (sl_wfx_config_scan) { + defines += [ "SL_WFX_CONFIG_SCAN" ] + } + } +} + +efr32_executable("thermostat_app") { + output_name = "chip-efr32-thermostat-example.out" + include_dirs = [ "include" ] + defines = [] + + sources = [ + "${examples_plat_dir}/LEDWidget.cpp", + "${examples_plat_dir}/efr32_utils.cpp", + "${examples_plat_dir}/heap_4_silabs.c", + "${examples_plat_dir}/init_efrPlatform.cpp", + "${examples_plat_dir}/matter_config.cpp", + "src/AppTask.cpp", + "src/ZclCallbacks.cpp", + "src/main.cpp", + ] + + if (chip_enable_pw_rpc || chip_build_libshell || enable_openthread_cli) { + sources += [ "${examples_plat_dir}/uart.cpp" ] + } + + deps = [ + ":sdk", + "${chip_root}/examples/providers:device_info_provider", + "${chip_root}/examples/thermostat/thermostat-common", + "${chip_root}/src/lib", + "${chip_root}/src/setup_payload", + ] + + # OpenThread Settings + if (chip_enable_openthread) { + deps += [ + "${chip_root}/third_party/openthread/platforms:libopenthread-platform", + "${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils", + "${examples_plat_dir}:efr-matter-shell", + ] + if (chip_openthread_ftd) { + deps += [ + "${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd", + "${chip_root}/third_party/openthread/repo:libopenthread-ftd", + ] + } else { + deps += [ + "${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd", + "${chip_root}/third_party/openthread/repo:libopenthread-mtd", + ] + } + } + + # Attestation Credentials + if (chip_build_platform_attestation_credentials_provider) { + deps += [ "${examples_plat_dir}:efr32-attestation-credentials" ] + } + + if (chip_enable_ota_requestor) { + defines += [ "EFR32_OTA_ENABLED" ] + sources += [ "${examples_plat_dir}/OTAConfig.cpp" ] + } + + if (chip_enable_wifi_ipv4) { + defines += [ "CHIP_DEVICE_CONFIG_ENABLE_IPV4" ] + } + + # WiFi Settings + if (chip_enable_wifi) { + if (use_rs911x) { + sources += rs911x_src_plat + + # All the stuff from wiseconnect + sources += rs911x_src_sapi + + # Apparently - the rsi library needs this (though we may not use use it) + sources += rs911x_src_sock + include_dirs += rs911x_inc_plat + + if (use_rs911x_sockets) { + # + # Using native sockets inside RS911x + # + include_dirs += rs911x_sock_inc + } else { + # + # We use LWIP - not built-in sockets + # + sources += rs911x_src_lwip + } + } else if (use_wf200) { + sources += wf200_plat_src + include_dirs += wf200_plat_incs + } + } + + if (!disable_lcd) { + sources += [ "${examples_plat_dir}/display/lcd.c" ] + defines += [ "DISPLAY_ENABLED" ] + if (show_qr_code) { + defines += [ "QR_CODE_ENABLED" ] + deps += [ "${chip_root}/examples/common/QRCode" ] + } + } + + if (chip_enable_pw_rpc) { + defines += [ + "PW_RPC_ENABLED", + "PW_RPC_ATTRIBUTE_SERVICE=1", + "PW_RPC_BUTTON_SERVICE=1", + "PW_RPC_DESCRIPTOR_SERVICE=1", + "PW_RPC_DEVICE_SERVICE=1", + "PW_RPC_LIGHTING_SERVICE=1", + ] + + sources += [ + "${chip_root}/examples/common/pigweed/RpcService.cpp", + "${chip_root}/examples/common/pigweed/efr32/PigweedLoggerMutex.cpp", + "${examples_plat_dir}/PigweedLogger.cpp", + "${examples_plat_dir}/Rpc.cpp", + ] + + deps += [ + "$dir_pw_hdlc:rpc_channel_output", + "$dir_pw_stream:sys_io_stream", + "${chip_root}/config/efr32/lib/pw_rpc:pw_rpc", + "${chip_root}/examples/common/pigweed:attributes_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:button_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:descriptor_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:device_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:lighting_service.nanopb_rpc", + "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32", + ] + + deps += pw_build_LINK_DEPS + + include_dirs += [ + "${chip_root}/examples/common", + "${chip_root}/examples/common/pigweed/efr32", + ] + } + + if (enable_heap_monitoring) { + sources += [ "${examples_plat_dir}/MemMonitoring.cpp" ] + defines += [ "HEAP_MONITORING" ] + } + + ldscript = "${examples_plat_dir}/ldscripts/${efr32_family}.ld" + + inputs = [ ldscript ] + + ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ] + + if (chip_print_memory_usage) { + ldflags += [ + "-Wl,--print-memory-usage", + "-fstack-usage", + ] + } + + # WiFi Settings + if (chip_enable_wifi) { + ldflags += [ + "-Wl,--defsym", + "-Wl,SILABS_WIFI=1", + ] + } + + output_dir = root_out_dir +} + +group("efr32") { + deps = [ ":thermostat_app" ] +} + +group("default") { + deps = [ ":efr32" ] +} diff --git a/examples/thermostat/efr32/README.md b/examples/thermostat/efr32/README.md new file mode 100644 index 00000000000000..35cbeefad50b4a --- /dev/null +++ b/examples/thermostat/efr32/README.md @@ -0,0 +1,360 @@ +# CHIP EFR32 Light Switch Example + +An example showing the use of CHIP on the Silicon Labs EFR32 MG12. + +
+ +- [CHIP EFR32 Light Switch Example](#chip-efr32-light-switch-example) + - [Introduction](#introduction) + - [Building](#building) + - [Note](#note) + - [Flashing the Application](#flashing-the-application) + - [Viewing Logging Output](#viewing-logging-output) + - [Running the Complete Example](#running-the-complete-example) + - [Notes](#notes) + - [Running RPC console](#running-rpc-console) + - [Memory settings](#memory-settings) + - [OTA Software Update](#ota-software-update) + +
+ + + +## Introduction + +The EFR32 light switch example provides a baseline demonstration of a on-off +light switch device, built using CHIP and the Silicon Labs gecko SDK. It can be +controlled by a Chip controller over Openthread network. + +The EFR32 device can be commissioned over Bluetooth Low Energy where the device +and the Chip controller will exchange security information with the Rendez-vous +procedure. Thread Network credentials are then provided to the EFR32 device +which will then join the network. + +The LCD on the Silabs WSTK shows a QR Code containing the needed commissioning +information for the BLE connection and starting the Rendez-vous procedure. + +The light switch example is intended to serve both as a means to explore the +workings of CHIP as well as a template for creating real products based on the +Silicon Labs platform. + + + +## Building + +- Download the + [Simplicity Commander](https://www.silabs.com/mcu/programming-options) + command line tool, and ensure that `commander` is your shell search path. + (For Mac OS X, `commander` is located inside + `Commander.app/Contents/MacOS/`.) + +- Download and install a suitable ARM gcc tool chain: + [GNU Arm Embedded Toolchain 9-2019-q4-major](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads) + +- Install some additional tools(likely already present for CHIP developers): + +#### Linux + + $ sudo apt-get install git libwebkitgtk-1.0-0 ninja-build``` + +#### Mac OS X + + $ brew install ninja + +- Supported hardware: + + MG12 boards: + + - BRD4161A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@19dBm + - BRD4164A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@19dBm + - BRD4166A / SLTB004A / Thunderboard Sense 2 / 2.4GHz@10dBm + - BRD4170A / SLWSTK6000B / Multiband Wireless Starter Kit / 2.4GHz@19dBm, + 915MHz@19dBm + - BRD4304A / SLWSTK6000B / MGM12P Module / 2.4GHz@19dBm + + MG21 boards: Currently not supported due to RAM limitation. + + - BRD4180A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm + + MG24 boards : + + - BRD4186A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@10dBm + - BRD4187A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm + +* Build the example application: + + cd ~/connectedhomeip + ./scripts/examples/gn_efr32_example.sh ./examples/thermostat/efr32/ ./out/thermostat-app BRD4161A + +- To delete generated executable, libraries and object files use: + + $ cd ~/connectedhomeip + $ rm -rf ./out/ + + OR use GN/Ninja directly + + $ cd ~/connectedhomeip/examples/thermostat/efr32 + $ git submodule update --init + $ source third_party/connectedhomeip/scripts/activate.sh + $ export EFR32_BOARD=BRD4161A + $ gn gen out/debug + $ ninja -C out/debug + +- To delete generated executable, libraries and object files use: + + $ cd ~/connectedhomeip/examples/thermostat/efr32 + $ rm -rf out/ + +* Build the example with Matter shell + + ./scripts/examples/gn_efr32_example.sh examples/thermostat/efr32/ out/thermostat-app BRD4161A chip_build_libshell=true + +* Build the example as Sleepy End Device (SED) + + $ ./scripts/examples/gn_efr32_example.sh ./examples/thermostat/efr32/ ./out/thermostat-app_SED BRD4161A --sed + + or use gn as previously mentioned but adding the following arguments: + + $ gn gen out/debug '--args=efr32_board="BRD4161A" enable_sleepy_device=true chip_openthread_ftd=false chip_build_libshell=true' + +* Build the example with pigweed RCP + + $ ./scripts/examples/gn_efr32_example.sh examples/thermostat/efr32/ out/thermostat-app_rpc BRD4161A 'import("//with_pw_rpc.gni")' + + or use GN/Ninja Directly + + $ cd ~/connectedhomeip/examples/thermostat/efr32 + $ git submodule update --init + $ source third_party/connectedhomeip/scripts/activate.sh + $ export EFR32_BOARD=BRD4161A + $ gn gen out/debug --args='import("//with_pw_rpc.gni")' + $ ninja -C out/debug + + [Running Pigweed RPC console](#running-pigweed-rpc-console) + +For more build options, help is provided when running the build script without +arguments + + ./scripts/examples/gn_efr32_example.sh + + + +## Flashing the Application + +- On the command line: + + $ cd ~/connectedhomeip/examples/thermostat/efr32 + $ python3 out/debug/chip-efr32-thermostat-switch-example.flash.py + +- Or with the Ozone debugger, just load the .out file. + + + +## Viewing Logging Output + +The example application is built to use the SEGGER Real Time Transfer (RTT) +facility for log output. RTT is a feature built-in to the J-Link Interface MCU +on the WSTK development board. It allows bi-directional communication with an +embedded application without the need for a dedicated UART. + +Using the RTT facility requires downloading and installing the _SEGGER J-Link +Software and Documentation Pack_ +([web site](https://www.segger.com/downloads/jlink#J-LinkSoftwareAndDocumentationPack)). + +Alternatively, SEGGER Ozone J-Link debugger can be used to view RTT logs too +after flashing the .out file. + +- Download the J-Link installer by navigating to the appropriate URL and + agreeing to the license agreement. + +- [JLink_Linux_x86_64.deb](https://www.segger.com/downloads/jlink/JLink_Linux_x86_64.deb) +- [JLink_MacOSX.pkg](https://www.segger.com/downloads/jlink/JLink_MacOSX.pkg) + +* Install the J-Link software + + $ cd ~/Downloads + $ sudo dpkg -i JLink_Linux_V*_x86_64.deb + +* In Linux, grant the logged in user the ability to talk to the development + hardware via the linux tty device (/dev/ttyACMx) by adding them to the + dialout group. + + $ sudo usermod -a -G dialout ${USER} + +Once the above is complete, log output can be viewed using the JLinkExe tool in +combination with JLinkRTTClient as follows: + +- Run the JLinkExe tool with arguments to autoconnect to the WSTK board: + + For MG12 use: + + $ JLinkExe -device EFR32MG12PXXXF1024 -if JTAG -speed 4000 -autoconnect 1 + + For MG21 use: + + $ JLinkExe -device EFR32MG21AXXXF1024 -if SWD -speed 4000 -autoconnect 1 + +- In a second terminal, run the JLinkRTTClient to view logs: + + $ JLinkRTTClient + + + +## Running the Complete Example + +- It is assumed here that you already have an OpenThread border router + configured and running. If not see the following guide + [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/openthread_border_router_pi.md) + for more information on how to setup a border router on a raspberryPi. + + Take note that the RCP code is available directly through + [Simplicity Studio 5](https://www.silabs.com/products/development-tools/software/simplicity-studio/simplicity-studio-5) + under File->New->Project Wizard->Examples->Thread : ot-rcp + +- For this example to work, it is necessary to have a second efr32 device + running the + [thermostat app example](https://github.com/project-chip/connectedhomeip/blob/master/examples/thermostat/efr32/README.md) + commissioned on the same openthread network + +- User interface : **LCD** The LCD on Silabs WSTK shows a QR Code. This QR + Code is be scanned by the CHIP Tool app For the Rendez-vous procedure over + BLE + + * On devices that do not have or support the LCD Display like the BRD4166A Thunderboard Sense 2, + a URL can be found in the RTT logs. + + [SVR] Copy/paste the below URL in a browser to see the QR Code: + [SVR] https://project-chip.github.io/connectedhomeip/qrcode.html?data=CH%3AI34NM%20-00%200C9SS0 + + **LED 0** shows the overall state of the device and its connectivity. The + following states are possible: + + - Short Flash On (50 ms on/950 ms off): The device is in the + unprovisioned (unpaired) state and is waiting for a commissioning + application to connect. + + - Rapid Even Flashing (100 ms on/100 ms off): The device is in the + unprovisioned state and a commissioning application is connected through + Bluetooth LE. + + - Short Flash Off (950ms on/50ms off): The device is fully + provisioned, but does not yet have full Thread network or service + connectivity. + + - Solid On: The device is fully provisioned and has full Thread + network and service connectivity. + + **Push Button 0** + + - _Press and Release_ : Start, or restart, BLE advertisement in fast mode. It will advertise in this mode + for 30 seconds. The device will then switch to a slower interval advertisement. + After 15 minutes, the advertisement stops. + + - _Pressed and hold for 6 s_ : Initiates the factory reset of the device. + Releasing the button within the 6-second window cancels the factory reset + procedure. **LEDs** blink in unison when the factory reset procedure is + initiated. + +* You can provision and control the Chip device using the python controller, + [CHIPTool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) + standalone, Android or iOS app + + Here is an example with the CHIPTool: + + ``` + chip-tool pairing ble-thread 1 hex: 20202021 3840 + ``` + +### Notes + +- Depending on your network settings your router might not provide native ipv6 + addresses to your devices (Border router / PC). If this is the case, you + need to add a static ipv6 addresses on both device and then an ipv6 route to + the border router on your PC + +#### On Border Router: + +`$ sudo ip addr add dev 2002::2/64` + +#### On PC(Linux): + +`$ sudo ip addr add dev 2002::1/64` + +#Add Ipv6 route on PC(Linux) \$ sudo ip route add /64 +via 2002::2 + + + +## Running RPC console + +- As part of building the example with RPCs enabled the chip_rpc python + interactive console is installed into your venv. The python wheel files are + also created in the output folder: out/debug/chip_rpc_console_wheels. To + install the wheel files without rebuilding: + + `pip3 install out/debug/chip_rpc_console_wheels/*.whl` + +- To use the chip-rpc console after it has been installed run: + + `chip-console --device /dev/tty. -b 115200 -o //pw_log.out` + +- Then you can simulate a button press or release using the following command + where : idx = 0 or 1 for Button PB0 or PB1 action = 0 for PRESSED, 1 for + RELEASE Test toggling the LED with + + `rpcs.chip.rpc.Button.Event(idx=1, pushed=True)` + +## Memory settings + +While most of the RAM usage in CHIP is static, allowing easier debugging and +optimization with symbols analysis, we still need some HEAP for the crypto and +OpenThread. Size of the HEAP can be modified by changing the value of the +`configTOTAL_HEAP_SIZE` define inside of the FreeRTOSConfig.h file of this +example. Please take note that a HEAP size smaller than 13k can and will cause a +Mbedtls failure during the BLE rendez-vous or CASE session + +To track memory usage you can set `enable_heap_monitoring = true` either in the +BUILD.gn file or pass it as a build argument to gn. This will print on the RTT +console the RAM usage of each individual task and the number of Memory +allocation and Free. While this is not extensive monitoring you're welcome to +modify `examples/platform/efr32/MemMonitoring.cpp` to add your own memory +tracking code inside the `trackAlloc` and `trackFree` function + +## OTA Software Update + +For the description of Software Update process with EFR32 example applications +see +[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) + +## Building options + +All of Silabs's examples within the Matter repo have all the features enabled by +default, as to provide the best end user experience. However some of those +features can easily be toggled on or off. Here is a short list of options : + +### Disabling logging + +chip_progress_logging, chip_detail_logging, chip_automation_logging + + $ ./scripts/examples/gn_efr32_example.sh ./examples/thermostat/efr32 ./out/thermostat-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" + +### Debug build / release build + +is_debug + + $ ./scripts/examples/gn_efr32_example.sh ./examples/thermostat/efr32 ./out/thermostat-app BRD4164A "is_debug=false" + +### Disabling LCD + +show_qr_code + + $ ./scripts/examples/gn_efr32_example.sh ./examples/thermostat/efr32 ./out/thermostat-app BRD4164A "show_qr_code=false" + +### KVS maximum entry count + +kvs_max_entries + + Set the maximum Kvs entries that can be stored in NVM (Default 75) + Thresholds: 30 <= kvs_max_entries <= 255 + + $ ./scripts/examples/gn_efr32_example.sh ./examples/thermostat/efr32 ./out/thermostat-app BRD4164A kvs_max_entries=50 diff --git a/examples/thermostat/efr32/args.gni b/examples/thermostat/efr32/args.gni new file mode 100644 index 00000000000000..7df1c5e400f56f --- /dev/null +++ b/examples/thermostat/efr32/args.gni @@ -0,0 +1,26 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") +import("//build_overrides/pigweed.gni") +import("${chip_root}/src/platform/EFR32/args.gni") + +efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") + +chip_enable_ota_requestor = true + +pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" +pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +chip_enable_openthread = true +pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex" diff --git a/examples/thermostat/efr32/build_for_wifi_args.gni b/examples/thermostat/efr32/build_for_wifi_args.gni new file mode 100644 index 00000000000000..4a3bdfd804ae19 --- /dev/null +++ b/examples/thermostat/efr32/build_for_wifi_args.gni @@ -0,0 +1,24 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//build_overrides/chip.gni") +import("//build_overrides/pigweed.gni") + +efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") +chip_enable_openthread = false +import("${chip_root}/src/platform/EFR32/wifi_args.gni") + +chip_enable_ota_requestor = true + +pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" +pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" diff --git a/examples/thermostat/efr32/build_for_wifi_gnfile.gn b/examples/thermostat/efr32/build_for_wifi_gnfile.gn new file mode 100644 index 00000000000000..d391814190d09f --- /dev/null +++ b/examples/thermostat/efr32/build_for_wifi_gnfile.gn @@ -0,0 +1,28 @@ +# 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") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + chip_enable_wifi = true + import("//build_for_wifi_args.gni") +} diff --git a/examples/thermostat/efr32/build_overrides b/examples/thermostat/efr32/build_overrides new file mode 120000 index 00000000000000..e578e73312ebd1 --- /dev/null +++ b/examples/thermostat/efr32/build_overrides @@ -0,0 +1 @@ +../../build_overrides \ No newline at end of file diff --git a/examples/thermostat/efr32/include/AppConfig.h b/examples/thermostat/efr32/include/AppConfig.h new file mode 100644 index 00000000000000..91501d889a6234 --- /dev/null +++ b/examples/thermostat/efr32/include/AppConfig.h @@ -0,0 +1,46 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +// ---- Lighting Example App Config ---- + +#define APP_TASK_NAME "Lit" + +// Time it takes in ms for the simulated actuator to move from one +// state to another. +#define ACTUATOR_MOVEMENT_PERIOS_MS 10 + +// EFR Logging +#ifdef __cplusplus +extern "C" { +#endif + +void efr32LogInit(void); + +void efr32Log(const char * aFormat, ...); +#define EFR32_LOG(...) efr32Log(__VA_ARGS__); +void appError(int err); + +#ifdef __cplusplus +} + +#include +void appError(CHIP_ERROR error); +#endif diff --git a/examples/thermostat/efr32/include/AppEvent.h b/examples/thermostat/efr32/include/AppEvent.h new file mode 100644 index 00000000000000..7a19b719edad25 --- /dev/null +++ b/examples/thermostat/efr32/include/AppEvent.h @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2018 Nest Labs, Inc. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +struct AppEvent; +typedef void (*EventHandler)(AppEvent *); + +struct AppEvent +{ + enum AppEventTypes + { + kEventType_Button = 0, + kEventType_Timer, + kEventType_Light, + kEventType_Install, + }; + + uint16_t Type; + + union + { + struct + { + uint8_t Action; + } ButtonEvent; + struct + { + void * Context; + } TimerEvent; + struct + { + uint8_t Action; + int32_t Actor; + } LightEvent; + }; + + EventHandler Handler; +}; diff --git a/examples/thermostat/efr32/include/AppTask.h b/examples/thermostat/efr32/include/AppTask.h new file mode 100644 index 00000000000000..357d2d97c4584a --- /dev/null +++ b/examples/thermostat/efr32/include/AppTask.h @@ -0,0 +1,222 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +/********************************************************** + * Includes + *********************************************************/ + +#include +#include + +#include "AppEvent.h" +#include "FreeRTOS.h" +#include "sl_simple_button_instances.h" +#include "timers.h" // provides FreeRTOS timer support +#include +#include +#include +#include + +/********************************************************** + * Defines + *********************************************************/ + +// Application-defined error codes in the CHIP_ERROR space. +#define APP_ERROR_EVENT_QUEUE_FAILED CHIP_APPLICATION_ERROR(0x01) +#define APP_ERROR_CREATE_TASK_FAILED CHIP_APPLICATION_ERROR(0x02) +#define APP_ERROR_UNHANDLED_EVENT CHIP_APPLICATION_ERROR(0x03) +#define APP_ERROR_CREATE_TIMER_FAILED CHIP_APPLICATION_ERROR(0x04) +#define APP_ERROR_START_TIMER_FAILED CHIP_APPLICATION_ERROR(0x05) +#define APP_ERROR_STOP_TIMER_FAILED CHIP_APPLICATION_ERROR(0x06) + +/********************************************************** + * AppTask Declaration + *********************************************************/ + +class AppTask +{ + +public: + /********************************************************** + * Public Function Declaration + *********************************************************/ + + /** + * @brief Create AppTask task and Event Queue + * If an error occurs during creation, application will hang after printing out error code + * + * @return CHIP_ERROR CHIP_NO_ERROR if no errors + */ + CHIP_ERROR StartAppTask(); + + /** + * @brief AppTask task main loop function + * + * @param pvParameter FreeRTOS task parameter + */ + static void AppTaskMain(void * pvParameter); + + /** + * @brief PostEvent function that add event to AppTask queue for processing + * + * @param event AppEvent to post + */ + void PostEvent(const AppEvent * event); + + /** + * @brief Event handler when a button is pressed + * Function posts an event for button processing + * + * @param buttonHandle APP_LIGHT_SWITCH or APP_FUNCTION_BUTTON + * @param btnAction button action - SL_SIMPLE_BUTTON_PRESSED, + * SL_SIMPLE_BUTTON_RELEASED or SL_SIMPLE_BUTTON_DISABLED + */ + void ButtonEventHandler(const sl_button_t * buttonHandle, uint8_t btnAction); + + /** + * @brief Callback called by the identify-server when an identify command is received + * + * @param identify identify structure the command applies on + */ + static void OnIdentifyStart(Identify * identify); + + /** + * @brief Callback called by the identify-server when an identify command is stopped or finished + * + * @param identify identify structure the command applies on + */ + static void OnIdentifyStop(Identify * identify); + + /** + * @brief Function called to start the LED light timer + */ + void StartLightTimer(void); + + /** + * @brief Function to stop LED light timer + * Turns off Status LED before stopping timer + */ + void CancelLightTimer(void); + +private: + /********************************************************** + * Private Function Declaration + *********************************************************/ + + friend AppTask & GetAppTask(void); + + /** + * @brief AppTask initialisation function + * + * @return CHIP_ERROR + */ + CHIP_ERROR Init(); + + /** + * @brief Function called to start the function timer + * + * @param aTimeoutMs timer duration in ms + */ + void StartFunctionTimer(uint32_t aTimeoutMs); + + /** + * @brief Function to stop function timer + */ + void CancelFunctionTimer(void); + + /** + * @brief Function call event callback function for processing + * + * @param event triggered event to be processed + */ + void DispatchEvent(AppEvent * event); + + /** + * @brief Function Timer finished callback function + * Post an FunctionEventHandler event + * + * @param xTimer timer that finished + */ + static void FunctionTimerEventHandler(TimerHandle_t xTimer); + + /** + * @brief Timer Event processing function + * Trigger factory if Press and Hold duration is respected + * + * @param aEvent post event being processed + */ + static void FunctionEventHandler(AppEvent * aEvent); + + /** + * @brief PB0 Button event processing function + * Press and hold will trigger a factory reset timer start + * Press and release will restart BLEAdvertising if not commisionned + * + * @param aEvent button event being processed + */ + static void ButtonHandler(AppEvent * aEvent); + + /** + * @brief PB1 Button event processing function + * Function triggers a thermostat action sent to the CHIP task + * + * @param aEvent button event being processed + */ + static void ThermostatActionEventHandler(AppEvent * aEvent); + + /** + * @brief Light Timer finished callback function + * Calls LED processing function + * + * @param xTimer timer that finished + */ + static void LightTimerEventHandler(TimerHandle_t xTimer); + + /** + * @brief Updates device LEDs + */ + static void LightEventHandler(); + + /********************************************************** + * Private Attributes declaration + *********************************************************/ + + enum Function_t + { + kFunction_NoneSelected = 0, + kFunction_SoftwareUpdate = 0, + kFunction_StartBleAdv = 1, + kFunction_FactoryReset = 2, + + kFunction_Invalid + } Function; + + Function_t mFunction; + bool mFunctionTimerActive; + bool mSyncClusterToButtonAction; + + static AppTask sAppTask; +}; + +inline AppTask & GetAppTask(void) +{ + return AppTask::sAppTask; +} diff --git a/examples/thermostat/efr32/include/CHIPProjectConfig.h b/examples/thermostat/efr32/include/CHIPProjectConfig.h new file mode 100644 index 00000000000000..5904b776cd601d --- /dev/null +++ b/examples/thermostat/efr32/include/CHIPProjectConfig.h @@ -0,0 +1,143 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Example project configuration file for CHIP. + * + * This is a place to put application or project-specific overrides + * to the default configuration values for general CHIP features. + * + */ + +#pragma once + +// Use a default pairing code if one hasn't been provisioned in flash. +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 +#endif + +// For convenience, Chip Security Test Mode can be enabled and the +// requirement for authentication in various protocols can be disabled. +// +// WARNING: These options make it possible to circumvent basic Chip security functionality, +// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. +// +#define CHIP_CONFIG_SECURITY_TEST_MODE 0 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID + * + * 0xFFF1: Test vendor + */ +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID + * + * 0x8005: example lighting app + */ +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8004 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION + * + * The hardware version number assigned to device or product by the device vendor. This + * number is scoped to the device product id, and typically corresponds to a revision of the + * physical device, a change to its packaging, and/or a change to its marketing presentation. + * This value is generally *not* incremented for device software versions. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING + * + * A string identifying the software version running on the device. + * CHIP service currently expects the software version to be in the format + * {MAJOR_VERSION}.0d{MINOR_VERSION} + */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING "0.1ALPHA" +#endif + +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION + * + * A uint32_t identifying the software version running on the device. + */ +/* The SoftwareVersion attribute of the Basic cluster. */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 0x0001 +#endif + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + * + * Enable support for Chip-over-BLE (CHIPoBLE). + */ +#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1 + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC + * + * Enables synchronizing the device's real time clock with a remote Chip Time service + * using the Chip Time Sync protocol. + */ +#define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 0 + +/** + * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER + * + * Enables the use of a hard-coded default serial number if none + * is found in Chip NV storage. + */ +#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN" + +/** + * CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS + * + * Enable recording UTC timestamps. + */ +#define CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1 + +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE + * + * A size, in bytes, of the individual debug event logging buffer. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512) + +/** + * @def CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL + * + * @brief + * Active retransmit interval, or time to wait before retransmission after + * subsequent failures in milliseconds. + * + * This is the default value, that might be adjusted by end device depending on its + * needs (e.g. sleeping period) using Service Discovery TXT record CRA key. + * + */ +#define CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL (2000_ms32) + +#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 diff --git a/examples/thermostat/efr32/src/AppTask.cpp b/examples/thermostat/efr32/src/AppTask.cpp new file mode 100644 index 00000000000000..e972594d078d2d --- /dev/null +++ b/examples/thermostat/efr32/src/AppTask.cpp @@ -0,0 +1,643 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/********************************************************** + * Includes + *********************************************************/ + +#include "AppTask.h" +#include "AppConfig.h" +#include "AppEvent.h" +#include "LEDWidget.h" +#include "sl_simple_led_instances.h" + +#ifdef DISPLAY_ENABLED +#include "lcd.h" +#ifdef QR_CODE_ENABLED +#include "qrcodegen.h" +#endif // QR_CODE_ENABLED +#endif // DISPLAY_ENABLED + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if CHIP_ENABLE_OPENTHREAD +#include +#include +#include +#endif // CHIP_ENABLE_OPENTHREAD + +#ifdef SL_WIFI +#include "wfx_host_events.h" +#include +#include +#endif // SL_WIFI + +/********************************************************** + * Defines and Constants + *********************************************************/ + +#define FACTORY_RESET_TRIGGER_TIMEOUT 3000 +#define FACTORY_RESET_CANCEL_WINDOW_TIMEOUT 3000 +#define APP_TASK_STACK_SIZE (4096) +#define APP_TASK_PRIORITY 2 +#define APP_EVENT_QUEUE_SIZE 10 +#define EXAMPLE_VENDOR_ID 0xcafe + +#define SYSTEM_STATE_LED &sl_led_led0 + +#define APP_FUNCTION_BUTTON &sl_button_btn0 +#define APP_THERMOSTAT &sl_button_btn1 + +using namespace chip; +using namespace ::chip::DeviceLayer; + +namespace { + +/********************************************************** + * Variable declarations + *********************************************************/ + +TimerHandle_t sFunctionTimer; // FreeRTOS app sw timer. +TimerHandle_t sLightTimer; + +TaskHandle_t sAppTaskHandle; +QueueHandle_t sAppEventQueue; + +LEDWidget sStatusLED; + +#ifdef SL_WIFI +app::Clusters::NetworkCommissioning::Instance + sWiFiNetworkCommissioningInstance(0 /* Endpoint Id */, &(NetworkCommissioning::SlWiFiDriver::GetInstance())); +#endif /* SL_WIFI */ + +#if !(defined(CHIP_DEVICE_CONFIG_ENABLE_SED) && CHIP_DEVICE_CONFIG_ENABLE_SED) + +bool sIsProvisioned = false; +bool sIsEnabled = false; +bool sIsAttached = false; +bool sHaveBLEConnections = false; + +#endif // CHIP_DEVICE_CONFIG_ENABLE_SED + +EmberAfIdentifyEffectIdentifier sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; + +uint8_t sAppEventQueueBuffer[APP_EVENT_QUEUE_SIZE * sizeof(AppEvent)]; +StaticQueue_t sAppEventQueueStruct; + +StackType_t appStack[APP_TASK_STACK_SIZE / sizeof(StackType_t)]; +StaticTask_t appTaskStruct; + +/********************************************************** + * Identify Callbacks + *********************************************************/ + +namespace { +void OnTriggerIdentifyEffectCompleted(chip::System::Layer * systemLayer, void * appState) +{ + ChipLogProgress(Zcl, "Trigger Identify Complete"); + sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; + +#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 + GetAppTask().CancelLightTimer(); +#endif +} +} // namespace + +void OnTriggerIdentifyEffect(Identify * identify) +{ + ChipLogProgress(Zcl, "Trigger Identify Effect"); + sIdentifyEffect = identify->mCurrentEffectIdentifier; + + if (identify->mCurrentEffectIdentifier == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) + { + ChipLogProgress(Zcl, "IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE - Not supported, use effect varriant %d", + identify->mEffectVariant); + sIdentifyEffect = static_cast(identify->mEffectVariant); + } + +#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 + GetAppTask().StartLightTimer(); +#endif + + switch (sIdentifyEffect) + { + case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: + case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: + case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: + (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(5), OnTriggerIdentifyEffectCompleted, + identify); + break; + case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: + (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); + (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(1), OnTriggerIdentifyEffectCompleted, + identify); + break; + case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: + (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); + sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; + break; + default: + ChipLogProgress(Zcl, "No identifier effect"); + } +} + +Identify gIdentify = { + chip::EndpointId{ 1 }, GetAppTask().OnIdentifyStart, + GetAppTask().OnIdentifyStop, EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + OnTriggerIdentifyEffect, +}; + +} // namespace + +using namespace chip::TLV; +using namespace ::chip::DeviceLayer; + +/********************************************************** + * AppTask Definitions + *********************************************************/ + +AppTask AppTask::sAppTask; + +CHIP_ERROR AppTask::StartAppTask() +{ + sAppEventQueue = xQueueCreateStatic(APP_EVENT_QUEUE_SIZE, sizeof(AppEvent), sAppEventQueueBuffer, &sAppEventQueueStruct); + if (sAppEventQueue == NULL) + { + EFR32_LOG("Failed to allocate app event queue"); + appError(APP_ERROR_EVENT_QUEUE_FAILED); + } + + // Start App task. + sAppTaskHandle = xTaskCreateStatic(AppTaskMain, APP_TASK_NAME, ArraySize(appStack), NULL, 1, appStack, &appTaskStruct); + if (sAppTaskHandle == nullptr) + { + EFR32_LOG("Failed to create app task"); + appError(APP_ERROR_CREATE_TASK_FAILED); + } + return CHIP_NO_ERROR; +} + +CHIP_ERROR AppTask::Init() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + +#ifdef SL_WIFI + /* + * Wait for the WiFi to be initialized + */ + EFR32_LOG("APP: Wait WiFi Init"); + while (!wfx_hw_ready()) + { + vTaskDelay(10); + } + EFR32_LOG("APP: Done WiFi Init"); + /* We will init server when we get IP */ + + sWiFiNetworkCommissioningInstance.Init(); +#endif + + // Create FreeRTOS sw timer for Function Selection. + sFunctionTimer = xTimerCreate("FnTmr", // Just a text name, not used by the RTOS kernel + 1, // == default timer period (mS) + false, // no timer reload (==one-shot) + (void *) this, // init timer id = app task obj context + FunctionTimerEventHandler // timer callback handler + ); + if (sFunctionTimer == NULL) + { + EFR32_LOG("funct timer create failed"); + appError(APP_ERROR_CREATE_TIMER_FAILED); + } + + // Create FreeRTOS sw timer for LED Management. + sLightTimer = xTimerCreate("LightTmr", // Text Name + 10, // Default timer period (mS) + true, // reload timer + (void *) this, // Timer Id + LightTimerEventHandler // Timer callback handler + ); + if (sLightTimer == NULL) + { + EFR32_LOG("Light Timer create failed"); + appError(APP_ERROR_CREATE_TIMER_FAILED); + } + + EFR32_LOG("Current Software Version: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + + LEDWidget::InitGpio(); + sStatusLED.Init(SYSTEM_STATE_LED); + + ConfigurationMgr().LogDeviceConfig(); + +// Print setup info on LCD if available +#ifdef QR_CODE_ENABLED + // Create buffer for QR code that can fit max size and null terminator. + char qrCodeBuffer[chip::QRCodeBasicSetupPayloadGenerator::kMaxQRCodeBase38RepresentationLength + 1]; + chip::MutableCharSpan QRCode(qrCodeBuffer); + + if (GetQRCode(QRCode, chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE)) == CHIP_NO_ERROR) + { + LCDWriteQRCode((uint8_t *) QRCode.data()); + } + else + { + EFR32_LOG("Getting QR code failed!"); + } +#else + PrintOnboardingCodes(chip::RendezvousInformationFlag(chip::RendezvousInformationFlag::kBLE)); +#endif // QR_CODE_ENABLED + + return err; +} + +void AppTask::AppTaskMain(void * pvParameter) +{ + AppEvent event; + + CHIP_ERROR err = sAppTask.Init(); + if (err != CHIP_NO_ERROR) + { + EFR32_LOG("AppTask.Init() failed"); + appError(err); + } + +#if !(defined(CHIP_DEVICE_CONFIG_ENABLE_SED) && CHIP_DEVICE_CONFIG_ENABLE_SED) + sAppTask.StartLightTimer(); +#endif + + EFR32_LOG("App Task started"); + while (true) + { + BaseType_t eventReceived = xQueueReceive(sAppEventQueue, &event, portMAX_DELAY); + while (eventReceived == pdTRUE) + { + sAppTask.DispatchEvent(&event); + eventReceived = xQueueReceive(sAppEventQueue, &event, 0); + } + } +} + +void AppTask::OnIdentifyStart(Identify * identify) +{ + ChipLogProgress(Zcl, "onIdentifyStart"); + +#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 + sAppTask.StartLightTimer(); +#endif // CHIP_DEVICE_CONFIG_ENABLE_SED +} + +void AppTask::OnIdentifyStop(Identify * identify) +{ + ChipLogProgress(Zcl, "onIdentifyStop"); + +#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 + sAppTask.CancelLightTimer(); +#endif // CHIP_DEVICE_CONFIG_ENABLE_SED +} + +void AppTask::ThermostatActionEventHandler(AppEvent * aEvent) +{ + if (aEvent->Type == AppEvent::kEventType_Button) + { + EFR32_LOG("App Button was pressed!"); + // TODO: Implement button functionnality + } +} + +void AppTask::ButtonEventHandler(const sl_button_t * buttonHandle, uint8_t btnAction) +{ + if (buttonHandle == NULL) + { + return; + } + + AppEvent button_event = {}; + button_event.Type = AppEvent::kEventType_Button; + button_event.ButtonEvent.Action = btnAction; + + if (buttonHandle == APP_THERMOSTAT && btnAction == SL_SIMPLE_BUTTON_PRESSED) + { + button_event.Handler = ThermostatActionEventHandler; + sAppTask.PostEvent(&button_event); + } + else if (buttonHandle == APP_FUNCTION_BUTTON) + { + button_event.Handler = ButtonHandler; + sAppTask.PostEvent(&button_event); + } +} + +void AppTask::FunctionTimerEventHandler(TimerHandle_t xTimer) +{ + AppEvent event; + event.Type = AppEvent::kEventType_Timer; + event.TimerEvent.Context = (void *) xTimer; + event.Handler = FunctionEventHandler; + sAppTask.PostEvent(&event); +} + +void AppTask::LightTimerEventHandler(TimerHandle_t xTimer) +{ + sAppTask.LightEventHandler(); +} + +void AppTask::FunctionEventHandler(AppEvent * aEvent) +{ + if (aEvent->Type != AppEvent::kEventType_Timer) + { + return; + } + + // If we reached here, the button was held past FACTORY_RESET_TRIGGER_TIMEOUT, + // initiate factory reset + if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_StartBleAdv) + { + EFR32_LOG("Factory Reset Triggered. Release button within %ums to cancel.", FACTORY_RESET_CANCEL_WINDOW_TIMEOUT); + + // Start timer for FACTORY_RESET_CANCEL_WINDOW_TIMEOUT to allow user to + // cancel, if required. + sAppTask.StartFunctionTimer(FACTORY_RESET_CANCEL_WINDOW_TIMEOUT); + +#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 + sAppTask.StartLightTimer(); +#endif // CHIP_DEVICE_CONFIG_ENABLE_SED + + sAppTask.mFunction = kFunction_FactoryReset; + + // Turn off all LEDs before starting blink to make sure blink is + // co-ordinated. + sStatusLED.Set(false); + sStatusLED.Blink(500); + } + else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_FactoryReset) + { + // Actually trigger Factory Reset + sAppTask.mFunction = kFunction_NoneSelected; + +#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 + sAppTask.CancelLightTimer(); +#endif // CHIP_DEVICE_CONFIG_ENABLE_SED + + chip::Server::GetInstance().ScheduleFactoryReset(); + } +} + +void AppTask::LightEventHandler() +{ + // Collect connectivity and configuration state from the CHIP stack. Because + // the CHIP event loop is being run in a separate task, the stack must be + // locked while these values are queried. However we use a non-blocking + // lock request (TryLockCHIPStack()) to avoid blocking other UI activities + // when the CHIP task is busy (e.g. with a long crypto operation). +#if !(defined(CHIP_DEVICE_CONFIG_ENABLE_SED) && CHIP_DEVICE_CONFIG_ENABLE_SED) + if (PlatformMgr().TryLockChipStack()) + { +#ifdef SL_WIFI + sIsProvisioned = ConnectivityMgr().IsWiFiStationProvisioned(); + sIsEnabled = ConnectivityMgr().IsWiFiStationEnabled(); + sIsAttached = ConnectivityMgr().IsWiFiStationConnected(); +#endif /* SL_WIFI */ +#if CHIP_ENABLE_OPENTHREAD + sIsProvisioned = ConnectivityMgr().IsThreadProvisioned(); + sIsEnabled = ConnectivityMgr().IsThreadEnabled(); + sIsAttached = ConnectivityMgr().IsThreadAttached(); +#endif /* CHIP_ENABLE_OPENTHREAD */ + sHaveBLEConnections = (ConnectivityMgr().NumBLEConnections() != 0); + PlatformMgr().UnlockChipStack(); + } +#endif // CHIP_DEVICE_CONFIG_ENABLE_SED + + // Update the status LED if factory reset has not been initiated. + // + // If system has "full connectivity", keep the LED On constantly. + // + // If thread and service provisioned, but not attached to the thread network + // yet OR no connectivity to the service OR subscriptions are not fully + // established THEN blink the LED Off for a short period of time. + // + // If the system has ble connection(s) uptill the stage above, THEN blink + // the LEDs at an even rate of 100ms. + // + // Otherwise, blink the LED ON for a very short time. + if (sAppTask.mFunction != kFunction_FactoryReset) + { + if (gIdentify.mActive) + { + sStatusLED.Blink(250, 250); + } + else if (sIdentifyEffect != EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT) + { + if (sIdentifyEffect == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK) + { + sStatusLED.Blink(50, 50); + } + if (sIdentifyEffect == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE) + { + sStatusLED.Blink(1000, 1000); + } + if (sIdentifyEffect == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY) + { + sStatusLED.Blink(300, 700); + } + } +#if !(defined(CHIP_DEVICE_CONFIG_ENABLE_SED) && CHIP_DEVICE_CONFIG_ENABLE_SED) + else if (sIsProvisioned && sIsEnabled) + { + if (sIsAttached) + { + sStatusLED.Set(true); + } + else + { + sStatusLED.Blink(950, 50); + } + } + else if (sHaveBLEConnections) + { + sStatusLED.Blink(100, 100); + } + else + { + sStatusLED.Blink(50, 950); + } +#endif // CHIP_DEVICE_CONFIG_ENABLE_SED + } + + sStatusLED.Animate(); +} + +void AppTask::ButtonHandler(AppEvent * aEvent) +{ + // To trigger software update: press the APP_FUNCTION_BUTTON button briefly (< + // FACTORY_RESET_TRIGGER_TIMEOUT) To initiate factory reset: press the + // APP_FUNCTION_BUTTON for FACTORY_RESET_TRIGGER_TIMEOUT + + // FACTORY_RESET_CANCEL_WINDOW_TIMEOUT All LEDs start blinking after + // FACTORY_RESET_TRIGGER_TIMEOUT to signal factory reset has been initiated. + // To cancel factory reset: release the APP_FUNCTION_BUTTON once all LEDs + // start blinking within the FACTORY_RESET_CANCEL_WINDOW_TIMEOUT + if (aEvent->ButtonEvent.Action == SL_SIMPLE_BUTTON_PRESSED) + { + if (!sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_NoneSelected) + { + sAppTask.StartFunctionTimer(FACTORY_RESET_TRIGGER_TIMEOUT); + sAppTask.mFunction = kFunction_StartBleAdv; + } + } + else + { + // If the button was released before factory reset got initiated, start BLE advertissement in fast mode + if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_StartBleAdv) + { + sAppTask.CancelFunctionTimer(); + sAppTask.mFunction = kFunction_NoneSelected; + +#ifdef SL_WIFI + if (!ConnectivityMgr().IsWiFiStationProvisioned()) +#else + if (!ConnectivityMgr().IsThreadProvisioned()) +#endif /* !SL_WIFI */ + { + // Enable BLE advertisements + ConnectivityMgr().SetBLEAdvertisingEnabled(true); + ConnectivityMgr().SetBLEAdvertisingMode(ConnectivityMgr().kFastAdvertising); + } + else { EFR32_LOG("Network is already provisioned, Ble advertissement not enabled"); } + } + else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_FactoryReset) + { + sAppTask.CancelFunctionTimer(); + +#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 + sAppTask.CancelLightTimer(); +#endif + + // Change the function to none selected since factory reset has been + // canceled. + sAppTask.mFunction = kFunction_NoneSelected; + EFR32_LOG("Factory Reset has been Canceled"); + } + } +} + +void AppTask::CancelFunctionTimer() +{ + if (xTimerStop(sFunctionTimer, 0) == pdFAIL) + { + EFR32_LOG("app timer stop() failed"); + appError(APP_ERROR_STOP_TIMER_FAILED); + } + + mFunctionTimerActive = false; +} + +void AppTask::CancelLightTimer() +{ + sStatusLED.Set(false); + if (xTimerStop(sLightTimer, 100) != pdPASS) + { + EFR32_LOG("Light Time start failed"); + appError(APP_ERROR_START_TIMER_FAILED); + } +} + +void AppTask::StartFunctionTimer(uint32_t aTimeoutInMs) +{ + if (xTimerIsTimerActive(sFunctionTimer)) + { + EFR32_LOG("app timer already started!"); + CancelFunctionTimer(); + } + + // timer is not active, change its period to required value (== restart). + // FreeRTOS- Block for a maximum of 100 ticks if the change period command + // cannot immediately be sent to the timer command queue. + if (xTimerChangePeriod(sFunctionTimer, aTimeoutInMs / portTICK_PERIOD_MS, 100) != pdPASS) + { + EFR32_LOG("app timer start() failed"); + appError(APP_ERROR_START_TIMER_FAILED); + } + + mFunctionTimerActive = true; +} + +void AppTask::StartLightTimer() +{ + if (pdPASS != xTimerStart(sLightTimer, 0)) + { + EFR32_LOG("Light Time start failed"); + appError(APP_ERROR_START_TIMER_FAILED); + } +} + +void AppTask::PostEvent(const AppEvent * aEvent) +{ + if (sAppEventQueue != NULL) + { + BaseType_t status; + if (xPortIsInsideInterrupt()) + { + BaseType_t higherPrioTaskWoken = pdFALSE; + status = xQueueSendFromISR(sAppEventQueue, aEvent, &higherPrioTaskWoken); + +#ifdef portYIELD_FROM_ISR + portYIELD_FROM_ISR(higherPrioTaskWoken); +#elif portEND_SWITCHING_ISR // portYIELD_FROM_ISR or portEND_SWITCHING_ISR + portEND_SWITCHING_ISR(higherPrioTaskWoken); +#else // portYIELD_FROM_ISR or portEND_SWITCHING_ISR +#error "Must have portYIELD_FROM_ISR or portEND_SWITCHING_ISR" +#endif // portYIELD_FROM_ISR or portEND_SWITCHING_ISR + } + else + { + status = xQueueSend(sAppEventQueue, aEvent, 1); + } + + if (!status) + { + EFR32_LOG("Failed to post event to app task event queue"); + } + } + else + { + EFR32_LOG("Event Queue is NULL should never happen"); + } +} + +void AppTask::DispatchEvent(AppEvent * aEvent) +{ + if (aEvent->Handler) + { + aEvent->Handler(aEvent); + } + else + { + EFR32_LOG("Event received with no handler. Dropping event."); + } +} diff --git a/examples/thermostat/efr32/src/ZclCallbacks.cpp b/examples/thermostat/efr32/src/ZclCallbacks.cpp new file mode 100644 index 00000000000000..f89d4aaa8cd581 --- /dev/null +++ b/examples/thermostat/efr32/src/ZclCallbacks.cpp @@ -0,0 +1,65 @@ +/* + * + * 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. + */ + +/** + * @file + * This file implements the handler for data model messages. + */ + +#include "AppConfig.h" + +#include +#include +#include +#include + +using namespace ::chip; +using namespace ::chip::app::Clusters; + +void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, + uint8_t * value) +{ + ClusterId clusterId = attributePath.mClusterId; + AttributeId attributeId = attributePath.mAttributeId; + ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); + + if (clusterId == Identify::Id) + { + ChipLogProgress(Zcl, "Identify attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", + ChipLogValueMEI(attributeId), type, *value, size); + } +} + +/** @brief OnOff Cluster Init + * + * This function is called when a specific cluster is initialized. It gives the + * application an opportunity to take care of cluster initialization procedures. + * It is called exactly once for each endpoint where cluster is present. + * + * @param endpoint Ver.: always + * + * TODO Issue #3841 + * emberAfOnOffClusterInitCallback happens before the stack initialize the cluster + * attributes to the default value. + * The logic here expects something similar to the deprecated Plugins callback + * emberAfPluginOnOffClusterServerPostInitCallback. + * + */ +void emberAfOnOffClusterInitCallback(EndpointId endpoint) +{ + // TODO: implement any additional Cluster Server init actions +} diff --git a/examples/thermostat/efr32/src/main.cpp b/examples/thermostat/efr32/src/main.cpp new file mode 100644 index 00000000000000..e06d3c4a520416 --- /dev/null +++ b/examples/thermostat/efr32/src/main.cpp @@ -0,0 +1,84 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include "AppConfig.h" +#include "init_efrPlatform.h" +#include "sl_simple_button_instances.h" +#include "sl_system_kernel.h" +#include +#include +#include +#include +#ifdef EFR32_ATTESTATION_CREDENTIALS +#include +#else +#include +#endif + +#define BLE_DEV_NAME "SiLabs-Thermostat" +using namespace ::chip; +using namespace ::chip::Inet; +using namespace ::chip::DeviceLayer; +using namespace ::chip::Credentials; + +#define UNUSED_PARAMETER(a) (a = a) + +volatile int apperror_cnt; +static chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; + +// ================================================================================ +// Main Code +// ================================================================================ +int main(void) +{ + init_efrPlatform(); + if (EFR32MatterConfig::InitMatter(BLE_DEV_NAME) != CHIP_NO_ERROR) + appError(CHIP_ERROR_INTERNAL); + + gExampleDeviceInfoProvider.SetStorageDelegate(&Server::GetInstance().GetPersistentStorage()); + chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); + + chip::DeviceLayer::PlatformMgr().LockChipStack(); + // Initialize device attestation config +#ifdef EFR32_ATTESTATION_CREDENTIALS + SetDeviceAttestationCredentialsProvider(EFR32::GetEFR32DacProvider()); +#else + SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); +#endif + chip::DeviceLayer::PlatformMgr().UnlockChipStack(); + + EFR32_LOG("Starting App Task"); + if (GetAppTask().StartAppTask() != CHIP_NO_ERROR) + appError(CHIP_ERROR_INTERNAL); + + EFR32_LOG("Starting FreeRTOS scheduler"); + sl_system_kernel_start(); + + // Should never get here. + chip::Platform::MemoryShutdown(); + EFR32_LOG("vTaskStartScheduler() failed"); + appError(CHIP_ERROR_INTERNAL); +} + +void sl_button_on_change(const sl_button_t * handle) +{ + GetAppTask().ButtonEventHandler(handle, sl_button_get_state(handle)); +} diff --git a/examples/thermostat/efr32/third_party/connectedhomeip b/examples/thermostat/efr32/third_party/connectedhomeip new file mode 120000 index 00000000000000..c866b86874994d --- /dev/null +++ b/examples/thermostat/efr32/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../.. \ No newline at end of file diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 9dedf82c5c8911..c672a742dfdd51 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -317,7 +317,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -325,7 +325,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -352,6 +352,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -382,7 +383,7 @@ server cluster Basic = 40 { readonly attribute int16u clusterRevision = 65533; } -server cluster OtaSoftwareUpdateProvider = 41 { +client cluster OtaSoftwareUpdateProvider = 41 { enum OTAApplyUpdateAction : ENUM8 { kProceed = 0; kAwaitNextAction = 1; @@ -448,6 +449,76 @@ server cluster OtaSoftwareUpdateProvider = 41 { command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; } +server cluster OtaSoftwareUpdateRequestor = 42 { + enum OTAAnnouncementReason : ENUM8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum OTAChangeReasonEnum : ENUM8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum OTAUpdateStateEnum : ENUM8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + struct ProviderLocation { + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + fabric_idx fabricIndex = 254; + } + + info event StateTransition = 0 { + OTAUpdateStateEnum previousState = 0; + OTAUpdateStateEnum newState = 1; + OTAChangeReasonEnum reason = 2; + nullable INT32U targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + INT32U softwareVersion = 0; + INT16U productID = 1; + } + + info event DownloadError = 2 { + INT32U softwareVersion = 0; + INT64U bytesDownloaded = 1; + nullable INT8U progressPercent = 2; + nullable INT64S platformCode = 3; + } + + attribute ProviderLocation defaultOtaProviders[] = 0; + readonly attribute boolean updatePossible = 1; + readonly attribute OTAUpdateStateEnum updateState = 2; + readonly attribute nullable int8u updateStateProgress = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AnnounceOtaProviderRequest { + node_id providerNodeId = 0; + vendor_id vendorId = 1; + OTAAnnouncementReason announcementReason = 2; + optional OCTET_STRING metadataForNode = 3; + endpoint_no endpoint = 4; + } + + command AnnounceOtaProvider(AnnounceOtaProviderRequest): DefaultSuccess = 0; +} + server cluster LocalizationConfiguration = 43 { attribute char_string<35> activeLocale = 0; readonly attribute CHAR_STRING supportedLocales[] = 1; @@ -821,7 +892,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1160,7 +1231,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1384,6 +1455,7 @@ server cluster Thermostat = 513 { endpoint 0 { device type rootdevice = 22; + binding cluster OtaSoftwareUpdateProvider; server cluster Identify { ram attribute identifyTime; @@ -1442,7 +1514,11 @@ endpoint 0 { ram attribute clusterRevision default = 1; } - server cluster OtaSoftwareUpdateProvider { + server cluster OtaSoftwareUpdateRequestor { + callback attribute defaultOtaProviders; + ram attribute updatePossible default = 1; + ram attribute updateState; + ram attribute updateStateProgress; ram attribute featureMap; ram attribute clusterRevision default = 1; } diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 9edc45595ef358..fb63b21736f0c1 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -1,5 +1,5 @@ { - "featureLevel": 71, + "featureLevel": 76, "creator": "zap", "keyValuePairs": [ { @@ -19,14 +19,16 @@ { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl.json", - "version": "ZCL Test Data", - "type": "zcl-properties" + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/app-templates.json", - "version": "chip-v1", - "type": "gen-templates-json" + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ @@ -79,7 +81,6 @@ "define": "IDENTIFY_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "identify time", @@ -582,7 +583,6 @@ "define": "ON_OFF_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "OnOff", @@ -717,7 +717,6 @@ "define": "LEVEL_CONTROL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "current level", @@ -760,7 +759,6 @@ "define": "DESCRIPTOR_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -787,7 +785,6 @@ "define": "DESCRIPTOR_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "device list", @@ -894,7 +891,6 @@ "define": "BINDING_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -921,7 +917,6 @@ "define": "BINDING_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "Binding", @@ -979,9 +974,7 @@ "mfgCode": null, "define": "ACCESS_CONTROL_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Access Control", @@ -990,7 +983,6 @@ "define": "ACCESS_CONTROL_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "ACL", @@ -1129,7 +1121,6 @@ "define": "BASIC_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -1156,7 +1147,6 @@ "define": "BASIC_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "DataModelRevision", @@ -1518,7 +1508,7 @@ "mfgCode": null, "define": "OTA_PROVIDER_CLUSTER", "side": "client", - "enabled": 0, + "enabled": 1, "commands": [ { "name": "QueryImage", @@ -1542,7 +1532,7 @@ "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 0 + "outgoing": 1 } ], "attributes": [ @@ -1570,14 +1560,14 @@ "mfgCode": null, "define": "OTA_PROVIDER_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "QueryImageResponse", "code": 1, "mfgCode": null, "source": "server", - "incoming": 0, + "incoming": 1, "outgoing": 1 }, { @@ -1624,15 +1614,219 @@ } ] }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_REQUESTOR_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AnnounceOtaProvider", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_REQUESTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DefaultOtaProviders", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdatePossible", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdateState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OTAUpdateStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdateStateProgress", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Localization Configuration", "code": 43, "mfgCode": null, "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Localization Configuration", @@ -1641,7 +1835,6 @@ "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "ActiveLocale", @@ -1715,9 +1908,7 @@ "mfgCode": null, "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Time Format Localization", @@ -1726,7 +1917,6 @@ "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "HourFormat", @@ -1816,9 +2006,7 @@ "mfgCode": null, "define": "UNIT_LOCALIZATION_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Unit Localization", @@ -1827,7 +2015,6 @@ "define": "UNIT_LOCALIZATION_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "TemperatureUnit", @@ -2410,7 +2597,6 @@ "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -2669,7 +2855,6 @@ "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "ThreadMetrics", @@ -2776,7 +2961,6 @@ "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "channel", @@ -3827,7 +4011,6 @@ "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -3854,7 +4037,6 @@ "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "bssid", @@ -4141,7 +4323,6 @@ "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "PHYRate", @@ -4328,7 +4509,6 @@ "define": "SWITCH_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -4355,7 +4535,6 @@ "define": "SWITCH_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "number of positions", @@ -4482,7 +4661,6 @@ "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "WindowStatus", @@ -4837,7 +5015,6 @@ "define": "GROUP_KEY_MANAGEMENT_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -4864,7 +5041,6 @@ "define": "GROUP_KEY_MANAGEMENT_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "GroupKeyMap", @@ -4938,9 +5114,7 @@ "mfgCode": null, "define": "FIXED_LABEL_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "Fixed Label", @@ -4949,7 +5123,6 @@ "define": "FIXED_LABEL_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "label list", @@ -5007,9 +5180,7 @@ "mfgCode": null, "define": "USER_LABEL_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] + "enabled": 0 }, { "name": "User Label", @@ -5018,7 +5189,6 @@ "define": "USER_LABEL_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "label list", @@ -5201,7 +5371,6 @@ "define": "DOOR_LOCK_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "LockState", @@ -5560,7 +5729,6 @@ "define": "BARRIER_CONTROL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "barrier moving state", @@ -5791,7 +5959,6 @@ "define": "COLOR_CONTROL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "CurrentHue", @@ -6618,7 +6785,6 @@ "define": "TEMP_MEASUREMENT_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -6645,7 +6811,6 @@ "define": "TEMP_MEASUREMENT_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "MeasuredValue", @@ -6736,7 +6901,6 @@ "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -6763,7 +6927,6 @@ "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "measured value", @@ -6847,166 +7010,6 @@ } ] }, - { - "name": "IAS Zone", - "code": 1280, - "mfgCode": null, - "define": "IAS_ZONE_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ZoneEnrollResponse", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "IAS Zone", - "code": 1280, - "mfgCode": null, - "define": "IAS_ZONE_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "ZoneStatusChangeNotification", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ZoneEnrollRequest", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "zone state", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "enum8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "zone type", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "enum16", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "zone status", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "bitmap16", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "IAS CIE address", - "code": 16, - "mfgCode": null, - "side": "server", - "type": "node_id", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Zone ID", - "code": 17, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xff", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Test Cluster", "code": 4294048773, @@ -7450,7 +7453,6 @@ "define": "IDENTIFY_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "identify time", @@ -8001,7 +8003,6 @@ "define": "ON_OFF_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "OnOff", @@ -8216,7 +8217,6 @@ "define": "LEVEL_CONTROL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "current level", @@ -8467,7 +8467,6 @@ "define": "BINARY_INPUT_BASIC_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -8494,7 +8493,6 @@ "define": "BINARY_INPUT_BASIC_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "out of service", @@ -8569,7 +8567,6 @@ "define": "DESCRIPTOR_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -8596,7 +8593,6 @@ "define": "DESCRIPTOR_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "device list", @@ -8687,7 +8683,6 @@ "define": "BINDING_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -8714,7 +8709,6 @@ "define": "BINDING_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "Binding", @@ -8757,7 +8751,6 @@ "define": "BASIC_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -8784,7 +8777,6 @@ "define": "BASIC_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "DataModelRevision", @@ -9227,7 +9219,6 @@ "define": "OTA_REQUESTOR_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -9254,7 +9245,6 @@ "define": "OTA_REQUESTOR_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -9537,7 +9527,6 @@ "define": "SWITCH_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -9564,7 +9553,6 @@ "define": "SWITCH_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "number of positions", @@ -9639,7 +9627,6 @@ "define": "GROUP_KEY_MANAGEMENT_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -9666,7 +9653,6 @@ "define": "GROUP_KEY_MANAGEMENT_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "GroupKeyMap", @@ -9725,7 +9711,6 @@ "define": "FIXED_LABEL_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -9752,7 +9737,6 @@ "define": "FIXED_LABEL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "label list", @@ -9919,7 +9903,6 @@ "define": "DOOR_LOCK_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "LockState", @@ -10318,7 +10301,6 @@ "define": "WINDOW_COVERING_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "Type", @@ -10421,7 +10403,7 @@ "code": 10, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "OperationalStatus", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -10597,7 +10579,7 @@ "code": 26, "mfgCode": null, "side": "server", - "type": "bitmap16", + "type": "SafetyStatus", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -10677,7 +10659,6 @@ "define": "BARRIER_CONTROL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "barrier moving state", @@ -10768,7 +10749,6 @@ "define": "PUMP_CONFIG_CONTROL_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -10795,7 +10775,6 @@ "define": "PUMP_CONFIG_CONTROL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "MaxPressure", @@ -11506,7 +11485,6 @@ "define": "COLOR_CONTROL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "CurrentHue", @@ -12333,7 +12311,6 @@ "define": "TEMP_MEASUREMENT_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -12360,7 +12337,6 @@ "define": "TEMP_MEASUREMENT_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "MeasuredValue", @@ -12451,7 +12427,6 @@ "define": "PRESSURE_MEASUREMENT_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -12478,7 +12453,6 @@ "define": "PRESSURE_MEASUREMENT_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "MeasuredValue", @@ -12601,7 +12575,6 @@ "define": "FLOW_MEASUREMENT_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -12628,7 +12601,6 @@ "define": "FLOW_MEASUREMENT_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "MeasuredValue", @@ -12703,7 +12675,6 @@ "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -12730,7 +12701,6 @@ "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "measured value", @@ -12814,166 +12784,6 @@ } ] }, - { - "name": "IAS Zone", - "code": 1280, - "mfgCode": null, - "define": "IAS_ZONE_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ZoneEnrollResponse", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "IAS Zone", - "code": 1280, - "mfgCode": null, - "define": "IAS_ZONE_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "ZoneStatusChangeNotification", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "ZoneEnrollRequest", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "zone state", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "enum8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "zone type", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "enum16", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "zone status", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "bitmap16", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "IAS CIE address", - "code": 16, - "mfgCode": null, - "side": "server", - "type": "node_id", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Zone ID", - "code": 17, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xff", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Wake on LAN", "code": 1283, @@ -12981,7 +12791,6 @@ "define": "WAKE_ON_LAN_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -13008,7 +12817,6 @@ "define": "WAKE_ON_LAN_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "MACAddress", @@ -13095,7 +12903,6 @@ "define": "CHANNEL_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "ChannelList", @@ -13206,7 +13013,6 @@ "define": "TARGET_NAVIGATOR_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "TargetList", @@ -13357,7 +13163,6 @@ "define": "MEDIA_PLAYBACK_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -13444,7 +13249,6 @@ "define": "MEDIA_INPUT_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "InputList", @@ -13523,7 +13327,6 @@ "define": "LOW_POWER_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -13586,7 +13389,6 @@ "define": "KEYPAD_INPUT_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -13657,7 +13459,6 @@ "define": "CONTENT_LAUNCH_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "AcceptHeader", @@ -13760,7 +13561,6 @@ "define": "AUDIO_OUTPUT_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "OutputList", @@ -13839,7 +13639,6 @@ "define": "APPLICATION_LAUNCHER_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "CatalogList", @@ -13882,7 +13681,6 @@ "define": "APPLICATION_BASIC_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -13909,7 +13707,6 @@ "define": "APPLICATION_BASIC_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "VendorName", @@ -14068,7 +13865,6 @@ "define": "ACCOUNT_LOGIN_CLUSTER", "side": "server", "enabled": 0, - "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -14510,5 +14306,6 @@ "endpointVersion": 1, "deviceIdentifier": 769 } - ] -} + ], + "log": [] +} \ No newline at end of file diff --git a/examples/tv-app/android/java/AppImpl.cpp b/examples/tv-app/android/java/AppImpl.cpp index 90e88c86f3cd09..731a8d8fb50107 100644 --- a/examples/tv-app/android/java/AppImpl.cpp +++ b/examples/tv-app/android/java/AppImpl.cpp @@ -93,6 +93,11 @@ class MyPostCommissioningListener : public PostCommissioningListener MyPostCommissioningListener gMyPostCommissioningListener; ContentAppFactoryImpl gFactory; +ContentAppFactoryImpl * GetContentAppFactoryImpl() +{ + return &gFactory; +} + namespace chip { namespace AppPlatform { @@ -412,6 +417,24 @@ void ContentAppFactoryImpl::SendTestMessage(EndpointId epId, const char * messag } } +void ContentAppFactoryImpl::AddAdminVendorId(uint16_t vendorId) +{ + mAdminVendorIds.push_back(vendorId); +} + +Access::Privilege ContentAppFactoryImpl::GetVendorPrivilege(uint16_t vendorId) +{ + for (size_t i = 0; i < mAdminVendorIds.size(); ++i) + { + auto & vendor = mAdminVendorIds.at(i); + if (vendorId == vendor) + { + return Access::Privilege::kAdminister; + } + } + return Access::Privilege::kOperate; +} + } // namespace AppPlatform } // namespace chip @@ -448,6 +471,12 @@ CHIP_ERROR InitVideoPlayerPlatform(JNIMyUserPrompter * userPrompter, jobject con ChipLogProgress(AppServer, "Started commissioner"); #endif // CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE + + // Disable last fixed endpoint, which is used as a placeholder for all of the + // supported clusters so that ZAP will generated the requisite code. + ChipLogDetail(DeviceLayer, "TV App: Disabling Fixed Content App Endpoints"); + emberAfEndpointEnableDisable(3, false); + return CHIP_NO_ERROR; } diff --git a/examples/tv-app/android/java/AppImpl.h b/examples/tv-app/android/java/AppImpl.h index 6a5f919224ef0d..de3bbd6b5267af 100644 --- a/examples/tv-app/android/java/AppImpl.h +++ b/examples/tv-app/android/java/AppImpl.h @@ -142,6 +142,14 @@ class DLL_EXPORT ContentAppFactoryImpl : public ContentAppFactory // and then writes it to destinationApp CHIP_ERROR ConvertToPlatformCatalogVendorApp(const CatalogVendorApp & sourceApp, CatalogVendorApp * destinationApp) override; + // Get the privilege this vendorId should have on endpoints 1, 2, and content app endpoints + // In the case of casting video clients, this should usually be Access::Privilege::kOperate + // and for voice agents, this may be Access::Privilege::kAdminister + // When a vendor has admin privileges, it will get access to all clusters on ep1 + Access::Privilege GetVendorPrivilege(uint16_t vendorId) override; + + void AddAdminVendorId(uint16_t vendorId); + protected: std::vector mContentApps{ new ContentAppImpl("Vendor1", 1, "exampleid", 11, "Version1", "20202021", nullptr), @@ -149,9 +157,13 @@ class DLL_EXPORT ContentAppFactoryImpl : public ContentAppFactory new ContentAppImpl("Vendor3", 9050, "App3", 22, "Version3", "20202021", nullptr), new ContentAppImpl("TestSuiteVendor", 1111, "applicationId", 22, "v2", "20202021", nullptr) }; + + std::vector mAdminVendorIds{}; }; } // namespace AppPlatform } // namespace chip +chip::AppPlatform::ContentAppFactoryImpl * GetContentAppFactoryImpl(); + #endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED diff --git a/examples/tv-app/android/java/MediaPlaybackManager.cpp b/examples/tv-app/android/java/MediaPlaybackManager.cpp index 0bc9244b7b3d50..1c5fac5c2522ba 100644 --- a/examples/tv-app/android/java/MediaPlaybackManager.cpp +++ b/examples/tv-app/android/java/MediaPlaybackManager.cpp @@ -173,7 +173,7 @@ void MediaPlaybackManager::InitializeWithObjects(jobject managerObject) } mGetPositionMethod = - env->GetMethodID(mMediaPlaybackManagerClass, "getPosition", "()[Lcom/matter/tv/server/tvapp/MediaPlaybackPosition;"); + env->GetMethodID(mMediaPlaybackManagerClass, "getPosition", "()Lcom/matter/tv/server/tvapp/MediaPlaybackPosition;"); if (mGetPositionMethod == nullptr) { ChipLogError(Zcl, "Failed to access MediaPlaybackManager 'getPosition' method"); diff --git a/examples/tv-app/linux/AppImpl.cpp b/examples/tv-app/linux/AppImpl.cpp index 06c98290e8a5a9..101b4d03821883 100644 --- a/examples/tv-app/linux/AppImpl.cpp +++ b/examples/tv-app/linux/AppImpl.cpp @@ -119,6 +119,11 @@ class MyPostCommissioningListener : public PostCommissioningListener MyPostCommissioningListener gMyPostCommissioningListener; ContentAppFactoryImpl gFactory; +ContentAppFactoryImpl * GetContentAppFactoryImpl() +{ + return &gFactory; +} + namespace chip { namespace AppPlatform { @@ -383,6 +388,24 @@ ContentApp * ContentAppFactoryImpl::LoadContentApp(const CatalogVendorApp & vend return nullptr; } +void ContentAppFactoryImpl::AddAdminVendorId(uint16_t vendorId) +{ + mAdminVendorIds.push_back(vendorId); +} + +Access::Privilege ContentAppFactoryImpl::GetVendorPrivilege(uint16_t vendorId) +{ + for (size_t i = 0; i < mAdminVendorIds.size(); ++i) + { + auto & vendor = mAdminVendorIds.at(i); + if (vendorId == vendor) + { + return Access::Privilege::kAdminister; + } + } + return Access::Privilege::kOperate; +} + } // namespace AppPlatform } // namespace chip diff --git a/examples/tv-app/linux/AppImpl.h b/examples/tv-app/linux/AppImpl.h index a461ceac3e7c05..68c96d135e0630 100644 --- a/examples/tv-app/linux/AppImpl.h +++ b/examples/tv-app/linux/AppImpl.h @@ -125,6 +125,14 @@ class DLL_EXPORT ContentAppFactoryImpl : public ContentAppFactory // and then writes it to destinationApp CHIP_ERROR ConvertToPlatformCatalogVendorApp(const CatalogVendorApp & sourceApp, CatalogVendorApp * destinationApp) override; + // Get the privilege this vendorId should have on endpoints 1, 2, and content app endpoints + // In the case of casting video clients, this should usually be Access::Privilege::kOperate + // and for voice agents, this may be Access::Privilege::kAdminister + // When a vendor has admin privileges, it will get access to all clusters on ep1 + Access::Privilege GetVendorPrivilege(uint16_t vendorId) override; + + void AddAdminVendorId(uint16_t vendorId); + protected: ContentAppImpl mContentApps[APP_LIBRARY_SIZE] = { ContentAppImpl("Vendor1", 1, "exampleid", 11, "Version1", "34567890"), @@ -132,9 +140,13 @@ class DLL_EXPORT ContentAppFactoryImpl : public ContentAppFactory ContentAppImpl("Vendor3", 9050, "App3", 22, "Version3", "20202021"), ContentAppImpl("TestSuiteVendor", 1111, "applicationId", 22, "v2", "20202021") }; + + std::vector mAdminVendorIds{}; }; } // namespace AppPlatform } // namespace chip +chip::AppPlatform::ContentAppFactoryImpl * GetContentAppFactoryImpl(); + #endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED diff --git a/examples/tv-app/linux/AppPlatformShellCommands.cpp b/examples/tv-app/linux/AppPlatformShellCommands.cpp index 50cbc823d74e7d..b70c7b6f0d36b0 100644 --- a/examples/tv-app/linux/AppPlatformShellCommands.cpp +++ b/examples/tv-app/linux/AppPlatformShellCommands.cpp @@ -20,8 +20,10 @@ */ #include "AppPlatformShellCommands.h" +#include "AppImpl.h" #include "ControllerShellCommands.h" #include +#include #include #include #include @@ -39,6 +41,7 @@ using namespace ::chip::Controller; #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED using namespace chip::AppPlatform; +using namespace chip::Access; #endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED using namespace chip::app::Clusters; @@ -103,6 +106,82 @@ static CHIP_ERROR pairApp(bool printHeader, size_t index) return CHIP_NO_ERROR; } +static CHIP_ERROR DumpAccessControlEntry(const Access::AccessControl::Entry & entry) +{ + CHIP_ERROR err; + + ChipLogDetail(DeviceLayer, "----- BEGIN ENTRY -----"); + + { + FabricIndex fabricIndex; + SuccessOrExit(err = entry.GetFabricIndex(fabricIndex)); + ChipLogDetail(DeviceLayer, "fabricIndex: %u", fabricIndex); + } + + { + Privilege privilege; + SuccessOrExit(err = entry.GetPrivilege(privilege)); + ChipLogDetail(DeviceLayer, "privilege: %d", to_underlying(privilege)); + } + + { + AuthMode authMode; + SuccessOrExit(err = entry.GetAuthMode(authMode)); + ChipLogDetail(DeviceLayer, "authMode: %d", to_underlying(authMode)); + } + + { + size_t count; + SuccessOrExit(err = entry.GetSubjectCount(count)); + if (count) + { + ChipLogDetail(DeviceLayer, "subjects: %u", static_cast(count)); + for (size_t i = 0; i < count; ++i) + { + NodeId subject; + SuccessOrExit(err = entry.GetSubject(i, subject)); + ChipLogDetail(DeviceLayer, " %u: 0x" ChipLogFormatX64, static_cast(i), ChipLogValueX64(subject)); + } + } + } + + { + size_t count; + SuccessOrExit(err = entry.GetTargetCount(count)); + if (count) + { + ChipLogDetail(DeviceLayer, "targets: %u", static_cast(count)); + for (size_t i = 0; i < count; ++i) + { + Access::AccessControl::Entry::Target target; + SuccessOrExit(err = entry.GetTarget(i, target)); + if (target.flags & Access::AccessControl::Entry::Target::kCluster) + { + ChipLogDetail(DeviceLayer, " %u: cluster: 0x" ChipLogFormatMEI, static_cast(i), + ChipLogValueMEI(target.cluster)); + } + if (target.flags & Access::AccessControl::Entry::Target::kEndpoint) + { + ChipLogDetail(DeviceLayer, " %u: endpoint: %u", static_cast(i), target.endpoint); + } + if (target.flags & Access::AccessControl::Entry::Target::kDeviceType) + { + ChipLogDetail(DeviceLayer, " %u: deviceType: 0x" ChipLogFormatMEI, static_cast(i), + ChipLogValueMEI(target.deviceType)); + } + } + } + } + + ChipLogDetail(DeviceLayer, "----- END ENTRY -----"); + + return CHIP_NO_ERROR; + +exit: + ChipLogError(DeviceLayer, "DumpAccessControlEntry: dump failed %" CHIP_ERROR_FORMAT, err.Format()); + return err; +} + static CHIP_ERROR PrintAllCommands() { streamer_t * sout = streamer_get(); @@ -114,6 +193,11 @@ static CHIP_ERROR PrintAllCommands() streamer_printf(sout, " commission Commission given udc-entry using given pincode from corresponding app. Usage: " "app commission 0\r\n"); + streamer_printf(sout, + " add-admin-vendor Add vendor ID to list which will receive admin privileges. Usage: app " + "add-admin-vendor 65521\r\n"); + streamer_printf(sout, " print-app-access Print all ACLs for app platform fabric. Usage: app print-app-access\r\n"); + streamer_printf(sout, " remove-app-access Remove all ACLs for app platform fabric. Usage: app remove-app-access\r\n"); streamer_printf(sout, "\r\n"); return CHIP_NO_ERROR; @@ -127,6 +211,22 @@ static CHIP_ERROR AppPlatformHandler(int argc, char ** argv) { return PrintAllCommands(); } + else if (strcmp(argv[0], "add-admin-vendor") == 0) + { + if (argc < 2) + { + return PrintAllCommands(); + } + char * eptr; + + uint16_t vid = (uint16_t) strtol(argv[1], &eptr, 10); + ContentAppFactoryImpl * factory = GetContentAppFactoryImpl(); + factory->AddAdminVendorId(vid); + + ChipLogProgress(DeviceLayer, "added admin-vendor"); + + return CHIP_NO_ERROR; + } else if (strcmp(argv[0], "add") == 0) { if (argc < 2) @@ -205,6 +305,23 @@ static CHIP_ERROR AppPlatformHandler(int argc, char ** argv) size_t index = (size_t) strtol(argv[1], &eptr, 10); return error = pairApp(true, index); } + else if (strcmp(argv[0], "print-app-access") == 0) + { + Access::AccessControl::EntryIterator iterator; + ReturnErrorOnFailure(Access::GetAccessControl().Entries(GetDeviceCommissioner()->GetFabricIndex(), iterator)); + + Access::AccessControl::Entry entry; + while (iterator.Next(entry) == CHIP_NO_ERROR) + { + DumpAccessControlEntry(entry); + } + return CHIP_NO_ERROR; + } + else if (strcmp(argv[0], "remove-app-access") == 0) + { + Access::GetAccessControl().DeleteAllEntriesForFabric(GetDeviceCommissioner()->GetFabricIndex()); + return CHIP_NO_ERROR; + } else { return CHIP_ERROR_INVALID_ARGUMENT; diff --git a/examples/tv-app/linux/main.cpp b/examples/tv-app/linux/main.cpp index 2236e7bee2d192..eec6a8054887b8 100644 --- a/examples/tv-app/linux/main.cpp +++ b/examples/tv-app/linux/main.cpp @@ -75,7 +75,16 @@ static TargetNavigatorManager targetNavigatorManager; static WakeOnLanManager wakeOnLanManager; } // namespace -void ApplicationInit() {} +void ApplicationInit() +{ + ChipLogProgress(Zcl, "TV Linux App: ApplicationInit()"); + + // Disable last fixed endpoint, which is used as a placeholder for all of the + // supported clusters so that ZAP will generated the requisite code. + ChipLogDetail(DeviceLayer, "TV Linux App: Warning - Fixed Content App Endpoint Not Disabled"); + // Can't disable this without breaking CI unit tests that act upon account login cluster (only available on ep3) + // emberAfEndpointEnableDisable(3, false); +} int main(int argc, char * argv[]) { diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 553ba3577bd5ca..a509109ec75045 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -86,44 +86,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -133,7 +144,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster Descriptor = 29 { @@ -223,7 +234,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -231,7 +242,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -258,6 +269,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -920,7 +932,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1261,7 +1273,7 @@ client cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1361,7 +1373,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -2067,7 +2079,7 @@ server cluster ApplicationBasic = 1293 { } readonly attribute char_string<32> vendorName = 0; - readonly attribute int16u vendorID = 1; + readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; readonly attribute ApplicationBasicApplication application = 4; diff --git a/examples/tv-casting-app/linux/main.cpp b/examples/tv-casting-app/linux/main.cpp index 2c50050e11bc71..75222fed066ae5 100644 --- a/examples/tv-casting-app/linux/main.cpp +++ b/examples/tv-casting-app/linux/main.cpp @@ -85,7 +85,7 @@ CHIP_ERROR InitCommissionableDataProvider(LinuxCommissionableDataProvider & prov ChipLogError(Support, "PASE PBKDF iterations set to %u", static_cast(spake2pIterationCount)); return provider.Init(options.spake2pVerifier, options.spake2pSalt, spake2pIterationCount, setupPasscode, - options.payload.discriminator); + options.payload.discriminator.GetLongValue()); } // To hold SPAKE2+ verifier, discriminator, passcode diff --git a/examples/tv-casting-app/tv-casting-common/commands/clusters/ModelCommand.cpp b/examples/tv-casting-app/tv-casting-common/commands/clusters/ModelCommand.cpp index 2953c4ba2a91f1..5982c67f8e41ae 100644 --- a/examples/tv-casting-app/tv-casting-common/commands/clusters/ModelCommand.cpp +++ b/examples/tv-casting-app/tv-casting-common/commands/clusters/ModelCommand.cpp @@ -47,16 +47,8 @@ CHIP_ERROR ModelCommand::RunCommand() return SendGroupCommand(GroupIdFromNodeId(mDestinationId), fabricIndex); } - Server * server = &(chip::Server::GetInstance()); - const FabricInfo * fabric = server->GetFabricTable().FindFabricWithIndex(fabricIndex); - if (fabric == nullptr) - { - ChipLogError(AppServer, "Did not find fabric for index %d", fabricIndex); - return CHIP_ERROR_INVALID_FABRIC_INDEX; - } - - PeerId peerID = fabric->GetPeerIdForNode(mDestinationId); - server->GetCASESessionManager()->FindOrEstablishSession(peerID, &mOnDeviceConnectedCallback, + Server * server = &(chip::Server::GetInstance()); + server->GetCASESessionManager()->FindOrEstablishSession(ScopedNodeId(mDestinationId, fabricIndex), &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); return CHIP_NO_ERROR; } @@ -71,7 +63,7 @@ void ModelCommand::OnDeviceConnectedFn(void * context, OperationalDeviceProxy * VerifyOrReturn(CHIP_NO_ERROR == err, command->SetCommandExitStatus(err)); } -void ModelCommand::OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR err) +void ModelCommand::OnDeviceConnectionFailureFn(void * context, const ScopedNodeId & peerId, CHIP_ERROR err) { ChipLogProgress(chipTool, "ModelCommand::OnDeviceConnectionFailureFn"); LogErrorOnFailure(err); diff --git a/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h b/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h index 1db14a7bfc4e9e..1e2265d20dd8b3 100644 --- a/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h +++ b/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h @@ -49,7 +49,7 @@ class TargetVideoPlayerInfo ChipLogProgress(AppServer, "HandleDeviceConnected created an instance of OperationalDeviceProxy"); } - static void HandleDeviceConnectionFailure(void * context, chip::PeerId peerId, CHIP_ERROR error) + static void HandleDeviceConnectionFailure(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR error) { TargetVideoPlayerInfo * _this = static_cast(context); _this->mOperationalDeviceProxy = nullptr; diff --git a/examples/tv-casting-app/tv-casting-common/src/LevelControl.cpp b/examples/tv-casting-app/tv-casting-common/src/LevelControl.cpp index 63f3777e64356d..d55ae63db19ccf 100644 --- a/examples/tv-casting-app/tv-casting-common/src/LevelControl.cpp +++ b/examples/tv-casting-app/tv-casting-common/src/LevelControl.cpp @@ -25,11 +25,11 @@ CHIP_ERROR StepCommand::Invoke(LevelControl::StepMode stepMode, uint8_t stepSize uint8_t optionOverride, std::function responseCallback) { LevelControl::Commands::Step::Type request; - request.stepMode = stepMode; - request.stepSize = stepSize; - request.transitionTime = transitionTime; - request.optionMask = optionMask; - request.optionOverride = optionOverride; + request.stepMode = stepMode; + request.stepSize = stepSize; + request.transitionTime = transitionTime; + request.optionsMask = optionMask; + request.optionsOverride = optionOverride; return MediaCommandBase::Invoke(request, responseCallback); } @@ -37,9 +37,9 @@ CHIP_ERROR MoveToLevelCommand::Invoke(uint8_t level, uint16_t transitionTime, ui std::function responseCallback) { LevelControl::Commands::MoveToLevel::Type request; - request.level = level; - request.transitionTime = transitionTime; - request.optionMask = optionMask; - request.optionOverride = optionOverride; + request.level = level; + request.transitionTime = transitionTime; + request.optionsMask = optionMask; + request.optionsOverride = optionOverride; return MediaCommandBase::Invoke(request, responseCallback); } diff --git a/examples/tv-casting-app/tv-casting-common/src/TargetVideoPlayerInfo.cpp b/examples/tv-casting-app/tv-casting-common/src/TargetVideoPlayerInfo.cpp index 9a08e65a13fabe..546c68681b9fb3 100644 --- a/examples/tv-casting-app/tv-casting-common/src/TargetVideoPlayerInfo.cpp +++ b/examples/tv-casting-app/tv-casting-common/src/TargetVideoPlayerInfo.cpp @@ -32,17 +32,9 @@ CHIP_ERROR TargetVideoPlayerInfo::Initialize(NodeId nodeId, FabricIndex fabricIn endpointInfo.Reset(); } - Server * server = &(chip::Server::GetInstance()); - const FabricInfo * fabric = server->GetFabricTable().FindFabricWithIndex(fabricIndex); - if (fabric == nullptr) - { - ChipLogError(AppServer, "Did not find fabric for index %d", fabricIndex); - return CHIP_ERROR_INVALID_FABRIC_INDEX; - } - - PeerId peerID = fabric->GetPeerIdForNode(nodeId); - - server->GetCASESessionManager()->FindOrEstablishSession(peerID, &mOnConnectedCallback, &mOnConnectionFailureCallback); + Server * server = &(chip::Server::GetInstance()); + server->GetCASESessionManager()->FindOrEstablishSession(ScopedNodeId(nodeId, fabricIndex), &mOnConnectedCallback, + &mOnConnectionFailureCallback); if (mOperationalDeviceProxy == nullptr) { 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 3047552b9c7abe..24841d02cad66a 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 @@ -340,44 +340,55 @@ client cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -387,7 +398,7 @@ client cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster LevelControl = 8 { @@ -427,44 +438,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -474,7 +496,7 @@ server cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } server cluster BinaryInputBasic = 15 { @@ -572,7 +594,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -580,7 +602,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -607,6 +629,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -1076,7 +1099,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1454,7 +1477,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -2072,7 +2095,7 @@ client cluster ApplicationBasic = 1293 { } readonly attribute char_string<32> vendorName = 0; - readonly attribute int16u vendorID = 1; + readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; readonly attribute ApplicationStatusEnum status = 5; diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 9efbdd12b4de60..23d2eb55874595 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -286,7 +286,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -294,7 +294,7 @@ server cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -323,6 +323,7 @@ server cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -928,7 +929,7 @@ server cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster SoftwareDiagnostics = 52 { @@ -1274,7 +1275,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute attrib_id attributeList[] = 65531; diff --git a/integrations/docker/images/build-all.sh b/integrations/docker/images/build-all.sh index 2ff590b111d011..4aff2747ed571a 100755 --- a/integrations/docker/images/build-all.sh +++ b/integrations/docker/images/build-all.sh @@ -21,7 +21,7 @@ # https://github.com/project-chip/connectedhomeip/issues/710 # set -e -find "$(git rev-parse --show-toplevel)"/integrations/docker/images/ -name Dockerfile | while read -r dockerfile; do +find "$(git rev-parse --show-toplevel)"/integrations/docker/images/ -name Dockerfile ! -path "*chip-cert-bins/*" | while read -r dockerfile; do pushd "$(dirname "$dockerfile")" >/dev/null ./build.sh "$@" popd >/dev/null diff --git a/integrations/docker/images/chip-build-ameba/Dockerfile b/integrations/docker/images/chip-build-ameba/Dockerfile index 0504e3c8645ceb..c8307ae64986f8 100644 --- a/integrations/docker/images/chip-build-ameba/Dockerfile +++ b/integrations/docker/images/chip-build-ameba/Dockerfile @@ -3,7 +3,7 @@ FROM connectedhomeip/chip-build:${VERSION} # Setup Ameba ARG AMEBA_DIR=/opt/ameba -ARG TAG_NAME=ameba_update_2022_07_15 +ARG TAG_NAME=ameba_update_2022_07_25 RUN set -x \ && apt-get update \ && mkdir ${AMEBA_DIR} \ diff --git a/integrations/docker/images/chip-build-nrf-platform/Dockerfile b/integrations/docker/images/chip-build-nrf-platform/Dockerfile index 633a921f4d58e1..f27f0813c748b3 100644 --- a/integrations/docker/images/chip-build-nrf-platform/Dockerfile +++ b/integrations/docker/images/chip-build-nrf-platform/Dockerfile @@ -2,7 +2,7 @@ ARG VERSION=latest FROM connectedhomeip/chip-build:${VERSION} as build # Compatible Nordic Connect SDK revision. -ARG NCS_REVISION=fd5905aa6b04febd99d00dba6c482ac25eb15222 +ARG NCS_REVISION=v2.0.2 RUN set -x \ && apt-get update \ @@ -28,7 +28,7 @@ RUN set -x \ WORKDIR /opt/NordicSemiconductor/nrfconnect RUN set -x \ && python3 -m pip install -U --no-cache-dir \ - west==0.12.0 \ + west==0.13.1 \ && west init -m https://github.com/nrfconnect/sdk-nrf \ && git -C nrf fetch origin "$NCS_REVISION" \ && git -C nrf checkout FETCH_HEAD \ @@ -59,7 +59,7 @@ COPY --from=build /opt/NordicSemiconductor/nrfconnect/ /opt/NordicSemiconductor/ RUN set -x \ # python3-yaml package conflicts with nRF Python requirements && (apt-get remove -fy python3-yaml && apt-get autoremove || exit 0) \ - && python3 -m pip install -U --no-cache-dir cmake==3.22.2 \ + && python3 -m pip install -U --no-cache-dir cmake==3.22.5 \ && python3 -m pip install --no-cache-dir -r /opt/NordicSemiconductor/nrfconnect/zephyr/scripts/requirements.txt \ && python3 -m pip install --no-cache-dir -r /opt/NordicSemiconductor/nrfconnect/nrf/scripts/requirements.txt \ && python3 -m pip install --no-cache-dir -r /opt/NordicSemiconductor/nrfconnect/bootloader/mcuboot/scripts/requirements.txt \ diff --git a/integrations/docker/images/chip-build/version b/integrations/docker/images/chip-build/version index 4c819180ae4884..89a140eb53a3ca 100644 --- a/integrations/docker/images/chip-build/version +++ b/integrations/docker/images/chip-build/version @@ -1 +1 @@ -0.5.86 Version bump reason: [Ameba] Set matter_enable_persistentstorage_audit as disabled by default +0.5.91 Version bump reason: [nRF Connect] Update nRF Connect SDK version diff --git a/integrations/docker/images/chip-cert-bins/Dockerfile b/integrations/docker/images/chip-cert-bins/Dockerfile new file mode 100644 index 00000000000000..7cb52537acbcff --- /dev/null +++ b/integrations/docker/images/chip-cert-bins/Dockerfile @@ -0,0 +1,278 @@ +# Stage 1: Setup dependencies (based on chip-build). +FROM ubuntu:22.04 as chip-build-cert +ARG TARGETPLATFORM +# COMMITHASH defines the target commit to build from. May be passed in using --build-arg. +ARG COMMITHASH=e556daac2e1ed3a141034a6dcc7e410e4cd1f8f6 + +# Ensure TARGETPLATFORM is set +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") \ + echo "Building for linux/amd64" \ + ;; \ + "linux/arm64") \ + echo "Building for linux/arm64" \ + ;; \ + *) \ + if [ -z "$TARGETPLATFORM" ] ;\ + then \ + echo "TARGETPLATFORM not defined! Please run from buildkit (buildx)." \ + && return 1 ;\ + else \ + echo "Unsupported platform ${TARGETPLATFORM}." \ + && return 1 ;\ + fi \ + ;; \ + esac + +# Below should be the same as chip-build except arm64 logic for cmake and node. + +# base build and check tools and libraries layer +RUN set -x \ + && apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -fy \ + autoconf \ + automake \ + bison \ + bridge-utils \ + clang \ + clang-format \ + clang-tidy \ + curl \ + flex \ + g++ \ + git \ + gperf \ + iproute2 \ + jq \ + lcov \ + libavahi-client-dev \ + libavahi-common-dev \ + libcairo2-dev \ + libdbus-1-dev \ + libdbus-glib-1-dev \ + libgif-dev \ + libglib2.0-dev \ + libical-dev \ + libjpeg-dev \ + libdmalloc-dev \ + libmbedtls-dev \ + libncurses5-dev \ + libncursesw5-dev \ + libnspr4-dev \ + libpango1.0-dev \ + libpixman-1-dev \ + libreadline-dev \ + libssl-dev \ + libtool \ + libudev-dev \ + libusb-1.0-0 \ + libusb-dev \ + libxml2-dev \ + make \ + net-tools \ + ninja-build \ + openjdk-8-jdk \ + pkg-config \ + python3 \ + python3-dev \ + python3-venv \ + rsync \ + shellcheck \ + strace \ + systemd \ + udev \ + unzip \ + wget \ + git-lfs \ + zlib1g-dev \ + && rm -rf /var/lib/apt/lists/ \ + && git lfs install \ + && : # last line + +# Cmake (Mbed OS requires >=3.19.0-rc3 version which is not available in Ubuntu 20.04 repository) +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") \ + set -x \ + && (cd /tmp \ + && wget --progress=dot:giga https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-x86_64.sh \ + && sh cmake-3.19.3-Linux-x86_64.sh --exclude-subdir --prefix=/usr/local \ + && rm -rf cmake-3.19.3-Linux-x86_64.sh) \ + && exec bash \ + ;; \ + "linux/arm64") \ + set -x \ + && (cd /tmp \ + && wget --progress=dot:giga https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-aarch64.sh \ + && sh cmake-3.19.3-Linux-aarch64.sh --exclude-subdir --prefix=/usr/local \ + && rm -rf cmake-3.19.3-Linux-aarch64.sh) \ + && exec bash \ + ;; \ + *) \ + test -n "$TARGETPLATFORM" \ + echo "Unsupported platform ${TARGETPLATFORM}" \ + ;; \ + esac + +# Python 3 and PIP +RUN set -x \ + && DEBIAN_FRONTEND=noninteractive apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y libgirepository1.0-dev \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common \ + && add-apt-repository universe \ + && curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ + && python3 get-pip.py \ + && rm -rf /var/lib/apt/lists/ \ + && : # last line + +RUN set -x \ + && pip3 install attrs coloredlogs PyGithub pygit future portpicker mobly click cxxfilt ghapi pandas tabulate \ + && : # last line + +# build and install gn +RUN set -x \ + && git clone https://gn.googlesource.com/gn \ + && cd gn \ + && python3 build/gen.py \ + && ninja -C out \ + && cp out/gn /usr/local/bin \ + && cd .. \ + && rm -rf gn \ + && : # last line + +# Install bloat comparison tools +RUN set -x \ + && git clone https://github.com/google/bloaty.git \ + && mkdir -p bloaty/build \ + && cd bloaty/build \ + && cmake ../ \ + && make -j8 \ + && make install \ + && cd ../.. \ + && rm -rf bloaty \ + && : # last line + +# NodeJS: install a newer version than what apt-get would read +# This installs the latest LTS version of nodejs +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") \ + set -x \ + && mkdir node_js \ + && cd node_js \ + && wget https://nodejs.org/dist/v12.19.0/node-v12.19.0-linux-x64.tar.xz \ + && tar xfvJ node-v12.19.0-linux-x64.tar.xz \ + && mv node-v12.19.0-linux-x64 /opt/ \ + && ln -s /opt/node-v12.19.0-linux-x64 /opt/node \ + && ln -s /opt/node/bin/* /usr/bin \ + && cd .. \ + && rm -rf node_js \ + ;; \ + "linux/arm64")\ + set -x \ + && mkdir node_js \ + && cd node_js \ + && wget https://nodejs.org/dist/v12.19.0/node-v12.19.0-linux-arm64.tar.xz \ + && tar xfvJ node-v12.19.0-linux-arm64.tar.xz \ + && mv node-v12.19.0-linux-arm64 /opt/ \ + && ln -s /opt/node-v12.19.0-linux-arm64 /opt/node \ + && ln -s /opt/node/bin/* /usr/bin \ + && cd .. \ + && rm -rf node_js \ + ;; \ + *) ;; \ + esac + +# Stage 1.5: Bootstrap Matter. +RUN mkdir /root/connectedhomeip +RUN git clone https://github.com/project-chip/connectedhomeip.git /root/connectedhomeip +WORKDIR /root/connectedhomeip/ +RUN git checkout ${COMMITHASH} +RUN scripts/build/gn_bootstrap.sh +RUN gn gen out/debug --args='chip_mdns="platform" chip_inet_config_enable_ipv4=false' +RUN ninja -C out/debug + +# Stage 2: Build. +from chip-build-cert as chip-build-cert-bins +SHELL ["/bin/bash", "-c"] +# Records Matter SDK commit hash to include in the image. +RUN git rev-parse HEAD > /root/.sdk-sha-version +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") \ + set -x \ + && source scripts/activate.sh \ + && scripts/build/build_examples.py \ + --target linux-x64-all-clusters-ipv6only \ + --target linux-x64-all-clusters-minimal-ipv6only \ + --target linux-x64-bridge-ipv6only \ + --target linux-x64-tv-app-ipv6only \ + --target linux-x64-tv-casting-app-ipv6only \ + --target linux-x64-light-ipv6only \ + --target linux-x64-thermostat-ipv6only \ + --target linux-x64-ota-provider-ipv6only \ + --target linux-x64-ota-requestor-ipv6only \ + --target linux-x64-lock-ipv6only \ + build \ + && mv out/linux-x64-all-clusters-ipv6only/chip-all-clusters-app out/chip-all-clusters-app \ + && mv out/linux-x64-all-clusters-minimal-ipv6only/chip-all-clusters-minimal-app out/chip-all-clusters-minimal-app \ + && mv out/linux-x64-bridge-ipv6only/chip-bridge-app out/chip-bridge-app \ + && mv out/linux-x64-tv-app-ipv6only/chip-tv-app out/chip-tv-app \ + && mv out/linux-x64-tv-casting-app-ipv6only/chip-tv-casting-app out/chip-tv-casting-app \ + && mv out/linux-x64-light-ipv6only/chip-lighting-app out/chip-lighting-app \ + && mv out/linux-x64-thermostat-ipv6only/thermostat-app out/thermostat-app \ + && mv out/linux-x64-ota-provider-ipv6only/chip-ota-provider-app out/chip-ota-provider-app \ + && mv out/linux-x64-ota-requestor-ipv6only/chip-ota-requestor-app out/chip-ota-requestor-app \ + && mv out/linux-x64-lock-ipv6only/chip-lock-app out/chip-lock-app \ + ;; \ + "linux/arm64")\ + set -x \ + && source scripts/activate.sh \ + && scripts/build/build_examples.py \ + --target linux-arm64-all-clusters-ipv6only \ + --target linux-arm64-all-clusters-minimal-ipv6only \ + --target linux-arm64-bridge-ipv6only \ + --target linux-arm64-tv-app-ipv6only \ + --target linux-arm64-tv-casting-app-ipv6only \ + --target linux-arm64-light-ipv6only \ + --target linux-arm64-thermostat-ipv6only \ + --target linux-arm64-ota-provider-ipv6only \ + --target linux-arm64-ota-requestor-ipv6only \ + --target linux-arm64-lock-ipv6only \ + build \ + && mv out/linux-arm64-all-clusters-ipv6only/chip-all-clusters-app out/chip-all-clusters-app \ + && mv out/linux-arm64-all-clusters-minimal-ipv6only/chip-all-clusters-minimal-app out/chip-all-clusters-minimal-app \ + && mv out/linux-arm64-bridge-ipv6only/chip-bridge-app out/chip-bridge-app \ + && mv out/linux-arm64-tv-app-ipv6only/chip-tv-app out/chip-tv-app \ + && mv out/linux-arm64-tv-casting-app-ipv6only/chip-tv-casting-app out/chip-tv-casting-app \ + && mv out/linux-arm64-light-ipv6only/chip-lighting-app out/chip-lighting-app \ + && mv out/linux-arm64-thermostat-ipv6only/thermostat-app out/thermostat-app \ + && mv out/linux-arm64-ota-provider-ipv6only/chip-ota-provider-app out/chip-ota-provider-app \ + && mv out/linux-arm64-ota-requestor-ipv6only/chip-ota-requestor-app out/chip-ota-requestor-app \ + && mv out/linux-arm64-lock-ipv6only/chip-lock-app out/chip-lock-app \ + ;; \ + *) ;; \ + esac + +RUN npm --prefix third_party/zap/repo/ ci +RUN scripts/examples/gn_build_test_example.sh app1 + +# Stage 3: Copy relevant cert bins to a minimal image to reduce size. +FROM ubuntu:22.04 +ENV TZ=Etc/UTC +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +RUN apt-get update -y +RUN apt-get install -y libssl-dev libdbus-1-dev libglib2.0-dev libavahi-client-dev avahi-utils iproute2 +WORKDIR /root/ +COPY --from=chip-build-cert-bins /root/.sdk-sha-version .sdk-sha-version +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/debug/chip-tool chip-tool +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/debug/chip-shell chip-shell +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/debug/chip-cert chip-cert +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-all-clusters-app chip-all-clusters-app +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-all-clusters-minimal-app chip-all-clusters-minimal-app +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-lighting-app chip-lighting-app +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-tv-casting-app chip-tv-casting-app +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-tv-app chip-tv-app +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-bridge-app chip-bridge-app +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/thermostat-app thermostat-app +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-ota-provider-app chip-ota-provider-app +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-ota-requestor-app chip-ota-requestor-app +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-lock-app chip-lock-app +COPY --from=chip-build-cert-bins /root/connectedhomeip/out/app1/chip-app1 chip-app1 diff --git a/integrations/docker/images/chip-cert-bins/README.md b/integrations/docker/images/chip-cert-bins/README.md new file mode 100644 index 00000000000000..2a6261a79c1dee --- /dev/null +++ b/integrations/docker/images/chip-cert-bins/README.md @@ -0,0 +1,68 @@ +# Docker image for Matter Certification Test Harness + +The Dockerfile here helps build multi-platform Docker images containing the +executable binaries necessary for the Matter Test Harness. It utilizes the +BuildKit toolkit and Buildx, included within Docker since version 18.06. + +## Running + +In order to properly run the binaries, avahi must be properly set up and passed +to the container. + +Prerequisites: + +- Host must support and enable IPv6 and be on a network that has IPv6. +- IPv6 must be enabled within avahi config on the host. `use-ipv6=yes` in + avahi-daemon.conf +- Sometimes there are stale avahi entries, so restarting avahi-daemon between + runs may be necessary. + +The host network and dbus must be exposed to the container for avahi to work +properly. So for an interactive prompt, use: + +``` +docker run -it --network host -v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket chip-cert-bins +``` + +## Building + +The Dockerfile requires building using the Buildx plugin, included within +docker. It is used to build for both the amd64 and arm64 architectures, so the +image may be cross-built and ran directly on a Raspberry Pi or other arm64 based +environment. If your docker installation does not have the Buildx plugin, please +update docker or install Buildx manually. + +Prerequisites: + +- A recent docker installation. +- Create a Buildx builder: `docker buildx create --use --name mybuild` +- Install the Binfmt cross-platform Docker emulators: + `docker run --privileged --rm tonistiigi/binfmt --install all` + +### Example: Building for the host platform and loading into Docker + +``` +docker buildx build --load . +``` + +The above command will build the image and load them into your local Docker +instance. + +### Example: Building for another platform and exporting to a tar + +``` +docker buildx build --platform linux/arm64 --output "dest=/full/path/to/dest/chipcertbins.tar,type=docker" . +``` + +The above command will build the image and export it to a tar file. You may copy +the tar file to a RaspberryPi and import the image by using: + +``` +docker load --input chipcertbins.tar +``` + +### Example: Creating a multi-platform image and pushing to the Docker registry + +``` +docker buildx build --platform linux/amd64,linux/arm64 --tag chip-cert-bins:tag1 --push . +``` diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index 0ae6f05a9f328e..09836d01db1b9b 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -271,9 +271,12 @@ def HostTargets(): app_targets.append(target.Extend('tv-casting-app', app=HostApp.TV_CASTING)) app_targets.append(target.Extend('bridge', app=HostApp.BRIDGE)) - nodeps_args = dict(enable_ble=False, enable_wifi=False, enable_thread=False, use_clang=True) + nodeps_args = dict(enable_ble=False, enable_wifi=False, enable_thread=False, + crypto_library=HostCryptoLibrary.MBEDTLS, use_clang=True) app_targets.append(target.Extend('chip-tool-nodeps', app=HostApp.CHIP_TOOL, **nodeps_args)) app_targets.append(target.Extend('all-clusters-app-nodeps', app=HostApp.ALL_CLUSTERS, **nodeps_args)) + app_targets.append(target.Extend('ota-provider-nodeps', app=HostApp.OTA_PROVIDER, **nodeps_args)) + app_targets.append(target.Extend('ota-requestor-nodeps', app=HostApp.OTA_REQUESTOR, **nodeps_args)) builder = VariantBuilder() diff --git a/scripts/build/builders/gn.py b/scripts/build/builders/gn.py index 1c00bf1c1e9d89..031546ae388873 100644 --- a/scripts/build/builders/gn.py +++ b/scripts/build/builders/gn.py @@ -54,33 +54,32 @@ def PostBuildCommand(self): pass def generate(self): - if not os.path.exists(self.output_dir): - cmd = [ - 'gn', 'gen', '--check', '--fail-on-unused-args', - '--export-compile-commands', - '--root=%s' % self.root - ] + cmd = [ + 'gn', 'gen', '--check', '--fail-on-unused-args', + '--export-compile-commands', + '--root=%s' % self.root + ] - extra_args = self.GnBuildArgs() - if extra_args: - cmd += ['--args=%s' % ' '.join(extra_args)] + extra_args = self.GnBuildArgs() + if extra_args: + cmd += ['--args=%s' % ' '.join(extra_args)] - cmd += [self.output_dir] + cmd += [self.output_dir] - title = 'Generating ' + self.identifier - extra_env = self.GnBuildEnv() + title = 'Generating ' + self.identifier + extra_env = self.GnBuildEnv() - if extra_env: - # convert the command into a bash command that includes - # setting environment variables - cmd = [ - 'bash', '-c', '\n' + ' '.join( - ['%s="%s" \\\n' % (key, value) for key, value in extra_env.items()] + - [shlex.join(cmd)] - ) - ] + if extra_env: + # convert the command into a bash command that includes + # setting environment variables + cmd = [ + 'bash', '-c', '\n' + ' '.join( + ['%s="%s" \\\n' % (key, value) for key, value in extra_env.items()] + + [shlex.join(cmd)] + ) + ] - self._Execute(cmd, title=title) + self._Execute(cmd, title=title) def _build(self): self.PreBuildCommand() diff --git a/scripts/build/testdata/build_linux_on_x64.txt b/scripts/build/testdata/build_linux_on_x64.txt index 0affc2ae79ba88..9a926ebce07b96 100644 --- a/scripts/build/testdata/build_linux_on_x64.txt +++ b/scripts/build/testdata/build_linux_on_x64.txt @@ -9,12 +9,12 @@ PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ # Generating linux-arm64-clang-all-clusters-app-nodeps bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '"'"'--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-all-clusters-app-nodeps' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '"'"'--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls" target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-all-clusters-app-nodeps' # Generating linux-arm64-clang-all-clusters-app-nodeps-ipv6only bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-all-clusters-app-nodeps-ipv6only' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls" target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-all-clusters-app-nodeps-ipv6only' # Generating linux-arm64-clang-all-clusters-ipv6only bash -c ' @@ -54,12 +54,12 @@ PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ # Generating linux-arm64-clang-chip-tool-nodeps bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '"'"'--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-chip-tool-nodeps' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '"'"'--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls" target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-chip-tool-nodeps' # Generating linux-arm64-clang-chip-tool-nodeps-ipv6only bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ - gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '"'"'--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-chip-tool-nodeps-ipv6only' + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '"'"'--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls" target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-chip-tool-nodeps-ipv6only' # Generating linux-arm64-clang-light bash -c ' @@ -111,6 +111,16 @@ bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-provider-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-ota-provider-ipv6only' +# Generating linux-arm64-clang-ota-provider-nodeps +bash -c ' +PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-provider-app/linux '"'"'--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls" target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-ota-provider-nodeps' + +# Generating linux-arm64-clang-ota-provider-nodeps-ipv6only +bash -c ' +PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-provider-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls" target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-ota-provider-nodeps-ipv6only' + # Generating linux-arm64-clang-ota-requestor bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ @@ -121,6 +131,16 @@ bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-requestor-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false is_clang=true target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-ota-requestor-ipv6only' +# Generating linux-arm64-clang-ota-requestor-nodeps +bash -c ' +PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-requestor-app/linux '"'"'--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls" target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-ota-requestor-nodeps' + +# Generating linux-arm64-clang-ota-requestor-nodeps-ipv6only +bash -c ' +PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ + gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-requestor-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls" target_cpu="arm64" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-clang-ota-requestor-nodeps-ipv6only' + # Generating linux-arm64-clang-python-bindings bash -c ' PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \ @@ -176,10 +196,10 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root} {ou gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux {out}/linux-x64-all-clusters # Generating linux-x64-all-clusters-app-nodeps -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true' {out}/linux-x64-all-clusters-app-nodeps +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls"' {out}/linux-x64-all-clusters-app-nodeps # Generating linux-x64-all-clusters-app-nodeps-ipv6only -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true' {out}/linux-x64-all-clusters-app-nodeps-ipv6only +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls"' {out}/linux-x64-all-clusters-app-nodeps-ipv6only # Generating linux-x64-all-clusters-coverage gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux --args=use_coverage=true {out}/linux-x64-all-clusters-coverage @@ -212,10 +232,10 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool --args=chip_inet_config_enable_ipv4=false {out}/linux-x64-chip-tool-ipv6only # Generating linux-x64-chip-tool-nodeps -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true' {out}/linux-x64-chip-tool-nodeps +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls"' {out}/linux-x64-chip-tool-nodeps # Generating linux-x64-chip-tool-nodeps-ipv6only -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true' {out}/linux-x64-chip-tool-nodeps-ipv6only +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls"' {out}/linux-x64-chip-tool-nodeps-ipv6only # Generating linux-x64-light gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux {out}/linux-x64-light @@ -250,12 +270,24 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa # Generating linux-x64-ota-provider-ipv6only gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-provider-app/linux '--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false' {out}/linux-x64-ota-provider-ipv6only +# Generating linux-x64-ota-provider-nodeps +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-provider-app/linux '--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls"' {out}/linux-x64-ota-provider-nodeps + +# Generating linux-x64-ota-provider-nodeps-ipv6only +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-provider-app/linux '--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls"' {out}/linux-x64-ota-provider-nodeps-ipv6only + # Generating linux-x64-ota-requestor gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-requestor-app/linux --args=chip_config_network_layer_ble=false {out}/linux-x64-ota-requestor # Generating linux-x64-ota-requestor-ipv6only gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-requestor-app/linux '--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false' {out}/linux-x64-ota-requestor-ipv6only +# Generating linux-x64-ota-requestor-nodeps +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-requestor-app/linux '--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls"' {out}/linux-x64-ota-requestor-nodeps + +# Generating linux-x64-ota-requestor-nodeps-ipv6only +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/ota-requestor-app/linux '--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true chip_crypto="mbedtls"' {out}/linux-x64-ota-requestor-nodeps-ipv6only + # Generating linux-x64-python-bindings gn gen --check --fail-on-unused-args --export-compile-commands --root={root} '--args=enable_rtti=false chip_project_config_include_dirs=["//config/python"]' {out}/linux-x64-python-bindings @@ -355,12 +387,24 @@ ninja -C {out}/linux-arm64-clang-ota-provider # Building linux-arm64-clang-ota-provider-ipv6only ninja -C {out}/linux-arm64-clang-ota-provider-ipv6only +# Building linux-arm64-clang-ota-provider-nodeps +ninja -C {out}/linux-arm64-clang-ota-provider-nodeps + +# Building linux-arm64-clang-ota-provider-nodeps-ipv6only +ninja -C {out}/linux-arm64-clang-ota-provider-nodeps-ipv6only + # Building linux-arm64-clang-ota-requestor ninja -C {out}/linux-arm64-clang-ota-requestor # Building linux-arm64-clang-ota-requestor-ipv6only ninja -C {out}/linux-arm64-clang-ota-requestor-ipv6only +# Building linux-arm64-clang-ota-requestor-nodeps +ninja -C {out}/linux-arm64-clang-ota-requestor-nodeps + +# Building linux-arm64-clang-ota-requestor-nodeps-ipv6only +ninja -C {out}/linux-arm64-clang-ota-requestor-nodeps-ipv6only + # Building linux-arm64-clang-python-bindings ninja -C {out}/linux-arm64-clang-python-bindings chip-repl @@ -472,12 +516,24 @@ ninja -C {out}/linux-x64-ota-provider # Building linux-x64-ota-provider-ipv6only ninja -C {out}/linux-x64-ota-provider-ipv6only +# Building linux-x64-ota-provider-nodeps +ninja -C {out}/linux-x64-ota-provider-nodeps + +# Building linux-x64-ota-provider-nodeps-ipv6only +ninja -C {out}/linux-x64-ota-provider-nodeps-ipv6only + # Building linux-x64-ota-requestor ninja -C {out}/linux-x64-ota-requestor # Building linux-x64-ota-requestor-ipv6only ninja -C {out}/linux-x64-ota-requestor-ipv6only +# Building linux-x64-ota-requestor-nodeps +ninja -C {out}/linux-x64-ota-requestor-nodeps + +# Building linux-x64-ota-requestor-nodeps-ipv6only +ninja -C {out}/linux-x64-ota-requestor-nodeps-ipv6only + # Building linux-x64-python-bindings ninja -C {out}/linux-x64-python-bindings chip-repl diff --git a/scripts/tests/chiptest/test_definition.py b/scripts/tests/chiptest/test_definition.py index 06f9980ae069b5..16a0eeae322bd8 100644 --- a/scripts/tests/chiptest/test_definition.py +++ b/scripts/tests/chiptest/test_definition.py @@ -209,7 +209,7 @@ class TestDefinition: target: TestTarget is_manual: bool - def Run(self, runner, apps_register, paths: ApplicationPaths, pics_file: str, timeout_seconds: typing.Optional[int]): + def Run(self, runner, apps_register, paths: ApplicationPaths, pics_file: str, timeout_seconds: typing.Optional[int], dry_run=False): """ Executes the given test case using the provided runner for execution. """ @@ -264,14 +264,20 @@ def Run(self, runner, apps_register, paths: ApplicationPaths, pics_file: str, ti app = apps_register.get('default') app.start() pairing_cmd = tool_cmd + ['pairing', 'code', TEST_NODE_ID, app.setupCode] - runner.RunSubprocess(pairing_cmd, - name='PAIR', dependencies=[apps_register]) - test_cmd = tool_cmd + ['tests', self.run_name] + ['--PICS', pics_file] - runner.RunSubprocess( - test_cmd, - name='TEST', dependencies=[apps_register], - timeout_seconds=timeout_seconds) + + if dry_run: + logging.info(" ".join(pairing_cmd)) + logging.info(" ".join(test_cmd)) + + else: + runner.RunSubprocess(pairing_cmd, + name='PAIR', dependencies=[apps_register]) + + runner.RunSubprocess( + test_cmd, + name='TEST', dependencies=[apps_register], + timeout_seconds=timeout_seconds) except Exception: logging.error("!!!!!!!!!!!!!!!!!!!! ERROR !!!!!!!!!!!!!!!!!!!!!!") diff --git a/scripts/tests/run_test_suite.py b/scripts/tests/run_test_suite.py index 3052e8befbe6df..1a9cfd7c58f37f 100755 --- a/scripts/tests/run_test_suite.py +++ b/scripts/tests/run_test_suite.py @@ -62,6 +62,7 @@ class RunContext: tests: typing.List[chiptest.TestDefinition] in_unshare: bool chip_tool: str + dry_run: bool @click.group(chain=True) @@ -70,6 +71,11 @@ class RunContext: default='info', type=click.Choice(__LOG_LEVELS__.keys(), case_sensitive=False), help='Determines the verbosity of script output.') +@click.option( + '--dry-run', + default=False, + is_flag=True, + help='Only print out shell commands that would be executed') @click.option( '--target', default=['all'], @@ -106,7 +112,7 @@ class RunContext: '--chip-tool', help='Binary path of chip tool app to use to run the test') @click.pass_context -def main(context, log_level, target, target_glob, target_skip_glob, +def main(context, dry_run, log_level, target, target_glob, target_skip_glob, no_log_timestamps, root, internal_inside_unshare, chip_tool): # Ensures somewhat pretty logging of what is going on log_fmt = '%(asctime)s.%(msecs)03d %(levelname)-7s %(message)s' @@ -151,7 +157,7 @@ def main(context, log_level, target, target_glob, target_skip_glob, context.obj = RunContext(root=root, tests=tests, in_unshare=internal_inside_unshare, - chip_tool=chip_tool) + chip_tool=chip_tool, dry_run=dry_run) @main.command( @@ -245,7 +251,10 @@ def cmd_run(context, iterations, all_clusters_app, lock_app, ota_provider_app, o for test in context.obj.tests: test_start = time.monotonic() try: - test.Run(runner, apps_register, paths, pics_file, test_timeout_seconds) + if context.obj.dry_run: + logging.info("Would run test %s:" % test.name) + + test.Run(runner, apps_register, paths, pics_file, test_timeout_seconds, context.obj.dry_run) test_end = time.monotonic() logging.info('%-20s - Completed in %0.2f seconds' % (test.name, (test_end - test_start))) diff --git a/src/access/AccessControl.cpp b/src/access/AccessControl.cpp index 4a4691b81bd593..c84c1fc313d58a 100644 --- a/src/access/AccessControl.cpp +++ b/src/access/AccessControl.cpp @@ -19,7 +19,7 @@ // Included for the default AccessControlDelegate logging enables/disables. // See `chip_access_control_policy_logging_verbosity` in `src/app/BUILD.gn` for // the levels available. -#include +#include #include "AccessControl.h" diff --git a/src/app/AppConfig.h b/src/app/AppConfig.h new file mode 100644 index 00000000000000..3303a319742735 --- /dev/null +++ b/src/app/AppConfig.h @@ -0,0 +1,22 @@ +/* + * + * Copyright (c) 2020-2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#if CHIP_HAVE_CONFIG_H +#include +#endif diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 0a3a865a678e7d..9f82625bf8a7eb 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -53,6 +53,12 @@ buildconfig_header("app_buildconfig") { ] } +source_set("app_config") { + sources = [ "AppConfig.h" ] + + public_deps = [ ":app_buildconfig" ] +} + static_library("app") { output_name = "libCHIPDataModel" @@ -179,7 +185,7 @@ static_library("app") { ] public_deps = [ - ":app_buildconfig", + ":app_config", "${chip_root}/src/access", "${chip_root}/src/lib/address_resolve", "${chip_root}/src/lib/support", diff --git a/src/app/BufferedReadCallback.h b/src/app/BufferedReadCallback.h index ea7dd28c4dbe5a..6b2d31d2b19a1e 100644 --- a/src/app/BufferedReadCallback.h +++ b/src/app/BufferedReadCallback.h @@ -86,9 +86,9 @@ class BufferedReadCallback : public ReadClient::Callback mCallback.OnSubscriptionEstablished(aSubscriptionId); } - void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) override + CHIP_ERROR OnResubscriptionNeeded(ReadClient * apReadClient, CHIP_ERROR aTerminationCause) override { - mCallback.OnResubscriptionAttempt(aTerminationCause, aNextResubscribeIntervalMsec); + return mCallback.OnResubscriptionNeeded(apReadClient, aTerminationCause); } void OnDeallocatePaths(chip::app::ReadPrepareParams && aReadPrepareParams) override diff --git a/src/app/CASEClient.cpp b/src/app/CASEClient.cpp index 31564a43d904d4..f514b3aa4c089c 100644 --- a/src/app/CASEClient.cpp +++ b/src/app/CASEClient.cpp @@ -26,7 +26,7 @@ void CASEClient::SetRemoteMRPIntervals(const ReliableMessageProtocolConfig & rem mCASESession.SetRemoteMRPConfig(remoteMRPConfig); } -CHIP_ERROR CASEClient::EstablishSession(PeerId peer, const Transport::PeerAddress & peerAddress, +CHIP_ERROR CASEClient::EstablishSession(const ScopedNodeId & peer, const Transport::PeerAddress & peerAddress, const ReliableMessageProtocolConfig & remoteMRPConfig, SessionEstablishmentDelegate * delegate) { @@ -46,9 +46,9 @@ CHIP_ERROR CASEClient::EstablishSession(PeerId peer, const Transport::PeerAddres VerifyOrReturnError(exchange != nullptr, CHIP_ERROR_INTERNAL); mCASESession.SetGroupDataProvider(mInitParams.groupDataProvider); - ReturnErrorOnFailure(mCASESession.EstablishSession( - *mInitParams.sessionManager, mInitParams.fabricTable, ScopedNodeId{ peer.GetNodeId(), mInitParams.fabricIndex }, exchange, - mInitParams.sessionResumptionStorage, mInitParams.certificateValidityPolicy, delegate, mInitParams.mrpLocalConfig)); + ReturnErrorOnFailure(mCASESession.EstablishSession(*mInitParams.sessionManager, mInitParams.fabricTable, peer, exchange, + mInitParams.sessionResumptionStorage, mInitParams.certificateValidityPolicy, + delegate, mInitParams.mrpLocalConfig)); return CHIP_NO_ERROR; } diff --git a/src/app/CASEClient.h b/src/app/CASEClient.h index 42fd3192343e5e..33dfad16bab0cf 100644 --- a/src/app/CASEClient.h +++ b/src/app/CASEClient.h @@ -33,7 +33,6 @@ struct CASEClientInitParams Credentials::CertificateValidityPolicy * certificateValidityPolicy = nullptr; Messaging::ExchangeManager * exchangeMgr = nullptr; FabricTable * fabricTable = nullptr; - FabricIndex fabricIndex = kUndefinedFabricIndex; Credentials::GroupDataProvider * groupDataProvider = nullptr; Optional mrpLocalConfig = Optional::Missing(); @@ -46,7 +45,7 @@ class DLL_EXPORT CASEClient void SetRemoteMRPIntervals(const ReliableMessageProtocolConfig & remoteMRPConfig); - CHIP_ERROR EstablishSession(PeerId peer, const Transport::PeerAddress & peerAddress, + CHIP_ERROR EstablishSession(const ScopedNodeId & peer, const Transport::PeerAddress & peerAddress, const ReliableMessageProtocolConfig & remoteMRPConfig, SessionEstablishmentDelegate * delegate); private: diff --git a/src/app/CASESessionManager.cpp b/src/app/CASESessionManager.cpp index 24fd9edc46617b..0f1d08fa46aeca 100644 --- a/src/app/CASESessionManager.cpp +++ b/src/app/CASESessionManager.cpp @@ -28,11 +28,11 @@ CHIP_ERROR CASESessionManager::Init(chip::System::Layer * systemLayer, const CAS return AddressResolve::Resolver::Instance().Init(systemLayer); } -void CASESessionManager::FindOrEstablishSession(PeerId peerId, Callback::Callback * onConnection, +void CASESessionManager::FindOrEstablishSession(const ScopedNodeId & peerId, Callback::Callback * onConnection, Callback::Callback * onFailure) { - ChipLogDetail(CASESessionManager, "FindOrEstablishSession: PeerId = " ChipLogFormatX64 ":" ChipLogFormatX64, - ChipLogValueX64(peerId.GetCompressedFabricId()), ChipLogValueX64(peerId.GetNodeId())); + ChipLogDetail(CASESessionManager, "FindOrEstablishSession: PeerId = [%d:" ChipLogFormatX64 "]", peerId.GetFabricIndex(), + ChipLogValueX64(peerId.GetNodeId())); OperationalDeviceProxy * session = FindExistingSession(peerId); if (session == nullptr) @@ -64,7 +64,7 @@ void CASESessionManager::FindOrEstablishSession(PeerId peerId, Callback::Callbac } } -void CASESessionManager::ReleaseSession(PeerId peerId) +void CASESessionManager::ReleaseSession(const ScopedNodeId & peerId) { ReleaseSession(FindExistingSession(peerId)); } @@ -79,7 +79,7 @@ void CASESessionManager::ReleaseAllSessions() mConfig.devicePool->ReleaseAllDevices(); } -CHIP_ERROR CASESessionManager::GetPeerAddress(PeerId peerId, Transport::PeerAddress & addr) +CHIP_ERROR CASESessionManager::GetPeerAddress(const ScopedNodeId & peerId, Transport::PeerAddress & addr) { OperationalDeviceProxy * session = FindExistingSession(peerId); VerifyOrReturnError(session != nullptr, CHIP_ERROR_NOT_CONNECTED); @@ -87,7 +87,7 @@ CHIP_ERROR CASESessionManager::GetPeerAddress(PeerId peerId, Transport::PeerAddr return CHIP_NO_ERROR; } -OperationalDeviceProxy * CASESessionManager::FindExistingSession(PeerId peerId) const +OperationalDeviceProxy * CASESessionManager::FindExistingSession(const ScopedNodeId & peerId) const { return mConfig.devicePool->FindDevice(peerId); } diff --git a/src/app/CASESessionManager.h b/src/app/CASESessionManager.h index a464a40e37ce59..c74cb47748f874 100644 --- a/src/app/CASESessionManager.h +++ b/src/app/CASESessionManager.h @@ -68,12 +68,12 @@ class CASESessionManager * The `onFailure` callback may be called before the FindOrEstablishSession * call returns, for error cases that are detected synchronously. */ - void FindOrEstablishSession(PeerId peerId, Callback::Callback * onConnection, + void FindOrEstablishSession(const ScopedNodeId & peerId, Callback::Callback * onConnection, Callback::Callback * onFailure); - OperationalDeviceProxy * FindExistingSession(PeerId peerId) const; + OperationalDeviceProxy * FindExistingSession(const ScopedNodeId & peerId) const; - void ReleaseSession(PeerId peerId); + void ReleaseSession(const ScopedNodeId & peerId); void ReleaseSessionsForFabric(FabricIndex fabricIndex); @@ -87,7 +87,7 @@ class CASESessionManager * an ongoing session with the peer node. If the session doesn't exist, the API will return * `CHIP_ERROR_NOT_CONNECTED` error. */ - CHIP_ERROR GetPeerAddress(PeerId peerId, Transport::PeerAddress & addr); + CHIP_ERROR GetPeerAddress(const ScopedNodeId & peerId, Transport::PeerAddress & addr); private: void ReleaseSession(OperationalDeviceProxy * device) const; diff --git a/src/app/ClusterStateCache.h b/src/app/ClusterStateCache.h index b16fd58b1ee012..8ba58f1d923798 100644 --- a/src/app/ClusterStateCache.h +++ b/src/app/ClusterStateCache.h @@ -576,9 +576,9 @@ class ClusterStateCache : protected ReadClient::Callback mCallback.OnSubscriptionEstablished(aSubscriptionId); } - void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) override + CHIP_ERROR OnResubscriptionNeeded(ReadClient * apReadClient, CHIP_ERROR aTerminationCause) override { - mCallback.OnResubscriptionAttempt(aTerminationCause, aNextResubscribeIntervalMsec); + return mCallback.OnResubscriptionNeeded(apReadClient, aTerminationCause); } void OnDeallocatePaths(chip::app::ReadPrepareParams && aReadPrepareParams) override diff --git a/src/app/CommandHandler.cpp b/src/app/CommandHandler.cpp index 2fc2dc55c4d850..d17c4f36cd33e1 100644 --- a/src/app/CommandHandler.cpp +++ b/src/app/CommandHandler.cpp @@ -40,7 +40,7 @@ namespace chip { namespace app { -CommandHandler::CommandHandler(Callback * apCallback) : mpCallback(apCallback), mSuppressResponse(false) {} +CommandHandler::CommandHandler(Callback * apCallback) : mExchangeCtx(*this), mpCallback(apCallback), mSuppressResponse(false) {} CHIP_ERROR CommandHandler::AllocateBuffer() { @@ -73,7 +73,7 @@ CHIP_ERROR CommandHandler::OnInvokeCommandRequest(Messaging::ExchangeContext * e // NOTE: we already know this is an InvokeCommand Request message because we explicitly registered with the // Exchange Manager for unsolicited InvokeCommand Requests. - mpExchangeCtx = ec; + mExchangeCtx.Grab(ec); // Use the RAII feature, if this is the only Handle when this function returns, DecrementHoldOff will trigger sending response. // TODO: This is broken! If something under here returns error, we will try @@ -81,7 +81,7 @@ CHIP_ERROR CommandHandler::OnInvokeCommandRequest(Messaging::ExchangeContext * e // response too. Figure out at what point it's our responsibility to // handler errors vs our caller's. Handle workHandle(this); - mpExchangeCtx->WillSendMessage(); + mExchangeCtx->WillSendMessage(); ReturnErrorOnFailure(ProcessInvokeRequest(std::move(payload), isTimedInvoke)); return CHIP_NO_ERROR; @@ -103,26 +103,19 @@ CHIP_ERROR CommandHandler::ProcessInvokeRequest(System::PacketBufferHandle && pa ReturnErrorOnFailure(invokeRequestMessage.GetTimedRequest(&mTimedRequest)); ReturnErrorOnFailure(invokeRequestMessage.GetInvokeRequests(&invokeRequests)); - VerifyOrReturnError(mpExchangeCtx != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mExchangeCtx, CHIP_ERROR_INCORRECT_STATE); if (mTimedRequest != isTimedInvoke) { // The message thinks it should be part of a timed interaction but it's // not, or vice versa. Spec says to Respond with UNSUPPORTED_ACCESS. - err = StatusResponse::Send(Protocols::InteractionModel::Status::UnsupportedAccess, mpExchangeCtx, + err = StatusResponse::Send(Protocols::InteractionModel::Status::UnsupportedAccess, mExchangeCtx.Get(), /* aExpectResponse = */ false); - - if (err != CHIP_NO_ERROR) + if (err == CHIP_NO_ERROR) { - // We have to manually close the exchange, because we called - // WillSendMessage already. - mpExchangeCtx->Close(); + mSentStatusResponse = true; } - // Null out the (now-closed) exchange, so that when we try to - // SendCommandResponse() later (when our holdoff count drops to 0) it - // just fails and we don't double-respond. - mpExchangeCtx = nullptr; return err; } @@ -142,7 +135,7 @@ CHIP_ERROR CommandHandler::ProcessInvokeRequest(System::PacketBufferHandle && pa CommandDataIB::Parser commandData; ReturnErrorOnFailure(commandData.Init(invokeRequestsReader)); - if (mpExchangeCtx->IsGroupExchangeContext()) + if (mExchangeCtx->IsGroupExchangeContext()) { ReturnErrorOnFailure(ProcessGroupCommandDataIB(commandData)); } @@ -172,18 +165,6 @@ void CommandHandler::Close() VerifyOrDieWithMsg(mPendingWork == 0, DataManagement, "CommandHandler::Close() called with %u unfinished async work items", static_cast(mPendingWork)); - // OnDone below can destroy us before we unwind all the way back into the - // exchange code and it tries to close itself. Make sure that it doesn't - // try to notify us that it's closing, since we will be dead. - // - // For more details, see #10344. - if (mpExchangeCtx != nullptr) - { - mpExchangeCtx->SetDelegate(nullptr); - } - - mpExchangeCtx = nullptr; - if (mpCallback) { mpCallback->OnDone(*this); @@ -205,21 +186,12 @@ void CommandHandler::DecrementHoldOff() return; } - if (mpExchangeCtx->IsGroupExchangeContext()) - { - mpExchangeCtx->Close(); - } - else + if (!mExchangeCtx->IsGroupExchangeContext() && !mSentStatusResponse) { CHIP_ERROR err = SendCommandResponse(); if (err != CHIP_NO_ERROR) { ChipLogError(DataManagement, "Failed to send command response: %" CHIP_ERROR_FORMAT, err.Format()); - // We marked the exchange as "WillSendMessage", need to shutdown the exchange manually to avoid leaking exchanges. - if (mpExchangeCtx != nullptr) - { - mpExchangeCtx->Close(); - } } } @@ -232,11 +204,11 @@ CHIP_ERROR CommandHandler::SendCommandResponse() VerifyOrReturnError(mPendingWork == 0, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(mState == State::AddedCommand, CHIP_ERROR_INCORRECT_STATE); - VerifyOrReturnError(mpExchangeCtx != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mExchangeCtx, CHIP_ERROR_INCORRECT_STATE); ReturnErrorOnFailure(Finalize(commandPacket)); ReturnErrorOnFailure( - mpExchangeCtx->SendMessage(Protocols::InteractionModel::MsgType::InvokeCommandResponse, std::move(commandPacket))); + mExchangeCtx->SendMessage(Protocols::InteractionModel::MsgType::InvokeCommandResponse, std::move(commandPacket))); // The ExchangeContext is automatically freed here, and it makes mpExchangeCtx be temporarily dangling, but in // all cases, we are going to call Close immediately after this function, which nulls out mpExchangeCtx. @@ -290,7 +262,7 @@ CHIP_ERROR CommandHandler::ProcessCommandDataIB(CommandDataIB::Parser & aCommand } } - VerifyOrExit(mpExchangeCtx != nullptr && mpExchangeCtx->HasSessionHandle(), err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(mExchangeCtx && mExchangeCtx->HasSessionHandle(), err = CHIP_ERROR_INCORRECT_STATE); { Access::SubjectDescriptor subjectDescriptor = GetSubjectDescriptor(); @@ -379,7 +351,7 @@ CHIP_ERROR CommandHandler::ProcessGroupCommandDataIB(CommandDataIB::Parser & aCo err = commandPath.GetCommandId(&commandId); SuccessOrExit(err); - groupId = mpExchangeCtx->GetSessionHandle()->AsIncomingGroupSession()->GetGroupId(); + groupId = mExchangeCtx->GetSessionHandle()->AsIncomingGroupSession()->GetGroupId(); fabric = GetAccessingFabricIndex(); ChipLogDetail(DataManagement, "Received group command for Group=%u Cluster=" ChipLogFormatMEI " Command=" ChipLogFormatMEI, @@ -596,7 +568,7 @@ TLV::TLVWriter * CommandHandler::GetCommandDataIBTLVWriter() FabricIndex CommandHandler::GetAccessingFabricIndex() const { - return mpExchangeCtx->GetSessionHandle()->GetFabricIndex(); + return mExchangeCtx->GetSessionHandle()->GetFabricIndex(); } CommandHandler * CommandHandler::Handle::Get() @@ -666,27 +638,6 @@ void CommandHandler::MoveToState(const State aTargetState) ChipLogDetail(DataManagement, "ICR moving to [%10.10s]", GetStateStr()); } -void CommandHandler::Abort() -{ - // - // If the exchange context hasn't already been gracefully closed - // (signaled by setting it to null), then we need to forcibly - // tear it down. - // - if (mpExchangeCtx != nullptr) - { - // We might be a delegate for this exchange, and we don't want the - // OnExchangeClosing notification in that case. Null out the delegate - // to avoid that. - // - // TODO: This makes all sorts of assumptions about what the delegate is - // (notice the "might" above!) that might not hold in practice. We - // really need a better solution here.... - mpExchangeCtx->SetDelegate(nullptr); - mpExchangeCtx->Abort(); - mpExchangeCtx = nullptr; - } -} } // namespace app } // namespace chip diff --git a/src/app/CommandHandler.h b/src/app/CommandHandler.h index 200feee67a1347..da198cad0af6ef 100644 --- a/src/app/CommandHandler.h +++ b/src/app/CommandHandler.h @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include @@ -46,16 +46,9 @@ namespace chip { namespace app { -class CommandHandler +class CommandHandler : public Messaging::ExchangeDelegate { public: - /* - * Destructor - as part of destruction, it will abort the exchange context - * if a valid one still exists. - * - * See Abort() for details on when that might occur. - */ - virtual ~CommandHandler() { Abort(); } class Callback { public: @@ -221,11 +214,15 @@ class CommandHandler /** * Gets the inner exchange context object, without ownership. * + * WARNING: This is dangerous, since it is directly interacting with the + * exchange being managed automatically by mExchangeCtx and + * if not done carefully, may end up with use-after-free errors. + * * @return The inner exchange context, might be nullptr if no * exchange context has been assigned or the context * has been released. */ - Messaging::ExchangeContext * GetExchangeContext() const { return mpExchangeCtx; } + Messaging::ExchangeContext * GetExchangeContext() const { return mExchangeCtx.Get(); } /** * @brief Flush acks right away for a slow command @@ -240,18 +237,35 @@ class CommandHandler */ void FlushAcksRightAwayOnSlowCommand() { - VerifyOrReturn(mpExchangeCtx != nullptr); - auto * msgContext = mpExchangeCtx->GetReliableMessageContext(); + VerifyOrReturn(mExchangeCtx); + auto * msgContext = mExchangeCtx->GetReliableMessageContext(); VerifyOrReturn(msgContext != nullptr); msgContext->FlushAcks(); } - Access::SubjectDescriptor GetSubjectDescriptor() const { return mpExchangeCtx->GetSessionHandle()->GetSubjectDescriptor(); } + Access::SubjectDescriptor GetSubjectDescriptor() const { return mExchangeCtx->GetSessionHandle()->GetSubjectDescriptor(); } private: friend class TestCommandInteraction; friend class CommandHandler::Handle; + CHIP_ERROR OnMessageReceived(Messaging::ExchangeContext * ec, const PayloadHeader & payloadHeader, + System::PacketBufferHandle && payload) override + { + // + // We shouldn't be receiving any further messages on this exchange. + // + return CHIP_ERROR_INCORRECT_STATE; + } + + void OnResponseTimeout(Messaging::ExchangeContext * ec) override + { + // + // We're not expecting responses to any messages we send out on this EC. + // + VerifyOrDie(false); + } + enum class State { Idle, ///< Default state that the object starts out in, where no work has commenced @@ -343,14 +357,16 @@ class CommandHandler return FinishCommand(/* aEndDataStruct = */ false); } - Messaging::ExchangeContext * mpExchangeCtx = nullptr; - Callback * mpCallback = nullptr; + Messaging::ExchangeHolder mExchangeCtx; + Callback * mpCallback = nullptr; InvokeResponseMessage::Builder mInvokeResponseBuilder; TLV::TLVType mDataElementContainerType = TLV::kTLVType_NotSpecified; size_t mPendingWork = 0; bool mSuppressResponse = false; bool mTimedRequest = false; + bool mSentStatusResponse = false; + State mState = State::Idle; chip::System::PacketBufferTLVWriter mCommandMessageWriter; TLV::TLVWriter mBackupWriter; diff --git a/src/app/CommandSender.cpp b/src/app/CommandSender.cpp index 63053751240eb7..7e074df054ea6a 100644 --- a/src/app/CommandSender.cpp +++ b/src/app/CommandSender.cpp @@ -33,7 +33,8 @@ namespace chip { namespace app { CommandSender::CommandSender(Callback * apCallback, Messaging::ExchangeManager * apExchangeMgr, bool aIsTimedRequest) : - mpCallback(apCallback), mpExchangeMgr(apExchangeMgr), mSuppressResponse(false), mTimedRequest(aIsTimedRequest) + mExchangeCtx(*this), mpCallback(apCallback), mpExchangeMgr(apExchangeMgr), mSuppressResponse(false), + mTimedRequest(aIsTimedRequest) {} CHIP_ERROR CommandSender::AllocateBuffer() @@ -67,15 +68,17 @@ CHIP_ERROR CommandSender::SendCommandRequest(const SessionHandle & session, Opti ReturnErrorOnFailure(Finalize(mPendingInvokeData)); // Create a new exchange context. - mpExchangeCtx = mpExchangeMgr->NewContext(session, this); - VerifyOrReturnError(mpExchangeCtx != nullptr, CHIP_ERROR_NO_MEMORY); - VerifyOrReturnError(!mpExchangeCtx->IsGroupExchangeContext(), CHIP_ERROR_INVALID_MESSAGE_TYPE); + auto exchange = mpExchangeMgr->NewContext(session, this); + VerifyOrReturnError(exchange != nullptr, CHIP_ERROR_NO_MEMORY); - mpExchangeCtx->SetResponseTimeout(timeout.ValueOr(session->ComputeRoundTripTimeout(app::kExpectedIMProcessingTime))); + mExchangeCtx.Grab(exchange); + VerifyOrReturnError(!mExchangeCtx->IsGroupExchangeContext(), CHIP_ERROR_INVALID_MESSAGE_TYPE); + + mExchangeCtx->SetResponseTimeout(timeout.ValueOr(session->ComputeRoundTripTimeout(app::kExpectedIMProcessingTime))); if (mTimedInvokeTimeoutMs.HasValue()) { - ReturnErrorOnFailure(TimedRequest::Send(mpExchangeCtx, mTimedInvokeTimeoutMs.Value())); + ReturnErrorOnFailure(TimedRequest::Send(mExchangeCtx.Get(), mTimedInvokeTimeoutMs.Value())); MoveToState(State::AwaitingTimedStatus); return CHIP_NO_ERROR; } @@ -90,14 +93,13 @@ CHIP_ERROR CommandSender::SendGroupCommandRequest(const SessionHandle & session) ReturnErrorOnFailure(Finalize(mPendingInvokeData)); // Create a new exchange context. - mpExchangeCtx = mpExchangeMgr->NewContext(session, this); - VerifyOrReturnError(mpExchangeCtx != nullptr, CHIP_ERROR_NO_MEMORY); - VerifyOrReturnError(mpExchangeCtx->IsGroupExchangeContext(), CHIP_ERROR_INVALID_MESSAGE_TYPE); + auto exchange = mpExchangeMgr->NewContext(session, this); + VerifyOrReturnError(exchange != nullptr, CHIP_ERROR_NO_MEMORY); - ReturnErrorOnFailure(SendInvokeRequest()); + mExchangeCtx.Grab(exchange); + VerifyOrReturnError(mExchangeCtx->IsGroupExchangeContext(), CHIP_ERROR_INVALID_MESSAGE_TYPE); - // Exchange is gone now, since it closed itself on successful send. - mpExchangeCtx = nullptr; + ReturnErrorOnFailure(SendInvokeRequest()); Close(); return CHIP_NO_ERROR; @@ -108,8 +110,8 @@ CHIP_ERROR CommandSender::SendInvokeRequest() using namespace Protocols::InteractionModel; using namespace Messaging; - ReturnErrorOnFailure(mpExchangeCtx->SendMessage(MsgType::InvokeCommandRequest, std::move(mPendingInvokeData), - SendMessageFlags::kExpectResponse)); + ReturnErrorOnFailure( + mExchangeCtx->SendMessage(MsgType::InvokeCommandRequest, std::move(mPendingInvokeData), SendMessageFlags::kExpectResponse)); MoveToState(State::CommandSent); return CHIP_NO_ERROR; @@ -118,31 +120,39 @@ CHIP_ERROR CommandSender::SendInvokeRequest() CHIP_ERROR CommandSender::OnMessageReceived(Messaging::ExchangeContext * apExchangeContext, const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload) { + using namespace Protocols::InteractionModel; + if (mState == State::CommandSent) { MoveToState(State::ResponseReceived); } CHIP_ERROR err = CHIP_NO_ERROR; - VerifyOrExit(apExchangeContext == mpExchangeCtx, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(apExchangeContext == mExchangeCtx.Get(), err = CHIP_ERROR_INCORRECT_STATE); if (mState == State::AwaitingTimedStatus) { - err = HandleTimedStatus(aPayloadHeader, std::move(aPayload)); + VerifyOrExit(aPayloadHeader.HasMessageType(MsgType::StatusResponse), err = CHIP_ERROR_INVALID_MESSAGE_TYPE); + CHIP_ERROR statusError = CHIP_NO_ERROR; + SuccessOrExit(err = StatusResponse::ProcessStatusResponse(std::move(aPayload), statusError)); + SuccessOrExit(err = statusError); + err = SendInvokeRequest(); // Skip all other processing here (which is for the response to the // invoke request), no matter whether err is success or not. goto exit; } - if (aPayloadHeader.HasMessageType(Protocols::InteractionModel::MsgType::InvokeCommandResponse)) + if (aPayloadHeader.HasMessageType(MsgType::InvokeCommandResponse)) { err = ProcessInvokeResponse(std::move(aPayload)); SuccessOrExit(err); } - else if (aPayloadHeader.HasMessageType(Protocols::InteractionModel::MsgType::StatusResponse)) + else if (aPayloadHeader.HasMessageType(MsgType::StatusResponse)) { - err = StatusResponse::ProcessStatusResponse(std::move(aPayload)); - SuccessOrExit(err); + CHIP_ERROR statusError = CHIP_NO_ERROR; + SuccessOrExit(err = StatusResponse::ProcessStatusResponse(std::move(aPayload), statusError)); + SuccessOrExit(err = statusError); + err = CHIP_ERROR_INVALID_MESSAGE_TYPE; } else { @@ -223,18 +233,6 @@ void CommandSender::Close() mTimedRequest = false; MoveToState(State::AwaitingDestruction); - // OnDone below can destroy us before we unwind all the way back into the - // exchange code and it tries to close itself. Make sure that it doesn't - // try to notify us that it's closing, since we will be dead. - // - // For more details, see #10344. - if (mpExchangeCtx != nullptr) - { - mpExchangeCtx->SetDelegate(nullptr); - } - - mpExchangeCtx = nullptr; - if (mpCallback) { mpCallback->OnDone(this); @@ -379,13 +377,6 @@ TLV::TLVWriter * CommandSender::GetCommandDataIBTLVWriter() return mInvokeRequestBuilder.GetInvokeRequests().GetCommandData().GetWriter(); } -CHIP_ERROR CommandSender::HandleTimedStatus(const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload) -{ - ReturnErrorOnFailure(TimedRequest::HandleResponse(aPayloadHeader, std::move(aPayload))); - - return SendInvokeRequest(); -} - CHIP_ERROR CommandSender::FinishCommand(const Optional & aTimedInvokeTimeoutMs) { ReturnErrorOnFailure(FinishCommand(/* aEndDataStruct = */ false)); @@ -443,27 +434,5 @@ void CommandSender::MoveToState(const State aTargetState) ChipLogDetail(DataManagement, "ICR moving to [%10.10s]", GetStateStr()); } -void CommandSender::Abort() -{ - // - // If the exchange context hasn't already been gracefully closed - // (signaled by setting it to null), then we need to forcibly - // tear it down. - // - if (mpExchangeCtx != nullptr) - { - // We might be a delegate for this exchange, and we don't want the - // OnExchangeClosing notification in that case. Null out the delegate - // to avoid that. - // - // TODO: This makes all sorts of assumptions about what the delegate is - // (notice the "might" above!) that might not hold in practice. We - // really need a better solution here.... - mpExchangeCtx->SetDelegate(nullptr); - mpExchangeCtx->Abort(); - mpExchangeCtx = nullptr; - } -} - } // namespace app } // namespace chip diff --git a/src/app/CommandSender.h b/src/app/CommandSender.h index f0f0f945c7f8a4..ab02fe9529517c 100644 --- a/src/app/CommandSender.h +++ b/src/app/CommandSender.h @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include @@ -53,23 +53,6 @@ namespace app { class CommandSender final : public Messaging::ExchangeDelegate { public: - /* - * Destructor - as part of destruction, it will abort the exchange context - * if a valid one still exists. - * - * See Abort() for details on when that might occur. - */ - ~CommandSender() override { Abort(); } - - /** - * Gets the inner exchange context object, without ownership. - * - * @return The inner exchange context, might be nullptr if no - * exchange context has been assigned or the context - * has been released. - */ - Messaging::ExchangeContext * GetExchangeContext() const { return mpExchangeCtx; } - class Callback { public: @@ -276,21 +259,13 @@ class CommandSender final : public Messaging::ExchangeDelegate CHIP_ERROR ProcessInvokeResponse(System::PacketBufferHandle && payload); CHIP_ERROR ProcessInvokeResponseIB(InvokeResponseIB::Parser & aInvokeResponse); - // Handle a message received when we are expecting a status response to a - // Timed Request. The caller is assumed to have already checked that our - // exchange context member is the one the message came in on. - // - // If the server returned an error status, that will be returned as an error - // value of CHIP_ERROR. - CHIP_ERROR HandleTimedStatus(const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload); - // Send our queued-up Invoke Request message. Assumes the exchange is ready // and mPendingInvokeData is populated. CHIP_ERROR SendInvokeRequest(); CHIP_ERROR Finalize(System::PacketBufferHandle & commandPacket); - Messaging::ExchangeContext * mpExchangeCtx = nullptr; + Messaging::ExchangeHolder mExchangeCtx; Callback * mpCallback = nullptr; Messaging::ExchangeManager * mpExchangeMgr = nullptr; InvokeRequestMessage::Builder mInvokeRequestBuilder; diff --git a/src/app/DeviceProxy.h b/src/app/DeviceProxy.h index ce9a3909561ebc..3315576065b6ed 100644 --- a/src/app/DeviceProxy.h +++ b/src/app/DeviceProxy.h @@ -27,7 +27,6 @@ #pragma once #include -#include #include #include #include diff --git a/src/app/EventManagement.cpp b/src/app/EventManagement.cpp index 6aa5c79a442c09..f7ca6fa6a2a929 100644 --- a/src/app/EventManagement.cpp +++ b/src/app/EventManagement.cpp @@ -518,30 +518,6 @@ CHIP_ERROR EventManagement::CopyEvent(const TLVReader & aReader, TLVWriter & aWr return CHIP_NO_ERROR; } -CHIP_ERROR EventManagement::WriteEventStatusIB(TLVWriter & aWriter, const ConcreteEventPath & aEvent, StatusIB aStatus) -{ - TLVType containerType; - ReturnErrorOnFailure(aWriter.StartContainer(AnonymousTag(), kTLVType_Structure, containerType)); - - EventStatusIB::Builder builder; - builder.Init(&aWriter, to_underlying(EventReportIB::Tag::kEventStatus)); - - ReturnErrorOnFailure(builder.CreatePath() - .Endpoint(aEvent.mEndpointId) - .Cluster(aEvent.mClusterId) - .Event(aEvent.mEventId) - .EndOfEventPathIB() - .GetError()); - - ReturnErrorOnFailure(builder.CreateErrorStatus().EncodeStatusIB(aStatus).GetError()); - - ReturnErrorOnFailure(builder.EndOfEventStatusIB().GetError()); - - ReturnErrorOnFailure(aWriter.EndContainer(containerType)); - ReturnErrorOnFailure(aWriter.Finalize()); - return CHIP_NO_ERROR; -} - CHIP_ERROR EventManagement::CheckEventContext(EventLoadOutContext * eventLoadOutContext, const EventManagement::EventEnvelopeContext & event) { @@ -560,19 +536,13 @@ CHIP_ERROR EventManagement::CheckEventContext(EventLoadOutContext * eventLoadOut ConcreteEventPath path(event.mEndpointId, event.mClusterId, event.mEventId); CHIP_ERROR ret = CHIP_ERROR_UNEXPECTED_EVENT; - bool eventReadViaConcretePath = false; - for (auto * interestedPath = eventLoadOutContext->mpInterestedEventPaths; interestedPath != nullptr; interestedPath = interestedPath->mpNext) { if (interestedPath->mValue.IsEventPathSupersetOf(path)) { ret = CHIP_NO_ERROR; - if (!interestedPath->mValue.HasEventWildcard()) - { - eventReadViaConcretePath = true; - break; - } + break; } } @@ -582,18 +552,10 @@ CHIP_ERROR EventManagement::CheckEventContext(EventLoadOutContext * eventLoadOut Access::Privilege requestPrivilege = RequiredPrivilege::ForReadEvent(path); CHIP_ERROR accessControlError = Access::GetAccessControl().Check(eventLoadOutContext->mSubjectDescriptor, requestPath, requestPrivilege); - if (accessControlError != CHIP_NO_ERROR) { ReturnErrorCodeIf(accessControlError != CHIP_ERROR_ACCESS_DENIED, accessControlError); - if (eventReadViaConcretePath) - { - ret = CHIP_ERROR_ACCESS_DENIED; - } - else - { - ret = CHIP_ERROR_UNEXPECTED_EVENT; - } + ret = CHIP_ERROR_UNEXPECTED_EVENT; } return ret; @@ -668,24 +630,6 @@ CHIP_ERROR EventManagement::CopyEventsSince(const TLVReader & aReader, size_t aD loadOutContext->mFirst = false; loadOutContext->mEventCount++; } - else if (err == CHIP_ERROR_ACCESS_DENIED) - { - // checkpoint the writer - TLV::TLVWriter checkpoint = loadOutContext->mWriter; - - err = WriteEventStatusIB(loadOutContext->mWriter, ConcreteEventPath(event.mEndpointId, event.mClusterId, event.mEventId), - StatusIB(Protocols::InteractionModel::Status::UnsupportedAccess)); - - if (err != CHIP_NO_ERROR) - { - loadOutContext->mWriter = checkpoint; - return err; - } - - loadOutContext->mPreviousTime.mValue = loadOutContext->mCurrentTime.mValue; - loadOutContext->mFirst = false; - loadOutContext->mEventCount++; - } return err; } diff --git a/src/app/EventManagement.h b/src/app/EventManagement.h index 580435ea9f770c..a59959465d7e1a 100644 --- a/src/app/EventManagement.h +++ b/src/app/EventManagement.h @@ -490,11 +490,6 @@ class EventManagement */ static CHIP_ERROR CopyEvent(const TLV::TLVReader & aReader, TLV::TLVWriter & aWriter, EventLoadOutContext * apContext); - /** - * @brief construct EventStatusIB to target buffer for report - */ - static CHIP_ERROR WriteEventStatusIB(TLV::TLVWriter & aWriter, const ConcreteEventPath & aEvent, StatusIB aStatus); - /** * @brief * A function to get the circular buffer for particular priority diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index d6dbc2058836b6..e4f76d46d113b5 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -43,13 +43,17 @@ InteractionModelEngine * InteractionModelEngine::GetInstance() return &sInteractionModelEngine; } -CHIP_ERROR InteractionModelEngine::Init(Messaging::ExchangeManager * apExchangeMgr, FabricTable * apFabricTable) +CHIP_ERROR InteractionModelEngine::Init(Messaging::ExchangeManager * apExchangeMgr, FabricTable * apFabricTable, + CASESessionManager * apCASESessionMgr) { - mpExchangeMgr = apExchangeMgr; - mpFabricTable = apFabricTable; + VerifyOrReturnError(apFabricTable != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(apExchangeMgr != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + + mpExchangeMgr = apExchangeMgr; + mpFabricTable = apFabricTable; + mpCASESessionMgr = apCASESessionMgr; ReturnErrorOnFailure(mpExchangeMgr->RegisterUnsolicitedMessageHandlerForProtocol(Protocols::InteractionModel::Id, this)); - VerifyOrReturnError(mpFabricTable != nullptr, CHIP_ERROR_INVALID_ARGUMENT); mReportingEngine.Init(); mMagic++; @@ -122,6 +126,16 @@ void InteractionModelEngine::Shutdown() mEventPathPool.ReleaseAll(); mDataVersionFilterPool.ReleaseAll(); mpExchangeMgr->UnregisterUnsolicitedMessageHandlerForProtocol(Protocols::InteractionModel::Id); + + mpCASESessionMgr = nullptr; + + // + // We _should_ be clearing these out, but doing so invites a world + // of trouble. #21233 tracks fixing the underlying assumptions to make + // this possible. + // + // mpFabricTable = nullptr; + // mpExchangeMgr = nullptr; } uint32_t InteractionModelEngine::GetNumActiveReadHandlers() const diff --git a/src/app/InteractionModelEngine.h b/src/app/InteractionModelEngine.h index e5e414bc746a9f..208b88d29bfa60 100644 --- a/src/app/InteractionModelEngine.h +++ b/src/app/InteractionModelEngine.h @@ -59,6 +59,8 @@ #include #include +#include + namespace chip { namespace app { @@ -102,17 +104,26 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, * Initialize the InteractionModel Engine. * * @param[in] apExchangeMgr A pointer to the ExchangeManager object. + * @param[in] apFabricTable A pointer to the FabricTable object. + * @param[in] apCASESessionMgr An optional pointer to a CASESessionManager (used for re-subscriptions). * * @retval #CHIP_ERROR_INCORRECT_STATE If the state is not equal to * kState_NotInitialized. * @retval #CHIP_NO_ERROR On success. * */ - CHIP_ERROR Init(Messaging::ExchangeManager * apExchangeMgr, FabricTable * apFabricTable); + CHIP_ERROR Init(Messaging::ExchangeManager * apExchangeMgr, FabricTable * apFabricTable, + CASESessionManager * apCASESessionMgr = nullptr); void Shutdown(); - Messaging::ExchangeManager * GetExchangeManager(void) const { return mpExchangeMgr; }; + Messaging::ExchangeManager * GetExchangeManager(void) const { return mpExchangeMgr; } + + /** + * Returns a pointer to the CASESessionManager. This can return nullptr if one wasn't + * provided in the call to Init(). + */ + CASESessionManager * GetCASESessionManager() const { return mpCASESessionMgr; } /** * Tears down an active subscription. @@ -551,6 +562,8 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, FabricTable * mpFabricTable; + CASESessionManager * mpCASESessionMgr = nullptr; + // A magic number for tracking values between stack Shutdown()-s and Init()-s. // An ObjectHandle is valid iff. its magic equals to this one. uint32_t mMagic = 0; diff --git a/src/app/MessageDef/AttributeDataIB.cpp b/src/app/MessageDef/AttributeDataIB.cpp index 35d6003ef44a89..61f6bb88f0eb7e 100644 --- a/src/app/MessageDef/AttributeDataIB.cpp +++ b/src/app/MessageDef/AttributeDataIB.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/AttributeDataIBs.cpp b/src/app/MessageDef/AttributeDataIBs.cpp index fdb9f57f6b948b..f0068a8838420c 100644 --- a/src/app/MessageDef/AttributeDataIBs.cpp +++ b/src/app/MessageDef/AttributeDataIBs.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include using namespace chip; using namespace chip::TLV; diff --git a/src/app/MessageDef/AttributePathIB.cpp b/src/app/MessageDef/AttributePathIB.cpp index 6750471d849a0e..c8d0fa51d29f4c 100644 --- a/src/app/MessageDef/AttributePathIB.cpp +++ b/src/app/MessageDef/AttributePathIB.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/src/app/MessageDef/AttributePathIBs.cpp b/src/app/MessageDef/AttributePathIBs.cpp index 4a04dc0e47be0e..8b88e7e9e3361d 100644 --- a/src/app/MessageDef/AttributePathIBs.cpp +++ b/src/app/MessageDef/AttributePathIBs.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/AttributeReportIB.cpp b/src/app/MessageDef/AttributeReportIB.cpp index cf8671bc19c07e..e08eb37ac77ce3 100644 --- a/src/app/MessageDef/AttributeReportIB.cpp +++ b/src/app/MessageDef/AttributeReportIB.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/AttributeReportIBs.cpp b/src/app/MessageDef/AttributeReportIBs.cpp index 83b7b634416b50..001fbff077acc9 100644 --- a/src/app/MessageDef/AttributeReportIBs.cpp +++ b/src/app/MessageDef/AttributeReportIBs.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/AttributeStatusIB.cpp b/src/app/MessageDef/AttributeStatusIB.cpp index 8b8fa5d87b45b2..5c0e92b7020b03 100644 --- a/src/app/MessageDef/AttributeStatusIB.cpp +++ b/src/app/MessageDef/AttributeStatusIB.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/AttributeStatusIBs.cpp b/src/app/MessageDef/AttributeStatusIBs.cpp index e07e277f899c36..a10106aad28c34 100644 --- a/src/app/MessageDef/AttributeStatusIBs.cpp +++ b/src/app/MessageDef/AttributeStatusIBs.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/ClusterPathIB.cpp b/src/app/MessageDef/ClusterPathIB.cpp index d92efbb7decce6..8223d63507a1cd 100644 --- a/src/app/MessageDef/ClusterPathIB.cpp +++ b/src/app/MessageDef/ClusterPathIB.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/CommandDataIB.cpp b/src/app/MessageDef/CommandDataIB.cpp index c6c995420fb0f0..61978f2e564b52 100644 --- a/src/app/MessageDef/CommandDataIB.cpp +++ b/src/app/MessageDef/CommandDataIB.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/CommandPathIB.cpp b/src/app/MessageDef/CommandPathIB.cpp index c944b7fcb78cd4..be9117d3679613 100644 --- a/src/app/MessageDef/CommandPathIB.cpp +++ b/src/app/MessageDef/CommandPathIB.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include using namespace chip; using namespace chip::TLV; diff --git a/src/app/MessageDef/CommandStatusIB.cpp b/src/app/MessageDef/CommandStatusIB.cpp index f7ccce23bc774b..797ec655e3eef4 100644 --- a/src/app/MessageDef/CommandStatusIB.cpp +++ b/src/app/MessageDef/CommandStatusIB.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/DataVersionFilterIB.cpp b/src/app/MessageDef/DataVersionFilterIB.cpp index 9416fb0b6d04d6..00d1d28b0ff927 100644 --- a/src/app/MessageDef/DataVersionFilterIB.cpp +++ b/src/app/MessageDef/DataVersionFilterIB.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/DataVersionFilterIBs.cpp b/src/app/MessageDef/DataVersionFilterIBs.cpp index ee646584d95f14..eb6a18951ef6db 100644 --- a/src/app/MessageDef/DataVersionFilterIBs.cpp +++ b/src/app/MessageDef/DataVersionFilterIBs.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/EventDataIB.cpp b/src/app/MessageDef/EventDataIB.cpp index e5f228f52a7090..cd70cb4f38bda4 100644 --- a/src/app/MessageDef/EventDataIB.cpp +++ b/src/app/MessageDef/EventDataIB.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/EventFilterIB.cpp b/src/app/MessageDef/EventFilterIB.cpp index 86aebf3c64c575..9264c1d87d6f31 100644 --- a/src/app/MessageDef/EventFilterIB.cpp +++ b/src/app/MessageDef/EventFilterIB.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/EventFilterIBs.cpp b/src/app/MessageDef/EventFilterIBs.cpp index 4c97fc1c5ff743..66023c856fa126 100644 --- a/src/app/MessageDef/EventFilterIBs.cpp +++ b/src/app/MessageDef/EventFilterIBs.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/EventPathIB.cpp b/src/app/MessageDef/EventPathIB.cpp index ff1478b12a7bcb..35c5b098b94c55 100644 --- a/src/app/MessageDef/EventPathIB.cpp +++ b/src/app/MessageDef/EventPathIB.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/EventPathIBs.cpp b/src/app/MessageDef/EventPathIBs.cpp index b3fd026d41e4f9..673141fcd8e1a1 100644 --- a/src/app/MessageDef/EventPathIBs.cpp +++ b/src/app/MessageDef/EventPathIBs.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/EventReportIB.cpp b/src/app/MessageDef/EventReportIB.cpp index 6c3311f9a54397..c9eaec4d98f85d 100644 --- a/src/app/MessageDef/EventReportIB.cpp +++ b/src/app/MessageDef/EventReportIB.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include namespace chip { namespace app { @@ -149,5 +149,27 @@ EventReportIB::Builder & EventReportIB::Builder::EndOfEventReportIB() EndOfContainer(); return *this; } + +CHIP_ERROR EventReportIB::ConstructEventStatusIB(TLV::TLVWriter & aWriter, const ConcreteEventPath & aEvent, StatusIB aStatus) +{ + Builder eventReportIBBuilder; + ReturnErrorOnFailure(eventReportIBBuilder.Init(&aWriter)); + EventStatusIB::Builder & eventStatusIBBuilder = eventReportIBBuilder.CreateEventStatus(); + ReturnErrorOnFailure(eventReportIBBuilder.GetError()); + EventPathIB::Builder & eventPathIBBuilder = eventStatusIBBuilder.CreatePath(); + ReturnErrorOnFailure(eventStatusIBBuilder.GetError()); + ReturnErrorOnFailure(eventPathIBBuilder.Endpoint(aEvent.mEndpointId) + .Cluster(aEvent.mClusterId) + .Event(aEvent.mEventId) + .EndOfEventPathIB() + .GetError()); + + ReturnErrorOnFailure(eventStatusIBBuilder.CreateErrorStatus().EncodeStatusIB(aStatus).GetError()); + + ReturnErrorOnFailure(eventStatusIBBuilder.EndOfEventStatusIB().GetError()); + ReturnErrorOnFailure(eventReportIBBuilder.EndOfEventReportIB().GetError()); + ReturnErrorOnFailure(aWriter.Finalize()); + return CHIP_NO_ERROR; +} } // namespace app } // namespace chip diff --git a/src/app/MessageDef/EventReportIB.h b/src/app/MessageDef/EventReportIB.h index 69f02af6241910..ee2a49d6c38e63 100644 --- a/src/app/MessageDef/EventReportIB.h +++ b/src/app/MessageDef/EventReportIB.h @@ -109,6 +109,11 @@ class Builder : public StructBuilder EventStatusIB::Builder mEventStatus; EventDataIB::Builder mEventData; }; + +/** + * @brief construct EventStatusIB to target buffer for report + */ +CHIP_ERROR ConstructEventStatusIB(TLV::TLVWriter & aWriter, const ConcreteEventPath & aEvent, StatusIB aStatus); } // namespace EventReportIB } // namespace app } // namespace chip diff --git a/src/app/MessageDef/EventReportIBs.cpp b/src/app/MessageDef/EventReportIBs.cpp index 6229be6b664d83..2a4099a0e09a62 100644 --- a/src/app/MessageDef/EventReportIBs.cpp +++ b/src/app/MessageDef/EventReportIBs.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/EventStatusIB.cpp b/src/app/MessageDef/EventStatusIB.cpp index 449fe7103c6828..dd8c5f4b9f671b 100644 --- a/src/app/MessageDef/EventStatusIB.cpp +++ b/src/app/MessageDef/EventStatusIB.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/InvokeRequestMessage.cpp b/src/app/MessageDef/InvokeRequestMessage.cpp index 3d0a28f9fc500a..13d54fc6fdabc9 100644 --- a/src/app/MessageDef/InvokeRequestMessage.cpp +++ b/src/app/MessageDef/InvokeRequestMessage.cpp @@ -21,7 +21,7 @@ #include "InvokeRequestMessage.h" #include "MessageDefHelper.h" -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/InvokeRequests.cpp b/src/app/MessageDef/InvokeRequests.cpp index 89c50e65e26e23..5d140a6589c2ec 100644 --- a/src/app/MessageDef/InvokeRequests.cpp +++ b/src/app/MessageDef/InvokeRequests.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/InvokeResponseIB.cpp b/src/app/MessageDef/InvokeResponseIB.cpp index e140072918dd0b..1fbae7a7139c15 100644 --- a/src/app/MessageDef/InvokeResponseIB.cpp +++ b/src/app/MessageDef/InvokeResponseIB.cpp @@ -21,7 +21,7 @@ #include "InvokeResponseIB.h" #include "MessageDefHelper.h" -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/InvokeResponseIBs.cpp b/src/app/MessageDef/InvokeResponseIBs.cpp index 3404599c9bbdf2..6ea80a27fd4b00 100644 --- a/src/app/MessageDef/InvokeResponseIBs.cpp +++ b/src/app/MessageDef/InvokeResponseIBs.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/InvokeResponseMessage.cpp b/src/app/MessageDef/InvokeResponseMessage.cpp index 1aec93b611907f..50de3efa4959d6 100644 --- a/src/app/MessageDef/InvokeResponseMessage.cpp +++ b/src/app/MessageDef/InvokeResponseMessage.cpp @@ -21,7 +21,7 @@ #include "InvokeResponseMessage.h" #include "MessageDefHelper.h" -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/MessageDefHelper.cpp b/src/app/MessageDef/MessageDefHelper.cpp index 5e65ad5a1c258e..0ff06438baca57 100644 --- a/src/app/MessageDef/MessageDefHelper.cpp +++ b/src/app/MessageDef/MessageDefHelper.cpp @@ -23,7 +23,7 @@ #include "MessageDefHelper.h" #include -#include +#include #include #include #include diff --git a/src/app/MessageDef/ReadRequestMessage.cpp b/src/app/MessageDef/ReadRequestMessage.cpp index d5837db6684f58..dda2dbf62c7c84 100644 --- a/src/app/MessageDef/ReadRequestMessage.cpp +++ b/src/app/MessageDef/ReadRequestMessage.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/ReportDataMessage.cpp b/src/app/MessageDef/ReportDataMessage.cpp index ee32ec1a024c60..de95a7532b7461 100644 --- a/src/app/MessageDef/ReportDataMessage.cpp +++ b/src/app/MessageDef/ReportDataMessage.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include using namespace chip; diff --git a/src/app/MessageDef/StatusIB.cpp b/src/app/MessageDef/StatusIB.cpp index 19957a312183a7..d82c7da859b72d 100644 --- a/src/app/MessageDef/StatusIB.cpp +++ b/src/app/MessageDef/StatusIB.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include using namespace chip; diff --git a/src/app/MessageDef/WriteRequestMessage.cpp b/src/app/MessageDef/WriteRequestMessage.cpp index c315231c661fcb..4b19a66dfba22f 100644 --- a/src/app/MessageDef/WriteRequestMessage.cpp +++ b/src/app/MessageDef/WriteRequestMessage.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/MessageDef/WriteResponseMessage.cpp b/src/app/MessageDef/WriteResponseMessage.cpp index ea7b7bbc5d15c8..f0bab4d3abc2a1 100644 --- a/src/app/MessageDef/WriteResponseMessage.cpp +++ b/src/app/MessageDef/WriteResponseMessage.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include namespace chip { namespace app { diff --git a/src/app/OperationalDeviceProxy.cpp b/src/app/OperationalDeviceProxy.cpp index 33373f79996a88..45386ca6626995 100644 --- a/src/app/OperationalDeviceProxy.cpp +++ b/src/app/OperationalDeviceProxy.cpp @@ -24,12 +24,11 @@ * messages to and from the corresponding CHIP devices. */ -#include "OperationalDeviceProxy.h" +#include -#include "CASEClient.h" -#include "CommandSender.h" -#include "ReadPrepareParams.h" -#include "transport/SecureSession.h" +#include +#include +#include #include #include @@ -50,8 +49,8 @@ void OperationalDeviceProxy::MoveToState(State aTargetState) { if (mState != aTargetState) { - ChipLogDetail(Controller, "OperationalDeviceProxy[" ChipLogFormatX64 ":" ChipLogFormatX64 "]: State change %d --> %d", - ChipLogValueX64(mPeerId.GetCompressedFabricId()), ChipLogValueX64(mPeerId.GetNodeId()), to_underlying(mState), + ChipLogDetail(Controller, "OperationalDeviceProxy[%u:" ChipLogFormatX64 "]: State change %d --> %d", + mPeerId.GetFabricIndex(), ChipLogValueX64(mPeerId.GetNodeId()), to_underlying(mState), to_underlying(aTargetState)); mState = aTargetState; @@ -66,14 +65,14 @@ bool OperationalDeviceProxy::AttachToExistingSecureSession() { VerifyOrReturnError(mState == State::NeedsAddress || mState == State::ResolvingAddress || mState == State::HasAddress, false); - ScopedNodeId peerNodeId(mPeerId.GetNodeId(), mFabricIndex); auto sessionHandle = - mInitParams.sessionManager->FindSecureSessionForNode(peerNodeId, MakeOptional(Transport::SecureSession::Type::kCASE)); + mInitParams.sessionManager->FindSecureSessionForNode(mPeerId, MakeOptional(Transport::SecureSession::Type::kCASE)); if (!sessionHandle.HasValue()) return false; - ChipLogProgress(Controller, "Found an existing secure session to [" ChipLogFormatX64 "-" ChipLogFormatX64 "]!", - ChipLogValueX64(mPeerId.GetCompressedFabricId()), ChipLogValueX64(mPeerId.GetNodeId())); + ChipLogProgress(Controller, "Found an existing secure session to [%u:" ChipLogFormatX64 "]!", mPeerId.GetFabricIndex(), + ChipLogValueX64(mPeerId.GetNodeId())); + mDeviceAddress = sessionHandle.Value()->AsSecureSession()->GetPeerAddress(); if (!mSecureSession.Grab(sessionHandle.Value())) return false; @@ -169,7 +168,8 @@ void OperationalDeviceProxy::UpdateDeviceData(const Transport::PeerAddress & add char peerAddrBuff[Transport::PeerAddress::kMaxToStringSize]; addr.ToString(peerAddrBuff); - ChipLogDetail(Controller, "Updating device address to %s while in state %d", peerAddrBuff, static_cast(mState)); + ChipLogDetail(Discovery, "OperationalDeviceProxy[%u:" ChipLogFormatX64 "]: Updating device address to %s while in state %d", + mPeerId.GetFabricIndex(), ChipLogValueX64(mPeerId.GetNodeId()), peerAddrBuff, static_cast(mState)); #endif CHIP_ERROR err = CHIP_NO_ERROR; @@ -212,7 +212,7 @@ CHIP_ERROR OperationalDeviceProxy::EstablishConnection() { mCASEClient = mInitParams.clientPool->Allocate(CASEClientInitParams{ mInitParams.sessionManager, mInitParams.sessionResumptionStorage, mInitParams.certificateValidityPolicy, - mInitParams.exchangeMgr, mFabricTable, mFabricIndex, mInitParams.groupDataProvider, mInitParams.mrpLocalConfig }); + mInitParams.exchangeMgr, mFabricTable, mInitParams.groupDataProvider, mInitParams.mrpLocalConfig }); ReturnErrorCodeIf(mCASEClient == nullptr, CHIP_ERROR_NO_MEMORY); CHIP_ERROR err = mCASEClient->EstablishSession(mPeerId, mDeviceAddress, mRemoteMRPConfig, this); @@ -359,14 +359,17 @@ void OperationalDeviceProxy::OnSessionHang() void OperationalDeviceProxy::ShutdownSubscriptions() { - app::InteractionModelEngine::GetInstance()->ShutdownSubscriptions(mFabricIndex, GetDeviceId()); + app::InteractionModelEngine::GetInstance()->ShutdownSubscriptions(mPeerId.GetFabricIndex(), GetDeviceId()); } OperationalDeviceProxy::~OperationalDeviceProxy() { if (mAddressLookupHandle.IsActive()) { - ChipLogProgress(Discovery, "Cancelling incomplete address resolution as device is being deleted."); + ChipLogDetail(Discovery, + "OperationalDeviceProxy[%u:" ChipLogFormatX64 + "]: Cancelling incomplete address resolution as device is being deleted.", + mPeerId.GetFabricIndex(), ChipLogValueX64(mPeerId.GetNodeId())); // Skip cancel callback since the destructor is being called, so we assume that this object is // obviously not used anymore @@ -391,11 +394,19 @@ CHIP_ERROR OperationalDeviceProxy::LookupPeerAddress() // MoveToState calls in this method. if (mAddressLookupHandle.IsActive()) { - ChipLogProgress(Discovery, "Operational node lookup already in progress. Will NOT start a new one."); + ChipLogProgress(Discovery, + "OperationalDeviceProxy[%u:" ChipLogFormatX64 + "]: Operational node lookup already in progress. Will NOT start a new one.", + mPeerId.GetFabricIndex(), ChipLogValueX64(mPeerId.GetNodeId())); return CHIP_NO_ERROR; } - NodeLookupRequest request(mPeerId); + auto const * fabricInfo = mFabricTable->FindFabricWithIndex(mPeerId.GetFabricIndex()); + VerifyOrReturnError(fabricInfo != nullptr, CHIP_ERROR_INVALID_FABRIC_INDEX); + + PeerId peerId(fabricInfo->GetCompressedFabricId(), mPeerId.GetNodeId()); + + NodeLookupRequest request(peerId); return Resolver::Instance().LookupNode(request, mAddressLookupHandle); } @@ -407,8 +418,8 @@ void OperationalDeviceProxy::OnNodeAddressResolved(const PeerId & peerId, const void OperationalDeviceProxy::OnNodeAddressResolutionFailed(const PeerId & peerId, CHIP_ERROR reason) { - ChipLogError(Discovery, "Operational discovery failed for 0x" ChipLogFormatX64 ": %" CHIP_ERROR_FORMAT, - ChipLogValueX64(peerId.GetNodeId()), reason.Format()); + ChipLogError(Discovery, "OperationalDeviceProxy[%u:" ChipLogFormatX64 "]: operational discovery failed: %" CHIP_ERROR_FORMAT, + mPeerId.GetFabricIndex(), ChipLogValueX64(mPeerId.GetNodeId()), reason.Format()); if (IsResolvingAddress()) { diff --git a/src/app/OperationalDeviceProxy.h b/src/app/OperationalDeviceProxy.h index 3adf96b39af08a..f83bb7a2ab9613 100644 --- a/src/app/OperationalDeviceProxy.h +++ b/src/app/OperationalDeviceProxy.h @@ -73,7 +73,7 @@ struct DeviceProxyInitParams class OperationalDeviceProxy; typedef void (*OnDeviceConnected)(void * context, OperationalDeviceProxy * device); -typedef void (*OnDeviceConnectionFailure)(void * context, PeerId peerId, CHIP_ERROR error); +typedef void (*OnDeviceConnectionFailure)(void * context, const ScopedNodeId & peerId, CHIP_ERROR error); /** * Represents a connection path to a device that is in an operational state. @@ -92,10 +92,7 @@ class DLL_EXPORT OperationalDeviceProxy : public DeviceProxy, public: ~OperationalDeviceProxy() override; - // - // TODO: Should not be PeerId, but rather, ScopedNodeId - // - OperationalDeviceProxy(DeviceProxyInitParams & params, PeerId peerId) : mSecureSession(*this) + OperationalDeviceProxy(DeviceProxyInitParams & params, ScopedNodeId peerId) : mSecureSession(*this) { mInitParams = params; if (params.Validate() != CHIP_NO_ERROR) @@ -107,15 +104,7 @@ class DLL_EXPORT OperationalDeviceProxy : public DeviceProxy, mSystemLayer = params.exchangeMgr->GetSessionManager()->SystemLayer(); mPeerId = peerId; mFabricTable = params.fabricTable; - if (mFabricTable != nullptr) - { - auto fabricInfo = params.fabricTable->FindFabricWithCompressedId(peerId.GetCompressedFabricId()); - if (fabricInfo != nullptr) - { - mFabricIndex = fabricInfo->GetFabricIndex(); - } - } - mState = State::NeedsAddress; + mState = State::NeedsAddress; mAddressLookupHandle.SetListener(this); } @@ -171,7 +160,7 @@ class DLL_EXPORT OperationalDeviceProxy : public DeviceProxy, NodeId GetDeviceId() const override { return mPeerId.GetNodeId(); } - PeerId GetPeerId() const { return mPeerId; } + ScopedNodeId GetPeerId() const { return mPeerId; } void ShutdownSubscriptions() override; @@ -201,7 +190,7 @@ class DLL_EXPORT OperationalDeviceProxy : public DeviceProxy, /** * @brief Get the fabricIndex */ - FabricIndex GetFabricIndex() const { return mFabricIndex; } + FabricIndex GetFabricIndex() const { return mPeerId.GetFabricIndex(); } /** * Triggers a DNSSD lookup to find a usable peer address for this operational device. @@ -225,14 +214,13 @@ class DLL_EXPORT OperationalDeviceProxy : public DeviceProxy, DeviceProxyInitParams mInitParams; FabricTable * mFabricTable = nullptr; - FabricIndex mFabricIndex = kUndefinedFabricIndex; System::Layer * mSystemLayer; // mCASEClient is only non-null if we are in State::Connecting or just // allocated it as part of an attempt to enter State::Connecting. CASEClient * mCASEClient = nullptr; - PeerId mPeerId; + ScopedNodeId mPeerId; Transport::PeerAddress mDeviceAddress = Transport::PeerAddress::UDP(Inet::IPAddress::Any); diff --git a/src/app/OperationalDeviceProxyPool.h b/src/app/OperationalDeviceProxyPool.h index c6f3d7e136f152..5413624c4d9016 100644 --- a/src/app/OperationalDeviceProxyPool.h +++ b/src/app/OperationalDeviceProxyPool.h @@ -26,11 +26,11 @@ namespace chip { class OperationalDeviceProxyPoolDelegate { public: - virtual OperationalDeviceProxy * Allocate(DeviceProxyInitParams & params, PeerId peerId) = 0; + virtual OperationalDeviceProxy * Allocate(DeviceProxyInitParams & params, ScopedNodeId peerId) = 0; virtual void Release(OperationalDeviceProxy * device) = 0; - virtual OperationalDeviceProxy * FindDevice(PeerId peerId) = 0; + virtual OperationalDeviceProxy * FindDevice(ScopedNodeId peerId) = 0; virtual void ReleaseDevicesForFabric(FabricIndex fabricIndex) = 0; @@ -45,14 +45,14 @@ class OperationalDeviceProxyPool : public OperationalDeviceProxyPoolDelegate public: ~OperationalDeviceProxyPool() override { mDevicePool.ReleaseAll(); } - OperationalDeviceProxy * Allocate(DeviceProxyInitParams & params, PeerId peerId) override + OperationalDeviceProxy * Allocate(DeviceProxyInitParams & params, ScopedNodeId peerId) override { return mDevicePool.CreateObject(params, peerId); } void Release(OperationalDeviceProxy * device) override { mDevicePool.ReleaseObject(device); } - OperationalDeviceProxy * FindDevice(PeerId peerId) override + OperationalDeviceProxy * FindDevice(ScopedNodeId peerId) override { OperationalDeviceProxy * foundDevice = nullptr; mDevicePool.ForEachActiveObject([&](auto * activeDevice) { diff --git a/src/app/ReadClient.cpp b/src/app/ReadClient.cpp index 831d0c60bd7520..9c6df9be9dcbb2 100644 --- a/src/app/ReadClient.cpp +++ b/src/app/ReadClient.cpp @@ -22,7 +22,7 @@ * */ -#include +#include #include #include #include @@ -34,48 +34,11 @@ namespace chip { namespace app { -/** - * @brief The default resubscribe policy will pick a random timeslot - * with millisecond resolution over an ever increasing window, - * following a fibonacci sequence up to CHIP_RESUBSCRIBE_MAX_FIBONACCI_STEP_INDEX, - * Average of the randomized wait time past the CHIP_RESUBSCRIBE_MAX_FIBONACCI_STEP_INDEX - * will be around one hour. - * When the retry count resets to 0, the sequence starts from the beginning again. - */ -static void DefaultResubscribePolicy(uint32_t aNumCumulativeRetries, uint32_t & aNextSubscriptionIntervalMsec, - bool & aShouldResubscribe) -{ - uint32_t maxWaitTimeInMsec = 0; - uint32_t waitTimeInMsec = 0; - uint32_t minWaitTimeInMsec = 0; - - if (aNumCumulativeRetries <= CHIP_RESUBSCRIBE_MAX_FIBONACCI_STEP_INDEX) - { - maxWaitTimeInMsec = GetFibonacciForIndex(aNumCumulativeRetries) * CHIP_RESUBSCRIBE_WAIT_TIME_MULTIPLIER_MS; - } - else - { - maxWaitTimeInMsec = CHIP_RESUBSCRIBE_MAX_RETRY_WAIT_INTERVAL_MS; - } - - if (maxWaitTimeInMsec != 0) - { - minWaitTimeInMsec = (CHIP_RESUBSCRIBE_MIN_WAIT_TIME_INTERVAL_PERCENT_PER_STEP * maxWaitTimeInMsec) / 100; - waitTimeInMsec = minWaitTimeInMsec + (Crypto::GetRandU32() % (maxWaitTimeInMsec - minWaitTimeInMsec)); - } - - aNextSubscriptionIntervalMsec = waitTimeInMsec; - aShouldResubscribe = true; - ChipLogProgress(DataManagement, - "Computing Resubscribe policy: attempts %" PRIu32 ", max wait time %" PRIu32 " ms, selected wait time %" PRIu32 - " ms", - aNumCumulativeRetries, maxWaitTimeInMsec, waitTimeInMsec); -} - ReadClient::ReadClient(InteractionModelEngine * apImEngine, Messaging::ExchangeManager * apExchangeMgr, Callback & apCallback, InteractionType aInteractionType) : mExchange(*this), - mpCallback(apCallback) + mpCallback(apCallback), mOnConnectedCallback(HandleDeviceConnected, this), + mOnConnectionFailureCallback(HandleDeviceConnectionFailure, this) { // Error if already initialized. mpExchangeMgr = apExchangeMgr; @@ -103,7 +66,7 @@ void ReadClient::ClearActiveSubscriptionState() void ReadClient::StopResubscription() { - ClearActiveSubscriptionState(); + CancelLivenessCheckTimer(); CancelResubscribeTimer(); mpCallback.OnDeallocatePaths(std::move(mReadPrepareParams)); @@ -114,6 +77,8 @@ ReadClient::~ReadClient() if (IsSubscriptionType()) { CancelLivenessCheckTimer(); + CancelResubscribeTimer(); + // // Only remove ourselves from the engine's tracker list if we still continue to have a valid pointer to it. // This won't be the case if the engine shut down before this destructor was called (in which case, mpImEngine @@ -126,7 +91,55 @@ ReadClient::~ReadClient() } } -void ReadClient::Close(CHIP_ERROR aError) +uint32_t ReadClient::ComputeTimeTillNextSubscription() +{ + uint32_t maxWaitTimeInMsec = 0; + uint32_t waitTimeInMsec = 0; + uint32_t minWaitTimeInMsec = 0; + + if (mNumRetries <= CHIP_RESUBSCRIBE_MAX_FIBONACCI_STEP_INDEX) + { + maxWaitTimeInMsec = GetFibonacciForIndex(mNumRetries) * CHIP_RESUBSCRIBE_WAIT_TIME_MULTIPLIER_MS; + } + else + { + maxWaitTimeInMsec = CHIP_RESUBSCRIBE_MAX_RETRY_WAIT_INTERVAL_MS; + } + + if (maxWaitTimeInMsec != 0) + { + minWaitTimeInMsec = (CHIP_RESUBSCRIBE_MIN_WAIT_TIME_INTERVAL_PERCENT_PER_STEP * maxWaitTimeInMsec) / 100; + waitTimeInMsec = minWaitTimeInMsec + (Crypto::GetRandU32() % (maxWaitTimeInMsec - minWaitTimeInMsec)); + } + + return waitTimeInMsec; +} + +CHIP_ERROR ReadClient::ScheduleResubscription(uint32_t aTimeTillNextResubscriptionMs, Optional aNewSessionHandle, + bool aReestablishCASE) +{ + VerifyOrReturnError(IsIdle(), CHIP_ERROR_INCORRECT_STATE); + + // + // If we're establishing CASE, make sure we are not provided a new SessionHandle as well. + // + VerifyOrReturnError(!aReestablishCASE || !aNewSessionHandle.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); + + if (aNewSessionHandle.HasValue()) + { + mReadPrepareParams.mSessionHolder.Grab(aNewSessionHandle.Value()); + } + + mDoCaseOnNextResub = aReestablishCASE; + + ReturnErrorOnFailure( + InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->StartTimer( + System::Clock::Milliseconds32(aTimeTillNextResubscriptionMs), OnResubscribeTimerCallback, this)); + + return CHIP_NO_ERROR; +} + +void ReadClient::Close(CHIP_ERROR aError, bool allowResubscription) { if (IsReadType()) { @@ -139,20 +152,31 @@ void ReadClient::Close(CHIP_ERROR aError) { if (aError != CHIP_NO_ERROR) { - uint32_t nextResubscribeMsec = 0; - - if (ResubscribeIfNeeded(nextResubscribeMsec)) + ClearActiveSubscriptionState(); + + // + // We infer that re-subscription was requested by virtue of having a non-zero list of event OR attribute paths present + // in mReadPrepareParams. This would only be the case if an application called SendAutoResubscribeRequest which + // populates mReadPrepareParams with the values provided by the application. + // + if (allowResubscription && + (mReadPrepareParams.mEventPathParamsListSize != 0 || mReadPrepareParams.mAttributePathParamsListSize != 0)) { - ChipLogProgress(DataManagement, - "Will try to resubscribe to %02x:" ChipLogFormatX64 " at retry index %" PRIu32 " after %" PRIu32 - "ms due to error %" CHIP_ERROR_FORMAT, - mFabricIndex, ChipLogValueX64(mPeerNodeId), mNumRetries, nextResubscribeMsec, aError.Format()); - mpCallback.OnResubscriptionAttempt(aError, nextResubscribeMsec); - ClearActiveSubscriptionState(); - return; + aError = mpCallback.OnResubscriptionNeeded(this, aError); + if (aError == CHIP_NO_ERROR) + { + return; + } } + + // + // Either something bad happened when requesting resubscription or the application has decided to not + // continue by returning an error. Let's convey the error back up to the application + // and shut everything down. + // mpCallback.OnError(aError); } + StopResubscription(); } @@ -288,9 +312,7 @@ CHIP_ERROR ReadClient::SendReadRequest(ReadPrepareParams & aReadPrepareParams) ReturnErrorOnFailure(mExchange->SendMessage(Protocols::InteractionModel::MsgType::ReadRequest, std::move(msgBuf), Messaging::SendFlags(Messaging::SendMessageFlags::kExpectResponse))); - mPeerNodeId = aReadPrepareParams.mSessionHolder->AsSecureSession()->GetPeerNodeId(); - mFabricIndex = aReadPrepareParams.mSessionHolder->GetFabricIndex(); - + mPeer = aReadPrepareParams.mSessionHolder->AsSecureSession()->GetPeer(); MoveToState(ClientState::AwaitingInitialReport); return CHIP_NO_ERROR; @@ -402,8 +424,10 @@ CHIP_ERROR ReadClient::OnMessageReceived(Messaging::ExchangeContext * apExchange else if (aPayloadHeader.HasMessageType(Protocols::InteractionModel::MsgType::StatusResponse)) { VerifyOrExit(apExchangeContext == mExchange.Get(), err = CHIP_ERROR_INCORRECT_STATE); - err = StatusResponse::ProcessStatusResponse(std::move(aPayload)); - SuccessOrExit(err); + CHIP_ERROR statusError = CHIP_NO_ERROR; + SuccessOrExit(err = StatusResponse::ProcessStatusResponse(std::move(aPayload), statusError)); + SuccessOrExit(err = statusError); + err = CHIP_ERROR_INVALID_MESSAGE_TYPE; } else { @@ -535,8 +559,13 @@ CHIP_ERROR ReadClient::ProcessReportData(System::PacketBufferHandle && aPayload) { MoveToState(ClientState::AwaitingSubscribeResponse); } - else + else if (IsSubscriptionActive()) { + // + // Only refresh the liveness check timer if we've successfully established + // a subscription and have a valid value for mMaxInterval which the function + // relies on. + // RefreshLivenessCheckTimer(); } } @@ -620,7 +649,8 @@ CHIP_ERROR ReadClient::ProcessAttributeReportIBs(TLV::TLVReader & aAttributeRepo DataVersion version = 0; ReturnErrorOnFailure(data.GetDataVersion(&version)); attributePath.mDataVersion.SetValue(version); - if (mReadPrepareParams.mResubscribePolicy != nullptr) + + if (mReadPrepareParams.mpDataVersionFilterList != nullptr) { UpdateDataVersionFilters(attributePath); } @@ -671,10 +701,12 @@ CHIP_ERROR ReadClient::ProcessEventReportIBs(TLV::TLVReader & aEventReportIBsRea ReturnErrorOnFailure(data.GetData(&dataReader)); - if (mReadPrepareParams.mResubscribePolicy != nullptr) - { - mReadPrepareParams.mEventNumber.SetValue(header.mEventNumber + 1); - } + // + // Update the event number being tracked in mReadPrepareParams in case + // we want to send it in the next SubscribeRequest message to convey + // the event number for which we have already received an event. + // + mReadPrepareParams.mEventNumber.SetValue(header.mEventNumber + 1); NoteReportingData(); mpCallback.OnEventData(header, &dataReader, nullptr); @@ -703,22 +735,37 @@ CHIP_ERROR ReadClient::ProcessEventReportIBs(TLV::TLVReader & aEventReportIBsRea return err; } +void ReadClient::OverrideLivenessTimeout(System::Clock::Timeout aLivenessTimeout) +{ + mLivenessTimeoutOverride = aLivenessTimeout; + RefreshLivenessCheckTimer(); +} + CHIP_ERROR ReadClient::RefreshLivenessCheckTimer() { CHIP_ERROR err = CHIP_NO_ERROR; + VerifyOrReturnError(mState == ClientState::SubscriptionActive, CHIP_ERROR_INCORRECT_STATE); + CancelLivenessCheckTimer(); - VerifyOrReturnError(mExchange, CHIP_ERROR_INCORRECT_STATE); - VerifyOrReturnError(mExchange->HasSessionHandle(), CHIP_ERROR_INCORRECT_STATE); + System::Clock::Timeout timeout; - System::Clock::Timeout timeout = System::Clock::Seconds16(mMaxInterval) + mExchange->GetSessionHandle()->GetAckTimeout(); + if (mLivenessTimeoutOverride != System::Clock::kZero) + { + timeout = mLivenessTimeoutOverride; + } + else + { + VerifyOrReturnError(mReadPrepareParams.mSessionHolder, CHIP_ERROR_INCORRECT_STATE); + timeout = System::Clock::Seconds16(mMaxInterval) + mReadPrepareParams.mSessionHolder->GetAckTimeout(); + } // EFR32/MBED/INFINION/K32W's chrono count return long unsinged, but other platform returns unsigned - ChipLogProgress(DataManagement, - "Refresh LivenessCheckTime for %lu milliseconds with SubscriptionId = 0x%08" PRIx32 - " Peer = %02x:" ChipLogFormatX64, - static_cast(timeout.count()), mSubscriptionId, mFabricIndex, ChipLogValueX64(mPeerNodeId)); + ChipLogProgress( + DataManagement, + "Refresh LivenessCheckTime for %lu milliseconds with SubscriptionId = 0x%08" PRIx32 " Peer = %02x:" ChipLogFormatX64, + static_cast(timeout.count()), mSubscriptionId, GetFabricIndex(), ChipLogValueX64(GetPeerNodeId())); err = InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->StartTimer( timeout, OnLivenessTimeoutCallback, this); @@ -755,7 +802,7 @@ void ReadClient::OnLivenessTimeoutCallback(System::Layer * apSystemLayer, void * ChipLogError(DataManagement, "Subscription Liveness timeout with SubscriptionID = 0x%08" PRIx32 ", Peer = %02x:" ChipLogFormatX64, - _this->mSubscriptionId, _this->mFabricIndex, ChipLogValueX64(_this->mPeerNodeId)); + _this->mSubscriptionId, _this->GetFabricIndex(), ChipLogValueX64(_this->GetPeerNodeId())); // TODO: add a more specific error here for liveness timeout failure to distinguish between other classes of timeouts (i.e // response timeouts). @@ -782,7 +829,7 @@ CHIP_ERROR ReadClient::ProcessSubscribeResponse(System::PacketBufferHandle && aP ChipLogProgress(DataManagement, "Subscription established with SubscriptionID = 0x%08" PRIx32 " MinInterval = %u" "s MaxInterval = %us Peer = %02x:" ChipLogFormatX64, - mSubscriptionId, mMinIntervalFloorSeconds, mMaxInterval, mFabricIndex, ChipLogValueX64(mPeerNodeId)); + mSubscriptionId, mMinIntervalFloorSeconds, mMaxInterval, GetFabricIndex(), ChipLogValueX64(GetPeerNodeId())); ReturnErrorOnFailure(subscribeResponse.ExitContainer()); @@ -790,10 +837,7 @@ CHIP_ERROR ReadClient::ProcessSubscribeResponse(System::PacketBufferHandle && aP mpCallback.OnSubscriptionEstablished(subscriptionId); - if (mReadPrepareParams.mResubscribePolicy != nullptr) - { - mNumRetries = 0; - } + mNumRetries = 0; RefreshLivenessCheckTimer(); @@ -803,12 +847,7 @@ CHIP_ERROR ReadClient::ProcessSubscribeResponse(System::PacketBufferHandle && aP CHIP_ERROR ReadClient::SendAutoResubscribeRequest(ReadPrepareParams && aReadPrepareParams) { mReadPrepareParams = std::move(aReadPrepareParams); - if (mReadPrepareParams.mResubscribePolicy == nullptr) - { - mReadPrepareParams.mResubscribePolicy = DefaultResubscribePolicy; - } - - CHIP_ERROR err = SendSubscribeRequest(mReadPrepareParams); + CHIP_ERROR err = SendSubscribeRequest(mReadPrepareParams); if (err != CHIP_NO_ERROR) { StopResubscription(); @@ -836,6 +875,9 @@ CHIP_ERROR ReadClient::SendSubscribeRequestImpl(const ReadPrepareParams & aReadP Span dataVersionFilters(aReadPrepareParams.mpDataVersionFilterList, aReadPrepareParams.mDataVersionFilterListSize); + VerifyOrReturnError(aReadPrepareParams.mAttributePathParamsListSize != 0 || aReadPrepareParams.mEventPathParamsListSize != 0, + CHIP_ERROR_INVALID_ARGUMENT); + System::PacketBufferHandle msgBuf; System::PacketBufferTLVWriter writer; SubscribeRequestMessage::Builder request; @@ -914,48 +956,108 @@ CHIP_ERROR ReadClient::SendSubscribeRequestImpl(const ReadPrepareParams & aReadP ReturnErrorOnFailure(mExchange->SendMessage(Protocols::InteractionModel::MsgType::SubscribeRequest, std::move(msgBuf), Messaging::SendFlags(Messaging::SendMessageFlags::kExpectResponse))); - mPeerNodeId = aReadPrepareParams.mSessionHolder->AsSecureSession()->GetPeerNodeId(); - mFabricIndex = aReadPrepareParams.mSessionHolder->GetFabricIndex(); - + mPeer = aReadPrepareParams.mSessionHolder->AsSecureSession()->GetPeer(); MoveToState(ClientState::AwaitingInitialReport); return CHIP_NO_ERROR; } -void ReadClient::OnResubscribeTimerCallback(System::Layer * apSystemLayer, void * apAppState) +CHIP_ERROR ReadClient::DefaultResubscribePolicy(CHIP_ERROR aTerminationCause) { - ReadClient * const _this = reinterpret_cast(apAppState); - assert(_this != nullptr); - _this->SendSubscribeRequest(_this->mReadPrepareParams); - _this->mNumRetries++; + VerifyOrReturnError(IsIdle(), CHIP_ERROR_INCORRECT_STATE); + + auto timeTillNextResubscription = ComputeTimeTillNextSubscription(); + ChipLogProgress(DataManagement, + "Will try to resubscribe to %02x:" ChipLogFormatX64 " at retry index %" PRIu32 " after %" PRIu32 + "ms due to error %" CHIP_ERROR_FORMAT, + GetFabricIndex(), ChipLogValueX64(GetPeerNodeId()), mNumRetries, timeTillNextResubscription, + aTerminationCause.Format()); + ReturnErrorOnFailure(ScheduleResubscription(timeTillNextResubscription, NullOptional, aTerminationCause == CHIP_ERROR_TIMEOUT)); + return CHIP_NO_ERROR; } -bool ReadClient::ResubscribeIfNeeded(uint32_t & aNextResubscribeIntervalMsec) +void ReadClient::HandleDeviceConnected(void * context, OperationalDeviceProxy * device) { - bool shouldResubscribe = true; - uint32_t intervalMsec = 0; - aNextResubscribeIntervalMsec = 0; - if (mReadPrepareParams.mResubscribePolicy == nullptr) + ReadClient * const _this = static_cast(context); + VerifyOrDie(_this != nullptr); + + ChipLogProgress(DataManagement, "HandleDeviceConnected %d\n", device->GetSecureSession().HasValue()); + _this->mReadPrepareParams.mSessionHolder.Grab(device->GetSecureSession().Value()); + + auto err = _this->SendSubscribeRequest(_this->mReadPrepareParams); + if (err != CHIP_NO_ERROR) { - ChipLogDetail(DataManagement, "mResubscribePolicy is null"); - return false; + _this->Close(err); } - mReadPrepareParams.mResubscribePolicy(mNumRetries, intervalMsec, shouldResubscribe); - if (!shouldResubscribe) +} + +void ReadClient::HandleDeviceConnectionFailure(void * context, const ScopedNodeId & peerId, CHIP_ERROR err) +{ + ReadClient * const _this = static_cast(context); + VerifyOrDie(_this != nullptr); + + ChipLogError(DataManagement, "Failed to establish CASE for re-subscription with error '%" CHIP_ERROR_FORMAT "'", err.Format()); + + _this->Close(err); +} + +void ReadClient::OnResubscribeTimerCallback(System::Layer * apSystemLayer, void * apAppState) +{ + ReadClient * const _this = static_cast(apAppState); + VerifyOrDie(_this != nullptr); + + CHIP_ERROR err; + + ChipLogProgress(DataManagement, "OnResubscribeTimerCallback: DoCASE = %d", _this->mDoCaseOnNextResub); + _this->mNumRetries++; + + if (_this->mDoCaseOnNextResub) { - ChipLogProgress(DataManagement, "Resubscribe has been stopped"); - return false; + auto * caseSessionManager = InteractionModelEngine::GetInstance()->GetCASESessionManager(); + VerifyOrExit(caseSessionManager != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + // + // We need to mark our session as defunct explicitly since the assessment of a liveness failure + // is usually triggered by the absence of any exchange activity that would have otherwise + // automatically marked the session as defunct on a response timeout. + // + // Doing so will ensure that the subsequent call to FindOrEstablishSession will not bind to + // an existing established session but rather trigger establishing a new one. + // + if (_this->mReadPrepareParams.mSessionHolder) + { + _this->mReadPrepareParams.mSessionHolder->AsSecureSession()->MarkAsDefunct(); + } + + // + // TODO: Until #19259 is merged, we cannot actually just get by with the above logic since marking sessions + // defunct has no effect on resident OperationalDeviceProxy instances that are already bound + // to a now-defunct CASE session. + // + auto proxy = caseSessionManager->FindExistingSession(_this->mPeer); + if (proxy != nullptr) + { + proxy->Disconnect(); + } + + caseSessionManager->FindOrEstablishSession(_this->mPeer, &_this->mOnConnectedCallback, + &_this->mOnConnectionFailureCallback); + return; } - CHIP_ERROR err = InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->StartTimer( - System::Clock::Milliseconds32(intervalMsec), OnResubscribeTimerCallback, this); + + err = _this->SendSubscribeRequest(_this->mReadPrepareParams); + +exit: if (err != CHIP_NO_ERROR) { - ChipLogError(DataManagement, "Fail to resubscribe with error %" CHIP_ERROR_FORMAT, err.Format()); - return false; + // + // Call Close (which should trigger re-subscription again) EXCEPT if we got here because we didn't have a valid + // CASESessionManager pointer when mDoCaseOnNextResub was true. + // + // In that case, don't permit re-subscription to occur. + // + _this->Close(err, err != CHIP_ERROR_INCORRECT_STATE); } - - aNextResubscribeIntervalMsec = intervalMsec; - return true; } void ReadClient::UpdateDataVersionFilters(const ConcreteDataAttributePath & aPath) diff --git a/src/app/ReadClient.h b/src/app/ReadClient.h index 0c55d1953371e0..78291fa5fddc7a 100644 --- a/src/app/ReadClient.h +++ b/src/app/ReadClient.h @@ -23,6 +23,7 @@ */ #pragma once +#include "system/SystemClock.h" #include #include #include @@ -32,8 +33,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -54,8 +57,12 @@ class InteractionModelEngine; /** * @class ReadClient * - * @brief The read client represents the initiator side of a Read Interaction, and is responsible - * for generating one Read Request for a particular set of attributes and/or events, and handling the Report Data response. + * @brief The read client represents the initiator side of a Read Or Subscribe Interaction (depending on the APIs invoked). + * + * When used to manage subscriptions, the client provides functionality to automatically re-subscribe as needed, + * including re-establishing CASE under certain conditions (see Callback::OnResubscriptionNeeded for more info). + * This is the default behavior. A consumer can completely opt-out of this behavior by over-riding + * Callback::OnResubscriptionNeeded and providing an alternative implementation. * */ class ReadClient : public Messaging::ExchangeDelegate @@ -131,14 +138,30 @@ class ReadClient : public Messaging::ExchangeDelegate virtual void OnSubscriptionEstablished(SubscriptionId aSubscriptionId) {} /** - * OnResubscriptionAttempt will be called when a re-subscription has been scheduled as a result of the termination of an - * in-progress or previously active subscription. This object MUST continue to exist after this call is completed. The + * OnResubscriptionNeeded will be called when a subscription that was started with SendAutoResubscribeRequest has terminated + * and re-subscription is needed. The termination cause is provided to help inform subsequent re-subscription logic. + * + * The base implementation automatically re-subscribes at appropriate intervals taking the termination cause into account + * (see ReadClient::DefaultResubscribePolicy for more details). If the default implementation doesn't suffice, the logic of + * ReadClient::DefaultResubscribePolicy is broken down into its constituent methods that are publicly available for + * applications to call and sequence. + * + * If the method is over-ridden, it's the application's responsibility to take the appropriate steps needed to eventually + * call-back into the ReadClient object to schedule a re-subscription (by invoking ReadClient::ScheduleResubscription). + * + * If the application DOES NOT want re-subscription to happen on a particular invocation of this method, returning anything + * other than CHIP_NO_ERROR will terminate the interaction and result in OnError, OnDeallocatePaths and OnDone being called + * in that sequence. + * + * This object MUST continue to exist after this call is completed. The * application shall wait until it receives an OnDone call to destroy the object. * * @param[in] aTerminationCause The cause of failure of the subscription that just terminated. - * @param[in] aNextResubscribeIntervalMsec How long we will wait before trying to auto-resubscribe. */ - virtual void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) {} + virtual CHIP_ERROR OnResubscriptionNeeded(ReadClient * apReadClient, CHIP_ERROR aTerminationCause) + { + return apReadClient->DefaultResubscribePolicy(aTerminationCause); + } /** * OnError will be called when an error occurs *after* a successful call to SendRequest(). The following @@ -278,8 +301,8 @@ class ReadClient : public Messaging::ExchangeDelegate return mInteractionType == InteractionType::Subscribe ? returnType(mSubscriptionId) : returnType::Missing(); } - FabricIndex GetFabricIndex() const { return mFabricIndex; } - NodeId GetPeerNodeId() const { return mPeerNodeId; } + FabricIndex GetFabricIndex() const { return mPeer.GetFabricIndex(); } + NodeId GetPeerNodeId() const { return mPeer.GetNodeId(); } bool IsReadType() { return mInteractionType == InteractionType::Read; } bool IsSubscriptionType() const { return mInteractionType == InteractionType::Subscribe; }; @@ -301,21 +324,59 @@ class ReadClient : public Messaging::ExchangeDelegate ReadClient * GetNextClient() { return mpNext; } void SetNextClient(ReadClient * apClient) { mpNext = apClient; } - // Like SendSubscribeRequest, but the ReadClient will automatically attempt to re-establish the subscription if - // we decide that the subscription has dropped. The exact behavior of the re-establishment can be controlled - // by setting mResubscribePolicy in the ReadPrepareParams. If not set, a default behavior with exponential backoff will be - // used. - // - // The application has to know to - // a) allocate a ReadPrepareParams object that will have fields mpEventPathParamsList and mpAttributePathParamsList and - // mpDataVersionFilterList with lifetimes as long as the ReadClient itself and b) free those up later in the call to - // OnDeallocatePaths. Note: At a given time in the system, you can either have a single subscription with re-sub enabled that - // that has mKeepSubscriptions = false, OR, multiple subs with re-sub enabled with mKeepSubscriptions = true. You shall not have - // a mix of both simultaneously. If SendAutoResubscribeRequest is called at all, it guarantees that it will call - // OnDeallocatePaths when OnDone is called. SendAutoResubscribeRequest is the only case that calls OnDeallocatePaths, since - // that's the only case when the consumer moved a ReadParams into the client. + /** + * Like SendSubscribeRequest, but the ReadClient will automatically attempt to re-establish the subscription if + * we decide that the subscription has dropped. The exact behavior of the re-establishment can be controlled + * by setting mResubscribePolicy in the ReadPrepareParams. If not set, a default behavior with exponential backoff will be + * used. + * + * The application has to know to + * a) allocate a ReadPrepareParams object that will have fields mpEventPathParamsList and mpAttributePathParamsList and + * mpDataVersionFilterList with lifetimes as long as the ReadClient itself and b) free those up later in the call to + * OnDeallocatePaths. Note: At a given time in the system, you can either have a single subscription with re-sub enabled that + * has mKeepSubscriptions = false, OR, multiple subs with re-sub enabled with mKeepSubscriptions = true. You shall not + * have a mix of both simultaneously. If SendAutoResubscribeRequest is called at all, it guarantees that it will call + * OnDeallocatePaths when OnDone is called. SendAutoResubscribeRequest is the only case that calls OnDeallocatePaths, since + * that's the only case when the consumer moved a ReadParams into the client. + * + */ CHIP_ERROR SendAutoResubscribeRequest(ReadPrepareParams && aReadPrepareParams); + /** + * This provides a standard re-subscription policy implementation that given a termination cause, does the following: + * - Calculates the time till next subscription with fibonacci back-off (implemented by ComputeTimeTillNextSubscription()). + * - Schedules the next subscription attempt at the computed interval from the previous step. Operational discovery and + * CASE establishment will be attempted if aTerminationCause was CHIP_ERROR_TIMEOUT. In all other cases, it will attempt + * to re-use a previously established session. + */ + CHIP_ERROR DefaultResubscribePolicy(CHIP_ERROR aTerminationCause); + + /** + * Computes the time, in milliseconds, until the next re-subscription over + * an ever increasing window following a fibonacci sequence with the current retry count + * used as input to the fibonacci algorithm. + * + * CHIP_RESUBSCRIBE_MAX_FIBONACCI_STEP_INDEX is the maximum value the retry count can tick up to. + * + */ + uint32_t ComputeTimeTillNextSubscription(); + + /** + * Schedules a re-subscription aTimeTillNextResubscriptionMs into the future. + * + * If an application wants to set up CASE on their own, they should call ComputeTimeTillNextSubscription() to compute the next + * interval at which they should attempt CASE and attempt CASE at that time. On successful CASE establishment, this method + * should be called with the new SessionHandle provided through 'aNewSessionHandle', 'aTimeTillNextResubscriptionMs' set to 0 + * (i.e async, but as soon as possible) and 'aReestablishCASE' set to false. + * + * Otherwise, if aReestablishCASE is true, operational discovery and CASE will be attempted at that time before + * the actual IM interaction is initiated. + * + * aReestablishCASE SHALL NOT be set to true if a valid SessionHandle is provided through newSessionHandle. + */ + CHIP_ERROR ScheduleResubscription(uint32_t aTimeTillNextResubscriptionMs, Optional aNewSessionHandle, + bool aReestablishCASE); + // Like SendSubscribeRequest, but allows sending certain forms of invalid // subscribe requests that servers are expected to reject, for testing // purposes. Should only be called from tests. @@ -326,6 +387,18 @@ class ReadClient : public Messaging::ExchangeDelegate } #endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST + /** + * Override the interval at which liveness of the subscription is assessed. + * By default, this is set set to the max interval of the subscription + ACK timeout of the underlying session. + * + * This can be only be called once a subscription has been established and is active. Once called, this will cancel any existing + * liveness timers and schedule a new one. + * + * This can be called from the Callback::OnSubscriptionEstablished callback. + * + */ + void OverrideLivenessTimeout(System::Clock::Timeout aLivenessTimeout); + private: friend class TestReadInteraction; friend class InteractionModelEngine; @@ -405,13 +478,19 @@ class ReadClient : public Messaging::ExchangeDelegate * exchange and finally, signal to the application that it's * safe to release this object. * - * If aError != CHIP_NO_ERROR, it is delivered to the application through the OnError callback first. + * If aError != CHIP_NO_ERROR, this will trigger re-subscriptions if allowResubscription is true + * AND if this ReadClient instance is tracking a subscription AND the applications decides to do so + * in their implementation of Callback::OnResubscriptionNeeded(). * */ - void Close(CHIP_ERROR aError); + void Close(CHIP_ERROR aError, bool allowResubscription = true); void StopResubscription(); void ClearActiveSubscriptionState(); + + static void HandleDeviceConnected(void * context, OperationalDeviceProxy * device); + static void HandleDeviceConnectionFailure(void * context, const ScopedNodeId & peerId, CHIP_ERROR error); + CHIP_ERROR GetMinEventNumber(const ReadPrepareParams & aReadPrepareParams, Optional & aEventMin); Messaging::ExchangeManager * mpExchangeMgr = nullptr; @@ -425,16 +504,22 @@ class ReadClient : public Messaging::ExchangeDelegate uint16_t mMinIntervalFloorSeconds = 0; uint16_t mMaxInterval = 0; SubscriptionId mSubscriptionId = 0; - NodeId mPeerNodeId = kUndefinedNodeId; - FabricIndex mFabricIndex = kUndefinedFabricIndex; - InteractionType mInteractionType = InteractionType::Read; + ScopedNodeId mPeer; + InteractionType mInteractionType = InteractionType::Read; Timestamp mEventTimestamp; + bool mDoCaseOnNextResub = true; + + chip::Callback::Callback mOnConnectedCallback; + chip::Callback::Callback mOnConnectionFailureCallback; + ReadClient * mpNext = nullptr; InteractionModelEngine * mpImEngine = nullptr; ReadPrepareParams mReadPrepareParams; uint32_t mNumRetries = 0; + System::Clock::Timeout mLivenessTimeoutOverride = System::Clock::kZero; + // End Of Container (0x18) uses one byte. static constexpr uint16_t kReservedSizeForEndOfContainer = 1; // Reserved size for the uint8_t InteractionModelRevision flag, which takes up 1 byte for the control tag and 1 byte for the diff --git a/src/app/ReadHandler.cpp b/src/app/ReadHandler.cpp index 0b68e02d1cec53..ff04308c06f269 100644 --- a/src/app/ReadHandler.cpp +++ b/src/app/ReadHandler.cpp @@ -22,7 +22,7 @@ * */ -#include +#include #include #include #include @@ -116,9 +116,10 @@ CHIP_ERROR ReadHandler::OnInitialRequest(System::PacketBufferHandle && aPayload) CHIP_ERROR ReadHandler::OnStatusResponse(Messaging::ExchangeContext * apExchangeContext, System::PacketBufferHandle && aPayload) { - CHIP_ERROR err = CHIP_NO_ERROR; - err = StatusResponse::ProcessStatusResponse(std::move(aPayload)); - SuccessOrExit(err); + CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR statusError = CHIP_NO_ERROR; + SuccessOrExit(err = StatusResponse::ProcessStatusResponse(std::move(aPayload), statusError)); + SuccessOrExit(err = statusError); switch (mState) { case HandlerState::AwaitingReportResponse: @@ -181,6 +182,7 @@ CHIP_ERROR ReadHandler::SendStatusReport(Protocols::InteractionModel::Status aSt VerifyOrReturnLogError(!mExchangeCtx, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnLogError(mSessionHandle, CHIP_ERROR_INCORRECT_STATE); auto exchange = InteractionModelEngine::GetInstance()->GetExchangeManager()->NewContext(mSessionHandle.Get().Value(), this); + VerifyOrReturnLogError(exchange != nullptr, CHIP_ERROR_INCORRECT_STATE); mExchangeCtx.Grab(exchange); } @@ -200,10 +202,12 @@ CHIP_ERROR ReadHandler::SendReportData(System::PacketBufferHandle && aPayload, b VerifyOrReturnLogError(!mExchangeCtx, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnLogError(mSessionHandle, CHIP_ERROR_INCORRECT_STATE); auto exchange = InteractionModelEngine::GetInstance()->GetExchangeManager()->NewContext(mSessionHandle.Get().Value(), this); + VerifyOrReturnLogError(exchange != nullptr, CHIP_ERROR_INCORRECT_STATE); mExchangeCtx.Grab(exchange); } VerifyOrReturnLogError(mExchangeCtx, CHIP_ERROR_INCORRECT_STATE); + if (!IsReporting()) { mCurrentReportsBeginGeneration = InteractionModelEngine::GetInstance()->GetReportingEngine().GetDirtySetGeneration(); diff --git a/src/app/ReadPrepareParams.h b/src/app/ReadPrepareParams.h index 6d95b8b0b48a17..c37a2ef6e36eab 100644 --- a/src/app/ReadPrepareParams.h +++ b/src/app/ReadPrepareParams.h @@ -29,15 +29,6 @@ namespace chip { namespace app { -/** - * @brief Used to specify the re-subscription policy. Namely, the method is invoked and provided the number of - * retries that have occurred so far. - * - * aShouldResubscribe and aNextSubscriptionIntervalMsec are outparams indicating whether and how long into - * the future a re-subscription should happen. - */ -typedef void (*OnResubscribePolicyCB)(uint32_t aNumCumulativeRetries, uint32_t & aNextSubscriptionIntervalMsec, - bool & aShouldResubscribe); struct ReadPrepareParams { @@ -51,12 +42,11 @@ struct ReadPrepareParams Optional mEventNumber; // The timeout for waiting for the response or System::Clock::kZero to let the interaction model decide the timeout based on the // MRP timeouts of the session. - System::Clock::Timeout mTimeout = System::Clock::kZero; - uint16_t mMinIntervalFloorSeconds = 0; - uint16_t mMaxIntervalCeilingSeconds = 0; - bool mKeepSubscriptions = false; - bool mIsFabricFiltered = true; - OnResubscribePolicyCB mResubscribePolicy = nullptr; + System::Clock::Timeout mTimeout = System::Clock::kZero; + uint16_t mMinIntervalFloorSeconds = 0; + uint16_t mMaxIntervalCeilingSeconds = 0; + bool mKeepSubscriptions = false; + bool mIsFabricFiltered = true; ReadPrepareParams() {} ReadPrepareParams(const SessionHandle & sessionHandle) { mSessionHolder.Grab(sessionHandle); } @@ -78,7 +68,6 @@ struct ReadPrepareParams other.mEventPathParamsListSize = 0; other.mpAttributePathParamsList = nullptr; other.mAttributePathParamsListSize = 0; - mResubscribePolicy = other.mResubscribePolicy; } ReadPrepareParams & operator=(ReadPrepareParams && other) @@ -103,7 +92,6 @@ struct ReadPrepareParams other.mEventPathParamsListSize = 0; other.mpAttributePathParamsList = nullptr; other.mAttributePathParamsListSize = 0; - mResubscribePolicy = other.mResubscribePolicy; return *this; } }; diff --git a/src/app/RequiredPrivilege.cpp b/src/app/RequiredPrivilege.cpp index 621105891431a3..012a48c421c130 100644 --- a/src/app/RequiredPrivilege.cpp +++ b/src/app/RequiredPrivilege.cpp @@ -25,23 +25,3 @@ constexpr Access::Privilege RequiredPrivilege::kPrivilegeMapper[]; } // namespace app } // namespace chip - -int __attribute__((weak)) MatterGetAccessPrivilegeForReadAttribute(chip::ClusterId cluster, chip::AttributeId attribute) -{ - return kMatterAccessPrivilegeAdminister; -} - -int __attribute__((weak)) MatterGetAccessPrivilegeForWriteAttribute(chip::ClusterId cluster, chip::AttributeId attribute) -{ - return kMatterAccessPrivilegeAdminister; -} - -int __attribute__((weak)) MatterGetAccessPrivilegeForInvokeCommand(chip::ClusterId cluster, chip::CommandId command) -{ - return kMatterAccessPrivilegeAdminister; -} - -int __attribute__((weak)) MatterGetAccessPrivilegeForReadEvent(chip::ClusterId cluster, chip::EventId event) -{ - return kMatterAccessPrivilegeAdminister; -} diff --git a/src/app/StatusResponse.cpp b/src/app/StatusResponse.cpp index e9e8af70a5f656..c6ed1cbfaf57b4 100644 --- a/src/app/StatusResponse.cpp +++ b/src/app/StatusResponse.cpp @@ -44,7 +44,7 @@ CHIP_ERROR StatusResponse::Send(Protocols::InteractionModel::Status aStatus, Mes return CHIP_NO_ERROR; } -CHIP_ERROR StatusResponse::ProcessStatusResponse(System::PacketBufferHandle && aPayload) +CHIP_ERROR StatusResponse::ProcessStatusResponse(System::PacketBufferHandle && aPayload, CHIP_ERROR & aStatusError) { StatusResponseMessage::Parser response; System::PacketBufferTLVReader reader; @@ -59,12 +59,8 @@ CHIP_ERROR StatusResponse::ProcessStatusResponse(System::PacketBufferHandle && a ChipLogValueIMStatus(status.mStatus)); ReturnErrorOnFailure(response.ExitContainer()); - if (status.mStatus == Protocols::InteractionModel::Status::Success) - { - return CHIP_NO_ERROR; - } - - return status.ToChipError(); + aStatusError = status.ToChipError(); + return CHIP_NO_ERROR; } } // namespace app } // namespace chip diff --git a/src/app/StatusResponse.h b/src/app/StatusResponse.h index 583cbb3dae8120..7021e3868bcb5a 100644 --- a/src/app/StatusResponse.h +++ b/src/app/StatusResponse.h @@ -32,7 +32,10 @@ class StatusResponse public: static CHIP_ERROR Send(Protocols::InteractionModel::Status aStatus, Messaging::ExchangeContext * apExchangeContext, bool aExpectResponse); - static CHIP_ERROR ProcessStatusResponse(System::PacketBufferHandle && aPayload); + + // The return value indicates whether the StatusResponse was parsed properly, and if it is CHIP_NO_ERROR + // then aStatus has been set to the actual status, which might be success or failure. + static CHIP_ERROR ProcessStatusResponse(System::PacketBufferHandle && aPayload, CHIP_ERROR & aStatus); }; } // namespace app } // namespace chip diff --git a/src/app/TimedRequest.cpp b/src/app/TimedRequest.cpp index 1c325b62a19187..59921ce17cbc11 100644 --- a/src/app/TimedRequest.cpp +++ b/src/app/TimedRequest.cpp @@ -53,12 +53,5 @@ CHIP_ERROR TimedRequest::Send(ExchangeContext * aExchangeContext, uint16_t aTime return aExchangeContext->SendMessage(MsgType::TimedRequest, std::move(payload), SendMessageFlags::kExpectResponse); } -CHIP_ERROR TimedRequest::HandleResponse(const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload) -{ - VerifyOrReturnError(aPayloadHeader.HasMessageType(MsgType::StatusResponse), CHIP_ERROR_INVALID_MESSAGE_TYPE); - - return StatusResponse::ProcessStatusResponse(std::move(aPayload)); -} - } // namespace app } // namespace chip diff --git a/src/app/WriteClient.cpp b/src/app/WriteClient.cpp index c17c63af372500..85af809681aedc 100644 --- a/src/app/WriteClient.cpp +++ b/src/app/WriteClient.cpp @@ -23,7 +23,7 @@ */ #include "lib/core/CHIPError.h" -#include +#include #include #include #include @@ -35,46 +35,12 @@ void WriteClient::Close() { MoveToState(State::AwaitingDestruction); - // OnDone below can destroy us before we unwind all the way back into the - // exchange code and it tries to close itself. Make sure that it doesn't - // try to notify us that it's closing, since we will be dead. - // - // For more details, see #10344. - if (mpExchangeCtx != nullptr) - { - mpExchangeCtx->SetDelegate(nullptr); - } - - mpExchangeCtx = nullptr; - if (mpCallback) { mpCallback->OnDone(this); } } -void WriteClient::Abort() -{ - // - // If the exchange context hasn't already been gracefully closed - // (signaled by setting it to null), then we need to forcibly - // tear it down. - // - if (mpExchangeCtx != nullptr) - { - // We might be a delegate for this exchange, and we don't want the - // OnExchangeClosing notification in that case. Null out the delegate - // to avoid that. - // - // TODO: This makes all sorts of assumptions about what the delegate is - // (notice the "might" above!) that might not hold in practice. We - // really need a better solution here.... - mpExchangeCtx->SetDelegate(nullptr); - mpExchangeCtx->Abort(); - mpExchangeCtx = nullptr; - } -} - CHIP_ERROR WriteClient::ProcessWriteResponseMessage(System::PacketBufferHandle && payload) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -365,23 +331,28 @@ CHIP_ERROR WriteClient::SendWriteRequest(const SessionHandle & session, System:: err = FinalizeMessage(false /* hasMoreChunks */); SuccessOrExit(err); - // Create a new exchange context. - mpExchangeCtx = mpExchangeMgr->NewContext(session, this); - VerifyOrExit(mpExchangeCtx != nullptr, err = CHIP_ERROR_NO_MEMORY); - VerifyOrReturnError(!(mpExchangeCtx->IsGroupExchangeContext() && mHasDataVersion), CHIP_ERROR_INVALID_MESSAGE_TYPE); + { + // Create a new exchange context. + auto exchange = mpExchangeMgr->NewContext(session, this); + VerifyOrExit(exchange != nullptr, err = CHIP_ERROR_NO_MEMORY); + + mExchangeCtx.Grab(exchange); + } + + VerifyOrReturnError(!(mExchangeCtx->IsGroupExchangeContext() && mHasDataVersion), CHIP_ERROR_INVALID_MESSAGE_TYPE); if (timeout == System::Clock::kZero) { - mpExchangeCtx->UseSuggestedResponseTimeout(app::kExpectedIMProcessingTime); + mExchangeCtx->UseSuggestedResponseTimeout(app::kExpectedIMProcessingTime); } else { - mpExchangeCtx->SetResponseTimeout(timeout); + mExchangeCtx->SetResponseTimeout(timeout); } if (mTimedWriteTimeoutMs.HasValue()) { - err = TimedRequest::Send(mpExchangeCtx, mTimedWriteTimeoutMs.Value()); + err = TimedRequest::Send(mExchangeCtx.Get(), mTimedWriteTimeoutMs.Value()); SuccessOrExit(err); MoveToState(State::AwaitingTimedStatus); } @@ -425,7 +396,7 @@ CHIP_ERROR WriteClient::SendWriteRequest() System::PacketBufferHandle data = mChunks.PopHead(); - bool isGroupWrite = mpExchangeCtx->IsGroupExchangeContext(); + bool isGroupWrite = mExchangeCtx->IsGroupExchangeContext(); if (!mChunks.IsNull() && isGroupWrite) { // Reject this request if we have more than one chunk (mChunks is not null after PopHead()), and this is a group @@ -434,13 +405,8 @@ CHIP_ERROR WriteClient::SendWriteRequest() } // kExpectResponse is ignored by ExchangeContext in case of groupcast - ReturnErrorOnFailure(mpExchangeCtx->SendMessage(MsgType::WriteRequest, std::move(data), SendMessageFlags::kExpectResponse)); - if (isGroupWrite) - { - // Exchange is closed now, since there are no group responses. Drop our - // ref to it. - mpExchangeCtx = nullptr; - } + ReturnErrorOnFailure(mExchangeCtx->SendMessage(MsgType::WriteRequest, std::move(data), SendMessageFlags::kExpectResponse)); + MoveToState(State::AwaitingResponse); return CHIP_NO_ERROR; } @@ -448,6 +414,8 @@ CHIP_ERROR WriteClient::SendWriteRequest() CHIP_ERROR WriteClient::OnMessageReceived(Messaging::ExchangeContext * apExchangeContext, const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload) { + using namespace Protocols::InteractionModel; + if (mState == State::AwaitingResponse && // We had sent the last chunk of data, and received all responses mChunks.IsNull()) @@ -456,21 +424,27 @@ CHIP_ERROR WriteClient::OnMessageReceived(Messaging::ExchangeContext * apExchang } CHIP_ERROR err = CHIP_NO_ERROR; + // Assert that the exchange context matches the client's current context. // This should never fail because even if SendWriteRequest is called // back-to-back, the second call will call Close() on the first exchange, // which clears the OnMessageReceived callback. - VerifyOrExit(apExchangeContext == mpExchangeCtx, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(apExchangeContext == mExchangeCtx.Get(), err = CHIP_ERROR_INCORRECT_STATE); if (mState == State::AwaitingTimedStatus) { - err = HandleTimedStatus(aPayloadHeader, std::move(aPayload)); + VerifyOrExit(aPayloadHeader.HasMessageType(MsgType::StatusResponse), err = CHIP_ERROR_INVALID_MESSAGE_TYPE); + CHIP_ERROR statusError = CHIP_NO_ERROR; + SuccessOrExit(err = StatusResponse::ProcessStatusResponse(std::move(aPayload), statusError)); + SuccessOrExit(err = statusError); + err = SendWriteRequest(); + // Skip all other processing here (which is for the response to the // write request), no matter whether err is success or not. goto exit; } - if (aPayloadHeader.HasMessageType(Protocols::InteractionModel::MsgType::WriteResponse)) + if (aPayloadHeader.HasMessageType(MsgType::WriteResponse)) { err = ProcessWriteResponseMessage(std::move(aPayload)); SuccessOrExit(err); @@ -480,10 +454,12 @@ CHIP_ERROR WriteClient::OnMessageReceived(Messaging::ExchangeContext * apExchang SuccessOrExit(SendWriteRequest()); } } - else if (aPayloadHeader.HasMessageType(Protocols::InteractionModel::MsgType::StatusResponse)) + else if (aPayloadHeader.HasMessageType(MsgType::StatusResponse)) { - err = StatusResponse::ProcessStatusResponse(std::move(aPayload)); - SuccessOrExit(err); + CHIP_ERROR statusError = CHIP_NO_ERROR; + SuccessOrExit(err = StatusResponse::ProcessStatusResponse(std::move(aPayload), statusError)); + SuccessOrExit(err = statusError); + err = CHIP_ERROR_INVALID_MESSAGE_TYPE; } else { @@ -555,12 +531,5 @@ CHIP_ERROR WriteClient::ProcessAttributeStatusIB(AttributeStatusIB::Parser & aAt return err; } -CHIP_ERROR WriteClient::HandleTimedStatus(const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload) -{ - ReturnErrorOnFailure(TimedRequest::HandleResponse(aPayloadHeader, std::move(aPayload))); - - return SendWriteRequest(); -} - } // namespace app } // namespace chip diff --git a/src/app/WriteClient.h b/src/app/WriteClient.h index 2f7ca2366de728..3afe6ff9179ff6 100644 --- a/src/app/WriteClient.h +++ b/src/app/WriteClient.h @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include @@ -125,14 +125,15 @@ class WriteClient : public Messaging::ExchangeDelegate WriteClient(Messaging::ExchangeManager * apExchangeMgr, Callback * apCallback, const Optional & aTimedWriteTimeoutMs, bool aSuppressResponse = false) : mpExchangeMgr(apExchangeMgr), - mpCallback(apCallback), mTimedWriteTimeoutMs(aTimedWriteTimeoutMs), mSuppressResponse(aSuppressResponse) + mExchangeCtx(*this), mpCallback(apCallback), mTimedWriteTimeoutMs(aTimedWriteTimeoutMs), + mSuppressResponse(aSuppressResponse) {} #if CONFIG_BUILD_FOR_HOST_UNIT_TEST WriteClient(Messaging::ExchangeManager * apExchangeMgr, Callback * apCallback, const Optional & aTimedWriteTimeoutMs, uint16_t aReservedSize) : mpExchangeMgr(apExchangeMgr), - mpCallback(apCallback), mTimedWriteTimeoutMs(aTimedWriteTimeoutMs), mReservedSize(aReservedSize) + mExchangeCtx(*this), mpCallback(apCallback), mTimedWriteTimeoutMs(aTimedWriteTimeoutMs), mReservedSize(aReservedSize) {} #endif @@ -226,14 +227,6 @@ class WriteClient : public Messaging::ExchangeDelegate */ void Shutdown(); - /* - * Destructor - as part of destruction, it will abort the exchange context - * if a valid one still exists. - * - * See Abort() for details on when that might occur. - */ - ~WriteClient() override { Abort(); } - private: friend class TestWriteInteraction; friend class InteractionModelEngine; @@ -347,15 +340,6 @@ class WriteClient : public Messaging::ExchangeDelegate */ void Abort(); - // Handle a message received when we are expecting a status response to a - // Timed Request. The caller is assumed to have already checked that our - // exchange context member is the one the message came in on. - // - // If the server returned an error status response its status will be - // encapsulated in the CHIP_ERROR this returns. In that case, - // StatusIB::InitFromChipError can be used to extract the status. - CHIP_ERROR HandleTimedStatus(const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload); - // Send our queued-up Write Request message. Assumes the exchange is ready // and mPendingWriteData is populated. CHIP_ERROR SendWriteRequest(); @@ -378,9 +362,9 @@ class WriteClient : public Messaging::ExchangeDelegate CHIP_ERROR FinalizeMessage(bool aHasMoreChunks); Messaging::ExchangeManager * mpExchangeMgr = nullptr; - Messaging::ExchangeContext * mpExchangeCtx = nullptr; - Callback * mpCallback = nullptr; - State mState = State::Initialized; + Messaging::ExchangeHolder mExchangeCtx; + Callback * mpCallback = nullptr; + State mState = State::Initialized; System::PacketBufferTLVWriter mMessageWriter; WriteRequestMessage::Builder mWriteRequestBuilder; // TODO Maybe we should change PacketBufferTLVWriter so we can finalize it diff --git a/src/app/WriteHandler.cpp b/src/app/WriteHandler.cpp index ba52461882abe9..12a2086e7c48d3 100644 --- a/src/app/WriteHandler.cpp +++ b/src/app/WriteHandler.cpp @@ -17,7 +17,7 @@ */ #include "messaging/ExchangeContext.h" -#include +#include #include #include #include @@ -36,7 +36,7 @@ constexpr uint8_t kListAttributeType = 0x48; CHIP_ERROR WriteHandler::Init() { - VerifyOrReturnError(mpExchangeCtx == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(!mExchangeCtx, CHIP_ERROR_INCORRECT_STATE); MoveToState(State::Initialized); @@ -51,31 +51,11 @@ void WriteHandler::Close() mSuppressResponse = false; VerifyOrReturn(mState != State::Uninitialized); - if (mpExchangeCtx != nullptr) - { - mpExchangeCtx->SetDelegate(nullptr); - mpExchangeCtx = nullptr; - } - ClearState(); } void WriteHandler::Abort() { - if (mpExchangeCtx != nullptr) - { - // We might be a delegate for this exchange, and we don't want the - // OnExchangeClosing notification in that case. Null out the delegate - // to avoid that. - // - // TODO: This makes all sorts of assumptions about what the delegate is - // (notice the "might" above!) that might not hold in practice. We - // really need a better solution here.... - mpExchangeCtx->SetDelegate(nullptr); - mpExchangeCtx->Abort(); - mpExchangeCtx = nullptr; - } - ClearState(); } @@ -110,13 +90,11 @@ Status WriteHandler::HandleWriteRequestMessage(Messaging::ExchangeContext * apEx Status WriteHandler::OnWriteRequest(Messaging::ExchangeContext * apExchangeContext, System::PacketBufferHandle && aPayload, bool aIsTimedWrite) { - mpExchangeCtx = apExchangeContext; - // // Let's take over further message processing on this exchange from the IM. // This is only relevant during chunked requests. // - mpExchangeCtx->SetDelegate(this); + mExchangeCtx.Grab(apExchangeContext); Status status = HandleWriteRequestMessage(apExchangeContext, std::move(aPayload), aIsTimedWrite); @@ -134,7 +112,7 @@ CHIP_ERROR WriteHandler::OnMessageReceived(Messaging::ExchangeContext * apExchan { CHIP_ERROR err = CHIP_NO_ERROR; - VerifyOrDieWithMsg(apExchangeContext == mpExchangeCtx, DataManagement, + VerifyOrDieWithMsg(apExchangeContext == mExchangeCtx.Get(), DataManagement, "Incoming exchange context should be same as the initial request."); VerifyOrDieWithMsg(!apExchangeContext->IsGroupExchangeContext(), DataManagement, "OnMessageReceived should not be called on GroupExchangeContext"); @@ -191,11 +169,11 @@ CHIP_ERROR WriteHandler::SendWriteResponse(System::PacketBufferTLVWriter && aMes err = FinalizeMessage(std::move(aMessageWriter), packet); SuccessOrExit(err); - VerifyOrExit(mpExchangeCtx != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - mpExchangeCtx->UseSuggestedResponseTimeout(app::kExpectedIMProcessingTime); - err = mpExchangeCtx->SendMessage(Protocols::InteractionModel::MsgType::WriteResponse, std::move(packet), - mHasMoreChunks ? Messaging::SendMessageFlags::kExpectResponse - : Messaging::SendMessageFlags::kNone); + VerifyOrExit(mExchangeCtx, err = CHIP_ERROR_INCORRECT_STATE); + mExchangeCtx->UseSuggestedResponseTimeout(app::kExpectedIMProcessingTime); + err = mExchangeCtx->SendMessage(Protocols::InteractionModel::MsgType::WriteResponse, std::move(packet), + mHasMoreChunks ? Messaging::SendMessageFlags::kExpectResponse + : Messaging::SendMessageFlags::kNone); SuccessOrExit(err); MoveToState(State::Sending); @@ -237,7 +215,7 @@ CHIP_ERROR WriteHandler::DeliverFinalListWriteEndForGroupWrite(bool writeWasSucc Credentials::GroupDataProvider * groupDataProvider = Credentials::GetGroupDataProvider(); Credentials::GroupDataProvider::EndpointIterator * iterator; - GroupId groupId = mpExchangeCtx->GetSessionHandle()->AsIncomingGroupSession()->GetGroupId(); + GroupId groupId = mExchangeCtx->GetSessionHandle()->AsIncomingGroupSession()->GetGroupId(); FabricIndex fabricIndex = GetAccessingFabricIndex(); auto processingConcreteAttributePath = mProcessingAttributePath.Value(); @@ -289,8 +267,8 @@ CHIP_ERROR WriteHandler::ProcessAttributeDataIBs(TLV::TLVReader & aAttributeData { CHIP_ERROR err = CHIP_NO_ERROR; - ReturnErrorCodeIf(mpExchangeCtx == nullptr, CHIP_ERROR_INTERNAL); - const Access::SubjectDescriptor subjectDescriptor = mpExchangeCtx->GetSessionHandle()->GetSubjectDescriptor(); + ReturnErrorCodeIf(!mExchangeCtx, CHIP_ERROR_INTERNAL); + const Access::SubjectDescriptor subjectDescriptor = mExchangeCtx->GetSessionHandle()->GetSubjectDescriptor(); while (CHIP_NO_ERROR == (err = aAttributeDataIBsReader.Next())) { @@ -396,11 +374,11 @@ CHIP_ERROR WriteHandler::ProcessGroupAttributeDataIBs(TLV::TLVReader & aAttribut { CHIP_ERROR err = CHIP_NO_ERROR; - ReturnErrorCodeIf(mpExchangeCtx == nullptr, CHIP_ERROR_INTERNAL); + ReturnErrorCodeIf(!mExchangeCtx, CHIP_ERROR_INTERNAL); const Access::SubjectDescriptor subjectDescriptor = - mpExchangeCtx->GetSessionHandle()->AsIncomingGroupSession()->GetSubjectDescriptor(); + mExchangeCtx->GetSessionHandle()->AsIncomingGroupSession()->GetSubjectDescriptor(); - GroupId groupId = mpExchangeCtx->GetSessionHandle()->AsIncomingGroupSession()->GetGroupId(); + GroupId groupId = mExchangeCtx->GetSessionHandle()->AsIncomingGroupSession()->GetGroupId(); FabricIndex fabric = GetAccessingFabricIndex(); while (CHIP_NO_ERROR == (err = aAttributeDataIBsReader.Next())) @@ -590,7 +568,7 @@ Status WriteHandler::ProcessWriteRequest(System::PacketBufferHandle && aPayload, } SuccessOrExit(err); - if (mHasMoreChunks && (mpExchangeCtx->IsGroupExchangeContext() || mIsTimedRequest)) + if (mHasMoreChunks && (mExchangeCtx->IsGroupExchangeContext() || mIsTimedRequest)) { // Sanity check: group exchange context should only have one chunk. // Also, timed requests should not have more than one chunk. @@ -610,7 +588,7 @@ Status WriteHandler::ProcessWriteRequest(System::PacketBufferHandle && aPayload, AttributeDataIBsParser.GetReader(&AttributeDataIBsReader); - if (mpExchangeCtx->IsGroupExchangeContext()) + if (mExchangeCtx->IsGroupExchangeContext()) { err = ProcessGroupAttributeDataIBs(AttributeDataIBsReader); } @@ -680,7 +658,7 @@ CHIP_ERROR WriteHandler::AddStatus(const ConcreteDataAttributePath & aPath, cons FabricIndex WriteHandler::GetAccessingFabricIndex() const { - return mpExchangeCtx->GetSessionHandle()->GetFabricIndex(); + return mExchangeCtx->GetSessionHandle()->GetFabricIndex(); } const char * WriteHandler::GetStateStr() const @@ -712,6 +690,7 @@ void WriteHandler::MoveToState(const State aTargetState) void WriteHandler::ClearState() { DeliverFinalListWriteEnd(false /* wasSuccessful */); + mExchangeCtx.Release(); MoveToState(State::Uninitialized); } diff --git a/src/app/WriteHandler.h b/src/app/WriteHandler.h index 1edf40b15273ff..43163a2b8abab9 100644 --- a/src/app/WriteHandler.h +++ b/src/app/WriteHandler.h @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -41,6 +41,8 @@ namespace app { class WriteHandler : public Messaging::ExchangeDelegate { public: + WriteHandler() : mExchangeCtx(*this) {} + /** * Initialize the WriteHandler. Within the lifetime * of this instance, this method is invoked once after object @@ -96,7 +98,7 @@ class WriteHandler : public Messaging::ExchangeDelegate bool MatchesExchangeContext(Messaging::ExchangeContext * apExchangeContext) const { - return !IsFree() && mpExchangeCtx == apExchangeContext; + return !IsFree() && mExchangeCtx.Get() == apExchangeContext; } void CacheACLCheckResult(const AttributeAccessToken & aToken) { mACLCheckCache.SetValue(aToken); } @@ -158,7 +160,7 @@ class WriteHandler : public Messaging::ExchangeDelegate System::PacketBufferHandle && aPayload) override; void OnResponseTimeout(Messaging::ExchangeContext * apExchangeContext) override; - Messaging::ExchangeContext * mpExchangeCtx = nullptr; + Messaging::ExchangeHolder mExchangeCtx; WriteResponseMessage::Builder mWriteResponseBuilder; State mState = State::Uninitialized; bool mIsTimedRequest = false; diff --git a/src/app/app-platform/ContentAppPlatform.cpp b/src/app/app-platform/ContentAppPlatform.cpp index 222b52992246ab..5557c092dcb8b9 100644 --- a/src/app/app-platform/ContentAppPlatform.cpp +++ b/src/app/app-platform/ContentAppPlatform.cpp @@ -414,11 +414,13 @@ CHIP_ERROR ContentAppPlatform::ManageClientAccess(OperationalDeviceProxy * targe VerifyOrReturnError(successCb != nullptr, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(failureCb != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + Access::Privilege vendorPrivilege = mContentAppFactory->GetVendorPrivilege(targetVendorId); + Access::AccessControl::Entry entry; ReturnErrorOnFailure(GetAccessControl().PrepareEntry(entry)); ReturnErrorOnFailure(entry.SetAuthMode(Access::AuthMode::kCase)); entry.SetFabricIndex(targetDeviceProxy->GetFabricIndex()); - ReturnErrorOnFailure(entry.SetPrivilege(Access::Privilege::kOperate)); + ReturnErrorOnFailure(entry.SetPrivilege(vendorPrivilege)); ReturnErrorOnFailure(entry.AddSubject(nullptr, targetDeviceProxy->GetDeviceId())); std::vector bindings; @@ -438,18 +440,31 @@ CHIP_ERROR ContentAppPlatform::ManageClientAccess(OperationalDeviceProxy * targe ChipLogProgress(Controller, "Create video player endpoint ACL and binding"); { - std::list allowedClusterList = { kClusterIdDescriptor, kClusterIdOnOff, kClusterIdWakeOnLAN, - kClusterIdMediaPlayback, kClusterIdLowPower, kClusterIdKeypadInput, - kClusterIdContentLauncher, kClusterIdAudioOutput }; - - for (const auto & clusterId : allowedClusterList) + if (vendorPrivilege == Access::Privilege::kAdminister) { - Access::AccessControl::Entry::Target target = { .flags = Access::AccessControl::Entry::Target::kCluster | - Access::AccessControl::Entry::Target::kEndpoint, - .cluster = clusterId, + ChipLogProgress(Controller, "ContentAppPlatform::ManageClientAccess Admin privilege granted"); + // a vendor with admin privilege gets access to all clusters on ep1 + Access::AccessControl::Entry::Target target = { .flags = Access::AccessControl::Entry::Target::kEndpoint, .endpoint = kLocalVideoPlayerEndpointId }; ReturnErrorOnFailure(entry.AddTarget(nullptr, target)); } + else + { + ChipLogProgress(Controller, "ContentAppPlatform::ManageClientAccess non-Admin privilege granted"); + // a vendor with non-admin privilege gets access to select clusters on ep1 + std::list allowedClusterList = { kClusterIdDescriptor, kClusterIdOnOff, kClusterIdWakeOnLAN, + kClusterIdMediaPlayback, kClusterIdLowPower, kClusterIdKeypadInput, + kClusterIdContentLauncher, kClusterIdAudioOutput }; + + for (const auto & clusterId : allowedClusterList) + { + Access::AccessControl::Entry::Target target = { .flags = Access::AccessControl::Entry::Target::kCluster | + Access::AccessControl::Entry::Target::kEndpoint, + .cluster = clusterId, + .endpoint = kLocalVideoPlayerEndpointId }; + ReturnErrorOnFailure(entry.AddTarget(nullptr, target)); + } + } bindings.push_back(Binding::Structs::TargetStruct::Type{ .node = MakeOptional(localNodeId), diff --git a/src/app/app-platform/ContentAppPlatform.h b/src/app/app-platform/ContentAppPlatform.h index af1e680c2000f2..4246914e223990 100644 --- a/src/app/app-platform/ContentAppPlatform.h +++ b/src/app/app-platform/ContentAppPlatform.h @@ -57,6 +57,12 @@ class DLL_EXPORT ContentAppFactory // Converts application (any catalog) into the platform's catalog Vendor // and then writes it to destinationApp virtual CHIP_ERROR ConvertToPlatformCatalogVendorApp(const CatalogVendorApp & sourceApp, CatalogVendorApp * destinationApp) = 0; + + // Get the privilege this vendorId should have on endpoints 1, 2, and content app endpoints + // In the case of casting video clients, this should usually be Access::Privilege::kOperate + // and for voice agents, this may be Access::Privilege::kAdminister + // When a vendor has admin privileges, it will get access to all clusters on ep1 + virtual Access::Privilege GetVendorPrivilege(uint16_t vendorId) = 0; }; class DLL_EXPORT ContentAppPlatform 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 d03900855d182f..988f082c8c7cf2 100644 --- a/src/app/clusters/access-control-server/access-control-server.cpp +++ b/src/app/clusters/access-control-server/access-control-server.cpp @@ -86,7 +86,7 @@ CHIP_ERROR LogExtensionChangedEvent(const AccessControlCluster::Structs::Extensi const Access::SubjectDescriptor & subjectDescriptor, AccessControlCluster::ChangeTypeEnum changeType) { - ExtensionEvent event{ .changeType = changeType, .adminFabricIndex = subjectDescriptor.fabricIndex }; + ExtensionEvent event{ .changeType = changeType, .fabricIndex = subjectDescriptor.fabricIndex }; if (subjectDescriptor.authMode == Access::AuthMode::kCase) { @@ -387,7 +387,7 @@ void AccessControlAttribute::OnEntryChanged(const SubjectDescriptor * subjectDes } CHIP_ERROR err; - AclEvent event{ .changeType = ChangeTypeEnum::kChanged, .adminFabricIndex = subjectDescriptor->fabricIndex }; + AclEvent event{ .changeType = ChangeTypeEnum::kChanged, .fabricIndex = subjectDescriptor->fabricIndex }; if (changeType == ChangeType::kAdded) { diff --git a/src/app/clusters/bindings/BindingManager.cpp b/src/app/clusters/bindings/BindingManager.cpp index 5e8415b08f4668..73bcf93e0b9aff 100644 --- a/src/app/clusters/bindings/BindingManager.cpp +++ b/src/app/clusters/bindings/BindingManager.cpp @@ -50,16 +50,6 @@ BindingFabricTableDelegate gFabricTableDelegate; namespace { -chip::PeerId PeerIdForNode(chip::FabricTable * fabricTable, chip::FabricIndex fabric, chip::NodeId node) -{ - const chip::FabricInfo * fabricInfo = fabricTable->FindFabricWithIndex(fabric); - if (fabricInfo == nullptr) - { - return chip::PeerId(); - } - return fabricInfo->GetPeerIdForNode(node); -} - } // namespace namespace chip { @@ -68,7 +58,7 @@ BindingManager BindingManager::sBindingManager; CHIP_ERROR BindingManager::UnicastBindingCreated(uint8_t fabricIndex, NodeId nodeId) { - return EstablishConnection(fabricIndex, nodeId); + return EstablishConnection(ScopedNodeId(nodeId, fabricIndex)); } CHIP_ERROR BindingManager::UnicastBindingRemoved(uint8_t bindingEntryId) @@ -106,29 +96,26 @@ CHIP_ERROR BindingManager::Init(const BindingManagerInitParams & params) return CHIP_NO_ERROR; } -CHIP_ERROR BindingManager::EstablishConnection(FabricIndex fabric, NodeId node) +CHIP_ERROR BindingManager::EstablishConnection(const ScopedNodeId & nodeId) { VerifyOrReturnError(mInitParams.mCASESessionManager != nullptr, CHIP_ERROR_INCORRECT_STATE); - PeerId peer = PeerIdForNode(mInitParams.mFabricTable, fabric, node); - VerifyOrReturnError(peer.GetNodeId() != kUndefinedNodeId, CHIP_ERROR_NOT_FOUND); mLastSessionEstablishmentError = CHIP_NO_ERROR; - mInitParams.mCASESessionManager->FindOrEstablishSession(peer, &mOnConnectedCallback, &mOnConnectionFailureCallback); + mInitParams.mCASESessionManager->FindOrEstablishSession(nodeId, &mOnConnectedCallback, &mOnConnectionFailureCallback); if (mLastSessionEstablishmentError == CHIP_ERROR_NO_MEMORY) { // Release the least recently used entry // TODO: Some reference counting mechanism shall be added the CASESessionManager // so that other session clients don't get accidentally closed. - FabricIndex fabricToRemove; - NodeId nodeToRemove; - if (mPendingNotificationMap.FindLRUConnectPeer(&fabricToRemove, &nodeToRemove) == CHIP_NO_ERROR) + ScopedNodeId peerToRemove; + if (mPendingNotificationMap.FindLRUConnectPeer(peerToRemove) == CHIP_NO_ERROR) { - mPendingNotificationMap.RemoveAllEntriesForNode(fabricToRemove, nodeToRemove); - PeerId lruPeer = PeerIdForNode(mInitParams.mFabricTable, fabricToRemove, nodeToRemove); - mInitParams.mCASESessionManager->ReleaseSession(lruPeer); + mPendingNotificationMap.RemoveAllEntriesForNode(peerToRemove); + mInitParams.mCASESessionManager->ReleaseSession(peerToRemove); + // Now retry mLastSessionEstablishmentError = CHIP_NO_ERROR; - mInitParams.mCASESessionManager->FindOrEstablishSession(peer, &mOnConnectedCallback, &mOnConnectionFailureCallback); + mInitParams.mCASESessionManager->FindOrEstablishSession(nodeId, &mOnConnectedCallback, &mOnConnectionFailureCallback); } } return mLastSessionEstablishmentError; @@ -151,24 +138,24 @@ void BindingManager::HandleDeviceConnected(OperationalDeviceProxy * device) { EmberBindingTableEntry entry = BindingTable::GetInstance().GetAt(pendingNotification.mBindingEntryId); - PeerId peer = PeerIdForNode(mInitParams.mFabricTable, entry.fabricIndex, entry.nodeId); - if (device->GetPeerId() == peer) + if (device->GetPeerId() == ScopedNodeId(entry.nodeId, entry.fabricIndex)) { fabricToRemove = entry.fabricIndex; nodeToRemove = entry.nodeId; mBoundDeviceChangedHandler(entry, device, pendingNotification.mContext->GetContext()); } } - mPendingNotificationMap.RemoveAllEntriesForNode(fabricToRemove, nodeToRemove); + + mPendingNotificationMap.RemoveAllEntriesForNode(ScopedNodeId(nodeToRemove, fabricToRemove)); } -void BindingManager::HandleDeviceConnectionFailure(void * context, PeerId peerId, CHIP_ERROR error) +void BindingManager::HandleDeviceConnectionFailure(void * context, const ScopedNodeId & peerId, CHIP_ERROR error) { BindingManager * manager = static_cast(context); manager->HandleDeviceConnectionFailure(peerId, error); } -void BindingManager::HandleDeviceConnectionFailure(PeerId peerId, CHIP_ERROR error) +void BindingManager::HandleDeviceConnectionFailure(const ScopedNodeId & peerId, CHIP_ERROR error) { // Simply release the entry, the connection will be re-established as needed. ChipLogError(AppServer, "Failed to establish connection to node 0x" ChipLogFormatX64, ChipLogValueX64(peerId.GetNodeId())); @@ -202,10 +189,8 @@ CHIP_ERROR BindingManager::NotifyBoundClusterChanged(EndpointId endpoint, Cluste { if (iter->type == EMBER_UNICAST_BINDING) { - const FabricInfo * fabricInfo = mInitParams.mFabricTable->FindFabricWithIndex(iter->fabricIndex); - VerifyOrReturnError(fabricInfo != nullptr, CHIP_ERROR_NOT_FOUND); - PeerId peer = fabricInfo->GetPeerIdForNode(iter->nodeId); - OperationalDeviceProxy * peerDevice = mInitParams.mCASESessionManager->FindExistingSession(peer); + OperationalDeviceProxy * peerDevice = + mInitParams.mCASESessionManager->FindExistingSession(ScopedNodeId(iter->nodeId, iter->fabricIndex)); if (peerDevice != nullptr && peerDevice->IsConnected()) { // We already have an active connection @@ -214,7 +199,7 @@ CHIP_ERROR BindingManager::NotifyBoundClusterChanged(EndpointId endpoint, Cluste else { mPendingNotificationMap.AddPendingNotification(iter.GetIndex(), bindingContext); - error = EstablishConnection(iter->fabricIndex, iter->nodeId); + error = EstablishConnection(ScopedNodeId(iter->nodeId, iter->fabricIndex)); SuccessOrExit(error == CHIP_NO_ERROR); } } diff --git a/src/app/clusters/bindings/BindingManager.h b/src/app/clusters/bindings/BindingManager.h index 86b01795d140dd..308b672a482590 100644 --- a/src/app/clusters/bindings/BindingManager.h +++ b/src/app/clusters/bindings/BindingManager.h @@ -126,10 +126,10 @@ class BindingManager static void HandleDeviceConnected(void * context, OperationalDeviceProxy * device); void HandleDeviceConnected(OperationalDeviceProxy * device); - static void HandleDeviceConnectionFailure(void * context, PeerId peerId, CHIP_ERROR error); - void HandleDeviceConnectionFailure(PeerId peerId, CHIP_ERROR error); + static void HandleDeviceConnectionFailure(void * context, const ScopedNodeId & peerId, CHIP_ERROR error); + void HandleDeviceConnectionFailure(const ScopedNodeId & peerId, CHIP_ERROR error); - CHIP_ERROR EstablishConnection(FabricIndex fabric, NodeId node); + CHIP_ERROR EstablishConnection(const ScopedNodeId & nodeId); PendingNotificationMap mPendingNotificationMap; BoundDeviceChangedHandler mBoundDeviceChangedHandler; diff --git a/src/app/clusters/bindings/PendingNotificationMap.cpp b/src/app/clusters/bindings/PendingNotificationMap.cpp index 6676a82b779d4d..a7e6adb595ce59 100644 --- a/src/app/clusters/bindings/PendingNotificationMap.cpp +++ b/src/app/clusters/bindings/PendingNotificationMap.cpp @@ -22,7 +22,7 @@ namespace chip { -CHIP_ERROR PendingNotificationMap::FindLRUConnectPeer(FabricIndex * fabric, NodeId * node) +CHIP_ERROR PendingNotificationMap::FindLRUConnectPeer(ScopedNodeId & nodeId) { // When entries are added to PendingNotificationMap, they are appended to the end. // To find the LRU peer, we need to find the peer whose last entry in the map is closer @@ -72,8 +72,7 @@ CHIP_ERROR PendingNotificationMap::FindLRUConnectPeer(FabricIndex * fabric, Node if (minLastAppearValue < UINT16_MAX) { EmberBindingTableEntry entry = BindingTable::GetInstance().GetAt(static_cast(lruBindingEntryIndex)); - *fabric = entry.fabricIndex; - *node = entry.nodeId; + nodeId = ScopedNodeId(entry.nodeId, entry.fabricIndex); return CHIP_NO_ERROR; } return CHIP_ERROR_NOT_FOUND; @@ -110,13 +109,13 @@ void PendingNotificationMap::RemoveEntry(uint8_t bindingEntryId) mNumEntries = newEntryCount; } -void PendingNotificationMap::RemoveAllEntriesForNode(FabricIndex fabric, NodeId node) +void PendingNotificationMap::RemoveAllEntriesForNode(const ScopedNodeId & nodeId) { uint8_t newEntryCount = 0; for (int i = 0; i < mNumEntries; i++) { EmberBindingTableEntry entry = BindingTable::GetInstance().GetAt(mPendingBindingEntries[i]); - if (entry.fabricIndex != fabric || entry.nodeId != node) + if (entry.fabricIndex != nodeId.GetFabricIndex() || entry.nodeId != nodeId.GetNodeId()) { mPendingBindingEntries[newEntryCount] = mPendingBindingEntries[i]; mPendingContexts[newEntryCount] = mPendingContexts[i]; diff --git a/src/app/clusters/bindings/PendingNotificationMap.h b/src/app/clusters/bindings/PendingNotificationMap.h index 5ef12ee560cbad..2e70a0718d047b 100644 --- a/src/app/clusters/bindings/PendingNotificationMap.h +++ b/src/app/clusters/bindings/PendingNotificationMap.h @@ -100,15 +100,13 @@ class PendingNotificationMap Iterator end() { return Iterator(this, mNumEntries); } - CHIP_ERROR FindLRUConnectPeer(FabricIndex * fabric, NodeId * node); + CHIP_ERROR FindLRUConnectPeer(ScopedNodeId & nodeId); void AddPendingNotification(uint8_t bindingEntryId, PendingNotificationContext * context); void RemoveEntry(uint8_t bindingEntryId); - void RemoveAllEntriesForNode(FabricTable * fabricTable, PeerId peer); - - void RemoveAllEntriesForNode(FabricIndex fabric, NodeId node); + void RemoveAllEntriesForNode(const ScopedNodeId & nodeId); void RemoveAllEntriesForFabric(FabricIndex fabric); diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index 0596cbbeb37582..2035997603a7ad 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -113,16 +113,16 @@ static EmberAfLevelControlState stateTable[kLevelControlStateTableSize]; static EmberAfLevelControlState * getState(EndpointId endpoint); static EmberAfStatus moveToLevelHandler(EndpointId endpoint, CommandId commandId, uint8_t level, uint16_t transitionTimeDs, - uint8_t optionMask, uint8_t optionOverride, uint16_t storedLevel); -static void moveHandler(EndpointId endpoint, CommandId commandId, uint8_t moveMode, uint8_t rate, uint8_t optionMask, - uint8_t optionOverride); + uint8_t optionsMask, uint8_t optionsOverride, uint16_t storedLevel); +static void moveHandler(EndpointId endpoint, CommandId commandId, uint8_t moveMode, uint8_t rate, uint8_t optionsMask, + uint8_t optionsOverride); static void stepHandler(EndpointId endpoint, CommandId commandId, uint8_t stepMode, uint8_t stepSize, uint16_t transitionTimeDs, - uint8_t optionMask, uint8_t optionOverride); -static void stopHandler(EndpointId endpoint, CommandId commandId, uint8_t optionMask, uint8_t optionOverride); + uint8_t optionsMask, uint8_t optionsOverride); +static void stopHandler(EndpointId endpoint, CommandId commandId, uint8_t optionsMask, uint8_t optionsOverride); static void setOnOffValue(EndpointId endpoint, bool onOff); static void writeRemainingTime(EndpointId endpoint, uint16_t remainingTimeMs); -static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, uint8_t optionMask, uint8_t optionOverride); +static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, uint8_t optionsMask, uint8_t optionsOverride); #if !defined(IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS) && defined(EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP) static void reallyUpdateCoupledColorTemp(EndpointId endpoint); @@ -314,7 +314,7 @@ static void setOnOffValue(EndpointId endpoint, bool onOff) #endif // EMBER_AF_PLUGIN_ON_OFF } -static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, uint8_t optionMask, uint8_t optionOverride) +static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, uint8_t optionsMask, uint8_t optionsOverride) { #ifndef IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS if (emberAfContainsAttribute(endpoint, LevelControl::Id, Attributes::Options::Id)) @@ -376,7 +376,7 @@ static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, uint8_t // ---------- The following order is important in decision making ------- // -----------more readable ---------- // - if (optionMask == 0xFF && optionOverride == 0xFF) + if (optionsMask == 0xFF && optionsOverride == 0xFF) { // 0xFF are the default values passed to the command handler when // the payload is not present - in that case there is use of option @@ -385,11 +385,11 @@ static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, uint8_t } // ---------- The above is to distinguish if the payload is present or not - if (READBITS(optionMask, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF)) + if (READBITS(optionsMask, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF)) { // Mask is present and set in the command payload, this indicates // use the over ride as temporary option - return READBITS(optionOverride, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF); + return READBITS(optionsOverride, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF); } // if we are here - use the option bits return (READBITS(options, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF)); @@ -403,15 +403,15 @@ static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, uint8_t bool emberAfLevelControlClusterMoveToLevelCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::MoveToLevel::DecodableType & commandData) { - auto & level = commandData.level; - auto & transitionTime = commandData.transitionTime; - auto & optionMask = commandData.optionMask; - auto & optionOverride = commandData.optionOverride; + auto & level = commandData.level; + auto & transitionTime = commandData.transitionTime; + auto & optionsMask = commandData.optionsMask; + auto & optionsOverride = commandData.optionsOverride; - emberAfLevelControlClusterPrintln("%pMOVE_TO_LEVEL %x %2x %x %x", "RX level-control:", level, transitionTime, optionMask, - optionOverride); + emberAfLevelControlClusterPrintln("%pMOVE_TO_LEVEL %x %2x %x %x", "RX level-control:", level, transitionTime, optionsMask, + optionsOverride); EmberAfStatus status = - moveToLevelHandler(commandPath.mEndpointId, Commands::MoveToLevel::Id, level, transitionTime, optionMask, optionOverride, + moveToLevelHandler(commandPath.mEndpointId, Commands::MoveToLevel::Id, level, transitionTime, optionsMask, optionsOverride, INVALID_STORED_LEVEL); // Don't revert to the stored level emberAfSendImmediateDefaultResponse(status); @@ -423,13 +423,15 @@ bool emberAfLevelControlClusterMoveToLevelWithOnOffCallback(app::CommandHandler const app::ConcreteCommandPath & commandPath, const Commands::MoveToLevelWithOnOff::DecodableType & commandData) { - auto & level = commandData.level; - auto & transitionTime = commandData.transitionTime; + auto & level = commandData.level; + auto & transitionTime = commandData.transitionTime; + auto & optionsMask = commandData.optionsMask; + auto & optionsOverride = commandData.optionsOverride; emberAfLevelControlClusterPrintln("%pMOVE_TO_LEVEL_WITH_ON_OFF %x %2x", "RX level-control:", level, transitionTime); - EmberAfStatus status = - moveToLevelHandler(commandPath.mEndpointId, Commands::MoveToLevelWithOnOff::Id, level, transitionTime, 0xFF, 0xFF, - INVALID_STORED_LEVEL); // Don't revert to the stored level + EmberAfStatus status = moveToLevelHandler(commandPath.mEndpointId, Commands::MoveToLevelWithOnOff::Id, level, transitionTime, + optionsMask, optionsOverride, + INVALID_STORED_LEVEL); // Don't revert to the stored level emberAfSendImmediateDefaultResponse(status); @@ -439,74 +441,81 @@ bool emberAfLevelControlClusterMoveToLevelWithOnOffCallback(app::CommandHandler bool emberAfLevelControlClusterMoveCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::Move::DecodableType & commandData) { - auto & moveMode = commandData.moveMode; - auto & rate = commandData.rate; - auto & optionMask = commandData.optionMask; - auto & optionOverride = commandData.optionOverride; + auto & moveMode = commandData.moveMode; + auto & rate = commandData.rate; + auto & optionsMask = commandData.optionsMask; + auto & optionsOverride = commandData.optionsOverride; emberAfLevelControlClusterPrintln("%pMOVE %x %x", "RX level-control:", moveMode, rate); - moveHandler(commandPath.mEndpointId, Commands::Move::Id, moveMode, rate, optionMask, optionOverride); + moveHandler(commandPath.mEndpointId, Commands::Move::Id, moveMode, rate, optionsMask, optionsOverride); return true; } bool emberAfLevelControlClusterMoveWithOnOffCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::MoveWithOnOff::DecodableType & commandData) { - auto & moveMode = commandData.moveMode; - auto & rate = commandData.rate; + auto & moveMode = commandData.moveMode; + auto & rate = commandData.rate; + auto & optionsMask = commandData.optionsMask; + auto & optionsOverride = commandData.optionsOverride; emberAfLevelControlClusterPrintln("%pMOVE_WITH_ON_OFF %x %x", "RX level-control:", moveMode, rate); - moveHandler(commandPath.mEndpointId, Commands::MoveWithOnOff::Id, moveMode, rate, 0xFF, 0xFF); + moveHandler(commandPath.mEndpointId, Commands::MoveWithOnOff::Id, moveMode, rate, optionsMask, optionsOverride); return true; } bool emberAfLevelControlClusterStepCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::Step::DecodableType & commandData) { - auto & stepMode = commandData.stepMode; - auto & stepSize = commandData.stepSize; - auto & transitionTime = commandData.transitionTime; - auto & optionMask = commandData.optionMask; - auto & optionOverride = commandData.optionOverride; + auto & stepMode = commandData.stepMode; + auto & stepSize = commandData.stepSize; + auto & transitionTime = commandData.transitionTime; + auto & optionsMask = commandData.optionsMask; + auto & optionsOverride = commandData.optionsOverride; emberAfLevelControlClusterPrintln("%pSTEP %x %x %2x", "RX level-control:", stepMode, stepSize, transitionTime); - stepHandler(commandPath.mEndpointId, Commands::Step::Id, stepMode, stepSize, transitionTime, optionMask, optionOverride); + stepHandler(commandPath.mEndpointId, Commands::Step::Id, stepMode, stepSize, transitionTime, optionsMask, optionsOverride); return true; } bool emberAfLevelControlClusterStepWithOnOffCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::StepWithOnOff::DecodableType & commandData) { - auto & stepMode = commandData.stepMode; - auto & stepSize = commandData.stepSize; - auto & transitionTime = commandData.transitionTime; + auto & stepMode = commandData.stepMode; + auto & stepSize = commandData.stepSize; + auto & transitionTime = commandData.transitionTime; + auto & optionsMask = commandData.optionsMask; + auto & optionsOverride = commandData.optionsOverride; emberAfLevelControlClusterPrintln("%pSTEP_WITH_ON_OFF %x %x %2x", "RX level-control:", stepMode, stepSize, transitionTime); - stepHandler(commandPath.mEndpointId, Commands::StepWithOnOff::Id, stepMode, stepSize, transitionTime, 0xFF, 0xFF); + stepHandler(commandPath.mEndpointId, Commands::StepWithOnOff::Id, stepMode, stepSize, transitionTime, optionsMask, + optionsOverride); return true; } bool emberAfLevelControlClusterStopCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::Stop::DecodableType & commandData) { - auto & optionMask = commandData.optionMask; - auto & optionOverride = commandData.optionOverride; + auto & optionsMask = commandData.optionsMask; + auto & optionsOverride = commandData.optionsOverride; emberAfLevelControlClusterPrintln("%pSTOP", "RX level-control:"); - stopHandler(commandPath.mEndpointId, Commands::Stop::Id, optionMask, optionOverride); + stopHandler(commandPath.mEndpointId, Commands::Stop::Id, optionsMask, optionsOverride); return true; } bool emberAfLevelControlClusterStopWithOnOffCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::StopWithOnOff::DecodableType & commandData) { + auto & optionsMask = commandData.optionsMask; + auto & optionsOverride = commandData.optionsOverride; emberAfLevelControlClusterPrintln("%pSTOP_WITH_ON_OFF", "RX level-control:"); - stopHandler(commandPath.mEndpointId, Commands::StopWithOnOff::Id, 0xFF, 0xFF); + stopHandler(commandPath.mEndpointId, Commands::StopWithOnOff::Id, optionsMask, optionsOverride); return true; } static EmberAfStatus moveToLevelHandler(EndpointId endpoint, CommandId commandId, uint8_t level, uint16_t transitionTimeDs, - uint8_t optionMask, uint8_t optionOverride, uint16_t storedLevel) + uint8_t optionsMask, uint8_t optionsOverride, uint16_t storedLevel) { EmberAfLevelControlState * state = getState(endpoint); EmberAfStatus status; @@ -523,7 +532,7 @@ static EmberAfStatus moveToLevelHandler(EndpointId endpoint, CommandId commandId return EMBER_ZCL_STATUS_INVALID_COMMAND; } - if (!shouldExecuteIfOff(endpoint, commandId, optionMask, optionOverride)) + if (!shouldExecuteIfOff(endpoint, commandId, optionsMask, optionsOverride)) { return EMBER_ZCL_STATUS_SUCCESS; } @@ -641,8 +650,8 @@ static EmberAfStatus moveToLevelHandler(EndpointId endpoint, CommandId commandId return status; } -static void moveHandler(EndpointId endpoint, CommandId commandId, uint8_t moveMode, uint8_t rate, uint8_t optionMask, - uint8_t optionOverride) +static void moveHandler(EndpointId endpoint, CommandId commandId, uint8_t moveMode, uint8_t rate, uint8_t optionsMask, + uint8_t optionsOverride) { EmberAfLevelControlState * state = getState(endpoint); EmberAfStatus status; @@ -655,7 +664,7 @@ static void moveHandler(EndpointId endpoint, CommandId commandId, uint8_t moveMo goto send_default_response; } - if (rate == 0 || !shouldExecuteIfOff(endpoint, commandId, optionMask, optionOverride)) + if (rate == 0 || !shouldExecuteIfOff(endpoint, commandId, optionsMask, optionsOverride)) { status = EMBER_ZCL_STATUS_SUCCESS; goto send_default_response; @@ -751,7 +760,7 @@ static void moveHandler(EndpointId endpoint, CommandId commandId, uint8_t moveMo } static void stepHandler(EndpointId endpoint, CommandId commandId, uint8_t stepMode, uint8_t stepSize, uint16_t transitionTimeDs, - uint8_t optionMask, uint8_t optionOverride) + uint8_t optionsMask, uint8_t optionsOverride) { EmberAfLevelControlState * state = getState(endpoint); EmberAfStatus status; @@ -764,7 +773,7 @@ static void stepHandler(EndpointId endpoint, CommandId commandId, uint8_t stepMo goto send_default_response; } - if (!shouldExecuteIfOff(endpoint, commandId, optionMask, optionOverride)) + if (!shouldExecuteIfOff(endpoint, commandId, optionsMask, optionsOverride)) { status = EMBER_ZCL_STATUS_SUCCESS; goto send_default_response; @@ -868,7 +877,7 @@ static void stepHandler(EndpointId endpoint, CommandId commandId, uint8_t stepMo emberAfSendImmediateDefaultResponse(status); } -static void stopHandler(EndpointId endpoint, CommandId commandId, uint8_t optionMask, uint8_t optionOverride) +static void stopHandler(EndpointId endpoint, CommandId commandId, uint8_t optionsMask, uint8_t optionsOverride) { EmberAfLevelControlState * state = getState(endpoint); EmberAfStatus status; @@ -879,7 +888,7 @@ static void stopHandler(EndpointId endpoint, CommandId commandId, uint8_t option goto send_default_response; } - if (!shouldExecuteIfOff(endpoint, commandId, optionMask, optionOverride)) + if (!shouldExecuteIfOff(endpoint, commandId, optionsMask, optionsOverride)) { status = EMBER_ZCL_STATUS_SUCCESS; goto send_default_response; diff --git a/src/app/clusters/network-commissioning/network-commissioning.cpp b/src/app/clusters/network-commissioning/network-commissioning.cpp index f6d7e11b992b9c..13c890a61bd1bb 100644 --- a/src/app/clusters/network-commissioning/network-commissioning.cpp +++ b/src/app/clusters/network-commissioning/network-commissioning.cpp @@ -271,12 +271,14 @@ void Instance::HandleScanNetworks(HandlerContext & ctx, const Commands::ScanNetw } mCurrentOperationBreadcrumb = req.breadcrumb; mAsyncCommandHandle = CommandHandler::Handle(&ctx.mCommandHandler); + ctx.mCommandHandler.FlushAcksRightAwayOnSlowCommand(); mpDriver.Get()->ScanNetworks(ssid, this); } else if (mFeatureFlags.Has(NetworkCommissioningFeature::kThreadNetworkInterface)) { mCurrentOperationBreadcrumb = req.breadcrumb; mAsyncCommandHandle = CommandHandler::Handle(&ctx.mCommandHandler); + ctx.mCommandHandler.FlushAcksRightAwayOnSlowCommand(); mpDriver.Get()->ScanNetworks(this); } else diff --git a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp index f464d20fd14ee5..e82634e8a06ed6 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -325,25 +326,18 @@ void OnPlatformEventHandler(const chip::DeviceLayer::ChipDeviceEvent * event, in // As per specifications section 11.22.5.1. Constant RESP_MAX constexpr size_t kMaxRspLen = 900; -// TODO: The code currently has two sources of truths for fabrics, the fabricInfo table + the attributes. There should only be one, -// the attributes list. Currently the attributes are not persisted so we are keeping the fabric table to have the -// fabrics/admrins be persisted. Once attributes are persisted, there should only be one sorce of truth, the attributes list and -// only that should be modifed to perosst/read/write fabrics. -// TODO: Once attributes are persisted, implement reading/writing/manipulation fabrics around that and remove fabricTable -// logic. class OpCredsFabricTableDelegate : public chip::FabricTable::Delegate { public: - // Gets called when a fabric is deleted from KVS store - void OnFabricRemoved(const FabricTable & fabricTable, FabricIndex fabricIndex) override + // Gets called when a fabric is about to be deleted + void FabricWillBeRemoved(const FabricTable & fabricTable, FabricIndex fabricIndex) override { - ChipLogProgress(Zcl, "OpCreds: Fabric index 0x%x was removed", static_cast(fabricIndex)); - // The Leave event SHOULD be emitted by a Node prior to permanently leaving the Fabric. for (auto endpoint : EnabledEndpointsWithServerCluster(Basic::Id)) { // If Basic cluster is implemented on this endpoint Basic::Events::Leave::Type event; + event.fabricIndex = fabricIndex; EventNumber eventNumber; if (CHIP_NO_ERROR != LogEvent(event, endpoint, eventNumber)) @@ -359,8 +353,14 @@ class OpCredsFabricTableDelegate : public chip::FabricTable::Delegate // - removing the fabric removes all associated access control entries, so generating // subsequent reports containing the leave event will fail the access control check. InteractionModelEngine::GetInstance()->GetReportingEngine().ScheduleUrgentEventDeliverySync(); - EventManagement::GetInstance().FabricRemoved(fabricIndex); + } + // Gets called when a fabric is deleted + void OnFabricRemoved(const FabricTable & fabricTable, FabricIndex fabricIndex) override + { + ChipLogProgress(Zcl, "OpCreds: Fabric index 0x%x was removed", static_cast(fabricIndex)); + + EventManagement::GetInstance().FabricRemoved(fabricIndex); NotifyFabricTableChanged(); } diff --git a/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp b/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp index 603d3874ec4369..1aecdb3022ae27 100644 --- a/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp +++ b/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp @@ -366,23 +366,13 @@ void DefaultOTARequestor::ConnectToProvider(OnConnectedAction onConnectedAction) return; } - const FabricInfo * fabricInfo = mServer->GetFabricTable().FindFabricWithIndex(mProviderLocation.Value().fabricIndex); - - if (fabricInfo == nullptr) - { - ChipLogError(SoftwareUpdate, "Cannot find fabric"); - RecordErrorUpdateState(CHIP_ERROR_INCORRECT_STATE); - return; - } - // Set the action to take once connection is successfully established mOnConnectedAction = onConnectedAction; ChipLogDetail(SoftwareUpdate, "Establishing session to provider node ID 0x" ChipLogFormatX64 " on fabric index %d", ChipLogValueX64(mProviderLocation.Value().providerNodeID), mProviderLocation.Value().fabricIndex); - mCASESessionManager->FindOrEstablishSession(fabricInfo->GetPeerIdForNode(mProviderLocation.Value().providerNodeID), - &mOnConnectedCallback, &mOnConnectionFailureCallback); + mCASESessionManager->FindOrEstablishSession(GetProviderScopedId(), &mOnConnectedCallback, &mOnConnectionFailureCallback); } void DefaultOTARequestor::DisconnectFromProvider() @@ -396,17 +386,9 @@ void DefaultOTARequestor::DisconnectFromProvider() return; } - const FabricInfo * fabricInfo = mServer->GetFabricTable().FindFabricWithIndex(mProviderLocation.Value().fabricIndex); - if (fabricInfo == nullptr) - { - ChipLogError(SoftwareUpdate, "Cannot find fabric"); - RecordErrorUpdateState(CHIP_ERROR_INCORRECT_STATE); - return; - } - - PeerId peerID = fabricInfo->GetPeerIdForNode(mProviderLocation.Value().providerNodeID); - mCASESessionManager->FindExistingSession(peerID)->Disconnect(); - mCASESessionManager->ReleaseSession(peerID); + auto providerNodeId = GetProviderScopedId(); + mCASESessionManager->FindExistingSession(providerNodeId)->Disconnect(); + mCASESessionManager->ReleaseSession(providerNodeId); } // Requestor is directed to cancel image update in progress. All the Requestor state is @@ -492,7 +474,7 @@ void DefaultOTARequestor::OnConnected(void * context, OperationalDeviceProxy * d } // Called whenever FindOrEstablishSession fails -void DefaultOTARequestor::OnConnectionFailure(void * context, PeerId peerId, CHIP_ERROR error) +void DefaultOTARequestor::OnConnectionFailure(void * context, const ScopedNodeId & peerId, CHIP_ERROR error) { DefaultOTARequestor * requestorCore = static_cast(context); VerifyOrDie(requestorCore != nullptr); diff --git a/src/app/clusters/ota-requestor/DefaultOTARequestor.h b/src/app/clusters/ota-requestor/DefaultOTARequestor.h index 49b8dfeb865859..f80f7555fe05ee 100644 --- a/src/app/clusters/ota-requestor/DefaultOTARequestor.h +++ b/src/app/clusters/ota-requestor/DefaultOTARequestor.h @@ -205,6 +205,12 @@ class DefaultOTARequestor : public OTARequestorInterface, public BDXDownloader:: */ IdleStateReason MapErrorToIdleStateReason(CHIP_ERROR error); + ScopedNodeId GetProviderScopedId() const + { + VerifyOrDie(mProviderLocation.HasValue()); + return ScopedNodeId(mProviderLocation.Value().providerNodeID, mProviderLocation.Value().fabricIndex); + } + /** * Record the new update state by updating the corresponding server attribute and logging a StateTransition event */ @@ -280,7 +286,7 @@ class DefaultOTARequestor : public OTARequestorInterface, public BDXDownloader:: * Session connection callbacks */ static void OnConnected(void * context, OperationalDeviceProxy * deviceProxy); - static void OnConnectionFailure(void * context, PeerId peerId, CHIP_ERROR error); + static void OnConnectionFailure(void * context, const ScopedNodeId & peerId, CHIP_ERROR error); Callback::Callback mOnConnectedCallback; Callback::Callback mOnConnectionFailureCallback; diff --git a/src/app/reporting/Engine.cpp b/src/app/reporting/Engine.cpp index 25ca090ba87aa1..55527a5ce4639f 100644 --- a/src/app/reporting/Engine.cpp +++ b/src/app/reporting/Engine.cpp @@ -23,8 +23,9 @@ * */ -#include +#include #include +#include #include #include @@ -290,21 +291,62 @@ CHIP_ERROR Engine::BuildSingleReportDataAttributeReportIBs(ReportDataMessage::Bu return err; } +CHIP_ERROR Engine::CheckAccessDeniedEventPaths(TLV::TLVWriter & aWriter, bool & aHasEncodedData, ReadHandler * apReadHandler) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + for (auto current = apReadHandler->mpEventPathList; current != nullptr;) + { + if (current->mValue.HasEventWildcard()) + { + current = current->mpNext; + continue; + } + + Access::RequestPath requestPath{ .cluster = current->mValue.mClusterId, .endpoint = current->mValue.mEndpointId }; + ConcreteEventPath path(current->mValue.mEndpointId, current->mValue.mClusterId, current->mValue.mEventId); + Access::Privilege requestPrivilege = RequiredPrivilege::ForReadEvent(path); + + err = Access::GetAccessControl().Check(apReadHandler->GetSubjectDescriptor(), requestPath, requestPrivilege); + if (err != CHIP_ERROR_ACCESS_DENIED) + { + ReturnErrorOnFailure(err); + } + else + { + TLV::TLVWriter checkpoint = aWriter; + err = EventReportIB::ConstructEventStatusIB(aWriter, path, + StatusIB(Protocols::InteractionModel::Status::UnsupportedAccess)); + if (err != CHIP_NO_ERROR) + { + aWriter = checkpoint; + break; + } + aHasEncodedData = true; + ChipLogDetail(InteractionModel, "Acces to event (%u, " ChipLogFormatMEI ", " ChipLogFormatMEI ") denied by ACL", + current->mValue.mEndpointId, ChipLogValueMEI(current->mValue.mClusterId), + ChipLogValueMEI(current->mValue.mEventId)); + } + current = current->mpNext; + } + + return err; +} + CHIP_ERROR Engine::BuildSingleReportDataEventReports(ReportDataMessage::Builder & aReportDataBuilder, ReadHandler * apReadHandler, bool aBufferIsUsed, bool * apHasMoreChunks, bool * apHasEncodedData) { - CHIP_ERROR err = CHIP_NO_ERROR; - size_t eventCount = 0; + CHIP_ERROR err = CHIP_NO_ERROR; + size_t eventCount = 0; + bool hasEncodedStatus = false; TLV::TLVWriter backup; bool eventClean = true; - const auto * eventList = apReadHandler->GetEventPathList(); auto & eventMin = apReadHandler->GetEventMin(); EventManagement & eventManager = EventManagement::GetInstance(); bool hasMoreChunks = false; aReportDataBuilder.Checkpoint(backup); - VerifyOrExit(eventList != nullptr, ); + VerifyOrExit(apReadHandler->GetEventPathList() != nullptr, ); // If the eventManager is not valid or has not been initialized, // skip the rest of processing @@ -326,7 +368,11 @@ CHIP_ERROR Engine::BuildSingleReportDataEventReports(ReportDataMessage::Builder SuccessOrExit(err = aReportDataBuilder.GetError()); VerifyOrExit(eventReportIBs.GetWriter() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = eventReportIBs.GetWriter()->ReserveBuffer(kReservedSizeEndOfReportIBs)); - err = eventManager.FetchEventsSince(*(eventReportIBs.GetWriter()), eventList, eventMin, eventCount, + + err = CheckAccessDeniedEventPaths(*(eventReportIBs.GetWriter()), hasEncodedStatus, apReadHandler); + SuccessOrExit(err); + + err = eventManager.FetchEventsSince(*(eventReportIBs.GetWriter()), apReadHandler->GetEventPathList(), eventMin, eventCount, apReadHandler->GetSubjectDescriptor()); if ((err == CHIP_END_OF_TLV) || (err == CHIP_ERROR_TLV_UNDERRUN) || (err == CHIP_NO_ERROR)) @@ -375,12 +421,12 @@ CHIP_ERROR Engine::BuildSingleReportDataEventReports(ReportDataMessage::Builder exit: if (apHasEncodedData != nullptr) { - *apHasEncodedData = !(eventCount == 0 || eventClean); + *apHasEncodedData = hasEncodedStatus || (eventCount != 0); } // Maybe encoding the attributes has already used up all space. if ((err == CHIP_NO_ERROR || err == CHIP_ERROR_NO_MEMORY || err == CHIP_ERROR_BUFFER_TOO_SMALL) && - (eventCount == 0 || eventClean)) + !(hasEncodedStatus || (eventCount != 0))) { aReportDataBuilder.Rollback(backup); aReportDataBuilder.ResetError(); diff --git a/src/app/reporting/Engine.h b/src/app/reporting/Engine.h index cb25b85d0b873b..620cecf0b70b15 100644 --- a/src/app/reporting/Engine.h +++ b/src/app/reporting/Engine.h @@ -154,6 +154,7 @@ class Engine AttributeReportIBs::Builder & aAttributeReportIBs, const ConcreteReadAttributePath & aClusterInfo, AttributeValueEncoder::AttributeEncodeState * apEncoderState); + CHIP_ERROR CheckAccessDeniedEventPaths(TLV::TLVWriter & aWriter, bool & aHasEncodedData, ReadHandler * apReadHandler); // If version match, it means don't send, if version mismatch, it means send. // If client sends the same path with multiple data versions, client will get the data back per the spec, because at least one diff --git a/src/app/server/AppDelegate.h b/src/app/server/AppDelegate.h index e722e1b41b8f00..49937c62d7168e 100644 --- a/src/app/server/AppDelegate.h +++ b/src/app/server/AppDelegate.h @@ -28,6 +28,13 @@ class AppDelegate virtual ~AppDelegate() {} virtual void OnCommissioningSessionStarted() {} virtual void OnCommissioningSessionStopped() {} + + /* + * This is called anytime a basic or enhanced commissioning window is opened. + * + * The type of the window can be retrieved by calling + * CommissioningWindowManager::CommissioningWindowStatus() + */ virtual void OnCommissioningWindowOpened() {} virtual void OnCommissioningWindowClosed() {} }; diff --git a/src/app/server/CommissioningWindowManager.cpp b/src/app/server/CommissioningWindowManager.cpp index 039bf7da5105d3..01ffdc16571847 100644 --- a/src/app/server/CommissioningWindowManager.cpp +++ b/src/app/server/CommissioningWindowManager.cpp @@ -374,11 +374,6 @@ CHIP_ERROR CommissioningWindowManager::StartAdvertisement() } #endif // CONFIG_NETWORK_LAYER_BLE - if (mAppDelegate != nullptr) - { - mAppDelegate->OnCommissioningWindowOpened(); - } - if (mUseECM) { mWindowStatus = AdministratorCommissioning::CommissioningWindowStatus::kEnhancedWindowOpen; @@ -388,6 +383,11 @@ CHIP_ERROR CommissioningWindowManager::StartAdvertisement() mWindowStatus = AdministratorCommissioning::CommissioningWindowStatus::kBasicWindowOpen; } + if (mAppDelegate != nullptr) + { + mAppDelegate->OnCommissioningWindowOpened(); + } + // reset all advertising, switching to our new commissioning mode. app::DnssdServer::Instance().StartServer(); diff --git a/src/app/server/OnboardingCodesUtil.cpp b/src/app/server/OnboardingCodesUtil.cpp index 261db799345899..72d1a9d9306893 100644 --- a/src/app/server/OnboardingCodesUtil.cpp +++ b/src/app/server/OnboardingCodesUtil.cpp @@ -115,13 +115,15 @@ CHIP_ERROR GetPayloadContents(chip::PayloadContents & aPayload, chip::Rendezvous #endif } - err = GetCommissionableDataProvider()->GetSetupDiscriminator(aPayload.discriminator); + uint16_t discriminator = 0; + err = GetCommissionableDataProvider()->GetSetupDiscriminator(discriminator); if (err != CHIP_NO_ERROR) { ChipLogError(AppServer, "GetCommissionableDataProvider()->GetSetupDiscriminator() failed: %" CHIP_ERROR_FORMAT, err.Format()); return err; } + aPayload.discriminator.SetLongValue(discriminator); err = chip::DeviceLayer::GetDeviceInstanceInfoProvider()->GetVendorId(aPayload.vendorID); if (err != CHIP_NO_ERROR) diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 6e8799911c554b..15674b10b92b38 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -221,9 +221,6 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) app::DnssdServer::Instance().SetFabricTable(&mFabrics); app::DnssdServer::Instance().SetCommissioningModeProvider(&mCommissioningWindowManager); - err = chip::app::InteractionModelEngine::GetInstance()->Init(&mExchangeMgr, &GetFabricTable()); - SuccessOrExit(err); - chip::Dnssd::Resolver::Instance().Init(DeviceLayer::UDPEndPointManager()); #if CHIP_CONFIG_ENABLE_SERVER_IM_EVENT @@ -307,6 +304,9 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) mCertificateValidityPolicy, mGroupsProvider); SuccessOrExit(err); + err = chip::app::InteractionModelEngine::GetInstance()->Init(&mExchangeMgr, &GetFabricTable(), &mCASESessionManager); + SuccessOrExit(err); + // This code is necessary to restart listening to existing groups after a reboot // Each manufacturer needs to validate that they can rejoin groups by placing this code at the appropriate location for them // diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn index fd8d1571623cf6..7d57e72ebb8667 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -26,12 +26,14 @@ static_library("helpers") { sources = [ "AppTestContext.cpp", "AppTestContext.h", + "integration/RequiredPrivilegeStubs.cpp", ] cflags = [ "-Wconversion" ] deps = [ "${chip_root}/src/access", + "${chip_root}/src/app", "${chip_root}/src/lib/support", "${chip_root}/src/messaging/tests:helpers", "${chip_root}/src/transport/raw/tests:helpers", @@ -69,6 +71,7 @@ chip_test_suite("tests") { output_name = "libAppTests" test_sources = [ + "TestAclEvent.cpp", "TestAttributePathExpandIterator.cpp", "TestAttributeValueDecoder.cpp", "TestAttributeValueEncoder.cpp", diff --git a/src/app/tests/TestAclEvent.cpp b/src/app/tests/TestAclEvent.cpp new file mode 100644 index 00000000000000..b67ca621c7e44f --- /dev/null +++ b/src/app/tests/TestAclEvent.cpp @@ -0,0 +1,405 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * This file implements unit tests for CHIP Interaction Model Read Interaction + * + */ + +#include "lib/support/CHIPMem.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace { +using namespace chip; +using namespace chip::Access; + +uint8_t gDebugEventBuffer[128]; +uint8_t gInfoEventBuffer[128]; +uint8_t gCritEventBuffer[128]; +chip::app::CircularEventBuffer gCircularEventBuffer[3]; +chip::ClusterId kTestClusterId1 = 6; +chip::ClusterId kTestClusterId2 = 7; +chip::EndpointId kTestEndpointId = 1; +chip::EventId kTestEventIdDebug = 1; +chip::EventId kTestEventIdCritical = 2; +chip::TLV::Tag kTestEventTag = chip::TLV::ContextTag(1); + +class TestAccessControlDelegate : public AccessControl::Delegate +{ +public: + // Check + CHIP_ERROR Check(const SubjectDescriptor & subjectDescriptor, const chip::Access::RequestPath & requestPath, + Privilege requestPrivilege) override + { + if (requestPath.cluster == kTestClusterId1) + { + return CHIP_ERROR_ACCESS_DENIED; + } + return CHIP_NO_ERROR; + } +}; + +AccessControl::Delegate * GetTestAccessControlDelegate() +{ + static TestAccessControlDelegate accessControlDelegate; + return &accessControlDelegate; +} + +class TestDeviceTypeResolver : public AccessControl::DeviceTypeResolver +{ +public: + bool IsDeviceTypeOnEndpoint(DeviceTypeId deviceType, EndpointId endpoint) override { return false; } +} gDeviceTypeResolver; + +class TestContext : public chip::Test::AppContext +{ +public: + static int Initialize(void * context) + { + if (AppContext::Initialize(context) != SUCCESS) + return FAILURE; + + auto * ctx = static_cast(context); + + if (ctx->mEventCounter.Init(0) != CHIP_NO_ERROR) + { + return FAILURE; + } + + chip::app::LogStorageResources logStorageResources[] = { + { &gDebugEventBuffer[0], sizeof(gDebugEventBuffer), chip::app::PriorityLevel::Debug }, + { &gInfoEventBuffer[0], sizeof(gInfoEventBuffer), chip::app::PriorityLevel::Info }, + { &gCritEventBuffer[0], sizeof(gCritEventBuffer), chip::app::PriorityLevel::Critical }, + }; + + chip::app::EventManagement::CreateEventManagement(&ctx->GetExchangeManager(), ArraySize(logStorageResources), + gCircularEventBuffer, logStorageResources, &ctx->mEventCounter); + Access::GetAccessControl().Finish(); + Access::GetAccessControl().Init(GetTestAccessControlDelegate(), gDeviceTypeResolver); + return SUCCESS; + } + + static int Finalize(void * context) + { + chip::app::EventManagement::DestroyEventManagement(); + + if (AppContext::Finalize(context) != SUCCESS) + return FAILURE; + + return SUCCESS; + } + +private: + chip::MonotonicallyIncreasingCounter mEventCounter; +}; + +class TestEventGenerator : public chip::app::EventLoggingDelegate +{ +public: + CHIP_ERROR WriteEvent(chip::TLV::TLVWriter & aWriter) + { + chip::TLV::TLVType dataContainerType; + ReturnErrorOnFailure(aWriter.StartContainer(chip::TLV::ContextTag(chip::to_underlying(chip::app::EventDataIB::Tag::kData)), + chip::TLV::kTLVType_Structure, dataContainerType)); + ReturnErrorOnFailure(aWriter.Put(kTestEventTag, mStatus)); + return aWriter.EndContainer(dataContainerType); + } + + void SetStatus(int32_t aStatus) { mStatus = aStatus; } + +private: + int32_t mStatus; +}; + +void GenerateEvents(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + chip::EventNumber eid1, eid2; + chip::app::EventOptions options1; + options1.mPath = { kTestEndpointId, kTestClusterId1, kTestEventIdDebug }; + options1.mPriority = chip::app::PriorityLevel::Info; + + chip::app::EventOptions options2; + options2.mPath = { kTestEndpointId, kTestClusterId2, kTestEventIdCritical }; + options2.mPriority = chip::app::PriorityLevel::Critical; + TestEventGenerator testEventGenerator; + chip::app::EventManagement & logMgmt = chip::app::EventManagement::GetInstance(); + + ChipLogDetail(DataManagement, "Generating Events"); + testEventGenerator.SetStatus(0); + err = logMgmt.LogEvent(&testEventGenerator, options1, eid1); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + testEventGenerator.SetStatus(1); + err = logMgmt.LogEvent(&testEventGenerator, options2, eid2); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); +} + +class MockInteractionModelApp : public chip::app::ReadClient::Callback +{ +public: + void OnEventData(const chip::app::EventHeader & aEventHeader, chip::TLV::TLVReader * apData, + const chip::app::StatusIB * apStatus) override + { + ++mNumDataElementIndex; + mGotEventResponse = true; + if (apStatus != nullptr && !apStatus->IsSuccess()) + { + mNumReadEventFailureStatusReceived++; + mLastStatusReceived = *apStatus; + } + else + { + mLastStatusReceived = chip::app::StatusIB(); + } + } + + void OnError(CHIP_ERROR aError) override + { + mError = aError; + mReadError = true; + } + + void OnDone(chip::app::ReadClient *) override {} + + void OnDeallocatePaths(chip::app::ReadPrepareParams && aReadPrepareParams) override + { + if (aReadPrepareParams.mpEventPathParamsList != nullptr) + { + delete[] aReadPrepareParams.mpEventPathParamsList; + } + } + + int mNumDataElementIndex = 0; + bool mGotEventResponse = false; + int mNumReadEventFailureStatusReceived = 0; + int mNumAttributeResponse = 0; + bool mGotReport = false; + bool mReadError = false; + chip::app::ReadHandler * mpReadHandler = nullptr; + chip::app::StatusIB mLastStatusReceived; + CHIP_ERROR mError = CHIP_NO_ERROR; + std::vector mReceivedAttributePaths; +}; + +} // namespace + +namespace chip { +namespace app { +class TestAclEvent +{ +public: + static void TestReadRoundtripWithEventStatusIBInEventReport(nlTestSuite * apSuite, void * apContext); +}; + +void TestAclEvent::TestReadRoundtripWithEventStatusIBInEventReport(nlTestSuite * apSuite, void * apContext) +{ + TestContext & ctx = *static_cast(apContext); + CHIP_ERROR err = CHIP_NO_ERROR; + + Messaging::ReliableMessageMgr * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); + // Shouldn't have anything in the retransmit table when starting the test. + NL_TEST_ASSERT(apSuite, rm->TestGetCountRetransTable() == 0); + + GenerateEvents(apSuite, apContext); + + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + // A custom AccessControl::Delegate has been installed that grants privilege to any cluster except the test cluster. + // When reading events with concrete paths without enough privilege, we will get a EventStatusIB + { + chip::app::EventPathParams eventPathParams[1]; + eventPathParams[0].mEndpointId = kTestEndpointId; + eventPathParams[0].mClusterId = kTestClusterId1; + eventPathParams[0].mEventId = kTestEventIdDebug; + + ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); + readPrepareParams.mpEventPathParamsList = eventPathParams; + readPrepareParams.mEventPathParamsListSize = 1; + readPrepareParams.mEventNumber.SetValue(1); + + MockInteractionModelApp delegate; + NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); + + app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, + chip::app::ReadClient::InteractionType::Read); + + err = readClient.SendRequest(readPrepareParams); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + ctx.DrainAndServiceIO(); + + NL_TEST_ASSERT(apSuite, delegate.mGotEventResponse); + NL_TEST_ASSERT(apSuite, delegate.mNumReadEventFailureStatusReceived == 1); + NL_TEST_ASSERT(apSuite, delegate.mLastStatusReceived.mStatus == Protocols::InteractionModel::Status::UnsupportedAccess); + NL_TEST_ASSERT(apSuite, !delegate.mReadError); + } + + GenerateEvents(apSuite, apContext); + + // When reading events with withcard paths without enough privilege for reading all events, we will exclude all events without + // enough priviledge when generating the report. + { + chip::app::EventPathParams eventPathParams[1]; + eventPathParams[0].mEndpointId = kTestEndpointId; + eventPathParams[0].mClusterId = kTestClusterId1; + + ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); + readPrepareParams.mpEventPathParamsList = eventPathParams; + readPrepareParams.mEventPathParamsListSize = 1; + readPrepareParams.mEventNumber.SetValue(1); + + MockInteractionModelApp delegate; + NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); + + app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, + chip::app::ReadClient::InteractionType::Read); + + err = readClient.SendRequest(readPrepareParams); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + ctx.DrainAndServiceIO(); + NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); + NL_TEST_ASSERT(apSuite, delegate.mNumReadEventFailureStatusReceived == 0); + NL_TEST_ASSERT(apSuite, !delegate.mReadError); + } + + GenerateEvents(apSuite, apContext); + + // When reading events with withcard paths where the partial don't have enough privilege, we will exclude those partial + // when generating the report. + { + chip::app::EventPathParams eventPathParams[1]; + eventPathParams[0].mEndpointId = kTestEndpointId; + + ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); + readPrepareParams.mpEventPathParamsList = eventPathParams; + readPrepareParams.mEventPathParamsListSize = 1; + readPrepareParams.mEventNumber.SetValue(1); + + MockInteractionModelApp delegate; + NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); + + app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, + chip::app::ReadClient::InteractionType::Read); + + err = readClient.SendRequest(readPrepareParams); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + ctx.DrainAndServiceIO(); + NL_TEST_ASSERT(apSuite, delegate.mGotEventResponse); + NL_TEST_ASSERT(apSuite, delegate.mNumReadEventFailureStatusReceived == 0); + NL_TEST_ASSERT(apSuite, !delegate.mReadError); + } + + GenerateEvents(apSuite, apContext); + + // When reading events with two concrete paths where one has enough priviledge, another don't have , we will get a EventStatusIB + // and eventDataIB + { + chip::app::EventPathParams eventPathParams[2]; + eventPathParams[0].mEndpointId = kTestEndpointId; + eventPathParams[0].mClusterId = kTestClusterId1; + eventPathParams[0].mEventId = kTestEventIdDebug; + eventPathParams[1].mEndpointId = kTestEndpointId; + eventPathParams[1].mClusterId = kTestClusterId2; + eventPathParams[1].mEventId = kTestEventIdCritical; + + ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); + readPrepareParams.mpEventPathParamsList = eventPathParams; + readPrepareParams.mEventPathParamsListSize = 1; + readPrepareParams.mEventNumber.SetValue(1); + + MockInteractionModelApp delegate; + NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); + + app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, + chip::app::ReadClient::InteractionType::Read); + + err = readClient.SendRequest(readPrepareParams); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + ctx.DrainAndServiceIO(); + NL_TEST_ASSERT(apSuite, delegate.mGotEventResponse); + NL_TEST_ASSERT(apSuite, delegate.mNumReadEventFailureStatusReceived == 1); + NL_TEST_ASSERT(apSuite, !delegate.mReadError); + } + NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadClients() == 0); + engine->Shutdown(); + NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); +} + +} // namespace app +} // namespace chip + +namespace { + +/** + * Test Suite. It lists all the test functions. + */ + +// clang-format off +const nlTest sTests[] = +{ + NL_TEST_DEF("TestReadRoundtripWithEventStatusIBInEventReport", chip::app::TestAclEvent::TestReadRoundtripWithEventStatusIBInEventReport), + NL_TEST_SENTINEL() +}; +// clang-format on + +// clang-format off +nlTestSuite sSuite = +{ + "TestAclEvent", + &sTests[0], + TestContext::Initialize, + TestContext::Finalize +}; +// clang-format on + +} // namespace + +int TestAclEvent() +{ + return chip::ExecuteTestsWithContext(&sSuite); +} + +CHIP_REGISTER_TEST_SUITE(TestAclEvent) diff --git a/src/app/tests/TestBuilderParser.cpp b/src/app/tests/TestBuilderParser.cpp index 74ff9af2a0eb5e..314353e8b70029 100644 --- a/src/app/tests/TestBuilderParser.cpp +++ b/src/app/tests/TestBuilderParser.cpp @@ -16,7 +16,7 @@ * limitations under the License. */ -#include +#include #include #include #include diff --git a/src/app/tests/TestCommandInteraction.cpp b/src/app/tests/TestCommandInteraction.cpp index 6b7a089104229c..41245dca9be0a5 100644 --- a/src/app/tests/TestCommandInteraction.cpp +++ b/src/app/tests/TestCommandInteraction.cpp @@ -24,7 +24,7 @@ #include -#include +#include #include #include #include @@ -452,8 +452,8 @@ void TestCommandInteraction::TestCommandHandlerWithWrongState(nlTestSuite * apSu NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); TestExchangeDelegate delegate; - commandHandler.mpExchangeCtx = ctx.NewExchangeToAlice(&delegate); - err = commandHandler.SendCommandResponse(); + commandHandler.mExchangeCtx.Grab(ctx.NewExchangeToAlice(&delegate)); + err = commandHandler.SendCommandResponse(); NL_TEST_ASSERT(apSuite, err == CHIP_ERROR_INCORRECT_STATE); } @@ -488,7 +488,7 @@ void TestCommandInteraction::TestCommandHandlerWithSendEmptyCommand(nlTestSuite System::PacketBufferHandle commandDatabuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); TestExchangeDelegate delegate; - commandHandler.mpExchangeCtx = ctx.NewExchangeToAlice(&delegate); + commandHandler.mExchangeCtx.Grab(ctx.NewExchangeToAlice(&delegate)); err = commandHandler.PrepareCommand(path); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -521,7 +521,7 @@ void TestCommandInteraction::ValidateCommandHandlerWithSendCommand(nlTestSuite * System::PacketBufferHandle commandPacket; TestExchangeDelegate delegate; - commandHandler.mpExchangeCtx = ctx.NewExchangeToAlice(&delegate); + commandHandler.mExchangeCtx.Grab(ctx.NewExchangeToAlice(&delegate)); AddInvokeResponseData(apSuite, apContext, &commandHandler, aNeedStatusCode); err = commandHandler.Finalize(commandPacket); @@ -581,7 +581,7 @@ void TestCommandInteraction::TestCommandHandlerCommandDataEncoding(nlTestSuite * System::PacketBufferHandle commandPacket; TestExchangeDelegate delegate; - commandHandler.mpExchangeCtx = ctx.NewExchangeToAlice(&delegate); + commandHandler.mExchangeCtx.Grab(ctx.NewExchangeToAlice(&delegate)); auto path = MakeTestCommandPath(); @@ -608,7 +608,7 @@ void TestCommandInteraction::TestCommandHandlerCommandEncodeFailure(nlTestSuite System::PacketBufferHandle commandPacket; TestExchangeDelegate delegate; - commandHandler.mpExchangeCtx = ctx.NewExchangeToAlice(&delegate); + commandHandler.mExchangeCtx.Grab(ctx.NewExchangeToAlice(&delegate)); auto path = MakeTestCommandPath(); @@ -635,7 +635,7 @@ void TestCommandInteraction::TestCommandHandlerCommandEncodeExternalFailure(nlTe System::PacketBufferHandle commandPacket; TestExchangeDelegate delegate; - commandHandler.mpExchangeCtx = ctx.NewExchangeToAlice(&delegate); + commandHandler.mExchangeCtx.Grab(ctx.NewExchangeToAlice(&delegate)); auto path = MakeTestCommandPath(); @@ -672,7 +672,7 @@ void TestCommandInteraction::TestCommandHandlerWithProcessReceivedMsg(nlTestSuit System::PacketBufferHandle commandDatabuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); TestExchangeDelegate delegate; - commandHandler.mpExchangeCtx = ctx.NewExchangeToAlice(&delegate); + commandHandler.mExchangeCtx.Grab(ctx.NewExchangeToAlice(&delegate)); GenerateInvokeRequest(apSuite, apContext, commandDatabuf, /* aIsTimedRequest = */ false, kTestCommandIdWithData); err = commandHandler.ProcessInvokeRequest(std::move(commandDatabuf), false); @@ -711,7 +711,7 @@ void TestCommandInteraction::TestCommandHandlerWithProcessReceivedEmptyDataMsg(n System::PacketBufferHandle commandDatabuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); TestExchangeDelegate delegate; - commandHandler.mpExchangeCtx = ctx.NewExchangeToAlice(&delegate); + commandHandler.mExchangeCtx.Grab(ctx.NewExchangeToAlice(&delegate)); chip::isCommandDispatched = false; GenerateInvokeRequest(apSuite, apContext, commandDatabuf, messageIsTimed, kTestCommandIdNoData); diff --git a/src/app/tests/TestMessageDef.cpp b/src/app/tests/TestMessageDef.cpp index fbd40af24d4ee1..fdae70499b5c8d 100644 --- a/src/app/tests/TestMessageDef.cpp +++ b/src/app/tests/TestMessageDef.cpp @@ -22,7 +22,7 @@ * */ -#include +#include #include #include #include diff --git a/src/app/tests/TestPendingNotificationMap.cpp b/src/app/tests/TestPendingNotificationMap.cpp index 621f8ad1c84f0a..271b427f31013a 100644 --- a/src/app/tests/TestPendingNotificationMap.cpp +++ b/src/app/tests/TestPendingNotificationMap.cpp @@ -53,9 +53,8 @@ void TestEmptyMap(nlTestSuite * aSuite, void * aContext) { PendingNotificationMap pendingMap; NL_TEST_ASSERT(aSuite, pendingMap.begin() == pendingMap.end()); - FabricIndex fabricIndex; - NodeId node; - NL_TEST_ASSERT(aSuite, pendingMap.FindLRUConnectPeer(&fabricIndex, &node) == CHIP_ERROR_NOT_FOUND); + chip::ScopedNodeId peer; + NL_TEST_ASSERT(aSuite, pendingMap.FindLRUConnectPeer(peer) == CHIP_ERROR_NOT_FOUND); } void TestAddRemove(nlTestSuite * aSuite, void * aContext) @@ -75,7 +74,7 @@ void TestAddRemove(nlTestSuite * aSuite, void * aContext) ++iter; } NL_TEST_ASSERT(aSuite, iter == pendingMap.end()); - pendingMap.RemoveAllEntriesForNode(0, 0); + pendingMap.RemoveAllEntriesForNode(chip::ScopedNodeId()); uint8_t expectedEntryIndecies[] = { 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 }; iter = pendingMap.begin(); for (size_t i = 0; i < sizeof(expectedEntryIndecies); i++) @@ -109,19 +108,18 @@ void TestLRUEntry(nlTestSuite * aSuite, void * aContext) pendingMap.AddPendingNotification(7, nullptr); pendingMap.AddPendingNotification(11, nullptr); - FabricIndex fabricIndex; - NodeId node; + chip::ScopedNodeId node; - NL_TEST_ASSERT(aSuite, pendingMap.FindLRUConnectPeer(&fabricIndex, &node) == CHIP_NO_ERROR); - NL_TEST_ASSERT(aSuite, fabricIndex == 0 && node == 1); + NL_TEST_ASSERT(aSuite, pendingMap.FindLRUConnectPeer(node) == CHIP_NO_ERROR); + NL_TEST_ASSERT(aSuite, node.GetFabricIndex() == 0 && node.GetNodeId() == 1); pendingMap.RemoveEntry(1); - NL_TEST_ASSERT(aSuite, pendingMap.FindLRUConnectPeer(&fabricIndex, &node) == CHIP_NO_ERROR); - NL_TEST_ASSERT(aSuite, fabricIndex == 0 && node == 0); + NL_TEST_ASSERT(aSuite, pendingMap.FindLRUConnectPeer(node) == CHIP_NO_ERROR); + NL_TEST_ASSERT(aSuite, node.GetFabricIndex() == 0 && node.GetNodeId() == 0); pendingMap.RemoveAllEntriesForFabric(0); - NL_TEST_ASSERT(aSuite, pendingMap.FindLRUConnectPeer(&fabricIndex, &node) == CHIP_NO_ERROR); - NL_TEST_ASSERT(aSuite, fabricIndex == 1 && node == 1); + NL_TEST_ASSERT(aSuite, pendingMap.FindLRUConnectPeer(node) == CHIP_NO_ERROR); + NL_TEST_ASSERT(aSuite, node.GetFabricIndex() == 1 && node.GetNodeId() == 1); } } // namespace diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index c4aa3fd32fd99e..bc349cb6d9135a 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -23,6 +23,7 @@ */ #include "lib/support/CHIPMem.h" +#include #include #include #include @@ -41,9 +42,8 @@ #include #include #include -#include - #include +#include #include @@ -299,7 +299,6 @@ class TestReadInteraction static void TestReadRoundtripWithNoMatchPathDataVersionFilter(nlTestSuite * apSuite, void * apContext); static void TestReadRoundtripWithMultiSamePathDifferentDataVersionFilter(nlTestSuite * apSuite, void * apContext); static void TestReadRoundtripWithSameDifferentPathsDataVersionFilter(nlTestSuite * apSuite, void * apContext); - static void TestReadRoundtripWithEventStatusIBInEventReport(nlTestSuite * apSuite, void * apContext); static void TestReadWildcard(nlTestSuite * apSuite, void * apContext); static void TestReadChunking(nlTestSuite * apSuite, void * apContext); static void TestSetDirtyBetweenChunks(nlTestSuite * apSuite, void * apContext); @@ -1050,84 +1049,6 @@ void TestReadInteraction::TestReadRoundtripWithSameDifferentPathsDataVersionFilt NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); } -void TestReadInteraction::TestReadRoundtripWithEventStatusIBInEventReport(nlTestSuite * apSuite, void * apContext) -{ - TestContext & ctx = *static_cast(apContext); - CHIP_ERROR err = CHIP_NO_ERROR; - - Messaging::ReliableMessageMgr * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); - // Shouldn't have anything in the retransmit table when starting the test. - NL_TEST_ASSERT(apSuite, rm->TestGetCountRetransTable() == 0); - - GenerateEvents(apSuite, apContext); - - auto * engine = chip::app::InteractionModelEngine::GetInstance(); - err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); - NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - - // When reading events with concrete paths without enough privilege, we will get a EventStatusIB - { - chip::app::EventPathParams eventPathParams[1]; - eventPathParams[0].mEndpointId = kTestEndpointId; - eventPathParams[0].mClusterId = kTestClusterId; - eventPathParams[0].mEventId = kTestEventIdDebug; - - ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); - readPrepareParams.mpEventPathParamsList = eventPathParams; - readPrepareParams.mEventPathParamsListSize = 1; - readPrepareParams.mEventNumber.SetValue(1); - - MockInteractionModelApp delegate; - NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); - - app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, - chip::app::ReadClient::InteractionType::Read); - - err = readClient.SendRequest(readPrepareParams); - NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - - ctx.DrainAndServiceIO(); - - NL_TEST_ASSERT(apSuite, delegate.mGotEventResponse); - NL_TEST_ASSERT(apSuite, delegate.mNumReadEventFailureStatusReceived > 0); - NL_TEST_ASSERT(apSuite, delegate.mLastStatusReceived.mStatus == Protocols::InteractionModel::Status::UnsupportedAccess); - NL_TEST_ASSERT(apSuite, !delegate.mReadError); - } - - GenerateEvents(apSuite, apContext); - - // When reading events with withcard paths without enough privilege for reading one or more event, we will exclude the events - // when generating the report. - { - chip::app::EventPathParams eventPathParams[1]; - eventPathParams[0].mEndpointId = kTestEndpointId; - eventPathParams[0].mClusterId = kTestClusterId; - - ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); - readPrepareParams.mpEventPathParamsList = eventPathParams; - readPrepareParams.mEventPathParamsListSize = 1; - readPrepareParams.mEventNumber.SetValue(1); - - MockInteractionModelApp delegate; - NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); - - app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, - chip::app::ReadClient::InteractionType::Read); - - err = readClient.SendRequest(readPrepareParams); - NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - - ctx.DrainAndServiceIO(); - NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); - NL_TEST_ASSERT(apSuite, delegate.mNumReadEventFailureStatusReceived == 0); - NL_TEST_ASSERT(apSuite, !delegate.mReadError); - } - - NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadClients() == 0); - engine->Shutdown(); - NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); -} - void TestReadInteraction::TestReadWildcard(nlTestSuite * apSuite, void * apContext) { TestContext & ctx = *static_cast(apContext); @@ -2736,9 +2657,6 @@ const nlTest sTests[] = NL_TEST_DEF("TestReadRoundtripWithNoMatchPathDataVersionFilter", chip::app::TestReadInteraction::TestReadRoundtripWithNoMatchPathDataVersionFilter), NL_TEST_DEF("TestReadRoundtripWithMultiSamePathDifferentDataVersionFilter", chip::app::TestReadInteraction::TestReadRoundtripWithMultiSamePathDifferentDataVersionFilter), NL_TEST_DEF("TestReadRoundtripWithSameDifferentPathsDataVersionFilter", chip::app::TestReadInteraction::TestReadRoundtripWithSameDifferentPathsDataVersionFilter), - // TODO(#10253): In unit tests, the access control delegate will always pass, in this case, we will never get a StatusIB for - // UnsupportedAccess status code, the test below can be re-enabled after we have a better access control function in unit tests. - // NL_TEST_DEF("TestReadRoundtripWithEventStatusIBInEventReport", chip::app::TestReadInteraction::TestReadRoundtripWithEventStatusIBInEventReport), NL_TEST_DEF("TestReadWildcard", chip::app::TestReadInteraction::TestReadWildcard), NL_TEST_DEF("TestReadChunking", chip::app::TestReadInteraction::TestReadChunking), NL_TEST_DEF("TestSetDirtyBetweenChunks", chip::app::TestReadInteraction::TestSetDirtyBetweenChunks), diff --git a/src/app/tests/TestStatusIB.cpp b/src/app/tests/TestStatusIB.cpp index 55a1919a583aac..0132c1ad589666 100644 --- a/src/app/tests/TestStatusIB.cpp +++ b/src/app/tests/TestStatusIB.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include +#include #include #include #include diff --git a/src/app/tests/TestStatusResponseMessage.cpp b/src/app/tests/TestStatusResponseMessage.cpp index 425ba316f56f13..ac48f3732b7dac 100644 --- a/src/app/tests/TestStatusResponseMessage.cpp +++ b/src/app/tests/TestStatusResponseMessage.cpp @@ -22,7 +22,7 @@ * */ -#include +#include #include #include #include diff --git a/src/app/tests/TestTimedHandler.cpp b/src/app/tests/TestTimedHandler.cpp index e460d10d4a4dfe..6c081e27428a94 100644 --- a/src/app/tests/TestTimedHandler.cpp +++ b/src/app/tests/TestTimedHandler.cpp @@ -68,7 +68,12 @@ class TestExchangeDelegate : public Messaging::ExchangeDelegate mLastMessageWasStatus = aPayloadHeader.HasMessageType(MsgType::StatusResponse); if (mLastMessageWasStatus) { - mError = StatusResponse::ProcessStatusResponse(std::move(aPayload)); + CHIP_ERROR statusError = CHIP_NO_ERROR; + mError = StatusResponse::ProcessStatusResponse(std::move(aPayload), statusError); + if (mError == CHIP_NO_ERROR) + { + mError = statusError; + } } if (mKeepExchangeOpen) { diff --git a/src/app/tests/TestWriteInteraction.cpp b/src/app/tests/TestWriteInteraction.cpp index 9836c8933cd348..f1af80cef330b7 100644 --- a/src/app/tests/TestWriteInteraction.cpp +++ b/src/app/tests/TestWriteInteraction.cpp @@ -306,15 +306,6 @@ void TestWriteInteraction::TestWriteHandler(nlTestSuite * apSuite, void * apCont } else { - // - // In a normal execution flow, the exchange manager would have closed out the exchange after the - // message dispatch call path had unwound. In this test however, we've manually allocated the exchange - // ourselves (as opposed to the exchange manager), so we need to take ownership of closing out the exchange. - // - // Note that this doesn't happen in the success case above, since that results in a call to send a message through - // the exchange context, which results in the exchange manager correctly closing it. - // - exchange->Close(); NL_TEST_ASSERT(apSuite, status == Status::UnsupportedAccess); } diff --git a/src/app/tests/integration/BUILD.gn b/src/app/tests/integration/BUILD.gn index 77eb99bcaa3f27..05e06d897ca690 100644 --- a/src/app/tests/integration/BUILD.gn +++ b/src/app/tests/integration/BUILD.gn @@ -21,6 +21,7 @@ assert(chip_build_tools) executable("chip-im-initiator") { sources = [ + "RequiredPrivilegeStubs.cpp", "chip_im_initiator.cpp", "common.cpp", ] @@ -41,6 +42,7 @@ executable("chip-im-initiator") { executable("chip-im-responder") { sources = [ "MockEvents.cpp", + "RequiredPrivilegeStubs.cpp", "chip_im_responder.cpp", "common.cpp", ] diff --git a/src/app/tests/integration/RequiredPrivilegeStubs.cpp b/src/app/tests/integration/RequiredPrivilegeStubs.cpp new file mode 100644 index 00000000000000..17dbc27490520c --- /dev/null +++ b/src/app/tests/integration/RequiredPrivilegeStubs.cpp @@ -0,0 +1,38 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +int MatterGetAccessPrivilegeForReadAttribute(chip::ClusterId cluster, chip::AttributeId attribute) +{ + return kMatterAccessPrivilegeAdminister; +} + +int MatterGetAccessPrivilegeForWriteAttribute(chip::ClusterId cluster, chip::AttributeId attribute) +{ + return kMatterAccessPrivilegeAdminister; +} + +int MatterGetAccessPrivilegeForInvokeCommand(chip::ClusterId cluster, chip::CommandId command) +{ + return kMatterAccessPrivilegeAdminister; +} + +int MatterGetAccessPrivilegeForReadEvent(chip::ClusterId cluster, chip::EventId event) +{ + return kMatterAccessPrivilegeAdminister; +} diff --git a/src/app/tests/integration/chip_im_initiator.cpp b/src/app/tests/integration/chip_im_initiator.cpp index b83c598bce4b14..4636e14bc3fc0f 100644 --- a/src/app/tests/integration/chip_im_initiator.cpp +++ b/src/app/tests/integration/chip_im_initiator.cpp @@ -146,7 +146,6 @@ class MockInteractionModelApp : public ::chip::app::CommandSender::Callback, } } - void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) override {} void OnAttributeData(const chip::app::ConcreteDataAttributePath & aPath, chip::TLV::TLVReader * aData, const chip::app::StatusIB & status) override {} diff --git a/src/app/tests/suites/OTA_SuccessfulTransfer.yaml b/src/app/tests/suites/OTA_SuccessfulTransfer.yaml index f15d5ded5013f4..4e186d4fd5b815 100644 --- a/src/app/tests/suites/OTA_SuccessfulTransfer.yaml +++ b/src/app/tests/suites/OTA_SuccessfulTransfer.yaml @@ -17,34 +17,34 @@ name: Test OTA Software Update Successful Transfer config: endpoint: 0 requestorNodeId: - type: NODE_ID + type: node_id defaultValue: 0x12344321 providerNodeId: - type: NODE_ID + type: node_id defaultValue: 0xC0FFEE providerPayload: - type: CHAR_STRING + type: char_string defaultValue: "MT:-24J0IX4122-.548G00" # This value needs to be generated providerDiscriminator: - type: INT16U + type: int16u defaultValue: 50 providerPort: - type: INT16U + type: int16u defaultValue: 5560 providerKvs: - type: CHAR_STRING + type: char_string defaultValue: "/tmp/chip_kvs_provider" otaImageFilePath: - type: CHAR_STRING + type: char_string defaultValue: "/tmp/otaImage" rawImageFilePath: - type: CHAR_STRING + type: char_string defaultValue: "/tmp/rawImage" rawImageContent: - type: CHAR_STRING + type: char_string defaultValue: "Have a hootenanny!" downloadImageFilePath: - type: CHAR_STRING + type: char_string defaultValue: "/tmp/downloadedImage" tests: diff --git a/src/app/tests/suites/TestClusterMultiFabric.yaml b/src/app/tests/suites/TestClusterMultiFabric.yaml index 6c934778872783..6a1bef07b816b1 100644 --- a/src/app/tests/suites/TestClusterMultiFabric.yaml +++ b/src/app/tests/suites/TestClusterMultiFabric.yaml @@ -18,10 +18,10 @@ config: nodeId: 0x12344321 endpoint: 1 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically tests: diff --git a/src/app/tests/suites/TestConfigVariables.yaml b/src/app/tests/suites/TestConfigVariables.yaml index 5889887896fd69..eff8a39aaa106c 100644 --- a/src/app/tests/suites/TestConfigVariables.yaml +++ b/src/app/tests/suites/TestConfigVariables.yaml @@ -19,10 +19,10 @@ config: cluster: "Test Cluster" endpoint: 1 arg1: - type: INT8U + type: int8u defaultValue: 5 returnValueWithArg1: - type: INT8U + type: int8u defaultValue: 25 tests: diff --git a/src/app/tests/suites/TestDiscovery.yaml b/src/app/tests/suites/TestDiscovery.yaml index b1d889d9406eff..febff676e13b64 100644 --- a/src/app/tests/suites/TestDiscovery.yaml +++ b/src/app/tests/suites/TestDiscovery.yaml @@ -18,16 +18,16 @@ config: nodeId: 0x12344321 endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 vendorId: - type: INT16U + type: int16u defaultValue: 65521 productId: - type: INT16U + type: int16u defaultValue: 32769 deviceType: - type: INT16U + type: int16u defaultValue: 5 tests: diff --git a/src/app/tests/suites/TestFabricRemovalWhileSubscribed.yaml b/src/app/tests/suites/TestFabricRemovalWhileSubscribed.yaml index 5271f380749cf1..cdd8fded717805 100644 --- a/src/app/tests/suites/TestFabricRemovalWhileSubscribed.yaml +++ b/src/app/tests/suites/TestFabricRemovalWhileSubscribed.yaml @@ -21,10 +21,10 @@ config: cluster: "Operational Credentials" endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically tests: @@ -42,7 +42,7 @@ tests: response: value: 1 constraints: - type: uint8 + type: int8u - label: "Read current fabric index" command: "readAttribute" @@ -50,7 +50,7 @@ tests: response: saveAs: ourFabricIndex constraints: - type: uint8 + type: int8u # 0 is not a valid value, but past that we have no idea what the # other side will claim here. minValue: 1 diff --git a/src/app/tests/suites/TestGeneralCommissioning.yaml b/src/app/tests/suites/TestGeneralCommissioning.yaml index 42c24b93b79ac8..dbd7072d3e8b39 100644 --- a/src/app/tests/suites/TestGeneralCommissioning.yaml +++ b/src/app/tests/suites/TestGeneralCommissioning.yaml @@ -19,10 +19,10 @@ config: cluster: "General Commissioning" endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically tests: @@ -271,4 +271,4 @@ tests: attribute: "SupportsConcurrentConnection" response: constraints: - type: bool + type: boolean diff --git a/src/app/tests/suites/TestGroupMessaging.yaml b/src/app/tests/suites/TestGroupMessaging.yaml index 36ce37b69596ea..df7355429e8dba 100644 --- a/src/app/tests/suites/TestGroupMessaging.yaml +++ b/src/app/tests/suites/TestGroupMessaging.yaml @@ -23,13 +23,13 @@ config: cluster: "Basic" endpoint: 0 nodeId2: - type: NODE_ID + type: node_id defaultValue: 0x43211234 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically tests: diff --git a/src/app/tests/suites/TestLevelControlWithOnOffDependency.yaml b/src/app/tests/suites/TestLevelControlWithOnOffDependency.yaml index 4f05a9fbeaf690..6a3f63bd1ca9ee 100644 --- a/src/app/tests/suites/TestLevelControlWithOnOffDependency.yaml +++ b/src/app/tests/suites/TestLevelControlWithOnOffDependency.yaml @@ -36,9 +36,9 @@ tests: value: 1 - name: "transitionTime" value: 0 - - name: "optionMask" + - name: "optionsMask" value: 1 - - name: "optionOverride" + - name: "optionsOverride" value: 1 - label: "Wait 100 ms" @@ -159,9 +159,9 @@ tests: value: 127 - name: "transitionTime" value: 0 - - name: "optionMask" + - name: "optionsMask" value: 1 - - name: "optionOverride" + - name: "optionsOverride" value: 1 - label: "Wait 100 ms" diff --git a/src/app/tests/suites/TestMultiAdmin.yaml b/src/app/tests/suites/TestMultiAdmin.yaml index 9ae6519ffcab7b..ff45d1bbe1d985 100644 --- a/src/app/tests/suites/TestMultiAdmin.yaml +++ b/src/app/tests/suites/TestMultiAdmin.yaml @@ -17,20 +17,20 @@ name: Test Multi Admin config: nodeId: 0x12344321 nodeIdForDuplicateCommissioning: - type: NODE_ID + type: node_id defaultValue: 0x11 nodeId2: - type: NODE_ID + type: node_id defaultValue: 0xCAFE nodeId3: - type: NODE_ID + type: node_id defaultValue: 0xC00FEE endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically tests: diff --git a/src/app/tests/suites/TestOperationalCredentialsCluster.yaml b/src/app/tests/suites/TestOperationalCredentialsCluster.yaml index 12a0ee83a486b2..7bc03fb52a9b18 100644 --- a/src/app/tests/suites/TestOperationalCredentialsCluster.yaml +++ b/src/app/tests/suites/TestOperationalCredentialsCluster.yaml @@ -33,7 +33,7 @@ tests: attribute: "SupportedFabrics" response: constraints: - type: uint8 + type: int8u minValue: 4 - label: "Read number of commissioned fabrics" @@ -41,7 +41,7 @@ tests: attribute: "CommissionedFabrics" response: constraints: - type: uint8 + type: int8u minValue: 1 - label: "Read current fabric index" @@ -50,7 +50,7 @@ tests: response: saveAs: ourFabricIndex constraints: - type: uint8 + type: int8u # 0 is not a valid value, but past that we have no idea what the # other side will claim here. minValue: 1 diff --git a/src/app/tests/suites/TestSelfFabricRemoval.yaml b/src/app/tests/suites/TestSelfFabricRemoval.yaml index 4c7dfcf8ff22ab..9e2295fe09099f 100644 --- a/src/app/tests/suites/TestSelfFabricRemoval.yaml +++ b/src/app/tests/suites/TestSelfFabricRemoval.yaml @@ -34,7 +34,7 @@ tests: response: value: 1 constraints: - type: uint8 + type: int8u - label: "Read current fabric index" command: "readAttribute" @@ -42,7 +42,7 @@ tests: response: saveAs: ourFabricIndex constraints: - type: uint8 + type: int8u # 0 is not a valid value, but past that we have no idea what the # other side will claim here. minValue: 1 diff --git a/src/app/tests/suites/TestSystemCommands.yaml b/src/app/tests/suites/TestSystemCommands.yaml index d9df986451d7cc..f4ad90f14e42ac 100644 --- a/src/app/tests/suites/TestSystemCommands.yaml +++ b/src/app/tests/suites/TestSystemCommands.yaml @@ -19,7 +19,7 @@ config: cluster: "SystemCommands" endpoint: 0 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:-24J0IX4122-.548G00" # This value needs to be generated tests: diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index 4eb0d890672a53..e6c2d741f465a3 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -2080,15 +2080,15 @@ PICS: - label: "Does the DUT support the Media Playback server cluster Play command?" - id: MEDIAPLAYBACK.S.C0000 + id: MEDIAPLAYBACK.S.C00.Rsp - label: "Does the DUT support the Media Playback server cluster Pause command?" - id: MEDIAPLAYBACK.S.C0001 + id: MEDIAPLAYBACK.S.C01.Rsp - label: "Does the DUT support the Media Playback server cluster Stop command?" - id: MEDIAPLAYBACK.S.C0002 + id: MEDIAPLAYBACK.S.C02.Rsp - label: "Does the DUT support the Media Playback server cluster StartOver @@ -2834,6 +2834,49 @@ PICS: - label: "Does the Commissioner support Discovery Capability over BLE?" id: MCORE.DD.DISCOVERY_BLE + - label: "Does the device support discovery over Wi-Fi?" + id: MCORE.DD.WIFI + + - label: "Does the device have a vendor specific information element (IE)?" + id: MCORE.DD.IE + + - label: + "Does the device support TXT Key 'DN' (Device Name) in it’s DNS-SD TXT + Records for Commissionable Node Discovery?" + id: MCORE.DD.TXT_KEY_DN + + - label: + "Does the device support TXT Key 'RI' (Rotating Identifier) in it’s + DNS-SD TXT Records for Commissionable Node Discovery?" + id: MCORE.DD.TXT_KEY_RI + + - label: + "Does the device support TXT Key 'PH' (Pairing Hint) in it’s DNS-SD + TXT Records for Commissionable Node Discovery?" + id: MCORE.DD.TXT_KEY_PH + + - label: + "Does the device support TXT Key 'PI' (Pairing Instruction) in it’s + DNS-SD TXT Records for Commissionable Node Discovery?" + id: MCORE.DD.TXT_KEY_PI + + - label: + "Does the device support Extended Discovery through DNS-SD + advertisements when device is not in commissioning mode?" + id: MCORE.DD.EXTENDED_DISCOVERY + + - label: + "Does the device support advertising the Vendor ID Commissioning + Subtype in Commissionable Node Discovery through DNS-SD + advertisements?" + id: MCORE.DD.COMMISSIONING_SUBTYPE_V + + - label: + "Does the device support advertising the Device Type Commissioning + Subtype in Commissionable Node Discovery through DNS-SD + advertisements?" + id: MCORE.DD.COMMISSIONING_SUBTYPE_T + #Ethernet Network Diagnostics Cluster - label: "Does the device implement the ResetCounts command?" id: DGETH.S.C00.Rsp @@ -4501,7 +4544,6 @@ PICS: - label: "Does the DUT support the AccessControlExtensionChanged Event?" id: ACL.S.E01 - #Mode select #Mode select - label: "Does the DUT support the StartUpMode attribute?" id: MOD.S.A0004 @@ -4539,3 +4581,101 @@ PICS: "Does commissionee provide a Firmware Information field in the AttestationResponse?" id: MCORE.DA.ATTESTELEMENT_FW_INFO + + #Descriptor Cluster TestPlan + #server + - label: "Does the DUT(server) support the DEVICETYPELIST attribute?" + id: DESC.S.A0000 + + - label: "Does the DUT(server) support the SERVERLIST attribute?" + id: DESC.S.A0001 + + - label: "Does the DUT(server) support the CLIENTLIST attribute?" + id: DESC.S.A0002 + + - label: "Does the DUT(server) support the PARTSLIST attribute?" + id: DESC.S.A0003 + + - label: "Does the DUT(server) support the REVISIONFIELD attribute?" + id: DESC.S.A0004 + + #cluster + - label: "Does the DUT(client) support the DEVICETYPELIST attribute?" + id: DESC.C.A0000 + + - label: "Does the DUT(client) support the SERVERLIST attribute?" + id: DESC.C.A0001 + + - label: "Does the DUT(client) support the CLIENTLIST attribute?" + id: DESC.C.A0002 + + - label: "Does the DUT(client) support the PARTSLIST attribute?" + id: DESC.C.A0003 + + - label: "Does the DUT(client) support the REVISIONFIELD attribute?" + id: DESC.C.A0004 + + #Secure Channel + - label: + "Does device support optional key SII in operational discovery mDNS?" + id: MCORE.SC.SII_OP_DISCOVERY_KEY + + - label: + "Does device support optional key SII in operational discovery mDNS?" + id: MCORE.SC.SAI_OP_DISCOVERY_KEY + + - label: + "Does device support optional key SII in operational discovery mDNS?" + id: MCORE.SC.T_KEY + + - label: "Does the device support discovery over Bluetooth Low Power (BLE)?" + id: MCORE.SC.BLE + + - label: "Does the device support discovery over Wi-Fi?" + id: MCORE.SC.WIFI + + - label: "Does the device support discovery over Ethernet?" + id: MCORE.SC.ETH + + - label: "Does the device support discovery over Thread?" + id: MCORE.SC.THR + + - label: + "Does device support optional subtype _V in commissionable node + discovery mDNS?" + id: MCORE.SC.VENDOR_SUBTYPE + + - label: + "Does device support optional subtype _T in commissionable node + discovery mDNS?" + id: MCORE.SC.DEVTYPE_SUBTYPE + + - label: + "Does device support optional key VP in commissionable node discovery + mDNS?" + id: MCORE.SC.VP_KEY + + - label: + "Does device support optional key DT in commissionable node discovery + mDNS?" + id: MCORE.SC.DT_KEY + + - label: + "Does device support optional key DN in commissionable node discovery + mDNS?" + id: MCORE.SC.DN_KEY + + - label: + "Does device support optional key RI in commissionable node discovery + mDNS?" + id: MCORE.SC.RI_KEY + + - label: + "Does device support optional key PH in commissionable node discovery + mDNS?" + id: MCORE.SC.PH_KEY + + - label: + "Does device support optional key PI in commissionable node discovery + mDNS?" + id: MCORE.SC.PI_KEY diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml index b3d1aa8610d7a2..b65371b3af2f6b 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml @@ -13,7 +13,7 @@ # 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: 129.2.4. [TC-ACL-2.4] ACL attribute +name: 131.2.4. [TC-ACL-2.4] ACL attribute config: nodeId: 0x12344321 @@ -32,6 +32,9 @@ tests: verification: | ./chip-tool operationalcredentials read current-fabric-index 1 0 + + On TH, Verify DUT Responds to CurrentFabricIndex attribute of operationalCredential cluster as 1 + [1656652012.060584][2763:2768] CHIP:DMG: [1656652012.060609][2763:2768] CHIP:DMG: SuppressResponse = true, [1656652012.060634][2763:2768] CHIP:DMG: InteractionModelRevision = 1 @@ -48,6 +51,8 @@ tests: verification: | ./chip-tool accesscontrol read acl 1 0 + On TH , Verify DUT Responds Successfully . + [1656652338.381499][2784:2789] CHIP:DMG: }, [1656652338.381552][2784:2789] CHIP:DMG: [1656652338.381590][2784:2789] CHIP:DMG: ], @@ -71,179 +76,233 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 3 elements struct + is list of AccessControlEntryStruct containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: View (1) + field: [N1] Targets field: null 2 . struct Privilege field: View (1) AuthMode field: CASE (3) Subjects field: [111, 222, 333, 444] Targets - field: [{Cluster: 11}, {Endpoint: 22}, {DeviceType: 33}] struct - Privilege field: Operate (3) AuthMode field: Group (3) Subjects field: - [555, 666, 777, 888] Targets field: [{Cluster: 55}, {Endpoint: 66}, - {DeviceType: 77}]" + field: [{Cluster: 11}, {Endpoint: 22}] 3..struct Privilege field: + Operate (3) AuthMode field: Group (3) Subjects field: [555, 666, 777, + 888] Targets field: [{Cluster: 55}, {Endpoint: 66}]" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 1, "authMode": 3, "subjects": [111,222,333,444], "targets": [{"cluster":11 , "endpoint":22, "deviceType": 33}]}, - {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets": [{"cluster": 55, "endpoint": 66, "deviceType": 77 }]}]' 1 0 - - - [1657616506.497802][8683:8688] CHIP:DMG: WriteResponseMessage = - [1657616506.497838][8683:8688] CHIP:DMG: { - [1657616506.497865][8683:8688] CHIP:DMG: AttributeStatusIBs = - [1657616506.497903][8683:8688] CHIP:DMG: [ - [1657616506.497937][8683:8688] CHIP:DMG: AttributeStatusIB = - [1657616506.497977][8683:8688] CHIP:DMG: { - [1657616506.498013][8683:8688] CHIP:DMG: AttributePathIB = - [1657616506.498054][8683:8688] CHIP:DMG: { - [1657616506.498096][8683:8688] CHIP:DMG: Endpoint = 0x0, - [1657616506.498138][8683:8688] CHIP:DMG: Cluster = 0x1f, - [1657616506.498180][8683:8688] CHIP:DMG: Attribute = 0x0000_0000, - [1657616506.498219][8683:8688] CHIP:DMG: } - [1657616506.498264][8683:8688] CHIP:DMG: - [1657616506.498301][8683:8688] CHIP:DMG: StatusIB = - [1657616506.498341][8683:8688] CHIP:DMG: { - [1657616506.498447][8683:8688] CHIP:DMG: status = 0x00 (SUCCESS), - [1657616506.498492][8683:8688] CHIP:DMG: }, - [1657616506.498534][8683:8688] CHIP:DMG: - [1657616506.498571][8683:8688] CHIP:DMG: }, - [1657616506.498617][8683:8688] CHIP:DMG: - [1657616506.498650][8683:8688] CHIP:DMG: AttributeStatusIB = - [1657616506.498686][8683:8688] CHIP:DMG: { - [1657616506.498720][8683:8688] CHIP:DMG: AttributePathIB = - [1657616506.498759][8683:8688] CHIP:DMG: { - [1657616506.498800][8683:8688] CHIP:DMG: Endpoint = 0x0, - [1657616506.498845][8683:8688] CHIP:DMG: Cluster = 0x1f, - [1657616506.498890][8683:8688] CHIP:DMG: Attribute = 0x0000_0000, - [1657616506.498933][8683:8688] CHIP:DMG: ListIndex = Null, - [1657616506.498974][8683:8688] CHIP:DMG: } - [1657616506.499019][8683:8688] CHIP:DMG: - [1657616506.499059][8683:8688] CHIP:DMG: StatusIB = - [1657616506.499098][8683:8688] CHIP:DMG: { - [1657616506.499140][8683:8688] CHIP:DMG: status = 0x00 (SUCCESS), - [1657616506.499181][8683:8688] CHIP:DMG: }, - [1657616506.499221][8683:8688] CHIP:DMG: - [1657616506.499255][8683:8688] CHIP:DMG: }, - [1657616506.499304][8683:8688] CHIP:DMG: - [1657616506.499336][8683:8688] CHIP:DMG: AttributeStatusIB = - [1657616506.499371][8683:8688] CHIP:DMG: { - [1657616506.499405][8683:8688] CHIP:DMG: AttributePathIB = - [1657616506.499444][8683:8688] CHIP:DMG: { - [1657616506.499491][8683:8688] CHIP:DMG: Endpoint = 0x0, - [1657616506.499536][8683:8688] CHIP:DMG: Cluster = 0x1f, - [1657616506.499576][8683:8688] CHIP:DMG: Attribute = 0x0000_0000, - [1657616506.499619][8683:8688] CHIP:DMG: ListIndex = Null, - [1657616506.499656][8683:8688] CHIP:DMG: } - [1657616506.499702][8683:8688] CHIP:DMG: - [1657616506.499740][8683:8688] CHIP:DMG: StatusIB = - [1657616506.499784][8683:8688] CHIP:DMG: { - [1657616506.499826][8683:8688] CHIP:DMG: status = 0x01 (FAILURE), - [1657616506.499866][8683:8688] CHIP:DMG: }, - [1657616506.499906][8683:8688] CHIP:DMG: - [1657616506.499943][8683:8688] CHIP:DMG: }, - [1657616506.499989][8683:8688] CHIP:DMG: - [1657616506.500021][8683:8688] CHIP:DMG: AttributeStatusIB = - [1657616506.500056][8683:8688] CHIP:DMG: { - [1657616506.500090][8683:8688] CHIP:DMG: AttributePathIB = - [1657616506.500129][8683:8688] CHIP:DMG: { - [1657616506.500221][8683:8688] CHIP:DMG: Endpoint = 0x0, - [1657616506.500277][8683:8688] CHIP:DMG: Cluster = 0x1f, - [1657616506.500325][8683:8688] CHIP:DMG: Attribute = 0x0000_0000, - [1657616506.500368][8683:8688] CHIP:DMG: ListIndex = Null, - [1657616506.500413][8683:8688] CHIP:DMG: } - [1657616506.500459][8683:8688] CHIP:DMG: - [1657616506.500502][8683:8688] CHIP:DMG: StatusIB = - [1657616506.500547][8683:8688] CHIP:DMG: { - [1657616506.500593][8683:8688] CHIP:DMG: status = 0x01 (FAILURE), - [1657616506.500636][8683:8688] CHIP:DMG: }, - [1657616506.500677][8683:8688] CHIP:DMG: - [1657616506.500710][8683:8688] CHIP:DMG: }, - [1657616506.500749][8683:8688] CHIP:DMG: - [1657616506.500781][8683:8688] CHIP:DMG: ], - [1657616506.500834][8683:8688] CHIP:DMG: - [1657616506.500866][8683:8688] CHIP:DMG: InteractionModelRevision = 1 - [1657616506.500897][8683:8688] CHIP:DMG: } - [1657616506.501105][8683:8688] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1657616506.501147][8683:8688] CHIP:TOO: Response Failure: IM Error 0x00000501: General error: 0x01 (FAILURE) + {"fabricIndex": 1, "privilege": 1, "authMode": 3, "subjects": [111,222,333,444], "targets": [{"cluster":11 , "endpoint":22, "deviceType": null}]}, + {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets": [{"cluster": 55, "endpoint": 66, "deviceType":null }]}]' 1 0 + + + [1658323877.660699][2502:2507] CHIP:DMG: WriteClient moving to [ResponseRe] + [1658323877.660829][2502:2507] CHIP:DMG: WriteResponseMessage = + [1658323877.660890][2502:2507] CHIP:DMG: { + [1658323877.660943][2502:2507] CHIP:DMG: AttributeStatusIBs = + [1658323877.661019][2502:2507] CHIP:DMG: [ + [1658323877.661079][2502:2507] CHIP:DMG: AttributeStatusIB = + [1658323877.661251][2502:2507] CHIP:DMG: { + [1658323877.661321][2502:2507] CHIP:DMG: AttributePathIB = + [1658323877.661397][2502:2507] CHIP:DMG: { + [1658323877.661477][2502:2507] CHIP:DMG: Endpoint = 0x0, + [1658323877.661568][2502:2507] CHIP:DMG: Cluster = 0x1f, + [1658323877.661657][2502:2507] CHIP:DMG: Attribute = 0x0000_0000, + [1658323877.661744][2502:2507] CHIP:DMG: } + [1658323877.661838][2502:2507] CHIP:DMG: + [1658323877.661920][2502:2507] CHIP:DMG: StatusIB = + [1658323877.662004][2502:2507] CHIP:DMG: { + [1658323877.662084][2502:2507] CHIP:DMG: status = 0x00 (SUCCESS), + [1658323877.662167][2502:2507] CHIP:DMG: }, + [1658323877.662243][2502:2507] CHIP:DMG: + [1658323877.662309][2502:2507] CHIP:DMG: }, + [1658323877.662398][2502:2507] CHIP:DMG: + [1658323877.662458][2502:2507] CHIP:DMG: AttributeStatusIB = + [1658323877.662527][2502:2507] CHIP:DMG: { + [1658323877.662590][2502:2507] CHIP:DMG: AttributePathIB = + [1658323877.662706][2502:2507] CHIP:DMG: { + [1658323877.662784][2502:2507] CHIP:DMG: Endpoint = 0x0, + [1658323877.662872][2502:2507] CHIP:DMG: Cluster = 0x1f, + [1658323877.662939][2502:2507] CHIP:DMG: Attribute = 0x0000_0000, + [1658323877.663079][2502:2507] CHIP:DMG: ListIndex = Null, + [1658323877.663151][2502:2507] CHIP:DMG: } + [1658323877.663228][2502:2507] CHIP:DMG: + [1658323877.663298][2502:2507] CHIP:DMG: StatusIB = + [1658323877.663364][2502:2507] CHIP:DMG: { + [1658323877.663428][2502:2507] CHIP:DMG: status = 0x00 (SUCCESS), + [1658323877.663500][2502:2507] CHIP:DMG: }, + [1658323877.663566][2502:2507] CHIP:DMG: + [1658323877.663624][2502:2507] CHIP:DMG: }, + [1658323877.663703][2502:2507] CHIP:DMG: + [1658323877.663754][2502:2507] CHIP:DMG: AttributeStatusIB = + [1658323877.663814][2502:2507] CHIP:DMG: { + [1658323877.663871][2502:2507] CHIP:DMG: AttributePathIB = + [1658323877.663941][2502:2507] CHIP:DMG: { + [1658323877.664007][2502:2507] CHIP:DMG: Endpoint = 0x0, + [1658323877.664077][2502:2507] CHIP:DMG: Cluster = 0x1f, + [1658323877.664147][2502:2507] CHIP:DMG: Attribute = 0x0000_0000, + [1658323877.664214][2502:2507] CHIP:DMG: ListIndex = Null, + [1658323877.664278][2502:2507] CHIP:DMG: } + [1658323877.664350][2502:2507] CHIP:DMG: + [1658323877.664414][2502:2507] CHIP:DMG: StatusIB = + [1658323877.664477][2502:2507] CHIP:DMG: { + [1658323877.664541][2502:2507] CHIP:DMG: status = 0x00 (SUCCESS), + [1658323877.664606][2502:2507] CHIP:DMG: }, + [1658323877.664670][2502:2507] CHIP:DMG: + [1658323877.664727][2502:2507] CHIP:DMG: }, + [1658323877.664800][2502:2507] CHIP:DMG: + [1658323877.664850][2502:2507] CHIP:DMG: AttributeStatusIB = + [1658323877.664910][2502:2507] CHIP:DMG: { + [1658323877.664967][2502:2507] CHIP:DMG: AttributePathIB = + [1658323877.665031][2502:2507] CHIP:DMG: { + [1658323877.665096][2502:2507] CHIP:DMG: Endpoint = 0x0, + [1658323877.665170][2502:2507] CHIP:DMG: Cluster = 0x1f, + [1658323877.665240][2502:2507] CHIP:DMG: Attribute = 0x0000_0000, + [1658323877.665313][2502:2507] CHIP:DMG: ListIndex = Null, + [1658323877.665384][2502:2507] CHIP:DMG: } + [1658323877.665453][2502:2507] CHIP:DMG: + [1658323877.665515][2502:2507] CHIP:DMG: StatusIB = + [1658323877.665577][2502:2507] CHIP:DMG: { + [1658323877.665643][2502:2507] CHIP:DMG: status = 0x00 (SUCCESS), + [1658323877.665708][2502:2507] CHIP:DMG: }, + [1658323877.665771][2502:2507] CHIP:DMG: + [1658323877.665828][2502:2507] CHIP:DMG: }, + [1658323877.665889][2502:2507] CHIP:DMG: + [1658323877.665938][2502:2507] CHIP:DMG: ], + [1658323877.666020][2502:2507] CHIP:DMG: + [1658323877.666070][2502:2507] CHIP:DMG: InteractionModelRevision = 1 + [1658323877.666119][2502:2507] CHIP:DMG: } + [1658323877.666433][2502:2507] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1658323877.666532][2502:2507] CHIP:EM: Sending Standalone Ack for MessageCounter:122439856 on exchange 57514i disabled: true - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - [1657616943.336147][8703:8708] CHIP:DMG: } - [1657616943.336447][8703:8708] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 2543339509 - [1657616943.336529][8703:8708] CHIP:TOO: ACL: 1 entries - [1657616943.336583][8703:8708] CHIP:TOO: [1]: { - [1657616943.336630][8703:8708] CHIP:TOO: Privilege: 5 - [1657616943.336659][8703:8708] CHIP:TOO: AuthMode: 2 - [1657616943.336692][8703:8708] CHIP:TOO: Subjects: 1 entries - [1657616943.336726][8703:8708] CHIP:TOO: [1]: 112233 - [1657616943.336757][8703:8708] CHIP:TOO: Targets: null - [1657616943.336786][8703:8708] CHIP:TOO: FabricIndex: 1 - [1657616943.336813][8703:8708] CHIP:TOO: } + InteractionModelRevision = 1 + [1658229676.712083][4872:4878] CHIP:DMG: } + [1658229676.712624][4872:4878] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 1307037423 + [1658229676.712736][4872:4878] CHIP:TOO: ACL: 3 entries + [1658229676.712809][4872:4878] CHIP:TOO: [1]: { + [1658229676.712839][4872:4878] CHIP:TOO: Privilege: 5 + [1658229676.712864][4872:4878] CHIP:TOO: AuthMode: 2 + [1658229676.712893][4872:4878] CHIP:TOO: Subjects: 1 entries + [1658229676.712923][4872:4878] CHIP:TOO: [1]: 112233 + [1658229676.712949][4872:4878] CHIP:TOO: Targets: null + [1658229676.712972][4872:4878] CHIP:TOO: FabricIndex: 1 + [1658229676.712995][4872:4878] CHIP:TOO: } + [1658229676.713033][4872:4878] CHIP:TOO: [2]: { + [1658229676.713058][4872:4878] CHIP:TOO: Privilege: 1 + [1658229676.713082][4872:4878] CHIP:TOO: AuthMode: 3 + [1658229676.713109][4872:4878] CHIP:TOO: Subjects: 4 entries + [1658229676.713136][4872:4878] CHIP:TOO: [1]: 111 + [1658229676.713161][4872:4878] CHIP:TOO: [2]: 222 + [1658229676.713187][4872:4878] CHIP:TOO: [3]: 333 + [1658229676.713212][4872:4878] CHIP:TOO: [4]: 444 + [1658229676.713241][4872:4878] CHIP:TOO: Targets: 1 entries + [1658229676.713295][4872:4878] CHIP:TOO: [1]: { + [1658229676.713322][4872:4878] CHIP:TOO: Cluster: 11 + [1658229676.713347][4872:4878] CHIP:TOO: Endpoint: 22 + [1658229676.713371][4872:4878] CHIP:TOO: DeviceType: null + [1658229676.713429][4872:4878] CHIP:TOO: } + [1658229676.713457][4872:4878] CHIP:TOO: FabricIndex: 1 + [1658229676.713480][4872:4878] CHIP:TOO: } + [1658229676.713517][4872:4878] CHIP:TOO: [3]: { + [1658229676.713543][4872:4878] CHIP:TOO: Privilege: 3 + [1658229676.713566][4872:4878] CHIP:TOO: AuthMode: 3 + [1658229676.713593][4872:4878] CHIP:TOO: Subjects: 4 entries + [1658229676.713620][4872:4878] CHIP:TOO: [1]: 555 + [1658229676.713645][4872:4878] CHIP:TOO: [2]: 666 + [1658229676.713670][4872:4878] CHIP:TOO: [3]: 777 + [1658229676.713695][4872:4878] CHIP:TOO: [4]: 888 + [1658229676.713724][4872:4878] CHIP:TOO: Targets: 1 entries + [1658229676.713756][4872:4878] CHIP:TOO: [1]: { + [1658229676.713780][4872:4878] CHIP:TOO: Cluster: 55 + [1658229676.713804][4872:4878] CHIP:TOO: Endpoint: 66 + [1658229676.713826][4872:4878] CHIP:TOO: DeviceType: null + [1658229676.713849][4872:4878] CHIP:TOO: } + [1658229676.713873][4872:4878] CHIP:TOO: FabricIndex: 1 + [1658229676.713896][4872:4878] CHIP:TOO: } + [1658229676.714004][4872:4878] CHIP:EM: Sending Standalone Ack for MessageCounter:20458493 on exchange 31143i disabled: true - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 3 elements struct + is list of AccessControlEntryStruct containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Manage (4) + field: [N1] Targets field: null 2.struct Privilege field: Manage (4) AuthMode field: Group (3) Subjects field: [444, 333, 222, 111] Targets - field: [{Cluster: 44}, {Endpoint: 33}, {DeviceType: 22}] struct - Privilege field: Administer (5) AuthMode field: CASE (3) Subjects - field: [888, 777, 666, 555] Targets field: [{Cluster: 88}, {Endpoint: - 77}, {DeviceType: 66}]" + field: [{Cluster: 44}, {Endpoint: 33}] 3.struct Privilege field: + Administer (5) AuthMode field: CASE (3) Subjects field: [888, 777, + 666, 555] Targets field: [{Cluster: 88}, {Endpoint: 77}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 4, "authMode": 2, "subjects": [444,333,222,111], "targets": [{"cluster":44 , "endpoint":33, "deviceType":22}]},{"fabricIndex": 1, "privilege":4 , "authMode":2, "subjects": [888,777,666,555], "targets": [{"cluster": 88, "endpoint": 77, "deviceType":66}]}]' 1 0 - - 57547786.191042][2846:2851] CHIP:DMG: StatusIB = - [1657547786.191115][2846:2851] CHIP:DMG: { - [1657547786.191192][2846:2851] CHIP:DMG: status = 0x00 (SUCCESS), - [1657547786.191267][2846:2851] CHIP:DMG: }, - [1657547786.191340][2846:2851] CHIP:DMG: - [1657547786.191405][2846:2851] CHIP:DMG: }, - [1657547786.191496][2846:2851] CHIP:DMG: - [1657547786.191555][2846:2851] CHIP:DMG: AttributeStatusIB = - [1657547786.191618][2846:2851] CHIP:DMG: { - [1657547786.191680][2846:2851] CHIP:DMG: AttributePathIB = - [1657547786.191752][2846:2851] CHIP:DMG: { - [1657547786.191829][2846:2851] CHIP:DMG: Endpoint = 0x0, - [1657547786.191910][2846:2851] CHIP:DMG: Cluster = 0x1f, - [1657547786.191991][2846:2851] CHIP:DMG: Attribute = 0x0000_0000, - [1657547786.192074][2846:2851] CHIP:DMG: ListIndex = Null, - [1657547786.192151][2846:2851] CHIP:DMG: } - [1657547786.192232][2846:2851] CHIP:DMG: - [1657547786.192306][2846:2851] CHIP:DMG: StatusIB = - [1657547786.192379][2846:2851] CHIP:DMG: { - [1657547786.192455][2846:2851] CHIP:DMG: status = 0x01 (FAILURE), - [1657547786.192536][2846:2851] CHIP:DMG: }, - [1657547786.192612][2846:2851] CHIP:DMG: - [1657547786.192677][2846:2851] CHIP:DMG: }, - [1657547786.192761][2846:2851] CHIP:DMG: - [1657547786.192819][2846:2851] CHIP:DMG: AttributeStatusIB = - [1657547786.192883][2846:2851] CHIP:DMG: { - [1657547786.192944][2846:2851] CHIP:DMG: AttributePathIB = - [1657547786.193015][2846:2851] CHIP:DMG: { - [1657547786.193092][2846:2851] CHIP:DMG: Endpoint = 0x0, - [1657547786.193172][2846:2851] CHIP:DMG: Cluster = 0x1f, - [1657547786.193254][2846:2851] CHIP:DMG: Attribute = 0x0000_0000, - [1657547786.193338][2846:2851] CHIP:DMG: ListIndex = Null, - [1657547786.193441][2846:2851] CHIP:DMG: } - [1657547786.193528][2846:2851] CHIP:DMG: - [1657547786.193602][2846:2851] CHIP:DMG: StatusIB = - [1657547786.193676][2846:2851] CHIP:DMG: { - [1657547786.193751][2846:2851] CHIP:DMG: status = 0x01 (FAILURE), - [1657547786.193827][2846:2851] CHIP:DMG: }, - [1657547786.193901][2846:2851] CHIP:DMG: - [1657547786.193967][2846:2851] CHIP:DMG: }, - [1657547786.194091][2846:2851] CHIP:DMG: - [1657547786.194250][2846:2851] CHIP:DMG: ], - [1657547786.194406][2846:2851] CHIP:DMG: - [1657547786.194468][2846:2851] CHIP:DMG: InteractionModelRevision = 1 - [1657547786.194573][2846:2851] CHIP:DMG: } - [1657547786.194932][2846:2851] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1657547786.195005][2846:2851] CHIP:TOO: Response Failure: IM Error 0x00000501: General error: 0x01 (FAILURE) - [1657547786.195115][2846:2851] CHIP:EM: Sending Standalone Ack for MessageCounter:46770013 on exchange 27227i + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 4, "authMode": 2, "subjects": [444,333,222,111], "targets": [{"cluster":44 , "endpoint":33, "deviceType":null}]},{"fabricIndex": 1, "privilege":4 , "authMode":3, "subjects": [888,777,666,555], "targets": [{"cluster": 88, "endpoint": 77, "deviceType":null}]}]' 1 0 + + 1658226959.554674][4736:4741] CHIP:DMG: AttributeStatusIBs = + [1658226959.554706][4736:4741] CHIP:DMG: [ + [1658226959.554732][4736:4741] CHIP:DMG: AttributeStatusIB = + [1658226959.554761][4736:4741] CHIP:DMG: { + [1658226959.554787][4736:4741] CHIP:DMG: AttributePathIB = + [1658226959.554822][4736:4741] CHIP:DMG: { + [1658226959.554855][4736:4741] CHIP:DMG: Endpoint = 0x0, + [1658226959.554887][4736:4741] CHIP:DMG: Cluster = 0x1f, + [1658226959.554916][4736:4741] CHIP:DMG: Attribute = 0x0000_0000, + [1658226959.554941][4736:4741] CHIP:DMG: } + [1658226959.554982][4736:4741] CHIP:DMG: + [1658226959.555013][4736:4741] CHIP:DMG: StatusIB = + [1658226959.555049][4736:4741] CHIP:DMG: { + [1658226959.555085][4736:4741] CHIP:DMG: status = 0x00 (SUCCESS), + [1658226959.555121][4736:4741] CHIP:DMG: }, + [1658226959.555152][4736:4741] CHIP:DMG: + [1658226959.555181][4736:4741] CHIP:DMG: }, + [1658226959.555216][4736:4741] CHIP:DMG: + [1658226959.555241][4736:4741] CHIP:DMG: AttributeStatusIB = + [1658226959.555269][4736:4741] CHIP:DMG: { + [1658226959.555296][4736:4741] CHIP:DMG: AttributePathIB = + [1658226959.555329][4736:4741] CHIP:DMG: { + [1658226959.555360][4736:4741] CHIP:DMG: Endpoint = 0x0, + [1658226959.555392][4736:4741] CHIP:DMG: Cluster = 0x1f, + [1658226959.555424][4736:4741] CHIP:DMG: Attribute = 0x0000_0000, + [1658226959.555455][4736:4741] CHIP:DMG: ListIndex = Null, + [1658226959.555487][4736:4741] CHIP:DMG: } + [1658226959.555521][4736:4741] CHIP:DMG: + [1658226959.555552][4736:4741] CHIP:DMG: StatusIB = + [1658226959.555582][4736:4741] CHIP:DMG: { + [1658226959.555614][4736:4741] CHIP:DMG: status = 0x00 (SUCCESS), + [1658226959.555646][4736:4741] CHIP:DMG: }, + [1658226959.555678][4736:4741] CHIP:DMG: + [1658226959.555704][4736:4741] CHIP:DMG: }, + [1658226959.555740][4736:4741] CHIP:DMG: + [1658226959.555765][4736:4741] CHIP:DMG: AttributeStatusIB = + [1658226959.555793][4736:4741] CHIP:DMG: { + [1658226959.555819][4736:4741] CHIP:DMG: AttributePathIB = + [1658226959.555850][4736:4741] CHIP:DMG: { + [1658226959.555881][4736:4741] CHIP:DMG: Endpoint = 0x0, + [1658226959.555912][4736:4741] CHIP:DMG: Cluster = 0x1f, + [1658226959.555947][4736:4741] CHIP:DMG: Attribute = 0x0000_0000, + [1658226959.555983][4736:4741] CHIP:DMG: ListIndex = Null, + [1658226959.556017][4736:4741] CHIP:DMG: } + [1658226959.556053][4736:4741] CHIP:DMG: + [1658226959.556083][4736:4741] CHIP:DMG: StatusIB = + [1658226959.556114][4736:4741] CHIP:DMG: { + [1658226959.556146][4736:4741] CHIP:DMG: status = 0x00 (SUCCESS), + [1658226959.556177][4736:4741] CHIP:DMG: }, + [1658226959.556209][4736:4741] CHIP:DMG: + [1658226959.556235][4736:4741] CHIP:DMG: }, + [1658226959.556271][4736:4741] CHIP:DMG: + [1658226959.556296][4736:4741] CHIP:DMG: AttributeStatusIB = + [1658226959.556323][4736:4741] CHIP:DMG: { + [1658226959.556350][4736:4741] CHIP:DMG: AttributePathIB = + [1658226959.556380][4736:4741] CHIP:DMG: { + [1658226959.556412][4736:4741] CHIP:DMG: Endpoint = 0x0, + [1658226959.556445][4736:4741] CHIP:DMG: Cluster = 0x1f, + [1658226959.556479][4736:4741] CHIP:DMG: Attribute = 0x0000_0000, + [1658226959.556547][4736:4741] CHIP:DMG: ListIndex = Null, + [1658226959.556583][4736:4741] CHIP:DMG: } + [1658226959.556620][4736:4741] CHIP:DMG: + [1658226959.556651][4736:4741] CHIP:DMG: StatusIB = + [1658226959.556679][4736:4741] CHIP:DMG: { + [1658226959.556711][4736:4741] CHIP:DMG: status = 0x00 (SUCCESS), + [1658226959.556743][4736:4741] CHIP:DMG: }, + [1658226959.556774][4736:4741] CHIP:DMG: + [1658226959.556800][4736:4741] CHIP:DMG: }, + [1658226959.556830][4736:4741] CHIP:DMG: disabled: true - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" @@ -251,42 +310,71 @@ tests: verification: | ./chip-tool accesscontrol read acl 1 0 - - [1657547862.774115][2857:2862] CHIP:DMG: ], - [1657547862.774169][2857:2862] CHIP:DMG: - [1657547862.774206][2857:2862] CHIP:DMG: SuppressResponse = true, - [1657547862.774243][2857:2862] CHIP:DMG: InteractionModelRevision = 1 - [1657547862.774277][2857:2862] CHIP:DMG: } - [1657547862.774631][2857:2862] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 3138396318 - [1657547862.774709][2857:2862] CHIP:TOO: ACL: 1 entries - [1657547862.774786][2857:2862] CHIP:TOO: [1]: { - [1657547862.774841][2857:2862] CHIP:TOO: Privilege: 5 - [1657547862.774877][2857:2862] CHIP:TOO: AuthMode: 2 - [1657547862.774916][2857:2862] CHIP:TOO: Subjects: 1 entries - [1657547862.774957][2857:2862] CHIP:TOO: [1]: 112233 - [1657547862.774995][2857:2862] CHIP:TOO: Targets: null - [1657547862.775029][2857:2862] CHIP:TOO: FabricIndex: 1 - [1657547862.775061][2857:2862] CHIP:TOO: } - [1657547862.775162][2857:2862] CHIP:EM: Sending Standalone Ack for MessageCounter:258110233 on exchange 26412i - [1657547862.775244][2857:2862] CHIP:IN: Prepared secure message 0xffff8a77d958 to 0x0000000000000001 (1) of type 0x10 and protocolId (0, 0) on exchange 26412i with MessageCounter:67511035. - [1657547862.775296][2857:2862] CHIP:IN: Sending encrypted msg 0xffff8a77d958 with MessageCounter:67511035 to 0x0000000000000001 (1) at monotonic time: 00000000006AC015 msec - [1657547862.775440][2857:2862] C + 9800.959293][4892:4897] CHIP:DMG: + [1658229800.959325][4892:4897] CHIP:DMG: ], + [1658229800.959399][4892:4897] CHIP:DMG: + [1658229800.959433][4892:4897] CHIP:DMG: SuppressResponse = true, + [1658229800.959466][4892:4897] CHIP:DMG: InteractionModelRevision = 1 + [1658229800.959497][4892:4897] CHIP:DMG: } + [1658229800.960148][4892:4897] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 1307037427 + [1658229800.960272][4892:4897] CHIP:TOO: ACL: 3 entries + [1658229800.960360][4892:4897] CHIP:TOO: [1]: { + [1658229800.960397][4892:4897] CHIP:TOO: Privilege: 5 + [1658229800.960429][4892:4897] CHIP:TOO: AuthMode: 2 + [1658229800.960465][4892:4897] CHIP:TOO: Subjects: 1 entries + [1658229800.960526][4892:4897] CHIP:TOO: [1]: 112233 + [1658229800.960564][4892:4897] CHIP:TOO: Targets: null + [1658229800.960595][4892:4897] CHIP:TOO: FabricIndex: 1 + [1658229800.960625][4892:4897] CHIP:TOO: } + [1658229800.960673][4892:4897] CHIP:TOO: [2]: { + [1658229800.960706][4892:4897] CHIP:TOO: Privilege: 4 + [1658229800.960736][4892:4897] CHIP:TOO: AuthMode: 2 + [1658229800.960771][4892:4897] CHIP:TOO: Subjects: 4 entries + [1658229800.960806][4892:4897] CHIP:TOO: [1]: 444 + [1658229800.960840][4892:4897] CHIP:TOO: [2]: 333 + [1658229800.960874][4892:4897] CHIP:TOO: [3]: 222 + [1658229800.960907][4892:4897] CHIP:TOO: [4]: 111 + [1658229800.960944][4892:4897] CHIP:TOO: Targets: 1 entries + [1658229800.961008][4892:4897] CHIP:TOO: [1]: { + [1658229800.961042][4892:4897] CHIP:TOO: Cluster: 44 + [1658229800.961074][4892:4897] CHIP:TOO: Endpoint: 33 + [1658229800.961105][4892:4897] CHIP:TOO: DeviceType: null + [1658229800.961135][4892:4897] CHIP:TOO: } + [1658229800.961167][4892:4897] CHIP:TOO: FabricIndex: 1 + [1658229800.961197][4892:4897] CHIP:TOO: } + [1658229800.961245][4892:4897] CHIP:TOO: [3]: { + [1658229800.961277][4892:4897] CHIP:TOO: Privilege: 4 + [1658229800.961308][4892:4897] CHIP:TOO: AuthMode: 3 + [1658229800.961343][4892:4897] CHIP:TOO: Subjects: 4 entries + [1658229800.961378][4892:4897] CHIP:TOO: [1]: 888 + [1658229800.961411][4892:4897] CHIP:TOO: [2]: 777 + [1658229800.961445][4892:4897] CHIP:TOO: [3]: 666 + [1658229800.961479][4892:4897] CHIP:TOO: [4]: 555 + [1658229800.961516][4892:4897] CHIP:TOO: Targets: 1 entries + [1658229800.961556][4892:4897] CHIP:TOO: [1]: { + [1658229800.961589][4892:4897] CHIP:TOO: Cluster: 88 + [1658229800.961620][4892:4897] CHIP:TOO: Endpoint: 77 + [1658229800.961650][4892:4897] CHIP:TOO: DeviceType: null + [1658229800.961679][4892:4897] CHIP:TOO: } + [1658229800.961711][4892:4897] CHIP:TOO: FabricIndex: 1 + [1658229800.961741][4892:4897] CHIP:TOO: } + [1658229800.961850][4892:4897] CHIP:EM: Sending Standalone Ack for MessageCounter:261677764 on exchange 51705i disabled: true - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 3 elements struct + is list of AccessControlEntryStruct containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: View (1) + field: [N1] Targets field: null 2.struct Privilege field: View (1) AuthMode field: CASE (2) Subjects field: [111, 222, 333, 444] Targets field: [{Cluster: 11, Endpoint: 22}, {Cluster: 33, DeviceType: 44}] - struct Privilege field: Operate (3) AuthMode field: Group (3) Subjects - field: [555, 666, 777, 888] Targets field: [{Cluster: 55, Endpoint: - 66}, {Cluster: 77, DeviceType: 88}]" + 3.struct Privilege field: Operate (3) AuthMode field: Group (3) + Subjects field: [555, 666, 777, 888] Targets field: [{Cluster: 55, + Endpoint: 66}, {Cluster: 77, DeviceType: 88}]" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 1, "authMode": 2, "subjects": [111,222,333,444], "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": null },{ "cluster": 33, "endpoint": null, "deviceType": 44 }]}, {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets":[{ "cluster": 55, "endpoint": 66, "deviceType": null },{ "cluster": 77, "endpoint": null, "deviceType": 88 }]}]' 1 0 - + On TH , Verify DUT Responds Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 3 elements 1657276276.708941][2297:2302] CHIP:DMG: WriteClient moving to [ResponseRe] [1657276276.709021][2297:2302] CHIP:DMG: WriteResponseMessage = [1657276276.709058][2297:2302] CHIP:DMG: { @@ -369,6 +457,8 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 + On TH , Verify DUT Responds Successfully . + [1657278053.764924][2231:2236] CHIP:DMG: SuppressResponse = true, [1657278053.764958][2231:2236] CHIP:DMG: InteractionModelRevision = 1 @@ -432,17 +522,18 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 3 elements struct + is list of AccessControlEntryStruct containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: View (1) + field: [N1] Targets field: null 2.struct Privilege field: View (1) AuthMode field: CASE (2) Subjects field: null Targets field: - [{Cluster: 11, Endpoint: 22}, {Cluster: 33, DeviceType: 44}] struct + [{Cluster: 11, Endpoint: 22}, {Cluster: 33, DeviceType: 44}] 3.struct Privilege field: Operate (3) AuthMode field: Group (3) Subjects field: null Targets field: [{Cluster: 55, Endpoint: 66}, {Cluster: 77, DeviceType: 88}]" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 1, "authMode": 2, "subjects": [], "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": null },{ "cluster": 33, "endpoint": null, "deviceType": 44 }]}, {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": [], "targets":[{ "cluster": 55, "endpoint": 66, "deviceType": null },{ "cluster": 77, "endpoint": null, "deviceType": 88 }]}]' 1 0 + Verify DUT Responds Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 3 elements [1657541707.114348][3004:3009] CHIP:DMG: { [1657541707.114393][3004:3009] CHIP:DMG: AttributeStatusIBs = @@ -524,6 +615,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 + On TH , Verify DUT Responds Successfully [1657278352.938811][2258:2263] CHIP:DMG: [1657278352.938840][2258:2263] CHIP:DMG: }, @@ -583,17 +675,18 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 3 elements struct + is list of AccessControlEntryStruct containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: View (1) + field: [N1] Targets field: null 2.struct Privilege field: View (1) AuthMode field: CASE (2) Subjects field: [111, 222, 333, 444] Targets - field: null struct Privilege field: Operate (3) AuthMode field: Group - (3) Subjects field: [555, 666, 777, 888] Targets field: null" + field: null 3.struct Privilege field: Operate (3) AuthMode field: + Group (3) Subjects field: [555, 666, 777, 888] Targets field: null" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 1, "authMode": 2, "subjects": [111, 222, 333, 444], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": [111, 222, 333, 444], "targets": null}]' 1 0 + On TH , Verify DUT Responds Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 3 elements as Target Null. [1657542060.230268][3398:3403] CHIP:DMG: { [1657542060.230322][3398:3403] CHIP:DMG: AttributeStatusIBs = @@ -675,6 +768,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 + On TH , Verify DUT Responds Successfully [1656656511.643560][2994:2999] CHIP:DMG: [1656656511.643593][2994:2999] CHIP:DMG: SuppressResponse = true, [1656656511.643626][2994:2999] CHIP:DMG: InteractionModelRevision = 1 @@ -716,15 +810,17 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: Group (3) Subjects field: null Targets field: null" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": null, "targets": null}]' 1 0 + On TH , Verify DUT Responds Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 2 elements. + [1656507141.628453][3224:3229] CHIP:DMG: WriteResponseMessage = [1656507141.628515][3224:3229] CHIP:DMG: { [1656507141.628569][3224:3229] CHIP:DMG: AttributeStatusIBs = @@ -791,6 +887,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 + On TH , Verify DUT Responds Successfully [1656507318.740283][3241:3246] CHIP:DMG: ], [1656507318.740346][3241:3246] CHIP:DMG: @@ -819,14 +916,15 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: ProxyView (2) - AuthMode field: CASE (2) Subjects field: null Targets field: null" + field: [N1] Targets field: null 2.struct Privilege field: ProxyView + (2) AuthMode field: CASE (2) Subjects field: null Targets field: null" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 2, "authMode": 2, "subjects": null, "targets": null}]' 1 0 + On TH , Verify DUT Responds Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 2 elements [1656507439.868495][3249:3254] CHIP:DMG: WriteClient moving to [ResponseRe] [1656507439.868612][3249:3254] CHIP:DMG: WriteResponseMessage = @@ -894,6 +992,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 + On TH , Verify DUT Responds Successfully [1656507517.730614][3261:3266] CHIP:DMG: [1656507517.730654][3261:3266] CHIP:DMG: SuppressResponse = true, @@ -925,6 +1024,9 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read subjects-per-access-control-entry 1 0 + + On TH, verify DUT responds with value 4 or greater as subjects-per-access-control-entry + [1656657490.002372][3078:3083] CHIP:DMG: [1656657490.002408][3078:3083] CHIP:DMG: ], [1656657490.002452][3078:3083] CHIP:DMG: @@ -939,14 +1041,17 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: list of MAXSUBJECTS random node IDs (stored as SUBJECTS) Targets field: null" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects":[33,44,55,66] , "targets": null}]' 1 0 + On TH , Verify DUT Responds Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 2 elements + + [1657542321.144954][3461:3466] CHIP:DMG: { [1657542321.144990][3461:3466] CHIP:DMG: AttributeStatusIBs = @@ -1012,6 +1117,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 + On TH , Verify DUT Responds Successfully [1656928460.992030][4255:4260] CHIP:DMG: ], [1656928460.992075][4255:4260] CHIP:DMG: [1656928460.992101][4255:4260] CHIP:DMG: SuppressResponse = true, @@ -1044,15 +1150,16 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: [CAT1, CAT1, CAT3, CAT4] Targets field: null" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects":[65520,65521,65522,65523] , "targets": null}]' 1 0 + Verify in TH log: [1656509348.174135][3403:3408] CHIP:DMG: WriteClient moving to [ResponseRe] [1656509348.174227][3403:3408] CHIP:DMG: WriteResponseMessage = @@ -1121,6 +1228,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 + On TH , Verify DUT Responds Successfully [1656509471.738046][3416:3421] CHIP:DMG: [1656509471.738082][3416:3421] CHIP:DMG: SuppressResponse = true, @@ -1156,6 +1264,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read targets-per-access-control-entry 1 0 + On TH, verify DUT responds with value 3 or greater as Targets-per-access-control-entry. [1656509737.166763][3434:3439] CHIP:DMG: [1656509737.166786][3434:3439] CHIP:DMG: ], [1656509737.166816][3434:3439] CHIP:DMG: @@ -1170,15 +1279,17 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: null Targets field: null struct Privilege field: Operate (3) + field: null Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: Targets field: list of MAXTARGETS targets {Cluster: random} (stored as TARGETS)" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 40, "endpoint": null, "deviceType": null },{ "cluster": 28, "endpoint": null, "deviceType": null }]}]' 1 0 + Verify in TH log: + [1657542520.140869][3499:3504] CHIP:DMG: { [1657542520.140922][3499:3504] CHIP:DMG: AttributeStatusIBs = [1657542520.140966][3499:3504] CHIP:DMG: [ @@ -1243,6 +1354,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 + On TH , Verify DUT Responds Successfully [1657542633.704684][3522:3527] CHIP:DMG: } [1657542633.705098][3522:3527] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 3549245792 @@ -1280,6 +1392,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read access-control-entries-per-fabric 1 0 + On TH, verify DUT responds with value 3 or greater as AccessControlEntriesPerFabric. [1656594850.964909][4043:4048] CHIP:DMG: AttributeReportIBs = [1656594850.964954][4043:4048] CHIP:DMG: [ @@ -1314,8 +1427,8 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing MAXENTRIES elements - struct Privilege field: Administer (5) AuthMode field: CASE (2) - Subjects field: null Targets field: null struct Privilege field: + 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) + Subjects field: null Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: null Targets field: null subsequent elements same as second element" PICS: ACL.S.A0000 @@ -1324,6 +1437,8 @@ tests: {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [], "targets":null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [], "targets":null}]' 1 0 + On TH , Verify DUT Responds Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 2 elements + [1657617362.022161][8840:8845] CHIP:DMG: WriteResponseMessage = [1657617362.022190][8840:8845] CHIP:DMG: { [1657617362.022216][8840:8845] CHIP:DMG: AttributeStatusIBs = @@ -1406,6 +1521,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 + On TH , Verify DUT Responds Successfully [1657543165.385093][3592:3597] CHIP:DMG: } [1657543165.385508][3592:3597] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 3549245812 @@ -1435,9 +1551,9 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: PASE (1) Subjects field: null Targets field: null" PICS: ACL.S.A0000 verification: | @@ -1445,6 +1561,7 @@ tests: {"fabricIndex": 1, "privilege": 3, "authMode": 1, "subjects": [], "targets":null}]' 1 0 + [1656914449.000227][3252:3257] CHIP:DMG: AttributePathIB = [1656914449.000272][3252:3257] CHIP:DMG: { [1656914449.000317][3252:3257] CHIP:DMG: Endpoint = 0x0, @@ -1491,6 +1608,8 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 + + On TH , Verify DUT Responds Successfully [1656914601.250655][3267:3272] CHIP:DMG: ], [1656914601.250709][3267:3272] CHIP:DMG: [1656914601.250746][3267:3272] CHIP:DMG: SuppressResponse = true, @@ -1512,10 +1631,10 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Administer (5) - AuthMode field: Group (3) Subjects field: null Targets field: null" + field: [N1] Targets field: null 2.struct Privilege field: Administer + (5) AuthMode field: Group (3) Subjects field: null Targets field: null" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, @@ -1556,11 +1675,11 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: invalid value - (not 1-5) AuthMode field: CASE (2) Subjects field: null Targets field: - null" + field: [N1] Targets field: null 2.struct Privilege field: invalid + value (not 1-5) AuthMode field: CASE (2) Subjects field: null Targets + field: null" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, @@ -1603,9 +1722,9 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: invalid value (not 1-3) Subjects field: null Targets field: null" PICS: ACL.S.A0000 @@ -1676,9 +1795,9 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: [0] Targets field: null" PICS: ACL.S.A0000 verification: | @@ -1749,9 +1868,9 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: [0xFFFFFFFFFFFFFFFF] Targets field: null" PICS: ACL.S.A0000 @@ -1823,9 +1942,9 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: [0xFFFFFFFD_BAD_NONE0000000] Targets field: null" PICS: ACL.S.A0000 @@ -1970,9 +2089,9 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: null Targets field: [{}]" PICS: ACL.S.A0000 verification: | @@ -2043,9 +2162,9 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: null Targets field: [{Cluster: 0xFFFFFFFF}]" PICS: ACL.S.A0000 @@ -2116,86 +2235,64 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: null Targets field: [{Endpoint: 255}]" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": 255, "deviceType": null }]}]' 1 0 - - [1657617886.621245][8939:8944] CHIP:DMG: WriteResponseMessage = - [1657617886.621277][8939:8944] CHIP:DMG: { - [1657617886.621304][8939:8944] CHIP:DMG: AttributeStatusIBs = - [1657617886.621340][8939:8944] CHIP:DMG: [ - [1657617886.621370][8939:8944] CHIP:DMG: AttributeStatusIB = - [1657617886.621406][8939:8944] CHIP:DMG: { - [1657617886.621452][8939:8944] CHIP:DMG: AttributePathIB = - [1657617886.621492][8939:8944] CHIP:DMG: { - [1657617886.621531][8939:8944] CHIP:DMG: Endpoint = 0x0, - [1657617886.621569][8939:8944] CHIP:DMG: Cluster = 0x1f, - [1657617886.621606][8939:8944] CHIP:DMG: Attribute = 0x0000_0000, - [1657617886.621644][8939:8944] CHIP:DMG: } - [1657617886.621683][8939:8944] CHIP:DMG: - [1657617886.621721][8939:8944] CHIP:DMG: StatusIB = - [1657617886.621755][8939:8944] CHIP:DMG: { - [1657617886.621792][8939:8944] CHIP:DMG: status = 0x00 (SUCCESS), - [1657617886.621830][8939:8944] CHIP:DMG: }, - [1657617886.621862][8939:8944] CHIP:DMG: - [1657617886.621891][8939:8944] CHIP:DMG: }, - [1657617886.621930][8939:8944] CHIP:DMG: - [1657617886.621957][8939:8944] CHIP:DMG: AttributeStatusIB = - [1657617886.621987][8939:8944] CHIP:DMG: { - [1657617886.622016][8939:8944] CHIP:DMG: AttributePathIB = - [1657617886.622049][8939:8944] CHIP:DMG: { - [1657617886.622085][8939:8944] CHIP:DMG: Endpoint = 0x0, - [1657617886.622122][8939:8944] CHIP:DMG: Cluster = 0x1f, - [1657617886.622162][8939:8944] CHIP:DMG: Attribute = 0x0000_0000, - [1657617886.622199][8939:8944] CHIP:DMG: ListIndex = Null, - [1657617886.622234][8939:8944] CHIP:DMG: } - [1657617886.622271][8939:8944] CHIP:DMG: - [1657617886.622308][8939:8944] CHIP:DMG: StatusIB = - [1657617886.622343][8939:8944] CHIP:DMG: { - [1657617886.622416][8939:8944] CHIP:DMG: status = 0x00 (SUCCESS), - [1657617886.622452][8939:8944] CHIP:DMG: }, - [1657617886.622488][8939:8944] CHIP:DMG: - [1657617886.622518][8939:8944] CHIP:DMG: }, - [1657617886.622560][8939:8944] CHIP:DMG: - [1657617886.622589][8939:8944] CHIP:DMG: AttributeStatusIB = - [1657617886.622622][8939:8944] CHIP:DMG: { - [1657617886.622652][8939:8944] CHIP:DMG: AttributePathIB = - [1657617886.622686][8939:8944] CHIP:DMG: { - [1657617886.622721][8939:8944] CHIP:DMG: Endpoint = 0x0, - [1657617886.622762][8939:8944] CHIP:DMG: Cluster = 0x1f, - [1657617886.622803][8939:8944] CHIP:DMG: Attribute = 0x0000_0000, - [1657617886.622840][8939:8944] CHIP:DMG: ListIndex = Null, - [1657617886.622878][8939:8944] CHIP:DMG: } - [1657617886.622920][8939:8944] CHIP:DMG: - [1657617886.622957][8939:8944] CHIP:DMG: StatusIB = - [1657617886.622994][8939:8944] CHIP:DMG: { - [1657617886.623029][8939:8944] CHIP:DMG: status = 0x00 (SUCCESS), - [1657617886.623064][8939:8944] CHIP:DMG: }, - [1657617886.623101][8939:8944] CHIP:DMG: - [1657617886.623131][8939:8944] CHIP:DMG: }, - [1657617886.623167][8939:8944] CHIP:DMG: - [1657617886.623196][8939:8944] CHIP:DMG: ], - [1657617886.623237][8939:8944] CHIP:DMG: - [1657617886.623264][8939:8944] CHIP:DMG: InteractionModelRevision = 1 - [1657617886.623292][8939:8944] CHIP:DMG: } - [1657617886.623435][8939:8944] CHIP:DMG: WriteClient moving to [AwaitingDe] + 79.812353][2515:2520] CHIP:DMG: } + [1658382979.812390][2515:2520] CHIP:DMG: + [1658382979.812427][2515:2520] CHIP:DMG: StatusIB = + [1658382979.812464][2515:2520] CHIP:DMG: { + [1658382979.812502][2515:2520] CHIP:DMG: status = 0x00 (SUCCESS), + [1658382979.812559][2515:2520] CHIP:DMG: }, + [1658382979.812589][2515:2520] CHIP:DMG: + [1658382979.812613][2515:2520] CHIP:DMG: }, + [1658382979.812647][2515:2520] CHIP:DMG: + [1658382979.812675][2515:2520] CHIP:DMG: AttributeStatusIB = + [1658382979.812706][2515:2520] CHIP:DMG: { + [1658382979.812737][2515:2520] CHIP:DMG: AttributePathIB = + [1658382979.812771][2515:2520] CHIP:DMG: { + [1658382979.812806][2515:2520] CHIP:DMG: Endpoint = 0x0, + [1658382979.812843][2515:2520] CHIP:DMG: Cluster = 0x1f, + [1658382979.812881][2515:2520] CHIP:DMG: Attribute = 0x0000_0000, + [1658382979.812917][2515:2520] CHIP:DMG: ListIndex = Null, + [1658382979.812951][2515:2520] CHIP:DMG: } + [1658382979.812989][2515:2520] CHIP:DMG: + [1658382979.813026][2515:2520] CHIP:DMG: StatusIB = + [1658382979.813060][2515:2520] CHIP:DMG: { + [1658382979.813096][2515:2520] CHIP:DMG: status = 0x00 (SUCCESS), + [1658382979.813130][2515:2520] CHIP:DMG: }, + [1658382979.813165][2515:2520] CHIP:DMG: + [1658382979.813195][2515:2520] CHIP:DMG: }, + [1658382979.813230][2515:2520] CHIP:DMG: + [1658382979.813257][2515:2520] CHIP:DMG: ], + [1658382979.813297][2515:2520] CHIP:DMG: + [1658382979.813324][2515:2520] CHIP:DMG: InteractionModelRevision = 1 + [1658382979.813351][2515:2520] CHIP:DMG: } + [1658382979.813497][2515:2520] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1658382979.813563][2515:2520] CHIP:EM: Sending Standalone Ack for MessageCounter:223359153 on exchange 17128i + [1658382979.813637][2515:2520] CHIP:IN: Prepared secure message 0xffffa7ffda68 to 0x0000000000000001 (1) of type 0x10 and protocolId (0, 0) on exchange 17128i with MessageCounter:12942839. + [1658382979.813680][2515:2520] CHIP:IN: Sending encrypted msg 0xffffa7ffda68 with MessageCounter:12942839 to 0x0000000000000001 (1) at monotonic time: 00000000003C9D9D msec + [1658382979.813841][2515:2520] CHIP: disabled: true - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: null Targets field: [{DeviceType: 0xFFFFFFFF}]" PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": null, "deviceType": 4294967295 }]}]' 1 0 + On TH , Verify DUT Responds Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 2 elements + + [1657617920.044059][8948:8953] CHIP:DMG: { [1657617920.044085][8948:8953] CHIP:DMG: AttributeStatusIBs = @@ -2260,9 +2357,9 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: null Targets field: [{Endpoint: 22, DeviceType: 33}]" PICS: ACL.S.A0000 @@ -2330,9 +2427,9 @@ tests: - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements struct + is list of AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1] Targets field: null struct Privilege field: Operate (3) + field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) Subjects field: null Targets field: [{Cluster: 11, Endpoint: 22, DeviceType: 33}]" PICS: ACL.S.A0000 @@ -2407,6 +2504,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [], "targets": null}]' 1 0 + On TH , Verify DUT Responds Successfully to acl attribute with a value is list of AccessControlEntryStruct containing `1 element. [1657618011.091198][8968:8973] CHIP:DMG: { [1657618011.091228][8968:8973] CHIP:DMG: AttributeStatusIBs = [1657618011.091272][8968:8973] CHIP:DMG: [ diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml index a04d35984eb0dc..2ee40a3308a034 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml @@ -36,6 +36,8 @@ tests: verification: | ./chip-tool operationalcredentials read current-fabric-index 1 0 + On TH, Verify DUT Responds to CurrentFabricIndex attribute of operationalCredential cluster as 1 + [1657186774.908634][10846:10851] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 3161849734 [1657186774.911149][10846:10851] CHIP:TOO: CurrentFabricIndex: 1 disabled: true @@ -66,112 +68,111 @@ tests: verification: | ./chip-tool operationalcredentials read current-fabric-index 2 0 + On TH, Verify DUT Responds to CurrentFabricIndex attribute of operationalCredential cluster as 2 [1657186956.724761][3910:3915] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 3161849734 [1657186956.731658][3910:3915] CHIP:TOO: CurrentFabricIndex: 2 disabled: true - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, + 'TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of AccessControlExtensionStruct containing 1 element - struct Data field: D_OK_EMPTY" + 1.struct .Data field: D_OK_EMPTY "1718"' PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write extension '[{"data":"1000110010001100"}]' 1 0 - - [1657187217.204901][10872:10877] CHIP:DMG: WriteResponseMessage = - [1657187217.204928][10872:10877] CHIP:DMG: { - [1657187217.204947][10872:10877] CHIP:DMG: AttributeStatusIBs = - [1657187217.204977][10872:10877] CHIP:DMG: [ - [1657187217.205002][10872:10877] CHIP:DMG: AttributeStatusIB = - [1657187217.205029][10872:10877] CHIP:DMG: { - [1657187217.205055][10872:10877] CHIP:DMG: AttributePathIB = - [1657187217.205092][10872:10877] CHIP:DMG: { - [1657187217.205129][10872:10877] CHIP:DMG: Endpoint = 0x0, - [1657187217.205160][10872:10877] CHIP:DMG: Cluster = 0x1f, - [1657187217.205199][10872:10877] CHIP:DMG: Attribute = 0x0000_0001, - [1657187217.205234][10872:10877] CHIP:DMG: } - [1657187217.205270][10872:10877] CHIP:DMG: - [1657187217.205300][10872:10877] CHIP:DMG: StatusIB = - [1657187217.205332][10872:10877] CHIP:DMG: { - [1657187217.205363][10872:10877] CHIP:DMG: status = 0x00 (SUCCESS), - [1657187217.205395][10872:10877] CHIP:DMG: }, - [1657187217.205425][10872:10877] CHIP:DMG: - [1657187217.205451][10872:10877] CHIP:DMG: }, - [1657187217.205486][10872:10877] CHIP:DMG: - [1657187217.205511][10872:10877] CHIP:DMG: AttributeStatusIB = - [1657187217.205537][10872:10877] CHIP:DMG: { - [1657187217.205562][10872:10877] CHIP:DMG: AttributePathIB = - [1657187217.205592][10872:10877] CHIP:DMG: { - [1657187217.205623][10872:10877] CHIP:DMG: Endpoint = 0x0, - [1657187217.205660][10872:10877] CHIP:DMG: Cluster = 0x1f, - [1657187217.205694][10872:10877] CHIP:DMG: Attribute = 0x0000_0001, - [1657187217.205730][10872:10877] CHIP:DMG: ListIndex = Null, - [1657187217.205764][10872:10877] CHIP:DMG: } - [1657187217.205797][10872:10877] CHIP:DMG: - [1657187217.205827][10872:10877] CHIP:DMG: StatusIB = - [1657187217.205856][10872:10877] CHIP:DMG: { - [1657187217.205887][10872:10877] CHIP:DMG: status = 0x00 (SUCCESS), - [1657187217.205922][10872:10877] CHIP:DMG: }, - [1657187217.205953][10872:10877] CHIP:DMG: - [1657187217.205978][10872:10877] CHIP:DMG: }, - [1657187217.206007][10872:10877] CHIP:DMG: - [1657187217.206031][10872:10877] CHIP:DMG: ], - [1657187217.206063][10872:10877] CHIP:DMG: - [1657187217.206086][10872:10877] CHIP:DMG: InteractionModelRevision = 1 - [1657187217.206110][10872:10877] CHIP:DMG: } - [1657187217.206211][10872:10877] CHIP:DMG: WriteClient moving to [AwaitingDe] + ./chip-tool accesscontrol write extension '[{"data":"1718"}]' 1 0 + + ON TH1,Verify DUT Responds Successfully to extension attribute list containg one element . + + + 657893593.975649][4116:4121] CHIP:DMG: { + [1657893593.975678][4116:4121] CHIP:DMG: AttributePathIB = + [1657893593.975718][4116:4121] CHIP:DMG: { + [1657893593.975755][4116:4121] CHIP:DMG: Endpoint = 0x0, + [1657893593.975797][4116:4121] CHIP:DMG: Cluster = 0x1f, + [1657893593.975835][4116:4121] CHIP:DMG: Attribute = 0x0000_0001, + [1657893593.975871][4116:4121] CHIP:DMG: } + [1657893593.975910][4116:4121] CHIP:DMG: + [1657893593.975944][4116:4121] CHIP:DMG: StatusIB = + [1657893593.975980][4116:4121] CHIP:DMG: { + [1657893593.976015][4116:4121] CHIP:DMG: status = 0x00 (SUCCESS), + [1657893593.976054][4116:4121] CHIP:DMG: }, + [1657893593.976088][4116:4121] CHIP:DMG: + [1657893593.976119][4116:4121] CHIP:DMG: }, + [1657893593.976161][4116:4121] CHIP:DMG: + [1657893593.976188][4116:4121] CHIP:DMG: AttributeStatusIB = + [1657893593.976220][4116:4121] CHIP:DMG: { + [1657893593.976248][4116:4121] CHIP:DMG: AttributePathIB = + [1657893593.976281][4116:4121] CHIP:DMG: { + [1657893593.976316][4116:4121] CHIP:DMG: Endpoint = 0x0, + [1657893593.976354][4116:4121] CHIP:DMG: Cluster = 0x1f, + [1657893593.976395][4116:4121] CHIP:DMG: Attribute = 0x0000_0001, + [1657893593.976434][4116:4121] CHIP:DMG: ListIndex = Null, + [1657893593.976469][4116:4121] CHIP:DMG: } + [1657893593.976507][4116:4121] CHIP:DMG: + [1657893593.976541][4116:4121] CHIP:DMG: StatusIB = + [1657893593.976574][4116:4121] CHIP:DMG: { + [1657893593.976610][4116:4121] CHIP:DMG: status = 0x00 (SUCCESS), + [1657893593.976645][4116:4121] CHIP:DMG: }, + [1657893593.976678][4116:4121] CHIP:DMG: + [1657893593.976709][4116:4121] CHIP:DMG: }, + [1657893593.976744][4116:4121] CHIP:DMG: + [1657893593.976771][4116:4121] CHIP:DMG: ], + [1657893593.976808][4116:4121] CHIP:DMG: + [1657893593.976835][4116:4121] CHIP:D disabled: true - label: - "TH2 writes DUT Endpoint 0 AccessControl cluster Extension attribute + 'TH2 writes DUT Endpoint 0 AccessControl cluster Extension attribute value is list of AccessControlExtensionStruct containing 1 element - struct Data field: D_OK_SINGLE" + 1.struct Data field: D_OK_SINGLE + "17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"' PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write extension '[{"data":"1000110010001100"}]' 2 0 - - [1657187392.197366][3939:3944] CHIP:DMG: WriteResponseMessage = - [1657187392.197462][3939:3944] CHIP:DMG: { - [1657187392.197516][3939:3944] CHIP:DMG: AttributeStatusIBs = - [1657187392.197616][3939:3944] CHIP:DMG: [ - [1657187392.197678][3939:3944] CHIP:DMG: AttributeStatusIB = - [1657187392.197767][3939:3944] CHIP:DMG: { - [1657187392.197832][3939:3944] CHIP:DMG: AttributePathIB = - [1657187392.197939][3939:3944] CHIP:DMG: { - [1657187392.198044][3939:3944] CHIP:DMG: Endpoint = 0x0, - [1657187392.198130][3939:3944] CHIP:DMG: Cluster = 0x1f, - [1657187392.198235][3939:3944] CHIP:DMG: Attribute = 0x0000_0001, - [1657187392.198333][3939:3944] CHIP:DMG: } - [1657187392.198422][3939:3944] CHIP:DMG: - [1657187392.198521][3939:3944] CHIP:DMG: StatusIB = - [1657187392.198601][3939:3944] CHIP:DMG: { - [1657187392.198703][3939:3944] CHIP:DMG: status = 0x00 (SUCCESS), - [1657187392.198800][3939:3944] CHIP:DMG: }, - [1657187392.198882][3939:3944] CHIP:DMG: - [1657187392.198965][3939:3944] CHIP:DMG: }, - [1657187392.199052][3939:3944] CHIP:DMG: - [1657187392.199135][3939:3944] CHIP:DMG: AttributeStatusIB = - [1657187392.199201][3939:3944] CHIP:DMG: { - [1657187392.199286][3939:3944] CHIP:DMG: AttributePathIB = - [1657187392.199382][3939:3944] CHIP:DMG: { - [1657187392.199463][3939:3944] CHIP:DMG: Endpoint = 0x0, - [1657187392.199566][3939:3944] CHIP:DMG: Cluster = 0x1f, - [1657187392.199650][3939:3944] CHIP:DMG: Attribute = 0x0000_0001, - [1657187392.199753][3939:3944] CHIP:DMG: ListIndex = Null, - [1657187392.199830][3939:3944] CHIP:DMG: } - [1657187392.199937][3939:3944] CHIP:DMG: - [1657187392.200030][3939:3944] CHIP:DMG: StatusIB = - [1657187392.200109][3939:3944] CHIP:DMG: { - [1657187392.200208][3939:3944] CHIP:DMG: status = 0x00 (SUCCESS), - [1657187392.200287][3939:3944] CHIP:DMG: }, - [1657187392.200385][3939:3944] CHIP:DMG: - [1657187392.200467][3939:3944] CHIP:DMG: }, - [1657187392.200543][3939:3944] CHIP:DMG: - [1657187392.200680][3939:3944] CHIP:DMG: ], - [1657187392.200821][3939:3944] CHIP:DMG: - [1657187392.200885][3939:3944] CHIP:DMG: InteractionModelRevision = 1 - [1657187392.200943][3939:3944] CHIP:DMG: } - [1657187392.201175][3939:3944] CHIP:DMG: WriteClient moving to [AwaitingDe] + ./chip-tool accesscontrol write extension '[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]' 2 0 + + ON TH2,Verify DUT Responds Successfully to extension attribute list containg one element . + 1657894672.479983][2433:2438] CHIP:DMG: WriteClient moving to [ResponseRe] + [1657894672.480057][2433:2438] CHIP:DMG: WriteResponseMessage = + [1657894672.480092][2433:2438] CHIP:DMG: { + [1657894672.480124][2433:2438] CHIP:DMG: AttributeStatusIBs = + [1657894672.480175][2433:2438] CHIP:DMG: [ + [1657894672.480211][2433:2438] CHIP:DMG: AttributeStatusIB = + [1657894672.480251][2433:2438] CHIP:DMG: { + [1657894672.480288][2433:2438] CHIP:DMG: AttributePathIB = + [1657894672.480333][2433:2438] CHIP:DMG: { + [1657894672.480379][2433:2438] CHIP:DMG: Endpoint = 0x0, + [1657894672.480427][2433:2438] CHIP:DMG: Cluster = 0x1f, + [1657894672.480476][2433:2438] CHIP:DMG: Attribute = 0x0000_0001, + [1657894672.480521][2433:2438] CHIP:DMG: } + [1657894672.480570][2433:2438] CHIP:DMG: + [1657894672.480612][2433:2438] CHIP:DMG: StatusIB = + [1657894672.480657][2433:2438] CHIP:DMG: { + [1657894672.480700][2433:2438] CHIP:DMG: status = 0x00 (SUCCESS), + [1657894672.480745][2433:2438] CHIP:DMG: }, + [1657894672.480789][2433:2438] CHIP:DMG: + [1657894672.480826][2433:2438] CHIP:DMG: }, + [1657894672.480877][2433:2438] CHIP:DMG: + [1657894672.480911][2433:2438] CHIP:DMG: AttributeStatusIB = + [1657894672.480949][2433:2438] CHIP:DMG: { + [1657894672.480986][2433:2438] CHIP:DMG: AttributePathIB = + [1657894672.481028][2433:2438] CHIP:DMG: { + [1657894672.481072][2433:2438] CHIP:DMG: Endpoint = 0x0, + [1657894672.481120][2433:2438] CHIP:DMG: Cluster = 0x1f, + [1657894672.481168][2433:2438] CHIP:DMG: Attribute = 0x0000_0001, + [1657894672.481214][2433:2438] CHIP:DMG: ListIndex = Null, + [1657894672.481258][2433:2438] CHIP:DMG: } + [1657894672.481306][2433:2438] CHIP:DMG: + [1657894672.481347][2433:2438] CHIP:DMG: StatusIB = + [1657894672.481390][2433:2438] CHIP:DMG: { + [1657894672.481433][2433:2438] CHIP:DMG: status = 0x00 (SUCCESS), + [1657894672.481482][2433:2438] CHIP:DMG: }, + [1657894672.481526][2433:2438] CHIP:DMG: + [1657894672.481562][2433:2438] CHIP:DMG: }, + [1657894672.481605][2433:2438] CHIP:DMG: + [1657894672.481639][2433:2438] CHIP:DMG: ], + [1657894672.481686][2433:2438] CHIP:DMG: + [1657894672.481720][2433:2438] CHIP:DMG: InteractionModelRevision = 1 + [1657894672.481754][2433:2438] CHIP:DMG: } disabled: true - label: @@ -179,6 +180,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read extension 1 0 + On TH1 ,VERIFY DUT RESPONDS SUCCESSFULLY. [1657187433.621369][10890:10895] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 3415499944 [1657187433.621422][10890:10895] CHIP:TOO: Extension: 1 entries @@ -194,12 +196,13 @@ tests: verification: | ./chip-tool accesscontrol read extension 2 0 - [1657187461.411759][3951:3956] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 3415499944 - [1657187461.411876][3951:3956] CHIP:TOO: Extension: 1 entries - [1657187461.411988][3951:3956] CHIP:TOO: [1]: { - [1657187461.412055][3951:3956] CHIP:TOO: Data: 1000110010001100 - [1657187461.412142][3951:3956] CHIP:TOO: FabricIndex: 2 - [1657187461.412199][3951:3956] CHIP:TOO: } + On TH2, Verify DUT Responds successfully + [1658327214.683199][2749:2754] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 2953114587 + [1658327214.683283][2749:2754] CHIP:TOO: Extension: 1 entries + [1658327214.683348][2749:2754] CHIP:TOO: [1]: { + [1658327214.683388][2749:2754] CHIP:TOO: Data: 17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018 + [1658327214.683423][2749:2754] CHIP:TOO: FabricIndex: 2 + [1658327214.683454][2749:2754] CHIP:TOO: } disabled: true - label: @@ -207,22 +210,21 @@ tests: AccessControlExtensionChanged event" PICS: ACL.S.E01 verification: | - ./chip-tool accesscontrol read-event access-control-extension-changed 1 0 - - [1657187785.328447][10914:10919] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0001 - [1657187785.328472][10914:10919] CHIP:TOO: Event number: 5 - [1657187785.328494][10914:10919] CHIP:TOO: Priority: Info - [1657187785.328515][10914:10919] CHIP:TOO: Timestamp: 19186697 - [1657187785.328678][10914:10919] CHIP:TOO: AccessControlExtensionChanged: { - [1657187785.328716][10914:10919] CHIP:TOO: AdminNodeID: 112233 - [1657187785.328740][10914:10919] CHIP:TOO: AdminPasscodeID: null - [1657187785.328764][10914:10919] CHIP:TOO: ChangeType: 1 - [1657187785.328788][10914:10919] CHIP:TOO: LatestValue: { - [1657187785.328813][10914:10919] CHIP:TOO: Data: 1000110010001100 - [1657187785.328835][10914:10919] CHIP:TOO: FabricIndex: 1 - [1657187785.328856][10914:10919] CHIP:TOO: } - [1657187785.328878][10914:10919] CHIP:TOO: AdminFabricIndex: 1 - [1657187785.328900][10914:10919] CHIP:TOO: } + ./chip-tool accesscontrol read-event access-control-extension-changed 1 0 + [1658327494.282263][2810:2815] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0001 + [1658327494.282295][2810:2815] CHIP:TOO: Event number: 5 + [1658327494.282319][2810:2815] CHIP:TOO: Priority: Info + [1658327494.282342][2810:2815] CHIP:TOO: Timestamp: 4621721 + [1658327494.282458][2810:2815] CHIP:TOO: AccessControlExtensionChanged: { + [1658327494.282497][2810:2815] CHIP:TOO: AdminNodeID: 112233 + [1658327494.282524][2810:2815] CHIP:TOO: AdminPasscodeID: null + [1658327494.282551][2810:2815] CHIP:TOO: ChangeType: 1 + [1658327494.282576][2810:2815] CHIP:TOO: LatestValue: { + [1658327494.282633][2810:2815] CHIP:TOO: Data: 1718 + [1658327494.282660][2810:2815] CHIP:TOO: FabricIndex: 1 + [1658327494.282684][2810:2815] CHIP:TOO: } + [1658327494.282709][2810:2815] CHIP:TOO: AdminFabricIndex: 1 + [1658327494.282733][2810:2815] CHIP:TOO: } disabled: true - label: @@ -231,19 +233,20 @@ tests: PICS: ACL.S.E01 verification: | ./chip-tool accesscontrol read-event access-control-extension-changed 2 0 - - [1657187837.562681][3976:3981] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0001 - [1657187837.562746][3976:3981] CHIP:TOO: Event number: 6 - [1657187837.562801][3976:3981] CHIP:TOO: Priority: Info - [1657187837.562855][3976:3981] CHIP:TOO: Timestamp: 19361672 - [1657187837.566248][3976:3981] CHIP:TOO: AccessControlExtensionChanged: { - [1657187837.566371][3976:3981] CHIP:TOO: AdminNodeID: 112233 - [1657187837.566434][3976:3981] CHIP:TOO: AdminPasscodeID: null - [1657187837.566575][3976:3981] CHIP:TOO: ChangeType: 1 - [1657187837.566642][3976:3981] CHIP:TOO: LatestValue: { - [1657187837.566705][3976:3981] CHIP:TOO: Data: 1000110010001100 - [1657187837.566829][3976:3981] CHIP:TOO: FabricIndex: 2 - [1657187837.566889][3976:3981] CHIP:TOO: } - [1657187837.566946][3976:3981] CHIP:TOO: AdminFabricIndex: 2 - [1657187837.567065][3976:3981] CHIP:TOO: } + On TH2, Verify DUT Responds successfully + + [1658327551.622018][4295:4300] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0001 + [1658327551.622043][4295:4300] CHIP:TOO: Event number: 6 + [1658327551.622065][4295:4300] CHIP:TOO: Priority: Info + [1658327551.622130][4295:4300] CHIP:TOO: Timestamp: 4633724 + [1658327551.622239][4295:4300] CHIP:TOO: AccessControlExtensionChanged: { + [1658327551.622287][4295:4300] CHIP:TOO: AdminNodeID: 112233 + [1658327551.622313][4295:4300] CHIP:TOO: AdminPasscodeID: null + [1658327551.622337][4295:4300] CHIP:TOO: ChangeType: 1 + [1658327551.622361][4295:4300] CHIP:TOO: LatestValue: { + [1658327551.622389][4295:4300] CHIP:TOO: Data: 17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018 + [1658327551.622414][4295:4300] CHIP:TOO: FabricIndex: 2 + [1658327551.622436][4295:4300] CHIP:TOO: } + [1658327551.622459][4295:4300] CHIP:TOO: AdminFabricIndex: 2 + [1658327551.622480][4295:4300] CHIP:TOO: } disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_ACT_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ACT_1_1.yaml index 43556debfb33ca..29d85932b5e9ce 100644 --- a/src/app/tests/suites/certification/Test_TC_ACT_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACT_1_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -42,33 +42,33 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" - PICS: ACT.S.A0002 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [0, 1, 2] + contains: [0, 1] - - label: "Read the global attribute: AttributeList" - PICS: " !ACT.S.A0002 " + - label: "Read the optional attribute(SetupURL) in AttributeList" + PICS: ACT.S.A0002 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [0, 1] + contains: [0, 1, 2] + # Checking only type check all attributes are optional - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" response: - value: [] constraints: type: list + maxLength: 11 - label: "Read the global attribute: GeneratedCommandList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_ALOGIN_1_12.yaml b/src/app/tests/suites/certification/Test_TC_ALOGIN_1_12.yaml index 14fc3be363f2a6..a5ab639f85d669 100644 --- a/src/app/tests/suites/certification/Test_TC_ALOGIN_1_12.yaml +++ b/src/app/tests/suites/certification/Test_TC_ALOGIN_1_12.yaml @@ -36,7 +36,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -44,7 +44,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_APBSC_1_10.yaml b/src/app/tests/suites/certification/Test_TC_APBSC_1_10.yaml index bb20164b81e8a7..e6b473d7bfe496 100644 --- a/src/app/tests/suites/certification/Test_TC_APBSC_1_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_APBSC_1_10.yaml @@ -36,7 +36,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read FeatureMap attribute from the DUT" command: "readAttribute" @@ -44,10 +44,9 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" - PICS: APBSC.S.A0000 && APBSC.S.A0001 && APBSC.S.A0003 command: "readAttribute" attribute: "AttributeList" response: @@ -55,6 +54,33 @@ tests: type: list contains: [2, 4, 5, 6, 7, 65528, 65529, 65531, 65532, 65533] + - label: "Read the optional attribute(VendorName) in AttributeList" + PICS: APBSC.S.A0000 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0] + + - label: "Read the optional attribute(VendorID) in AttributeList" + PICS: APBSC.S.A0001 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [1] + + - label: "Read the optional attribute(ProductID) in AttributeList" + PICS: APBSC.S.A0003 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [3] + - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" diff --git a/src/app/tests/suites/certification/Test_TC_APBSC_9_1.yaml b/src/app/tests/suites/certification/Test_TC_APBSC_9_1.yaml index 41fe02b98672e5..73ac569a6c095a 100644 --- a/src/app/tests/suites/certification/Test_TC_APBSC_9_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_APBSC_9_1.yaml @@ -34,7 +34,7 @@ tests: attribute: "VendorName" response: constraints: - type: string + type: char_string maxLength: 32 - label: "Reads the VendorID attribute" @@ -43,7 +43,7 @@ tests: attribute: "VendorID" response: constraints: - type: vendor-id + type: vendor_id saveAs: vendorID - label: "Reads the ApplicationName attribute" @@ -52,7 +52,7 @@ tests: attribute: "ApplicationName" response: constraints: - type: string + type: char_string maxLength: 256 - label: "Reads the ProductID attribute" @@ -61,7 +61,7 @@ tests: attribute: "ProductID" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -71,7 +71,7 @@ tests: attribute: "Application" response: constraints: - type: struct + type: ApplicationBasicApplication - label: "Reads the Status attribute" PICS: APBSC.S.A0005 @@ -88,7 +88,7 @@ tests: attribute: "ApplicationVersion" response: constraints: - type: string + type: char_string maxLength: 32 - label: "Reads the AllowedVendorList attribute" diff --git a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_1_3.yaml b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_1_3.yaml index 6cb7e4f38a6cbb..7b9eecd1ced204 100644 --- a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_1_3.yaml @@ -36,7 +36,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" PICS: APPLAUNCHER.S.AP @@ -45,7 +45,7 @@ tests: response: value: 1 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: FeatureMap" PICS: " !APPLAUNCHER.S.AP " @@ -54,10 +54,9 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" - PICS: APPLAUNCHER.S.A0000 && APPLAUNCHER.S.A0001 command: "readAttribute" attribute: "AttributeList" response: diff --git a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_7.yaml b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_7.yaml index fd6c9337b31c20..88ebf1183b5d55 100644 --- a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_7.yaml @@ -19,10 +19,10 @@ config: cluster: "Application Launcher" endpoint: 1 catalogVendorId: - type: INT16U + type: int16u defaultValue: 123 applicationId: - type: CHAR_STRING + type: char_string defaultValue: "exampleid" tests: diff --git a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8.yaml b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8.yaml index caa412e0171b04..cff97c0e92b2b3 100644 --- a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8.yaml @@ -19,10 +19,10 @@ config: cluster: "Application Launcher" endpoint: 1 catalogVendorId: - type: INT16U + type: int16u defaultValue: 123 applicationId: - type: CHAR_STRING + type: char_string defaultValue: "exampleid" tests: diff --git a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9.yaml b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9.yaml index 08b966f0e45e31..c233063ad86216 100644 --- a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9.yaml @@ -19,10 +19,10 @@ config: cluster: "Application Launcher" endpoint: 1 catalogVendorId: - type: INT16U + type: int16u defaultValue: 123 applicationId: - type: CHAR_STRING + type: char_string defaultValue: "exampleid" tests: diff --git a/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_1_8.yaml b/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_1_8.yaml index f59c26a9caff9c..d3fef20d04f878 100644 --- a/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_1_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_1_8.yaml @@ -36,14 +36,14 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" attribute: "FeatureMap" response: constraints: - type: map32 + type: bitmap32 minValue: 0 maxValue: 3 diff --git a/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_7_1.yaml b/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_7_1.yaml index ebc17cc9dbc7f2..f43a7c27fb1103 100644 --- a/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_7_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_7_1.yaml @@ -34,7 +34,7 @@ tests: attribute: "OutputList" response: constraints: - type: OutPutInfo + type: list - label: "Sends a SelectAudioOutput command" PICS: AUDIOOUTPUT.S.C0000 diff --git a/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_7_2.yaml b/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_7_2.yaml index 43acc9f3ce66a9..258970c1ad8d50 100644 --- a/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_7_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_7_2.yaml @@ -35,7 +35,7 @@ tests: response: saveAs: audioOutputListValues constraints: - type: OutPutInfo + type: list - label: "Sends a RenameOutput command" PICS: AUDIOOUTPUT.S.C0001 diff --git a/src/app/tests/suites/certification/Test_TC_BIND_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BIND_1_1.yaml index 5ee85e3d7f9981..5e8a9fe31a9c1b 100644 --- a/src/app/tests/suites/certification/Test_TC_BIND_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BIND_1_1.yaml @@ -13,7 +13,7 @@ # 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: 117.1.1. [TC-BIND-1.1] Global Attributes [DUT-Controller] +name: 118.1.1. [TC-BIND-1.1] Global Attributes [DUT-Controllee] config: nodeId: 0x12344321 @@ -30,14 +30,17 @@ tests: verification: | ./chip-tool binding read cluster-revision 1 0 + On TH, verify DUT responsds ClusterRevision attribute as the value 1 + [1649417989.863435][3040:3045] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001E Attribute 0x0000_FFFD DataVersion: 1411817517 [1649417989.863557][3040:3045] CHIP:TOO: ClusterRevision: 1 - [1649417989.863691][3040:3045] CHIP:EM: Sending Standalone Ack for MessageCounter:2888019 on exchange 4263i disabled: true - label: "TH1 reads the FeatureMap from DUT" verification: | - ./chip-tool binding read feature-map 1 0 + ./chip-tool binding read feature-map 1 0 + + Verify on the TH Log: [1653560808.265422][3439:3444] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001E Attribute 0x0000_FFFC DataVersion: 2519252823 [1653560808.265507][3439:3444] CHIP:TOO: FeatureMap: 0 @@ -47,6 +50,8 @@ tests: verification: | ./chip-tool binding read attribute-list 1 0 + Verify on the TH Log: + [1653560826.815841][3445:3450] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001E Attribute 0x0000_FFFB DataVersion: 2519252823 [1653560826.816170][3445:3450] CHIP:TOO: AttributeList: 6 entries [1653560826.816239][3445:3450] CHIP:TOO: [1]: 0 @@ -59,13 +64,15 @@ tests: - label: "TH1 reads EventList from DUT" verification: | - No Event-list is on attributes list + Out of scope for V1.0 disabled: true - label: "TH1 reads AcceptedCommandList from DUT" verification: | ./chip-tool binding read accepted-command-list 1 0 + Verify on the TH Log: + [1653560851.890988][3451:3456] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001E Attribute 0x0000_FFF9 DataVersion: 2519252823 [1653560851.891077][3451:3456] CHIP:TOO: AcceptedCommandList: 0 entries disabled: true @@ -74,6 +81,8 @@ tests: verification: | ./chip-tool binding read generated-command-list 1 0 - [1653560872.884952][3458:3463] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001E Attribute 0x0000_FFF8 DataVersion: 2519252823 - [1653560872.885073][3458:3463] CHIP:TOO: GeneratedCommandList: 0 entries + Verify on the TH Log: + + [1653560872.884952][3458:3463] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001E Attribute 0x0000_FFF8 DataVersion: 2519252823 + [1653560872.885073][3458:3463] CHIP:TOO: GeneratedCommandList: 0 entries disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_BIND_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BIND_2_1.yaml index 6c20a583032e76..8189aedcfcc2a3 100644 --- a/src/app/tests/suites/certification/Test_TC_BIND_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BIND_2_1.yaml @@ -23,22 +23,100 @@ config: tests: - label: "Factory Reset DUT" verification: | - + Vendor specific action, for chip-tool run + rm -rf /tmp/chip* disabled: true - label: "Commission DUT to TH1s fabric" verification: | + ./chip-tool pairing ble-wifi 1 chipsetup4 matter123 20202021 3840 + + + + ./chip-tool pairing open-commissioning-window 1 1 400 1000 3840 + + MessageCounter:141758774 from RetransTable on exchange 63698i + [1657796688.322878][3738:3743] CHIP:DMG: ICR moving to [ResponseRe] + [1657796688.322964][3738:3743] CHIP:DMG: InvokeResponseMessage = + [1657796688.323016][3738:3743] CHIP:DMG: { + [1657796688.323066][3738:3743] CHIP:DMG: suppressResponse = false, + [1657796688.323118][3738:3743] CHIP:DMG: InvokeResponseIBs = + [1657796688.323180][3738:3743] CHIP:DMG: [ + [1657796688.323231][3738:3743] CHIP:DMG: InvokeResponseIB = + [1657796688.323299][3738:3743] CHIP:DMG: { + [1657796688.323353][3738:3743] CHIP:DMG: CommandStatusIB = + [1657796688.323418][3738:3743] CHIP:DMG: { + [1657796688.323480][3738:3743] CHIP:DMG: CommandPathIB = + [1657796688.323549][3738:3743] CHIP:DMG: { + [1657796688.323627][3738:3743] CHIP:DMG: EndpointId = 0x0, + [1657796688.323704][3738:3743] CHIP:DMG: ClusterId = 0x3c, + [1657796688.323776][3738:3743] CHIP:DMG: CommandId = 0x0, + [1657796688.323845][3738:3743] CHIP:DMG: }, + [1657796688.323920][3738:3743] CHIP:DMG: + [1657796688.323982][3738:3743] CHIP:DMG: StatusIB = + [1657796688.324052][3738:3743] CHIP:DMG: { + [1657796688.324174][3738:3743] CHIP:DMG: status = 0x00 (SUCCESS), + [1657796688.324246][3738:3743] CHIP:DMG: }, + [1657796688.324314][3738:3743] CHIP:DMG: + [1657796688.324375][3738:3743] CHIP:DMG: }, + [1657796688.324451][3738:3743] CHIP:DMG: + [1657796688.324509][3738:3743] CHIP:DMG: }, + [1657796688.324572][3738:3743] CHIP:DMG: + [1657796688.324623][3738:3743] CHIP:DMG: ], + [1657796688.324684][3738:3743] CHIP:DMG: + [1657796688.324734][3738:3743] CHIP:DMG: InteractionModelRevision = 1 + [1657796688.324783][3738:3743] CHIP:DMG: }, + [1657796688.324897][3738:3743] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 + [1657796688.324956][3738:3743] CHIP:CTL: Successfully opened pairing window on the device + [1657796688.325135][3738:3743] CHIP:CTL: Manual pairing code: [35297957587] + [1657796688.325206][3738:3743] CHIP:CTL: SetupQRCode: [MT:-24J0AFN00GARZ0T.10] + [1657796688.325289][3738:3743] CHIP:DMG: ICR moving to [AwaitingDe] disabled: true - label: "Commission TH2 to TH1s fabric (Node ID = 2)" verification: | + ./chip-tool pairing code 2 35297957587 + [1657796711.261433][1364:1369] CHIP:DMG: { + [1657796711.261488][1364:1369] CHIP:DMG: suppressResponse = false, + [1657796711.261549][1364:1369] CHIP:DMG: InvokeResponseIBs = + [1657796711.261623][1364:1369] CHIP:DMG: [ + [1657796711.261683][1364:1369] CHIP:DMG: InvokeResponseIB = + [1657796711.261760][1364:1369] CHIP:DMG: { + [1657796711.261823][1364:1369] CHIP:DMG: CommandDataIB = + [1657796711.261899][1364:1369] CHIP:DMG: { + [1657796711.261969][1364:1369] CHIP:DMG: CommandPathIB = + [1657796711.262051][1364:1369] CHIP:DMG: { + [1657796711.262133][1364:1369] CHIP:DMG: EndpointId = 0x0, + [1657796711.262217][1364:1369] CHIP:DMG: ClusterId = 0x3e, + [1657796711.262308][1364:1369] CHIP:DMG: CommandId = 0x8, + [1657796711.262387][1364:1369] CHIP:DMG: }, + [1657796711.262469][1364:1369] CHIP:DMG: + [1657796711.262535][1364:1369] CHIP:DMG: CommandFields = + [1657796711.262609][1364:1369] CHIP:DMG: { + [1657796711.262689][1364:1369] CHIP:DMG: 0x0 = 0, + [1657796711.262761][1364:1369] CHIP:DMG: 0x1 = 2, + [1657796711.262869][1364:1369] CHIP:DMG: }, + [1657796711.262935][1364:1369] CHIP:DMG: }, + [1657796711.263003][1364:1369] CHIP:DMG: + [1657796711.263060][1364:1369] CHIP:DMG: }, + [1657796711.263124][1364:1369] CHIP:DMG: + [1657796711.263173][1364:1369] CHIP:DMG: ], + [1657796711.263236][1364:1369] CHIP:DMG: + [1657796711.263287][1364:1369] CHIP:DMG: InteractionModelRevision = 1 + [1657796711.263336][1364:1369] CHIP:DMG: }, + [1657796711.263456][1364:1369] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 + [1657796711.263527][1364:1369] CHIP:CTL: Device returned status 0 on receiving the NOC + [1657796711.263576][1364:1369] CHIP:CTL: Operational credentials provisioned on device 0xffff7400ceb0 + [1657796711.263624][1364:1369] CHIP:TOO: Secure Pairing Success + [1657796711.263665][1364:1369] CHIP:TOO: CASE establishment successful + [1657796711.263716][1364:1369] CHIP:CTL: Successfully finished commissioning step 'SendNOC' disabled: true - label: "Commission TH3 to TH1s fabric (Node ID = 3)" verification: | - + ./chip-tool pairing code 3 35468051682 disabled: true - label: @@ -47,7 +125,24 @@ tests: Entry 2: Node = 3 Cluster = 0x0006(onoff) Endpoint = 2 Note: Node 2 corresponds to TH2s Node ID Node 3 corresponds to TH3s Node ID" verification: | + ./chip-tool binding write binding '[{"node" : 2 , "cluster" : "0x0006" , "endpoint" : 1 }, { "node" : 3 , "cluster" : "0x0006" , "endpoint" : 2 }]' 1 0 + + + + [1657797710.456056][3796:3801] CHIP:DMG: status = 0x00 (SUCCESS), + MG: status = 0x00 (SUCCESS), + [1657797710.457093][3796:3801] CHIP:DMG: }, + [1657797710.457171][3796:3801] CHIP:DMG: + [1657797710.457232][3796:3801] CHIP:DMG: }, + [1657797710.457318][3796:3801] CHIP:DMG: + [1 StatusIB = + [1657797710.458209][3796:3801] CHIP:DMG: { + [1657797710.458286][3796:3801] CHIP:DMG: status = 0x00 (SUCCESS), + [1657797710.458369][3796:3801] CHIP:DMG: }, + [1657797710.458444][3796:3801] CHIP:DMG: + pted msg 0xffff7e7cd9d8 with MessageCounter:161235290 to 0x0000000000000001 (1) at monotonic time: 000000000071D1BB msec + [1657797710.459711][3796:3801] CHIP:EM: Flushed pending ack for MessageCounter:23683634 on exchange 26818i disabled: true - label: "TH1 enables DUT as Controller" @@ -58,34 +153,116 @@ tests: - label: "DUT is triggered to send On command to its binding node entries" PICS: OO.C.C01.Tx verification: | - TH2 receives On command(Endpoint 1) TH3 receives On command(Endpoint 2) + ./chip-tool onoff on 1 1 + + [1657798258.634672][1444:1449] CHIP:DMG: { + [1657798258.634719][1444:1449] CHIP:DMG: status = 0x00 (SUCCESS), + [1657798258.634771][1444:1449] CHIP:DMG: }, + + [1657798258.635250][1444:1449] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0006 Command=0x0000_0001 Status=0x0 + + + ./chip-tool onoff on 1 2 + + [1657798258.634719][1444:1449] CHIP:DMG: status = 0x00 (SUCCESS), disabled: true - label: "TH1 reads OnOff attribute from TH2 (Endpoint 1)" PICS: OO.C.C01.Tx verification: | - Verify that the value is set to On + ./chip-tool onoff read on-off 1 1 + + [1657798291.396477][3835:3841] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 4260513117 + [1657798291.396514][3835:3841] CHIP:TOO: OnOff: TRUE + + ./chip-tool onoff read on-off 1 2 + + [1657798691.194894][3869:3874] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 470320746 + [1657798691.194948][3869:3874] CHIP:TOO: OnOff: TRUE disabled: true - label: "TH1 removes second binding entry corresponding to TH3 from DUT" verification: | + ./chip-tool binding write binding '[{"node" : 2 , "cluster" : "0x0006" , "endpoint" : 1 }]' 1 0 + [1657800844.739833][4000:4006] CHIP:EM: Removed CHIP MessageCounter:244702117 from RetransTable on exchange 12653i + [1657800844.739867][4000:4006] CHIP:DMG: WriteClient moving to [ResponseRe] + [1657800844.739922][4000:4006] CHIP:DMG: WriteResponseMessage = + [1657800844.739949][4000:4006] CHIP:DMG: { + [1657800844.739990][4000:4006] CHIP:DMG: AttributeStatusIBs = + [1657800844.740021][4000:4006] CHIP:DMG: [ + [1657800844.740057][4000:4006] CHIP:DMG: AttributeStatusIB = + [1657800844.740111][4000:4006] CHIP:DMG: { + [1657800844.740150][4000:4006] CHIP:DMG: AttributePathIB = + [1657800844.740195][4000:4006] CHIP:DMG: { + [1657800844.740230][4000:4006] CHIP:DMG: Endpoint = 0x0, + [1657800844.740275][4000:4006] CHIP:DMG: Cluster = 0x1e, + [1657800844.740322][4000:4006] CHIP:DMG: Attribute = 0x0000_0000, + [1657800844.740359][4000:4006] CHIP:DMG: } + [1657800844.740405][4000:4006] CHIP:DMG: + [1657800844.740444][4000:4006] CHIP:DMG: StatusIB = + [1657800844.740477][4000:4006] CHIP:DMG: { + [1657800844.740516][4000:4006] CHIP:DMG: status = 0x00 (SUCCESS), + [1657800844.740548][4000:4006] CHIP:DMG: }, + [1657800844.740584][4000:4006] CHIP:DMG: + [1657800844.740607][4000:4006] CHIP:DMG: }, + [1657800844.740653][4000:4006] CHIP:DMG: + [1657800844.740687][4000:4006] CHIP:DMG: AttributeStatusIB = + [1657800844.740714][4000:4006] CHIP:DMG: { + [1657800844.740748][4000:4006] CHIP:DMG: AttributePathIB = + [1657800844.740781][4000:4006] CHIP:DMG: { + [1657800844.740820][4000:4006] CHIP:DMG: Endpoint = 0x0, + [1657800844.740858][4000:4006] CHIP:DMG: Cluster = 0x1e, + [1657800844.740905][4000:4006] CHIP:DMG: Attribute = 0x0000_0000, + [1657800844.740946][4000:4006] CHIP:DMG: ListIndex = Null, + [1657800844.740981][4000:4006] CHIP:DMG: } + [1657800844.741025][4000:4006] CHIP:DMG: + [1657800844.741063][4000:4006] CHIP:DMG: StatusIB = + [1657800844.741094][4000:4006] CHIP:DMG: { + [1657800844.741133][4000:4006] CHIP:DMG: status = 0x00 (SUCCESS), + [1657800844.741168][4000:4006] CHIP:DMG: }, + [1657800844.741208][4000:4006] CHIP:DMG: + [1657800844.741241][4000:4006] CHIP:DMG: }, + [1657800844.741272][4000:4006] CHIP:DMG: + [1657800844.741295][4000:4006] CHIP:DMG: ], + [1657800844.741336][4000:4006] CHIP:DMG: + [1657800844.741369][4000:4006] CHIP:DMG: InteractionModelRevision = 1 + [1657800844.741392][4000:4006] CHIP:DMG: } + [1657800844.741511][4000:4006] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1657800844.741591][4000:4006] CHIP:EM: Sending Standalone Ack for MessageCounter:142199059 on exchange 12653i disabled: true - label: "DUT is triggered to send off command to its binding entries" PICS: OO.C.C00.Tx verification: | - TH2 receives off command (Endpoint 1) TH3 does not receive off command (Endpoint 2) + ./chip-tool onoff off 1 1 + + [1657800932.012989][1497:1502] CHIP:DMG: StatusIB = + [1657800932.013027][1497:1502] CHIP:DMG: { + [1657800932.013063][1497:1502] CHIP:DMG: status = 0x00 (SUCCESS), + [1657800932.013102][1497:1502] CHIP:DMG: }, + + + ./chip-tool onoff off 1 2 disabled: true - label: "TH1 reads OnOff attribute from TH2 (Endpoint 1)" PICS: OO.C.C00.Tx verification: | - Verify that the value is set to Off + ./chip-tool onoff read on-off 1 1 + + + [1657803168.769564][4272:4277] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 1968648540 + + [1657803168.769598][4272:4277] CHIP:TOO: OnOff: FALSE disabled: true - label: "TH1 reads OnOff attribute from TH3 (Endpoint 2)" PICS: OO.C.C01.Tx verification: | - Verify that the value is set to On + ./chip-tool onoff read on-off 1 2 + + [1657803609.731464][4333:4339] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 3914456390 + + [1657803609.731521][4333:4339] CHIP:TOO: OnOff: TRUE disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_BIND_2_2.yaml b/src/app/tests/suites/certification/Test_TC_BIND_2_2.yaml index d84ec28c3e5ba6..b3d5f8a26322a5 100644 --- a/src/app/tests/suites/certification/Test_TC_BIND_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_BIND_2_2.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 117.2.2. [TC-BIND-2.2] Binding Cluster Attributes-DUT handles its Groups + 118.2.2. [TC-BIND-2.2] Binding Cluster Attributes-DUT handles its Groups settings [DUT-Controller] config: @@ -25,29 +25,59 @@ config: tests: - label: "Factory Reset DUT" verification: | - + Vendor specific action, for chip-tool run + rm -rf /tmp/chip* disabled: true - label: "Commission DUT to TH1s fabric" verification: | - + ./chip-tool pairing ble-wifi 1 chipsetup4 matter123 20202021 3840 disabled: true - label: "TH1 enables DUT as Controller" verification: | + ./chip-tool pairing open-commissioning-window 1 1 400 1000 3840 + + [1657716927.940140][4326:4331] CHIP:DMG: + [1657716927.940201][4326:4331] CHIP:DMG: StatusIB = + [1657716927.940275][4326:4331] CHIP:DMG: { + [1657716927.940344][4326:4331] CHIP:DMG: status = 0x00 (SUCCESS), + [1657716927.940411][4326:4331] CHIP:DMG: }, + [1657716927.940478][4326:4331] CHIP:DMG: + [1657716927.940537][4326:4331] CHIP:DMG: }, + [1657716927.940605][4326:4331] CHIP:DMG: + [1657716927.940658][4326:4331] CHIP:DMG: }, + [1657716927.940721][4326:4331] CHIP:DMG: + [1657716927.940771][4326:4331] CHIP:DMG: ], + [1657716927.940832][4326:4331] CHIP:DMG: + [1657716927.940882][4326:4331] CHIP:DMG: InteractionModelRevision = 1 + [1657716927.940931][4326:4331] CHIP:DMG: }, + [1657716927.941044][4326:4331] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 + [1657716927.941099][4326:4331] CHIP:CTL: Successfully opened pairing window on the device + [1657716927.941205][4326:4331] CHIP:CTL: Manual pairing code: [36299144405] + [1657716927.941270][4326:4331] CHIP:CTL: SetupQRCode: [MT:-24J0IRV01-85F3GK10] + [1657716927.941345][4326:4331] CHIP:DMG: ICR moving to [AwaitingDe] + [1657716927.941403][4326:4331] CHIP:EM: Sending Standalone Ack for MessageCount disabled: true - label: "Commission TH2 to TH1s fabric (Node ID = 2)" verification: | + ./chip-tool pairing code 2 36299144405 + [1657716992.250570][3330:3336] CHIP:CTL: Received CommissioningComplete response, errorCode=0 + [1657716992.250614][3330:3336] CHIP:CTL: Successfully finished commissioning step 'SendComplete' + [1657716992.250650][3330:3336] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' + [1657716992.250690][3330:3336] CHIP:CTL: Performing next commissioning step 'Cleanup' + [1657716992.250769][3330:3336] CHIP:CTL: Successfully finished commissioning step 'Cleanup' + [1657716992.250812][3330:3336] CHIP:TOO: Device commissioning completed with success disabled: true - label: "DUT generates fabric-unique GroupID, GroupName, random key, EpochKey0 and GroupKeySetID." verification: | - ./chip-tool groupkeymanagement key-set-read 42 1 0 + As Admin generates it is not necessary to verify disabled: true - label: @@ -59,7 +89,42 @@ tests: "groupKeySecurityPolicy": 0, "epochKey0": "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": - "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 + "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 2 0 + + + + + [1657717291.809861][3361:3366] CHIP:DMG: ICR moving to [ResponseRe] + [1657717291.809913][3361:3366] CHIP:DMG: InvokeResponseMessage = + [1657717291.809939][3361:3366] CHIP:DMG: { + [1657717291.809965][3361:3366] CHIP:DMG: suppressResponse = false, + [1657717291.809992][3361:3366] CHIP:DMG: InvokeResponseIBs = + [1657717291.810025][3361:3366] CHIP:DMG: [ + [1657717291.810051][3361:3366] CHIP:DMG: InvokeResponseIB = + [1657717291.810088][3361:3366] CHIP:DMG: { + [1657717291.810115][3361:3366] CHIP:DMG: CommandStatusIB = + [1657717291.810149][3361:3366] CHIP:DMG: { + [1657717291.810179][3361:3366] CHIP:DMG: CommandPathIB = + [1657717291.810215][3361:3366] CHIP:DMG: { + [1657717291.810252][3361:3366] CHIP:DMG: EndpointId = 0x0, + [1657717291.810290][3361:3366] CHIP:DMG: ClusterId = 0x3f, + [1657717291.810326][3361:3366] CHIP:DMG: CommandId = 0x0, + [1657717291.810364][3361:3366] CHIP:DMG: }, + [1657717291.810403][3361:3366] CHIP:DMG: + [1657717291.810435][3361:3366] CHIP:DMG: StatusIB = + [1657717291.810470][3361:3366] CHIP:DMG: { + [1657717291.810507][3361:3366] CHIP:DMG: status = 0x00 (SUCCESS), + [1657717291.810540][3361:3366] CHIP:DMG: }, + [1657717291.810575][3361:3366] CHIP:DMG: + [1657717291.810606][3361:3366] CHIP:DMG: }, + [1657717291.810641][3361:3366] CHIP:DMG: + [1657717291.810668][3361:3366] CHIP:DMG: }, + [1657717291.810700][3361:3366] CHIP:DMG: + [1657717291.810725][3361:3366] CHIP:DMG: ], + [1657717291.810757][3361:3366] CHIP:DMG: + [1657717291.810782][3361:3366] CHIP:DMG: InteractionModelRevision = 1 + [1657717291.810807][3361:3366] CHIP:DMG: }, + [1657717291.810869][3361:3366] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003F Command=0x0000_0000 Status=0x0 disabled: true - label: @@ -67,7 +132,14 @@ tests: Endpoint 1." PICS: G.C.C00.Tx verification: | - ./chip-tool groups add-group 0x0001 grp1 1 1 + ./chip-tool groups add-group 0x0001 grp1 2 1 + + [1657717342.599740][3368:3373] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0000 + [1657717342.599891][3368:3373] CHIP:TOO: AddGroupResponse: { + [1657717342.599959][3368:3373] CHIP:TOO: status: 0 + [1657717342.600007][3368:3373] CHIP:TOO: groupId: 1 + [1657717342.600054][3368:3373] CHIP:TOO: } + [1657717342.600130][3368:3373] CHIP:DMG: ICR moving t disabled: true - label: @@ -75,14 +147,43 @@ tests: list on GroupKeyManagement cluster to TH2 on Endpoint 0" PICS: GRPKEY.C.A0000 verification: | - ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 1, "groupKeySetID": 42, "fabricIndex": 1}]' 1 0 + ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 1, "groupKeySetID": 42, "fabricIndex": 1}]' 2 0 + + StatusIB = + { + status = 0x00 (SUCCESS), + } + + ./chip-tool groupsettings add-group grp1 0x0001 + + ./chip-tool groupsettings add-keysets 0x0042 0 0x000000000021dfe0 hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf + + ./chip-tool groupsettings bind-keyset 0x0001 0x0042 + + ./chip-tool groupsettings show-groups + + +-------------------------------------------------------------------------------------+ + | Available Groups : | + +-------------------------------------------------------------------------------------+ + | Group Id | KeySet Id | Group Name | + | 0x101 0x1a1 Group #1 | + | 0x102 0x1a2 Group #2 | + | 0x1 0x42 grp1 | + +-------------------------------------------------------------------------------------+" disabled: true - label: "TH1 writes Binding entry into DUT with Entry 1: Group = The Group ID in the AddGroup command sent from DUT to TH2" verification: | - ./chip-tool binding write binding '[{"Group" : 0x0001 }]' 1 0 + ./chip-tool binding write binding '[{"group" : "0x0001"}]' 1 0 + + + [1657717436.184899][4353:4358] CHIP:DMG: StatusIB = + [1657717436.184940][4353:4358] CHIP:DMG: { + [1657717436.184981][4353:4358] CHIP:DMG: status = 0x00 (SUCCESS), + [1657717436.185022][4353:4358] CHIP:DMG: }, + [1657717436.185062][4353:4358] CHIP:DMG: disabled: true - label: @@ -90,18 +191,141 @@ tests: entries" PICS: OO.C.C01.Tx verification: | - ./chip-tool onoff on 0x0001 1 + ./chip-tool onoff on 0xffffffffffff0001 1 + + 1657717627.565673][3417:3422] CHIP:TOO: Sending command to group 0x1 + [1657717627.565718][3417:3422] CHIP:TOO: Sending cluster (0x00000006) command (0x00000001) on Group 1 disabled: true - label: "TH1 reads OnOff attribute from TH2 (Endpoint 1)" PICS: OO.C.C01.Tx verification: | ./chip-tool onoff read on-off 1 1 + + [1657717900.832851][4381:4386] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 1558029216 + [1657717900.832890][4381:4386] CHIP:TOO: OnOff: TRUE disabled: true - label: "TH1 removes all the binding entries from DUT" verification: | - ./chip-tool binding write binding [] 1 0 + ./chip-tool groupsettings unbind-keyset 0x0001 0x0042 + + + [1657804100.222346][1483:1483] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_kvs + [1657804100.222880][1483:1483] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_factory.ini + [1657804100.223041][1483:1483] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_config.ini + [1657804100.223149][1483:1483] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_counters.ini + [1657804100.223500][1483:1483] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-mlceY7) + [1657804100.224151][1483:1483] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) + [1657804100.224208][1483:1483] CHIP:DL: NVS set: chip-counters/reboot-count = 16 (0x10) + [1657804100.224925][1483:1483] CHIP:DL: Got Ethernet interface: eth0 + [1657804100.225323][1483:1483] CHIP:DL: Found the primary Ethernet interface:eth0 + [1657804100.225720][1483:1483] CHIP:DL: Got WiFi interface: wlan0 + [1657804100.225791][1483:1483] CHIP:DL: Failed to reset WiFi statistic counts + [1657804100.225873][1483:1483] CHIP:IN: UDP::Init bind&listen port=0 + [1657804100.226005][1483:1483] CHIP:IN: UDP::Init bound to port=43367 + [1657804100.226030][1483:1483] CHIP:IN: BLEBase::Init - setting/overriding transport + [1657804100.226052][1483:1483] CHIP:IN: TransportMgr initialized + [1657804100.226085][1483:1483] CHIP:FP: Initializing FabricTable from persistent storage + [1657804100.226331][1483:1483] CHIP:TS: Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.226953][1483:1483] CHIP:FP: Fabric index 0x1 was retrieved from storage. Compressed FabricId 0xAF5C7831F3704268, FabricId 0x0000000000000001, NodeId 0x000000000001B669, VendorId 0xFFF1 + [1657804100.227380][1483:1483] CHIP:FP: Fabric index 0x2 was retrieved from storage. Compressed FabricId 0x756CE95FCDF96118, FabricId 0x0000000000000002, NodeId 0x000000000001B669, VendorId 0xFFF1 + [1657804100.227789][1483:1483] CHIP:FP: Fabric index 0x3 was retrieved from storage. Compressed FabricId 0xCCD838643BEE9065, FabricId 0x0000000000000003, NodeId 0x000000000001B669, VendorId 0xFFF1 + [1657804100.230946][1483:1483] CHIP:ZCL: Using ZAP configuration... + [1657804100.235033][1483:1483] CHIP:DL: Avahi client registered + [1657804100.236263][1483:1483] CHIP:CTL: System State Initialized... + [1657804100.236328][1483:1483] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657804100.236364][1483:1483] CHIP:CTL: Setting attestation nonce to random value + [1657804100.236412][1483:1483] CHIP:CTL: Setting CSR nonce to random value + [1657804100.236485][1483:1483] CHIP:IN: UDP::Init bind&listen port=5550 + [1657804100.236621][1483:1483] CHIP:IN: UDP::Init bound to port=5550 + [1657804100.236646][1483:1483] CHIP:IN: TransportMgr initialized + [1657804100.236733][1483:1483] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657804100.236763][1483:1483] CHIP:CTL: Setting attestation nonce to random value + [1657804100.236811][1483:1483] CHIP:CTL: Setting CSR nonce to random value + [1657804100.239619][1483:1483] CHIP:CTL: Generating NOC + [1657804100.240796][1483:1483] CHIP:FP: Validating NOC chain + [1657804100.242766][1483:1483] CHIP:FP: NOC chain validation successful + [1657804100.242960][1483:1483] CHIP:FP: Updated fabric at index: 0x1, Node ID: 0x000000000001B669 + [1657804100.243000][1483:1483] CHIP:TS: Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.243029][1483:1483] CHIP:TS: New proposed Last Known Good Time: 2021-01-01T00:00:00 + [1657804100.243055][1483:1483] CHIP:TS: Retaining current Last Known Good Time + [1657804100.246677][1483:1483] CHIP:FP: Metadata for Fabric 0x1 persisted to storage. + [1657804100.250025][1483:1483] CHIP:TS: Committing Last Known Good Time to storage: 2022-07-13T12:47:52 + [1657804100.253538][1483:1483] CHIP:CTL: Joined the fabric at index 1. Compressed fabric ID is: 0x0000000000000000 + [1657804100.253600][1483:1483] CHIP:IN: UDP::Init bind&listen port=5550 + [1657804100.253724][1483:1483] CHIP:IN: UDP::Init bound to port=5550 + [1657804100.253751][1483:1483] CHIP:IN: TransportMgr initialized + [1657804100.253834][1483:1483] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657804100.253872][1483:1483] CHIP:CTL: Setting attestation nonce to random value + [1657804100.253934][1483:1483] CHIP:CTL: Setting CSR nonce to random value + [1657804100.254935][1483:1483] CHIP:CTL: Generating NOC + [1657804100.256071][1483:1483] CHIP:FP: Validating NOC chain + [1657804100.257762][1483:1483] CHIP:FP: NOC chain validation successful + [1657804100.257921][1483:1483] CHIP:FP: Updated fabric at index: 0x2, Node ID: 0x000000000001B669 + [1657804100.257955][1483:1483] CHIP:TS: Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.257978][1483:1483] CHIP:TS: New proposed Last Known Good Time: 2021-01-01T00:00:00 + [1657804100.257998][1483:1483] CHIP:TS: Retaining current Last Known Good Time + [1657804100.260948][1483:1483] CHIP:FP: Metadata for Fabric 0x2 persisted to storage. + [1657804100.263784][1483:1483] CHIP:TS: Committing Last Known Good Time to storage: 2022-07-13T12:47:52 + [1657804100.266433][1483:1483] CHIP:CTL: Joined the fabric at index 2. Compressed fabric ID is: 0x0000000000000000 + [1657804100.266491][1483:1483] CHIP:IN: UDP::Init bind&listen port=5550 + [1657804100.266615][1483:1483] CHIP:IN: UDP::Init bound to port=5550 + [1657804100.266641][1483:1483] CHIP:IN: TransportMgr initialized + [1657804100.266727][1483:1483] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657804100.266766][1483:1483] CHIP:CTL: Setting attestation nonce to random value + [1657804100.266828][1483:1483] CHIP:CTL: Setting CSR nonce to random value + [1657804100.267811][1483:1483] CHIP:CTL: Generating NOC + [1657804100.268914][1483:1483] CHIP:FP: Validating NOC chain + [1657804100.270701][1483:1483] CHIP:FP: NOC chain validation successful + [1657804100.270859][1483:1483] CHIP:FP: Updated fabric at index: 0x3, Node ID: 0x000000000001B669 + [1657804100.270892][1483:1483] CHIP:TS: Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.270914][1483:1483] CHIP:TS: New proposed Last Known Good Time: 2021-01-01T00:00:00 + [1657804100.270935][1483:1483] CHIP:TS: Retaining current Last Known Good Time + [1657804100.273854][1483:1483] CHIP:FP: Metadata for Fabric 0x3 persisted to storage. + [1657804100.276610][1483:1483] CHIP:TS: Committing Last Known Good Time to storage: 2022-07-13T12:47:52 + [1657804100.279350][1483:1483] CHIP:CTL: Joined the fabric at index 3. Compressed fabric ID is: 0x0000000000000000 + [1657804100.279411][1483:1483] CHIP:IN: UDP::Init bind&listen port=5550 + [1657804100.279535][1483:1483] CHIP:IN: UDP::Init bound to port=5550 + [1657804100.279560][1483:1483] CHIP:IN: TransportMgr initialized + [1657804100.315695][1483:1488] CHIP:DL: CHIP task running + [1657804100.315921][1483:1488] CHIP:DL: HandlePlatformSpecificBLEEvent 32784 + [1657804100.321174][1483:1483] CHIP:CTL: Shutting down the commissioner + [1657804100.321268][1483:1483] CHIP:CTL: Shutting down the controller + [1657804100.321299][1483:1483] CHIP:CTL: Shutting down the commissioner + [1657804100.321348][1483:1483] CHIP:CTL: Shutting down the controller + [1657804100.321373][1483:1483] CHIP:IN: Expiring all sessions for fabric 0x1!! + [1657804100.321396][1483:1483] CHIP:FP: Forgetting fabric 0x1 + [1657804100.321429][1483:1483] CHIP:TS: Pending Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.321597][1483:1483] CHIP:TS: Previous Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.321622][1483:1483] CHIP:TS: Reverted Last Known Good Time to previous value + [1657804100.321661][1483:1483] CHIP:CTL: Shutting down the commissioner + [1657804100.321718][1483:1483] CHIP:CTL: Shutting down the controller + [1657804100.321819][1483:1483] CHIP:IN: Expiring all sessions for fabric 0x2!! + [1657804100.321849][1483:1483] CHIP:FP: Forgetting fabric 0x2 + [1657804100.321875][1483:1483] CHIP:TS: Pending Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.321998][1483:1483] CHIP:TS: Previous Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.322022][1483:1483] CHIP:TS: Reverted Last Known Good Time to previous value + [1657804100.322056][1483:1483] CHIP:CTL: Shutting down the commissioner + [1657804100.322113][1483:1483] CHIP:CTL: Shutting down the controller + [1657804100.322136][1483:1483] CHIP:IN: Expiring all sessions for fabric 0x3!! + [1657804100.322156][1483:1483] CHIP:FP: Forgetting fabric 0x3 + [1657804100.322179][1483:1483] CHIP:TS: Pending Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.322314][1483:1483] CHIP:TS: Previous Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.322339][1483:1483] CHIP:TS: Reverted Last Known Good Time to previous value + [1657804100.322367][1483:1483] CHIP:CTL: Shutting down the System State, this will teardown the CHIP Stack + [1657804100.323278][1483:1483] CHIP:DMG: IM WH moving to [Uninitialized] + [1657804100.323318][1483:1483] CHIP:DMG: IM WH moving to [Uninitialized] + [1657804100.323341][1483:1483] CHIP:DMG: IM WH moving to [Uninitialized] + [1657804100.323362][1483:1483] CHIP:DMG: IM WH moving to [Uninitialized] + [1657804100.323384][1483:1483] CHIP:DMG: All ReadHandler-s are clean, clear GlobalDirtySet + [1657804100.323455][1483:1483] CHIP:BLE: BleConnectionDelegate::CancelConnection is not implemented. + [1657804100.323744][1483:1483] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-wsLxnz) + [1657804100.324436][1483:1483] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) + [1657804100.324498][1483:1483] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) + [1657804100.324524][1483:1483] CHIP:DL: Inet Layer shutdown + [1657804100.324547][1483:1483] CHIP:DL: BLE shutdown + [1657804100.324569][1483:1483] CHIP:DL: System Layer shutdown disabled: true - label: @@ -109,11 +333,18 @@ tests: entries" PICS: OO.C.C00.Tx verification: | - ./chip-tool onoff on 0x0001 1 + ./chip-tool onoff off 0xffffffffffff0001 1 + + [1657718018.006875][3467:3472] CHIP:TOO: Sending command to group 0x1 + [1657718018.006899][3467:3472] CHIP:TOO: Sending cluster (0x00000006) command (0x00000000) on Group 1 + [1657718018.006949][3467:3472] CHIP:DMG: ICR moving to [AddingComm] disabled: true - label: "TH1 reads OnOff attribute from TH2 (Endpoint 1)" PICS: OO.C.C01.Tx verification: | ./chip-tool onoff read on-off 1 1 + + [1657718251.169765][4425:4431] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 1558029223 + [1657718251.169817][4425:4431] CHIP:TOO: OnOff: TRUE disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml b/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml index 0640a6570d9347..ae8c28d97da943 100644 --- a/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 117.2.3. [TC-BIND-2.3] Binding Cluster Attributes-TH1 enables DUT to handle + 118.2.3. [TC-BIND-2.3] Binding Cluster Attributes-TH1 enables DUT to handle its Group settings [DUT-Controller] config: @@ -25,29 +25,59 @@ config: tests: - label: "Factory Reset DUT" verification: | - + Vendor specific action, for chip-tool run + rm -rf /tmp/chip* disabled: true - label: "Commission DUT to TH1s fabric" verification: | - + ./chip-tool pairing ble-wifi 1 chipsetup4 matter123 20202021 3840 disabled: true - label: "TH1 enables DUT as Controller" verification: | + ./chip-tool pairing open-commissioning-window 1 1 400 1000 3840 + + [1657716927.940140][4326:4331] CHIP:DMG: + [1657716927.940201][4326:4331] CHIP:DMG: StatusIB = + [1657716927.940275][4326:4331] CHIP:DMG: { + [1657716927.940344][4326:4331] CHIP:DMG: status = 0x00 (SUCCESS), + [1657716927.940411][4326:4331] CHIP:DMG: }, + [1657716927.940478][4326:4331] CHIP:DMG: + [1657716927.940537][4326:4331] CHIP:DMG: }, + [1657716927.940605][4326:4331] CHIP:DMG: + [1657716927.940658][4326:4331] CHIP:DMG: }, + [1657716927.940721][4326:4331] CHIP:DMG: + [1657716927.940771][4326:4331] CHIP:DMG: ], + [1657716927.940832][4326:4331] CHIP:DMG: + [1657716927.940882][4326:4331] CHIP:DMG: InteractionModelRevision = 1 + [1657716927.940931][4326:4331] CHIP:DMG: }, + [1657716927.941044][4326:4331] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 + [1657716927.941099][4326:4331] CHIP:CTL: Successfully opened pairing window on the device + [1657716927.941205][4326:4331] CHIP:CTL: Manual pairing code: [36299144405] + [1657716927.941270][4326:4331] CHIP:CTL: SetupQRCode: [MT:-24J0IRV01-85F3GK10] + [1657716927.941345][4326:4331] CHIP:DMG: ICR moving to [AwaitingDe] + [1657716927.941403][4326:4331] CHIP:EM: Sending Standalone Ack for MessageCount disabled: true - label: "Commission TH2 to TH1s fabric (Node ID = 2)" verification: | + ./chip-tool pairing code 2 36299144405 + [1657716992.250570][3330:3336] CHIP:CTL: Received CommissioningComplete response, errorCode=0 + [1657716992.250614][3330:3336] CHIP:CTL: Successfully finished commissioning step 'SendComplete' + [1657716992.250650][3330:3336] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' + [1657716992.250690][3330:3336] CHIP:CTL: Performing next commissioning step 'Cleanup' + [1657716992.250769][3330:3336] CHIP:CTL: Successfully finished commissioning step 'Cleanup' + [1657716992.250812][3330:3336] CHIP:TOO: Device commissioning completed with success disabled: true - label: "TH1 generates fabric-unique GroupID, GroupName, random key, EpochKey0 and GroupKeySetID." verification: | - As TH generates it is not required to verify + As Admin generates it is not required to verify disabled: true - label: @@ -59,6 +89,37 @@ tests: "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 + + [1657719041.075123][4541:4546] CHIP:DMG: ICR moving to [ResponseRe] + [1657719041.075174][4541:4546] CHIP:DMG: InvokeResponseMessage = + [1657719041.075200][4541:4546] CHIP:DMG: { + [1657719041.075224][4541:4546] CHIP:DMG: suppressResponse = false, + [1657719041.075255][4541:4546] CHIP:DMG: InvokeResponseIBs = + [1657719041.075287][4541:4546] CHIP:DMG: [ + [1657719041.075311][4541:4546] CHIP:DMG: InvokeResponseIB = + [1657719041.075347][4541:4546] CHIP:DMG: { + [1657719041.075376][4541:4546] CHIP:DMG: CommandStatusIB = + [1657719041.075408][4541:4546] CHIP:DMG: { + [1657719041.075439][4541:4546] CHIP:DMG: CommandPathIB = + [1657719041.075473][4541:4546] CHIP:DMG: { + [1657719041.075507][4541:4546] CHIP:DMG: EndpointId = 0x0, + [1657719041.075542][4541:4546] CHIP:DMG: ClusterId = 0x3f, + [1657719041.075577][4541:4546] CHIP:DMG: CommandId = 0x0, + [1657719041.075609][4541:4546] CHIP:DMG: }, + [1657719041.075646][4541:4546] CHIP:DMG: + [1657719041.075676][4541:4546] CHIP:DMG: StatusIB = + [1657719041.075709][4541:4546] CHIP:DMG: { + [1657719041.075743][4541:4546] CHIP:DMG: status = 0x00 (SUCCESS), + [1657719041.075775][4541:4546] CHIP:DMG: }, + [1657719041.075809][4541:4546] CHIP:DMG: + [1657719041.075840][4541:4546] CHIP:DMG: }, + [1657719041.075874][4541:4546] CHIP:DMG: + [1657719041.075902][4541:4546] CHIP:DMG: }, + [1657719041.075935][4541:4546] CHIP:DMG: + [1657719041.075959][4541:4546] CHIP:DMG: ], + [1657719041.075988][4541:4546] CHIP:DMG: + [1657719041.076012][4541:4546] CHIP:DMG: InteractionModelRevision = 1 + [1657719041.076036][4541:4546] CHIP:DMG: }, disabled: true - label: @@ -66,6 +127,12 @@ tests: Endpoint 1." verification: | ./chip-tool groups add-group 0x0001 grp1 1 1 + + [1657719097.788236][4548:4554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0000 + [1657719097.788325][4548:4554] CHIP:TOO: AddGroupResponse: { + [1657719097.788366][4548:4554] CHIP:TOO: status: 0 + [1657719097.788393][4548:4554] CHIP:TOO: groupId: 1 + [1657719097.788418][4548:4554] CHIP:TOO: } disabled: true - label: @@ -73,13 +140,41 @@ tests: list on GroupKeyManagement cluster to TH2 on Endpoint 0" verification: | ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 1, "groupKeySetID": 42, "fabricIndex": 1}]' 1 0 + + [1657719130.464175][4557:4562] CHIP:DMG: StatusIB = + [1657719130.464214][4557:4562] CHIP:DMG: { + [1657719130.464256][4557:4562] CHIP:DMG: status = 0x00 (SUCCESS), + [1657719130.464298][4557:4562] CHIP:DMG: }, + [1657719130.464342][4557:4562] CHIP:DMG: + + ./chip-tool groupsettings add-group grp1 0x0001 + + ./chip-tool groupsettings add-keysets 0x0042 0 0x000000000021dfe0 hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf + + ./chip-tool groupsettings bind-keyset 0x0001 0x0042 + + ./chip-tool groupsettings show-groups + + +-------------------------------------------------------------------------------------+ + | Available Groups : | + +-------------------------------------------------------------------------------------+ + | Group Id | KeySet Id | Group Name | + | 0x101 0x1a1 Group #1 | + | 0x102 0x1a2 Group #2 | + | 0x1 0x42 grp1 | + +-------------------------------------------------------------------------------------+" disabled: true - label: "TH1 writes Binding entry into DUT with Entry 1: Group = The Group ID in the AddGroup command sent from TH1 to TH2" verification: | - ./chip-tool binding write binding '[{"Group" : 0x0001 }]' 1 0 + ./chip-tool binding write binding '[{"group" : "0x0001"}]' 1 0 + + [1657719251.763323][4597:4602] CHIP:DMG: StatusIB = + [1657719251.763360][4597:4602] CHIP:DMG: { + [1657719251.763402][4597:4602] CHIP:DMG: status = 0x00 (SUCCESS), + [1657719251.763440][4597:4602] CHIP:DMG: }, disabled: true - label: "TH1 sets up group settings on DUT" @@ -92,18 +187,142 @@ tests: entries" PICS: OO.C.C01.Tx verification: | - ./chip-tool onoff on 0x0001 1 + ./chip-tool onoff on 0xffffffffffff0001 1 + + + [1657719341.187186][3608:3613] CHIP:TOO: Sending command to group 0x1 + [1657719341.187212][3608:3613] CHIP:TOO: Sending cluster (0x00000006) command (0x00000001) on Group 1 disabled: true - label: "TH1 reads OnOff attribute from TH2 (Endpoint 1)" PICS: OO.C.C01.Tx verification: | ./chip-tool onoff read on-off 1 1 + + [1657719363.799344][4615:4620] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 3526720174 + [1657719363.799380][4615:4620] CHIP:TOO: OnOff: TRUE disabled: true - label: "TH1 removes all the binding entries from DUT" verification: | - ./chip-tool binding write binding [] 1 0 + ./chip-tool groupsettings unbind-keyset 0x0001 0x0042 + + + [1657804100.222346][1483:1483] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_kvs + [1657804100.222880][1483:1483] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_factory.ini + [1657804100.223041][1483:1483] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_config.ini + [1657804100.223149][1483:1483] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_counters.ini + [1657804100.223500][1483:1483] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-mlceY7) + [1657804100.224151][1483:1483] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) + [1657804100.224208][1483:1483] CHIP:DL: NVS set: chip-counters/reboot-count = 16 (0x10) + [1657804100.224925][1483:1483] CHIP:DL: Got Ethernet interface: eth0 + [1657804100.225323][1483:1483] CHIP:DL: Found the primary Ethernet interface:eth0 + [1657804100.225720][1483:1483] CHIP:DL: Got WiFi interface: wlan0 + [1657804100.225791][1483:1483] CHIP:DL: Failed to reset WiFi statistic counts + [1657804100.225873][1483:1483] CHIP:IN: UDP::Init bind&listen port=0 + [1657804100.226005][1483:1483] CHIP:IN: UDP::Init bound to port=43367 + [1657804100.226030][1483:1483] CHIP:IN: BLEBase::Init - setting/overriding transport + [1657804100.226052][1483:1483] CHIP:IN: TransportMgr initialized + [1657804100.226085][1483:1483] CHIP:FP: Initializing FabricTable from persistent storage + [1657804100.226331][1483:1483] CHIP:TS: Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.226953][1483:1483] CHIP:FP: Fabric index 0x1 was retrieved from storage. Compressed FabricId 0xAF5C7831F3704268, FabricId 0x0000000000000001, NodeId 0x000000000001B669, VendorId 0xFFF1 + [1657804100.227380][1483:1483] CHIP:FP: Fabric index 0x2 was retrieved from storage. Compressed FabricId 0x756CE95FCDF96118, FabricId 0x0000000000000002, NodeId 0x000000000001B669, VendorId 0xFFF1 + [1657804100.227789][1483:1483] CHIP:FP: Fabric index 0x3 was retrieved from storage. Compressed FabricId 0xCCD838643BEE9065, FabricId 0x0000000000000003, NodeId 0x000000000001B669, VendorId 0xFFF1 + [1657804100.230946][1483:1483] CHIP:ZCL: Using ZAP configuration... + [1657804100.235033][1483:1483] CHIP:DL: Avahi client registered + [1657804100.236263][1483:1483] CHIP:CTL: System State Initialized... + [1657804100.236328][1483:1483] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657804100.236364][1483:1483] CHIP:CTL: Setting attestation nonce to random value + [1657804100.236412][1483:1483] CHIP:CTL: Setting CSR nonce to random value + [1657804100.236485][1483:1483] CHIP:IN: UDP::Init bind&listen port=5550 + [1657804100.236621][1483:1483] CHIP:IN: UDP::Init bound to port=5550 + [1657804100.236646][1483:1483] CHIP:IN: TransportMgr initialized + [1657804100.236733][1483:1483] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657804100.236763][1483:1483] CHIP:CTL: Setting attestation nonce to random value + [1657804100.236811][1483:1483] CHIP:CTL: Setting CSR nonce to random value + [1657804100.239619][1483:1483] CHIP:CTL: Generating NOC + [1657804100.240796][1483:1483] CHIP:FP: Validating NOC chain + [1657804100.242766][1483:1483] CHIP:FP: NOC chain validation successful + [1657804100.242960][1483:1483] CHIP:FP: Updated fabric at index: 0x1, Node ID: 0x000000000001B669 + [1657804100.243000][1483:1483] CHIP:TS: Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.243029][1483:1483] CHIP:TS: New proposed Last Known Good Time: 2021-01-01T00:00:00 + [1657804100.243055][1483:1483] CHIP:TS: Retaining current Last Known Good Time + [1657804100.246677][1483:1483] CHIP:FP: Metadata for Fabric 0x1 persisted to storage. + [1657804100.250025][1483:1483] CHIP:TS: Committing Last Known Good Time to storage: 2022-07-13T12:47:52 + [1657804100.253538][1483:1483] CHIP:CTL: Joined the fabric at index 1. Compressed fabric ID is: 0x0000000000000000 + [1657804100.253600][1483:1483] CHIP:IN: UDP::Init bind&listen port=5550 + [1657804100.253724][1483:1483] CHIP:IN: UDP::Init bound to port=5550 + [1657804100.253751][1483:1483] CHIP:IN: TransportMgr initialized + [1657804100.253834][1483:1483] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657804100.253872][1483:1483] CHIP:CTL: Setting attestation nonce to random value + [1657804100.253934][1483:1483] CHIP:CTL: Setting CSR nonce to random value + [1657804100.254935][1483:1483] CHIP:CTL: Generating NOC + [1657804100.256071][1483:1483] CHIP:FP: Validating NOC chain + [1657804100.257762][1483:1483] CHIP:FP: NOC chain validation successful + [1657804100.257921][1483:1483] CHIP:FP: Updated fabric at index: 0x2, Node ID: 0x000000000001B669 + [1657804100.257955][1483:1483] CHIP:TS: Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.257978][1483:1483] CHIP:TS: New proposed Last Known Good Time: 2021-01-01T00:00:00 + [1657804100.257998][1483:1483] CHIP:TS: Retaining current Last Known Good Time + [1657804100.260948][1483:1483] CHIP:FP: Metadata for Fabric 0x2 persisted to storage. + [1657804100.263784][1483:1483] CHIP:TS: Committing Last Known Good Time to storage: 2022-07-13T12:47:52 + [1657804100.266433][1483:1483] CHIP:CTL: Joined the fabric at index 2. Compressed fabric ID is: 0x0000000000000000 + [1657804100.266491][1483:1483] CHIP:IN: UDP::Init bind&listen port=5550 + [1657804100.266615][1483:1483] CHIP:IN: UDP::Init bound to port=5550 + [1657804100.266641][1483:1483] CHIP:IN: TransportMgr initialized + [1657804100.266727][1483:1483] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657804100.266766][1483:1483] CHIP:CTL: Setting attestation nonce to random value + [1657804100.266828][1483:1483] CHIP:CTL: Setting CSR nonce to random value + [1657804100.267811][1483:1483] CHIP:CTL: Generating NOC + [1657804100.268914][1483:1483] CHIP:FP: Validating NOC chain + [1657804100.270701][1483:1483] CHIP:FP: NOC chain validation successful + [1657804100.270859][1483:1483] CHIP:FP: Updated fabric at index: 0x3, Node ID: 0x000000000001B669 + [1657804100.270892][1483:1483] CHIP:TS: Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.270914][1483:1483] CHIP:TS: New proposed Last Known Good Time: 2021-01-01T00:00:00 + [1657804100.270935][1483:1483] CHIP:TS: Retaining current Last Known Good Time + [1657804100.273854][1483:1483] CHIP:FP: Metadata for Fabric 0x3 persisted to storage. + [1657804100.276610][1483:1483] CHIP:TS: Committing Last Known Good Time to storage: 2022-07-13T12:47:52 + [1657804100.279350][1483:1483] CHIP:CTL: Joined the fabric at index 3. Compressed fabric ID is: 0x0000000000000000 + [1657804100.279411][1483:1483] CHIP:IN: UDP::Init bind&listen port=5550 + [1657804100.279535][1483:1483] CHIP:IN: UDP::Init bound to port=5550 + [1657804100.279560][1483:1483] CHIP:IN: TransportMgr initialized + [1657804100.315695][1483:1488] CHIP:DL: CHIP task running + [1657804100.315921][1483:1488] CHIP:DL: HandlePlatformSpecificBLEEvent 32784 + [1657804100.321174][1483:1483] CHIP:CTL: Shutting down the commissioner + [1657804100.321268][1483:1483] CHIP:CTL: Shutting down the controller + [1657804100.321299][1483:1483] CHIP:CTL: Shutting down the commissioner + [1657804100.321348][1483:1483] CHIP:CTL: Shutting down the controller + [1657804100.321373][1483:1483] CHIP:IN: Expiring all sessions for fabric 0x1!! + [1657804100.321396][1483:1483] CHIP:FP: Forgetting fabric 0x1 + [1657804100.321429][1483:1483] CHIP:TS: Pending Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.321597][1483:1483] CHIP:TS: Previous Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.321622][1483:1483] CHIP:TS: Reverted Last Known Good Time to previous value + [1657804100.321661][1483:1483] CHIP:CTL: Shutting down the commissioner + [1657804100.321718][1483:1483] CHIP:CTL: Shutting down the controller + [1657804100.321819][1483:1483] CHIP:IN: Expiring all sessions for fabric 0x2!! + [1657804100.321849][1483:1483] CHIP:FP: Forgetting fabric 0x2 + [1657804100.321875][1483:1483] CHIP:TS: Pending Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.321998][1483:1483] CHIP:TS: Previous Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.322022][1483:1483] CHIP:TS: Reverted Last Known Good Time to previous value + [1657804100.322056][1483:1483] CHIP:CTL: Shutting down the commissioner + [1657804100.322113][1483:1483] CHIP:CTL: Shutting down the controller + [1657804100.322136][1483:1483] CHIP:IN: Expiring all sessions for fabric 0x3!! + [1657804100.322156][1483:1483] CHIP:FP: Forgetting fabric 0x3 + [1657804100.322179][1483:1483] CHIP:TS: Pending Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.322314][1483:1483] CHIP:TS: Previous Last Known Good Time: 2022-07-13T12:47:52 + [1657804100.322339][1483:1483] CHIP:TS: Reverted Last Known Good Time to previous value + [1657804100.322367][1483:1483] CHIP:CTL: Shutting down the System State, this will teardown the CHIP Stack + [1657804100.323278][1483:1483] CHIP:DMG: IM WH moving to [Uninitialized] + [1657804100.323318][1483:1483] CHIP:DMG: IM WH moving to [Uninitialized] + [1657804100.323341][1483:1483] CHIP:DMG: IM WH moving to [Uninitialized] + [1657804100.323362][1483:1483] CHIP:DMG: IM WH moving to [Uninitialized] + [1657804100.323384][1483:1483] CHIP:DMG: All ReadHandler-s are clean, clear GlobalDirtySet + [1657804100.323455][1483:1483] CHIP:BLE: BleConnectionDelegate::CancelConnection is not implemented. + [1657804100.323744][1483:1483] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-wsLxnz) + [1657804100.324436][1483:1483] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) + [1657804100.324498][1483:1483] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) + [1657804100.324524][1483:1483] CHIP:DL: Inet Layer shutdown + [1657804100.324547][1483:1483] CHIP:DL: BLE shutdown + [1657804100.324569][1483:1483] CHIP:DL: System Layer shutdown disabled: true - label: @@ -111,11 +330,136 @@ tests: entries" PICS: OO.C.C00.Tx verification: | - ./chip-tool onoff on 0x0001 1 + ./chip-tool onoff off 0xffffffffffff0001 1 + + + [1657739317.292483][6861:6861] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_kvs + [1657739317.293022][6861:6861] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_factory.ini + [1657739317.293191][6861:6861] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_config.ini + [1657739317.293302][6861:6861] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_counters.ini + [1657739317.293673][6861:6861] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-UkoNx7) + [1657739317.294307][6861:6861] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) + [1657739317.294361][6861:6861] CHIP:DL: NVS set: chip-counters/reboot-count = 25 (0x19) + [1657739317.295264][6861:6861] CHIP:DL: Got Ethernet interface: eth0 + [1657739317.295842][6861:6861] CHIP:DL: Found the primary Ethernet interface:eth0 + [1657739317.296467][6861:6861] CHIP:DL: Got WiFi interface: wlan0 + [1657739317.298602][6861:6861] CHIP:DL: Found the primary WiFi interface:wlan0 + [1657739317.298722][6861:6861] CHIP:IN: UDP::Init bind&listen port=0 + [1657739317.298865][6861:6861] CHIP:IN: UDP::Init bound to port=42057 + [1657739317.298900][6861:6861] CHIP:IN: BLEBase::Init - setting/overriding transport + [1657739317.298922][6861:6861] CHIP:IN: TransportMgr initialized + [1657739317.298956][6861:6861] CHIP:FP: Initializing FabricTable from persistent storage + [1657739317.299178][6861:6861] CHIP:TS: Last Known Good Time: 2022-07-13T10:35:47 + [1657739317.299800][6861:6861] CHIP:FP: Fabric index 0x1 was retrieved from storage. Compressed FabricId 0x44F31DDB31482396, FabricId 0x0000000000000001, NodeId 0x000000000001B669, VendorId 0xFFF1 + [1657739317.300326][6861:6861] CHIP:FP: Fabric index 0x2 was retrieved from storage. Compressed FabricId 0x9C5001245B9C6783, FabricId 0x0000000000000002, NodeId 0x000000000001B669, VendorId 0xFFF1 + [1657739317.300874][6861:6861] CHIP:FP: Fabric index 0x3 was retrieved from storage. Compressed FabricId 0x432BBBD1DDD12A2D, FabricId 0x0000000000000003, NodeId 0x000000000001B669, VendorId 0xFFF1 + [1657739317.304752][6861:6861] CHIP:ZCL: Using ZAP configuration... + [1657739317.310329][6861:6861] CHIP:DL: Avahi client registered + [1657739317.311785][6861:6861] CHIP:CTL: System State Initialized... + [1657739317.311916][6861:6861] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657739317.311958][6861:6861] CHIP:CTL: Setting attestation nonce to random value + [1657739317.312013][6861:6861] CHIP:CTL: Setting CSR nonce to random value + [1657739317.312124][6861:6861] CHIP:IN: UDP::Init bind&listen port=5550 + [1657739317.312276][6861:6861] CHIP:IN: UDP::Init bound to port=5550 + [1657739317.312304][6861:6861] CHIP:IN: TransportMgr initialized + [1657739317.312381][6861:6861] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657739317.312413][6861:6861] CHIP:CTL: Setting attestation nonce to random value + [1657739317.312468][6861:6861] CHIP:CTL: Setting CSR nonce to random value + [1657739317.315708][6861:6861] CHIP:CTL: Generating NOC + [1657739317.317118][6861:6861] CHIP:FP: Validating NOC chain + [1657739317.319143][6861:6861] CHIP:FP: NOC chain validation successful + [1657739317.319368][6861:6861] CHIP:FP: Updated fabric at index: 0x1, Node ID: 0x000000000001B669 + [1657739317.319406][6861:6861] CHIP:TS: Last Known Good Time: 2022-07-13T10:35:47 + [1657739317.319433][6861:6861] CHIP:TS: New proposed Last Known Good Time: 2021-01-01T00:00:00 + [1657739317.319458][6861:6861] CHIP:TS: Retaining current Last Known Good Time + [1657739317.322759][6861:6861] CHIP:FP: Metadata for Fabric 0x1 persisted to storage. + [1657739317.325707][6861:6861] CHIP:TS: Committing Last Known Good Time to storage: 2022-07-13T10:35:47 + [1657739317.328626][6861:6861] CHIP:CTL: Joined the fabric at index 1. Compressed fabric ID is: 0x0000000000000000 + [1657739317.328691][6861:6861] CHIP:IN: UDP::Init bind&listen port=5550 + [1657739317.328824][6861:6861] CHIP:IN: UDP::Init bound to port=5550 + [1657739317.328852][6861:6861] CHIP:IN: TransportMgr initialized + [1657739317.328943][6861:6861] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657739317.328985][6861:6861] CHIP:CTL: Setting attestation nonce to random value + [1657739317.329053][6861:6861] CHIP:CTL: Setting CSR nonce to random value + [1657739317.330018][6861:6861] CHIP:CTL: Generating NOC + [1657739317.331537][6861:6861] CHIP:FP: Validating NOC chain + [1657739317.333367][6861:6861] CHIP:FP: NOC chain validation successful + [1657739317.333529][6861:6861] CHIP:FP: Updated fabric at index: 0x2, Node ID: 0x000000000001B669 + [1657739317.333562][6861:6861] CHIP:TS: Last Known Good Time: 2022-07-13T10:35:47 + [1657739317.333585][6861:6861] CHIP:TS: New proposed Last Known Good Time: 2021-01-01T00:00:00 + [1657739317.333607][6861:6861] CHIP:TS: Retaining current Last Known Good Time + [1657739317.336974][6861:6861] CHIP:FP: Metadata for Fabric 0x2 persisted to storage. + [1657739317.340429][6861:6861] CHIP:TS: Committing Last Known Good Time to storage: 2022-07-13T10:35:47 + [1657739317.346545][6861:6861] CHIP:CTL: Joined the fabric at index 2. Compressed fabric ID is: 0x0000000000000000 + [1657739317.346610][6861:6861] CHIP:IN: UDP::Init bind&listen port=5550 + [1657739317.346740][6861:6861] CHIP:IN: UDP::Init bound to port=5550 + [1657739317.346784][6861:6861] CHIP:IN: TransportMgr initialized + [1657739317.346890][6861:6861] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1657739317.346930][6861:6861] CHIP:CTL: Setting attestation nonce to random value + [1657739317.346993][6861:6861] CHIP:CTL: Setting CSR nonce to random value + [1657739317.347952][6861:6861] CHIP:CTL: Generating NOC + [1657739317.349141][6861:6861] CHIP:FP: Validating NOC chain + [1657739317.351073][6861:6861] CHIP:FP: NOC chain validation successful + [1657739317.351260][6861:6861] CHIP:FP: Updated fabric at index: 0x3, Node ID: 0x000000000001B669 + [1657739317.351297][6861:6861] CHIP:TS: Last Known Good Time: 2022-07-13T10:35:47 + [1657739317.351322][6861:6861] CHIP:TS: New proposed Last Known Good Time: 2021-01-01T00:00:00 + [1657739317.351344][6861:6861] CHIP:TS: Retaining current Last Known Good Time + [1657739317.354771][6861:6861] CHIP:FP: Metadata for Fabric 0x3 persisted to storage. + [1657739317.357885][6861:6861] CHIP:TS: Committing Last Known Good Time to storage: 2022-07-13T10:35:47 + [1657739317.360916][6861:6861] CHIP:CTL: Joined the fabric at index 3. Compressed fabric ID is: 0x0000000000000000 + [1657739317.360982][6861:6861] CHIP:IN: UDP::Init bind&listen port=5550 + [1657739317.361127][6861:6861] CHIP:IN: UDP::Init bound to port=5550 + [1657739317.361176][6861:6861] CHIP:IN: TransportMgr initialized + [1657739317.404098][6861:6866] CHIP:DL: CHIP task running + [1657739317.404355][6861:6866] CHIP:DL: HandlePlatformSpecificBLEEvent 32784 + [1657739317.404400][6861:6866] CHIP:TOO: Sending command to group 0x1 + [1657739317.404425][6861:6866] CHIP:TOO: Sending cluster (0x00000006) command (0x00000000) on Group 1 + [1657739317.404474][6861:6866] CHIP:DMG: ICR moving to [AddingComm] + [1657739317.404580][6861:6866] CHIP:DMG: ICR moving to [AddedComma] + [1657739317.405348][6861:6861] CHIP:CTL: Shutting down the commissioner + [1657739317.405445][6861:6861] CHIP:CTL: Shutting down the controller + [1657739317.405477][6861:6861] CHIP:CTL: Shutting down the commissioner + [1657739317.405530][6861:6861] CHIP:CTL: Shutting down the controller + [1657739317.405569][6861:6861] CHIP:IN: Expiring all sessions for fabric 0x1!! + [1657739317.405593][6861:6861] CHIP:FP: Forgetting fabric 0x1 + [1657739317.405637][6861:6861] CHIP:TS: Pending Last Known Good Time: 2022-07-13T10:35:47 + [1657739317.405823][6861:6861] CHIP:TS: Previous Last Known Good Time: 2022-07-13T10:35:47 + [1657739317.405849][6861:6861] CHIP:TS: Reverted Last Known Good Time to previous value + [1657739317.405890][6861:6861] CHIP:CTL: Shutting down the commissioner + [1657739317.405950][6861:6861] CHIP:CTL: Shutting down the controller + [1657739317.405978][6861:6861] CHIP:IN: Expiring all sessions for fabric 0x2!! + [1657739317.406015][6861:6861] CHIP:FP: Forgetting fabric 0x2 + [1657739317.406046][6861:6861] CHIP:TS: Pending Last Known Good Time: 2022-07-13T10:35:47 + [1657739317.406231][6861:6861] CHIP:TS: Previous Last Known Good Time: 2022-07-13T10:35:47 + [1657739317.406261][6861:6861] CHIP:TS: Reverted Last Known Good Time to previous value + [1657739317.406299][6861:6861] CHIP:CTL: Shutting down the commissioner + [1657739317.406364][6861:6861] CHIP:CTL: Shutting down the controller + [1657739317.406407][6861:6861] CHIP:IN: Expiring all sessions for fabric 0x3!! + [1657739317.406469][6861:6861] CHIP:FP: Forgetting fabric 0x3 + [1657739317.406500][6861:6861] CHIP:TS: Pending Last Known Good Time: 2022-07-13T10:35:47 + [1657739317.406684][6861:6861] CHIP:TS: Previous Last Known Good Time: 2022-07-13T10:35:47 + [1657739317.406715][6861:6861] CHIP:TS: Reverted Last Known Good Time to previous value + [1657739317.406751][6861:6861] CHIP:CTL: Shutting down the System State, this will teardown the CHIP Stack + [1657739317.407843][6861:6861] CHIP:DMG: IM WH moving to [Uninitialized] + [1657739317.407889][6861:6861] CHIP:DMG: IM WH moving to [Uninitialized] + [1657739317.407914][6861:6861] CHIP:DMG: IM WH moving to [Uninitialized] + [1657739317.407938][6861:6861] CHIP:DMG: IM WH moving to [Uninitialized] + [1657739317.407965][6861:6861] CHIP:DMG: All ReadHandler-s are clean, clear GlobalDirtySet + [1657739317.408046][6861:6861] CHIP:BLE: BleConnectionDelegate::CancelConnection is not implemented. + [1657739317.408378][6861:6861] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-c0r3tm) + [1657739317.409155][6861:6861] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) + [1657739317.409228][6861:6861] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) + [1657739317.409260][6861:6861] CHIP:DL: Inet Layer shutdown + [1657739317.409286][6861:6861] CHIP:DL: BLE shutdown + [1657739317.409313][6861:6861] CHIP:DL: System Layer shutdown + [1657739317.409437][6861:6861] CHIP:TOO: Run command failure: ../../third_party/connectedhomeip/src/transport/SessionManager.cpp:176: CHIP Error 0x000000AC: Internal error disabled: true - label: "TH1 reads OnOff attribute from TH2 (Endpoint 1)" PICS: OO.C.C01.Tx verification: | ./chip-tool onoff read on-off 1 1 + + [1657719448.858149][4636:4641] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 3526720174 + [1657719448.858183][4636:4641] CHIP:TOO: OnOff: TRUE disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_BINFO_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BINFO_2_1.yaml index 3f1ffcd648b803..2756ffad7d6405 100644 --- a/src/app/tests/suites/certification/Test_TC_BINFO_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BINFO_2_1.yaml @@ -29,11 +29,31 @@ tests: - name: "nodeId" value: nodeId - - label: "TH reads Location from the DUT." - command: "readAttribute" - attribute: "Location" - response: - saveAs: CountryCode + #not supported in YAML + - label: + "During Commissioning, TH Saves the CountryCode Information from + SetRegulatoryConfig command" + verification: | + While commissioning TH Saves the CountryCode Information from SetRegulatoryConfig command + + ./chip-tool pairing ble-wifi 1 GRLPrivate_EXT matter123 20202021 3840 + + TH END: + [1641381202.376419][5628:5633] CHIP:CTL: Received success response 0x3df8 + + sudo ./all-clusters-app --wifi + + DUT END: + [1641381202.306840][4431:4431] CHIP:DL: NVS set: chip-config/regulatory-location = 0 (0x0) + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "TH reads DataModelRevision from the DUT." PICS: BINFO.S.A0000 @@ -42,7 +62,7 @@ tests: response: saveAs: DataModelRevisionValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65534 @@ -69,7 +89,7 @@ tests: response: saveAs: VendorNameValue constraints: - type: string + type: char_string maxLength: 32 - label: "TH writes VendorName from the DUT." @@ -95,7 +115,7 @@ tests: response: saveAs: VendorIDValue constraints: - type: uint16 + type: vendor_id minValue: 1 maxValue: 65521 @@ -122,7 +142,7 @@ tests: response: saveAs: ProductNameValue constraints: - type: string + type: char_string maxLength: 32 - label: "TH writes ProductName from the DUT." @@ -148,7 +168,7 @@ tests: response: saveAs: ProductIDValue constraints: - type: uint16 + type: int16u minValue: 1 maxValue: 65534 @@ -175,7 +195,7 @@ tests: response: saveAs: NodeLabelValue constraints: - type: string + type: char_string maxLength: 32 - label: "TH writes NodeLabel from the DUT." @@ -197,11 +217,31 @@ tests: command: "readAttribute" attribute: "Location" response: - value: CountryCode constraints: - type: string + type: char_string maxLength: 16 + - label: + "Verify that the Location is same as CountryCode value saved from + step1" + verification: | + ./chip-tool basic read location 1 0 + + On TH, Verify that TH reads Location from the DUT successfully, the name should be string and length is less than or equal to 2 bytes. + [1656495999.760797][2249:2254] CHIP:DMG: } + [1656495999.761084][2249:2254] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 941124320 + [1656495999.761187][2249:2254] CHIP:TOO: Location: XX + [1656495999.761371][2249:2254] CHIP:EM: Sending Standalone Ack for MessageCounter:7663506 on exchange 28126i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && BINFO.S.A0006 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + - label: "TH write Location from the DUT" PICS: BINFO.S.A0006 command: "writeAttribute" @@ -223,7 +263,7 @@ tests: response: saveAs: HardwareVersionValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65534 @@ -250,7 +290,7 @@ tests: response: saveAs: HardwareVersionStringValue constraints: - type: string + type: char_string minLength: 1 maxLength: 64 @@ -342,7 +382,7 @@ tests: response: saveAs: ManufacturingDateValue constraints: - type: string + type: char_string minLength: 8 maxLength: 16 @@ -382,7 +422,7 @@ tests: response: saveAs: PartNumberValue constraints: - type: string + type: char_string maxLength: 32 - label: "TH writes PartNumber from the DUT." @@ -408,7 +448,7 @@ tests: response: saveAs: ProductURLValue constraints: - type: string + type: long_char_string maxLength: 256 - label: @@ -447,7 +487,7 @@ tests: response: saveAs: ProductLabelValue constraints: - type: string + type: char_string maxLength: 64 - label: @@ -480,12 +520,13 @@ tests: value: ProductLabelValue - label: "TH reads SerialNumber from the DUT." + PICS: BINFO.S.A000f command: "readAttribute" attribute: "SerialNumber" response: saveAs: SerialNumberValue constraints: - type: string + type: char_string maxLength: 32 - label: "TH writes SerialNumber from the DUT." @@ -554,7 +595,7 @@ tests: response: saveAs: UniqueIDValue constraints: - type: string + type: char_string maxLength: 32 - label: "TH writes UniqueID from the DUT." diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml index b01bea003704f0..cb8965e96d17c1 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -42,7 +42,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml index 1d715f98b29ea2..79dac0d1a3e49e 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml @@ -34,4 +34,4 @@ tests: attribute: "StateValue" response: constraints: - type: bool + type: boolean diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml index 6edc60eb000278..e0f14bd09c0120 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml @@ -20,23 +20,23 @@ config: nodeId: 0x12344321 timeout: 700 nodeIdForDuplicateCommissioning: - type: NODE_ID + type: node_id defaultValue: 0x11 nodeId2: - type: NODE_ID + type: node_id defaultValue: 0xCAFE nodeId3: - type: NODE_ID + type: node_id defaultValue: 0xC00FEE endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:0000000000I31506010" payload2: - type: CHAR_STRING + type: char_string defaultValue: "MT:0000000000I.0648G00" tests: diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml index 18a7b80de77266..3607b092a20cc8 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml @@ -14,27 +14,27 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 24.1.13. [TC-CADMIN-1.15] Open commissioning window twice on DUT using BCM + 24.1.13. [TC-CADMIN-1.13] Open commissioning window twice on DUT using BCM then ECM [DUT - Commissionee] config: nodeId: 0x12344321 timeout: 500 nodeIdForDuplicateCommissioning: - type: NODE_ID + type: node_id defaultValue: 0x11 nodeId2: - type: NODE_ID + type: node_id defaultValue: 0xCAFE nodeId3: - type: NODE_ID + type: node_id defaultValue: 0xC00FEE endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:-24J0AFN00KA0648G00" tests: @@ -58,6 +58,8 @@ tests: values: - name: "CommissioningTimeout" value: 180 + - name: "discriminator" + value: discriminator - label: "Commission from gamma" identity: "gamma" @@ -90,6 +92,8 @@ tests: values: - name: "CommissioningTimeout" value: 180 + - name: "discriminator" + value: discriminator - label: "Commission from beta" identity: "beta" @@ -121,6 +125,8 @@ tests: values: - name: "CommissioningTimeout" value: 180 + - name: "discriminator" + value: discriminator - label: "TH_CR1 opens a new commissioning window on DUT_CE" identity: "alpha" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml index 0d6adaf3bcddcd..c56a8510ab8337 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml @@ -19,83 +19,81 @@ name: config: nodeId: 0x12344321 - cluster: "Basic" + timeout: 330 endpoint: 0 tests: - - label: "Reset DUT_CR1 to factory defaults" - verification: | - - disabled: true + - label: "Factory Reset the DUT_CE" + PICS: PICS_SDK_CI_ONLY + cluster: "SystemCommands" + command: "FactoryReset" - - label: "DUT_CR1 starts a commissioning process with TH_CE" + - label: "Factory Reset the DUT_CE" verification: | - "1. Provision the device using your DUT controller(use above instructions) , - " - disabled: true + Not implemented in YAML + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Please reboot the DUT and enter 'y' after DUT starts" + - name: "expectedValue" + value: "y" + + - label: "TH_CR1 starts a commissioning process with DUT_CE" + cluster: "DelayCommands" + command: "WaitForCommissionee" + PICS: CADMIN.S.C01.Rsp + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH_CR1 opens a commissioning window on DUT_CE" + cluster: "AdministratorCommissioning" + command: "OpenBasicCommissioningWindow" + PICS: CADMIN.S.C01.Rsp + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + + - label: "Wait for commissioning Window to 301 seconds" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 181000 - label: - "DUT_CR1 sends command to TH_CE to open a commissioning window with a - commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.S.C00.Rsp - verification: | - On your DUT controller chip tool, open commissioning window - - Below is the example when using chip tool as controller - - ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 - - [1635925713.966786][9695:9700] CHIP:SC: Success status report received. Session was established - [1635925713.966839][9695:9700] CHIP:IN: New secure session created for device 0x0000000000000001, key 33!! - [1635925713.966938][9695:9700] CHIP:CTL: OpenCommissioningWindow for device ID 1 - [1635925713.972601][9695:9700] CHIP:DMG: ICR moving to [AddingComm] - [1635925713.972705][9695:9700] CHIP:DMG: ICR moving to [AddedComma] - [1635925713.972815][9695:9700] CHIP:IN: Prepared encrypted message 0xaaaad9b57d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 31056i with MessageCounter:0. - [1635925713.972876][9695:9700] CHIP:IN: Sending encrypted msg 0xaaaad9b57d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 13449459 msec - [1635925713.973006][9695:9700] CHIP:DMG: ICR moving to [CommandSen] - [1635925713.973061][9695:9700] CHIP:CTL: Manual pairing code: [36217551633] - [1635925713.973120][9695:9700] CHIP:CTL: SetupQRCode: [MT:00000CQM00A7F87ZT10] - [1635925713.973178][9695:9700] CHIP:EM: Sending Standalone Ack for MessageCounter:1964916542 on exchange 31055i - disabled: true - - - label: "THn starts a commissioning process with TH_CE" - verification: | - On nth controller using chip tool connect to the accessory - - - ./chip-tool pairing code 1 36217551633 - - Verify you got below message - Device commissioning completed with success - disabled: true + "TH_CR1 reads the window status to verify the DUT_CE window is closed" + cluster: "AdministratorCommissioning" + command: "readAttribute" + attribute: "WindowStatus" + PICS: CADMIN.S.A0000 + response: + value: 0 + + - label: "TH_CR1 opens a commissioning window on DUT_CE" + cluster: "AdministratorCommissioning" + command: "OpenBasicCommissioningWindow" + PICS: CADMIN.S.C01.Rsp + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 179 + response: + error: INVALID_COMMAND - label: - "Repeat Step 3 an additional (SupportedFabrics - 2) times to reach an - index value of SupportedFabrics on TH_CE" - PICS: CADMIN.S.C00.Rsp - verification: | - Repeat Step 3 an additional (SupportedFabrics - 2) times to reach an index value of SupportedFabrics on TH_CE - disabled: true - - - label: "THn starts a commissioning process with TH_CE" - verification: | - On nth controller using chip tool connect to the accessory - - - ./chip-tool pairing code 1 36217551633 - - CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 - [1649756670.402192][10794:10799] CHIP:CTL: Device returned status 5 on receiving the NOC - [1649756670.402221][10794:10799] CHIP:CTL: Add NOC failed with error ../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1110: CHIP Error 0x0000000B: No memory - [1649756670.402241][10794:10799] CHIP:CTL: Failed to perform commissioning step 12 - disabled: true - - - label: "DUT_CR1 sends command to TH_CE to remove FabricIndex1" - PICS: OPCREDS.C.C0a.Tx - verification: | - on your DUT controller, remove fabric with FabricIndex=1 - - Below is the example when using chip tool as controller - - ./chip-tool operationalcredentials remove-fabric 1 1 0 - disabled: true + "TH_CR1 reads the window status to verify the DUT_CE window is closed" + cluster: "AdministratorCommissioning" + command: "readAttribute" + attribute: "WindowStatus" + PICS: CADMIN.S.A0000 + response: + value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml index 2e6441ace1f572..a4ae822ab055b1 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml @@ -19,104 +19,97 @@ name: config: nodeId: 0x12344321 - cluster: "Basic" + timeout: 330 endpoint: 0 tests: - - label: "Reset DUT_CR1 to factory defaults" - verification: | - - disabled: true + - label: "Factory Reset the DUT_CE" + cluster: "SystemCommands" + PICS: PICS_SDK_CI_ONLY + command: "FactoryReset" - - label: "DUT_CR1 starts a commissioning process with TH_CE" + - label: "Factory Reset the DUT_CE" verification: | - "1. Provision the device using your DUT controller(use above instructions) , - " - disabled: true + Not implemented in YAML + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Please reboot the DUT and enter 'y' after DUT starts" + - name: "expectedValue" + value: "y" + + - label: "TH_CR1 starts a commissioning process with DUT_CE" + cluster: "DelayCommands" + command: "WaitForCommissionee" + PICS: CADMIN.S.C00.Rsp + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH_CR1 opens a commissioning window on DUT_CE" + cluster: "AdministratorCommissioning" + command: "OpenCommissioningWindow" + PICS: CADMIN.S.C00.Rsp + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + - name: "PAKEVerifier" + value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" + - name: "discriminator" + value: 3840 + - name: "iterations" + value: 1000 + - name: "salt" + value: "SPAKE2P Key Salt" + + - label: "Wait for commissioning Window to 301 seconds" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 181000 - label: - "DUT_CR1 sends command to TH_CE to open a commissioning window with a - commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" - PICS: CADMIN.S.C01.Rsp - verification: | - On your DUT controller chip tool, open commissioning window - - Below is the example when using chip tool as controller - - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 - - - [CHIP:DMG: InvokeResponseMessage = - [1649756654.928453][3385:3390] CHIP:DMG: { - [1649756654.928511][3385:3390] CHIP:DMG: suppressResponse = false, - [1649756654.928571][3385:3390] CHIP:DMG: InvokeResponseIBs = - [1649756654.928647][3385:3390] CHIP:DMG: [ - [1649756654.928708][3385:3390] CHIP:DMG: InvokeResponseIB = - [1649756654.928794][3385:3390] CHIP:DMG: { - [1649756654.928864][3385:3390] CHIP:DMG: CommandStatusIB = - [1649756654.928948][3385:3390] CHIP:DMG: { - [1649756654.929021][3385:3390] CHIP:DMG: CommandPathIB = - [1649756654.929109][3385:3390] CHIP:DMG: { - [1649756654.929191][3385:3390] CHIP:DMG: EndpointId = 0x0, - [1649756654.929284][3385:3390] CHIP:DMG: ClusterId = 0x3c, - [1649756654.929376][3385:3390] CHIP:DMG: CommandId = 0x1, - [1649756654.929459][3385:3390] CHIP:DMG: }, - [1649756654.929551][3385:3390] CHIP:DMG: - [1649756654.929632][3385:3390] CHIP:DMG: StatusIB = - [1649756654.929720][3385:3390] CHIP:DMG: { - [1649756654.929804][3385:3390] CHIP:DMG: status = 0x00 (SUCCESS), - [1649756654.929878][3385:3390] CHIP:DMG: }, - [1649756654.929946][3385:3390] CHIP:DMG: - [1649756654.930017][3385:3390] CHIP:DMG: }, - [1649756654.930109][3385:3390] CHIP:DMG: - [1649756654.930176][3385:3390] CHIP:DMG: }, - [1649756654.930256][3385:3390] CHIP:DMG: - [1649756654.930314][3385:3390] CHIP:DMG: ], - [1649756654.930389][3385:3390] CHIP:DMG: - [1649756654.930448][3385:3390] CHIP:DMG: InteractionModelRevision = 1 - [1649756654.930555][3385:3390] CHIP:DMG: }, - [1649756654.930703][3385:3390] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 - [1649756654.930801][3385:3390] CHIP:DMG: ICR moving to [AwaitingDe] - disabled: true - - - label: "THn starts a commissioning process with TH_CE" - verification: | - On nth controller using chip tool connect to the accessory - - - ./chip-tool pairing onnetwork 1 20202021 - - Verify you got below message - Device commissioning completed with success - disabled: true + "TH_CR1 reads the window status to verify the DUT_CE window is closed" + cluster: "AdministratorCommissioning" + command: "readAttribute" + attribute: "WindowStatus" + PICS: CADMIN.S.A0000 + response: + value: 0 + + - label: "TH_CR1 opens a commissioning window on DUT_CE" + cluster: "AdministratorCommissioning" + command: "OpenCommissioningWindow" + PICS: CADMIN.S.C00.Rsp + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 179 + - name: "PAKEVerifier" + value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" + - name: "discriminator" + value: 3840 + - name: "iterations" + value: 1000 + - name: "salt" + value: "SPAKE2P Key Salt" + response: + error: INVALID_COMMAND - label: - "Repeat Step 3 an additional (SupportedFabrics - 2) times to reach an - index value of SupportedFabrics on TH_CE" - PICS: CADMIN.S.C01.Rsp - verification: | - Repeat Step 3 an additional (SupportedFabrics - 2) times to reach an index value of SupportedFabrics on TH_CE - disabled: true - - - label: "THn starts a commissioning process with TH_CE" - verification: | - On nth controller using chip tool connect to the accessory - - - ./chip-tool pairing onnetwork 1 20202021 - - CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 - [1649756670.402192][10794:10799] CHIP:CTL: Device returned status 5 on receiving the NOC - [1649756670.402221][10794:10799] CHIP:CTL: Add NOC failed with error ../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1110: CHIP Error 0x0000000B: No memory - [1649756670.402241][10794:10799] CHIP:CTL: Failed to perform commissioning step 12 - disabled: true - - - label: "DUT_CR1 sends command to TH_CE to remove FabricIndex1" - PICS: OPCREDS.C.C0a.Tx - verification: | - on your DUT controller, remove fabric with FabricIndex=1 - - Below is the example when using chip tool as controller - - ./chip-tool operationalcredentials remove-fabric 1 1 0 - disabled: true + "TH_CR1 reads the window status to verify the DUT_CE window is closed" + cluster: "AdministratorCommissioning" + command: "readAttribute" + attribute: "WindowStatus" + PICS: CADMIN.S.A0000 + response: + value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml deleted file mode 100644 index cc8880bab94dd5..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: - 24.1.25. [TC-CADMIN-1.25] Open commissioning window - durations min and - min-1 [BCM] [DUT - Commissionee] - -config: - nodeId: 0x12344321 - timeout: 330 - endpoint: 0 - -tests: - - label: "Factory Reset the DUT_CE" - PICS: PICS_SDK_CI_ONLY - cluster: "SystemCommands" - command: "FactoryReset" - - - label: "Factory Reset the DUT_CE" - verification: | - Not implemented in YAML - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Please reboot the DUT and enter 'y' after DUT starts" - - name: "expectedValue" - value: "y" - - - label: "TH_CR1 starts a commissioning process with DUT_CE" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "TH_CR1 opens a commissioning window on DUT_CE" - cluster: "AdministratorCommissioning" - command: "OpenBasicCommissioningWindow" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - - label: "Wait for commissioning Window to 301 seconds" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 181000 - - - label: - "TH_CR1 reads the window status to verify the DUT_CE window is closed" - cluster: "AdministratorCommissioning" - command: "readAttribute" - attribute: "WindowStatus" - response: - value: 0 - - - label: "TH_CR1 opens a commissioning window on DUT_CE" - cluster: "AdministratorCommissioning" - command: "OpenBasicCommissioningWindow" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 179 - response: - error: INVALID_COMMAND - - - label: - "TH_CR1 reads the window status to verify the DUT_CE window is closed" - cluster: "AdministratorCommissioning" - command: "readAttribute" - attribute: "WindowStatus" - response: - value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml deleted file mode 100644 index 8d07ea020db918..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: - 24.1.26. [TC-CADMIN-1.26] Open commissioning window - durations min and - min-1 [ECM] [DUT - Commissionee] - -config: - nodeId: 0x12344321 - timeout: 330 - endpoint: 0 - -tests: - - label: "Factory Reset the DUT_CE" - cluster: "SystemCommands" - command: "FactoryReset" - - - label: "Factory Reset the DUT_CE" - verification: | - Not implemented in YAML - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Please reboot the DUT and enter 'y' after DUT starts" - - name: "expectedValue" - value: "y" - - - label: "TH_CR1 starts a commissioning process with DUT_CE" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "TH_CR1 opens a commissioning window on DUT_CE" - cluster: "AdministratorCommissioning" - command: "OpenCommissioningWindow" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEVerifier" - value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" - - name: "discriminator" - value: 3840 - - name: "iterations" - value: 1000 - - name: "salt" - value: "SPAKE2P Key Salt" - - - label: "Wait for commissioning Window to 301 seconds" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 181000 - - - label: - "TH_CR1 reads the window status to verify the DUT_CE window is closed" - cluster: "AdministratorCommissioning" - command: "readAttribute" - attribute: "WindowStatus" - response: - value: 0 - - - label: "TH_CR1 opens a commissioning window on DUT_CE" - cluster: "AdministratorCommissioning" - command: "OpenCommissioningWindow" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 179 - - name: "PAKEVerifier" - value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" - - name: "discriminator" - value: 3840 - - name: "iterations" - value: 1000 - - name: "salt" - value: "SPAKE2P Key Salt" - response: - error: INVALID_COMMAND - - - label: - "TH_CR1 reads the window status to verify the DUT_CE window is closed" - cluster: "AdministratorCommissioning" - command: "readAttribute" - attribute: "WindowStatus" - response: - value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml index 3e78a8f7712981..0bb6f302830de6 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml @@ -18,14 +18,14 @@ config: nodeId: 0x12344321 timeout: 300 nodeId2: - type: NODE_ID + type: node_id defaultValue: 0xCAFE endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:0000000000I31506010" # This value needs to be generated automatically tests: @@ -76,11 +76,12 @@ tests: response: value: "chiptest" constraints: - type: string + type: char_string maxLength: 32 - - label: "Commission from beta" + - label: "TH_CR2 starts a commissioning process with DUT_CE" identity: "beta" + PICS: CADMIN.S cluster: "CommissionerCommands" command: "PairWithCode" arguments: @@ -90,7 +91,7 @@ tests: - name: "payload" value: payload - - label: "TH_CR2 starts a commissioning process with DUT_CE" + - label: "DUT_CE is commissioned by TH_CR2 on Fabric ID2" PICS: CADMIN.S identity: "beta" cluster: "DelayCommands" @@ -100,7 +101,7 @@ tests: - name: "nodeId" value: nodeId2 - - label: "Query fabrics list" + - label: "TH_CR1 reads the list of Fabrics on DUT_CE" command: "readAttribute" cluster: "Operational Credentials" attribute: "Fabrics" @@ -110,7 +111,7 @@ tests: constraints: type: list - - label: "Query fabrics list" + - label: "TH_CR2 reads the list of Fabrics on DUT_CE" identity: "beta" command: "readAttribute" cluster: "Operational Credentials" @@ -142,7 +143,7 @@ tests: response: value: "chiptest1" constraints: - type: string + type: char_string maxLength: 32 - label: @@ -167,10 +168,10 @@ tests: response: value: "chiptest2" constraints: - type: string + type: char_string maxLength: 32 - - label: "TH_CR2 opens a commissioning window on DUT_CE" + - label: "TH_CR2 opens a commissioning window on DUT_CE using ECM" cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" PICS: CADMIN.S.C00.Rsp @@ -206,7 +207,7 @@ tests: response: value: 0 - - label: "TH_CR2 opens a commissioning window on DUT_CE" + - label: "TH_CR2 opens a commissioning window on DUT_CE using ECM" cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" PICS: CADMIN.S.C00.Rsp @@ -234,7 +235,7 @@ tests: arguments: values: - name: "nodeId" - value: nodeId2 + value: nodeId - name: "payload" value: payload response: diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml index 89dc674ccd3343..196fa479025ee9 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml @@ -18,15 +18,15 @@ config: nodeId: 0x12344321 timeout: 300 nodeId2: - type: NODE_ID + type: node_id defaultValue: 0xCAFE endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING - defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically + type: char_string + defaultValue: "MT:-24J0AFN00KA0648G00" tests: - label: "TH_CR1 starts a commissioning process with DUT_CE" @@ -38,7 +38,7 @@ tests: - name: "nodeId" value: nodeId - - label: "TH_CR1 opens a commissioning window on DUT_CE" + - label: "TH_CR1 opens a commissioning window on DUT_CE using BCM" cluster: "AdministratorCommissioning" command: "OpenBasicCommissioningWindow" PICS: CADMIN.S.C01.Rsp @@ -47,6 +47,8 @@ tests: values: - name: "CommissioningTimeout" value: 180 + - name: "discriminator" + value: discriminator - label: "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory @@ -67,13 +69,14 @@ tests: PICS: BINFO.S.A0005 response: constraints: - type: string + type: char_string maxLength: 32 - - label: "Commission from beta" + - label: "TH_CR2 starts a commissioning process with DUT_CE" identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: CADMIN.S arguments: values: - name: "nodeId" @@ -81,7 +84,7 @@ tests: - name: "payload" value: payload - - label: "TH_CR2 starts a commissioning process with DUT_CE" + - label: "DUT_CE is commissioned by TH_CR2 on Fabric ID2 " identity: "beta" cluster: "DelayCommands" command: "WaitForCommissionee" @@ -91,7 +94,7 @@ tests: - name: "nodeId" value: nodeId2 - - label: "Query fabrics list" + - label: "TH_CR1 reads the list of Fabrics on DUT_CE" command: "readAttribute" cluster: "Operational Credentials" PICS: OPCREDS.S.A0001 @@ -101,7 +104,7 @@ tests: constraints: type: list - - label: "Query fabrics list" + - label: "TH_CR2 reads the list of Fabrics on DUT_CE" identity: "beta" command: "readAttribute" cluster: "Operational Credentials" @@ -130,8 +133,9 @@ tests: attribute: "NodeLabel" PICS: BINFO.S.A0005 response: + value: "chiptest" constraints: - type: string + type: char_string maxLength: 32 - label: @@ -154,11 +158,12 @@ tests: attribute: "NodeLabel" PICS: BINFO.S.A0005 response: + value: "chiptest" constraints: - type: string + type: char_string maxLength: 32 - - label: "TH_CR2 opens a commissioning window on DUT_CE" + - label: "TH_CR2 opens a commissioning window on DUT_CE using BCM" cluster: "AdministratorCommissioning" command: "OpenBasicCommissioningWindow" identity: "beta" @@ -168,6 +173,8 @@ tests: values: - name: "CommissioningTimeout" value: 180 + - name: "discriminator" + value: discriminator - label: "Wait for the commissioning window in step 13 to timeout" cluster: "DelayCommands" @@ -186,7 +193,7 @@ tests: response: value: 0 - - label: "TH_CR2 opens a commissioning window on DUT_CE" + - label: "TH_CR2 opens a commissioning window on DUT_CE using BCM" cluster: "AdministratorCommissioning" command: "OpenBasicCommissioningWindow" identity: "beta" @@ -196,6 +203,8 @@ tests: values: - name: "CommissioningTimeout" value: 180 + - name: "discriminator" + value: discriminator - label: "TH_CR1 starts a commissioning process with DUT_CE before the timeout @@ -206,7 +215,7 @@ tests: arguments: values: - name: "nodeId" - value: nodeId2 + value: nodeId - name: "payload" value: payload response: diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml index 9cc106fcfd1952..ab1d4b0d236ed4 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml @@ -20,20 +20,20 @@ config: nodeId: 0x12344321 timeout: 300 nodeIdForDuplicateCommissioning: - type: NODE_ID + type: node_id defaultValue: 0x11 nodeId2: - type: NODE_ID + type: node_id defaultValue: 0xCAFE nodeId3: - type: NODE_ID + type: node_id defaultValue: 0xC00FEE endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically tests: @@ -46,7 +46,7 @@ tests: - name: "nodeId" value: nodeId - - label: "TH_CR1 opens a new commissioning window on DUT_CE" + - label: "TH_CR1 opens a new commissioning window on DUT_CE using ECM" cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" PICS: CADMIN.S.C00.Rsp @@ -58,13 +58,13 @@ tests: - name: "PAKEVerifier" value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" - name: "discriminator" - value: 3840 + value: discriminator - name: "iterations" value: 1000 - name: "salt" value: "SPAKE2P Key Salt" - - label: "Wait for PIXIT_COMM_WIN(180) + 10 seconds" + - label: "Wait for PIXIT.CADMIN.CwDuration + 10 seconds" cluster: "DelayCommands" command: "WaitForMs" arguments: @@ -86,7 +86,7 @@ tests: response: error: FAILURE - - label: "TH_CR1 opens a new commissioning window on DUT_CE" + - label: "TH_CR1 opens a new commissioning window on DUT_CE using ECM" cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" PICS: CADMIN.S.C00.Rsp @@ -98,7 +98,7 @@ tests: - name: "PAKEVerifier" value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" - name: "discriminator" - value: 3840 + value: discriminator - name: "iterations" value: 1000 - name: "salt" @@ -150,7 +150,7 @@ tests: - label: "TH_CR1 opens a new commissioning window on DUT_CE using wrong - PakeVerifier value" + PakeVerifier value using ECM" cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" PICS: CADMIN.S.C00.Rsp @@ -162,7 +162,7 @@ tests: - name: "PAKEVerifier" value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a" - name: "discriminator" - value: 3840 + value: discriminator - name: "iterations" value: 1000 - name: "salt" @@ -170,7 +170,7 @@ tests: response: error: FAILURE - - label: "TH_CR1 opens a new commissioning window on DUT_CE" + - label: "TH_CR1 opens a new commissioning window on DUT_CE using ECM" cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" PICS: CADMIN.S.C00.Rsp @@ -182,13 +182,13 @@ tests: - name: "PAKEVerifier" value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" - name: "discriminator" - value: 3840 + value: discriminator - name: "iterations" value: 1000 - name: "salt" value: "SPAKE2P Key Salt" - - label: "TH_CR1 opens a new commissioning window on DUT_CE" + - label: "TH_CR1 opens another commissioning window on DUT_CE using ECM" cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" PICS: CADMIN.S.C00.Rsp @@ -200,7 +200,7 @@ tests: - name: "PAKEVerifier" value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" - name: "discriminator" - value: 3840 + value: discriminator - name: "iterations" value: 1000 - name: "salt" @@ -210,7 +210,7 @@ tests: #Disabled due to issue 17666 - label: "TH_CR2 starts a commissioning process with DUT_CE" - PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S + PICS: CADMIN.S && PICS_SKIP_SAMPLE_APP identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml index 78a7488f54dc62..867f4df1a9deee 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml @@ -20,20 +20,20 @@ config: nodeId: 0x12344321 timeout: 300 nodeIdForDuplicateCommissioning: - type: NODE_ID + type: node_id defaultValue: 0x11 nodeId2: - type: NODE_ID + type: node_id defaultValue: 0xCAFE nodeId3: - type: NODE_ID + type: node_id defaultValue: 0xC00FEE endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically tests: diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml index ed094eb77d4399..5e0a0578b4d98b 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml @@ -20,23 +20,23 @@ config: nodeId: 0x12344321 timeout: 700 nodeIdForDuplicateCommissioning: - type: NODE_ID + type: node_id defaultValue: 0x11 nodeId2: - type: NODE_ID + type: node_id defaultValue: 0xCAFE nodeId3: - type: NODE_ID + type: node_id defaultValue: 0xC00FEE endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 payload: - type: CHAR_STRING + type: char_string defaultValue: "MT:-24J0AFN00KA0648G00" payload2: - type: CHAR_STRING + type: char_string defaultValue: "MT:0000000000I.0648G00" tests: diff --git a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml index 9385a746cd65ce..e62e11283bfd57 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 5 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" PICS: (CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03) @@ -42,7 +42,7 @@ tests: attribute: "FeatureMap" response: constraints: - type: map32 + type: bitmap32 minValue: 0 maxValue: 31 diff --git a/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml index 8f5debd61f9b73..8dae8c05ea5ef5 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml @@ -34,7 +34,7 @@ tests: attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -44,7 +44,7 @@ tests: attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -54,7 +54,7 @@ tests: attribute: "RemainingTime" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -64,7 +64,7 @@ tests: attribute: "CurrentX" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -74,7 +74,7 @@ tests: attribute: "CurrentY" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -94,7 +94,7 @@ tests: attribute: "CompensationText" response: constraints: - type: string + type: char_string maxLength: 254 - label: "TH reads ColorTemperatureMireds attribute from DUT" @@ -103,7 +103,7 @@ tests: attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -133,7 +133,7 @@ tests: attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -153,7 +153,7 @@ tests: attribute: "ColorLoopActive" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -163,7 +163,7 @@ tests: attribute: "ColorLoopDirection" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -173,7 +173,7 @@ tests: attribute: "ColorLoopTime" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -183,7 +183,7 @@ tests: attribute: "ColorLoopStartEnhancedHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -193,7 +193,7 @@ tests: attribute: "ColorLoopStoredEnhancedHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -210,7 +210,7 @@ tests: response: value: FeatureMapValue constraints: - type: map16 + type: bitmap16 minValue: 0 maxValue: 31 @@ -220,7 +220,7 @@ tests: attribute: "ColorTempPhysicalMinMireds" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -230,7 +230,7 @@ tests: attribute: "ColorTempPhysicalMaxMireds" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -240,7 +240,7 @@ tests: attribute: "CoupleColorTempToLevelMinMireds" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -250,7 +250,7 @@ tests: attribute: "StartUpColorTemperatureMireds" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -261,7 +261,7 @@ tests: attribute: "NumberOfPrimaries" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 6 @@ -645,7 +645,7 @@ tests: attribute: "WhitePointX" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -655,7 +655,7 @@ tests: attribute: "WhitePointY" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -665,7 +665,7 @@ tests: attribute: "ColorPointRX" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -675,7 +675,7 @@ tests: attribute: "ColorPointRY" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -685,7 +685,7 @@ tests: attribute: "ColorPointRIntensity" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -695,7 +695,7 @@ tests: attribute: "ColorPointGX" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -705,7 +705,7 @@ tests: attribute: "ColorPointGY" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -715,7 +715,7 @@ tests: attribute: "ColorPointGIntensity" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -725,7 +725,7 @@ tests: attribute: "ColorPointBX" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -735,7 +735,7 @@ tests: attribute: "ColorPointBY" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -745,6 +745,6 @@ tests: attribute: "ColorPointBIntensity" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 diff --git a/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml index 3884460ec66651..fefa5d3edce2c6 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml @@ -19,6 +19,18 @@ config: cluster: "Color Control" endpoint: 1 timeout: 150 + hueShortestDistance: + type: int8u + defaultValue: 150 + hueLongestDistance: + type: int8u + defaultValue: 200 + hueDirectionUp: + type: int8u + defaultValue: 250 + hueDirectionDown: + type: int8u + defaultValue: 170 tests: - label: "Wait for the commissioned device to be retrieved" @@ -40,23 +52,32 @@ tests: response: value: 1 - - label: "Reads CurrentHue attribute from DUT" + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F00 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH reads CurrentHue attribute from DUT" PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Move to hue shortest distance command" + - label: + "TH sends MoveToHue command to DUT another Hue with Direction Shortest + distance and TransitionTime 300" PICS: CC.S.F00 && CC.S.C00.Rsp command: "MoveToHue" arguments: values: - name: "hue" - value: 150 + value: hueShortestDistance - name: "Direction" value: 0 - name: "TransitionTime" @@ -74,15 +95,13 @@ tests: - name: "ms" value: 5000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.F00 && CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -94,15 +113,13 @@ tests: - name: "ms" value: 5000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.F00 && CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -114,22 +131,22 @@ tests: - name: "ms" value: 20000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.F00 && CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: - value: 150 + value: hueShortestDistance - - label: "Move to hue longest distance command" + - label: + "TH sends MoveToHue command to DUT another Hue with Direction Longest + distance and TransitionTime 300" command: "MoveToHue" PICS: CC.S.F00 && CC.S.C00.Rsp arguments: values: - name: "hue" - value: 200 + value: hueLongestDistance - name: "Direction" value: 1 - name: "TransitionTime" @@ -147,15 +164,13 @@ tests: - name: "ms" value: 5000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.F00 && CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT." + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -167,15 +182,13 @@ tests: - name: "ms" value: 5000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.F00 && CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT." + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -187,22 +200,22 @@ tests: - name: "ms" value: 20000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.F00 && CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT." + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: - value: 200 + value: hueLongestDistance - - label: "Move to hue up command" + - label: + "TH sends MoveToHue command to DUT another Hue with Direction Up and + TransitionTime 300" command: "MoveToHue" PICS: CC.S.F00 && CC.S.C00.Rsp arguments: values: - name: "hue" - value: 250 + value: hueDirectionUp - name: "Direction" value: 2 - name: "TransitionTime" @@ -220,15 +233,13 @@ tests: - name: "ms" value: 5000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.F00 && CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -240,15 +251,13 @@ tests: - name: "ms" value: 5000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.F00 && CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -260,22 +269,22 @@ tests: - name: "ms" value: 20000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.F00 && CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: - value: 250 + value: hueDirectionUp - - label: "Move to hue down command" + - label: + "TH sends MoveToHue command to DUT another Hue with Direction Down and + TransitionTime 300" command: "MoveToHue" PICS: CC.S.F00 && CC.S.C00.Rsp arguments: values: - name: "hue" - value: 200 + value: hueDirectionDown - name: "Direction" value: 3 - name: "TransitionTime" @@ -293,15 +302,13 @@ tests: - name: "ms" value: 5000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.F00 && CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -313,15 +320,13 @@ tests: - name: "ms" value: 5000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.F00 && CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -333,14 +338,12 @@ tests: - name: "ms" value: 20000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.F00 && CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp command: "readAttribute" attribute: "CurrentHue" response: - value: 200 + value: hueDirectionDown - label: "Turn off light that we turned on" cluster: "On/Off" diff --git a/src/app/tests/suites/certification/Test_TC_CC_3_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_3_2.yaml index d6b329366d9624..9295e1d7282cab 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_3_2.yaml @@ -18,6 +18,9 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + RateConfigValue: + type: enum8 + defaultValue: 50 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,17 +42,24 @@ tests: response: value: 1 - - label: "Reads CurrentHue attribute from DUT" + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F00 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH reads CurrentHue attribute from DUT" command: "readAttribute" PICS: CC.S.F00 && CC.S.A0000 attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Move hue up command" + - label: "TH sends MoveHue command to DUT with MoveMode Up" PICS: CC.S.F00 && CC.S.C01.Rsp command: "MoveHue" arguments: @@ -57,7 +67,7 @@ tests: - name: "MoveMode" value: 1 - name: "Rate" - value: 50 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -71,15 +81,13 @@ tests: - name: "ms" value: 3000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.F00 && CC.S.A0000 + - label: "TH reads CurrentHue attribute from DUT several times" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -91,15 +99,13 @@ tests: - name: "ms" value: 2000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.F00 && CC.S.A0000 + - label: "TH reads CurrentHue attribute from DUT several times" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -111,19 +117,17 @@ tests: - name: "ms" value: 3000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.F00 && CC.S.A0000 + - label: "TH reads CurrentHue attribute from DUT several times" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Move hue stop command" + - label: "TH sends MoveHue command to DUT with MoveMode Stop" PICS: CC.S.F00 && CC.S.C01.Rsp command: "MoveHue" arguments: @@ -131,7 +135,7 @@ tests: - name: "MoveMode" value: 0 - name: "Rate" - value: 50 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -145,16 +149,14 @@ tests: - name: "ms" value: 1000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.F00 && CC.S.A0000 + - label: "TH reads CurrentHue attribute from DUT several times" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp command: "readAttribute" attribute: "CurrentHue" response: saveAs: CurrentHueValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -166,16 +168,14 @@ tests: - name: "ms" value: 1000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.F00 && CC.S.A0000 + - label: "TH reads CurrentHue attribute from DUT several times" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp command: "readAttribute" attribute: "CurrentHue" response: value: CurrentHueValue - - label: "Move hue down command" + - label: "TH sends MoveHue command to DUT with MoveMode Down" PICS: CC.S.F00 && CC.S.C01.Rsp command: "MoveHue" arguments: @@ -183,7 +183,7 @@ tests: - name: "MoveMode" value: 3 - name: "Rate" - value: 50 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -197,15 +197,13 @@ tests: - name: "ms" value: 1000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.F00 && CC.S.A0000 + - label: "TH reads CurrentHue attribute from DUT several times" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -217,15 +215,13 @@ tests: - name: "ms" value: 1000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.F00 && CC.S.A0000 + - label: "TH reads CurrentHue attribute from DUT several times" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -237,19 +233,17 @@ tests: - name: "ms" value: 1000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.F00 && CC.S.A0000 + - label: "TH reads CurrentHue attribute from DUT several times" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Move hue stop command" + - label: "TH sends MoveHue command to DUT with MoveMode Stop" PICS: CC.S.F00 && CC.S.C01.Rsp command: "MoveHue" arguments: @@ -257,7 +251,7 @@ tests: - name: "MoveMode" value: 0 - name: "Rate" - value: 50 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -271,16 +265,14 @@ tests: - name: "ms" value: 1000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.F00 && CC.S.A0000 + - label: "TH reads CurrentHue attribute from DUT several times" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp command: "readAttribute" attribute: "CurrentHue" response: saveAs: CurrentHueValueAfterStopmode constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -292,10 +284,8 @@ tests: - name: "ms" value: 1000 - - label: - "Check current hue attribute value matched the value sent by the last - command" - PICS: CC.S.F00 && CC.S.A0000 + - label: "TH reads CurrentHue attribute from DUT several times" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp command: "readAttribute" attribute: "CurrentHue" response: diff --git a/src/app/tests/suites/certification/Test_TC_CC_3_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_3_3.yaml index 493f75382237ad..0dbfc5efd24bf4 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_3_3.yaml @@ -18,6 +18,9 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + StepSizeConfigValue: + type: int8u + defaultValue: 5 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,17 +42,24 @@ tests: response: value: 1 - - label: "Reads CurrentHue attribute from DUT" + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F00 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH reads CurrentHue attribute from DUT" PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Step hue up command" + - label: "TH sends StepHue command to DUT with StepMode Up" PICS: CC.S.F00 && CC.S.C02.Rsp command: "StepHue" arguments: @@ -57,7 +67,7 @@ tests: - name: "StepMode" value: 1 - name: "StepSize" - value: 5 + value: StepSizeConfigValue - name: "TransitionTime" value: 5 - name: "OptionsMask" @@ -74,17 +84,17 @@ tests: - name: "ms" value: 1000 - - label: "Over TransitionTime,Read CurrentHue attribute from DUT" - PICS: CC.S.F00 && CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C02.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 5 maxValue: 254 - - label: "Step hue down command" + - label: "TH sends StepHue command to DUT with StepMode Down" PICS: CC.S.F00 && CC.S.C02.Rsp command: "StepHue" arguments: @@ -92,7 +102,7 @@ tests: - name: "StepMode" value: 3 - name: "StepSize" - value: 5 + value: StepSizeConfigValue - name: "TransitionTime" value: 5 - name: "OptionsMask" @@ -108,13 +118,13 @@ tests: - name: "ms" value: 1000 - - label: "Over TransitionTime,Read CurrentHue attribute from DUT" - PICS: CC.S.F00 && CC.S.A0000 + - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 && CC.S.C02.Rsp command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 249 diff --git a/src/app/tests/suites/certification/Test_TC_CC_4_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_1.yaml index 7b820c7e855836..fdbcdb8420c353 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_1.yaml @@ -18,6 +18,9 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + SaturationConfigValue: + type: int8u + defaultValue: 90 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,87 +42,57 @@ tests: response: value: 1 - - label: "Check Saturation attribute value matched before any change" + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F00 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH reads CurrentSaturation attribute from DUT" PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Move to saturation command" + - label: "TH sends MoveToSaturation command to DUT" PICS: CC.S.F00 && CC.S.C03.Rsp command: "MoveToSaturation" arguments: values: - name: "Saturation" - value: 90 + value: SaturationConfigValue - name: "TransitionTime" - value: 15 + value: 10 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 500ms" + - label: "Wait 1500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 500 + value: 1500 - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.F00 && CC.S.A0001 + "Over TransitionTime, TH reads CurrentSaturation attribute from DUT." + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C03.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: + value: SaturationConfigValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - - label: "Wait 500ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 500 - - - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.F00 && CC.S.A0001 - command: "readAttribute" - attribute: "CurrentSaturation" - response: - constraints: - type: uint8 - minValue: 0 - maxValue: 254 - - - label: "Wait 1000ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 1000 - - - label: - "Check current saturation attribute value matched the value sent by - the last command" - PICS: CC.S.F00 && CC.S.A0001 - command: "readAttribute" - attribute: "CurrentSaturation" - response: - value: 90 - - label: "Turn off light that we turned on" cluster: "On/Off" command: "off" 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 b8317f46f546b1..bfca64ef26b3e1 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 @@ -18,6 +18,9 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + RateConfigValue: + type: int8u + defaultValue: 50 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,13 +42,20 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F00 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads CurrentSaturation attribute from DUT" PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -57,7 +67,7 @@ tests: - name: "MoveMode" value: 1 - name: "Rate" - value: 15 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -72,12 +82,12 @@ tests: value: 1000 - label: "TH reads CurrentSaturation attribute from DUT several times" - PICS: CC.S.F00 && CC.S.A0001 + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -90,12 +100,12 @@ tests: value: 1000 - label: "TH reads CurrentSaturation attribute from DUT several times" - PICS: CC.S.F00 && CC.S.A0001 + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -108,12 +118,12 @@ tests: value: 1000 - label: "TH reads CurrentSaturation attribute from DUT several times" - PICS: CC.S.F00 && CC.S.A0001 + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -125,7 +135,7 @@ tests: - name: "MoveMode" value: 3 - name: "Rate" - value: 10 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -140,12 +150,12 @@ tests: value: 1000 - label: "TH reads CurrentSaturation attribute from DUT several times." - PICS: CC.S.F00 && CC.S.A0001 + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -158,12 +168,12 @@ tests: value: 1000 - label: "TH reads CurrentSaturation attribute from DUT several times." - PICS: CC.S.F00 && CC.S.A0001 + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -176,12 +186,12 @@ tests: value: 1000 - label: "TH reads CurrentSaturation attribute from DUT several times." - PICS: CC.S.F00 && CC.S.A0001 + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -195,7 +205,7 @@ tests: - name: "MoveMode" value: 1 - name: "Rate" - value: 100 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -210,12 +220,12 @@ tests: value: 1000 - label: "TH reads CurrentSaturation attribute from DUT" - PICS: CC.S.F00 && CC.S.A0001 + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -229,7 +239,7 @@ tests: - name: "MoveMode" value: 0 - name: "Rate" - value: 50 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -244,13 +254,13 @@ tests: value: 1000 - label: "TH reads CurrentSaturation attribute from DUT." - PICS: CC.S.F00 && CC.S.A0001 + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: saveAs: CurrentSaturationStep4d constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -263,7 +273,7 @@ tests: value: 1000 - label: "CurrentSaturation value Stops incrementing" - PICS: CC.S.F00 && CC.S.A0001 + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: @@ -279,7 +289,7 @@ tests: - name: "MoveMode" value: 3 - name: "Rate" - value: 10 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -294,13 +304,13 @@ tests: value: 1000 - label: "TH reads CurrentSaturation attribute from DUT several times." - PICS: CC.S.F00 && CC.S.A0001 + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: saveAs: CurrentSaturationStep5b constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -313,12 +323,12 @@ tests: value: 1000 - label: "TH reads CurrentSaturation attribute from DUT several times." - PICS: CC.S.F00 && CC.S.A0001 + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: CurrentSaturationStep5b @@ -332,7 +342,7 @@ tests: - name: "MoveMode" value: 0 - name: "Rate" - value: 10 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -347,13 +357,13 @@ tests: value: 1000 - label: "TH reads CurrentSaturation attribute from DUT" - PICS: CC.S.F00 && CC.S.A0001 + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: saveAs: CurrentSaturationStep5d constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -366,7 +376,7 @@ tests: value: 1000 - label: "CurrentSaturation value Stops decrementing" - PICS: CC.S.F00 && CC.S.A0001 + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: diff --git a/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml index 27aa46fcfabcc8..c7243596ba8be1 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml @@ -18,6 +18,9 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + StepSizeConfigValue: + type: int8u + defaultValue: 15 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,13 +42,20 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F00 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads CurrentSaturation attribute from DUT" PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -57,7 +67,7 @@ tests: - name: "StepMode" value: 1 - name: "StepSize" - value: 15 + value: StepSizeConfigValue - name: "TransitionTime" value: 10 - name: "OptionsMask" @@ -75,12 +85,12 @@ tests: value: 1000 - label: "Over TransitionTime,TH read CurrentSaturation attribute from DUT" - PICS: CC.S.F00 && CC.S.A0001 + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C05.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -92,7 +102,7 @@ tests: - name: "StepMode" value: 3 - name: "StepSize" - value: 20 + value: StepSizeConfigValue - name: "TransitionTime" value: 10 - name: "OptionsMask" @@ -109,12 +119,12 @@ tests: value: 1000 - label: "Over TransitionTime,TH reads CurrentSaturation attribute from DUT" - PICS: CC.S.F00 && CC.S.A0001 + PICS: CC.S.F00 && CC.S.A0001 && CC.S.C05.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 diff --git a/src/app/tests/suites/certification/Test_TC_CC_4_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_4.yaml index 45609eb2840b78..30b6bc80f66f58 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_4.yaml @@ -19,6 +19,12 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + hueConfigValue: + type: int8u + defaultValue: 40 + SaturationConfigValue: + type: int8u + defaultValue: 160 tests: - label: "Wait for the commissioned device to be retrieved" @@ -40,13 +46,20 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F00 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads CurrentHue attribute from DUT." PICS: CC.S.F01 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -56,7 +69,7 @@ tests: attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -66,9 +79,9 @@ tests: arguments: values: - name: "hue" - value: 40 + value: hueConfigValue - name: "Saturation" - value: 160 + value: SaturationConfigValue - name: "TransitionTime" value: 10 - name: "OptionsMask" @@ -76,32 +89,34 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 1000ms" + - label: "Wait 1500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 1500 - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" - PICS: CC.S.F01 && CC.S.A0000 + PICS: CC.S.F01 && CC.S.A0000 && CC.S.C06.Rsp command: "readAttribute" attribute: "CurrentHue" response: + value: hueConfigValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - label: "Over TransitionTime, TH reads CurrentSaturation attribute from DUT" - PICS: CC.S.F01 && CC.S.A0001 + PICS: CC.S.F01 && CC.S.A0001 && CC.S.C06.Rsp command: "readAttribute" attribute: "CurrentSaturation" response: + value: SaturationConfigValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 diff --git a/src/app/tests/suites/certification/Test_TC_CC_5_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_5_1.yaml index 512fc6ac2965ac..ff63e1a898d9bf 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_5_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_5_1.yaml @@ -18,6 +18,12 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + colorXConfigValue: + type: int16u + defaultValue: 400 + colorYConfigValue: + type: int16u + defaultValue: 500 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,13 +45,20 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F03 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads CurrentX attribute from DUT" PICS: CC.S.F03 && CC.S.A0003 command: "readAttribute" attribute: "CurrentX" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -55,7 +68,7 @@ tests: attribute: "CurrentY" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -65,9 +78,9 @@ tests: arguments: values: - name: "colorX" - value: 200 + value: colorXConfigValue - name: "colorY" - value: 300 + value: colorYConfigValue - name: "TransitionTime" value: 10 - name: "OptionsMask" @@ -84,24 +97,24 @@ tests: value: 1500 - label: "Over TransitionTime, TH reads CurrentX attribute from DUT" - PICS: CC.S.F03 && CC.S.A0003 + PICS: CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentX" response: - value: 200 + value: colorXConfigValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - label: "Over TransitionTime, TH reads CurrentY attribute from DUT" - PICS: CC.S.F03 && CC.S.A0004 + PICS: CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentY" response: - value: 300 + value: colorYConfigValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 diff --git a/src/app/tests/suites/certification/Test_TC_CC_5_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_5_2.yaml index fb65dab348c3ec..d7c6f283e0658b 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_5_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_5_2.yaml @@ -18,6 +18,12 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + RateXValue: + type: int16s + defaultValue: 50 + RateYValue: + type: int16s + defaultValue: 50 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,13 +45,21 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F03 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads CurrentX attribute from DUT" command: "readAttribute" PICS: CC.S.F03 && CC.S.A0003 attribute: "CurrentX" response: + saveAs: CurrentXValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -54,8 +68,9 @@ tests: PICS: CC.S.F03 && CC.S.A0004 attribute: "CurrentY" response: + saveAs: CurrentYValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -65,9 +80,9 @@ tests: arguments: values: - name: "rateX" - value: 15 + value: RateXValue - name: "rateY" - value: 20 + value: RateYValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -82,23 +97,25 @@ tests: value: 1000 - label: "TH reads CurrentX attribute from DUT" - PICS: CC.S.F03 && CC.S.A0003 + PICS: CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp command: "readAttribute" attribute: "CurrentX" response: + saveAs: CurrentXBeforeStopCommand constraints: - type: uint16 - minValue: 0 + type: int16u + minValue: CurrentXValue maxValue: 65279 - label: "TH reads CurrentY attribute from DUT" - PICS: CC.S.F03 && CC.S.A0004 + PICS: CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp command: "readAttribute" attribute: "CurrentY" response: + saveAs: CurrentYBeforeStopCommand constraints: - type: uint16 - minValue: 0 + type: int16u + minValue: CurrentYValue maxValue: 65279 - label: "TH sends StopMoveStep command to DUT" @@ -112,23 +129,23 @@ tests: value: 0 - label: "TH reads CurrentX attribute from DUT" - PICS: CC.S.F03 && CC.S.A0003 + PICS: CC.S.F03 && CC.S.A0003 && CC.S.C47.Rsp command: "readAttribute" attribute: "CurrentX" response: constraints: - type: uint16 - minValue: 0 + type: int16u + minValue: CurrentXBeforeStopCommand maxValue: 65279 - label: "TH reads CurrentY attribute from DUT" - PICS: CC.S.F03 && CC.S.A0004 + PICS: CC.S.F03 && CC.S.A0004 && CC.S.C47.Rsp command: "readAttribute" attribute: "CurrentY" response: constraints: - type: uint16 - minValue: 0 + type: int16u + minValue: CurrentYBeforeStopCommand maxValue: 65279 - label: "Turn off light that we turned on" diff --git a/src/app/tests/suites/certification/Test_TC_CC_5_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_5_3.yaml index 0af6ac0f279197..a4b3141553f63f 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_5_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_5_3.yaml @@ -18,6 +18,12 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + StepXConfigValue: + type: int16s + defaultValue: 100 + StepYConfigValue: + type: int16s + defaultValue: 100 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,13 +45,21 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F03 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads CurrentX attribute from DUT" command: "readAttribute" PICS: CC.S.F03 && CC.S.A0003 attribute: "CurrentX" response: + saveAs: CurrentXValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -54,8 +68,9 @@ tests: PICS: CC.S.F03 && CC.S.A0004 attribute: "CurrentY" response: + saveAs: CurrentYValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -65,9 +80,9 @@ tests: arguments: values: - name: "stepX" - value: 15 + value: StepXConfigValue - name: "stepY" - value: 20 + value: StepYConfigValue - name: "TransitionTime" value: 10 - name: "OptionsMask" @@ -75,32 +90,32 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 1000ms" + - label: "Wait 1500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 1500 - label: "Over TransitionTime, TH reads CurrentX attribute from DUT" - PICS: CC.S.F03 && CC.S.A0003 + PICS: CC.S.F03 && CC.S.A0003 && CC.S.C09.Rsp command: "readAttribute" attribute: "CurrentX" response: constraints: - type: uint16 - minValue: 0 + type: int16u + minValue: CurrentXValue maxValue: 65279 - label: "Over TransitionTime, TH reads CurrentY attribute from DUT" - PICS: CC.S.F03 && CC.S.A0004 + PICS: CC.S.F03 && CC.S.A0004 && CC.S.C09.Rsp command: "readAttribute" attribute: "CurrentY" response: constraints: - type: uint16 - minValue: 0 + type: int16u + minValue: CurrentYValue maxValue: 65279 - label: "Turn off light that we turned on" diff --git a/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml index 19ee17ef5aa102..1dd9eeba179f02 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml @@ -41,6 +41,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F04 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads ColorTempPhysicalMinMireds attribute from DUT" PICS: CC.S.F04 && CC.S.A400b command: "readAttribute" @@ -48,7 +55,7 @@ tests: response: saveAs: ColorTempPhysicalMinMiredsValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -59,7 +66,7 @@ tests: response: saveAs: ColorTempPhysicalMaxMiredsValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -69,7 +76,7 @@ tests: attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: ColorTempPhysicalMinMiredsValue maxValue: ColorTempPhysicalMaxMiredsValue @@ -79,7 +86,7 @@ tests: arguments: values: - name: "colorTemperature" - value: 100 + value: ColorTempPhysicalMaxMiredsValue - name: "TransitionTime" value: 10 - name: "OptionsMask" @@ -100,9 +107,9 @@ tests: command: "readAttribute" attribute: "ColorTemperature" response: - value: 100 + value: ColorTempPhysicalMaxMiredsValue constraints: - type: uint16 + type: int16u minValue: ColorTempPhysicalMinMiredsValue maxValue: ColorTempPhysicalMaxMiredsValue diff --git a/src/app/tests/suites/certification/Test_TC_CC_6_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_2.yaml index c8757584ef0127..d9d49ab601542e 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_2.yaml @@ -40,6 +40,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F04 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads ColorTempPhysicalMinMireds attribute from DUT" PICS: CC.S.F04 && CC.S.A400b command: "readAttribute" @@ -47,7 +54,7 @@ tests: response: saveAs: ColorTempPhysicalMinMiredsValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -58,7 +65,7 @@ tests: response: saveAs: ColorTempPhysicalMaxMiredsValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -68,7 +75,7 @@ tests: attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: ColorTempPhysicalMinMiredsValue maxValue: ColorTempPhysicalMaxMiredsValue @@ -99,12 +106,12 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: ColorTempPhysicalMinMiredsValue maxValue: ColorTempPhysicalMaxMiredsValue @@ -117,12 +124,12 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: ColorTempPhysicalMinMiredsValue maxValue: ColorTempPhysicalMaxMiredsValue @@ -135,12 +142,12 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: ColorTempPhysicalMinMiredsValue maxValue: ColorTempPhysicalMaxMiredsValue @@ -171,12 +178,12 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: ColorTempPhysicalMinMiredsValue maxValue: ColorTempPhysicalMaxMiredsValue @@ -189,12 +196,12 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: ColorTempPhysicalMinMiredsValue maxValue: ColorTempPhysicalMaxMiredsValue @@ -207,12 +214,12 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: ColorTempPhysicalMinMiredsValue maxValue: ColorTempPhysicalMaxMiredsValue @@ -224,7 +231,7 @@ tests: - name: "MoveMode" value: 1 - name: "Rate" - value: 10 + value: 20 - name: "ColorTemperatureMinimumMireds" value: ColorTempPhysicalMinMiredsValue - name: "ColorTemperatureMaximumMireds" @@ -242,11 +249,11 @@ tests: - name: "MoveMode" value: 0 - name: "Rate" - value: 10 + value: 20 - name: "ColorTemperatureMinimumMireds" - value: 1 + value: ColorTempPhysicalMinMiredsValue - name: "ColorTemperatureMaximumMireds" - value: 255 + value: ColorTempPhysicalMaxMiredsValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -261,13 +268,13 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: saveAs: ColorTemperatureValue constraints: - type: uint16 + type: int16u minValue: ColorTempPhysicalMinMiredsValue maxValue: ColorTempPhysicalMaxMiredsValue @@ -280,13 +287,13 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: value: ColorTemperatureValue constraints: - type: uint16 + type: int16u minValue: ColorTempPhysicalMinMiredsValue maxValue: ColorTempPhysicalMaxMiredsValue @@ -299,13 +306,13 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: value: ColorTemperatureValue constraints: - type: uint16 + type: int16u minValue: ColorTempPhysicalMinMiredsValue maxValue: ColorTempPhysicalMaxMiredsValue @@ -335,7 +342,7 @@ tests: - name: "MoveMode" value: 0 - name: "Rate" - value: 10 + value: 20 - name: "ColorTemperatureMinimumMireds" value: ColorTempPhysicalMinMiredsValue - name: "ColorTemperatureMaximumMireds" @@ -354,13 +361,13 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: saveAs: ColorTemperatureMoveModeStop constraints: - type: uint16 + type: int16u minValue: ColorTempPhysicalMinMiredsValue maxValue: ColorTempPhysicalMaxMiredsValue @@ -373,13 +380,13 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: value: ColorTemperatureMoveModeStop constraints: - type: uint16 + type: int16u minValue: ColorTempPhysicalMinMiredsValue maxValue: ColorTempPhysicalMaxMiredsValue @@ -392,13 +399,13 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp command: "readAttribute" attribute: "ColorTemperature" response: value: ColorTemperatureValue constraints: - type: uint16 + type: int16u minValue: ColorTempPhysicalMinMiredsValue maxValue: ColorTempPhysicalMaxMiredsValue diff --git a/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml index 75c811bf9765fc..b68517cdfbe6f9 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml @@ -40,6 +40,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F04 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads ColorTempPhysicalMinMireds attribute from DUT" PICS: CC.S.F04 && CC.S.A400b command: "readAttribute" @@ -47,7 +54,7 @@ tests: response: saveAs: ColorTempPhysicalMinMiredsValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -58,7 +65,7 @@ tests: response: saveAs: ColorTempPhysicalMaxMiredsValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -68,7 +75,7 @@ tests: attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: ColorTempPhysicalMinMiredsValue maxValue: ColorTempPhysicalMaxMiredsValue @@ -101,12 +108,12 @@ tests: value: 500 - label: "TH reads ColorTemperatureMireds attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -119,30 +126,30 @@ tests: value: 500 - label: "TH reads ColorTemperatureMireds attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Wait 500ms" + - label: "Wait 700ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 500 + value: 700 - label: "TH reads ColorTemperatureMireds attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -154,9 +161,9 @@ tests: - name: "StepMode" value: 3 - name: "StepSize" - value: 5 + value: 100 - name: "TransitionTime" - value: 50 + value: 10 - name: "ColorTemperatureMinimumMireds" value: ColorTempPhysicalMinMiredsValue - name: "ColorTemperatureMaximumMireds" @@ -175,12 +182,12 @@ tests: value: 500 - label: "TH reads ColorTemperatureMireds attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -193,12 +200,12 @@ tests: value: 500 - label: "TH reads ColorTemperatureMireds attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 @@ -211,12 +218,12 @@ tests: value: 500 - label: "TH reads ColorTemperatureMireds attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 diff --git a/src/app/tests/suites/certification/Test_TC_CC_7_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_7_1.yaml index 58979af157d6e7..67fea5a4dd70dc 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_7_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_7_1.yaml @@ -19,6 +19,21 @@ config: cluster: "Color Control" endpoint: 1 timeout: 150 + EnhancedHueConfigValue: + type: int16u + defaultValue: 1025 + EnhancedHueShortestDistanceConfigValue: + type: int16u + defaultValue: 1050 + EnhancedHueLongestDistanceConfigValue: + type: int16u + defaultValue: 1200 + EnhancedHueDirectionUpConfigValue: + type: int16u + defaultValue: 1300 + EnhancedHueDirectionDownConfigValue: + type: int16u + defaultValue: 1100 tests: - label: "Wait for the commissioned device to be retrieved" @@ -40,13 +55,20 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F01 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH sends EnhancedMoveToHue command to DUT" PICS: CC.S.F01 && CC.S.C40.Rsp command: "EnhancedMoveToHue" arguments: values: - name: "EnhancedHue" - value: 1025 + value: EnhancedHueConfigValue - name: "Direction" value: 0 - name: "TransitionTime" @@ -57,12 +79,13 @@ tests: value: 0 - label: "TH reads EnhancedCurrentHue attribute from DUT" - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: + value: EnhancedHueConfigValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -72,7 +95,7 @@ tests: arguments: values: - name: "EnhancedHue" - value: 1100 + value: EnhancedHueShortestDistanceConfigValue - name: "Direction" value: 0 - name: "TransitionTime" @@ -91,12 +114,12 @@ tests: value: 5500 - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -109,12 +132,12 @@ tests: value: 5500 - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -127,13 +150,13 @@ tests: value: 20000 - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: - value: 1100 + value: EnhancedHueShortestDistanceConfigValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -143,7 +166,7 @@ tests: arguments: values: - name: "EnhancedHue" - value: 1150 + value: EnhancedHueLongestDistanceConfigValue - name: "Direction" value: 1 - name: "TransitionTime" @@ -162,12 +185,12 @@ tests: value: 5500 - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -180,12 +203,12 @@ tests: value: 5500 - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -198,13 +221,13 @@ tests: value: 20000 - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: - value: 1150 + value: EnhancedHueLongestDistanceConfigValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -214,7 +237,7 @@ tests: arguments: values: - name: "EnhancedHue" - value: 1200 + value: EnhancedHueDirectionUpConfigValue - name: "Direction" value: 2 - name: "TransitionTime" @@ -233,12 +256,12 @@ tests: value: 5500 - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -251,12 +274,12 @@ tests: value: 5500 - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -269,13 +292,13 @@ tests: value: 20000 - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: - value: 1200 + value: EnhancedHueDirectionUpConfigValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -285,7 +308,7 @@ tests: arguments: values: - name: "EnhancedHue" - value: 1300 + value: EnhancedHueDirectionDownConfigValue - name: "Direction" value: 3 - name: "TransitionTime" @@ -304,12 +327,12 @@ tests: value: 5500 - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -322,12 +345,12 @@ tests: value: 5500 - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -340,13 +363,13 @@ tests: value: 20000 - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: - value: 1300 + value: EnhancedHueDirectionDownConfigValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 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 5fc32f48434c2b..dc0ddd96cd6f9a 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 @@ -18,6 +18,9 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + RateConfigValue: + type: int16u + defaultValue: 50 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,13 +42,20 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F01 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads EnhancedCurrentHue attribute from DUT" command: "readAttribute" PICS: CC.S.F01 && CC.S.A4000 attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -57,7 +67,7 @@ tests: - name: "MoveMode" value: 1 - name: "Rate" - value: 50 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -72,12 +82,12 @@ tests: value: 1000 - label: "TH reads EnhancedCurrentHue attribute from DUT several times." - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -90,12 +100,12 @@ tests: value: 1000 - label: "TH reads EnhancedCurrentHue attribute from DUT several times." - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -108,12 +118,12 @@ tests: value: 1000 - label: "TH reads EnhancedCurrentHue attribute from DUT several times." - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -132,12 +142,32 @@ tests: value: 0 - label: "TH reads EnhancedCurrentHue attribute from DUT several times" - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: + saveAs: EnhancedCurrentHueStep3b constraints: - type: uint16 + type: int16u + minValue: 0 + maxValue: 65535 + + - label: "Wait 1000ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 1000 + + - label: "TH reads EnhancedCurrentHue attribute from DUT several times." + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp + command: "readAttribute" + attribute: "EnhancedCurrentHue" + response: + value: EnhancedCurrentHueStep3b + constraints: + type: int16u minValue: 0 maxValue: 65535 @@ -149,7 +179,7 @@ tests: - name: "MoveMode" value: 3 - name: "Rate" - value: 15 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -164,12 +194,12 @@ tests: value: 500 - label: "TH reads EnhancedCurrentHue attribute from DUT several times" - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -182,12 +212,12 @@ tests: value: 500 - label: "TH reads EnhancedCurrentHue attribute from DUT several times" - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -200,12 +230,12 @@ tests: value: 500 - label: "TH reads EnhancedCurrentHue attribute from DUT several times" - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -224,12 +254,32 @@ tests: value: 0 - label: "TH reads EnhancedCurrentHue attribute from DUT several times." - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp + command: "readAttribute" + attribute: "EnhancedCurrentHue" + response: + saveAs: EnhancedCurrentHueStep5b + constraints: + type: int16u + minValue: 0 + maxValue: 65535 + + - label: "Wait 1000ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 1000 + + - label: "TH reads EnhancedCurrentHue attribute from DUT several times." + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: + value: EnhancedCurrentHueStep5b constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 diff --git a/src/app/tests/suites/certification/Test_TC_CC_7_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_7_3.yaml index d2054dd100c021..d76467b3616b92 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_7_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_7_3.yaml @@ -18,6 +18,9 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + StepSizeConfigValue: + type: int16u + defaultValue: 50 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,13 +42,20 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F01 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads EnhancedCurrentHue attribute from DUT" command: "readAttribute" PICS: CC.S.F01 && CC.S.A4000 attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -57,9 +67,9 @@ tests: - name: "StepMode" value: 0 - name: "StepSize" - value: 50 + value: StepSizeConfigValue - name: "TransitionTime" - value: 1 + value: 10 - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -75,11 +85,11 @@ tests: - label: "Over TransitionTime,Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C42.Rsp attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -91,9 +101,9 @@ tests: - name: "StepMode" value: 1 - name: "StepSize" - value: 75 + value: StepSizeConfigValue - name: "TransitionTime" - value: 1 + value: 10 - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -109,11 +119,11 @@ tests: - label: "Over TransitionTime,Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C42.Rsp attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 diff --git a/src/app/tests/suites/certification/Test_TC_CC_7_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_7_4.yaml index 9b4068a4fad660..5d6f66ba87aaaf 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_7_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_7_4.yaml @@ -20,6 +20,12 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + EnhancedHueConfigValue: + type: int16u + defaultValue: 1200 + SaturationConfigValue: + type: int8u + defaultValue: 90 tests: - label: "Wait for the commissioned device to be retrieved" @@ -41,13 +47,20 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F01 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads EnhancedCurrentHue attribute from DUT" PICS: CC.S.F01 && CC.S.A4000 command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -57,9 +70,9 @@ tests: arguments: values: - name: "EnhancedHue" - value: 1200 + value: EnhancedHueConfigValue - name: "Saturation" - value: 90 + value: SaturationConfigValue - name: "TransitionTime" value: 10 - name: "OptionsMask" @@ -78,13 +91,13 @@ tests: - label: "Check EnhancedCurrentHue attribute value matched the value sent by the last command" - PICS: CC.S.F01 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C43.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: - value: 1200 + value: EnhancedHueConfigValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 diff --git a/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml index d05d0a49ed19d7..87e6c8a8aa22ad 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml @@ -18,6 +18,21 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + RateConfigValue: + type: int8u + defaultValue: 50 + RateXConfigValue: + type: int16s + defaultValue: 50 + RateYConfigValue: + type: int16s + defaultValue: 50 + ColorTemperatureMinMiredsConfigValue: + type: int16u + defaultValue: 1 + ColorTemperatureMaxMiredsConfigValue: + type: int16u + defaultValue: 255 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,32 +54,39 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH sends MoveHue command to DUT" - PICS: CC.S.C01.Rsp + PICS: CC.S.C01.Rsp && CC.S.F00 command: "MoveHue" arguments: values: - name: "MoveMode" value: 1 - name: "Rate" - value: 50 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - label: "TH reads CurrentHue attribute from DUT" - PICS: CC.S.A0000 + PICS: CC.S.A0000 && CC.S.C01.Rsp && CC.S.F00 command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - label: "TH sends StopMoveStep command to DUT" - PICS: CC.S.C47.Rsp + PICS: CC.S.C47.Rsp && CC.S.F00 command: "StopMoveStep" arguments: values: @@ -74,13 +96,13 @@ tests: value: 0 - label: "TH reads CurrentHue attribute from DUT" - PICS: CC.S.A0000 + PICS: CC.S.A0000 && CC.S.C47.Rsp && CC.S.F00 command: "readAttribute" attribute: "CurrentHue" response: saveAs: CurrentHueValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -93,42 +115,42 @@ tests: value: 100 - label: "TH reads CurrentHue attribute from DUT" - PICS: CC.S.A0000 + PICS: CC.S.A0000 && CC.S.C47.Rsp && CC.S.F00 command: "readAttribute" attribute: "CurrentHue" response: value: CurrentHueValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - label: "TH sends MoveSaturation command to DUT" - PICS: CC.S.C04.Rsp + PICS: CC.S.C04.Rsp && CC.S.F00 command: "MoveSaturation" arguments: values: - name: "MoveMode" value: 1 - name: "Rate" - value: 5 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - label: "TH reads CurrentSaturation attribute from DUT" - PICS: CC.S.A0001 + PICS: CC.S.A0001 && CC.S.C04.Rsp && CC.S.F00 command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - label: "TH sends StopMoveStep command to DUT" - PICS: CC.S.C47.Rsp + PICS: CC.S.C47.Rsp && CC.S.F00 command: "StopMoveStep" arguments: values: @@ -139,12 +161,12 @@ tests: - label: "TH reads CurrentSaturation attribute from DUT" command: "readAttribute" - PICS: CC.S.A0001 + PICS: CC.S.A0001 && CC.S.C47.Rsp && CC.S.F00 attribute: "CurrentSaturation" response: saveAs: CurrentSaturationValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 @@ -157,52 +179,60 @@ tests: value: 100 - label: "TH reads CurrentSaturation attribute from DUT" - PICS: CC.S.A0001 + PICS: CC.S.A0001 && CC.S.C47.Rsp && CC.S.F00 command: "readAttribute" attribute: "CurrentSaturation" response: value: CurrentSaturationValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 254 - label: "TH sends MoveColor command to DUT" - PICS: CC.S.C08.Rsp + PICS: CC.S.C08.Rsp && CC.S.F03 command: "MoveColor" arguments: values: - name: "rateX" - value: 15 + value: RateXConfigValue - name: "rateY" - value: 20 + value: RateYConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 + - label: "Wait 500ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 500 + - label: "TH reads CurrentX attribute from DUT" - PICS: CC.S.A0003 + PICS: CC.S.A0003 && CC.S.C08.Rsp && CC.S.F03 command: "readAttribute" attribute: "CurrentX" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - label: "TH reads CurrentY attribute from DUT" - PICS: CC.S.A0004 + PICS: CC.S.A0004 && CC.S.C08.Rsp && CC.S.F03 command: "readAttribute" attribute: "CurrentY" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - label: "TH sends StopMoveStep command to DUT" - PICS: CC.S.C47.Rsp + PICS: CC.S.C47.Rsp && CC.S.F03 command: "StopMoveStep" arguments: values: @@ -212,87 +242,95 @@ tests: value: 0 - label: "TH reads CurrentX attribute from DUT" - PICS: CC.S.A0003 + PICS: CC.S.A0003 && CC.S.C47.Rsp && CC.S.F03 command: "readAttribute" attribute: "CurrentX" response: saveAs: CurrentXValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - label: "TH reads CurrentY attribute from DUT" - PICS: CC.S.A0004 + PICS: CC.S.A0004 && CC.S.C47.Rsp && CC.S.F03 command: "readAttribute" attribute: "CurrentY" response: saveAs: CurrentYValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Wait 100ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 100 + value: 1000 - label: "TH reads CurrentY attribute from DUT" - PICS: CC.S.A0003 + PICS: CC.S.A0003 && CC.S.C47.Rsp && CC.S.F03 command: "readAttribute" attribute: "CurrentX" response: value: CurrentXValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - label: "TH reads CurrentY attribute from DUT" - PICS: CC.S.A0004 + PICS: CC.S.A0004 && CC.S.C47.Rsp && CC.S.F03 command: "readAttribute" attribute: "CurrentY" response: value: CurrentYValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - label: "TH sends MoveColorTemperature command to DUT" - PICS: CC.S.C4B.Rsp + PICS: CC.S.C4B.Rsp && CC.S.F04 command: "MoveColorTemperature" arguments: values: - name: "MoveMode" value: 1 - name: "Rate" - value: 10 + value: RateConfigValue - name: "ColorTemperatureMinimumMireds" - value: 1 + value: ColorTemperatureMinMiredsConfigValue - name: "ColorTemperatureMaximumMireds" - value: 255 + value: ColorTemperatureMaxMiredsConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 + - label: "Wait 1000ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 1000 + - label: "TH reads ColorTemperatureMireds attribute from DUT" - PICS: CC.S.A0007 + PICS: CC.S.A0007 && CC.S.C4B.Rsp && CC.S.F04 command: "readAttribute" attribute: "ColorTemperature" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - label: "TH sends StopMoveStep command to DUT" - PICS: CC.S.C47.Rsp + PICS: CC.S.C47.Rsp && CC.S.F04 command: "StopMoveStep" arguments: values: @@ -302,63 +340,63 @@ tests: value: 0 - label: "TH reads ColorTemperatureMireds attribute from DUT" - PICS: CC.S.A0007 + PICS: CC.S.A0007 && CC.S.C47.Rsp && CC.S.F04 command: "readAttribute" attribute: "ColorTemperature" response: saveAs: ColorTemperatureMiredsValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - - label: "Wait 100ms" + - label: "Wait 500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 100 + value: 500 - label: "Reads current color attribute value matched the value sent by the last attribute" - PICS: CC.S.A0007 + PICS: CC.S.A0007 && CC.S.C47.Rsp && CC.S.F04 command: "readAttribute" attribute: "ColorTemperature" response: value: ColorTemperatureMiredsValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65279 - label: "TH sends EnhancedMoveHue command to DUT." - PICS: CC.S.C41.Rsp + PICS: CC.S.C41.Rsp && CC.S.F01 command: "EnhancedMoveHue" arguments: values: - name: "MoveMode" value: 1 - name: "Rate" - value: 50 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - label: "TH reads EnhancedCurrentHue attribute from DUT" - PICS: CC.S.A4000 + PICS: CC.S.A4000 && CC.S.C41.Rsp && CC.S.F01 command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - label: "TH sends StopMoveStep command to DUT" - PICS: CC.S.C47.Rsp + PICS: CC.S.C47.Rsp && CC.S.F01 command: "StopMoveStep" arguments: values: @@ -368,32 +406,32 @@ tests: value: 0 - label: "TH reads EnhancedCurrentHue attribute from DUT" - PICS: CC.S.A4000 + PICS: CC.S.A4000 && CC.S.C47.Rsp && CC.S.F01 command: "readAttribute" attribute: "EnhancedCurrentHue" response: saveAs: EnhancedCurrentHueValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "Wait 100ms" + - label: "Wait 500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 100 + value: 500 - label: "TH reads EnhancedCurrentHue attribute from DUT" - PICS: CC.S.A4000 + PICS: CC.S.A4000 && CC.S.C47.Rsp && CC.S.F01 command: "readAttribute" attribute: "EnhancedCurrentHue" response: value: EnhancedCurrentHueValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 diff --git a/src/app/tests/suites/certification/Test_TC_CC_9_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_9_1.yaml index 30ab329b518a5f..24486901098f3a 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_9_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_9_1.yaml @@ -45,7 +45,7 @@ tests: "Precondition : Set DUT EnhancedCurrentHue to 0x4000 using EnhancedMoveToHue command" command: "EnhancedMoveToHue" - PICS: CC.S.C40.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C40.Rsp arguments: values: - name: "enhancedHue" @@ -67,9 +67,16 @@ tests: - name: "ms" value: 1000 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.A000f && CC.S.F02 && CC.S.F01 + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -90,13 +97,13 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp response: value: 0 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -117,13 +124,13 @@ tests: - label: "Read ColorLoopDirection attribute from DUT" command: "readAttribute" attribute: "ColorLoopDirection" - PICS: CC.S.A4003 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp response: value: 0 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -144,13 +151,13 @@ tests: - label: "Read ColorLoopTime attribute from DUT" command: "readAttribute" attribute: "ColorLoopTime" - PICS: CC.S.A4004 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4004 && CC.S.C44.Rsp response: value: 30 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -171,13 +178,13 @@ tests: - label: "Read ColorLoopStartEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStartEnhancedHue" - PICS: CC.S.A4005 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp response: value: 160 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -198,14 +205,14 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp response: value: 1 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: CC.S.A4006 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp response: value: 16384 @@ -220,17 +227,17 @@ tests: - label: "Read ColorLoopStartEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStartEnhancedHue" - PICS: CC.S.A4005 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp response: saveAs: ColorLoopStartEnhancedHueStep5d - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 + type: int16u minValue: ColorLoopStartEnhancedHueStep5d maxValue: 65535 @@ -245,16 +252,16 @@ tests: - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 + type: int16u minValue: ColorLoopStartEnhancedHueStep5d maxValue: 65535 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -275,27 +282,27 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp response: value: 0 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: CC.S.A4006 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp response: saveAs: ColorLoopStoredEnhancedHueStep6c - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: value: ColorLoopStoredEnhancedHueStep6c - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -316,13 +323,13 @@ tests: - label: "Read ColorLoopDirection attribute from DUT" command: "readAttribute" attribute: "ColorLoopDirection" - PICS: CC.S.A4003 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp response: value: 1 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -343,14 +350,14 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp response: value: 1 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: CC.S.A4006 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp response: value: 16384 @@ -365,17 +372,17 @@ tests: - label: "Read ColorLoopStartEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStartEnhancedHue" - PICS: CC.S.A4005 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp response: saveAs: ColorLoopStartEnhancedHueStep8d - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 + type: int16u minValue: ColorLoopStartEnhancedHueStep8d maxValue: 65535 @@ -390,16 +397,16 @@ tests: - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 + type: int16u minValue: ColorLoopStartEnhancedHueStep8d maxValue: 65535 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -420,27 +427,27 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp response: value: 0 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: CC.S.A4006 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp response: saveAs: ColorLoopStoredEnhancedHueStep9c - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: value: ColorLoopStoredEnhancedHueStep9c - label: "Enhanced Move To Hue command" command: "EnhancedMoveToHue" - PICS: CC.S.C40.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C40.Rsp arguments: values: - name: "enhancedHue" @@ -465,13 +472,13 @@ tests: - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp response: value: 16384 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -492,13 +499,13 @@ tests: - label: "Read ColorLoopDirection attribute from DUT" command: "readAttribute" attribute: "ColorLoopDirection" - PICS: CC.S.A4003 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp response: value: 0 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -519,14 +526,14 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp response: value: 1 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: CC.S.A4006 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp response: value: 16384 @@ -541,17 +548,17 @@ tests: - label: "Read ColorLoopStartEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStartEnhancedHue" - PICS: CC.S.A4005 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp response: saveAs: ColorLoopStartEnhancedHueStep12d - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 + type: int16u minValue: ColorLoopStartEnhancedHueStep12d maxValue: 65535 @@ -566,16 +573,16 @@ tests: - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 + type: int16u minValue: ColorLoopStartEnhancedHueStep12d maxValue: 65535 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -596,27 +603,27 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp response: value: 0 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: CC.S.A4006 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp response: saveAs: ColorLoopStoredEnhancedHueStep13c - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: value: ColorLoopStoredEnhancedHueStep13c - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -637,13 +644,13 @@ tests: - label: "Read ColorLoopDirection attribute from DUT" command: "readAttribute" attribute: "ColorLoopDirection" - PICS: CC.S.A4003 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp response: value: 1 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -664,14 +671,14 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp response: value: 1 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: CC.S.A4006 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp response: value: 16384 @@ -686,17 +693,17 @@ tests: - label: "Read ColorLoopStartEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStartEnhancedHue" - PICS: CC.S.A4005 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp response: saveAs: ColorLoopStartEnhancedHueStep15d - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 + type: int16u minValue: ColorLoopStartEnhancedHueStep15d maxValue: 65535 @@ -711,16 +718,16 @@ tests: - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 + type: int16u minValue: ColorLoopStartEnhancedHueStep15d maxValue: 65535 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" - PICS: CC.S.C44.Rsp + PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: values: - name: "updateFlags" @@ -741,21 +748,21 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.A4002 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp response: value: 0 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: CC.S.A4006 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp response: saveAs: ColorLoopStoredEnhancedHueStep16b - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.A4000 + PICS: CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp response: value: ColorLoopStoredEnhancedHueStep16b diff --git a/src/app/tests/suites/certification/Test_TC_CC_9_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_9_2.yaml index 2ec011abdabfca..1f1a465ff68c34 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_9_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_9_2.yaml @@ -68,6 +68,13 @@ tests: - name: "ms" value: 1000 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.A000f && CC.S.F02 && CC.S.F01 + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" PICS: CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp @@ -91,28 +98,28 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4002 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp response: value: 0 - label: "Read ColorLoopDirection attribute from DUT." command: "readAttribute" attribute: "ColorLoopDirection" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4003 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4003 && CC.S.C44.Rsp response: value: 0 - label: "Read ColorLoopTime attribute from DUT." command: "readAttribute" attribute: "ColorLoopTime" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4004 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4004 && CC.S.C44.Rsp response: value: 30 - label: "Read ColorLoopStartEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStartEnhancedHue" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4005 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp response: value: 160 @@ -139,14 +146,14 @@ tests: - label: "Read ColorLoopActive attribute from DUT." command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4002 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp response: value: 1 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4006 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4006 && CC.S.C40.Rsp response: value: 16384 @@ -161,17 +168,17 @@ tests: - label: "Read ColorLoopStartEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStartEnhancedHue" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4005 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp response: saveAs: ColorLoopStartEnhancedHueValue - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 + type: int16u minValue: ColorLoopStartEnhancedHueValue maxValue: 65535 @@ -186,10 +193,10 @@ tests: - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 + type: int16u minValue: ColorLoopStartEnhancedHueValue maxValue: 65535 @@ -216,7 +223,7 @@ tests: - label: "Read ColorLoopDirection attribute from DUT." command: "readAttribute" attribute: "ColorLoopDirection" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4003 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4003 && CC.S.C44.Rsp response: value: 1 @@ -231,17 +238,17 @@ tests: - label: "Read ColorLoopStartEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStartEnhancedHue" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4005 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp response: saveAs: ColorLoopStartEnhancedHue - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 + type: int16u minValue: ColorLoopStartEnhancedHue maxValue: 65535 @@ -256,10 +263,10 @@ tests: - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 + type: int16u minValue: ColorLoopStartEnhancedHue maxValue: 65535 @@ -286,13 +293,13 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4002 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp response: value: 0 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT." command: "readAttribute" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4006 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4006 && CC.S.C44.Rsp attribute: "ColorLoopStoredEnhancedHue" response: saveAs: ColorLoopStoredEnhancedHueValue @@ -300,7 +307,7 @@ tests: - label: "Read EnhancedCurrentHue attribute from DUT." command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp response: value: ColorLoopStoredEnhancedHueValue diff --git a/src/app/tests/suites/certification/Test_TC_CC_9_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_9_3.yaml index 413036ca4df292..771c1c1b265790 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_9_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_9_3.yaml @@ -67,6 +67,13 @@ tests: - name: "ms" value: 1000 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.A000f && CC.S.F02 && CC.S.F01 + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" PICS: CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp @@ -90,28 +97,28 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4002 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp response: value: 0 - label: "Read ColorLoopDirection attribute from DUT." command: "readAttribute" attribute: "ColorLoopDirection" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4003 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4003 && CC.S.C44.Rsp response: value: 0 - label: "Read ColorLoopTime attribute from DUT." command: "readAttribute" attribute: "ColorLoopTime" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4004 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4004 && CC.S.C44.Rsp response: value: 30 - label: "Read ColorLoopStartEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStartEnhancedHue" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4005 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp response: value: 160 @@ -138,14 +145,14 @@ tests: - label: "Read ColorLoopActive attribute from DUT." command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4002 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp response: value: 1 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4006 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4006 && CC.S.C40.Rsp response: value: 16384 @@ -160,17 +167,17 @@ tests: - label: "Read ColorLoopStartEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStartEnhancedHue" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4005 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp response: saveAs: ColorLoopStartEnhancedHueValue - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 + type: int16u minValue: ColorLoopStartEnhancedHueValue maxValue: 65535 @@ -185,10 +192,10 @@ tests: - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 + type: int16u minValue: ColorLoopStartEnhancedHueValue maxValue: 65535 @@ -215,7 +222,7 @@ tests: - label: "Read ColorLoopTime attribute from DUT." command: "readAttribute" attribute: "ColorLoopTime" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4004 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4004 && CC.S.C44.Rsp response: value: 60 @@ -230,10 +237,10 @@ tests: - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -248,10 +255,10 @@ tests: - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -278,21 +285,21 @@ tests: - label: "Read ColorLoopActive attribute from DUT" command: "readAttribute" attribute: "ColorLoopActive" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4002 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp response: value: 0 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4006 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4006 && CC.S.C44.Rsp response: saveAs: ColorLoopStoredEnhancedHueValue - label: "Read EnhancedCurrentHue attribute from DUT." command: "readAttribute" attribute: "EnhancedCurrentHue" - PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 + PICS: CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp response: value: ColorLoopStoredEnhancedHueValue diff --git a/src/app/tests/suites/certification/Test_TC_CGEN_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CGEN_1_1.yaml index 983145e592e4b8..77e61062328056 100644 --- a/src/app/tests/suites/certification/Test_TC_CGEN_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CGEN_1_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -42,7 +42,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_CGEN_2_1.yaml b/src/app/tests/suites/certification/Test_TC_CGEN_2_1.yaml index 9f318bb7e44166..c31563daf2a7ff 100644 --- a/src/app/tests/suites/certification/Test_TC_CGEN_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CGEN_2_1.yaml @@ -37,7 +37,7 @@ tests: attribute: "Breadcrumb" response: constraints: - type: uint64 + type: int64u - label: "TH1 writes the BreadCrumb attribute as 1 to the DUT" PICS: CGEN.S.A0000 @@ -88,4 +88,4 @@ tests: attribute: "SupportsConcurrentConnection" response: constraints: - type: bool + type: boolean diff --git a/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml b/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml index cbeacb670c8dbb..95dfa5593d8b90 100644 --- a/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml @@ -35,7 +35,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" PICS: CHANNEL.S.CL || CHANNEL.S.LI @@ -43,12 +43,11 @@ tests: attribute: "FeatureMap" response: constraints: - type: map32 + type: bitmap32 minValue: 0 maxValue: 3 - label: "Read the global attribute: AttributeList" - PICS: CHANNEL.S.A0000 && CHANNEL.S.A0001 && CHANNEL.S.A0002 command: "readAttribute" attribute: "AttributeList" response: @@ -112,6 +111,15 @@ tests: type: list contains: [3] + - label: "Read the global attribute: GeneratedCommandList" + PICS: " !CHANNEL.S.C01.Tx " + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list + - label: "Read the global attribute: GeneratedCommandList" PICS: CHANNEL.S.C01.Tx command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_CHANNEL_5_2.yaml b/src/app/tests/suites/certification/Test_TC_CHANNEL_5_2.yaml index 907eb82d7b032d..9e4cf9a9ea418b 100644 --- a/src/app/tests/suites/certification/Test_TC_CHANNEL_5_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CHANNEL_5_2.yaml @@ -19,10 +19,10 @@ config: cluster: "Channel" endpoint: 1 majornumber: - type: INT16U + type: int16u defaultValue: 9 minornumber: - type: INT16U + type: int16u defaultValue: 1 tests: @@ -55,7 +55,7 @@ tests: - label: "Verify that the channel has changed on the device" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && CHANNEL.S.C02.Rsp arguments: values: - name: "message" diff --git a/src/app/tests/suites/certification/Test_TC_CHANNEL_5_3.yaml b/src/app/tests/suites/certification/Test_TC_CHANNEL_5_3.yaml index bc1d705bd0daab..f23782ec436c38 100644 --- a/src/app/tests/suites/certification/Test_TC_CHANNEL_5_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CHANNEL_5_3.yaml @@ -19,10 +19,10 @@ config: cluster: "Channel" endpoint: 1 majornumber: - type: INT16U + type: int16u defaultValue: 9 minornumber: - type: INT16U + type: int16u defaultValue: 1 tests: @@ -69,7 +69,7 @@ tests: - label: "Verify that the channel has changed on the device" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && CHANNEL.S.C03.Rsp arguments: values: - name: "message" @@ -84,4 +84,4 @@ tests: response: value: [majorNumber: majornumber, minorNumber: minornumber + 1] constraints: - type: list + type: ChannelInfo diff --git a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_10_1.yaml b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_10_1.yaml index c068e3ec2618d0..f2a2d722d37d95 100644 --- a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_10_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_10_1.yaml @@ -42,4 +42,4 @@ tests: attribute: "SupportedStreamingProtocols" response: constraints: - type: map32 + type: bitmap32 diff --git a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml index 706496f82a2721..6ee6404350dc37 100644 --- a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml @@ -36,7 +36,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" PICS: CONTENTLAUNCHER.S.CS || CONTENTLAUNCHER.S.UP @@ -44,7 +44,7 @@ tests: attribute: "FeatureMap" response: constraints: - type: map32 + type: bitmap32 minValue: 0 maxValue: 3 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 d5e124bd904ae6..4b5f223fce099a 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 @@ -118,7 +118,8 @@ tests: - label: "TH scans and finds the DUT SSID" PICS: MCORE.DD.WIFI verification: | - BLOCKED: SoftAP commissioning not currently supported on TH=chip-tool + Out of Scope for V1.0 + SoftAP commissioning not currently supported on TH=chip-tool disabled: true - label: @@ -127,18 +128,105 @@ tests: (or reset manually)" PICS: MCORE.DD.WIFI verification: | - BLOCKED: SoftAP commissioning not currently supported on TH=chip-tool + Out of Scope for V1.0 + SoftAP commissioning not currently supported on TH=chip-tool disabled: true - label: "TH scans and finds the DUT SSID" - PICS: MCORE.DD.WIFI && MCORE.DD.IE + PICS: MCORE.DD.WIFI & MCORE.DD.IE verification: | - BLOCKED: SoftAP commissioning not currently supported on TH=chip-tool + Out of Scope for V1.0 + SoftAP commissioning not currently supported on TH=chip-tool disabled: true - - label: "TH is connected to the DUT through an Ethernet connection" + - label: + "TH and DUT are connected to the same network and the DUT is sending + mandatory Commissionable Node Discovery service records over DNS-SD." verification: | - $ ./out/chip-tool/chip-tool discover commissionables + $ ./chip-tool discover commissionables + + Example output using all-clusters-app's advertisements: + [1651256405894] [18453:593886] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.2 + [1651256405894] [18453:593886] CHIP: [DIS] Vendor ID: 65521 + [1651256405894] [18453:593886] CHIP: [DIS] Product ID: 32769 + [1651256405894] [18453:593886] CHIP: [DIS] Long Discriminator: 3840 + [1651256405894] [18453:593886] CHIP: [DIS] Pairing Hint: 33 + [1651256405894] [18453:593886] CHIP: [DIS] Hostname: DCA6328D2B9F0000 + [1651256405894] [18453:593886] CHIP: [DIS] Instance Name: 8FFEE04E82830E26 + [1651256405894] [18453:593886] CHIP: [DIS] IP Address #1: fd54:23a1:c6de:4637:dea6:32ff:fe8d:2b9f + [1651256405894] [18453:593886] CHIP: [DIS] IP Address #2: fe80::dea6:32ff:fe8d:2b9f + [1651256405894] [18453:593886] CHIP: [DIS] IP Address #3: fe80::dea6:32ff:fe8d:2ba0 + [1651256405894] [18453:593886] CHIP: [DIS] IP Address #4: 192.168.1.2 + [1651256405894] [18453:593886] CHIP: [DIS] Port: 5540 + [1651256405894] [18453:593886] CHIP: [DIS] Commissioning Mode: 1 + [1651256405894] [18453:593886] CHIP: [DIS] Mrp Interval idle: 5000 ms + [1651256405894] [18453:593886] CHIP: [DIS] Mrp Interval active: 300 ms + disabled: true + + - label: + "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 && MCORE.DD.TXT_KEY_DT && MCORE.DD.TXT_KEY_DN && + MCORE.DD.TXT_KEY_RI && MCORE.DD.TXT_KEY_PH && MCORE.DD.TXT_KEY_PI + verification: | + $ ./chip-tool discover commissionables + + Example output using all-clusters-app's advertisements: + [1657218902314] [29617:16663220] CHIP: [DL] Browsing for: _matterc._udp + [1657218902488] [29617:16663220] CHIP: [DL] Mdns: OnBrowseAdd name: 5B4185091B6CAD28, type: _matterc._udp., domain: local., interface: 7 + [1657218902488] [29617:16663220] CHIP: [DL] Resolve type=_matterc._udp name=5B4185091B6CAD28 interface=7 + [1657218902489] [29617:16663220] CHIP: [DL] Mdns : OnNewInterface hostname:DCA6328D2B9F0000.local. fullname:5B4185091B6CAD28._matterc._udp.local. interface: 7 + [1657218902490] [29617:16663220] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:fd54:23a1:c6de:4637:4c4:ee82:2a0f:b5e2 + [1657218902490] [29617:16663220] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:fe80::1e81:3e0:3865:2d29 + [1657218902490] [29617:16663220] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.10 + [1657218902490] [29617:16663220] CHIP: [DIS] Hostname: DCA6328D2B9F0000 + [1657218902490] [29617:16663220] CHIP: [DIS] IP Address #1: fd54:23a1:c6de:4637:4c4:ee82:2a0f:b5e2 + [1657218902490] [29617:16663220] CHIP: [DIS] IP Address #2: fe80::1e81:3e0:3865:2d29 + [1657218902490] [29617:16663220] CHIP: [DIS] IP Address #3: 192.168.1.10 + [1657218902490] [29617:16663220] CHIP: [DIS] Port: 5540 + [1657218902490] [29617:16663220] CHIP: [DIS] Mrp Interval idle: 5000 ms + [1657218902490] [29617:16663220] CHIP: [DIS] Mrp Interval active: 300 ms + [1657218902490] [29617:16663220] CHIP: [DIS] Vendor ID: 65521 + [1657218902490] [29617:16663220] CHIP: [DIS] Product ID: 32769 + [1657218902490] [29617:16663220] CHIP: [DIS] Long Discriminator: 3840 + [1657218902490] [29617:16663220] CHIP: [DIS] Pairing Hint: 33 + [1657218902490] [29617:16663220] CHIP: [DIS] Instance Name: 5B4185091B6CAD28 + [1657218902490] [29617:16663220] CHIP: [DIS] Commissioning Mode: 1 + + + OR + 1. User a dns-sd records browser + $ avahi-browse _matterc._udp -r + + Example output using all-clusters-app's advertisements: + + eth0 IPv6 1E36C55245E2908D _matterc._udp local + = eth0 IPv6 1E36C55245E2908D _matterc._udp local + hostname = [DCA6328D2B9F0000.local] + address = [192.168.1.10] + port = [5540] + txt = ["PI=" "PH=33" "CM=1" "D=3840" "T=1" "SAI=300" "SII=5000" "VP=65521+32769"] + disabled: true + + - label: "Place the DUT device into a non-commissionable state" + PICS: MCORE.DD.EXTENDED_DISCOVERY + verification: | + 1. Vendor specific, take DUT out of commissioning mode + + 2. Use a dns-sd browser to check for _CM subtype. Should be empty. + $ dns-sd -B _matterc._udp,_CM + Browsing for _matterc._udp,_CM + DATE: ---Thu 07 Jul 2022--- + 11:51:34.814 ...STARTING... + disabled: true + + - label: + "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 + + Example output using all-clusters-app's advertisements: [1651256405894] [18453:593886] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.2 [1651256405894] [18453:593886] CHIP: [DIS] Vendor ID: 65521 [1651256405894] [18453:593886] CHIP: [DIS] Product ID: 32769 @@ -155,3 +243,81 @@ tests: [1651256405894] [18453:593886] CHIP: [DIS] Mrp Interval idle: 5000 ms [1651256405894] [18453:593886] CHIP: [DIS] Mrp Interval active: 300 ms disabled: true + + - label: + "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')" + verification: | + $ dns-sd -B _services._dns-sd._udp + + Example output using all-clusters-app's advertisements: + 11:30:36.040 Add 3 7 . _sub.local. _L3840 + 11:30:36.040 Add 3 7 . _sub.local. _S15 + 11:30:36.040 Add 2 7 . _sub.local. _CM + disabled: true + + - label: + "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')" + PICS: MCORE.DD.COMMISSIONING_SUBTYPE_V && MCORE.DD.COMMISSIONING_SUBTYPE_T + verification: | + $ dns-sd -B _services._dns-sd._udp + + Example output using all-clusters-app's advertisements: + 11:56:29.770 Add 3 7 . _sub.local. _V65521 + disabled: true + + - label: "Place the DUT device into Commissioning mode" + verification: | + $ ./chip-tool discover commissionables + + Example output using all-clusters-app's advertisements: + [1651256405894] [18453:593886] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.2 + [1651256405894] [18453:593886] CHIP: [DIS] Vendor ID: 65521 + [1651256405894] [18453:593886] CHIP: [DIS] Product ID: 32769 + [1651256405894] [18453:593886] CHIP: [DIS] Long Discriminator: 3840 + [1651256405894] [18453:593886] CHIP: [DIS] Pairing Hint: 33 + [1651256405894] [18453:593886] CHIP: [DIS] Hostname: DCA6328D2B9F0000 + [1651256405894] [18453:593886] CHIP: [DIS] Instance Name: 8FFEE04E82830E26 + [1651256405894] [18453:593886] CHIP: [DIS] IP Address #1: fd54:23a1:c6de:4637:dea6:32ff:fe8d:2b9f + [1651256405894] [18453:593886] CHIP: [DIS] IP Address #2: fe80::dea6:32ff:fe8d:2b9f + [1651256405894] [18453:593886] CHIP: [DIS] IP Address #3: fe80::dea6:32ff:fe8d:2ba0 + [1651256405894] [18453:593886] CHIP: [DIS] IP Address #4: 192.168.1.2 + [1651256405894] [18453:593886] CHIP: [DIS] Port: 5540 + [1651256405894] [18453:593886] CHIP: [DIS] Commissioning Mode: 1 + [1651256405894] [18453:593886] CHIP: [DIS] Mrp Interval idle: 5000 ms + [1651256405894] [18453:593886] CHIP: [DIS] Mrp Interval active: 300 ms + disabled: true + + - label: + "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: | + $ ./chip-tool discover commissionables + + [1657220492275] [29906:16679893] CHIP: [DL] Browsing for: _matterc._udp + [1657220492275] [29906:16679893] CHIP: [DL] Mdns: OnBrowseAdd name: 74AFA51731B2E373, type: _matterc._udp., domain: local., interface: 7 + [1657220492275] [29906:16679893] CHIP: [DL] Resolve type=_matterc._udp name=74AFA51731B2E373 interface=7 + [1657220492276] [29906:16679893] CHIP: [DL] Mdns : OnNewInterface hostname:DCA6328D2B9F0000.local. fullname:74AFA51731B2E373._matterc._udp.local. interface: 7 + [1657220492277] [29906:16679893] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:fd54:23a1:c6de:4637:4c4:ee82:2a0f:b5e2 + [1657220492277] [29906:16679893] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:fe80::1e81:3e0:3865:2d29 + [1657220492277] [29906:16679893] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.10 + [1657220492277] [29906:16679893] CHIP: [DIS] Hostname: DCA6328D2B9F0000 + [1657220492277] [29906:16679893] CHIP: [DIS] IP Address #1: fd54:23a1:c6de:4637:4c4:ee82:2a0f:b5e2 + [1657220492277] [29906:16679893] CHIP: [DIS] IP Address #2: fe80::1e81:3e0:3865:2d29 + [1657220492277] [29906:16679893] CHIP: [DIS] IP Address #3: 192.168.1.10 + [1657220492277] [29906:16679893] CHIP: [DIS] Port: 5540 + [1657220492277] [29906:16679893] CHIP: [DIS] Mrp Interval idle: 5000 ms + [1657220492277] [29906:16679893] CHIP: [DIS] Mrp Interval active: 300 ms + [1657220492277] [29906:16679893] CHIP: [DIS] Vendor ID: 65521 + [1657220492277] [29906:16679893] CHIP: [DIS] Product ID: 32769 + [1657220492277] [29906:16679893] CHIP: [DIS] Long Discriminator: 3840 + [1657220492277] [29906:16679893] CHIP: [DIS] Pairing Hint: 33 + [1657220492277] [29906:16679893] CHIP: [DIS] Instance Name: 74AFA51731B2E373 + [1657220492277] [29906:16679893] CHIP: [DIS] Commissioning Mode: 1 + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DD_2_2.yaml index 8812465160b3c8..21f2b82ea65b68 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_2_2.yaml @@ -23,46 +23,44 @@ config: endpoint: 0 tests: - - label: - "If (PICS_BLE) TH starts matter announcement procedure using BLE - transport" + - label: "TH starts matter announcement procedure using BLE transport" PICS: MCORE.DD.BLE verification: | - $ ./out/all-clusters-app/chip-all-clusters-app --wifi --discriminator 3841 + $ ./out/ble/chip-all-clusters-app --ble-device 1 --discriminator 3841 - [1653087913.247229][8083:8083] CHIP:SVR: Server Listening... - [1653087913.247636][8083:8083] CHIP:DL: Device Configuration: - [1653087913.248094][8083:8083] CHIP:DL: Serial Number: TEST_SN - [1653087913.248608][8083:8083] CHIP:DL: Vendor Id: 65521 (0xFFF1) - [1653087913.249146][8083:8083] CHIP:DL: Product Id: 32769 (0x8001) - [1653087913.249610][8083:8083] CHIP:DL: Hardware Version: 0 - [1653087913.250082][8083:8083] CHIP:DL: Setup Pin Code (0 for UNKNOWN/ERROR): 20202021 - [1653087913.250739][8083:8083] CHIP:DL: Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3841 (0xF01) - [1653087913.251234][8083:8083] CHIP:DL: Manufacturing Date: (not set) - [1653087913.251732][8083:8083] CHIP:DL: Device Type: 65535 (0xFFFF) - [1653087913.252171][8083:8083] CHIP:SVR: SetupQRCode: [MT:-24J048N01KA0648G00] - [1653087913.252710][8083:8083] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: - [1653087913.253175][8083:8083] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J048N01KA0648G00 - [1653087913.253681][8083:8083] CHIP:SVR: Manual pairing code: [749701123365521327694] - [1653087913.254268][8083:8083] CHIP:DMG: Endpoint 0, Cluster 0x0000_001D update version to 29f72814 + [1657221603.350406][368108:368108] CHIP:DL: Device Configuration: + [1657221603.350445][368108:368108] CHIP:DL: Serial Number: TEST_SN + [1657221603.350488][368108:368108] CHIP:DL: Vendor Id: 65521 (0xFFF1) + [1657221603.350523][368108:368108] CHIP:DL: Product Id: 32769 (0x8001) + [1657221603.350555][368108:368108] CHIP:DL: Hardware Version: 0 + [1657221603.350579][368108:368108] CHIP:DL: Setup Pin Code (0 for UNKNOWN/ERROR): 20202021 + [1657221603.350599][368108:368108] CHIP:DL: Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3841 (0xF01) + [1657221603.350627][368108:368108] CHIP:DL: Manufacturing Date: (not set) + [1657221603.350649][368108:368108] CHIP:DL: Device Type: 65535 (0xFFFF) + [1657221603.350684][368108:368108] CHIP:SVR: SetupQRCode: [MT:-24J048N01KA0648G00] + [1657221603.350719][368108:368108] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: + [1657221603.350739][368108:368108] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J048N01KA0648G00 + [1657221603.350773][368108:368108] CHIP:SVR: Manual pairing code: [749701123365521327694] + [1657221603.350846][368108:368108] CHIP:DMG: Endpoint 0, Cluster 0x0000_001D update version to 4dd11284 + [1657221603.353048][368108:368113] CHIP:DL: TRACE: Bluez mainloop starting Thread + [1657221603.353167][368108:368111] CHIP:DL: TRACE: Bus acquired for name MATTER-3841 disabled: true - label: - "If (PICS_BLE) DUT starts BLE scan across all three advertising - channels with a sufficient dwell time, interval, and overall duration - of scan" + "DUT starts BLE scan across all three advertising channels with a + sufficient dwell time, interval, and overall duration of scan" PICS: MCORE.DD.BLE verification: | 1. Discover commissionables over BLE using DUT=chip-tool pairing - DUT Logs - $ ./out/chip-tool/chip-tool pairing ble-wifi 1 zigbeehome matter123 20202021 3841 + Verify in TH as server side + $ ./chip-tool pairing ble-wifi 1 zigbeehome matter123 20202021 3841 [1651743342.299897][3461:3464] CHIP:BLE: New device scanned: E4:5F:01:0F:1A:02 [1651743342.299951][3461:3464] CHIP:BLE: Device discriminator match. Attempting to connect. [1651743342.303783][3461:3464] CHIP:BLE: Scan complete notification without an active scan. [1651743346.244175][3461:3464] CHIP:DL: ConnectDevice complete - TH Logs + Verify in DUT as client side [1651743346.152716][5072:5075] CHIP:DL: Device E4:5F:01:0F:3B:B1 (Path: /org/bluez/hci0/dev_E4_5F_01_0F_3B_B1) Connected [1651743347.908807][5072:5075] CHIP:DL: BluezCharacteristicAcquireWrite is called, conn: 0xffffa0043700 [1651743347.911151][5072:5075] CHIP:DL: c1 BluezCharacteristicWriteFD mtu, 517 @@ -108,19 +106,19 @@ tests: [1651743348.446962][5072:5072] CHIP:SVR: Commissioning completed session establishment step disabled: true - - label: "If (PICS_BLE) DUT starts scan in background using BLE transport" + - label: "DUT starts scan in background using BLE transport" PICS: MCORE.DD.BLE verification: | 1. Discover commissionables over BLE using DUT=chip-tool pairing command - DUT Logs - $ ./out/chip-tool/chip-tool pairing ble-wifi 1 zigbeehome matter123 20202021 3841 + Verify in TH as server side + $ ./chip-tool pairing ble-wifi 1 zigbeehome matter123 20202021 3841 [1651743342.299897][3461:3464] CHIP:BLE: New device scanned: E4:5F:01:0F:1A:02 [1651743342.299951][3461:3464] CHIP:BLE: Device discriminator match. Attempting to connect. [1651743342.303783][3461:3464] CHIP:BLE: Scan complete notification without an active scan. [1651743346.244175][3461:3464] CHIP:DL: ConnectDevice complete - TH Logs + Verify in DUT as client side [1651743346.152716][5072:5075] CHIP:DL: Device E4:5F:01:0F:3B:B1 (Path: /org/bluez/hci0/dev_E4_5F_01_0F_3B_B1) Connected [1651743347.908807][5072:5075] CHIP:DL: BluezCharacteristicAcquireWrite is called, conn: 0xffffa0043700 [1651743347.911151][5072:5075] CHIP:DL: c1 BluezCharacteristicWriteFD mtu, 517 @@ -166,11 +164,12 @@ tests: [1651743348.446962][5072:5072] CHIP:SVR: Commissioning completed session establishment step disabled: true - - label: "If (PICS_BLE) TH starts matter announcement using BLE transport" + - label: "TH starts matter announcement using BLE transport" PICS: MCORE.DD.BLE verification: | $ ./out/all-clusters-app/chip-all-clusters-app --wifi --discriminator 3841 + Verify in TH as server side [1653087913.247229][8083:8083] CHIP:SVR: Server Listening... [1653087913.247636][8083:8083] CHIP:DL: Device Configuration: [1653087913.248094][8083:8083] CHIP:DL: Serial Number: TEST_SN @@ -183,45 +182,114 @@ tests: [1653087913.251732][8083:8083] CHIP:DL: Device Type: 65535 (0xFFFF) [1653087913.252171][8083:8083] CHIP:SVR: SetupQRCode: [MT:-24J048N01KA0648G00] [1653087913.252710][8083:8083] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code: - [1653087913.253175][8083:8083] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J048N01KA0648G00 + [1653087913.253175][8083:8083] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J048N01KA0648G00 [1653087913.253681][8083:8083] CHIP:SVR: Manual pairing code: [749701123365521327694] [1653087913.254268][8083:8083] CHIP:DMG: Endpoint 0, Cluster 0x0000_001D update version to 29f72814 disabled: true - - label: - "If (PICS_WIFI) TH starts SoftAP and begin matter announcement - procedure" - PICS: MCORE.DD.WIFI + - label: "TH starts matter announcement using BLE transport" + PICS: MCORE.DD.BLE verification: | - BLOCKED: SoftAP commissioning not currently supported on DUT=chip-tool + 1. Discover commissionables over BLE using DUT=chip-tool pairing command + + Verify in TH as server side + $ ./chip-tool pairing ble-wifi 1 zigbeehome matter123 20202021 3841 + [1651743342.299897][3461:3464] CHIP:BLE: New device scanned: E4:5F:01:0F:1A:02 + [1651743342.299951][3461:3464] CHIP:BLE: Device discriminator match. Attempting to connect. + [1651743342.303783][3461:3464] CHIP:BLE: Scan complete notification without an active scan. + [1651743346.244175][3461:3464] CHIP:DL: ConnectDevice complete + + Verify in DUT as client side + [1651743346.152716][5072:5075] CHIP:DL: Device E4:5F:01:0F:3B:B1 (Path: /org/bluez/hci0/dev_E4_5F_01_0F_3B_B1) Connected + [1651743347.908807][5072:5075] CHIP:DL: BluezCharacteristicAcquireWrite is called, conn: 0xffffa0043700 + [1651743347.911151][5072:5075] CHIP:DL: c1 BluezCharacteristicWriteFD mtu, 517 + [1651743347.911349][5072:5075] CHIP:BLE: Write request received debug 0xffffa0043700 + [1651743347.911754][5072:5072] CHIP:BLE: local and remote recv window sizes = 6 + [1651743347.911829][5072:5072] CHIP:BLE: selected BTP version 4 + [1651743347.911877][5072:5072] CHIP:BLE: using BTP fragment sizes rx 244 / tx 244. + [1651743348.006770][5072:5075] CHIP:DL: CHIPoBLE subscribe received + [1651743348.007026][5072:5072] CHIP:IN: BLE EndPoint 0xaaaab7bb3c20 Connection Complete + [1651743348.007132][5072:5072] CHIP:DL: HandlePlatformSpecificBLEEvent 32778 + [1651743348.007196][5072:5072] CHIP:DL: Receive kCHIPoBLEConnectionEstablished + [1651743348.150980][5072:5075] CHIP:BLE: Indication confirmation, 0xffffa0043700 + [1651743348.199997][5072:5075] CHIP:DL: c1 BluezCharacteristicWriteFD mtu, 517 + [1651743348.200614][5072:5075] CHIP:BLE: Write request received debug 0xffffa0043700 + [1651743348.201013][5072:5072] CHIP:EM: Received message of type 0x20 with protocolId (0, 0) and MessageCounter:3306320356 on exchange 29381r + [1651743348.201117][5072:5072] CHIP:EM: Handling via exchange: 29381r, Delegate: 0xaaaab7bb2a90 + [1651743348.201191][5072:5072] CHIP:SC: Received PBKDF param request + [1651743348.201280][5072:5072] CHIP:SC: Peer assigned session ID 14881 + [1651743348.201349][5072:5072] CHIP:SC: Found MRP parameters in the message + [1651743348.201520][5072:5072] CHIP:SC: Including MRP parameters in PBKDF param response + [1651743348.201884][5072:5072] CHIP:IN: Prepared unauthenticated message 0xffffdcf2ef78 to 0x0000000000000000 (0) of type 0x21 and protocolId (0, 0) on exchange 29381r with MessageCounter:2627159088. + [1651743348.201989][5072:5072] CHIP:IN: Sending unauthenticated msg 0xffffdcf2ef78 with MessageCounter:2627159088 to 0x0000000000000000 at monotonic time: 0000000000FF6731 msec + [1651743348.202196][5072:5072] CHIP:SC: Sent PBKDF param response + [1651743348.298384][5072:5075] CHIP:BLE: Indication confirmation, 0xffffa0043700 + [1651743348.299274][5072:5075] CHIP:DL: c1 BluezCharacteristicWriteFD mtu, 517 + [1651743348.300132][5072:5075] CHIP:BLE: Write request received debug 0xffffa0043700 + [1651743348.300571][5072:5072] CHIP:EM: Received message of type 0x22 with protocolId (0, 0) and MessageCounter:3306320357 on exchange 29381r + [1651743348.300655][5072:5072] CHIP:EM: Found matching exchange: 29381r, Delegate: 0xaaaab7bb2a90 + [1651743348.300741][5072:5072] CHIP:SC: Received spake2p msg1 + [1651743348.304696][5072:5072] CHIP:IN: Prepared unauthenticated message 0xffffdcf2ee58 to 0x0000000000000000 (0) of type 0x23 and protocolId (0, 0) on exchange 29381r with MessageCounter:2627159089. + [1651743348.304817][5072:5072] CHIP:IN: Sending unauthenticated msg 0xffffdcf2ee58 with MessageCounter:2627159089 to 0x0000000000000000 at monotonic time: 0000000000FF6798 msec + [1651743348.305007][5072:5072] CHIP:SC: Sent spake2p msg2 + [1651743348.444144][5072:5075] CHIP:BLE: Indication confirmation, 0xffffa0043700 + [1651743348.444992][5072:5075] CHIP:DL: c1 BluezCharacteristicWriteFD mtu, 517 + [1651743348.445608][5072:5075] CHIP:BLE: Write request received debug 0xffffa0043700 + [1651743348.445888][5072:5072] CHIP:EM: Received message of type 0x24 with protocolId (0, 0) and MessageCounter:3306320358 on exchange 29381r + [1651743348.445943][5072:5072] CHIP:EM: Found matching exchange: 29381r, Delegate: 0xaaaab7bb2a90 + [1651743348.446001][5072:5072] CHIP:SC: Received spake2p msg3 + [1651743348.446130][5072:5072] CHIP:SC: Sending status report. Protocol code 0, exchange 29381 + [1651743348.446202][5072:5072] CHIP:IN: Prepared unauthenticated message 0xffffdcf2eea8 to 0x0000000000000000 (0) of type 0x40 and protocolId (0, 0) on exchange 29381r with MessageCounter:2627159090. + [1651743348.446262][5072:5072] CHIP:IN: Sending unauthenticated msg 0xffffdcf2eea8 with MessageCounter:2627159090 to 0x0000000000000000 at monotonic time: 0000000000FF6825 msec + [1651743348.446452][5072:5072] CHIP:IN: New secure session created for device , LSID:2138 PSID:14881! + [1651743348.446962][5072:5072] CHIP:SVR: Commissioning completed session establishment step + disabled: true + + - label: "TH starts SoftAP and begin matter announcement procedure" + PICS: MCORE.DD.DISCOVERY_SOFTAP + verification: | + Out of Scope V1.0 + SoftAP commissioning not currently supported on TH=all-clusters-app disabled: true - label: - "If (PICS_WIFI) DUT starts Wi-Fi scan of all 2.4 GHz Wi-Fi channels - allowed per its operational regulatory domain (channels 1, 6, and 11 - are preferred)" - PICS: MCORE.DD.WIFI + "DUT starts Wi-Fi scan of all 2.4 GHz Wi-Fi channels allowed per its + operational regulatory domain (channels 1, 6, and 11 are preferred)" + PICS: MCORE.DD.DISCOVERY_SOFTAP verification: | - BLOCKED: SoftAP commissioning not currently supported on DUT=chip-tool + Out of Scope V1.0 + SoftAP commissioning not currently supported on TH=all-clusters-app disabled: true - - label: "If (PICS_WIFI) DUT scans using Wi-Fi in background" - PICS: MCORE.DD.WIFI + - label: "DUT scans using Wi-Fi in background" + PICS: MCORE.DD.DISCOVERY_SOFTAP verification: | - BLOCKED: SoftAP commissioning not currently supported on DUT=chip-tool + Out of Scope V1.0 + SoftAP commissioning not currently supported on TH=all-clusters-app disabled: true - - label: - "If (PICS_WIFI) TH starts SoftAP and begin matter announcement - procedure" - PICS: MCORE.DD.WIFI + - label: "TH starts SoftAP and begin matter announcement procedure" + PICS: MCORE.DD.DISCOVERY_SOFTAP verification: | - BLOCKED: SoftAP commissioning not currently supported on DUT=chip-tool + Out of Scope V1.0 + SoftAP commissioning not currently supported on TH=all-clusters-app disabled: true - - label: "DUT performs service discovery using DNS-SD" + - label: "TH starts SoftAP and begin matter announcement procedure" + PICS: MCORE.DD.DISCOVERY_SOFTAP verification: | - $ ./out/chip-tool/chip-tool discover commissionables + Out of Scope V1.0 + SoftAP commissioning not currently supported on TH=all-clusters-app + disabled: true + + - label: + "With DUT and TH connected to the same network over IP, DUT performs + service discovery using DNS-SD" + verification: | + 1. TH is in commissioning mode and discoverable by DUT over IP through DNS-SD advertisements + + Verify in DUT as client side + $ ./chip-tool discover commissionables [1651256405894] [18453:593886] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.2 [1651256405894] [18453:593886] CHIP: [DIS] Vendor ID: 65521 [1651256405894] [18453:593886] CHIP: [DIS] Product ID: 32769 diff --git a/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml index de618503146889..1b76ec8d242429 100644 --- a/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml @@ -35,7 +35,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -43,7 +43,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" 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 6751b292a96e2b..a3d2b4280a4391 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 @@ -13,7 +13,7 @@ # 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: 81.2. [TC-DESC-2.1] Descriptor Cluster Attributes with DUT as Server +name: 84.2.1. [TC-DESC-2.1] Descriptor Cluster Attributes [DUT-Server] config: nodeId: 0x12344321 @@ -21,10 +21,15 @@ config: endpoint: 0 tests: - - label: "TH reads DeviceTypeList attribute from DUT." + - label: + "TH reads DeviceTypeList and PartsList attributes from DUT for + Endpoint 0" + PICS: DESC.S.A0000 && DESC.S.A0004 && DESC.S.A0003 verification: | ./chip-tool descriptor read device-list 1 0 + Verify on the TH Log: + [1641454498.809603][16120:16125] CHIP:TOO: Descriptor.DeviceList response: 1 entries [1641454498.809737][16120:16125] CHIP:TOO: [1]: { [1641454498.809780][16120:16125] CHIP:TOO: Type: 22 @@ -33,51 +38,79 @@ tests: [1641454498.809938][16120:16125] CHIP:EM: Sending Standalone Ack for MessageCounter:52943 on exchange 24061i disabled: true - - label: "TH reads 'ServerList' attribute. Refer to Precondition " + - label: + "TH reads DeviceTypeList and PartsList attributes from DUT for each + Endpoint supported by DUT (except Endpoint 0)." + PICS: DESC.S.A0000 && DESC.S.A0004 && DESC.S.A0003 + verification: | + ./chip-tool descriptor read device-list 1 1 + + Verify on the TH Log: + + + [1657200303.724408][2509:2514] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1624758542 + [1657200303.724508][2509:2514] CHIP:TOO: device list: 1 entries + [1657200303.724565][2509:2514] CHIP:TOO: [1]: { + [1657200303.724594][2509:2514] CHIP:TOO: Type: 256 + [1657200303.724621][2509:2514] CHIP:TOO: Revision: 1 + [1657200303.724647][2509:2514] CHIP:TOO: } + disabled: true + + - label: 'TH reads "ServerList" attribute.' + PICS: DESC.S.A0001 verification: | ./chip-tool descriptor read server-list 1 0 - [1650281763.417848][9672:9678] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 1976976904 - [1650281763.417958][9672:9678] CHIP:TOO: server list: 25 entries - [1650281763.418002][9672:9678] CHIP:TOO: [1]: 3 - [1650281763.418028][9672:9678] CHIP:TOO: [2]: 4 - [1650281763.418053][9672:9678] CHIP:TOO: [3]: 29 - [1650281763.418077][9672:9678] CHIP:TOO: [4]: 30 - [1650281763.418101][9672:9678] CHIP:TOO: [5]: 31 - [1650281763.418125][9672:9678] CHIP:TOO: [6]: 40 - [1650281763.418149][9672:9678] CHIP:TOO: [7]: 42 - [1650281763.418173][9672:9678] CHIP:TOO: [8]: 43 - [1650281763.418197][9672:9678] CHIP:TOO: [9]: 44 - [1650281763.418218][9672:9678] CHIP:TOO: [10]: 45 - [1650281763.418238][9672:9678] CHIP:TOO: [11]: 46 - [1650281763.418257][9672:9678] CHIP:TOO: [12]: 48 - [1650281763.418277][9672:9678] CHIP:TOO: [13]: 49 - [1650281763.418297][9672:9678] CHIP:TOO: [14]: 50 - [1650281763.418316][9672:9678] CHIP:TOO: [15]: 51 - [1650281763.418336][9672:9678] CHIP:TOO: [16]: 52 - [1650281763.418356][9672:9678] CHIP:TOO: [17]: 53 - [1650281763.418382][9672:9678] CHIP:TOO: [18]: 54 - [1650281763.418406][9672:9678] CHIP:TOO: [19]: 55 - [1650281763.418430][9672:9678] CHIP:TOO: [20]: 60 - [1650281763.418454][9672:9678] CHIP:TOO: [21]: 62 - [1650281763.418478][9672:9678] CHIP:TOO: [22]: 63 - [1650281763.418502][9672:9678] CHIP:TOO: [23]: 64 - [1650281763.418526][9672:9678] CHIP:TOO: [24]: 65 - [1650281763.418550][9672:9678] CHIP:TOO: [25]: 1029 + Verify on the TH Log: + + [1654155402.956829][3701:3706] CHIP:TOO: server list: 26 entries + [1654155402.956863][3701:3706] CHIP:TOO: [1]: 3 + [1654155402.956889][3701:3706] CHIP:TOO: [2]: 4 + [1654155402.956914][3701:3706] CHIP:TOO: [3]: 29 + [1654155402.956939][3701:3706] CHIP:TOO: [4]: 30 + [1654155402.956963][3701:3706] CHIP:TOO: [5]: 31 + [1654155402.956988][3701:3706] CHIP:TOO: [6]: 40 + [1654155402.957012][3701:3706] CHIP:TOO: [7]: 42 + [1654155402.957037][3701:3706] CHIP:TOO: [8]: 43 + [1654155402.957061][3701:3706] CHIP:TOO: [9]: 44 + [1654155402.957086][3701:3706] CHIP:TOO: [10]: 45 + [1654155402.957110][3701:3706] CHIP:TOO: [11]: 46 + [1654155402.957135][3701:3706] CHIP:TOO: [12]: 47 + [1654155402.957159][3701:3706] CHIP:TOO: [13]: 48 + [1654155402.957183][3701:3706] CHIP:TOO: [14]: 49 + [1654155402.957207][3701:3706] CHIP:TOO: [15]: 50 + [1654155402.957231][3701:3706] CHIP:TOO: [16]: 51 + [1654155402.957256][3701:3706] CHIP:TOO: [17]: 52 + [1654155402.957280][3701:3706] CHIP:TOO: [18]: 53 + [1654155402.957304][3701:3706] CHIP:TOO: [19]: 54 + [1654155402.957328][3701:3706] CHIP:TOO: [20]: 55 + [1654155402.957352][3701:3706] CHIP:TOO: [21]: 60 + [1654155402.957376][3701:3706] CHIP:TOO: [22]: 62 + [1654155402.957400][3701:3706] CHIP:TOO: [23]: 63 + [1654155402.957424][3701:3706] CHIP:TOO: [24]: 64 + [1654155402.957449][3701:3706] CHIP:TOO: [25]: 65 + [1654155402.957473][3701:3706] CHIP:TOO: [26]: 1029 disabled: true - - label: "TH reads 'ClientList' attribute" + - label: 'TH reads "ClientList" attribute' + PICS: DESC.S.A0002 verification: | ./chip-tool descriptor read client-list 1 0 + + Verify on the TH Log: + [1650281818.533446][9679:9684] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 1976976904 [1650281818.533514][9679:9684] CHIP:TOO: client list: 1 entries [1650281818.533563][9679:9684] CHIP:TOO: [1]: 41 disabled: true - - label: "TH reads 'PartsList' attribute." + - label: 'TH reads "PartsList" attribute.' + PICS: DESC.S.A0003 verification: | ./chip-tool descriptor read parts-list 1 0 + Verify on the TH Log: + [1641456769.777217][16238:16244] CHIP:DMG: SuppressResponse = true, [1641456769.777267][16238:16244] CHIP:DMG: } [1641456769.777839][16238:16244] CHIP:TOO: Descriptor.PartsList response: 2 entries @@ -85,3 +118,11 @@ tests: [1641456769.777978][16238:16244] CHIP:TOO: [2]: 2 [1641456769.778080][16238:16244] CHIP:EM: Sending Standalone Ack for MessageCounter:2830202 on exchange 38042i disabled: true + + - label: + "The cluster tests applicable to each Device Type should be executed + to make sure all mandatory (and applicable optional) + attributes/commands are implemented." + verification: | + + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DESC_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DESC_2_2.yaml index 8850b14bd322d5..d8ac172d6fde78 100644 --- a/src/app/tests/suites/certification/Test_TC_DESC_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DESC_2_2.yaml @@ -13,7 +13,7 @@ # 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: 81.3. [TC-DESC-2.2] Descriptor Cluster Attributes with DUT as Client +name: 84.2.2. [TC-DESC-2.2] Descriptor Cluster Attributes [DUT-Client] config: nodeId: 0x12344321 @@ -22,95 +22,89 @@ config: tests: - label: "DUT reads DeviceTypeList from TH." + PICS: DESC.C.A0000 verification: | ./chip-tool descriptor read device-list 1 0 - [1651220525.982478][11001:11001] CHIP:EM: Handling via exchange: 13340r, Delegate: 0xaaaaacdc5098 - [1651220525.982545][11001:11001] CHIP:IM: Received Read request - [1651220525.982624][11001:11001] CHIP:DMG: ReadRequestMessage = - [1651220525.982667][11001:11001] CHIP:DMG: { - [1651220525.982703][11001:11001] CHIP:DMG: AttributePathIBs = - [1651220525.982745][11001:11001] CHIP:DMG: [ - [1651220525.982784][11001:11001] CHIP:DMG: AttributePathIB = - [1651220525.982840][11001:11001] CHIP:DMG: { - [1651220525.982892][11001:11001] CHIP:DMG: Endpoint = 0x0, - [1651220525.982948][11001:11001] CHIP:DMG: Cluster = 0x1d, - [1651220525.983005][11001:11001] CHIP:DMG: Attribute = 0x0000_0000, - [1651220525.983054][11001:11001] CHIP:DMG: } - [1651220525.983104][11001:11001] CHIP:DMG: - [1651220525.983149][11001:11001] CHIP:DMG: ], - [1651220525.983195][11001:11001] CHIP:DMG: - [1651220525.983238][11001:11001] CHIP:DMG: isFabricFiltered = true, - [1651220525.983279][11001:11001] CHIP:DMG: InteractionModelRevision = 1 - [1651220525.983318][11001:11001] CHIP:DMG: }, + verify TH(On a reference app) receives the right Read Request Message for the data sent in the above command + + Verify in DUT as client side: + + [1657095358.858070][3443:3448] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2880250959 + [1657095358.858130][3443:3448] CHIP:TOO: device list: 1 entries + [1657095358.858213][3443:3448] CHIP:TOO: [1]: { + [1657095358.858255][3443:3448] CHIP:TOO: Type: 22 + [1657095358.858283][3443:3448] CHIP:TOO: Revision: 1 + [1657095358.858310][3443:3448] CHIP:TOO: } disabled: true - label: "DUT reads ServerList from the TH" + PICS: DESC.C.A0001 verification: | ./chip-tool descriptor read server-list 1 0 - [1651220576.025574][11001:11001] CHIP:IM: Received Read request - [1651220576.025629][11001:11001] CHIP:DMG: ReadRequestMessage = - [1651220576.025655][11001:11001] CHIP:DMG: { - [1651220576.025677][11001:11001] CHIP:DMG: AttributePathIBs = - [1651220576.025703][11001:11001] CHIP:DMG: [ - [1651220576.025728][11001:11001] CHIP:DMG: AttributePathIB = - [1651220576.025763][11001:11001] CHIP:DMG: { - [1651220576.025792][11001:11001] CHIP:DMG: Endpoint = 0x0, - [1651220576.025823][11001:11001] CHIP:DMG: Cluster = 0x1d, - [1651220576.025856][11001:11001] CHIP:DMG: Attribute = 0x0000_0001, - [1651220576.025882][11001:11001] CHIP:DMG: } - [1651220576.025910][11001:11001] CHIP:DMG: - [1651220576.025936][11001:11001] CHIP:DMG: ], - [1651220576.025964][11001:11001] CHIP:DMG: - [1651220576.025990][11001:11001] CHIP:DMG: isFabricFiltered = true, - [1651220576.026015][11001:11001] CHIP:DMG: InteractionModelRevision = 1 - [1651220576.026039][11001:11001] CHIP:DMG: }, + verify TH(On a reference app) receives the right Read Request Message for the data sent in the above command + + Verify in DUT as client side: + + + [1657095388.496869][3451:3456] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 2880250959 + [1657095388.496964][3451:3456] CHIP:TOO: server list: 26 entries + [1657095388.496996][3451:3456] CHIP:TOO: [1]: 3 + [1657095388.497023][3451:3456] CHIP:TOO: [2]: 4 + [1657095388.497049][3451:3456] CHIP:TOO: [3]: 29 + [1657095388.497074][3451:3456] CHIP:TOO: [4]: 30 + [1657095388.497098][3451:3456] CHIP:TOO: [5]: 31 + [1657095388.497123][3451:3456] CHIP:TOO: [6]: 40 + [1657095388.497147][3451:3456] CHIP:TOO: [7]: 42 + [1657095388.497172][3451:3456] CHIP:TOO: [8]: 43 + [1657095388.497197][3451:3456] CHIP:TOO: [9]: 44 + [1657095388.497221][3451:3456] CHIP:TOO: [10]: 45 + [1657095388.497246][3451:3456] CHIP:TOO: [11]: 46 + [1657095388.497271][3451:3456] CHIP:TOO: [12]: 47 + [1657095388.497295][3451:3456] CHIP:TOO: [13]: 48 + [1657095388.497320][3451:3456] CHIP:TOO: [14]: 49 + [1657095388.497344][3451:3456] CHIP:TOO: [15]: 50 + [1657095388.497369][3451:3456] CHIP:TOO: [16]: 51 + [1657095388.497394][3451:3456] CHIP:TOO: [17]: 52 + [1657095388.497418][3451:3456] CHIP:TOO: [18]: 53 + [1657095388.497443][3451:3456] CHIP:TOO: [19]: 54 + [1657095388.497468][3451:3456] CHIP:TOO: [20]: 55 + [1657095388.497493][3451:3456] CHIP:TOO: [21]: 60 + [1657095388.497517][3451:3456] CHIP:TOO: [22]: 62 + [1657095388.497542][3451:3456] CHIP:TOO: [23]: 63 + [1657095388.497567][3451:3456] CHIP:TOO: [24]: 64 + [1657095388.497591][3451:3456] CHIP:TOO: [25]: 65 + [1657095388.497616][3451:3456] CHIP:TOO: [26]: 1029 disabled: true - label: "DUT reads ClientList from the TH" + PICS: DESC.C.A0002 verification: | ./chip-tool descriptor read client-list 1 0 - [1651220639.440188][11001:11001] CHIP:IM: Received Read request - [1651220639.440259][11001:11001] CHIP:DMG: ReadRequestMessage = - [1651220639.440298][11001:11001] CHIP:DMG: { - [1651220639.440330][11001:11001] CHIP:DMG: AttributePathIBs = - [1651220639.440367][11001:11001] CHIP:DMG: [ - [1651220639.440402][11001:11001] CHIP:DMG: AttributePathIB = - [1651220639.440447][11001:11001] CHIP:DMG: { - [1651220639.440491][11001:11001] CHIP:DMG: Endpoint = 0x0, - [1651220639.440539][11001:11001] CHIP:DMG: Cluster = 0x1d, - [1651220639.440589][11001:11001] CHIP:DMG: Attribute = 0x0000_0002, - [1651220639.440634][11001:11001] CHIP:DMG: } - [1651220639.440675][11001:11001] CHIP:DMG: - [1651220639.440715][11001:11001] CHIP:DMG: ], - [1651220639.440756][11001:11001] CHIP:DMG: - [1651220639.440794][11001:11001] CHIP:DMG: isFabricFiltered = true, - [1651220639.440830][11001:11001] CHIP:DMG: InteractionModelRevision = 1 - [1651220639.440864][11001:11001] CHIP:DMG: }, + verify TH(On a reference app) receives the right Read Request Message for the data sent in the above command + + Verify in DUT as client side: + + + [1657095415.492647][3459:3464] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 2880250959 + [1657095415.492717][3459:3464] CHIP:TOO: client list: 1 entries + [1657095415.492749][3459:3464] CHIP:TOO: [1]: 41 disabled: true - label: "DUT reads PartsList from the TH" + PICS: DESC.C.A0003 verification: | ./chip-tool descriptor read parts-list 1 0 - [1651220678.308560][11001:11001] CHIP:EM: Handling via exchange: 30507r, Delegate: 0xaaaaacdc5098 - [1651220678.308658][11001:11001] CHIP:IM: Received Read request - [1651220678.308766][11001:11001] CHIP:DMG: ReadRequestMessage = - [1651220678.308828][11001:11001] CHIP:DMG: { - [1651220678.308882][11001:11001] CHIP:DMG: AttributePathIBs = - [1651220678.308945][11001:11001] CHIP:DMG: [ - [1651220678.309053][11001:11001] CHIP:DMG: AttributePathIB = - [1651220678.309137][11001:11001] CHIP:DMG: { - [1651220678.309210][11001:11001] CHIP:DMG: Endpoint = 0x0, - [1651220678.309284][11001:11001] CHIP:DMG: Cluster = 0x1d, - [1651220678.309355][11001:11001] CHIP:DMG: Attribute = 0x0000_0003, - [1651220678.309422][11001:11001] CHIP:DMG: } - [1651220678.309485][11001:11001] CHIP:DMG: - [1651220678.309558][11001:11001] CHIP:DMG: ], - [1651220678.309629][11001:11001] CHIP:DMG: - [1651220678.309693][11001:11001] CHIP:DMG: isFabricFiltered = true, - [1651220678.309755][11001:11001] CHIP:DMG: InteractionModelRevision = 1 - [1651220678.309810][11001:11001] CHIP:DMG: }, + verify TH(On a reference app) receives the right Read Request Message for the data sent in the above command + + Verify in DUT as client side: + + + [1657095439.967554][3470:3475] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 2880250959 + [1657095439.967633][3470:3475] CHIP:TOO: parts list: 2 entries + [1657095439.967668][3470:3475] CHIP:TOO: [1]: 1 + [1657095439.967697][3470:3475] CHIP:TOO: [2]: 2 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DGETH_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DGETH_2_1.yaml index a94faa0ebda955..8b6243027a7699 100644 --- a/src/app/tests/suites/certification/Test_TC_DGETH_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGETH_2_1.yaml @@ -44,7 +44,7 @@ tests: attribute: "FullDuplex" response: constraints: - type: bool + type: boolean #issue #13648 - label: "Read PacketRxCount attribute constraints" @@ -53,7 +53,7 @@ tests: attribute: "PacketRxCount" response: constraints: - type: uint64 + type: int64u - label: "Read PacketRxCount value from DUT and verify the number of packets @@ -80,7 +80,7 @@ tests: attribute: "PacketTxCount" response: constraints: - type: uint64 + type: int64u - label: "Read PacketTxCount value from DUT and verify the number of packets @@ -107,7 +107,7 @@ tests: attribute: "TxErrCount" response: constraints: - type: uint64 + type: int64u - label: "Read TxErrCount value from DUT and verify value indicates the number @@ -134,7 +134,7 @@ tests: attribute: "CollisionCount" response: constraints: - type: uint64 + type: int64u - label: "Read CollisionCount value from DUT and verify value indicates the @@ -162,7 +162,7 @@ tests: attribute: "OverrunCount" response: constraints: - type: uint64 + type: int64u - label: "Read OverrunCount value from DUT and verify value indicates the @@ -189,7 +189,7 @@ tests: attribute: "CarrierDetect" response: constraints: - type: bool + type: boolean - label: "Read CarrierDetect value from DUT and verify value indicates the @@ -217,7 +217,7 @@ tests: attribute: "TimeSinceReset" response: constraints: - type: uint64 + type: int64u - label: "Read TimeSinceReset value from DUT and verify the value indicates the diff --git a/src/app/tests/suites/certification/Test_TC_DGETH_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DGETH_2_2.yaml index 87662dcb4c5717..94dcdb1ed6e524 100644 --- a/src/app/tests/suites/certification/Test_TC_DGETH_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGETH_2_2.yaml @@ -28,42 +28,182 @@ tests: - name: "nodeId" value: nodeId + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PacketRxCount attribute value from DUT" + PICS: DGETH.S.A0002 + command: "readAttribute" + attribute: "PacketRxCount" + response: + saveAs: PacketRxCount + + - label: "TH reads PacketTxCount attribute value from DUT" + PICS: DGETH.S.A0003 + command: "readAttribute" + attribute: "PacketTxCount" + response: + saveAs: PacketTxCount + + - label: "TH reads TxErrCount attribute value from DUT" + PICS: DGETH.S.A0004 + command: "readAttribute" + attribute: "TxErrCount" + response: + saveAs: TxErrCount + + - label: "TH reads CollisionCount attribute value from DUT" + PICS: DGETH.S.A0005 + command: "readAttribute" + attribute: "CollisionCount" + response: + saveAs: CollisionCount + + - label: "TH reads OverrunCount attribute value from DUT" + PICS: DGETH.S.A0006 + command: "readAttribute" + attribute: "OverrunCount" + response: + saveAs: OverrunCount + #issue #13648 - label: "Sends ResetCounts command" - PICS: PICS_SKIP_SAMPLE_APP && DGETH.S.C00.Rsp + PICS: DGETH.S.C00.Rsp command: "ResetCounts" - - label: "Read the PacketRxCount attribute" - PICS: PICS_SKIP_SAMPLE_APP && DGETH.S.A0002 + - label: "TH reads PacketRxCount attribute value from DUT" + PICS: DGETH.S.A0002 command: "readAttribute" attribute: "PacketRxCount" response: - value: 0 + constraints: + maxValue: PacketRxCount - - label: "Read the PacketTxCount attribute" - PICS: PICS_SKIP_SAMPLE_APP && DGETH.S.A0003 + - label: "TH reads PacketTxCount attribute value from DUT" + PICS: DGETH.S.A0003 command: "readAttribute" attribute: "PacketTxCount" response: - value: 0 + constraints: + maxValue: PacketTxCount - - label: "Read the TxErrCount attribute" - PICS: PICS_SKIP_SAMPLE_APP && DGETH.S.A0004 + - label: "TH reads TxErrCount attribute value from DUT" + PICS: DGETH.S.A0004 command: "readAttribute" attribute: "TxErrCount" response: - value: 0 + constraints: + maxValue: TxErrCount - - label: "Read the CollisionCount attribute" - PICS: PICS_SKIP_SAMPLE_APP && DGETH.S.A0005 + - label: "TH reads CollisionCount attribute value from DUT" + PICS: DGETH.S.A0005 command: "readAttribute" attribute: "CollisionCount" response: - value: 0 + constraints: + maxValue: CollisionCount - - label: "Read the OverrunCount attribute" - PICS: PICS_SKIP_SAMPLE_APP && DGETH.S.A0006 + - label: "TH reads OverrunCount attribute value from DUT" + PICS: DGETH.S.A0006 command: "readAttribute" attribute: "OverrunCount" response: - value: 0 + constraints: + maxValue: OverrunCount diff --git a/src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml index d27e6f29454356..290189a2deb587 100644 --- a/src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml @@ -35,7 +35,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -43,7 +43,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_DGGEN_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DGGEN_2_1.yaml index 968cccaffe22ca..478959957c5b08 100644 --- a/src/app/tests/suites/certification/Test_TC_DGGEN_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGGEN_2_1.yaml @@ -43,7 +43,7 @@ tests: attribute: "RebootCount" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -99,7 +99,7 @@ tests: attribute: "UpTime" response: constraints: - type: uint64 + type: int64u - label: "TH reads a TotalOperationalHours attribute value from DUT." PICS: DGGEN.S.A0003 @@ -107,7 +107,7 @@ tests: attribute: "TotalOperationalHours" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFE diff --git a/src/app/tests/suites/certification/Test_TC_DGSW_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DGSW_2_1.yaml index 9eacb0943f6fa3..6b68769f96fb79 100644 --- a/src/app/tests/suites/certification/Test_TC_DGSW_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGSW_2_1.yaml @@ -44,7 +44,7 @@ tests: PICS: DGSW.S.A0001 response: constraints: - type: uint64 + type: int64u - label: "Reads CurrentHeapUsed non-global attribute value from DUT" command: "readAttribute" @@ -52,7 +52,7 @@ tests: PICS: DGSW.S.A0002 response: constraints: - type: uint64 + type: int64u - label: "Reads CurrentHeapHighWaterMark non-global attribute value from DUT" @@ -61,4 +61,4 @@ tests: PICS: DGSW.S.A0003 response: constraints: - type: uint64 + type: int64u diff --git a/src/app/tests/suites/certification/Test_TC_DGSW_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DGSW_2_2.yaml index 243aad00e637fc..8d4778dbc2192b 100644 --- a/src/app/tests/suites/certification/Test_TC_DGSW_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGSW_2_2.yaml @@ -51,7 +51,7 @@ tests: [1649682271.390714][9722:9727] CHIP:EM: Sending Standalone Ack for MessageCounter:4574884 on exchange 14495i cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && DGSW.S.E00 arguments: values: - name: "message" diff --git a/src/app/tests/suites/certification/Test_TC_DGSW_2_3.yaml b/src/app/tests/suites/certification/Test_TC_DGSW_2_3.yaml index b0d2902ff36b70..0c6fb332e0f795 100644 --- a/src/app/tests/suites/certification/Test_TC_DGSW_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGSW_2_3.yaml @@ -47,7 +47,7 @@ tests: PICS: DGSW.S.A0002 response: constraints: - type: uint64 + type: int64u #issue #830 - label: "Reads CurrentHeapHighWaterMark attribute value from DUT" @@ -56,4 +56,4 @@ tests: PICS: DGSW.S.A0003 response: constraints: - type: uint64 + type: int64u diff --git a/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_1.yaml index 3f8eb5a01cb48c..cf675507724109 100644 --- a/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_1.yaml @@ -34,7 +34,7 @@ tests: attribute: "channel" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -44,7 +44,7 @@ tests: attribute: "RoutingRole" response: constraints: - type: RoutingRole + type: enum8 minValue: 0 maxValue: 6 @@ -56,7 +56,7 @@ tests: attribute: "NetworkName" response: constraints: - type: string + type: char_string - label: "Read NetworkName attribute from DUT and verify response value, If @@ -90,7 +90,7 @@ tests: attribute: "PanId" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -125,7 +125,7 @@ tests: attribute: "ExtendedPanId" response: constraints: - type: uint64 + type: int64u - label: "Read ExtendedPanId attribute from DUT and verify response value, If @@ -180,7 +180,7 @@ tests: attribute: "OverrunCount" response: constraints: - type: uint64 + type: int64u - label: "read OverrunCount attribute from DUT and verify response value, If @@ -271,7 +271,7 @@ tests: attribute: "PartitionId" response: constraints: - type: uint32 + type: int32u - label: "TH reads Weighting attribute value from DUT" PICS: DGTHREAD.S.A000a @@ -279,7 +279,7 @@ tests: attribute: "weighting" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -289,7 +289,7 @@ tests: attribute: "DataVersion" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -299,7 +299,7 @@ tests: attribute: "StableDataVersion" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -309,7 +309,7 @@ tests: attribute: "LeaderRouterId" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -319,7 +319,7 @@ tests: attribute: "DetachedRoleCount" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -329,7 +329,7 @@ tests: attribute: "ChildRoleCount" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -339,7 +339,7 @@ tests: attribute: "RouterRoleCount" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -349,7 +349,7 @@ tests: attribute: "LeaderRoleCount" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -359,7 +359,7 @@ tests: attribute: "AttachAttemptCount" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -369,7 +369,7 @@ tests: attribute: "PartitionIdChangeCount" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -380,7 +380,7 @@ tests: attribute: "BetterPartitionAttachAttemptCount" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -390,7 +390,7 @@ tests: attribute: "ParentChangeCount" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -400,7 +400,7 @@ tests: attribute: "ActiveTimestamp" response: constraints: - type: uint64 + type: int64u - label: "TH reads PendingTimestamp attribute value from DUT" PICS: DGTHREAD.S.A0039 @@ -408,7 +408,7 @@ tests: attribute: "PendingTimestamp" response: constraints: - type: uint64 + type: int64u - label: "TH reads Delay attribute value from DUT" PICS: DGTHREAD.S.A003a @@ -416,7 +416,9 @@ tests: attribute: "delay" response: constraints: - type: uint32 + type: int32u + minValue: 0x0 + maxValue: 0xFFFFFFFF #issue #14097 - label: @@ -450,7 +452,7 @@ tests: attribute: "ChannelMask" response: constraints: - type: octstr + type: octet_string #issue #14097 - label: diff --git a/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_2.yaml index 6e2836a4a23a69..b2271fe4109bda 100644 --- a/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_2.yaml @@ -34,7 +34,7 @@ tests: attribute: "TxTotalCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -44,7 +44,7 @@ tests: attribute: "TxUnicastCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -54,7 +54,7 @@ tests: attribute: "TxBroadcastCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -64,7 +64,7 @@ tests: attribute: "TxAckRequestedCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -74,7 +74,7 @@ tests: attribute: "TxAckedCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -84,7 +84,7 @@ tests: attribute: "TxNoAckRequestedCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -94,7 +94,7 @@ tests: attribute: "TxDataCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -104,7 +104,7 @@ tests: attribute: "TxDataPollCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -114,7 +114,7 @@ tests: attribute: "TxBeaconCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -124,7 +124,7 @@ tests: attribute: "TxBeaconRequestCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -134,7 +134,7 @@ tests: attribute: "TxOtherCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -144,7 +144,7 @@ tests: attribute: "TxRetryCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -154,7 +154,7 @@ tests: attribute: "TxDirectMaxRetryExpiryCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -164,7 +164,7 @@ tests: attribute: "TxIndirectMaxRetryExpiryCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -174,7 +174,7 @@ tests: attribute: "TxErrCcaCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -184,7 +184,7 @@ tests: attribute: "TxErrAbortCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -194,6 +194,6 @@ tests: attribute: "TxErrBusyChannelCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF diff --git a/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_3.yaml b/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_3.yaml index 670d8413c70862..b0d995e9aee70b 100644 --- a/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_3.yaml @@ -34,7 +34,7 @@ tests: attribute: "RxTotalCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -44,7 +44,7 @@ tests: attribute: "RxUnicastCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -54,7 +54,7 @@ tests: attribute: "RxBroadcastCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -64,7 +64,7 @@ tests: attribute: "RxDataCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -74,7 +74,7 @@ tests: attribute: "RxDataPollCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -84,7 +84,7 @@ tests: attribute: "RxBeaconCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -94,7 +94,7 @@ tests: attribute: "RxBeaconRequestCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -104,7 +104,7 @@ tests: attribute: "RxOtherCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -114,7 +114,7 @@ tests: attribute: "RxAddressFilteredCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -124,7 +124,7 @@ tests: attribute: "RxDestAddrFilteredCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -134,7 +134,7 @@ tests: attribute: "RxDuplicatedCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -144,7 +144,7 @@ tests: attribute: "RxErrNoFrameCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -154,7 +154,7 @@ tests: attribute: "RxErrUnknownNeighborCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -186,7 +186,7 @@ tests: attribute: "RxErrSecCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -196,7 +196,7 @@ tests: attribute: "RxErrFcsCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -206,6 +206,6 @@ tests: attribute: "RxErrOtherCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF diff --git a/src/app/tests/suites/certification/Test_TC_DGWIFI_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DGWIFI_2_1.yaml index b395fbb0fc5202..f6a0ab3ad1b014 100644 --- a/src/app/tests/suites/certification/Test_TC_DGWIFI_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGWIFI_2_1.yaml @@ -28,14 +28,13 @@ tests: - name: "nodeId" value: nodeId - - label: "Reads NetworkInterface structure attribute from DUT" + - label: "TH reads BSSID attribute from DUT" PICS: DGWIFI.S.A0000 - cluster: "General Diagnostics" command: "readAttribute" - attribute: "NetworkInterfaces" + attribute: "BSSID" response: constraints: - type: list + type: octet_string #issue #13645 - label: "Reads SecurityType attribute constraints" @@ -44,7 +43,7 @@ tests: attribute: "SecurityType" response: constraints: - type: enum + type: enum8 - label: "Reads WiFiVersion attribute constraints" PICS: DGWIFI.S.A0002 @@ -52,7 +51,7 @@ tests: attribute: "WiFiVersion" response: constraints: - type: enum + type: enum8 minValue: 0 maxValue: 5 @@ -62,7 +61,7 @@ tests: attribute: "ChannelNumber" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -72,7 +71,7 @@ tests: attribute: "RSSI" response: constraints: - type: int8 + type: int8s minValue: -120 maxValue: 0 @@ -82,7 +81,7 @@ tests: attribute: "BeaconLostCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -92,7 +91,7 @@ tests: attribute: "BeaconRxCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -102,7 +101,7 @@ tests: attribute: "PacketMulticastRxCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -112,7 +111,7 @@ tests: attribute: "PacketMulticastTxCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -122,7 +121,7 @@ tests: attribute: "PacketUnicastRxCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -132,7 +131,7 @@ tests: attribute: "PacketUnicastTxCount" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -142,7 +141,7 @@ tests: attribute: "CurrentMaxRate" response: constraints: - type: uint64 + type: int64u - label: "Reads OverrunCount attribute constraints" PICS: PICS_SKIP_SAMPLE_APP && DGWIFI.S.A000c @@ -150,4 +149,4 @@ tests: attribute: "OverrunCount" response: constraints: - type: uint64 + type: int64u diff --git a/src/app/tests/suites/certification/Test_TC_DGWIFI_2_3.yaml b/src/app/tests/suites/certification/Test_TC_DGWIFI_2_3.yaml index c8520908ff3a39..71dc3d4f640376 100644 --- a/src/app/tests/suites/certification/Test_TC_DGWIFI_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGWIFI_2_3.yaml @@ -41,7 +41,7 @@ tests: attribute: "BeaconLostCount" response: constraints: - type: uint32 + type: int32u minValue: 0 maxValue: 4294967295 @@ -51,7 +51,7 @@ tests: attribute: "BeaconRxCount" response: constraints: - type: uint32 + type: int32u minValue: 0 maxValue: 4294967295 @@ -61,7 +61,7 @@ tests: attribute: "PacketMulticastRxCount" response: constraints: - type: uint32 + type: int32u minValue: 0 maxValue: 4294967295 @@ -71,7 +71,7 @@ tests: attribute: "PacketMulticastTxCount" response: constraints: - type: uint32 + type: int32u minValue: 0 maxValue: 4294967295 @@ -81,7 +81,7 @@ tests: attribute: "PacketUnicastRxCount" response: constraints: - type: uint32 + type: int32u minValue: 0 maxValue: 4294967295 @@ -91,6 +91,6 @@ tests: attribute: "PacketUnicastTxCount" response: constraints: - type: uint32 + type: int32u minValue: 0 maxValue: 4294967295 diff --git a/src/app/tests/suites/certification/Test_TC_DGWIFI_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DGWIFI_3_1.yaml index dcfa35600960df..47ad8a10280ed0 100644 --- a/src/app/tests/suites/certification/Test_TC_DGWIFI_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGWIFI_3_1.yaml @@ -26,7 +26,7 @@ tests: disabled: true - - label: "DUT reads NetworkInterface structure attribute from TH." + - label: "TH reads BSSID attribute from DUT." PICS: DGWIFI.S.A0000 verification: | verify on Reference app receives the right response for the data sent in the below commands diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml index a7efd0c912d0bf..a990de02601054 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml @@ -131,6 +131,24 @@ tests: arguments: value: false + - label: + "TH writes the RequirePINforRemoteOperation attribute value as False + on the DUT and Verify DUT responds with UNSUPPORTED_WRITE" + PICS: "!DRLK.S.A0033" + command: "writeAttribute" + attribute: "RequirePINforRemoteOperation" + arguments: + value: false + response: + error: UNSUPPORTED_WRITE + + - label: "TH reads the RequirePINforRemoteOperation attribute from the DUT" + PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033 + command: "readAttribute" + attribute: "RequirePINforRemoteOperation" + response: + value: false + - label: "TH sends Lock Door Command to the DUT without PINCode" PICS: DRLK.S.C00.Rsp command: "LockDoor" @@ -156,6 +174,17 @@ tests: arguments: value: true + - label: + "TH writes the RequirePINforRemoteOperation attribute value as True on + the DUT and Verify DUT responds with UNSUPPORTED_WRITE" + PICS: "!DRLK.S.A0033" + command: "writeAttribute" + attribute: "RequirePINforRemoteOperation" + arguments: + value: true + response: + error: UNSUPPORTED_WRITE + - label: "TH reads the RequirePINforRemoteOperation attribute from the DUT" PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033 command: "readAttribute" @@ -164,7 +193,7 @@ tests: value: true - label: "TH sends Lock Door Command to the DUT with valid PINCode" - PICS: DRLK.S.C00.Rsp + PICS: DRLK.S.C00.Rsp && DRLK.S.A0033 command: "LockDoor" timedInteractionTimeoutMs: 10000 arguments: @@ -173,7 +202,7 @@ tests: value: "123456" - label: "TH sends Lock Door Command to the DUT without valid PINCode" - PICS: DRLK.S.C00.Rsp + PICS: DRLK.S.C00.Rsp && DRLK.S.A0033 command: "LockDoor" timedInteractionTimeoutMs: 10000 arguments: @@ -185,17 +214,15 @@ tests: - label: "TH sends Lock Door Command to the DUT without any argument PINCode" - PICS: DRLK.S.C00.Rsp + PICS: DRLK.S.C00.Rsp && DRLK.S.A0033 command: "LockDoor" timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "pinCode" - value: "" response: error: FAILURE - - label: "TH writes WrongCodeEntryLimit attribute value as 3 on the DUT" + - label: + "TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and + Verify that the DUT sends Success response" PICS: DRLK.S.A0030 command: "writeAttribute" attribute: "WrongCodeEntryLimit" @@ -203,14 +230,36 @@ tests: value: 3 - label: - "TH writes UserCodeTemporaryDisableTime attribute value as 5 seconds - on the DUT" + "TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and + verify DUT responds with UNSUPPORTED_WRITE" + PICS: "!DRLK.S.A0030" + command: "writeAttribute" + attribute: "WrongCodeEntryLimit" + arguments: + value: 3 + response: + error: UNSUPPORTED_WRITE + + - label: + "TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds + on the DUT and Verify that the DUT send the Success response" PICS: DRLK.S.A0031 command: "writeAttribute" attribute: "UserCodeTemporaryDisableTime" arguments: value: 15 + - label: + "TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds + on the DUT and Verify DUT responds with UNSUPPORTED_WRITE" + PICS: "!DRLK.S.A0031" + command: "writeAttribute" + attribute: "UserCodeTemporaryDisableTime" + arguments: + value: 15 + response: + error: UNSUPPORTED_WRITE + - label: "TH sends Lock Door Command to the DUT with invalid PINCode" PICS: DRLK.S.C00.Rsp command: "LockDoor" @@ -218,7 +267,7 @@ tests: arguments: values: - name: "pinCode" - value: "12345" + value: "123458" response: error: FAILURE @@ -229,7 +278,7 @@ tests: arguments: values: - name: "pinCode" - value: "54321" + value: "123458" response: error: FAILURE @@ -240,7 +289,7 @@ tests: arguments: values: - name: "pinCode" - value: "987623" + value: "123458" response: error: FAILURE @@ -251,25 +300,49 @@ tests: arguments: values: - name: "pinCode" - value: "67890" + value: "123458" response: error: FAILURE - - label: "TH reads UserCodeTemporaryDisableTime attribute from DUT" - PICS: DRLK.S.A0031 - command: "readAttribute" - attribute: "UserCodeTemporaryDisableTime" - response: - value: 15 + - label: + "TH reads UserCodeTemporaryDisableTime attribute from DUT and After + sending 3 failure responses verify that UserCodeTemporaryDisableTime + attribute is triggered" + verification: | + ./chip-tool doorlock read user-code-temporary-disable-time 1 1 - - label: "TH sends Lock Door Command to the DUT with valid PINCode" - PICS: DRLK.S.C00.Rsp - command: "LockDoor" - timedInteractionTimeoutMs: 10000 + On TH, verify the UserCodeTemporaryDisableTime value as 15 + + [1657867358.396037][2551:2556] CHIP:DMG: + [1657867358.396067][2551:2556] CHIP:DMG: SuppressResponse = true, + [1657867358.396099][2551:2556] CHIP:DMG: InteractionModelRevision = 1 + [1657867358.396129][2551:2556] CHIP:DMG: } + [1657867358.396286][2551:2556] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0031 DataVersion: 2082875948 + [1657867358.396378][2551:2556] CHIP:TOO: UserCodeTemporaryDisableTime: 15 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && DRLK.S.A0031 arguments: values: - - name: "pinCode" - value: "123456" + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "TH sends Lock Command to the DUT with valid PINCode before + UserCodeTemporaryDisableTime attribute time expires" + verification: | + Verify that DUT sends failure response to the TH + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && DRLK.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "Clean the created user" command: "ClearUser" diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_5.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_5.yaml index b0b84a8a7220c9..9a6d1b97abbdaa 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_5.yaml @@ -80,7 +80,7 @@ tests: - name: "nextUserIndex" value: null - - label: "Get Max number of Week Day schedules for user" + - label: "TH reads NumberOfWeekDay SchedulesSupportedPerUser attribute" PICS: DRLK.S.F04 && DRLK.S.A0014 command: "readAttribute" attribute: "NumberOfWeekDaySchedulesSupportedPerUser" @@ -90,7 +90,7 @@ tests: minValue: 0 maxValue: 255 - - label: "Get number of supported users" + - label: "TH reads NumberOfTotalUsers Supported attribute" PICS: DRLK.S.F08 && DRLK.S.A0011 command: "readAttribute" attribute: "NumberOfTotalUsersSupported" @@ -100,7 +100,7 @@ tests: minValue: 0 maxValue: 65534 - - label: "Send Set Week Day Schedule Command to DUT" + - label: "TH send Set Week Day Schedule Command" PICS: DRLK.S.F04 && DRLK.S.C0b.Rsp command: "SetWeekDaySchedule" arguments: @@ -121,7 +121,7 @@ tests: value: 55 #issue #18591 - - label: "send GetWeekDay Schedule Command " + - label: "TH send Get Week Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx command: "GetWeekDaySchedule" arguments: @@ -133,44 +133,27 @@ tests: response: values: - name: "weekDayIndex" - constraints: - minValue: 1 - maxValue: NumberOfWeekDaySchedulesSupportedPerUser + value: 1 - name: "userIndex" - constraints: - minValue: 1 - maxValue: NumberOfTotalUsersSupported + value: 1 - name: "status" value: 0x0 - name: "daysMask" - constraints: - hasValue: true - minValue: 0 - maxValue: 6 + value: 2 - name: "startHour" - constraints: - hasValue: true - minValue: 0 - maxValue: 23 + value: 15 - name: "startMinute" - constraints: - hasValue: true - minValue: 0 - maxValue: 59 + value: 45 - name: "endHour" constraints: hasValue: true - minValue: 0 - maxValue: 23 + minValue: 16 - name: "endMinute" constraints: hasValue: true - minValue: 0 - maxValue: 59 + minValue: 55 - - label: - "Send Set Week Day Schedule Command to DUT and verify INVALID_COMMAND - response" + - label: "TH send Set Week Day Schedule Command" PICS: DRLK.S.F04 && DRLK.S.C0b.Rsp command: "SetWeekDaySchedule" arguments: @@ -192,9 +175,7 @@ tests: response: error: INVALID_COMMAND - - label: - "send GetWeekDay Schedule Command to DUT and verify INVALID_COMMAND - response" + - label: "TH send Get Week Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx command: "GetWeekDaySchedule" arguments: @@ -227,7 +208,7 @@ tests: constraints: hasValue: false - - label: "Clear all week day schedules for the first user" + - label: "TH sends Clear Week Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0d.Rsp command: "ClearWeekDaySchedule" arguments: @@ -237,19 +218,19 @@ tests: - name: "userIndex" value: 1 - - label: "send GetWeekDay Schedule Command " + - label: "TH sends Get Week Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx command: "GetWeekDaySchedule" arguments: values: - name: "weekDayIndex" - value: 2 + value: 1 - name: "userIndex" value: 1 response: values: - name: "weekDayIndex" - value: 2 + value: 1 - name: "userIndex" value: 1 - name: "status" diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml index e5b7de063a3908..408fc6a9f4c8a8 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml @@ -80,7 +80,7 @@ tests: - name: "nextUserIndex" value: null - - label: "Get Max number of year Day schedules for user" + - label: "TH reads NumberOfYearDay SchedulesSupportedPerUser attribute" PICS: DRLK.S.F04 && DRLK.S.A0015 command: "readAttribute" attribute: "NumberOfYearDaySchedulesSupportedPerUser" @@ -90,7 +90,7 @@ tests: minValue: 0 maxValue: 255 - - label: "Get number of supported users" + - label: "TH reads NumberOfTotalUsers Supported attribute" PICS: DRLK.C.F08 && DRLK.S.A0011 command: "readAttribute" attribute: "NumberOfTotalUsersSupported" @@ -100,7 +100,7 @@ tests: minValue: 0 maxValue: 65534 - - label: "Send Set Year Day Schedule Command to DUT" + - label: "TH sends Set Year Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0e.Rsp command: "SetYearDaySchedule" arguments: @@ -115,7 +115,7 @@ tests: value: 1980 #issue #18591 - - label: "send Get Year Day Schedule Command" + - label: "TH sends Get Year Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx command: "GetYearDaySchedule" arguments: @@ -127,27 +127,19 @@ tests: response: values: - name: "YearDayIndex" - constraints: - minValue: 1 - maxValue: NumberOfYearDaySchedulesSupportedPerUser + value: 1 - name: "userIndex" - constraints: - minValue: 1 - maxValue: NumberOfTotalUsersSupported + value: 1 - name: "status" value: 0x0 - name: "LocalStartTime" - constraints: - hasValue: true - type: epoch-s + value: 960 - name: "LocalEndTime" + value: 1980 constraints: - hasValue: true - type: epoch-s + minValue: 961 - - label: - "Send Set Year Day Schedule Command to DUT and verify INVALID_COMMAND - response" + - label: "TH send Set Year Day Schedule Command to DUT" PICS: DRLK.S.C0e.Rsp command: "SetYearDaySchedule" arguments: @@ -163,9 +155,7 @@ tests: response: error: INVALID_COMMAND - - label: - "send Get Year Day Schedule Command to DUT and Verify INVALID_FIELD - response" + - label: "TH sends Get Year Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx command: "GetYearDaySchedule" arguments: @@ -189,8 +179,27 @@ tests: constraints: hasValue: false - - label: - "send Get Year Day Schedule Command to DUT and verify FAILURE response" + - label: "Create a user with userIndex as 5" + command: "SetUser" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "operationType" + value: 0 + - name: "userIndex" + value: 5 + - name: "userName" + value: "xxx" + - name: "userUniqueId" + value: 6452 + - name: "userStatus" + value: 1 + - name: "userType" + value: 0 + - name: "credentialRule" + value: 0 + + - label: "TH sends Get Year Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx command: "GetYearDaySchedule" arguments: @@ -206,7 +215,7 @@ tests: - name: "userIndex" value: 5 - name: "status" - value: 0x01 + value: 0x8B - name: "LocalStartTime" constraints: hasValue: false @@ -214,7 +223,7 @@ tests: constraints: hasValue: false - - label: "Clear a year day schedule for the first user" + - label: "TH sends Clear Year Day Schedule to DUT" PICS: DRLK.S.C10.Rsp command: "ClearYearDaySchedule" arguments: @@ -224,9 +233,7 @@ tests: - name: "userIndex" value: 1 - - label: - "send Get Year Day Schedule Command to DUT and verify NOT_FOUND - response" + - label: "TH sends Get Year Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx && DRLK.S.C10.Rsp command: "GetYearDaySchedule" arguments: @@ -242,7 +249,7 @@ tests: - name: "userIndex" value: 1 - name: "status" - value: 0x01 + value: 0x8B - name: "LocalStartTime" constraints: hasValue: false @@ -250,7 +257,7 @@ tests: constraints: hasValue: false - - label: "Send Set Year Day Schedule Command to DUT " + - label: "TH sends Set Year Day Schedule Command to DUT" PICS: DRLK.S.C0e.Rsp command: "SetYearDaySchedule" arguments: @@ -264,7 +271,7 @@ tests: - name: "LocalEndTime" value: 2100 - - label: "send Get Year Day Schedule Command" + - label: "TH sends Get Year Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx command: "GetYearDaySchedule" arguments: @@ -285,6 +292,20 @@ tests: value: 1080 - name: "LocalEndTime" value: 2100 + constraints: + minValue: 1081 + + - label: "TH sends Clear Year Day Schedule to DUT" + PICS: DRLK.S.F04 && DRLK.S.C10.Rsp + command: "ClearYearDaySchedule" + arguments: + values: + - name: "yearDayIndex" + value: 0 + - name: "userIndex" + value: 0 + response: + error: INVALID_COMMAND - label: "Clear a year day schedule for the first user" PICS: DRLK.S.F04 && DRLK.S.C10.Rsp diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml index 2c1da053d9c7fe..0050fdaa3862d1 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml @@ -92,6 +92,7 @@ tests: minValue: 0 maxValue: 255 + #Issues 20930 - label: "TH sends Set Credential Command to DUT" PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx command: "SetCredential" @@ -132,9 +133,7 @@ tests: constraints: type: boolean - name: "userIndex" - constraints: - minValue: 1 - maxValue: NumberOfTotalUsersSupported + value: 1 - name: "creatorFabricIndex" value: 1 - name: "lastModifiedFabricIndex" @@ -142,9 +141,7 @@ tests: - name: "nextCredentialIndex" value: null - - label: - "TH sends Set Credential Command to DUT and verify the - INVALID_COMMAND if any of the fields are invalid" + - label: "TH sends Set Credential Command to DUT" PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx command: "SetCredential" timedInteractionTimeoutMs: 10000 @@ -155,7 +152,7 @@ tests: - name: "credential" value: { CredentialType: 1, CredentialIndex: 2 } - name: "credentialData" - value: "1234" + value: "4321" - name: "userIndex" value: 2 - name: "userStatus" @@ -171,9 +168,7 @@ tests: - name: "nextCredentialIndex" value: 3 - - label: - "TH sends Set Credential Command to DUT and verify response as - DUPLICATE if CredentialData is repeated" + - label: "TH sends Set Credential Command to DUT" PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx command: "SetCredential" timedInteractionTimeoutMs: 10000 @@ -200,9 +195,8 @@ tests: - name: "nextCredentialIndex" value: 3 - - label: - "TH sends Set Credential Command to DUT and verify response as - OCCUPIED if CredentialIndex is repeated" + #Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed. + - label: "TH sends Set Credential Command to DUT" PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx command: "SetCredential" timedInteractionTimeoutMs: 10000 @@ -229,9 +223,86 @@ tests: - name: "nextCredentialIndex" value: 2 + #Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed. + - label: + "TH sends Set Credential Command to DUT and Verify that the DUT sends + Set Credential Response command with response as OCCUPIED if the + CredentialIndex is repeated" + verification: | + ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1, "credentialIndex" : 1 }' 123456 2 0 0 1 1 --timedInteractionTimeoutMs 1000 + + [1656506733.767451][27276:27281] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0023 + [1656506733.767542][27276:27281] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_0023 + [1656506733.767663][27276:27281] CHIP:TOO: SetCredentialResponse: { + [1656506733.767731][27276:27281] CHIP:TOO: status: 2 + [1656506733.767779][27276:27281] CHIP:TOO: userIndex: null + [1656506733.767826][27276:27281] CHIP:TOO: nextCredentialIndex: 2 + [1656506733.767871][27276:27281] CHIP:TOO: } + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + #Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed. + - label: "TH sends Set Credential Command to DUT" + PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx + command: "SetCredential" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "operationType" + value: 0 + - name: "credential" + value: { CredentialType: 1, CredentialIndex: 3 } + - name: "credentialData" + value: "123456" + - name: "userIndex" + value: 3 + - name: "userStatus" + value: 0 + - name: "userType" + value: 0 + response: + values: + - name: "status" + value: 0x02 + - name: "userIndex" + value: null + - name: "nextCredentialIndex" + value: 4 + + #Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed. - label: - "TH sends Set Credential Command to DUT and verify the DUT response as - OCCUPIED if the CredentialIndex is not associated with the UserIndex" + "TH sends Set Credential Command to DUT and Verify that the DUT sends + Set Credential Response command with response as OCCUPIED if the + CredentialIndex is repeated" + verification: | + ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1, "credentialIndex" : 3 }' 123456 3 0 0 1 1 --timedInteractionTimeoutMs 1000 + + [1656506733.767451][27276:27281] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0023 + [1656506733.767542][27276:27281] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_0023 + [1656506733.767663][27276:27281] CHIP:TOO: SetCredentialResponse: { + [1656506733.767731][27276:27281] CHIP:TOO: status: 2 + [1656506733.767779][27276:27281] CHIP:TOO: userIndex: null + [1656506733.767826][27276:27281] CHIP:TOO: nextCredentialIndex: 4 + [1656506733.767871][27276:27281] CHIP:TOO: } + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + #Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed. + - label: "TH sends Set Credential Command to DUT" PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx command: "SetCredential" timedInteractionTimeoutMs: 10000 @@ -258,6 +329,31 @@ tests: - name: "nextCredentialIndex" value: 4 + #Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed. + - label: + "TH sends Set Credential Command to DUT and Verify that the DUT sends + Set Credential Response command with response as OCCUPIED if the + CredentialIndex is repeated" + verification: | + ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1, "credentialIndex" : 3 }' 123456 2 0 0 1 1 --timedInteractionTimeoutMs 1000 + + [1656506733.767451][27276:27281] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0023 + [1656506733.767542][27276:27281] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_0023 + [1656506733.767663][27276:27281] CHIP:TOO: SetCredentialResponse: { + [1656506733.767731][27276:27281] CHIP:TOO: status: 2 + [1656506733.767779][27276:27281] CHIP:TOO: userIndex: null + [1656506733.767826][27276:27281] CHIP:TOO: nextCredentialIndex: 4 + [1656506733.767871][27276:27281] CHIP:TOO: } + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + - label: "TH sends Clear Credential Command to DUT" PICS: DRLK.S.F08 && DRLK.S.C26.Rsp command: "ClearCredential" @@ -267,9 +363,7 @@ tests: - name: "credential" value: { CredentialType: 1, CredentialIndex: 1 } - - label: - "TH sends Get Credential Status Command and verify that the - CredentialType and CredentialIndex for the provided value is cleared" + - label: "TH sends Get Credential Status Command to DUT" PICS: DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx command: "GetCredentialStatus" arguments: @@ -318,7 +412,7 @@ tests: - name: "operationType" value: 0 - name: "credential" - value: { CredentialType: 1, CredentialIndex: 3 } + value: { CredentialType: 1, CredentialIndex: 1 } - name: "credentialData" value: "123456" - name: "userIndex" @@ -334,7 +428,7 @@ tests: - name: "userIndex" value: null - name: "nextCredentialIndex" - value: 4 + value: 2 - label: "TH sends Clear Credential Command to DUT" PICS: DRLK.S.F08 && DRLK.S.C26.Rsp @@ -345,6 +439,7 @@ tests: - name: "credential" value: { CredentialType: 1, CredentialIndex: 65534 } + #Issue 20991 expected NULL values but got INVALID_COMMAND response fix script once the issue is fixed. - label: "TH sends Get Credential Status Command" PICS: DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx command: "GetCredentialStatus" @@ -355,6 +450,39 @@ tests: response: error: INVALID_COMMAND + #Issue 20991 expected NULL values but got INVALID_COMMAND response fix script once the issue is fixed. + - label: + "TH sends Get Credential command to DUT and Verify that the + CredentialType for the provided value is cleared Verify that the + CredentialIndex is cleared" + verification: | + ./chip-tool doorlock get-credential-status '{ "credentialType" : 1 , "credentialIndex" : 65534 }' 1 1 --timedInteractionTimeoutMs 1000 + Verify on the TH Log: + + [1654698175.243889][5478:5483] CHIP:DMG: + [1654698175.243965][5478:5483] CHIP:DMG: StatusIB = + [1654698175.244054][5478:5483] CHIP:DMG: { + [1654698175.244136][5478:5483] CHIP:DMG: status = 0x85 (INVALID_COMMAND), + [1654698175.244218][5478:5483] CHIP:DMG: }, + [1654698175.244307][5478:5483] CHIP:DMG: + [1654698175.244388][5478:5483] CHIP:DMG: }, + [1654698175.244473][5478:5483] CHIP:DMG: + [1654698175.244541][5478:5483] CHIP:DMG: }, + [1654698175.244621][5478:5483] CHIP:DMG: + [1654698175.244681][5478:5483] CHIP:DMG: ], + [1654698175.244755][5478:5483] CHIP:DMG: + [1654698175.244814][5478:5483] CHIP:DMG: InteractionModelRevision = 1 + [1654698175.244872][5478:5483] CHIP:DMG: } + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + - label: "TH sends Get Credential Status Command" PICS: DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx command: "GetCredentialStatus" @@ -385,3 +513,11 @@ tests: value: { CredentialType: 8, CredentialIndex: 2 } response: error: INVALID_COMMAND + + - label: "Cleanup the created user" + command: "ClearUser" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "userIndex" + value: 1 diff --git a/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml b/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml index 1d58d50196d9f3..3bc234e80b85c3 100644 --- a/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 3 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -42,10 +42,9 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" - PICS: " !FLW.S.A0003 " command: "readAttribute" attribute: "AttributeList" response: @@ -53,14 +52,14 @@ tests: type: list contains: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] - - label: "Read the global attribute: AttributeList" + - label: "Read the optional attribute(Tolerance) in AttributeList" PICS: FLW.S.A0003 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533] + contains: [3] - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_FLW_2_1.yaml b/src/app/tests/suites/certification/Test_TC_FLW_2_1.yaml index 63013e0ee27d8e..8f8abadc6dcbad 100644 --- a/src/app/tests/suites/certification/Test_TC_FLW_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLW_2_1.yaml @@ -34,7 +34,7 @@ tests: attribute: "MeasuredValue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -44,7 +44,7 @@ tests: attribute: "MinMeasuredValue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -54,16 +54,16 @@ tests: attribute: "MaxMeasuredValue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "read the optional attribute: Tolerance" + - label: "Read the optional attribute: Tolerance" PICS: FLW.S.A0003 command: "readAttribute" attribute: "Tolerance" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 2048 diff --git a/src/app/tests/suites/certification/Test_TC_FLW_2_2.yaml b/src/app/tests/suites/certification/Test_TC_FLW_2_2.yaml index 0ad7b2405f308a..d2ca220cf4519f 100644 --- a/src/app/tests/suites/certification/Test_TC_FLW_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLW_2_2.yaml @@ -35,7 +35,7 @@ tests: response: saveAs: ValueBeforeChange constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -51,12 +51,12 @@ tests: value: "y" - label: "read the mandatory attribute: MeasuredValue" - PICS: FLW.S.A0000 + PICS: FLW.S.A0000 && FLW.M.FlowChange command: "readAttribute" attribute: "MeasuredValue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 notValue: ValueBeforeChange diff --git a/src/app/tests/suites/certification/Test_TC_IDM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_1_1.yaml index 9244fb77e99e4a..8ad6f966270767 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_1_1.yaml @@ -30,8 +30,8 @@ tests: ./chip-tool onoff on 1 1 - Verify we are getting EndpointID, CommandID, ClusterID in the response data (as below) matching with the data sent in the above command - Verify TH all-clusters-app Log + On TH all-clusters-app, Verify we are getting EndpointID, CommandID, ClusterID in the response data (as below) matching with the data sent in the above command + [1655717373.046081][10909:10909] CHIP:DMG: InvokeRequestMessage = [1655717373.046137][10909:10909] CHIP:DMG: { [1655717373.046185][10909:10909] CHIP:DMG: suppressResponse = false, @@ -58,6 +58,13 @@ tests: [1655717373.047482][10909:10909] CHIP:DMG: }, [1655717373.047599][10909:10909] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0006 e=1 p=o [1655717373.047665][10909:10909] CHIP:DMG: AccessControl: allowed + + On DUT as a client side, verify that TH all-clusters-app sent success response + + [1657867897.521090][2728:2733] CHIP:DMG: }, + [1657867897.521162][2728:2733] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0006 Command=0x0000_0001 Status=0x0 + [1657867897.521212][2728:2733] CHIP:DMG: ICR moving to [AwaitingDe] + [1657867897.521275][2728:2733] CHIP:EM: Sending Standalone Ack for MessageCounter:30068876 on exchange 7104i disabled: true - label: @@ -86,10 +93,7 @@ tests: In case of chip tool, here is an example command to use ./chip-tool onoff off 1 1 - Verify we are getting EndpointID, CommandID, ClusterID in the response data (as below) matching with the data sent in the above command - - Verify TH all-clusters-app Log - + On TH all-clusters-app, verify that we are getting EndpointID, CommandID, ClusterID in the response data (as below) matching with the data sent in the above command [1655717456.105815][10909:10909] CHIP:DMG: InvokeRequestMessage = [1655717456.105853][10909:10909] CHIP:DMG: { [1655717456.105887][10909:10909] CHIP:DMG: suppressResponse = false, @@ -118,6 +122,16 @@ tests: [1655717456.106954][10909:10909] CHIP:DMG: AccessControl: allowed + On DUT as a client side, verify that TH all-clusters-app sent success response + [1657868210.442226][2746:2751] CHIP:DMG: + [1657868210.442265][2746:2751] CHIP:DMG: InteractionModelRevision = 1 + [1657868210.442306][2746:2751] CHIP:DMG: }, + [1657868210.442398][2746:2751] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0006 Command=0x0000_0000 Status=0x0 + [1657868210.442463][2746:2751] CHIP:DMG: ICR moving to [AwaitingDe] + [1657868210.442539][2746:2751] CHIP:EM: Sending Standalone Ack for MessageCounter:19470563 on exchange 18884i + + + ./chip-tool onoff off 1 1 Verify we are getting EndpointID, CommandID, ClusterID in the response data (as below) matching with the data sent in the above command diff --git a/src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml index b45d044c68a746..d5e51573696be2 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml @@ -75,17 +75,20 @@ tests: To Setup the TH such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command + Here by sending below mentioned ACL command giving only access for identify cluster(3), So except identify cluster command if try to send any other command will get status as unsupported access. - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 ./chip-tool onoff on 1 1 On TH, verify DUT responsds as UNSUPPORTED_ACCESS for the data sent in the above command + [1657869005.834700][2816:2821] CHIP:DMG: }, + [1657869005.834790][2816:2821] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0006 Command=0x0000_0001 Status=0x7e + [1657869005.834841][2816:2821] CHIP:TOO: Error: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) + [1657869005.834899][2816:2821] CHIP:DMG: ICR moving to [AwaitingDe] - [1654079683.774619][14540:14546] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0006 Command=0x0000_0001 Status=0x7e - [1654079683.774630][14540:14546] CHIP:TOO: Error: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) - [1654079683.774643][14540:14546] CHIP:DMG: ICR moving to [AwaitingDe] + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: @@ -95,7 +98,11 @@ tests: verification: | To Setup the TH such that there is no accessing fabric, 1st we need to send below mentioned ACL command - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [1234], "targets": null}]' 1 0 + To Setup the TH such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command + Here by sending below mentioned ACL command giving only access for identify cluster(3), So except identify cluster command if try to send any other command will get status as unsupported access. + + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 + The cluster used in the below command is an example, User can use any supported chip cluster. ./chip-tool generalcommissioning commissioning-complete 1 0 @@ -105,6 +112,8 @@ tests: [1654079608.667986][14525:14530] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0004 Status=0x7e [1654079608.668000][14525:14530] CHIP:TOO: Error: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) [1654079608.668011][14525:14530] CHIP:DMG: ICR moving to [AwaitingDe] + + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: @@ -161,17 +170,21 @@ tests: CommandDataIB and SuppressResponse set to True" verification: | Out of Scope for V1.0 + https://github.com/project-chip/connectedhomeip/issues/8043 disabled: true - label: "TH sends a Invoke Request Message to the DUT with the TimedRequest set as TRUE.(There should be no previous Timed Invoke action.)" verification: | - To Setup the TH such that there is no accessing fabric, 1st we need to send below mentioned ACL command + The cluster used in the below command is an example, User can use any supported chip cluster. + + To Setup the TH such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command + Here by sending below mentioned ACL command giving only access for identify cluster(3), So except identify cluster command if try to send any other command will get status as unsupported access. + + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [1234], "targets": null}]' 1 0 - The cluster used in the below command is an example, User can use any supported chip cluster. ./chip-tool onoff on 1 1 --timedInteractionTimeoutMs 100 On TH, verify DUT responsds as UNSUPPORTED_ACCESS for the data sent in the above command @@ -180,6 +193,8 @@ tests: [1657613026.975513][10484:10489] CHIP:TOO: Error: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) [1657613026.975556][10484:10489] CHIP:DMG: ICR moving to [AwaitingDe] [1657613026.975622][10484:10489] CHIP:EM: Sending Standalone Ack for MessageCounter:99688132 on exchange 24183i + + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: @@ -187,7 +202,13 @@ tests: path that requires a Timed Invoke transaction to invoke and this action is not part of a Timed Invoke transaction" verification: | + As in the previous step, we enabled accesscontrol to a specific cluster, we need to remove the accesscontrol using below command. + As the EP used here is an example, user needs to provide the endpoint id, which they use. + + + The cluster used in the below command is an example, User can use any supported chip cluster. + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 On TH, verify DUT responsds as NEEDS_TIMED_INTERACTION for the data sent in the above command diff --git a/src/app/tests/suites/certification/Test_TC_IDM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_2_1.yaml index 40ef36126ba94e..2ba56f2cf32c0a 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_2_1.yaml @@ -52,6 +52,13 @@ tests: [1655720917.721101][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655720917.721144][10909:10909] CHIP:DMG: }, [1655720917.721267][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + On DUT as a client side, verify that TH all-clusters-app sent success response + + [1657881522.001890][2575:2580] CHIP:DMG: } + [1657881522.002053][2575:2580] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 3999381333 + [1657881522.002133][2575:2580] CHIP:TOO: identify time: 0 + [1657881522.002227][2575:2580] CHIP:EM: Sending Standalone Ack for MessageCounter:54477998 on exchange 6586i disabled: true - label: @@ -86,6 +93,35 @@ tests: [1655721163.412212][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655721163.412236][10909:10909] CHIP:DMG: }, [1655721163.412312][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + + On DUT as a client side, verify that TH all-clusters-app sent success response + [1657881584.166241][2584:2589] CHIP:DMG: } + [1657881584.166599][2584:2589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 4079829024 + [1657881584.166672][2584:2589] CHIP:TOO: identify time: 0 + [1657881584.166734][2584:2589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_0001 DataVersion: 4079829024 + [1657881584.166761][2584:2589] CHIP:TOO: identify type: 2 + [1657881584.166817][2584:2589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFC DataVersion: 4079829024 + [1657881584.166844][2584:2589] CHIP:TOO: FeatureMap: 0 + [1657881584.166900][2584:2589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFD DataVersion: 4079829024 + [1657881584.166940][2584:2589] CHIP:TOO: ClusterRevision: 4 + [1657881584.167054][2584:2589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFF8 DataVersion: 4079829024 + [1657881584.167101][2584:2589] CHIP:TOO: GeneratedCommandList: 0 entries + [1657881584.167276][2584:2589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFF9 DataVersion: 4079829024 + [1657881584.167309][2584:2589] CHIP:TOO: AcceptedCommandList: 2 entries + [1657881584.167337][2584:2589] CHIP:TOO: [1]: 0 + [1657881584.167362][2584:2589] CHIP:TOO: [2]: 64 + [1657881584.167690][2584:2589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFB DataVersion: 4079829024 + [1657881584.167725][2584:2589] CHIP:TOO: AttributeList: 7 entries + [1657881584.167752][2584:2589] CHIP:TOO: [1]: 0 + [1657881584.167777][2584:2589] CHIP:TOO: [2]: 1 + [1657881584.167801][2584:2589] CHIP:TOO: [3]: 65528 + [1657881584.167825][2584:2589] CHIP:TOO: [4]: 65529 + [1657881584.167850][2584:2589] CHIP:TOO: [5]: 65531 + [1657881584.167874][2584:2589] CHIP:TOO: [6]: 65532 + [1657881584.167898][2584:2589] CHIP:TOO: [7]: 65533 + [1657881584.168029][2584:2589] CHIP:EM: Sending Standalone Ack for MessageCounter:84499870 on exchange 45190i disabled: true - label: @@ -98,7 +134,8 @@ tests: ./chip-tool any read-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF - verify On TH(Reference app) receives the right Read Request Message for the data sent in the above command + verify On TH(Reference app) receives the right Read Request Message for the data sent in the above command and + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values disabled: true - label: @@ -127,6 +164,8 @@ tests: [1655721447.463334][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655721447.463382][10909:10909] CHIP:DMG: }, [1655721447.463503][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values disabled: true - label: @@ -158,6 +197,56 @@ tests: [1655721586.588310][10909:10909] CHIP:DMG: }, [1655721586.588403][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] [1655721586.588510][10909:10909] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657881729.900518][2608:2613] CHIP:DMG: } + [1657881729.901108][2608:2613] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 4079829024 + [1657881729.901182][2608:2613] CHIP:TOO: identify time: 0 + [1657881729.901245][2608:2613] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_0001 DataVersion: 4079829024 + [1657881729.901273][2608:2613] CHIP:TOO: identify type: 2 + [1657881729.901331][2608:2613] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFC DataVersion: 4079829024 + [1657881729.901359][2608:2613] CHIP:TOO: FeatureMap: 0 + [1657881729.901431][2608:2613] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFD DataVersion: 4079829024 + [1657881729.901472][2608:2613] CHIP:TOO: ClusterRevision: 4 + [1657881729.901586][2608:2613] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFF8 DataVersion: 4079829024 + [1657881729.901632][2608:2613] CHIP:TOO: GeneratedCommandList: 0 entries + [1657881729.901806][2608:2613] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFF9 DataVersion: 4079829024 + [1657881729.901840][2608:2613] CHIP:TOO: AcceptedCommandList: 2 entries + [1657881729.901868][2608:2613] CHIP:TOO: [1]: 0 + [1657881729.901893][2608:2613] CHIP:TOO: [2]: 64 + [1657881729.902242][2608:2613] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFB DataVersion: 4079829024 + [1657881729.902279][2608:2613] CHIP:TOO: AttributeList: 7 entries + [1657881729.902305][2608:2613] CHIP:TOO: [1]: 0 + [1657881729.902329][2608:2613] CHIP:TOO: [2]: 1 + [1657881729.902354][2608:2613] CHIP:TOO: [3]: 65528 + [1657881729.902378][2608:2613] CHIP:TOO: [4]: 65529 + [1657881729.902402][2608:2613] CHIP:TOO: [5]: 65531 + [1657881729.902426][2608:2613] CHIP:TOO: [6]: 65532 + [1657881729.902451][2608:2613] CHIP:TOO: [7]: 65533 + [1657881729.902474][2608:2613] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 3999381333 + [1657881729.902500][2608:2613] CHIP:TOO: identify time: 0 + [1657881729.902556][2608:2613] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0001 DataVersion: 3999381333 + [1657881729.902583][2608:2613] CHIP:TOO: identify type: 2 + [1657881729.902640][2608:2613] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFFC DataVersion: 3999381333 + [1657881729.902665][2608:2613] CHIP:TOO: FeatureMap: 0 + [1657881729.902721][2608:2613] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFFD DataVersion: 3999381333 + [1657881729.902746][2608:2613] CHIP:TOO: ClusterRevision: 4 + [1657881729.902843][2608:2613] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFF8 DataVersion: 3999381333 + [1657881729.902872][2608:2613] CHIP:TOO: GeneratedCommandList: 0 entries + [1657881729.903021][2608:2613] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFF9 DataVersion: 3999381333 + [1657881729.903053][2608:2613] CHIP:TOO: AcceptedCommandList: 2 entries + [1657881729.903079][2608:2613] CHIP:TOO: [1]: 0 + [1657881729.903104][2608:2613] CHIP:TOO: [2]: 64 + [1657881729.903427][2608:2613] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFFB DataVersion: 3999381333 + [1657881729.903462][2608:2613] CHIP:TOO: AttributeList: 7 entries + [1657881729.903488][2608:2613] CHIP:TOO: [1]: 0 + [1657881729.903513][2608:2613] CHIP:TOO: [2]: 1 + [1657881729.903537][2608:2613] CHIP:TOO: [3]: 65528 + [1657881729.903561][2608:2613] CHIP:TOO: [4]: 65529 + [1657881729.903586][2608:2613] CHIP:TOO: [5]: 65531 + [1657881729.903610][2608:2613] CHIP:TOO: [6]: 65532 + [1657881729.903634][2608:2613] CHIP:TOO: [7]: 65533 + [1657881729.903843][2608:2613] CHIP:EM: Sending Standalone Ack for MessageCounter:174033086 on exchange 10540i disabled: true - label: @@ -189,6 +278,15 @@ tests: [1655721699.305827][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655721699.305870][10909:10909] CHIP:DMG: }, [1655721699.305990][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657881792.350417][2616:2621] CHIP:DMG: } + [1657881792.350641][2616:2621] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_0001 DataVersion: 4079829024 + [1657881792.350742][2616:2621] CHIP:TOO: identify type: 2 + [1657881792.350845][2616:2621] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0001 DataVersion: 3999381333 + [1657881792.350891][2616:2621] CHIP:TOO: identify type: 2 + [1657881792.351000][2616:2621] CHIP:EM: Sending Standalone Ack for MessageCounter:222990264 on exchange 23721i disabled: true - label: @@ -220,6 +318,10 @@ tests: [1655721846.894594][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655721846.894628][10909:10909] CHIP:DMG: }, [1655721846.894724][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values disabled: true - label: @@ -233,7 +335,7 @@ tests: ./chip-tool any read-by-id 0xFFFFFFFF 0xFFFD 1 0 - verify TH receives the right Read Request Message for the data sent in the above command + verify TH(reference app) receives the right Read Request Message for the data sent in the above command [1655721935.483404][10909:10909] CHIP:EM: Handling via exchange: 59853r, Delegate: 0xaaaac37ce418 [1655721935.483474][10909:10909] CHIP:IM: Received Read request @@ -253,6 +355,63 @@ tests: [1655721935.484392][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655721935.484450][10909:10909] CHIP:DMG: }, [1655721935.484595][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657881935.225146][2631:2636] CHIP:DMG: } + [1657881935.225620][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFD DataVersion: 4079829024 + [1657881935.225700][2631:2636] CHIP:TOO: ClusterRevision: 4 + [1657881935.225763][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_FFFD DataVersion: 130355893 + [1657881935.225790][2631:2636] CHIP:TOO: ClusterRevision: 4 + [1657881935.225846][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFFD DataVersion: 2043826222 + [1657881935.225872][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.225928][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001E Attribute 0x0000_FFFD DataVersion: 539126375 + [1657881935.225954][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226010][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_FFFD DataVersion: 821022762 + [1657881935.226037][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226093][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_FFFD DataVersion: 745595402 + [1657881935.226120][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226175][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002A Attribute 0x0000_FFFD DataVersion: 2914015802 + [1657881935.226201][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226258][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_FFFD DataVersion: 2733214794 + [1657881935.226284][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226340][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFD DataVersion: 3273895737 + [1657881935.226365][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226420][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_FFFD DataVersion: 2449855749 + [1657881935.226447][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226504][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002E Attribute 0x0000_FFFD DataVersion: 2597243070 + [1657881935.226530][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226586][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002F Attribute 0x0000_FFFD DataVersion: 714742425 + [1657881935.226611][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226667][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Attribute 0x0000_FFFD DataVersion: 3643421834 + [1657881935.226693][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226747][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFFD DataVersion: 3610511831 + [1657881935.226773][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226831][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0032 Attribute 0x0000_FFFD DataVersion: 3399712075 + [1657881935.226857][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226916][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Attribute 0x0000_FFFD DataVersion: 4165139953 + [1657881935.226941][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.226996][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Attribute 0x0000_FFFD DataVersion: 3623073226 + [1657881935.227022][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.227077][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0035 Attribute 0x0000_FFFD DataVersion: 3137436487 + [1657881935.227103][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.227159][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0036 Attribute 0x0000_FFFD DataVersion: 1172053040 + [1657881935.227185][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.227241][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0037 Attribute 0x0000_FFFD DataVersion: 3832336232 + [1657881935.227267][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.227325][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_FFFD DataVersion: 4072501061 + [1657881935.227350][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.227407][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_FFFD DataVersion: 1112172817 + [1657881935.227433][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.227488][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_FFFD DataVersion: 2917149142 + [1657881935.227515][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.227572][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0040 Attribute 0x0000_FFFD DataVersion: 1676181270 + [1657881935.227611][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.227669][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0041 Attribute 0x0000_FFFD DataVersion: 4002139741 + [1657881935.227695][2631:2636] CHIP:TOO: ClusterRevision: 1 + [1657881935.227752][2631:2636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0405 Attribute 0x0000_FFFD DataVersion: 2945088432 + [1657881935.227778][2631:2636] CHIP:TOO: ClusterRevision: 3 + [1657881935.227936][2631:2636] CHIP:EM: Sending Standalone Ack for MessageCounter:199380325 on exchange 6370i disabled: true - label: @@ -284,6 +443,13 @@ tests: [1655722298.459581][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655722298.459659][10909:10909] CHIP:DMG: }, [1655722298.459820][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657881978.415828][2640:2645] CHIP:DMG: } + [1657881978.416014][2640:2645] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 4019194565 + [1657881978.416091][2640:2645] CHIP:TOO: OnOff: FALSE + [1657881978.416245][2640:2645] CHIP:EM: Sending Standalone Ack for MessageCounter:144208215 on exchange 38107i disabled: true - label: @@ -314,6 +480,13 @@ tests: [1655722750.453268][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655722750.453316][10909:10909] CHIP:DMG: }, [1655722750.453457][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657882077.867099][2655:2660] CHIP:DMG: } + [1657882077.867278][2655:2660] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000 DataVersion: 321966114 + [1657882077.867352][2655:2660] CHIP:TOO: Description: Coffee + [1657882077.867466][2655:2660] CHIP:EM: Sending Standalone Ack for MessageCounter:62608362 on exchange 57811i disabled: true - label: @@ -344,6 +517,14 @@ tests: [1655722980.957477][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655722980.957506][10909:10909] CHIP:DMG: }, [1655722980.957605][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657882043.053353][2648:2653] CHIP:DMG: } + [1657882043.053561][2648:2653] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_0001 DataVersion: 4079829024 + [1657882043.053662][2648:2653] CHIP:TOO: identify type: 2 + [1657882043.053774][2648:2653] CHIP:EM: Sending Standalone Ack for MessageCounter:228608905 on exchange 11019i disabled: true - label: @@ -374,6 +555,14 @@ tests: [1655723021.113318][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655723021.113349][10909:10909] CHIP:DMG: }, [1655723021.113441][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657882152.821695][2665:2670] CHIP:DMG: } + [1657882152.821886][2665:2670] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0403 Attribute 0x0000_0000 DataVersion: 1184750328 + [1657882152.821981][2665:2670] CHIP:TOO: MeasuredValue: 0 + [1657882152.822099][2665:2670] CHIP:EM: Sending Standalone Ack for MessageCounter:178527554 on exchange 52092i disabled: true - label: @@ -412,6 +601,14 @@ tests: [1655723062.691441][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655723062.691494][10909:10909] CHIP:DMG: }, [1655723062.691635][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657882197.831561][2673:2678] CHIP:DMG: } + [1657882197.831802][2673:2678] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0004 DataVersion: 1112172817 + [1657882197.831892][2673:2678] CHIP:TOO: TrustedRootCertificates: 1 entries + [1657882197.831940][2673:2678] CHIP:TOO: [1]: 1530010100240201370324140018260480228127260580254D3A37062414001824070124080130094104EC98F1D5F8E4FF3B2B1B23B154C016A02843600C0D3073EFA38123BBFC62056CA4C90C591C80D1D66206DB31F3C0FA2E2A3B11377C28D1A2D5E3ED9C79B3DD75370A3501290118240260300414D3A7631B0D05BF3D059263A09502826A7E02768F300514D3A7631B0D05BF3D059263A09502826A7E02768F18300B401A2FD4DAE286A0C0E7F2A54014D19C3AA7F8A814664B14D4EDFE6D6366746B5EF86A677807BCCE30A71A1C112FF843B88044D4212197281859CED7D21D39A42418 + [1657882197.832044][2673:2678] CHIP:EM: Sending Standalone Ack for MessageCounter:182457329 on exchange 8706i disabled: true - label: @@ -443,6 +640,17 @@ tests: [1655723112.902618][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655723112.902664][10909:10909] CHIP:DMG: }, [1655723112.902782][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657882247.469521][2681:2686] CHIP:DMG: InteractionModelRevision = 1 + [1657882247.469553][2681:2686] CHIP:DMG: } + [1657882247.469732][2681:2686] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Attribute 0x0000_0001 DataVersion: 3643421834 + [1657882247.469825][2681:2686] CHIP:TOO: BasicCommissioningInfo: { + [1657882247.469886][2681:2686] CHIP:TOO: FailSafeExpiryLengthSeconds: 60 + [1657882247.469921][2681:2686] CHIP:TOO: MaxCumulativeFailsafeSeconds: 900 + [1657882247.469952][2681:2686] CHIP:TOO: } + [1657882247.470043][2681:2686] CHIP:EM: Sending Standalone Ack for MessageCounter:52322886 on exchange 1487i disabled: true - label: @@ -474,6 +682,41 @@ tests: [1655723151.160110][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655723151.160147][10909:10909] CHIP:DMG: }, [1655723151.160243][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + + [1657882339.679133][2701:2706] CHIP:DMG: } + [1657882339.679605][2701:2706] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 321966114 + [1657882339.679722][2701:2706] CHIP:TOO: SupportedModes: 3 entries + [1657882339.679786][2701:2706] CHIP:TOO: [1]: { + [1657882339.679813][2701:2706] CHIP:TOO: Label: Black + [1657882339.679852][2701:2706] CHIP:TOO: Mode: 0 + [1657882339.679883][2701:2706] CHIP:TOO: SemanticTags: 1 entries + [1657882339.679918][2701:2706] CHIP:TOO: [1]: { + [1657882339.679943][2701:2706] CHIP:TOO: MfgCode: 0 + [1657882339.679966][2701:2706] CHIP:TOO: Value: 0 + [1657882339.679986][2701:2706] CHIP:TOO: } + [1657882339.680006][2701:2706] CHIP:TOO: } + [1657882339.680040][2701:2706] CHIP:TOO: [2]: { + [1657882339.680065][2701:2706] CHIP:TOO: Label: Cappuccino + [1657882339.680088][2701:2706] CHIP:TOO: Mode: 4 + [1657882339.680131][2701:2706] CHIP:TOO: SemanticTags: 1 entries + [1657882339.680163][2701:2706] CHIP:TOO: [1]: { + [1657882339.680188][2701:2706] CHIP:TOO: MfgCode: 0 + [1657882339.680212][2701:2706] CHIP:TOO: Value: 0 + [1657882339.680236][2701:2706] CHIP:TOO: } + [1657882339.680261][2701:2706] CHIP:TOO: } + [1657882339.680296][2701:2706] CHIP:TOO: [3]: { + [1657882339.680320][2701:2706] CHIP:TOO: Label: Espresso + [1657882339.680344][2701:2706] CHIP:TOO: Mode: 7 + [1657882339.680371][2701:2706] CHIP:TOO: SemanticTags: 1 entries + [1657882339.680402][2701:2706] CHIP:TOO: [1]: { + [1657882339.680427][2701:2706] CHIP:TOO: MfgCode: 0 + [1657882339.680451][2701:2706] CHIP:TOO: Value: 0 + [1657882339.680474][2701:2706] CHIP:TOO: } + [1657882339.680499][2701:2706] CHIP:TOO: } + [1657882339.680600][2701:2706] CHIP:EM: Sending Standalone Ack for MessageCounter:207994304 on exchange 48282i disabled: true - label: @@ -504,6 +747,12 @@ tests: [1655723234.549038][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655723234.549097][10909:10909] CHIP:DMG: }, [1655723234.549241][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657882403.876372][2715:2720] CHIP:DMG: } + [1657882403.876514][2715:2720] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0406 Attribute 0x0000_0001 DataVersion: 737072536 + [1657882403.876595][2715:2720] CHIP:TOO: occupancy sensor type: 0 + [1657882403.876679][2715:2720] CHIP:EM: Sending Standalone Ack for MessageCounter:153370776 on exchange 37640i disabled: true - label: @@ -534,6 +783,14 @@ tests: [1655723282.098112][10909:10909] CHIP:DMG: InteractionModelRevision = 1 [1655723282.098134][10909:10909] CHIP:DMG: }, [1655723282.098206][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657882440.996840][2725:2730] CHIP:DMG: InteractionModelRevision = 1 + [1657882440.996862][2725:2730] CHIP:DMG: } + [1657882440.997003][2725:2730] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_000F DataVersion: 3900213102 + [1657882440.997084][2725:2730] CHIP:TOO: options: 0 + [1657882440.997170][2725:2730] CHIP:EM: Sending Standalone Ack for MessageCounter:250919190 on exchange 53994i disabled: true - label: @@ -565,6 +822,14 @@ tests: [1655723372.329162][10909:10909] CHIP:DMG: IM RH moving to [GeneratingReports] + On DUT as a client side, verify that TH all-clusters-app sent success response with attribute values + [1657883628.582877][2780:2785] CHIP:DMG: InteractionModelRevision = 1 + [1657883628.582909][2780:2785] CHIP:DMG: } + [1657883628.583066][2780:2785] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0406 Attribute 0x0000_0000 DataVersion: 737072536 + [1657883628.583146][2780:2785] CHIP:TOO: occupancy: 0 + [1657883628.583225][2780:2785] CHIP:EM: Sending Standalone Ack for MessageCounter:68376422 on exchange 7437i + + ./chip-tool occupancysensing read occupancy 1 1 verify TH receives the right Read Request Message for the data sent in the above command @@ -579,4 +844,29 @@ tests: the last one, DUT sends a status response." verification: | DUT implementation required to verify read an attribute which is is larger than 1 MTU(1280 bytes) + Below sample wildcard read command will read all the attributes from the all-clusters-app and generates 1 MTU size of data. + If the dut doesn't support generating the large chunk data, then this test step can be skipped. + Verify the last chunked data is having Suppress response True & TH will not send the Ack message. + + ./chip-tool any read-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF + + The message flow can expect as mentioned below + TH -> DUT ReadRequest + DUT -> TH ReportData, not last chunk + TH -> DUT StatusResponse + Possibly repeat steps 2 & 3 a few times + DUT -> TH ReportData, last chunk, SuppressResponse set to true + TH -> DUT standalone ack + + On TH verify that The last chunked message should not receive any status response from the DUT + + [1658396687.401934][3726:3731] CHIP:DMG: + [1658396687.401958][3726:3731] CHIP:DMG: }, + [1658396687.401987][3726:3731] CHIP:DMG: + [1658396687.402010][3726:3731] CHIP:DMG: ], + [1658396687.402048][3726:3731] CHIP:DMG: + [1658396687.402072][3726:3731] CHIP:DMG: SuppressResponse = true, + [1658396687.402097][3726:3731] CHIP:DMG: InteractionModelRevision = 1 + [1658396687.402119][3726:3731] CHIP:DMG: } + [1658396687.402400][3726:3731] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0201 Attribute 0x0000_FFFB DataVersion: 3456275847 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_2_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_2_2.yaml index 0aec602e9d8e06..6036888ff00dd5 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_2_2.yaml @@ -73,9 +73,9 @@ tests: verification: | The cluster used in the below command is an example, User can use any supported chip cluster. - sudo ./chip-tool any read-by-id 0x03 0xFFFFFFFF 1 0xFFFF + sudo ./chip-tool any read-by-id 0x03 0xFFFFFFFF 1 0 - Verify on TH , DUT responds the right attribute value for above command + on TH , Verify that DUT responds the right attribute value for above command [1655727546.354466][5286:5291] CHIP:DMG: [1655727546.354512][5286:5291] CHIP:DMG: SuppressResponse = true, @@ -104,30 +104,6 @@ tests: [1655727546.356716][5286:5291] CHIP:TOO: [5]: 65531 [1655727546.356741][5286:5291] CHIP:TOO: [6]: 65532 [1655727546.356766][5286:5291] CHIP:TOO: [7]: 65533 - [1655727546.356790][5286:5291] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 236949823 - [1655727546.356815][5286:5291] CHIP:TOO: identify time: 0 - [1655727546.356895][5286:5291] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0001 DataVersion: 236949823 - [1655727546.356946][5286:5291] CHIP:TOO: identify type: 2 - [1655727546.357022][5286:5291] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFFC DataVersion: 236949823 - [1655727546.357065][5286:5291] CHIP:TOO: FeatureMap: 0 - [1655727546.357143][5286:5291] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFFD DataVersion: 236949823 - [1655727546.357171][5286:5291] CHIP:TOO: ClusterRevision: 4 - [1655727546.357312][5286:5291] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFF8 DataVersion: 236949823 - [1655727546.357362][5286:5291] CHIP:TOO: GeneratedCommandList: 0 entries - [1655727546.357555][5286:5291] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFF9 DataVersion: 236949823 - [1655727546.357610][5286:5291] CHIP:TOO: AcceptedCommandList: 2 entries - [1655727546.357638][5286:5291] CHIP:TOO: [1]: 0 - [1655727546.357662][5286:5291] CHIP:TOO: [2]: 64 - [1655727546.358014][5286:5291] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFFB DataVersion: 236949823 - [1655727546.358052][5286:5291] CHIP:TOO: AttributeList: 7 entries - [1655727546.358078][5286:5291] CHIP:TOO: [1]: 0 - [1655727546.358103][5286:5291] CHIP:TOO: [2]: 1 - [1655727546.358127][5286:5291] CHIP:TOO: [3]: 65528 - [1655727546.358152][5286:5291] CHIP:TOO: [4]: 65529 - [1655727546.358176][5286:5291] CHIP:TOO: [5]: 65531 - [1655727546.358200][5286:5291] CHIP:TOO: [6]: 65532 - [1655727546.358225][5286:5291] CHIP:TOO: [7]: 65533 - [1655727546.358492][5286:5291] CHIP:EM: Sending Standalone Ack for MessageCounter:220291395 on exchange 53799i disabled: true - label: @@ -597,7 +573,11 @@ tests: the path that requires a privilege that is not granted for the cluster in the path. DUT responds with the report data action." verification: | - To Setup the TH such that there is no accessing fabric, 1st we need to send below mentioned ACL command + To Setup the TH such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command + Here by sending below mentioned ACL command giving only access for identify cluster(3), So except identify cluster command if try to send any other command will get status as unsupported access. + + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [1234], "targets": null}]' 1 0 @@ -612,6 +592,9 @@ tests: [1652964769.384668][39268:39273] CHIP:DMG: InteractionModelRevision = 1 [1652964769.384682][39268:39273] CHIP:DMG: } [1652964769.384788][39268:39273] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) + + + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: @@ -1046,7 +1029,10 @@ tests: The cluster used in the below command is an example, User can use any supported chip cluster. - To Setup the TH such that there is no accessing fabric, 1st we need to send below mentioned ACL command + + To Setup the TH such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command + Here by sending below mentioned ACL command giving only access for identify cluster(3), So except identify cluster command if try to send any other command will get status as unsupported access. + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 @@ -1081,6 +1067,9 @@ tests: [1657537120.035342][9438:9443] CHIP:TOO: [6]: 65532 [1657537120.035405][9438:9443] CHIP:TOO: [7]: 65533 [1657537120.035801][9438:9443] CHIP:EM: Sending Standalone Ack for MessageCounter:64174919 on exchange 48017i + + + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_IDM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_3_1.yaml index 533e21320f81e3..ff0f7947a2e31a 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_3_1.yaml @@ -30,7 +30,7 @@ tests: sudo ./chip-tool levelcontrol write on-level 2 1 1 - verify on TH receives the right write Request Message for the data sent in the above command + verify on TH(reference app) receives the right write Request Message for the data sent in the above command [1655795552.551487][7331:7331] CHIP:EM: Handling via exchange: 41640r, Delegate: 0xaaaad9aed418 [1655795552.551552][7331:7331] CHIP:IM: Received Write request @@ -59,7 +59,57 @@ tests: [1655795552.552647][7331:7331] CHIP:DMG: InteractionModelRevision = 1 [1655795552.552686][7331:7331] CHIP:DMG: }, + On DUT as a client side, verify that TH all-clusters-app sent success response + [1657883782.721742][2796:2801] CHIP:DMG: WriteResponseMessage = + [1657883782.721783][2796:2801] CHIP:DMG: { + [1657883782.721819][2796:2801] CHIP:DMG: AttributeStatusIBs = + [1657883782.721874][2796:2801] CHIP:DMG: [ + [1657883782.721914][2796:2801] CHIP:DMG: AttributeStatusIB = + [1657883782.721959][2796:2801] CHIP:DMG: { + [1657883782.722002][2796:2801] CHIP:DMG: AttributePathIB = + [1657883782.722054][2796:2801] CHIP:DMG: { + [1657883782.722112][2796:2801] CHIP:DMG: Endpoint = 0x1, + [1657883782.722172][2796:2801] CHIP:DMG: Cluster = 0x8, + [1657883782.722227][2796:2801] CHIP:DMG: Attribute = 0x0000_0011, + [1657883782.722278][2796:2801] CHIP:DMG: } + [1657883782.722335][2796:2801] CHIP:DMG: + [1657883782.722384][2796:2801] CHIP:DMG: StatusIB = + [1657883782.722435][2796:2801] CHIP:DMG: { + [1657883782.722493][2796:2801] CHIP:DMG: status = 0x00 (SUCCESS), + [1657883782.722547][2796:2801] CHIP:DMG: }, + [1657883782.722605][2796:2801] CHIP:DMG: + [1657883782.722648][2796:2801] CHIP:DMG: }, + [1657883782.722697][2796:2801] CHIP:DMG: + [1657883782.722736][2796:2801] CHIP:DMG: ], + [1657883782.722783][2796:2801] CHIP:DMG: + [1657883782.722823][2796:2801] CHIP:DMG: InteractionModelRevision = 1 + [1657883782.722860][2796:2801] CHIP:DMG: } + [1657883782.722967][2796:2801] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1657883782.723047][2796:2801] CHIP:EM: Sending Standalone Ack for MessageCounter:76592104 on exchange 56753i + + sudo ./chip-tool levelcontrol read on-level 1 1 + verify on TH(reference app) receives the right write Request Message for the data sent in the above command + [1657883808.062792][2457:2457] CHIP:IM: Received Read request + [1657883808.062871][2457:2457] CHIP:DMG: ReadRequestMessage = + [1657883808.062900][2457:2457] CHIP:DMG: { + [1657883808.062922][2457:2457] CHIP:DMG: AttributePathIBs = + [1657883808.062949][2457:2457] CHIP:DMG: [ + [1657883808.062972][2457:2457] CHIP:DMG: AttributePathIB = + [1657883808.063000][2457:2457] CHIP:DMG: { + [1657883808.063028][2457:2457] CHIP:DMG: Endpoint = 0x1, + [1657883808.063068][2457:2457] CHIP:DMG: Cluster = 0x8, + [1657883808.063105][2457:2457] CHIP:DMG: Attribute = 0x0000_0011, + [1657883808.063138][2457:2457] CHIP:DMG: } + [1657883808.063167][2457:2457] CHIP:DMG: + [1657883808.063192][2457:2457] CHIP:DMG: ], + [1657883808.063221][2457:2457] CHIP:DMG: + [1657883808.063247][2457:2457] CHIP:DMG: isFabricFiltered = true, + [1657883808.063272][2457:2457] CHIP:DMG: InteractionModelRevision = 1 + [1657883808.063295][2457:2457] CHIP:DMG: }, + [1657883808.063369][2457:2457] CHIP:DMG: IM RH moving to [GeneratingReports] + + On DUT as a client side, verify that TH all-clusters-app sent success response [1655795604.755214][6880:6885] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0011 DataVersion: 737039636 [1655795604.755363][6880:6885] CHIP:TOO: on level: 2 [1655795604.755460][6880:6885] CHIP:EM: Sending Standalone Ack for MessageCounter:83198098 on exchange 53763i @@ -81,7 +131,7 @@ tests: ./chip-tool basic write local-config-disabled 1 1 0 - verify on TH receives the right write Request Message for the data sent in the above command + verify on TH(reference app) receives the right write Request Message for the data sent in the above command [1655795795.033946][7331:7331] CHIP:EM: Handling via exchange: 11668r, Delegate: 0xaaaad9aed418 [1655795795.034011][7331:7331] CHIP:IM: Received Write request @@ -111,7 +161,62 @@ tests: [1655795795.035138][7331:7331] CHIP:DMG: }, [1655795795.035259][7331:7331] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0028 e=0 p=m + + + On DUT as a client side, verify that TH all-clusters-app sent success response + + [1657883938.394965][2822:2827] CHIP:DMG: WriteResponseMessage = + [1657883938.394995][2822:2827] CHIP:DMG: { + [1657883938.395022][2822:2827] CHIP:DMG: AttributeStatusIBs = + [1657883938.395060][2822:2827] CHIP:DMG: [ + [1657883938.395090][2822:2827] CHIP:DMG: AttributeStatusIB = + [1657883938.395127][2822:2827] CHIP:DMG: { + [1657883938.395158][2822:2827] CHIP:DMG: AttributePathIB = + [1657883938.395196][2822:2827] CHIP:DMG: { + [1657883938.395241][2822:2827] CHIP:DMG: Endpoint = 0x0, + [1657883938.395283][2822:2827] CHIP:DMG: Cluster = 0x28, + [1657883938.395324][2822:2827] CHIP:DMG: Attribute = 0x0000_0010, + [1657883938.395363][2822:2827] CHIP:DMG: } + [1657883938.395406][2822:2827] CHIP:DMG: + [1657883938.395446][2822:2827] CHIP:DMG: StatusIB = + [1657883938.395485][2822:2827] CHIP:DMG: { + [1657883938.395522][2822:2827] CHIP:DMG: status = 0x00 (SUCCESS), + [1657883938.395561][2822:2827] CHIP:DMG: }, + [1657883938.395603][2822:2827] CHIP:DMG: + [1657883938.395636][2822:2827] CHIP:DMG: }, + [1657883938.395672][2822:2827] CHIP:DMG: + [1657883938.395700][2822:2827] CHIP:DMG: ], + [1657883938.395735][2822:2827] CHIP:DMG: + [1657883938.395765][2822:2827] CHIP:DMG: InteractionModelRevision = 1 + [1657883938.395794][2822:2827] CHIP:DMG: } + [1657883938.395875][2822:2827] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1657883938.395940][2822:2827] CHIP:EM: Sending Standalone Ack for MessageCounter:157043526 on exchange 18989i + + ./chip-tool basic read local-config-disabled 1 0 + + verify on TH(reference app) receives the right write Request Message for the data sent in the above command + [1657884119.522809][2748:2748] CHIP:IM: Received Read request + [1657884119.522885][2748:2748] CHIP:DMG: ReadRequestMessage = + [1657884119.522911][2748:2748] CHIP:DMG: { + [1657884119.522933][2748:2748] CHIP:DMG: AttributePathIBs = + [1657884119.522959][2748:2748] CHIP:DMG: [ + [1657884119.522982][2748:2748] CHIP:DMG: AttributePathIB = + [1657884119.523009][2748:2748] CHIP:DMG: { + [1657884119.523037][2748:2748] CHIP:DMG: Endpoint = 0x0, + [1657884119.523067][2748:2748] CHIP:DMG: Cluster = 0x28, + [1657884119.523097][2748:2748] CHIP:DMG: Attribute = 0x0000_0010, + [1657884119.523126][2748:2748] CHIP:DMG: } + [1657884119.523153][2748:2748] CHIP:DMG: + [1657884119.523179][2748:2748] CHIP:DMG: ], + [1657884119.523207][2748:2748] CHIP:DMG: + [1657884119.523233][2748:2748] CHIP:DMG: isFabricFiltered = true, + [1657884119.523257][2748:2748] CHIP:DMG: InteractionModelRevision = 1 + [1657884119.523280][2748:2748] CHIP:DMG: }, + + + + On DUT as a client side, verify that TH all-clusters-app sent success response [1655795843.336042][6902:6907] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 1263909562 [1655795843.336093][6902:6907] CHIP:TOO: LocalConfigDisabled: TRUE [1655795843.336251][6902:6907] CHIP:EM: Sending Standalone Ack for MessageCounter:108030495 on exchange 43207i @@ -127,7 +232,7 @@ tests: ./chip-tool basic write node-label node 1 0 - verify on TH receives the right write Request Message for the data sent in the above command + verify on TH(reference app) receives the right write Request Message for the data sent in the above command [1655796035.022296][7331:7331] CHIP:EM: Handling via exchange: 64908r, Delegate: 0xaaaad9aed418 [1655796035.022365][7331:7331] CHIP:IM: Received Write request @@ -158,7 +263,58 @@ tests: [1655796035.023791][7331:7331] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0028 e=0 p=m [1655796035.023851][7331:7331] CHIP:DMG: AccessControl: allowed + On DUT as a client side, verify that TH all-clusters-app sent success response + [1657884155.221193][2865:2870] CHIP:DMG: WriteResponseMessage = + [1657884155.221246][2865:2870] CHIP:DMG: { + [1657884155.221292][2865:2870] CHIP:DMG: AttributeStatusIBs = + [1657884155.221356][2865:2870] CHIP:DMG: [ + [1657884155.221406][2865:2870] CHIP:DMG: AttributeStatusIB = + [1657884155.221464][2865:2870] CHIP:DMG: { + [1657884155.221518][2865:2870] CHIP:DMG: AttributePathIB = + [1657884155.221588][2865:2870] CHIP:DMG: { + [1657884155.221635][2865:2870] CHIP:DMG: Endpoint = 0x0, + [1657884155.221673][2865:2870] CHIP:DMG: Cluster = 0x28, + [1657884155.221710][2865:2870] CHIP:DMG: Attribute = 0x0000_0005, + [1657884155.221798][2865:2870] CHIP:DMG: } + [1657884155.221837][2865:2870] CHIP:DMG: + [1657884155.221868][2865:2870] CHIP:DMG: StatusIB = + [1657884155.221900][2865:2870] CHIP:DMG: { + [1657884155.221932][2865:2870] CHIP:DMG: status = 0x00 (SUCCESS), + [1657884155.221965][2865:2870] CHIP:DMG: }, + [1657884155.221996][2865:2870] CHIP:DMG: + [1657884155.222022][2865:2870] CHIP:DMG: }, + [1657884155.222052][2865:2870] CHIP:DMG: + [1657884155.222077][2865:2870] CHIP:DMG: ], + [1657884155.222108][2865:2870] CHIP:DMG: + [1657884155.222132][2865:2870] CHIP:DMG: InteractionModelRevision = 1 + [1657884155.222157][2865:2870] CHIP:DMG: } + [1657884155.222229][2865:2870] CHIP:DMG: WriteClient moving to [AwaitingDe] + + ./chip-tool basic read node-label 1 0 + verify on TH(reference app) receives the right write Request Message for the data sent in the above command + [1657884173.738798][2748:2748] CHIP:IM: Received Read request + [1657884173.738877][2748:2748] CHIP:DMG: ReadRequestMessage = + [1657884173.738904][2748:2748] CHIP:DMG: { + [1657884173.738926][2748:2748] CHIP:DMG: AttributePathIBs = + [1657884173.738952][2748:2748] CHIP:DMG: [ + [1657884173.738975][2748:2748] CHIP:DMG: AttributePathIB = + [1657884173.739009][2748:2748] CHIP:DMG: { + [1657884173.739041][2748:2748] CHIP:DMG: Endpoint = 0x0, + [1657884173.739073][2748:2748] CHIP:DMG: Cluster = 0x28, + [1657884173.739105][2748:2748] CHIP:DMG: Attribute = 0x0000_0005, + [1657884173.739134][2748:2748] CHIP:DMG: } + [1657884173.739162][2748:2748] CHIP:DMG: + [1657884173.739188][2748:2748] CHIP:DMG: ], + [1657884173.739215][2748:2748] CHIP:DMG: + [1657884173.739241][2748:2748] CHIP:DMG: isFabricFiltered = true, + [1657884173.739266][2748:2748] CHIP:DMG: InteractionModelRevision = 1 + [1657884173.739288][2748:2748] CHIP:DMG: }, + + + + On DUT as a client side, verify that TH all-clusters-app sent success response + [1655796082.079468][6918:6923] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 1263909563 [1655796082.079509][6918:6923] CHIP:TOO: NodeLabel: node [1655796082.079608][6918:6923] CHIP:EM: Sending Standalone Ack for MessageCounter:256008218 on exchange 23185i @@ -173,7 +329,7 @@ tests: ./chip-tool any write-by-id 0x0008 0x0010 1 1 1 - verify on TH receives the right write Request Message for the data sent in the above command + verify on TH(reference app) receives the right write Request Message for the data sent in the above command [1655796141.166846][7331:7331] CHIP:IM: Received Write request [1655796141.166889][7331:7331] CHIP:DMG: IM WH moving to [Initialized] @@ -203,8 +359,59 @@ tests: [1655796141.168253][7331:7331] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0008 e=1 p=o [1655796141.168313][7331:7331] CHIP:DMG: AccessControl: allowed + On DUT as a client side, verify that TH all-clusters-app sent success response + [1657884204.951658][2878:2883] CHIP:DMG: WriteResponseMessage = + [1657884204.951700][2878:2883] CHIP:DMG: { + [1657884204.951736][2878:2883] CHIP:DMG: AttributeStatusIBs = + [1657884204.951786][2878:2883] CHIP:DMG: [ + [1657884204.951826][2878:2883] CHIP:DMG: AttributeStatusIB = + [1657884204.951871][2878:2883] CHIP:DMG: { + [1657884204.951913][2878:2883] CHIP:DMG: AttributePathIB = + [1657884204.951965][2878:2883] CHIP:DMG: { + [1657884204.952018][2878:2883] CHIP:DMG: Endpoint = 0x1, + [1657884204.952075][2878:2883] CHIP:DMG: Cluster = 0x8, + [1657884204.952173][2878:2883] CHIP:DMG: Attribute = 0x0000_0010, + [1657884204.952226][2878:2883] CHIP:DMG: } + [1657884204.952286][2878:2883] CHIP:DMG: + [1657884204.952340][2878:2883] CHIP:DMG: StatusIB = + [1657884204.952396][2878:2883] CHIP:DMG: { + [1657884204.952449][2878:2883] CHIP:DMG: status = 0x00 (SUCCESS), + [1657884204.952500][2878:2883] CHIP:DMG: }, + [1657884204.952552][2878:2883] CHIP:DMG: + [1657884204.952597][2878:2883] CHIP:DMG: }, + [1657884204.952645][2878:2883] CHIP:DMG: + [1657884204.952684][2878:2883] CHIP:DMG: ], + [1657884204.952731][2878:2883] CHIP:DMG: + [1657884204.952770][2878:2883] CHIP:DMG: InteractionModelRevision = 1 + [1657884204.952808][2878:2883] CHIP:DMG: } + [1657884204.952914][2878:2883] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1657884204.952998][2878:2883] CHIP:EM: Sending Standalone Ack for MessageCounter:264044678 + ./chip-tool any read-by-id 0x0008 0x0010 1 1 + + verify on TH(reference app) receives the read Request Message for the data sent in the above command + [1657884227.859836][2748:2748] CHIP:IM: Received Read request + [1657884227.859916][2748:2748] CHIP:DMG: ReadRequestMessage = + [1657884227.859942][2748:2748] CHIP:DMG: { + [1657884227.859964][2748:2748] CHIP:DMG: AttributePathIBs = + [1657884227.859989][2748:2748] CHIP:DMG: [ + [1657884227.860012][2748:2748] CHIP:DMG: AttributePathIB = + [1657884227.860045][2748:2748] CHIP:DMG: { + [1657884227.860076][2748:2748] CHIP:DMG: Endpoint = 0x1, + [1657884227.860112][2748:2748] CHIP:DMG: Cluster = 0x8, + [1657884227.860147][2748:2748] CHIP:DMG: Attribute = 0x0000_0010, + [1657884227.860181][2748:2748] CHIP:DMG: } + [1657884227.860211][2748:2748] CHIP:DMG: + [1657884227.860239][2748:2748] CHIP:DMG: ], + [1657884227.860266][2748:2748] CHIP:DMG: + [1657884227.860292][2748:2748] CHIP:DMG: isFabricFiltered = true, + [1657884227.860316][2748:2748] CHIP:DMG: InteractionModelRevision = 1 + [1657884227.860339][2748:2748] CHIP:DMG: }, + [1657884227.860413][2748:2748] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent success response [1655796192.032715][6931:6936] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0010 DataVersion: 737039637 [1655796192.032807][6931:6936] CHIP:TOO: on off transition time: 1 [1655796192.032908][6931:6936] CHIP:EM: Sending Standalone Ack for MessageCounter:249349258 on exchange 7433i @@ -253,7 +460,7 @@ tests: ./chip-tool any write-by-id 0x0204 0 1 1 1 - verify on TH receives the right write Request Message for the data sent in the above command + verify on TH (reference app) receives the right write Request Message for the data sent in the above command [1655796297.607841][7331:7331] CHIP:EM: Handling via exchange: 37495r, Delegate: 0xaaaad9aed418 [1655796297.607911][7331:7331] CHIP:IM: Received Write request @@ -284,7 +491,43 @@ tests: [1655796297.609342][7331:7331] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0204 e=1 p=o [1655796297.609403][7331:7331] CHIP:DMG: AccessControl: allowed + On DUT as a client side, verify that TH all-clusters-app sent success response + [1657884258.383116][2892:2897] CHIP:DMG: WriteResponseMessage = + [1657884258.383157][2892:2897] CHIP:DMG: { + [1657884258.383192][2892:2897] CHIP:DMG: AttributeStatusIBs = + [1657884258.383255][2892:2897] CHIP:DMG: [ + [1657884258.383295][2892:2897] CHIP:DMG: AttributeStatusIB = + [1657884258.383339][2892:2897] CHIP:DMG: { + [1657884258.383381][2892:2897] CHIP:DMG: AttributePathIB = + [1657884258.383431][2892:2897] CHIP:DMG: { + [1657884258.383482][2892:2897] CHIP:DMG: Endpoint = 0x1, + [1657884258.383538][2892:2897] CHIP:DMG: Cluster = 0x204, + [1657884258.383592][2892:2897] CHIP:DMG: Attribute = 0x0000_0000, + [1657884258.383647][2892:2897] CHIP:DMG: } + [1657884258.383703][2892:2897] CHIP:DMG: + [1657884258.383750][2892:2897] CHIP:DMG: StatusIB = + [1657884258.383800][2892:2897] CHIP:DMG: { + [1657884258.383851][2892:2897] CHIP:DMG: status = 0x00 (SUCCESS), + [1657884258.383905][2892:2897] CHIP:DMG: }, + [1657884258.383955][2892:2897] CHIP:DMG: + [1657884258.383996][2892:2897] CHIP:DMG: }, + [1657884258.384043][2892:2897] CHIP:DMG: + [1657884258.384081][2892:2897] CHIP:DMG: ], + [1657884258.384170][2892:2897] CHIP:DMG: + [1657884258.384212][2892:2897] CHIP:DMG: InteractionModelRevision = 1 + [1657884258.384249][2892:2897] CHIP:DMG: } + [1657884258.384358][2892:2897] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1657884258.384441][2892:2897] CHIP:EM: Sending Standalone Ack for MessageCounter:255796912 on exchange 26584i + + ./chip-tool any read-by-id 0x0204 0 1 1 + verify on TH (reference app) receives the right write Request Message for the data sent in the above command + [1657884282.303557][2898:2903] CHIP:DMG: } + [1657884282.303695][2898:2903] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_0000 DataVersion: 2387607084 + [1657884282.303778][2898:2903] CHIP:TOO: temperature display mode: 1 + [1657884282.303862][2898:2903] CHIP:EM: Sending Standalone Ack for MessageCounter:147756485 on exchange 42871i + + On DUT as a client side, verify that TH all-clusters-app sent success response [1655796341.132655][6946:6951] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_0000 DataVersion: 3165945391 [1655796341.132864][6946:6951] CHIP:TOO: temperature display mode: 1 [1655796341.132973][6946:6951] CHIP:EM: Sending Standalone Ack for MessageCounter:245498041 on exchange 51992i @@ -300,7 +543,7 @@ tests: ./chip-tool colorcontrol write-by-id 0x000f 1 1 1 - verify on TH receives the right write Request Message for the data sent in the above command + verify on TH(reference app) receives the right write Request Message for the data sent in the above command [1655796429.696904][7331:7331] CHIP:IM: Received Write request [1655796429.696947][7331:7331] CHIP:DMG: IM WH moving to [Initialized] @@ -331,7 +574,61 @@ tests: [1655796429.698446][7331:7331] CHIP:DMG: AccessControl: allowed - sudo ./chip-tool colorcontrol read-by-id 0x000f 1 1 + On DUT as a client side, verify that TH all-clusters-app sent success response + + [1657884309.994598][2907:2912] CHIP:DMG: WriteResponseMessage = + [1657884309.994627][2907:2912] CHIP:DMG: { + [1657884309.994652][2907:2912] CHIP:DMG: AttributeStatusIBs = + [1657884309.994688][2907:2912] CHIP:DMG: [ + [1657884309.994715][2907:2912] CHIP:DMG: AttributeStatusIB = + [1657884309.994754][2907:2912] CHIP:DMG: { + [1657884309.994787][2907:2912] CHIP:DMG: AttributePathIB = + [1657884309.994823][2907:2912] CHIP:DMG: { + [1657884309.994861][2907:2912] CHIP:DMG: Endpoint = 0x1, + [1657884309.994902][2907:2912] CHIP:DMG: Cluster = 0x300, + [1657884309.994941][2907:2912] CHIP:DMG: Attribute = 0x0000_000F, + [1657884309.994977][2907:2912] CHIP:DMG: } + [1657884309.995021][2907:2912] CHIP:DMG: + [1657884309.995057][2907:2912] CHIP:DMG: StatusIB = + [1657884309.995096][2907:2912] CHIP:DMG: { + [1657884309.995132][2907:2912] CHIP:DMG: status = 0x00 (SUCCESS), + [1657884309.995168][2907:2912] CHIP:DMG: }, + [1657884309.995203][2907:2912] CHIP:DMG: + [1657884309.995234][2907:2912] CHIP:DMG: }, + [1657884309.995268][2907:2912] CHIP:DMG: + [1657884309.995295][2907:2912] CHIP:DMG: ], + [1657884309.995329][2907:2912] CHIP:DMG: + [1657884309.995356][2907:2912] CHIP:DMG: InteractionModelRevision = 1 + [1657884309.995383][2907:2912] CHIP:DMG: } + [1657884309.995461][2907:2912] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1657884309.995524][2907:2912] CHIP:EM: Sending Standalone Ack for MessageCounter:243574725 on exchange 27981i + + + + ./chip-tool colorcontrol read-by-id 0x000f 1 1 + + verify on TH (reference app) receives the right write Request Message for the data sent in the above command + [1657884334.613535][2748:2748] CHIP:IM: Received Read request + [1657884334.613615][2748:2748] CHIP:DMG: ReadRequestMessage = + [1657884334.613641][2748:2748] CHIP:DMG: { + [1657884334.613663][2748:2748] CHIP:DMG: AttributePathIBs = + [1657884334.613685][2748:2748] CHIP:DMG: [ + [1657884334.613746][2748:2748] CHIP:DMG: AttributePathIB = + [1657884334.613775][2748:2748] CHIP:DMG: { + [1657884334.613803][2748:2748] CHIP:DMG: Endpoint = 0x1, + [1657884334.613834][2748:2748] CHIP:DMG: Cluster = 0x300, + [1657884334.613869][2748:2748] CHIP:DMG: Attribute = 0x0000_000F, + [1657884334.613898][2748:2748] CHIP:DMG: } + [1657884334.613926][2748:2748] CHIP:DMG: + [1657884334.613952][2748:2748] CHIP:DMG: ], + [1657884334.613980][2748:2748] CHIP:DMG: + [1657884334.614005][2748:2748] CHIP:DMG: isFabricFiltered = true, + [1657884334.614030][2748:2748] CHIP:DMG: InteractionModelRevision = 1 + [1657884334.614053][2748:2748] CHIP:DMG: }, + [1657884334.614128][2748:2748] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent success response [1655796493.233673][6961:6966] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_000F DataVersion: 2788050502 [1655796493.233761][6961:6966] CHIP:TOO: Options: 1 [1655796493.233865][6961:6966] CHIP:EM: Sending Standalone Ack for MessageCounter:185730221 on exchange 37136i @@ -342,6 +639,8 @@ tests: attribute data which has to be sent in multiple messages." verification: | DUT implementation required to verify write an attribute which is is larger than 1 MTU(1280 bytes) + Here is an example command to verify the write functionality. User must choose an attribute which has large list of attribute data. + ./chip-tool basic write node-label node 1 0 disabled: true - label: @@ -353,7 +652,7 @@ tests: ./chip-tool any write-by-id 0x0204 0 1 1 1 - verify on TH receives the right write Request Message for the data sent in the above command + verify on TH(reference app) receives the right write Request Message for the data sent in the above command [1655796724.510633][7331:7331] CHIP:EM: Handling via exchange: 51058r, Delegate: 0xaaaad9aed418 [1655796724.510711][7331:7331] CHIP:IM: Received Write request @@ -383,7 +682,60 @@ tests: [1655796724.512195][7331:7331] CHIP:DMG: }, [1655796724.512344][7331:7331] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0204 e=1 p=o - ./chip-tool any read-by-id 0x0204 0 1 1 + On DUT as a client side, verify that TH all-clusters-app sent success response + [1657884369.932192][2923:2928] CHIP:DMG: WriteResponseMessage = + [1657884369.932226][2923:2928] CHIP:DMG: { + [1657884369.932255][2923:2928] CHIP:DMG: AttributeStatusIBs = + [1657884369.932297][2923:2928] CHIP:DMG: [ + [1657884369.932329][2923:2928] CHIP:DMG: AttributeStatusIB = + [1657884369.932366][2923:2928] CHIP:DMG: { + [1657884369.932400][2923:2928] CHIP:DMG: AttributePathIB = + [1657884369.932446][2923:2928] CHIP:DMG: { + [1657884369.932490][2923:2928] CHIP:DMG: Endpoint = 0x1, + [1657884369.932534][2923:2928] CHIP:DMG: Cluster = 0x204, + [1657884369.932579][2923:2928] CHIP:DMG: Attribute = 0x0000_0000, + [1657884369.932621][2923:2928] CHIP:DMG: } + [1657884369.932667][2923:2928] CHIP:DMG: + [1657884369.932711][2923:2928] CHIP:DMG: StatusIB = + [1657884369.932753][2923:2928] CHIP:DMG: { + [1657884369.932794][2923:2928] CHIP:DMG: status = 0x00 (SUCCESS), + [1657884369.932835][2923:2928] CHIP:DMG: }, + [1657884369.932876][2923:2928] CHIP:DMG: + [1657884369.932912][2923:2928] CHIP:DMG: }, + [1657884369.932952][2923:2928] CHIP:DMG: + [1657884369.932983][2923:2928] CHIP:DMG: ], + [1657884369.933022][2923:2928] CHIP:DMG: + [1657884369.933054][2923:2928] CHIP:DMG: InteractionModelRevision = 1 + [1657884369.933085][2923:2928] CHIP:DMG: } + [1657884369.933178][2923:2928] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1657884369.933244][2923:2928] CHIP:EM: Sending Standalone Ack for MessageCounter:101663641 on exchange 44315i + + + + + ./chip-tool any read-by-id 0x0204 0 1 1 + verify on TH (reference app) receives the right write Request Message for the data sent in the above command + [1657884399.502355][2748:2748] CHIP:IM: Received Read request + [1657884399.502442][2748:2748] CHIP:DMG: ReadRequestMessage = + [1657884399.502473][2748:2748] CHIP:DMG: { + [1657884399.502497][2748:2748] CHIP:DMG: AttributePathIBs = + [1657884399.502530][2748:2748] CHIP:DMG: [ + [1657884399.502558][2748:2748] CHIP:DMG: AttributePathIB = + [1657884399.502589][2748:2748] CHIP:DMG: { + [1657884399.502621][2748:2748] CHIP:DMG: Endpoint = 0x1, + [1657884399.502658][2748:2748] CHIP:DMG: Cluster = 0x204, + [1657884399.502693][2748:2748] CHIP:DMG: Attribute = 0x0000_0000, + [1657884399.502730][2748:2748] CHIP:DMG: } + [1657884399.502762][2748:2748] CHIP:DMG: + [1657884399.502791][2748:2748] CHIP:DMG: ], + [1657884399.502822][2748:2748] CHIP:DMG: + [1657884399.502852][2748:2748] CHIP:DMG: isFabricFiltered = true, + [1657884399.502881][2748:2748] CHIP:DMG: InteractionModelRevision = 1 + [1657884399.502907][2748:2748] CHIP:DMG: }, + [1657884399.502989][2748:2748] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent success response [1655796786.513406][6976:6981] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_0000 DataVersion: 3165945392 [1655796786.513496][6976:6981] CHIP:TOO: temperature display mode: 1 [1655796786.513593][6976:6981] CHIP:EM: Sending Standalone Ack for MessageCounter:190446058 on exchange 28240i diff --git a/src/app/tests/suites/certification/Test_TC_IDM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_3_2.yaml index 59975fb0312591..4ab23bcd230c99 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_3_2.yaml @@ -26,7 +26,7 @@ tests: a given cluster and endpoint. On receipt of this message, DUT should send a write response action." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. @@ -78,7 +78,7 @@ tests: "[Optional] TH sends the WriteRequestMessage to the DUT to write an attribute of data type bool." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. sudo ./chip-tool basic write local-config-disabled 1 1 0 @@ -122,7 +122,7 @@ tests: "[Optional] TH sends the WriteRequestMessage to the DUT to write an attribute of data type string." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. ./chip-tool basic write node-label new 1 0 @@ -166,7 +166,7 @@ tests: "[Optional] TH sends the WriteRequestMessage to the DUT to write an attribute of data type unsigned integer." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. ./chip-tool any write-by-id 0x0008 0x0010 1 1 1 @@ -245,7 +245,7 @@ tests: "[Optional] TH sends the WriteRequestMessage to the DUT to write an attribute of data type enum." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. sudo ./chip-tool any write-by-id 0x0204 0 1 1 1 @@ -289,7 +289,7 @@ tests: "[Optional] TH sends the WriteRequestMessage to the DUT to write an attribute of data type bitmap." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. sudo ./chip-tool colorcontrol write-by-id 0x000f 1 1 1 @@ -339,7 +339,7 @@ tests: "TH sends the WriteRequestMessage to the DUT to write any attribute on an unsupported Endpoint. DUT responds with the Write Response action" verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. sudo ./chip-tool levelcontrol write on-level 2 1 20 @@ -378,7 +378,7 @@ tests: "TH sends the WriteRequestMessage to the DUT to write any attribute on an unsupported cluster. DUT responds with the Write Response action" verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. sudo ./chip-tool thermostat write unoccupied-heating-setpoint 1200 1 0 @@ -416,7 +416,7 @@ tests: "TH sends the WriteRequestMessage to the DUT to write an unsupported attribute DUT responds with the Write Response action" verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. sudo ./chip-tool thermostat write unoccupied-heating-setpoint 1200 1 1 @@ -454,7 +454,7 @@ tests: "TH sends the WriteRequestMessage to the DUT to write an attribute which is not writable. DUT responds with the Write Response action" verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. ./chip-tool basic write-by-id 0x7 2 1 0 @@ -494,11 +494,12 @@ tests: in the path that requires a privilege that is not granted for the cluster in the path. DUT responds with the Write Response action" verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. - To Setup the TH such that there is no accessing fabric, 1st we need to send below mentioned ACL command + To Setup the TH such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command + Here by sending below mentioned ACL command giving only access for identify cluster(3), So except identify cluster command if try to send any other command will get status as unsupported access. - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [1234], "targets": null}]' 1 0 + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 sudo ./chip-tool thermostatuserinterfaceconfiguration write temperature-display-mode 2 1 1 @@ -529,14 +530,16 @@ tests: [1650552778.853780][17227:17232] CHIP:DMG: InteractionModelRevision = 1 [1650552778.853813][17227:17232] CHIP:DMG: } [1650552778.853890][17227:17232] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) - [1650552778.853935][17227:17232] CHIP:DMG: WriteClient moving to [AwaitingDe]" + [1650552778.853935][17227:17232] CHIP:DMG: WriteClient moving to [AwaitingDe] + + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: "TH sends the WriteRequestMessage to the DUT to write one attribute on a given cluster and endpoint. Repeat the above steps 3 times." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. sudo ./chip-tool levelcontrol write on-level 2 1 1 @@ -642,7 +645,7 @@ tests: WriteRequestMessage to the DUT to modify the value of one attribute with the DataVersion field set to the one received in the prior step." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. ./chip-tool levelcontrol read on-level 1 1 @@ -724,7 +727,7 @@ tests: DUT to modify the value of an attribute with the dataversion field set to the value received earlier." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. diff --git a/src/app/tests/suites/certification/Test_TC_IDM_4_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_4_1.yaml index d45d10e3f8aa4e..025efaa968ad8f 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_4_1.yaml @@ -55,6 +55,52 @@ tests: [1657446108.598241][11525:11525] CHIP:DMG: }, [1657446108.598388][11525:11525] CHIP:DMG: Final negotiated min/max parameters: Min = 10s, Max = 80s [1657446108.598559][11525:11525] CHIP:DMG: IM RH moving to [GeneratingReports] + + + On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + [1657884469.617473][2938:2943] CHIP:DMG: ReportDataMessage = + [1657884469.617508][2938:2943] CHIP:DMG: { + [1657884469.617538][2938:2943] CHIP:DMG: SubscriptionId = 0x2d030a2b, + [1657884469.617572][2938:2943] CHIP:DMG: AttributeReportIBs = + [1657884469.617610][2938:2943] CHIP:DMG: [ + [1657884469.617641][2938:2943] CHIP:DMG: AttributeReportIB = + [1657884469.617680][2938:2943] CHIP:DMG: { + [1657884469.617712][2938:2943] CHIP:DMG: AttributeDataIB = + [1657884469.617749][2938:2943] CHIP:DMG: { + [1657884469.617790][2938:2943] CHIP:DMG: DataVersion = 0x42da0cab, + [1657884469.617830][2938:2943] CHIP:DMG: AttributePathIB = + [1657884469.617875][2938:2943] CHIP:DMG: { + [1657884469.617918][2938:2943] CHIP:DMG: Endpoint = 0x1, + [1657884469.617961][2938:2943] CHIP:DMG: Cluster = 0x6, + [1657884469.618006][2938:2943] CHIP:DMG: Attribute = 0x0000_0000, + [1657884469.618051][2938:2943] CHIP:DMG: } + [1657884469.618094][2938:2943] CHIP:DMG: + [1657884469.618137][2938:2943] CHIP:DMG: Data = false, + [1657884469.618176][2938:2943] CHIP:DMG: }, + [1657884469.618216][2938:2943] CHIP:DMG: + [1657884469.618250][2938:2943] CHIP:DMG: }, + [1657884469.618288][2938:2943] CHIP:DMG: + [1657884469.618317][2938:2943] CHIP:DMG: ], + [1657884469.618354][2938:2943] CHIP:DMG: + [1657884469.618384][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884469.618413][2938:2943] CHIP:DMG: } + [1657884469.618568][2938:2943] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 1121586347 + [1657884469.618632][2938:2943] CHIP:TOO: OnOff: FALSE + [1657884469.618690][2938:2943] CHIP:DMG: MoveToState ReadClient[0xffffa40091f0]: Moving to [AwaitingSu] + [1657884469.618749][2938:2943] CHIP:EM: Piggybacking Ack for MessageCounter:137911467 on exchange: 45823i + [1657884469.618817][2938:2943] CHIP:IN: Prepared secure message 0xffffa4000d48 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 45823i with MessageCounter:83158075. + [1657884469.618860][2938:2943] CHIP:IN: Sending encrypted msg 0xffffa4000d48 with MessageCounter:83158075 to 0x0000000000000001 (1) at monotonic time: 00000000006D764A msec + [1657884469.620359][2938:2943] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:137911468 on exchange 45823i + [1657884469.620401][2938:2943] CHIP:EM: Found matching exchange: 45823i, Delegate: 0xffffa40091f0 + [1657884469.620439][2938:2943] CHIP:EM: Rxd Ack; Removing MessageCounter:83158075 from Retrans Table on exchange 45823i + [1657884469.620469][2938:2943] CHIP:EM: Removed CHIP MessageCounter:83158075 from RetransTable on exchange 45823i + [1657884469.620523][2938:2943] CHIP:DMG: SubscribeResponseMessage = + [1657884469.620557][2938:2943] CHIP:DMG: { + [1657884469.620587][2938:2943] CHIP:DMG: SubscriptionId = 0x2d030a2b, + [1657884469.620619][2938:2943] CHIP:DMG: MaxInterval = 0x50, + [1657884469.620650][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884469.620679][2938:2943] CHIP:DMG: } + [1657884469.620711][2938:2943] CHIP:DMG: Subscription established with SubscriptionID = 0x2d030a2b MinInterval = 10s MaxInterval = 80s Peer = 01:0000000000000001 disabled: true - label: @@ -76,6 +122,51 @@ tests: [1657446108.604614][11525:11525] CHIP:DMG: } [1657446108.604672][11525:11525] CHIP:IM: Received status response, status is 0x00 (SUCCESS) [1657446108.604755][11525:11525] CHIP:DMG: Refresh Subscribe Sync Timer with max 80 seconds + + On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + [1657884569.751004][2938:2943] CHIP:DMG: ReportDataMessage = + [1657884569.751034][2938:2943] CHIP:DMG: { + [1657884569.751059][2938:2943] CHIP:DMG: SubscriptionId = 0x47cd6fdb, + [1657884569.751111][2938:2943] CHIP:DMG: AttributeReportIBs = + [1657884569.751147][2938:2943] CHIP:DMG: [ + [1657884569.751173][2938:2943] CHIP:DMG: AttributeReportIB = + [1657884569.751219][2938:2943] CHIP:DMG: { + [1657884569.751259][2938:2943] CHIP:DMG: AttributeDataIB = + [1657884569.751304][2938:2943] CHIP:DMG: { + [1657884569.751351][2938:2943] CHIP:DMG: DataVersion = 0x42da0cab, + [1657884569.751395][2938:2943] CHIP:DMG: AttributePathIB = + [1657884569.751441][2938:2943] CHIP:DMG: { + [1657884569.751493][2938:2943] CHIP:DMG: Endpoint = 0x1, + [1657884569.751544][2938:2943] CHIP:DMG: Cluster = 0x6, + [1657884569.751596][2938:2943] CHIP:DMG: Attribute = 0x0000_0000, + [1657884569.751645][2938:2943] CHIP:DMG: } + [1657884569.751696][2938:2943] CHIP:DMG: + [1657884569.751749][2938:2943] CHIP:DMG: Data = false, + [1657884569.751796][2938:2943] CHIP:DMG: }, + [1657884569.751843][2938:2943] CHIP:DMG: + [1657884569.751874][2938:2943] CHIP:DMG: }, + [1657884569.751915][2938:2943] CHIP:DMG: + [1657884569.751941][2938:2943] CHIP:DMG: ], + [1657884569.751971][2938:2943] CHIP:DMG: + [1657884569.751996][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884569.752022][2938:2943] CHIP:DMG: } + [1657884569.752174][2938:2943] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 1121586347 + [1657884569.752217][2938:2943] CHIP:TOO: OnOff: FALSE + [1657884569.752255][2938:2943] CHIP:DMG: MoveToState ReadClient[0xffffa40092e0]: Moving to [AwaitingSu] + [1657884569.752319][2938:2943] CHIP:EM: Piggybacking Ack for MessageCounter:137911471 on exchange: 45824i + [1657884569.752393][2938:2943] CHIP:IN: Prepared secure message 0xaaaafe09b548 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 45824i with MessageCounter:83158079. + [1657884569.752435][2938:2943] CHIP:IN: Sending encrypted msg 0xaaaafe09b548 with MessageCounter:83158079 to 0x0000000000000001 (1) at monotonic time: 00000000006EFD70 msec + [1657884569.754254][2938:2943] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:137911472 on exchange 45824i + [1657884569.754333][2938:2943] CHIP:EM: Found matching exchange: 45824i, Delegate: 0xffffa40092e0 + [1657884569.754372][2938:2943] CHIP:EM: Rxd Ack; Removing MessageCounter:83158079 from Retrans Table on exchange 45824i + [1657884569.754397][2938:2943] CHIP:EM: Removed CHIP MessageCounter:83158079 from RetransTable on exchange 45824i + [1657884569.754449][2938:2943] CHIP:DMG: SubscribeResponseMessage = + [1657884569.754478][2938:2943] CHIP:DMG: { + [1657884569.754502][2938:2943] CHIP:DMG: SubscriptionId = 0x47cd6fdb, + [1657884569.754533][2938:2943] CHIP:DMG: MaxInterval = 0x50, + [1657884569.754559][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884569.754581][2938:2943] CHIP:DMG: } + [1657884569.754610][2938:2943] CHIP:DMG: Subscription established with SubscriptionID = 0x47cd6fdb MinInterval = 10s MaxInterval = 80s Peer = 01:0000000000000001 disabled: true - label: @@ -109,6 +200,53 @@ tests: [1657445962.258950][11525:11525] CHIP:DMG: } [1657445962.258975][11525:11525] CHIP:IM: Received status response, status is 0x00 (SUCCESS) [1657445962.259002][11525:11525] CHIP:DMG: OnReportConfirm: NumReports = 0 + + + + On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + [1657884643.152038][2938:2943] CHIP:DMG: ReportDataMessage = + [1657884643.152141][2938:2943] CHIP:DMG: { + [1657884643.152206][2938:2943] CHIP:DMG: SubscriptionId = 0x2e0592e3, + [1657884643.152276][2938:2943] CHIP:DMG: AttributeReportIBs = + [1657884643.152353][2938:2943] CHIP:DMG: [ + [1657884643.152414][2938:2943] CHIP:DMG: AttributeReportIB = + [1657884643.152497][2938:2943] CHIP:DMG: { + [1657884643.152565][2938:2943] CHIP:DMG: AttributeDataIB = + [1657884643.152640][2938:2943] CHIP:DMG: { + [1657884643.152722][2938:2943] CHIP:DMG: DataVersion = 0xe411d149, + [1657884643.152809][2938:2943] CHIP:DMG: AttributePathIB = + [1657884643.152898][2938:2943] CHIP:DMG: { + [1657884643.152989][2938:2943] CHIP:DMG: Endpoint = 0x0, + [1657884643.153069][2938:2943] CHIP:DMG: Cluster = 0x28, + [1657884643.153134][2938:2943] CHIP:DMG: Attribute = 0x0000_0010, + [1657884643.153282][2938:2943] CHIP:DMG: } + [1657884643.153349][2938:2943] CHIP:DMG: + [1657884643.153412][2938:2943] CHIP:DMG: Data = true, + [1657884643.153471][2938:2943] CHIP:DMG: }, + [1657884643.153529][2938:2943] CHIP:DMG: + [1657884643.153576][2938:2943] CHIP:DMG: }, + [1657884643.153631][2938:2943] CHIP:DMG: + [1657884643.153675][2938:2943] CHIP:DMG: ], + [1657884643.153731][2938:2943] CHIP:DMG: + [1657884643.153776][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884643.153821][2938:2943] CHIP:DMG: } + [1657884643.153988][2938:2943] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3826372937 + [1657884643.154049][2938:2943] CHIP:TOO: LocalConfigDisabled: TRUE + [1657884643.154117][2938:2943] CHIP:DMG: MoveToState ReadClient[0xffffa40064f0]: Moving to [AwaitingSu] + [1657884643.154200][2938:2943] CHIP:EM: Piggybacking Ack for MessageCounter:137911473 on exchange: 45825i + [1657884643.154295][2938:2943] CHIP:IN: Prepared secure message 0xffffa4000d48 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 45825i with MessageCounter:83158082. + [1657884643.154361][2938:2943] CHIP:IN: Sending encrypted msg 0xffffa4000d48 with MessageCounter:83158082 to 0x0000000000000001 (1) at monotonic time: 0000000000701C2A msec + [1657884643.155638][2938:2943] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:137911474 on exchange 45825i + [1657884643.155696][2938:2943] CHIP:EM: Found matching exchange: 45825i, Delegate: 0xffffa40064f0 + [1657884643.155750][2938:2943] CHIP:EM: Rxd Ack; Removing MessageCounter:83158082 from Retrans Table on exchange 45825i + [1657884643.155794][2938:2943] CHIP:EM: Removed CHIP MessageCounter:83158082 from RetransTable on exchange 45825i + [1657884643.155865][2938:2943] CHIP:DMG: SubscribeResponseMessage = + [1657884643.155913][2938:2943] CHIP:DMG: { + [1657884643.155957][2938:2943] CHIP:DMG: SubscriptionId = 0x2e0592e3, + [1657884643.156005][2938:2943] CHIP:DMG: MaxInterval = 0x64, + [1657884643.156051][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884643.156093][2938:2943] CHIP:DMG: } + [1657884643.156176][2938:2943] CHIP:DMG: Subscription established with SubscriptionID = 0x2e0592e3 MinInterval = 10s MaxInterval = 100s Peer = 01:0000000000000001 disabled: true - label: @@ -138,6 +276,8 @@ tests: basic write node-label label 1 0 + + On TH (On the reference app) Verify if DUT is responding with the below status response for the above command [1657446721.226280][11525:11525] CHIP:DMG: StatusResponseMessage = [1657446721.226345][11525:11525] CHIP:DMG: { [1657446721.226431][11525:11525] CHIP:DMG: Status = 0x00 (SUCCESS), @@ -146,6 +286,37 @@ tests: [1657446721.226628][11525:11525] CHIP:IM: Received status response, status is 0x00 (SUCCESS) [1657446721.226711][11525:11525] CHIP:DMG: OnReportConfirm: NumReports = 0 [1657446721.226773][11525:11525] CHIP:DMG: IM RH moving to [GeneratingReports] + + On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + [1657884902.175205][2938:2943] CHIP:DMG: ReportDataMessage = + [1657884902.175255][2938:2943] CHIP:DMG: { + [1657884902.175299][2938:2943] CHIP:DMG: SubscriptionId = 0x6a6457a1, + [1657884902.175343][2938:2943] CHIP:DMG: AttributeReportIBs = + [1657884902.175399][2938:2943] CHIP:DMG: [ + [1657884902.175444][2938:2943] CHIP:DMG: AttributeReportIB = + [1657884902.175509][2938:2943] CHIP:DMG: { + [1657884902.175560][2938:2943] CHIP:DMG: AttributeDataIB = + [1657884902.175615][2938:2943] CHIP:DMG: { + [1657884902.175674][2938:2943] CHIP:DMG: DataVersion = 0xe411d14c, + [1657884902.175733][2938:2943] CHIP:DMG: AttributePathIB = + [1657884902.175798][2938:2943] CHIP:DMG: { + [1657884902.175866][2938:2943] CHIP:DMG: Endpoint = 0x0, + [1657884902.175936][2938:2943] CHIP:DMG: Cluster = 0x28, + [1657884902.176007][2938:2943] CHIP:DMG: Attribute = 0x0000_0005, + [1657884902.176067][2938:2943] CHIP:DMG: } + [1657884902.176147][2938:2943] CHIP:DMG: + [1657884902.176215][2938:2943] CHIP:DMG: Data = "label", + [1657884902.176265][2938:2943] CHIP:DMG: }, + [1657884902.176322][2938:2943] CHIP:DMG: + [1657884902.176369][2938:2943] CHIP:DMG: }, + [1657884902.176424][2938:2943] CHIP:DMG: + [1657884902.176467][2938:2943] CHIP:DMG: ], + [1657884902.176522][2938:2943] CHIP:DMG: + [1657884902.176568][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884902.176610][2938:2943] CHIP:DMG: } + [1657884902.176771][2938:2943] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3826372940 + [1657884902.176833][2938:2943] CHIP:TOO: NodeLabel: label + [1657884902.176910][2938:2943] CHIP:DMG: Refresh LivenessCheckTime for 225000 milliseconds with SubscriptionId = 0x6a6457a1 Peer = 01:0000000000000001 disabled: true - label: @@ -156,10 +327,9 @@ tests: verification: | In the case of chip tool as a client, here is an example command the client can subscribe to the TH - Verify DUT is responsds with status response for the data sent in the all below commands - On TH (On the reference app) any subscribe-by-id 0x0008 0x0010 10 100 1 1 + On TH (On the reference app) Verify if DUT is responding with the below status response for the above command [1657448410.108491][11525:11525] CHIP:EM: Removed CHIP MessageCounter:11055857 from RetransTable on exchange 33616r [1657448410.108543][11525:11525] CHIP:DMG: StatusResponseMessage = [1657448410.108571][11525:11525] CHIP:DMG: { @@ -168,12 +338,59 @@ tests: [1657448410.108650][11525:11525] CHIP:DMG: } [1657448410.108674][11525:11525] CHIP:IM: Received status response, status is 0x00 (SUCCESS) - + On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + [1657884929.244585][2938:2943] CHIP:DMG: ReportDataMessage = + [1657884929.244654][2938:2943] CHIP:DMG: { + [1657884929.244716][2938:2943] CHIP:DMG: SubscriptionId = 0x6cee9660, + [1657884929.244791][2938:2943] CHIP:DMG: AttributeReportIBs = + [1657884929.244873][2938:2943] CHIP:DMG: [ + [1657884929.244935][2938:2943] CHIP:DMG: AttributeReportIB = + [1657884929.245032][2938:2943] CHIP:DMG: { + [1657884929.245098][2938:2943] CHIP:DMG: AttributeDataIB = + [1657884929.245170][2938:2943] CHIP:DMG: { + [1657884929.245245][2938:2943] CHIP:DMG: DataVersion = 0xccfe0684, + [1657884929.245319][2938:2943] CHIP:DMG: AttributePathIB = + [1657884929.245395][2938:2943] CHIP:DMG: { + [1657884929.245474][2938:2943] CHIP:DMG: Endpoint = 0x1, + [1657884929.245556][2938:2943] CHIP:DMG: Cluster = 0x8, + [1657884929.245638][2938:2943] CHIP:DMG: Attribute = 0x0000_0010, + [1657884929.245696][2938:2943] CHIP:DMG: } + [1657884929.245773][2938:2943] CHIP:DMG: + [1657884929.245841][2938:2943] CHIP:DMG: Data = 1, + [1657884929.245897][2938:2943] CHIP:DMG: }, + [1657884929.245955][2938:2943] CHIP:DMG: + [1657884929.246003][2938:2943] CHIP:DMG: }, + [1657884929.246059][2938:2943] CHIP:DMG: + [1657884929.246104][2938:2943] CHIP:DMG: ], + [1657884929.246160][2938:2943] CHIP:DMG: + [1657884929.246207][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884929.246252][2938:2943] CHIP:DMG: } + [1657884929.246416][2938:2943] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0010 DataVersion: 3439199876 + [1657884929.246496][2938:2943] CHIP:TOO: on off transition time: 0 + [1657884929.246565][2938:2943] CHIP:DMG: MoveToState ReadClient[0xffffa40064f0]: Moving to [AwaitingSu] + [1657884929.246666][2938:2943] CHIP:EM: Piggybacking Ack for MessageCounter:137911484 on exchange: 45830i + [1657884929.246777][2938:2943] CHIP:IN: Prepared secure message 0xffffa4000db8 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 45830i with MessageCounter:83158096. + [1657884929.246851][2938:2943] CHIP:IN: Sending encrypted msg 0xffffa4000db8 with MessageCounter:83158096 to 0x0000000000000001 (1) at monotonic time: 00000000007479B6 msec + [1657884929.248540][2938:2943] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:137911485 on exchange 45830i + [1657884929.248614][2938:2943] CHIP:EM: Found matching exchange: 45830i, Delegate: 0xffffa40064f0 + [1657884929.248678][2938:2943] CHIP:EM: Rxd Ack; Removing MessageCounter:83158096 from Retrans Table on exchange 45830i + [1657884929.248724][2938:2943] CHIP:EM: Removed CHIP MessageCounter:83158096 from RetransTable on exchange 45830i + [1657884929.248809][2938:2943] CHIP:DMG: SubscribeResponseMessage = + [1657884929.248858][2938:2943] CHIP:DMG: { + [1657884929.248904][2938:2943] CHIP:DMG: SubscriptionId = 0x6cee9660, + [1657884929.248953][2938:2943] CHIP:DMG: MaxInterval = 0x64, + [1657884929.249003][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884929.249047][2938:2943] CHIP:DMG: } + [1657884929.249098][2938:2943] CHIP:DMG: Subscription established with SubscriptionID = 0x6cee9660 MinInterval = 10s MaxInterval = 100s Peer = 01:0000000000000001 In the case of chip tool as a client, here is an example command the client can write an attribute in the basic cluster in the TH to change the value that the client subscribed in the above command. + + In the case of chip tool as a client, here is an example command the client can write an attribute in the basic cluster in the TH to change the value that the client subscribed in the above command. + any write-by-id 0x0008 0x0010 1 1 1 + [1657448453.234310][11525:11525] CHIP:EM: Removed CHIP MessageCounter:11055860 from RetransTable on exchange 8514i [1657448453.234372][11525:11525] CHIP:DMG: StatusResponseMessage = [1657448453.234409][11525:11525] CHIP:DMG: { @@ -184,6 +401,36 @@ tests: [1657448453.234577][11525:11525] CHIP:DMG: OnReportConfirm: NumReports = 0 + On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + [1657884955.073466][2938:2943] CHIP:DMG: ReportDataMessage = + [1657884955.073516][2938:2943] CHIP:DMG: { + [1657884955.073562][2938:2943] CHIP:DMG: SubscriptionId = 0x6cee9660, + [1657884955.073608][2938:2943] CHIP:DMG: AttributeReportIBs = + [1657884955.073666][2938:2943] CHIP:DMG: [ + [1657884955.073711][2938:2943] CHIP:DMG: AttributeReportIB = + [1657884955.073770][2938:2943] CHIP:DMG: { + [1657884955.073818][2938:2943] CHIP:DMG: AttributeDataIB = + [1657884955.073882][2938:2943] CHIP:DMG: { + [1657884955.073943][2938:2943] CHIP:DMG: DataVersion = 0xccfe0685, + [1657884955.074003][2938:2943] CHIP:DMG: AttributePathIB = + [1657884955.074064][2938:2943] CHIP:DMG: { + [1657884955.074128][2938:2943] CHIP:DMG: Endpoint = 0x1, + [1657884955.074199][2938:2943] CHIP:DMG: Cluster = 0x8, + [1657884955.074263][2938:2943] CHIP:DMG: Attribute = 0x0000_0010, + [1657884955.074329][2938:2943] CHIP:DMG: } + [1657884955.074393][2938:2943] CHIP:DMG: + [1657884955.074455][2938:2943] CHIP:DMG: Data = 1, + [1657884955.074512][2938:2943] CHIP:DMG: }, + [1657884955.074574][2938:2943] CHIP:DMG: + [1657884955.074625][2938:2943] CHIP:DMG: }, + [1657884955.074684][2938:2943] CHIP:DMG: + [1657884955.074732][2938:2943] CHIP:DMG: ], + [1657884955.074788][2938:2943] CHIP:DMG: + [1657884955.074833][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884955.074877][2938:2943] CHIP:DMG: } + [1657884955.075032][2938:2943] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0010 DataVersion: 3439199877 + [1657884955.075095][2938:2943] CHIP:TOO: on off transition time: 1 + [1657884955.075170][2938:2943] CHIP:DMG: Refresh LivenessCheckTime for 125000 milliseconds with SubscriptionId = 0x6cee9660 Peer = 01:0000000000000001 Verify the above command multiple times by changing attribute value(3 times) @@ -264,30 +511,7 @@ tests: [1657449168.666488][11525:11525] CHIP:DMG: InteractionModelRevision = 1 [1657449168.666545][11525:11525] CHIP:DMG: }, [1657449168.666762][11525:11525] CHIP:DMG: Final negotiated min/max parameters: Min = 10s, Max = 100s - [1657449168.666949][11525:11525] CHIP:DMG: IM RH moving to [GeneratingReports] - [1657449168.667136][11525:11525] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1657449168.667204][11525:11525] CHIP:DMG: Cluster 3, Attribute 0 is dirty - [1657449168.667256][11525:11525] CHIP:DMG: Reading attribute: Cluster=0x0000_0003 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) - [1657449168.667317][11525:11525] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0003 e=1 p=v - [1657449168.667388][11525:11525] CHIP:DMG: AccessControl: allowed - [1657449168.667523][11525:11525] CHIP:DMG: Cluster 8, Attribute 1 is dirty - [1657449168.667580][11525:11525] CHIP:DMG: Reading attribute: Cluster=0x0000_0008 Endpoint=1 AttributeId=0x0000_0001 (expanded=0) - [1657449168.667636][11525:11525] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0008 e=1 p=v - [1657449168.667696][11525:11525] CHIP:DMG: AccessControl: allowed - [1657449168.667768][11525:11525] CHIP:DMG: Cluster 6, Attribute 0 is dirty - [1657449168.667824][11525:11525] CHIP:DMG: Reading attribute: Cluster=0x0000_0006 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) - [1657449168.667882][11525:11525] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0006 e=1 p=v - [1657449168.667941][11525:11525] CHIP:DMG: AccessControl: allowed - [1657449168.668024][11525:11525] CHIP:DMG: Sending report (payload has 91 bytes)... - [1657449168.668092][11525:11525] CHIP:DMG: IM RH moving to [AwaitingReportResponse] - [1657449168.668168][11525:11525] CHIP:EM: Piggybacking Ack for MessageCounter:190733016 on exchange: 33620r - [1657449168.668301][11525:11525] CHIP:IN: Prepared secure message 0xaaab1651a358 to 0x000000000001B669 (1) of type 0x5 and protocolId (0, 1) on exchange 33620r with MessageCounter:11055871. - [1657449168.668386][11525:11525] CHIP:IN: Sending encrypted msg 0xaaab1651a358 with MessageCounter:11055871 to 0x000000000001B669 (1) at monotonic time: 000000000096B758 msec - [1657449168.668756][11525:11525] CHIP:DMG: ReportsInFlight = 1 with readHandler 1, RE has no more messages - [1657449168.668827][11525:11525] CHIP:DMG: All ReadHandler-s are clean, clear GlobalDirtySet - [1657449168.674031][11525:11525] CHIP:EM: Received message of type 0x1 with protocolId (0, 1) and MessageCounter:190733017 on exchange 33620r - [1657449168.674074][11525:11525] CHIP:EM: Found matching exchange: 33620r, Delegate: 0xaaab16517540 - [1657449168.674114][11525:11525] CHIP:EM: Rxd Ack; Removing MessageCounter:11055871 from Retrans Table on exchange 33620r + [1657449168.674140][11525:11525] CHIP:EM: Removed CHIP MessageCounter:11055871 from RetransTable on exchange 33620r [1657449168.674191][11525:11525] CHIP:DMG: StatusResponseMessage = [1657449168.674220][11525:11525] CHIP:DMG: { @@ -296,6 +520,36 @@ tests: [1657449168.674297][11525:11525] CHIP:DMG: } [1657449168.674324][11525:11525] CHIP:IM: Received status response, status is 0x00 (SUCCESS) [1657449168.674365][11525:11525] CHIP:DMG: Refresh Subscribe Sync Timer with max 100 seconds + + + On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + 884990.165955][2938:2943] CHIP:DMG: }, + [1657884990.166021][2938:2943] CHIP:DMG: + [1657884990.166072][2938:2943] CHIP:DMG: ], + [1657884990.166149][2938:2943] CHIP:DMG: + [1657884990.166201][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884990.166255][2938:2943] CHIP:DMG: } + [1657884990.166480][2938:2943] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 2311319147 + [1657884990.166551][2938:2943] CHIP:TOO: identify time: 0 + [1657884990.166667][2938:2943] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0001 DataVersion: 3439199877 + [1657884990.166727][2938:2943] CHIP:TOO: remaining time: 0 + [1657884990.166850][2938:2943] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 1121586347 + [1657884990.166907][2938:2943] CHIP:TOO: OnOff: FALSE + [1657884990.166994][2938:2943] CHIP:DMG: MoveToState ReadClient[0xffffa40091f0]: Moving to [AwaitingSu] + [1657884990.167092][2938:2943] CHIP:EM: Piggybacking Ack for MessageCounter:137911489 on exchange: 45832i + [1657884990.167206][2938:2943] CHIP:IN: Prepared secure message 0xffffa4000db8 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 45832i with MessageCounter:83158102. + [1657884990.167277][2938:2943] CHIP:IN: Sending encrypted msg 0xffffa4000db8 with MessageCounter:83158102 to 0x0000000000000001 (1) at monotonic time: 00000000007567AF msec + [1657884990.169637][2938:2943] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:137911490 on exchange 45832i + [1657884990.169705][2938:2943] CHIP:EM: Found matching exchange: 45832i, Delegate: 0xffffa40091f0 + [1657884990.169769][2938:2943] CHIP:EM: Rxd Ack; Removing MessageCounter:83158102 from Retrans Table on exchange 45832i + [1657884990.169821][2938:2943] CHIP:EM: Removed CHIP MessageCounter:83158102 from RetransTable on exchange 45832i + [1657884990.169905][2938:2943] CHIP:DMG: SubscribeResponseMessage = + [1657884990.169960][2938:2943] CHIP:DMG: { + [1657884990.170011][2938:2943] CHIP:DMG: SubscriptionId = 0x496bb4cf, + [1657884990.170067][2938:2943] CHIP:DMG: MaxInterval = 0x64, + [1657884990.170120][2938:2943] CHIP:DMG: InteractionModelRevision = 1 + [1657884990.170169][2938:2943] CHIP:DMG: } + [1657884990.170223][2938:2943] CHIP:DMG: Subscription established with SubscriptionID = 0x496bb4cf MinInterval = 10s MaxInterval = 100s Peer = 01:0000000000000001 disabled: true - label: @@ -316,62 +570,126 @@ tests: verification: | In the case of chip tool as a client, here is an example command the client can subscribe to the TH - onoff subscribe on-off 10 100 1 - [1657461297.413790][12604:12609] CHIP:DMG: ReportDataMessage = - [1657461297.413859][12604:12609] CHIP:DMG: { - [1657461297.413895][12604:12609] CHIP:DMG: SubscriptionId = 0x4a7b129e, - [1657461297.413933][12604:12609] CHIP:DMG: AttributeReportIBs = - [1657461297.413975][12604:12609] CHIP:DMG: [ - [1657461297.414009][12604:12609] CHIP:DMG: AttributeReportIB = - [1657461297.414053][12604:12609] CHIP:DMG: { - [1657461297.414088][12604:12609] CHIP:DMG: AttributeDataIB = - [1657461297.414130][12604:12609] CHIP:DMG: { - [1657461297.414174][12604:12609] CHIP:DMG: DataVersion = 0x1979c48, - [1657461297.414218][12604:12609] CHIP:DMG: AttributePathIB = - [1657461297.414263][12604:12609] CHIP:DMG: { - [1657461297.414309][12604:12609] CHIP:DMG: Endpoint = 0x1, - [1657461297.414358][12604:12609] CHIP:DMG: Cluster = 0x6, - [1657461297.414406][12604:12609] CHIP:DMG: Attribute = 0x0000_0000, - [1657461297.414455][12604:12609] CHIP:DMG: } - [1657461297.414503][12604:12609] CHIP:DMG: - [1657461297.414670][12604:12609] CHIP:DMG: Data = false, - [1657461297.414718][12604:12609] CHIP:DMG: }, - [1657461297.414765][12604:12609] CHIP:DMG: - [1657461297.414837][12604:12609] CHIP:DMG: }, - [1657461297.414884][12604:12609] CHIP:DMG: - [1657461297.414917][12604:12609] CHIP:DMG: ], - [1657461297.414958][12604:12609] CHIP:DMG: - [1657461297.414992][12604:12609] CHIP:DMG: InteractionModelRevision = 1 - [1657461297.415025][12604:12609] CHIP:DMG: } - [1657461297.415190][12604:12609] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 26713160 - [1657461297.415237][12604:12609] CHIP:TOO: OnOff: FALSE - [1657461297.415289][12604:12609] CHIP:DMG: MoveToState ReadClient[0xffff80008e40]: Moving to [AwaitingSu] - - - - onoff subscribe on-off 100 1000 1 1 --data-version 0x32c52d73 - - On Reference app verify Attribute data is not sent for the second subscription, when Start another subscription with the DataVersionFilter field set to the data version received above - - [1655890477.269305][1518:1523] CHIP:EM: Removed CHIP MessageCounter:196305006 from RetransTable on exchange 43437i - [1655890477.269385][1518:1523] CHIP:DMG: ReportDataMessage = - [1655890477.269425][1518:1523] CHIP:DMG: { - [1655890477.269473][1518:1523] CHIP:DMG: SubscriptionId = 0x72322357, - [1655890477.269523][1518:1523] CHIP:DMG: InteractionModelRevision = 1 - [1655890477.269577][1518:1523] CHIP:DMG: } - [1655890477.269643][1518:1523] CHIP:DMG: MoveToState ReadClient[0xffff98002df0]: Moving to [AwaitingSu] - [1655890477.269707][1518:1523] CHIP:EM: Piggybacking Ack for MessageCounter:19565255 on exchange: 43437i - [1655890477.269794][1518:1523] CHIP:IN: Prepared secure message 0xaaaaca508b78 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 43437i with MessageCounter:196305007. - [1655890477.269858][1518:1523] CHIP:IN: Sending encrypted msg 0xaaaaca508b78 with MessageCounter:196305007 to 0x0000000000000001 (1) at monotonic time: 00000000000F351F msec - [1655890477.271312][1518:1523] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:19565256 on exchange 43437i - [1655890477.271359][1518:1523] CHIP:EM: Found matching exchange: 43437i, Delegate: 0xffff98002df0 - [1655890477.271405][1518:1523] CHIP:EM: Rxd Ack; Removing MessageCounter:196305007 from Retrans Table on exchange 43437i - [1655890477.271440][1518:1523] CHIP:EM: Removed CHIP MessageCounter:196305007 from RetransTable on exchange 43437i - [1655890477.271497][1518:1523] CHIP:DMG: SubscribeResponseMessage = - [1655890477.271549][1518:1523] CHIP:DMG: { - [1655890477.271586][1518:1523] CHIP:DMG: SubscriptionId = 0x72322357, - [1655890477.271644][1518:1523] CHIP:DMG: MaxInterval = 0x3e8, - [1655890477.271681][1518:1523] CHIP:DMG: InteractionModelRevision = 1 - [1655890477.271732][1518:1523] CHIP:DMG: } - [1655890477.271771][1518:1523] CHIP:DMG: Subscription established with SubscriptionID = 0x72322357 MinInterval = 0s MaxInterval = 1000s Peer = 01:0000000000000001 + onoff subscribe on-off 10 80 1 1 + + On TH(Reference app) verify the report data action with the data of the attribute along with the data version + [1657885412.662766][2748:2748] CHIP:DMG: SubscribeRequestMessage = + [1657885412.662793][2748:2748] CHIP:DMG: { + [1657885412.662816][2748:2748] CHIP:DMG: KeepSubscriptions = false, + [1657885412.662842][2748:2748] CHIP:DMG: MinIntervalFloorSeconds = 0xa, + [1657885412.662868][2748:2748] CHIP:DMG: MaxIntervalCeilingSeconds = 0x50, + [1657885412.662892][2748:2748] CHIP:DMG: AttributePathIBs = + [1657885412.662917][2748:2748] CHIP:DMG: [ + [1657885412.662941][2748:2748] CHIP:DMG: AttributePathIB = + [1657885412.662967][2748:2748] CHIP:DMG: { + [1657885412.662995][2748:2748] CHIP:DMG: Endpoint = 0x1, + [1657885412.663030][2748:2748] CHIP:DMG: Cluster = 0x6, + [1657885412.663061][2748:2748] CHIP:DMG: Attribute = 0x0000_0000, + [1657885412.663089][2748:2748] CHIP:DMG: } + [1657885412.663119][2748:2748] CHIP:DMG: + [1657885412.663145][2748:2748] CHIP:DMG: ], + [1657885412.663172][2748:2748] CHIP:DMG: + [1657885412.663199][2748:2748] CHIP:DMG: isFabricFiltered = true, + [1657885412.663223][2748:2748] CHIP:DMG: InteractionModelRevision = 1 + [1657885412.663245][2748:2748] CHIP:DMG: }, + [1657885412.663314][2748:2748] CHIP:DMG: Final negotiated min/max parameters: Min = 10s, Max = 80s + + + On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + [1657885412.620231][2979:2984] CHIP:DMG: ReportDataMessage = + [1657885412.620274][2979:2984] CHIP:DMG: { + [1657885412.620300][2979:2984] CHIP:DMG: SubscriptionId = 0x5ccc5161, + [1657885412.620326][2979:2984] CHIP:DMG: AttributeReportIBs = + [1657885412.620368][2979:2984] CHIP:DMG: [ + [1657885412.620393][2979:2984] CHIP:DMG: AttributeReportIB = + [1657885412.620442][2979:2984] CHIP:DMG: { + [1657885412.620480][2979:2984] CHIP:DMG: AttributeDataIB = + [1657885412.620510][2979:2984] CHIP:DMG: { + [1657885412.620551][2979:2984] CHIP:DMG: DataVersion = 0x42da0cab, + [1657885412.620581][2979:2984] CHIP:DMG: AttributePathIB = + [1657885412.620622][2979:2984] CHIP:DMG: { + [1657885412.620655][2979:2984] CHIP:DMG: Endpoint = 0x1, + [1657885412.620699][2979:2984] CHIP:DMG: Cluster = 0x6, + [1657885412.620742][2979:2984] CHIP:DMG: Attribute = 0x0000_0000, + [1657885412.620773][2979:2984] CHIP:DMG: } + [1657885412.620816][2979:2984] CHIP:DMG: + [1657885412.620859][2979:2984] CHIP:DMG: Data = false, + [1657885412.620889][2979:2984] CHIP:DMG: }, + [1657885412.620929][2979:2984] CHIP:DMG: + [1657885412.620955][2979:2984] CHIP:DMG: }, + [1657885412.620996][2979:2984] CHIP:DMG: + [1657885412.621021][2979:2984] CHIP:DMG: ], + [1657885412.621063][2979:2984] CHIP:DMG: + [1657885412.621087][2979:2984] CHIP:DMG: InteractionModelRevision = 1 + [1657885412.621120][2979:2984] CHIP:DMG: } + [1657885412.621284][2979:2984] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 1121586347 + [1657885412.621346][2979:2984] CHIP:TOO: OnOff: FALSE + [1657885412.621399][2979:2984] CHIP:DMG: MoveToState ReadClient[0xffffa40091f0]: Moving to [AwaitingSu] + + + On TH(Reference app) verify Attribute data is not sent for the second subscription, when Start another subscription with the DataVersionFilter field set to the data version received above + + onoff subscribe on-off 10 50 1 1 --data-version 0x42da0cab + + + On TH (On the reference app) Verify if DUT is responding with the below status response for the above command + [1657885449.497461][2748:2748] CHIP:DMG: SubscribeRequestMessage = + [1657885449.497490][2748:2748] CHIP:DMG: { + [1657885449.497514][2748:2748] CHIP:DMG: KeepSubscriptions = false, + [1657885449.497540][2748:2748] CHIP:DMG: MinIntervalFloorSeconds = 0xa, + [1657885449.497567][2748:2748] CHIP:DMG: MaxIntervalCeilingSeconds = 0x32, + [1657885449.497592][2748:2748] CHIP:DMG: AttributePathIBs = + [1657885449.497617][2748:2748] CHIP:DMG: [ + [1657885449.497641][2748:2748] CHIP:DMG: AttributePathIB = + [1657885449.497668][2748:2748] CHIP:DMG: { + [1657885449.497696][2748:2748] CHIP:DMG: Endpoint = 0x1, + [1657885449.497742][2748:2748] CHIP:DMG: Cluster = 0x6, + [1657885449.497772][2748:2748] CHIP:DMG: Attribute = 0x0000_0000, + [1657885449.497799][2748:2748] CHIP:DMG: } + [1657885449.497827][2748:2748] CHIP:DMG: + [1657885449.497853][2748:2748] CHIP:DMG: ], + [1657885449.497880][2748:2748] CHIP:DMG: + [1657885449.497906][2748:2748] CHIP:DMG: isFabricFiltered = true, + [1657885449.497930][2748:2748] CHIP:DMG: DataVersionFilterIBs = + [1657885449.497960][2748:2748] CHIP:DMG: [ + [1657885449.497984][2748:2748] CHIP:DMG: DataVersionFilterIB = + [1657885449.498011][2748:2748] CHIP:DMG: { + [1657885449.498036][2748:2748] CHIP:DMG: ClusterPathIB = + [1657885449.498064][2748:2748] CHIP:DMG: { + [1657885449.498093][2748:2748] CHIP:DMG: Endpoint = 0x1, + [1657885449.498122][2748:2748] CHIP:DMG: Cluster = 0x6, + [1657885449.498150][2748:2748] CHIP:DMG: } + [1657885449.498180][2748:2748] CHIP:DMG: + [1657885449.498209][2748:2748] CHIP:DMG: DataVersion = 0x42da0cab, + [1657885449.498236][2748:2748] CHIP:DMG: }, + [1657885449.498263][2748:2748] CHIP:DMG: + [1657885449.498287][2748:2748] CHIP:DMG: ], + [1657885449.498315][2748:2748] CHIP:DMG: + [1657885449.498339][2748:2748] CHIP:DMG: InteractionModelRevision = 1 + [1657885449.498362][2748:2748] CHIP:DMG: }, + [1657885449.498459][2748:2748] CHIP:DMG: Final negotiated min/max parameters: Min = 10s, Max = 50s + + + On DUT as a client side, verify that TH all-clusters-app sent Subscription report with unic subscriptionID + [1657885449.455150][2979:2984] CHIP:EM: Removed CHIP MessageCounter:157900434 from RetransTable on exchange 50588i + [1657885449.455222][2979:2984] CHIP:DMG: ReportDataMessage = + [1657885449.455284][2979:2984] CHIP:DMG: { + [1657885449.455321][2979:2984] CHIP:DMG: SubscriptionId = 0xd9b77c33, + [1657885449.455375][2979:2984] CHIP:DMG: InteractionModelRevision = 1 + [1657885449.455410][2979:2984] CHIP:DMG: } + [1657885449.455480][2979:2984] CHIP:DMG: MoveToState ReadClient[0xffffa40092e0]: Moving to [AwaitingSu] + [1657885449.455561][2979:2984] CHIP:EM: Piggybacking Ack for MessageCounter:260146719 on exchange: 50588i + [1657885449.455651][2979:2984] CHIP:IN: Prepared secure message 0xffffa4000d48 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 50588i with MessageCounter:157900435. + [1657885449.455704][2979:2984] CHIP:IN: Sending encrypted msg 0xffffa4000d48 with MessageCounter:157900435 to 0x0000000000000001 (1) at monotonic time: 00000000007C69C7 msec + [1657885449.456845][2979:2984] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:260146720 on exchange 50588i + [1657885449.456892][2979:2984] CHIP:EM: Found matching exchange: 50588i, Delegate: 0xffffa40092e0 + [1657885449.456937][2979:2984] CHIP:EM: Rxd Ack; Removing MessageCounter:157900435 from Retrans Table on exchange 50588i + [1657885449.456973][2979:2984] CHIP:EM: Removed CHIP MessageCounter:157900435 from RetransTable on exchange 50588i + [1657885449.457029][2979:2984] CHIP:DMG: SubscribeResponseMessage = + [1657885449.457068][2979:2984] CHIP:DMG: { + [1657885449.457106][2979:2984] CHIP:DMG: SubscriptionId = 0xd9b77c33, + [1657885449.457148][2979:2984] CHIP:DMG: MaxInterval = 0x32, + [1657885449.457186][2979:2984] CHIP:DMG: InteractionModelRevision = 1 + [1657885449.457221][2979:2984] CHIP:DMG: } + [1657885449.457260][2979:2984] CHIP:DMG: Subscription established with SubscriptionID = 0xd9b77c33 MinInterval = 10s MaxInterval = 50s Peer = 01:0000000000000001 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_4_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_4_2.yaml index 5b5f2aedd4d0d5..c7cfe9dfee7b1c 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_4_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_4_2.yaml @@ -146,11 +146,12 @@ tests: verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + To Setup the TH such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command + Here by sending below mentioned ACL command giving only access for identify cluster(3), So except identify cluster command if try to send any other command will get status as unsupported access. + + accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 - To Setup the TH2 such that there is no accessing fabric, 1st we need to send below mentioned ACL command - accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": [{"cluster": null, "endpoint": 0, "deviceType": null}]}, {"fabricIndex": 1, "privilege": 1, "authMode": 3, "subjects": null, "targets": [{"cluster": 0006 , "endpoint": 1 , "deviceType": null}]}]' 1 0 - The cluster used in the below command is an example, User can use any supported chip cluster. any subscribe-by-id 0006 0 10 100 2 1 verify DUT is responsds with UNSUPPORTED_ACCESS for the data sent in the above command @@ -185,6 +186,10 @@ tests: [1657450420.474128][8713:8718] CHIP:DMG: } [1657450420.474229][8713:8718] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) [1657450420.474271][8713:8718] CHIP:DMG: MoveToState ReadClient[0xffffa4008e40]: Moving to [AwaitingSu] + + + + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: @@ -193,13 +198,16 @@ tests: on a specific Endpoint for which it does not have access. AttributePath = [[ Endpoint = EndpointID ]]." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. - accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": [{"cluster": null, "endpoint": 0, "deviceType": null}]}, {"fabricIndex": 1, "privilege": 1, "authMode": 3, "subjects": null, "targets": [{"cluster": null , "endpoint": 1 , "deviceType": null}]}]' 1 0 + To Setup the TH such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command + Here by sending below mentioned ACL command giving only access for identify cluster(3), So except identify cluster command if try to send any other command will get status as unsupported access. - sudo ./chip-tool thermostatuserinterfaceconfiguration subscribe temperature-display-mode 100 1000 1 1 + accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 - verify DUT is responsds with UNSUPPORTED_ACCESS for the data sent in the above command + thermostatuserinterfaceconfiguration subscribe temperature-display-mode 100 1000 1 1 + + on TH verify DUT is responsds with UNSUPPORTED_ACCESS for the data sent in the above command [1654862486.785468][32309:32314] CHIP:DMG: ReportDataMessage = [1654862486.785508][32309:32314] CHIP:DMG: { @@ -232,6 +240,9 @@ tests: [1654862486.786720][32309:32314] CHIP:DMG: } [1654862486.786862][32309:32314] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) [1654862486.786918][32309:32314] CHIP:DMG: MoveToState ReadClient[0xffff840040e0]: Moving to + + + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: @@ -254,7 +265,7 @@ tests: onoff subscribe start-up-on-off 50 800 1 1 - On reference app verify subscription is activated between TH and DUT + On reference app verify that subscription is activated between TH and DUT [1657450742.453824][11635:11640] CHIP:EM: Removed CHIP MessageCounter:190733047 from RetransTable on exchange 33629i [1657450742.453885][11635:11640] CHIP:DMG: ReportDataMessage = diff --git a/src/app/tests/suites/certification/Test_TC_IDM_4_3.yaml b/src/app/tests/suites/certification/Test_TC_IDM_4_3.yaml index c7fb9ebb5391c7..b906bce117696b 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_4_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_4_3.yaml @@ -40,7 +40,7 @@ tests: The cluster used in the below command is an example, User can use any supported chip cluster. onoff subscribe start-up-on-off 30 100 1 1 - Verify on TH , DUT is responds right attribute value for above command + on TH, verify that DUT is responds right attribute value for above command [1657451357.177831][11635:11640] CHIP:DMG: { [1657451357.177894][11635:11640] CHIP:DMG: SubscriptionId = 0xf3aa49ef, @@ -115,8 +115,7 @@ tests: The cluster used in the below command is an example, User can use any supported chip cluster. onoff subscribe on-off 10 200 1 1 - - Verify on TH , DUT is responds right attribute value for above command + on TH verify Verify that DUT is responds right attribute value for above command [1657451491.078934][11635:11640] CHIP:DMG: ReportDataMessage = [1657451491.079004][11635:11640] CHIP:DMG: { @@ -179,7 +178,7 @@ tests: The cluster used in the below command is an example, User can use any supported chip cluster. - Verify on TH , DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not. + on TH verify that DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not. basic subscribe local-config-disabled 100 200 1 0 [1657451690.259096][11635:11640] CHIP:EM: Removed CHIP MessageCounter:190733078 from RetransTable on exchange 33639i @@ -266,7 +265,7 @@ tests: basic subscribe node-label 10 100 1 0 - Verify on TH , DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not. + on TH verify that DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not. 1657452002.280167][11635:11640] CHIP:EM: Removed CHIP MessageCounter:190733100 from RetransTable on exchange 33648i [1657452002.280291][11635:11640] CHIP:DMG: ReportDataMessage = @@ -348,7 +347,7 @@ tests: any subscribe-by-id 0x0008 0x0010 10 100 1 1 - Verify on TH , DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not. + on TH verify that DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not. [1657452196.617935][11635:11640] CHIP:EM: Removed CHIP MessageCounter:190733107 from RetransTable on exchange 33650i [1657452196.618061][11635:11640] CHIP:DMG: ReportDataMessage = @@ -451,8 +450,7 @@ tests: userlabel subscribe label-list 100 500 1 0 - - Verify on TH , DUT is responds right attribute value for above command + On TH verify that DUT is responds right attribute value for above command [1655896309.160632][1885:1890] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0041 Attribute 0x0000_0000 DataVersion: 3773922725 [1655896309.160795][1885:1890] CHIP:TOO: label list: 0 entries [1655896309.160851][1885:1890] CHIP:DMG: MoveToState ReadClient[0xffffa0005710]: Moving to [AwaitingSu] @@ -488,8 +486,7 @@ tests: basic subscribe local-config-disabled 10 100 1 0 --keepSubscriptions 0 - - Verify on TH , DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not. + on TH verify that DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not. [1657453109.707943][11635:11640] CHIP:EM: Removed CHIP MessageCounter:190733139 from RetransTable on exchange 33658i [1657453109.708065][11635:11640] CHIP:DMG: ReportDataMessage = @@ -600,7 +597,7 @@ tests: levelcontrol subscribe on-level 10 80 1 1 - Verify on TH , DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not. + On TH verify that DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not. [1657453503.538054][11635:11640] CHIP:EM: Removed CHIP MessageCounter:190733149 from RetransTable on exchange 33661i @@ -725,7 +722,7 @@ tests: >>> onoff subscribe off-wait-time 10 500 1 1 --keepSubscriptions 1 - Verify on TH , DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not for both attributes + On TH verify that DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not for both attributes [1657454078.091825][11635:11640] CHIP:DMG: ReportDataMessage = @@ -864,7 +861,7 @@ tests: onoff subscribe on-time 10 100 1 1 --keepSubscriptions 1 - Verify on TH , DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not for both attributes. Verify that the first subscription is terminated after the MaxInterval of the first subscription is reached. + On TH verify that DUT is responds right attribute value for below command and then send write command to change the attribute value, verify the attribute value is modified or not for both attributes. Verify that the first subscription is terminated after the MaxInterval of the first subscription is reached. 1657454443.310644][11635:11640] CHIP:DMG: ReportDataMessage = @@ -1039,7 +1036,89 @@ tests: Attribute, Cluster = ClusterID ]]. Set the MinIntervalFloor to some value say "N"(seconds). Change the attribute on the DUT' verification: | - Out of Scope for V1.0 + onoff subscribe-by-id 0x4001 200 700 1 0xFFFF + on TH, verify that DUT is responds right attribute value for command and then send write command to change the attribute value, + [1658322253.825601][4866:4871] CHIP:DMG: ReportDataMessage = + [1658322253.825662][4866:4871] CHIP:DMG: { + [1658322253.825714][4866:4871] CHIP:DMG: SubscriptionId = 0x42baa1, + [1658322253.825767][4866:4871] CHIP:DMG: AttributeReportIBs = + [1658322253.825831][4866:4871] CHIP:DMG: [ + [1658322253.825904][4866:4871] CHIP:DMG: AttributeReportIB = + [1658322253.825998][4866:4871] CHIP:DMG: { + [1658322253.826055][4866:4871] CHIP:DMG: AttributeDataIB = + [1658322253.826137][4866:4871] CHIP:DMG: { + [1658322253.826209][4866:4871] CHIP:DMG: DataVersion = 0xa6fa1c6d, + [1658322253.826295][4866:4871] CHIP:DMG: AttributePathIB = + [1658322253.826391][4866:4871] CHIP:DMG: { + [1658322253.826465][4866:4871] CHIP:DMG: Endpoint = 0x1, + [1658322253.826557][4866:4871] CHIP:DMG: Cluster = 0x6, + [1658322253.826650][4866:4871] CHIP:DMG: Attribute = 0x0000_4001, + [1658322253.826722][4866:4871] CHIP:DMG: } + [1658322253.826810][4866:4871] CHIP:DMG: + [1658322253.826882][4866:4871] CHIP:DMG: Data = 1, + [1658322253.826967][4866:4871] CHIP:DMG: }, + [1658322253.827054][4866:4871] CHIP:DMG: + [1658322253.827110][4866:4871] CHIP:DMG: }, + [1658322253.827204][4866:4871] CHIP:DMG: + [1658322253.827258][4866:4871] CHIP:DMG: AttributeReportIB = + [1658322253.827341][4866:4871] CHIP:DMG: { + [1658322253.827397][4866:4871] CHIP:DMG: AttributeDataIB = + [1658322253.827478][4866:4871] CHIP:DMG: { + [1658322253.827545][4866:4871] CHIP:DMG: DataVersion = 0x73700d2f, + [1658322253.827612][4866:4871] CHIP:DMG: AttributePathIB = + [1658322253.827680][4866:4871] CHIP:DMG: { + [1658322253.827750][4866:4871] CHIP:DMG: Endpoint = 0x2, + [1658322253.827823][4866:4871] CHIP:DMG: Cluster = 0x6, + [1658322253.827896][4866:4871] CHIP:DMG: Attribute = 0x0000_4001, + [1658322253.827964][4866:4871] CHIP:DMG: } + [1658322253.828034][4866:4871] CHIP:DMG: + [1658322253.828105][4866:4871] CHIP:DMG: Data = 0, + [1658322253.828169][4866:4871] CHIP:DMG: }, + [1658322253.828237][4866:4871] CHIP:DMG: + [1658322253.828294][4866:4871] CHIP:DMG: }, + [1658322253.828357][4866:4871] CHIP:DMG: + [1658322253.828407][4866:4871] CHIP:DMG: ], + [1658322253.828479][4866:4871] CHIP:DMG: + [1658322253.828529][4866:4871] CHIP:DMG: InteractionModelRevision = 1 + [1658322253.828579][4866:4871] CHIP:DMG: } + [1658322253.828785][4866:4871] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 2801409133 + [1658322253.828857][4866:4871] CHIP:TOO: OnTime: 0 + [1658322253.829013][4866:4871] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 1936723247 + [1658322253.829073][4866:4871] CHIP:TOO: OnTime: 0 + [1658322253.829154][4866:4871] CHIP:DMG: MoveToState ReadClient[0xffffa4003810]: Moving to [AwaitingSu] + + + onoff write-by-id 0x4001 1 1 1 + On TH, Verify that the DUT sends reports for all the attributes that have changed after N(200) seconds + [1658322453.896805][4866:4871] CHIP:DMG: ReportDataMessage = + [1658322453.896834][4866:4871] CHIP:DMG: { + [1658322453.896859][4866:4871] CHIP:DMG: SubscriptionId = 0x42baa1, + [1658322453.896884][4866:4871] CHIP:DMG: AttributeReportIBs = + [1658322453.896915][4866:4871] CHIP:DMG: [ + [1658322453.896974][4866:4871] CHIP:DMG: AttributeReportIB = + [1658322453.897009][4866:4871] CHIP:DMG: { + [1658322453.897074][4866:4871] CHIP:DMG: AttributeDataIB = + [1658322453.897155][4866:4871] CHIP:DMG: { + [1658322453.897235][4866:4871] CHIP:DMG: DataVersion = 0xa6fa1c6e, + [1658322453.897321][4866:4871] CHIP:DMG: AttributePathIB = + [1658322453.897412][4866:4871] CHIP:DMG: { + [1658322453.897501][4866:4871] CHIP:DMG: Endpoint = 0x1, + [1658322453.897588][4866:4871] CHIP:DMG: Cluster = 0x6, + [1658322453.897675][4866:4871] CHIP:DMG: Attribute = 0x0000_4001, + [1658322453.897757][4866:4871] CHIP:DMG: } + [1658322453.897842][4866:4871] CHIP:DMG: + [1658322453.897934][4866:4871] CHIP:DMG: Data = 1, + [1658322453.898011][4866:4871] CHIP:DMG: }, + [1658322453.898095][4866:4871] CHIP:DMG: + [1658322453.898158][4866:4871] CHIP:DMG: }, + [1658322453.898232][4866:4871] CHIP:DMG: + [1658322453.898292][4866:4871] CHIP:DMG: ], + [1658322453.898367][4866:4871] CHIP:DMG: + [1658322453.898427][4866:4871] CHIP:DMG: InteractionModelRevision = 1 + [1658322453.898486][4866:4871] CHIP:DMG: } + [1658322453.898693][4866:4871] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 2801409134 + [1658322453.898777][4866:4871] CHIP:TOO: OnTime: 1 + [1658322453.898879][4866:4871] CHIP:DMG: Refresh LivenessCheckTime for 725000 milliseconds with SubscriptionId = 0x0042baa1 Peer = 01:0000000000000001 disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_IDM_5_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_5_1.yaml index 7ec4ee63f413b7..c389ba63df59ba 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_5_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_5_1.yaml @@ -30,9 +30,7 @@ tests: In the case of chip tool as a client, here is an example command the client can send invoke request to the TH ./chip-tool onoff on 1 1 --timedInteractionTimeoutMs 200 - Verify that the DUT sent the invoke message to the TH after the specified timeout value for above command - - on the TH (reference all cluster app) you should see + On TH (On the reference app) Verify if DUT is responding with the below status response for the above command [1655797318.624018][7331:7331] CHIP:EM: Handling via exchange: 28067r, Delegate: 0xaaaad9aed418 [1655797318.624129][7331:7331] CHIP:DMG: TimedRequestMessage = [1655797318.624185][7331:7331] CHIP:DMG: { @@ -67,6 +65,49 @@ tests: [1655797318.627383][7331:7331] CHIP:DMG: InteractionModelRevision = 1 [1655797318.627406][7331:7331] CHIP:DMG: }, [1655797318.627467][7331:7331] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0006 e=1 p=o + + + On DUT as a client side, verify that TH all-clusters-app sent success response + [1657886182.184612][3396:3401] CHIP:DMG: StatusResponseMessage = + [1657886182.184642][3396:3401] CHIP:DMG: { + [1657886182.184667][3396:3401] CHIP:DMG: Status = 0x00 (SUCCESS), + [1657886182.184693][3396:3401] CHIP:DMG: InteractionModelRevision = 1 + [1657886182.184716][3396:3401] CHIP:DMG: } + [1657886182.184742][3396:3401] CHIP:IM: Received status response, status is 0x00 (SUCCESS) + + + 61453140 from RetransTable on exchange 17901i + [1657886182.190976][3396:3401] CHIP:DMG: ICR moving to [ResponseRe] + [1657886182.191027][3396:3401] CHIP:DMG: InvokeResponseMessage = + [1657886182.191052][3396:3401] CHIP:DMG: { + [1657886182.191076][3396:3401] CHIP:DMG: suppressResponse = false, + [1657886182.191101][3396:3401] CHIP:DMG: InvokeResponseIBs = + [1657886182.191132][3396:3401] CHIP:DMG: [ + [1657886182.191157][3396:3401] CHIP:DMG: InvokeResponseIB = + [1657886182.191190][3396:3401] CHIP:DMG: { + [1657886182.191216][3396:3401] CHIP:DMG: CommandStatusIB = + [1657886182.191253][3396:3401] CHIP:DMG: { + [1657886182.191286][3396:3401] CHIP:DMG: CommandPathIB = + [1657886182.191325][3396:3401] CHIP:DMG: { + [1657886182.191365][3396:3401] CHIP:DMG: EndpointId = 0x1, + [1657886182.191400][3396:3401] CHIP:DMG: ClusterId = 0x6, + [1657886182.191439][3396:3401] CHIP:DMG: CommandId = 0x1, + [1657886182.191472][3396:3401] CHIP:DMG: }, + [1657886182.191510][3396:3401] CHIP:DMG: + [1657886182.191541][3396:3401] CHIP:DMG: StatusIB = + [1657886182.191575][3396:3401] CHIP:DMG: { + [1657886182.191613][3396:3401] CHIP:DMG: status = 0x00 (SUCCESS), + [1657886182.191649][3396:3401] CHIP:DMG: }, + [1657886182.191683][3396:3401] CHIP:DMG: + [1657886182.191712][3396:3401] CHIP:DMG: }, + [1657886182.191746][3396:3401] CHIP:DMG: + [1657886182.191772][3396:3401] CHIP:DMG: }, + [1657886182.191802][3396:3401] CHIP:DMG: + [1657886182.191826][3396:3401] CHIP:DMG: ], + [1657886182.191856][3396:3401] CHIP:DMG: + [1657886182.191880][3396:3401] CHIP:DMG: InteractionModelRevision = 1 + [1657886182.191903][3396:3401] CHIP:DMG: }, + [1657886182.191963][3396:3401] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0006 Command=0x0000_0001 Status=0x0 disabled: true - label: @@ -78,8 +119,7 @@ tests: Chip-tool as controller , here is the example command you can use ./chip-tool onoff write on-time 2 1 1 --timedInteractionTimeoutMs 200 - Verify that the DUT sent the writerequest message to the TH after the specified timeout value for above command - + On TH (On the reference app) Verify if DUT is responding with the below status response for the above command [1657459639.597900][11525:11525] CHIP:EM: Handling via exchange: 17116r, Delegate: 0xaaaae00c1430 [1657459639.598014][11525:11525] CHIP:DMG: TimedRequestMessage = @@ -118,6 +158,44 @@ tests: [1657459639.600842][11525:11525] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0006 e=1 p=o [1657459639.600888][11525:11525] CHIP:DMG: AccessControl: allowed [1657459639.600936][11525:11525] CHIP:DMG: Endpoint 1, Cluster 0x0000_0006 update version to 1979c48 + + + On DUT as a client side, verify that TH all-clusters-app sent success response + + [1657886272.645704][3404:3409] CHIP:DMG: StatusResponseMessage = + [1657886272.645751][3404:3409] CHIP:DMG: { + [1657886272.645792][3404:3409] CHIP:DMG: Status = 0x00 (SUCCESS), + [1657886272.645839][3404:3409] CHIP:DMG: InteractionModelRevision = 1 + [1657886272.645878][3404:3409] CHIP:DMG: } + [1657886272.645918][3404:3409] CHIP:IM: Received status response, status is 0x00 (SUCCESS) + + [1657886272.648220][3404:3409] CHIP:DMG: WriteClient moving to [ResponseRe] + [1657886272.648285][3404:3409] CHIP:DMG: WriteResponseMessage = + [1657886272.648326][3404:3409] CHIP:DMG: { + [1657886272.648361][3404:3409] CHIP:DMG: AttributeStatusIBs = + [1657886272.648410][3404:3409] CHIP:DMG: [ + [1657886272.648450][3404:3409] CHIP:DMG: AttributeStatusIB = + [1657886272.648494][3404:3409] CHIP:DMG: { + [1657886272.648535][3404:3409] CHIP:DMG: AttributePathIB = + [1657886272.648593][3404:3409] CHIP:DMG: { + [1657886272.648644][3404:3409] CHIP:DMG: Endpoint = 0x1, + [1657886272.648698][3404:3409] CHIP:DMG: Cluster = 0x6, + [1657886272.648752][3404:3409] CHIP:DMG: Attribute = 0x0000_4001, + [1657886272.648803][3404:3409] CHIP:DMG: } + [1657886272.648860][3404:3409] CHIP:DMG: + [1657886272.648910][3404:3409] CHIP:DMG: StatusIB = + [1657886272.648959][3404:3409] CHIP:DMG: { + [1657886272.649011][3404:3409] CHIP:DMG: status = 0x00 (SUCCESS), + [1657886272.649067][3404:3409] CHIP:DMG: }, + [1657886272.649115][3404:3409] CHIP:DMG: + [1657886272.649161][3404:3409] CHIP:DMG: }, + [1657886272.649212][3404:3409] CHIP:DMG: + [1657886272.649250][3404:3409] CHIP:DMG: ], + [1657886272.649283][3404:3409] CHIP:DMG: + [1657886272.649308][3404:3409] CHIP:DMG: InteractionModelRevision = 1 + [1657886272.649333][3404:3409] CHIP:DMG: } + [1657886272.649415][3404:3409] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1657886272.649481][3404:3409] CHIP:EM: Sending Standalone Ack for MessageCounter:137181137 on exchange 234i disabled: true - label: @@ -127,4 +205,5 @@ tests: the received timed request." verification: | This is not testable in normal scenario, and needs to be tested as part of Unit test. + https://github.com/CHIP-Specifications/chip-test-plans/issues/1885 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_6_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_6_1.yaml index dabd2edd4d8ee9..c5fc410b9ac5e6 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_6_1.yaml @@ -27,7 +27,8 @@ tests: specific node that is, [Node = Specific, Endpoint = Specific, Cluster = Specific, Event = Specific]." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. + sudo ./chip-tool basic read-event start-up 1 0 @@ -79,7 +80,7 @@ tests: node that is, [Node = Specific, Endpoint = Specific, Cluster = Specific, Event = Wildcard]." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. ./chip-tool any read-event-by-id 0x0028 0x0FFFFFFFF 1 0 On TH verify DUT sends Report Data Message with the data for specific event in Read Request Message. @@ -129,8 +130,6 @@ tests: that is, [Node = Specific, Endpoint = Specific, Cluster = Wildcard, Event = Wildcard]." verification: | - In case of chip tool, here is an example command to use - ./chip-tool any read-event-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0 On TH verify DUT sends Report Data Message with the data for specific event in Read Request Message. @@ -174,7 +173,7 @@ tests: node that is, [Node = Specific, Endpoint = Wildcard, Cluster = Specific, Event = Specific]." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. sudo ./chip-tool basic read-event start-up 1 0xFFFF @@ -226,7 +225,7 @@ tests: that is, [Node = Specific, Endpoint = Wildcard, Cluster = Specific, Event = Wildcard]." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. sudo ./chip-tool basic read-event-by-id 0xFFFFFFFF 1 0xFFFF On TH verify DUT sends Report Data Message with the data for specific event in Read Request Message. @@ -277,8 +276,6 @@ tests: [Node = Specific, Endpoint = Wildcard, Cluster = Wildcard, Event = Wildcard]." verification: | - In case of chip tool, here is an example command to use - sudo ./chip-tool any read-event-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF On TH verify DUT sends Report Data Message with the data for specific event in Read Request Message. [1653051769.144914][11706:11711] CHIP:DMG: ReportDataMessage = @@ -415,11 +412,13 @@ tests: which requires a privilege that is not granted for the cluster in the path." verification: | - In case of chip tool, here is an example command to use + The cluster used in the below command is an example, User can use any supported chip cluster. - To Setup the TH such that there is no accessing fabric, 1st we need to send below mentioned ACL command + To Setup the TH such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command + Here by sending below mentioned ACL command giving only access for identify cluster(3), So except identify cluster command if try to send any other command will get status as unsupported access. + + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [1234], "targets": null}]' 1 0 ./chip-tool any read-event-by-id 0x28 0 1 0 verify DUT is responsds with UNSUPPORTED_ACCESS for the data sent in the above command @@ -453,6 +452,8 @@ tests: [1653054249.515083][12265:12270] CHIP:DMG: SuppressResponse = true, [1653054249.515090][12265:12270] CHIP:DMG: InteractionModelRevision = 1 [1653054249.515102][12265:12270] CHIP:DMG: } + + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: @@ -460,8 +461,6 @@ tests: Wildcard path where reading an event in the path requires a privilege that is not granted for the cluster in the path." verification: | - In case of chip tool, here is an example command to use - To Setup the TH such that there is no accessing fabric, 1st we need to send below mentioned ACL command ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [1234], "targets": null}]' 1 0 @@ -473,6 +472,9 @@ tests: [1653054297.608292][12300:12305] CHIP:DMG: SuppressResponse = true, [1653054297.608306][12300:12305] CHIP:DMG: InteractionModelRevision = 1 [1653054297.608317][12300:12305] CHIP:DMG: } + + + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: @@ -482,8 +484,6 @@ tests: EventMin field set to a number less than what was received in the previous step." verification: | - here is the example command you can use - sudo ./chip-tool any read-event-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF @@ -556,8 +556,7 @@ tests: EventMin field set to a number much greater than what was received in the previous step." verification: | - In case of chip tool, here is an example command to use - + The cluster used in the below command is an example, User can use any supported chip cluster. sudo ./chip-tool basic read-event start-up 1 0 --event-min 131073 On TH verify that the DUT sends Report Data Message with empty EventReports @@ -574,15 +573,78 @@ tests: event data. For every chunked data message received, DUT sends a status response." verification: | - tried in doorlock app, Sent wildcard read-event command from TH to DUT to verify this test-step, - On TH verify that The last chunked message should not receive any status response from the DUT. + Try to verify this step in doorlock app, below mentioned wildcard command to read-event from TH to DUT. ./chip-tool any read-event-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF - The message flow I would expect here is: + The message flow can expect as mentioned below TH -> DUT ReadRequest DUT -> TH ReportData, not last chunk TH -> DUT StatusResponse Possibly repeat steps 2 & 3 a few times DUT -> TH ReportData, last chunk, SuppressResponse set to true TH -> DUT standalone ack + + On TH verify that The last chunked message should not receive any status response from the DUT + + [1656510389.524811][20396:20396] CHIP:DMG: Fetched 16 events + [1656510389.524838][20396:20396] CHIP:DMG: Sending report (payload has 973 bytes)... + [1656510389.524864][20396:20396] CHIP:DMG: IM RH moving to [AwaitingReportResponse] + + [1656510389.553113][20396:20396] CHIP:EM: Found matching exchange: 51910r, Delegate: 0xaaab0b90c330 + [1656510389.553190][20396:20396] CHIP:EM: Rxd Ack; Removing MessageCounter:206023646 from Retrans Table on exchange 51910r + [1656510389.553248][20396:20396] CHIP:EM: Removed CHIP MessageCounter:206023646 from RetransTable on exchange 51910r + [1656510389.553347][20396:20396] CHIP:DMG: StatusResponseMessage = + [1656510389.553413][20396:20396] CHIP:DMG: { + [1656510389.553472][20396:20396] CHIP:DMG: Status = 0x00 (SUCCESS), + [1656510389.553534][20396:20396] CHIP:DMG: InteractionModelRevision = 1 + [1656510389.553592][20396:20396] CHIP:DMG: } + [1656510389.553648][20396:20396] CHIP:IM: Received status response, status is 0x00 (SUCCESS) + [1656510389.553711][20396:20396] CHIP:DMG: OnReportConfirm: NumReports = 0 + [1656510389.553770][20396:20396] CHIP:DMG: IM RH moving to [GeneratingReports] + [1656510389.553924][20396:20396] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1656510389.555237][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.555318][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.555503][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.555570][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.555749][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.555814][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.555990][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.556054][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.556221][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.556285][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.556456][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.556627][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.556808][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.556875][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.557055][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.557122][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.557300][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.557365][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.557538][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.557602][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.557777][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.557842][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.558015][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.558081][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.558288][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.558332][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.558515][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.558561][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.558677][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.558721][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.558836][20396:20396] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=v + [1656510389.558878][20396:20396] CHIP:DMG: AccessControl: allowed + [1656510389.558964][20396:20396] CHIP:DMG: Fetched 16 events + [1656510389.559007][20396:20396] CHIP:DMG: Sending report (payload has 911 bytes)... + [1656510389.559061][20396:20396] CHIP:EM: Piggybacking Ack for MessageCounter:90464643 on exchange: 51910r + [1656510389.559228][20396:20396] CHIP:IN: Prepared secure message 0xaaab0b95c688 to 0x000000000001B669 (1) of type 0x5 and protocolId (0, 1) on exchange 51910r with MessageCounter:206023647. + [1656510389.559287][20396:20396] CHIP:IN: Sending encrypted msg 0xaaab0b95c688 with MessageCounter:206023647 to 0x000000000001B669 (1) at monotonic time: 0000000001ECA505 msec + [1656510389.559519][20396:20396] CHIP:DMG: OnReportConfirm: NumReports = 0 + [1656510389.559563][20396:20396] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages + [1656510389.559597][20396:20396] CHIP:DMG: IM RH moving to [AwaitingDestruction] + [1656510389.559639][20396:20396] CHIP:DMG: All ReadHandler-s are clean, clear GlobalDirtySet + [1656510389.586362][20396:20396] CHIP:EM: Received message of type 0x10 with protocolId (0, 0) and MessageCounter:90464644 on exchange 51910r + [1656510389.586431][20396:20396] CHIP:EM: Found matching exchange: 51910r, Delegate: (nil) + [1656510389.586492][20396:20396] CHIP:EM: Rxd Ack; Removing MessageCounter:206023647 from Retrans Table on exchange 51910r + [1656510389.586535][20396:20396] CHIP:EM: Removed CHIP MessageCounter:206023647 from RetransTable on exchange 51910r disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml index e1b9e4470d4853..66eb73a15f99de 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml @@ -29,7 +29,11 @@ tests: specific node that is, [Node = Specific, Endpoint = Specific, Cluster = Specific, Event = Specific]." verification: | - chip tool is used as TH and send the below command from TH + The cluster used in the below command is an example, User can use any supported chip cluster on DUT. + + Pls run this test in chip tool interactive mode ./chip-tool interactive start + + On the TH (chip-tool) pls subscribe to start-up event (below command), right after you power on the DUT. If DUT vendor is subscribing to any other event, Pls use appropriate steps on the DUT to generate that event and use subscribe to that event from TH. basic subscribe-event start-up 20 100 1 0 @@ -85,6 +89,7 @@ tests: = Specific, Event = Wildcard]." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + Pls run this test in chip tool interactive mode ./chip-tool interactive start basic subscribe-event-by-id 0xFFFFFFFF 10 100 1 0 @@ -141,7 +146,7 @@ tests: Event = Wildcard]." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. - + Please run this test in chip tool interactive mode ./chip-tool interactive start any subscribe-event-by-id 0xFFFFFFFF 0xFFFFFFFF 20 100 1 0 On TH verify that the Report Data Message with SubscriptionId which uniquely identifies this subscription on the publisher and data for events in Subscribe Request Message from DUT @@ -248,6 +253,7 @@ tests: Specific, Event = Specific]." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + Please run this test in chip tool interactive mode ./chip-tool interactive start basic subscribe-event-by-id 0x00 10 700 1 0xFFFF On TH verify that the Report Data Message with SubscriptionId which uniquely identifies this subscription on the publisher and data for events in Subscribe Request Message from DUT @@ -300,6 +306,7 @@ tests: Event = Wildcard]." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + Please run this test in chip tool interactive mode ./chip-tool interactive start basic subscribe-event-by-id 0xFFFFFFFF 10 100 1 0xFFFF On TH verify that the Report Data Message with SubscriptionId which uniquely identifies this subscription on the publisher and data for events in Subscribe Request Message from DUT @@ -353,6 +360,8 @@ tests: is, [Node = Specific, Endpoint = Wildcard, Cluster = Wildcard, Event = Wildcard]." verification: | + Please run this test in chip tool interactive mode ./chip-tool interactive start + any subscribe-event-by-id 0xFFFFFFFF 0xFFFFFFFF 100 1000 1 0xFFFF On TH verify that the Report Data Message with SubscriptionId which uniquely identifies this subscription on the publisher and data for events in Subscribe Request Message from DUT [1657456221.167627][11635:11640] CHIP:DMG: ReportDataMessage = @@ -571,7 +580,7 @@ tests: is, [Node = Specific, Endpoint = Wildcard, Cluster = Wildcard, Event = Wildcard]." verification: | - Repeat the above Test step + test step repeated, needs to be removed from test plan, https://github.com/CHIP-Specifications/chip-test-plans/issues/1888 disabled: true - label: @@ -579,6 +588,7 @@ tests: event on the DUT before minimum interval." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + Please run this test in chip tool interactive mode ./chip-tool interactive start basic subscribe-event-by-id 0x000 100 1000 1 0 @@ -633,6 +643,7 @@ tests: SubscribeRequestMessage." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + Please run this test in chip tool interactive mode ./chip-tool interactive start basic subscribe-event start-up 30 100 1 0 --is-urgent true @@ -683,10 +694,10 @@ tests: triggering attribute values before maximum interval." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + Please run this test in chip tool interactive mode ./chip-tool interactive start basic subscribe-event start-up 20 100 1 0 - On TH verify that the Report Data Message from DUT to TH [1656586853.121700][3433:3438] CHIP:EM: Removed CHIP MessageCounter:63910370 from RetransTable on exchange 37869i @@ -736,6 +747,7 @@ tests: Subscribe Request Message to DUT with KeepSubscriptions as False." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + Please run this test in chip tool interactive mode ./chip-tool interactive start basic subscribe-event-by-id 0x000 10 500 1 0 @@ -830,6 +842,7 @@ tests: code." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + Please run this test in chip tool interactive mode ./chip-tool interactive start basic subscribe-event-by-id 0x000 20 400 1 0 @@ -850,14 +863,14 @@ tests: Status." verification: | This is not testable in normal scenario, and needs to be tested as part of Unit test. - This test is not testable. + https://github.com/CHIP-Specifications/chip-test-plans/issues/1885 disabled: true - label: "TH sends Subscribe Request Message to DUT with EventRequests set to path which indicates a cluster event that is not supported." verification: | - Out of Scope for V1.0 + Mark this as not testable /NA. Out of Scope for V1.0 disabled: true - label: @@ -866,10 +879,14 @@ tests: the path." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + Please run this test in chip tool interactive mode ./chip-tool interactive start - To Setup the TH such that there is no accessing fabric, 1st we need to send the below mentioned ACL command - accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [1234], "targets": null}]' 1 0 + To Setup the TH such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command + Here by sending below mentioned ACL command giving only access for identify cluster(3), So except identify cluster command if try to send any other command will get status as unsupported access. + + accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 + basic subscribe-event-by-id 0x000 100 1000 1 0 In TH log verify DUT responds with UNSUPPORTED_ACCESS for the data sent in the above command @@ -905,6 +922,9 @@ tests: [1653479886.551532][22629:22634] CHIP:DMG: InteractionModelRevision = 1 [1653479886.551538][22629:22634] CHIP:DMG: } [1653479886.551583][22629:22634] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) + + + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: @@ -914,13 +934,15 @@ tests: verification: | chip tool is used as TH and send the below command from TH + Please run this test in chip tool interactive mode ./chip-tool interactive start + To Setup the TH such that there is no accessing fabric, 1st we need to send below mentioned ACL command accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [1234], "targets": null}]' 1 0 - any subscribe-event-by-id 0xFFFFFFFF 0xFFFFFFFF 100 1000 1 0xFFFF + any subscribe-event-by-id 0xFFFFFFFF 0xFFFFFFFF 100 1000 1 0xFFFF - verify DUT is responsds with Report Data Message with no entry for that event in EventReports list. for the data sent in the above command + verify DUT is responds with Report Data Message with no entry for that event in the EventReports list. for the data sent in the above command [1653480007.965861][22654:22659] CHIP:DMG: ReportDataMessage = [1653480007.965882][22654:22659] CHIP:DMG: { @@ -928,6 +950,8 @@ tests: [1653480007.965916][22654:22659] CHIP:DMG: InteractionModelRevision = 1 [1653480007.965929][22654:22659] CHIP:DMG: } [1653480007.965969][22654:22659] CHIP:DMG: MoveToState ReadClient[0x7efe84002fd0]: Moving to [AwaitingSu] + + With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to factory reset the DUT and reprovision the DUT again, Otherwise the below steps can not be executed. disabled: true - label: @@ -937,10 +961,15 @@ tests: verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + + Please run this test in chip tool interactive mode ./chip-tool interactive start + accesscontrol subscribe-event access-control-entry-changed 5 10 1 0 + + On TH, verify that the Report Data Message with EventReports for event numbers higher than the EventMin field and Verify that the subsequent ReportData actions as part of the subscription include the latest EventNo associated with each node generating new events - accesscontrol subscribe-event access-control-entry-changed 5 10 1 0 + [1655979825.174136][4566:4571] CHIP:DMG: ReportDataMessage = [1655979825.174177][4566:4571] CHIP:DMG: { [1655979825.174213][4566:4571] CHIP:DMG: SubscriptionId = 0xd263227e, @@ -1006,8 +1035,7 @@ tests: [1655979825.177433][4566:4571] CHIP:DMG: MoveToState ReadClient[0xffff84006d40]: Moving to [AwaitingSu] - - sudo ./chip-tool accesscontrol subscribe-event access-control-entry-changed 5 10 1 0 --event-min 0 + accesscontrol subscribe-event access-control-entry-changed 5 10 1 0 --event-min 0 [1655979915.863156][4607:4612] CHIP:DMG: ReportDataMessage = [1655979915.863196][4607:4612] CHIP:DMG: { [1655979915.863232][4607:4612] CHIP:DMG: SubscriptionId = 0xeb39dedd, @@ -1144,6 +1172,9 @@ tests: verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + + Please run this test in chip tool interactive mode ./chip-tool interactive start + basic subscribe-event-by-id 0x000 100 1000 1 0 --event-min 1 @@ -1164,145 +1195,127 @@ tests: verification: | The cluster used in the below command is an example, User can use any supported chip cluster. - Provision DUT and TH. - - To generate the software fault event, execute the following - 1. Get the PID of the DUT & KIll it . - ps -aef|grep all-clusters-app - sudo kill -SIGUSR1 - - - On TH, Verify that each event record is assigned a number that is exactly 1 greater than the last created event record on that Node. by sending the below command - softwarediagnostics subscribe-event software-fault 1 0 - [1656509949.252105][1593:1598] CHIP:DMG: InteractionModelRevision = 1 - [1656509949.252131][1593:1598] CHIP:DMG: } - [1656509949.252482][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.252514][1593:1598] CHIP:TOO: Event number: 7 - [1656509949.252540][1593:1598] CHIP:TOO: Priority: Info - [1656509949.252564][1593:1598] CHIP:TOO: Timestamp: 1667389 - [1656509949.252673][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.252726][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.252755][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.252785][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33343A353220323032320A - [1656509949.252812][1593:1598] CHIP:TOO: } - [1656509949.252919][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.252946][1593:1598] CHIP:TOO: Event number: 8 - [1656509949.252970][1593:1598] CHIP:TOO: Priority: Info - [1656509949.252994][1593:1598] CHIP:TOO: Timestamp: 1668865 - [1656509949.253028][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.253054][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.253079][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.253106][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33343A353420323032320A - [1656509949.253131][1593:1598] CHIP:TOO: } - [1656509949.253235][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.253262][1593:1598] CHIP:TOO: Event number: 9 - [1656509949.253286][1593:1598] CHIP:TOO: Priority: Info - [1656509949.253310][1593:1598] CHIP:TOO: Timestamp: 1671097 - [1656509949.253343][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.253370][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.253394][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.253420][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33343A353620323032320A - [1656509949.253445][1593:1598] CHIP:TOO: } - [1656509949.253552][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.253578][1593:1598] CHIP:TOO: Event number: 10 - [1656509949.253602][1593:1598] CHIP:TOO: Priority: Info - [1656509949.253626][1593:1598] CHIP:TOO: Timestamp: 1899745 - [1656509949.253658][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.253685][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.253708][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.253734][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33383A343520323032320A - [1656509949.253755][1593:1598] CHIP:TOO: } - [1656509949.253856][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.253883][1593:1598] CHIP:TOO: Event number: 11 - [1656509949.253904][1593:1598] CHIP:TOO: Priority: Info - [1656509949.253924][1593:1598] CHIP:TOO: Timestamp: 1901573 - [1656509949.253954][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.253977][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.253997][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.254020][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33383A343620323032320A - [1656509949.254042][1593:1598] CHIP:TOO: } - [1656509949.254132][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.254155][1593:1598] CHIP:TOO: Event number: 12 - [1656509949.254176][1593:1598] CHIP:TOO: Priority: Info - [1656509949.254196][1593:1598] CHIP:TOO: Timestamp: 1903174 - [1656509949.254225][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.254247][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.254268][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.254291][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33383A343820323032320A - [1656509949.254313][1593:1598] CHIP:TOO: } - [1656509949.254403][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.254426][1593:1598] CHIP:TOO: Event number: 13 - [1656509949.254447][1593:1598] CHIP:TOO: Priority: Info - [1656509949.254468][1593:1598] CHIP:TOO: Timestamp: 1904273 - [1656509949.254496][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.254519][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.254540][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.254563][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33383A343920323032320A - [1656509949.254584][1593:1598] CHIP:TOO: } - [1656509949.254674][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.254697][1593:1598] CHIP:TOO: Event number: 14 - [1656509949.254718][1593:1598] CHIP:TOO: Priority: Info - [1656509949.254739][1593:1598] CHIP:TOO: Timestamp: 1905286 - [1656509949.254766][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.254789][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.254810][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.254833][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33383A353020323032320A - [1656509949.254854][1593:1598] CHIP:TOO: } - [1656509949.254945][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.254967][1593:1598] CHIP:TOO: Event number: 15 - [1656509949.254988][1593:1598] CHIP:TOO: Priority: Info - [1656509949.255008][1593:1598] CHIP:TOO: Timestamp: 1907173 - [1656509949.255036][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.255059][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.255080][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.255103][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33383A353220323032320A - [1656509949.255125][1593:1598] CHIP:TOO: } - [1656509949.255214][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.255236][1593:1598] CHIP:TOO: Event number: 16 - [1656509949.255257][1593:1598] CHIP:TOO: Priority: Info - [1656509949.255277][1593:1598] CHIP:TOO: Timestamp: 1908021 - [1656509949.255305][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.255328][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.255349][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.255372][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33383A353320323032320A - [1656509949.255393][1593:1598] CHIP:TOO: } - [1656509949.255484][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.255506][1593:1598] CHIP:TOO: Event number: 17 - [1656509949.255527][1593:1598] CHIP:TOO: Priority: Info - [1656509949.255548][1593:1598] CHIP:TOO: Timestamp: 1908798 - [1656509949.255575][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.255598][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.255618][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.255641][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33383A353420323032320A - [1656509949.255663][1593:1598] CHIP:TOO: } - [1656509949.255752][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.255774][1593:1598] CHIP:TOO: Event number: 18 - [1656509949.255796][1593:1598] CHIP:TOO: Priority: Info - [1656509949.255816][1593:1598] CHIP:TOO: Timestamp: 1909478 - [1656509949.255844][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.255866][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.255887][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.255910][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33383A353420323032320A - [1656509949.255931][1593:1598] CHIP:TOO: } - [1656509949.256022][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.256044][1593:1598] CHIP:TOO: Event number: 19 - [1656509949.256065][1593:1598] CHIP:TOO: Priority: Info - [1656509949.256086][1593:1598] CHIP:TOO: Timestamp: 1910178 - [1656509949.256114][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.256136][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.256157][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.256193][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33383A353520323032320A - [1656509949.256216][1593:1598] CHIP:TOO: } - [1656509949.256306][1593:1598] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Event 0x0000_0000 - [1656509949.256328][1593:1598] CHIP:TOO: Event number: 20 - [1656509949.256349][1593:1598] CHIP:TOO: Priority: Info - [1656509949.256370][1593:1598] CHIP:TOO: Timestamp: 1911229 - [1656509949.256398][1593:1598] CHIP:TOO: SoftwareFault: { - [1656509949.256420][1593:1598] CHIP:TOO: Id: 1609 - [1656509949.256442][1593:1598] CHIP:TOO: Name: 1609 - [1656509949.256464][1593:1598] CHIP:TOO: FaultRecording: 576564204A756E2032392031333A33383A353620323032320A - [1656509949.256486][1593:1598] CHIP:TOO: } - [1656509949.256679][1593:1598] CHIP:DMG: MoveToState ReadClient[0xffff74004470]: Moving to [AwaitingSu] + Please run this test in chip tool interactive mode ./chip-tool interactive start + + accesscontrol subscribe-event access-control-entry-changed 20 500 1 0 + On TH verify that each event number + [1658405014.975407][4236:4241] CHIP:DMG: } + [1658405014.975582][4236:4241] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1658405014.975608][4236:4241] CHIP:TOO: Event number: 2 + [1658405014.975632][4236:4241] CHIP:TOO: Priority: Info + [1658405014.975656][4236:4241] CHIP:TOO: Timestamp: 24429982 + [1658405014.975774][4236:4241] CHIP:TOO: AccessControlEntryChanged: { + [1658405014.975802][4236:4241] CHIP:TOO: AdminNodeID: null + [1658405014.975837][4236:4241] CHIP:TOO: AdminPasscodeID: 0 + [1658405014.975864][4236:4241] CHIP:TOO: ChangeType: 1 + [1658405014.975889][4236:4241] CHIP:TOO: LatestValue: { + [1658405014.975913][4236:4241] CHIP:TOO: Privilege: 5 + [1658405014.975938][4236:4241] CHIP:TOO: AuthMode: 2 + [1658405014.975968][4236:4241] CHIP:TOO: Subjects: 1 entries + [1658405014.975999][4236:4241] CHIP:TOO: [1]: 112233 + [1658405014.976027][4236:4241] CHIP:TOO: Targets: null + [1658405014.976052][4236:4241] CHIP:TOO: FabricIndex: 1 + [1658405014.976075][4236:4241] CHIP:TOO: } + [1658405014.976100][4236:4241] CHIP:TOO: AdminFabricIndex: 1 + [1658405014.976124][4236:4241] CHIP:TOO: } + [1658405014.976188][4236:4241] CHIP:DMG: MoveToState ReadClient[0xffffa4008e30]: Moving to [AwaitingSu] + + By sending the command mentioned below, change attribute values on DUT to create events multiple times. + + accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 1, "authMode": 3, "subjects": [111,222,333,444], "targets": [{"cluster":11 , "endpoint":22, "deviceType": null}]}, {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets": [{"cluster": 55, "endpoint": 66, "deviceType":null }]}]' 1 0 + + On TH Verify that each event record is assigned a number that is exactly 1 greater than the last created event record on that Node. + + [1658405515.109232][4236:4241] CHIP:DMG: } + [1658405515.109475][4236:4241] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1658405515.109503][4236:4241] CHIP:TOO: Event number: 3 + [1658405515.109529][4236:4241] CHIP:TOO: Priority: Info + [1658405515.109555][4236:4241] CHIP:TOO: Timestamp: 24557931 + [1658405515.109621][4236:4241] CHIP:TOO: AccessControlEntryChanged: { + [1658405515.109654][4236:4241] CHIP:TOO: AdminNodeID: 112233 + [1658405515.109682][4236:4241] CHIP:TOO: AdminPasscodeID: null + [1658405515.109710][4236:4241] CHIP:TOO: ChangeType: 2 + [1658405515.109736][4236:4241] CHIP:TOO: LatestValue: { + [1658405515.109762][4236:4241] CHIP:TOO: Privilege: 5 + [1658405515.109788][4236:4241] CHIP:TOO: AuthMode: 2 + [1658405515.109819][4236:4241] CHIP:TOO: Subjects: 1 entries + [1658405515.109852][4236:4241] CHIP:TOO: [1]: 112233 + [1658405515.109881][4236:4241] CHIP:TOO: Targets: null + [1658405515.109907][4236:4241] CHIP:TOO: FabricIndex: 1 + [1658405515.109933][4236:4241] CHIP:TOO: } + [1658405515.109960][4236:4241] CHIP:TOO: AdminFabricIndex: 1 + [1658405515.109985][4236:4241] CHIP:TOO: } + [1658405515.110118][4236:4241] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1658405515.110146][4236:4241] CHIP:TOO: Event number: 4 + [1658405515.110171][4236:4241] CHIP:TOO: Priority: Info + [1658405515.110196][4236:4241] CHIP:TOO: Timestamp: 24557933 + [1658405515.110240][4236:4241] CHIP:TOO: AccessControlEntryChanged: { + [1658405515.110269][4236:4241] CHIP:TOO: AdminNodeID: 112233 + [1658405515.110296][4236:4241] CHIP:TOO: AdminPasscodeID: null + [1658405515.110322][4236:4241] CHIP:TOO: ChangeType: 1 + [1658405515.110348][4236:4241] CHIP:TOO: LatestValue: { + [1658405515.110373][4236:4241] CHIP:TOO: Privilege: 5 + [1658405515.110399][4236:4241] CHIP:TOO: AuthMode: 2 + [1658405515.110427][4236:4241] CHIP:TOO: Subjects: 1 entries + [1658405515.110457][4236:4241] CHIP:TOO: [1]: 112233 + [1658405515.110485][4236:4241] CHIP:TOO: Targets: null + [1658405515.110511][4236:4241] CHIP:TOO: FabricIndex: 1 + [1658405515.110536][4236:4241] CHIP:TOO: } + [1658405515.110562][4236:4241] CHIP:TOO: AdminFabricIndex: 1 + [1658405515.110587][4236:4241] CHIP:TOO: } + [1658405515.110735][4236:4241] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1658405515.110762][4236:4241] CHIP:TOO: Event number: 5 + [1658405515.110788][4236:4241] CHIP:TOO: Priority: Info + [1658405515.110813][4236:4241] CHIP:TOO: Timestamp: 24557935 + [1658405515.110861][4236:4241] CHIP:TOO: AccessControlEntryChanged: { + [1658405515.110890][4236:4241] CHIP:TOO: AdminNodeID: 112233 + [1658405515.110917][4236:4241] CHIP:TOO: AdminPasscodeID: null + [1658405515.110943][4236:4241] CHIP:TOO: ChangeType: 1 + [1658405515.110969][4236:4241] CHIP:TOO: LatestValue: { + [1658405515.110994][4236:4241] CHIP:TOO: Privilege: 1 + [1658405515.111020][4236:4241] CHIP:TOO: AuthMode: 3 + [1658405515.111050][4236:4241] CHIP:TOO: Subjects: 4 entries + [1658405515.111080][4236:4241] CHIP:TOO: [1]: 111 + [1658405515.111109][4236:4241] CHIP:TOO: [2]: 222 + [1658405515.111137][4236:4241] CHIP:TOO: [3]: 333 + [1658405515.111166][4236:4241] CHIP:TOO: [4]: 444 + [1658405515.111198][4236:4241] CHIP:TOO: Targets: 1 entries + [1658405515.111240][4236:4241] CHIP:TOO: [1]: { + [1658405515.111268][4236:4241] CHIP:TOO: Cluster: 11 + [1658405515.111296][4236:4241] CHIP:TOO: Endpoint: 22 + [1658405515.111322][4236:4241] CHIP:TOO: DeviceType: null + [1658405515.111348][4236:4241] CHIP:TOO: } + [1658405515.111376][4236:4241] CHIP:TOO: FabricIndex: 1 + [1658405515.111402][4236:4241] CHIP:TOO: } + [1658405515.111428][4236:4241] CHIP:TOO: AdminFabricIndex: 1 + [1658405515.111453][4236:4241] CHIP:TOO: } + [1658405515.111600][4236:4241] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1658405515.111628][4236:4241] CHIP:TOO: Event number: 6 + [1658405515.111653][4236:4241] CHIP:TOO: Priority: Info + [1658405515.111678][4236:4241] CHIP:TOO: Timestamp: 24557937 + [1658405515.111726][4236:4241] CHIP:TOO: AccessControlEntryChanged: { + [1658405515.111755][4236:4241] CHIP:TOO: AdminNodeID: 112233 + [1658405515.111781][4236:4241] CHIP:TOO: AdminPasscodeID: null + [1658405515.111807][4236:4241] CHIP:TOO: ChangeType: 1 + [1658405515.111833][4236:4241] CHIP:TOO: LatestValue: { + [1658405515.111859][4236:4241] CHIP:TOO: Privilege: 3 + [1658405515.111884][4236:4241] CHIP:TOO: AuthMode: 3 + [1658405515.111914][4236:4241] CHIP:TOO: Subjects: 4 entries + [1658405515.111944][4236:4241] CHIP:TOO: [1]: 555 + [1658405515.111973][4236:4241] CHIP:TOO: [2]: 666 + [1658405515.112002][4236:4241] CHIP:TOO: [3]: 777 + [1658405515.112030][4236:4241] CHIP:TOO: [4]: 888 + [1658405515.112063][4236:4241] CHIP:TOO: Targets: 1 entries + [1658405515.112097][4236:4241] CHIP:TOO: [1]: { + [1658405515.112125][4236:4241] CHIP:TOO: Cluster: 55 + [1658405515.112151][4236:4241] CHIP:TOO: Endpoint: 66 + [1658405515.112177][4236:4241] CHIP:TOO: DeviceType: null + [1658405515.112203][4236:4241] CHIP:TOO: } + [1658405515.112231][4236:4241] CHIP:TOO: FabricIndex: 1 + [1658405515.112257][4236:4241] CHIP:TOO: } + [1658405515.112283][4236:4241] CHIP:TOO: AdminFabricIndex: 1 + [1658405515.112308][4236:4241] CHIP:TOO: } + [1658405515.112462][4236:4241] CHIP:DMG: Refresh LivenessCheckTime for 525000 milliseconds with SubscriptionId = 0x0a5a629c Peer = 01:0000000000000001 disabled: true - label: @@ -1311,5 +1324,131 @@ tests: reset on DUT, re-subscribe to events and continue to change attribute values on DUT to create events multiple times." verification: | - https://github.com/CHIP-Specifications/chip-test-plans/issues/1700 + The cluster used in the below command is an example, User can use any supported chip cluster. + + Please run this test in chip tool interactive mode ./chip-tool interactive start + + On Raspi platform the event is triggered with this command, Pls use equivalent command on the respective DUT + + accesscontrol subscribe-event access-control-entry-changed 20 500 1 0 + On TH verify that each event number + [1658405014.975407][4236:4241] CHIP:DMG: } + [1658405014.975582][4236:4241] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1658405014.975608][4236:4241] CHIP:TOO: Event number: 2 + [1658405014.975632][4236:4241] CHIP:TOO: Priority: Info + [1658405014.975656][4236:4241] CHIP:TOO: Timestamp: 24429982 + [1658405014.975774][4236:4241] CHIP:TOO: AccessControlEntryChanged: { + [1658405014.975802][4236:4241] CHIP:TOO: AdminNodeID: null + [1658405014.975837][4236:4241] CHIP:TOO: AdminPasscodeID: 0 + [1658405014.975864][4236:4241] CHIP:TOO: ChangeType: 1 + [1658405014.975889][4236:4241] CHIP:TOO: LatestValue: { + [1658405014.975913][4236:4241] CHIP:TOO: Privilege: 5 + [1658405014.975938][4236:4241] CHIP:TOO: AuthMode: 2 + [1658405014.975968][4236:4241] CHIP:TOO: Subjects: 1 entries + [1658405014.975999][4236:4241] CHIP:TOO: [1]: 112233 + [1658405014.976027][4236:4241] CHIP:TOO: Targets: null + [1658405014.976052][4236:4241] CHIP:TOO: FabricIndex: 1 + [1658405014.976075][4236:4241] CHIP:TOO: } + [1658405014.976100][4236:4241] CHIP:TOO: AdminFabricIndex: 1 + [1658405014.976124][4236:4241] CHIP:TOO: } + [1658405014.976188][4236:4241] CHIP:DMG: MoveToState ReadClient[0xffffa4008e30]: Moving to [AwaitingSu] + + By sending the command mentioned below, change attribute values on DUT to create events multiple times. + + accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 1, "authMode": 3, "subjects": [111,222,333,444], "targets": [{"cluster":11 , "endpoint":22, "deviceType": null}]}, {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets": [{"cluster": 55, "endpoint": 66, "deviceType":null }]}]' 1 0 + + On TH Verify that each event record is assigned a number that is exactly 1 greater than the last created event record on that Node. + + [1658405515.109232][4236:4241] CHIP:DMG: } + [1658405515.109475][4236:4241] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1658405515.109503][4236:4241] CHIP:TOO: Event number: 3 + [1658405515.109529][4236:4241] CHIP:TOO: Priority: Info + [1658405515.109555][4236:4241] CHIP:TOO: Timestamp: 24557931 + [1658405515.109621][4236:4241] CHIP:TOO: AccessControlEntryChanged: { + [1658405515.109654][4236:4241] CHIP:TOO: AdminNodeID: 112233 + [1658405515.109682][4236:4241] CHIP:TOO: AdminPasscodeID: null + [1658405515.109710][4236:4241] CHIP:TOO: ChangeType: 2 + [1658405515.109736][4236:4241] CHIP:TOO: LatestValue: { + [1658405515.109762][4236:4241] CHIP:TOO: Privilege: 5 + [1658405515.109788][4236:4241] CHIP:TOO: AuthMode: 2 + [1658405515.109819][4236:4241] CHIP:TOO: Subjects: 1 entries + [1658405515.109852][4236:4241] CHIP:TOO: [1]: 112233 + [1658405515.109881][4236:4241] CHIP:TOO: Targets: null + [1658405515.109907][4236:4241] CHIP:TOO: FabricIndex: 1 + [1658405515.109933][4236:4241] CHIP:TOO: } + [1658405515.109960][4236:4241] CHIP:TOO: AdminFabricIndex: 1 + [1658405515.109985][4236:4241] CHIP:TOO: } + [1658405515.110118][4236:4241] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1658405515.110146][4236:4241] CHIP:TOO: Event number: 4 + [1658405515.110171][4236:4241] CHIP:TOO: Priority: Info + [1658405515.110196][4236:4241] CHIP:TOO: Timestamp: 24557933 + [1658405515.110240][4236:4241] CHIP:TOO: AccessControlEntryChanged: { + [1658405515.110269][4236:4241] CHIP:TOO: AdminNodeID: 112233 + [1658405515.110296][4236:4241] CHIP:TOO: AdminPasscodeID: null + [1658405515.110322][4236:4241] CHIP:TOO: ChangeType: 1 + [1658405515.110348][4236:4241] CHIP:TOO: LatestValue: { + [1658405515.110373][4236:4241] CHIP:TOO: Privilege: 5 + [1658405515.110399][4236:4241] CHIP:TOO: AuthMode: 2 + [1658405515.110427][4236:4241] CHIP:TOO: Subjects: 1 entries + [1658405515.110457][4236:4241] CHIP:TOO: [1]: 112233 + [1658405515.110485][4236:4241] CHIP:TOO: Targets: null + [1658405515.110511][4236:4241] CHIP:TOO: FabricIndex: 1 + [1658405515.110536][4236:4241] CHIP:TOO: } + [1658405515.110562][4236:4241] CHIP:TOO: AdminFabricIndex: 1 + [1658405515.110587][4236:4241] CHIP:TOO: } + [1658405515.110735][4236:4241] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1658405515.110762][4236:4241] CHIP:TOO: Event number: 5 + [1658405515.110788][4236:4241] CHIP:TOO: Priority: Info + [1658405515.110813][4236:4241] CHIP:TOO: Timestamp: 24557935 + [1658405515.110861][4236:4241] CHIP:TOO: AccessControlEntryChanged: { + [1658405515.110890][4236:4241] CHIP:TOO: AdminNodeID: 112233 + [1658405515.110917][4236:4241] CHIP:TOO: AdminPasscodeID: null + [1658405515.110943][4236:4241] CHIP:TOO: ChangeType: 1 + [1658405515.110969][4236:4241] CHIP:TOO: LatestValue: { + [1658405515.110994][4236:4241] CHIP:TOO: Privilege: 1 + [1658405515.111020][4236:4241] CHIP:TOO: AuthMode: 3 + [1658405515.111050][4236:4241] CHIP:TOO: Subjects: 4 entries + [1658405515.111080][4236:4241] CHIP:TOO: [1]: 111 + [1658405515.111109][4236:4241] CHIP:TOO: [2]: 222 + [1658405515.111137][4236:4241] CHIP:TOO: [3]: 333 + [1658405515.111166][4236:4241] CHIP:TOO: [4]: 444 + [1658405515.111198][4236:4241] CHIP:TOO: Targets: 1 entries + [1658405515.111240][4236:4241] CHIP:TOO: [1]: { + [1658405515.111268][4236:4241] CHIP:TOO: Cluster: 11 + [1658405515.111296][4236:4241] CHIP:TOO: Endpoint: 22 + [1658405515.111322][4236:4241] CHIP:TOO: DeviceType: null + [1658405515.111348][4236:4241] CHIP:TOO: } + [1658405515.111376][4236:4241] CHIP:TOO: FabricIndex: 1 + [1658405515.111402][4236:4241] CHIP:TOO: } + [1658405515.111428][4236:4241] CHIP:TOO: AdminFabricIndex: 1 + [1658405515.111453][4236:4241] CHIP:TOO: } + [1658405515.111600][4236:4241] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1658405515.111628][4236:4241] CHIP:TOO: Event number: 6 + [1658405515.111653][4236:4241] CHIP:TOO: Priority: Info + [1658405515.111678][4236:4241] CHIP:TOO: Timestamp: 24557937 + [1658405515.111726][4236:4241] CHIP:TOO: AccessControlEntryChanged: { + [1658405515.111755][4236:4241] CHIP:TOO: AdminNodeID: 112233 + [1658405515.111781][4236:4241] CHIP:TOO: AdminPasscodeID: null + [1658405515.111807][4236:4241] CHIP:TOO: ChangeType: 1 + [1658405515.111833][4236:4241] CHIP:TOO: LatestValue: { + [1658405515.111859][4236:4241] CHIP:TOO: Privilege: 3 + [1658405515.111884][4236:4241] CHIP:TOO: AuthMode: 3 + [1658405515.111914][4236:4241] CHIP:TOO: Subjects: 4 entries + [1658405515.111944][4236:4241] CHIP:TOO: [1]: 555 + [1658405515.111973][4236:4241] CHIP:TOO: [2]: 666 + [1658405515.112002][4236:4241] CHIP:TOO: [3]: 777 + [1658405515.112030][4236:4241] CHIP:TOO: [4]: 888 + [1658405515.112063][4236:4241] CHIP:TOO: Targets: 1 entries + [1658405515.112097][4236:4241] CHIP:TOO: [1]: { + [1658405515.112125][4236:4241] CHIP:TOO: Cluster: 55 + [1658405515.112151][4236:4241] CHIP:TOO: Endpoint: 66 + [1658405515.112177][4236:4241] CHIP:TOO: DeviceType: null + [1658405515.112203][4236:4241] CHIP:TOO: } + [1658405515.112231][4236:4241] CHIP:TOO: FabricIndex: 1 + [1658405515.112257][4236:4241] CHIP:TOO: } + [1658405515.112283][4236:4241] CHIP:TOO: AdminFabricIndex: 1 + [1658405515.112308][4236:4241] CHIP:TOO: } + [1658405515.112462][4236:4241] CHIP:DMG: Refresh LivenessCheckTime for 525000 milliseconds with SubscriptionId = 0x0a5a629c Peer = 01:0000000000000001 + + After this test step you need to factory reset the DUT and reprovision the DUT again, and re-subscribe the events to continue to change attribute values on DUT to create events multiple times disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_6_3.yaml b/src/app/tests/suites/certification/Test_TC_IDM_6_3.yaml index 1ce970e0ad4f63..44bb587c90dc6e 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_6_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_6_3.yaml @@ -25,9 +25,12 @@ tests: verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + + Please run this test in chip tool interactive mode ./chip-tool interactive start + sudo ./chip-tool any read-event-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF - On TH verify that Read Request Message received has these fields EventRequests, EventFilters, and FabricFiltered. + On TH(Reference app) verify that Read Request Message received has these fields EventRequests, EventFilters, and FabricFiltered. diff --git a/src/app/tests/suites/certification/Test_TC_IDM_6_4.yaml b/src/app/tests/suites/certification/Test_TC_IDM_6_4.yaml index 1ba94a0351a97c..b9e12087952bcf 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_6_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_6_4.yaml @@ -27,6 +27,9 @@ tests: "DUT sends Subscribe Request Message to the TH for a supported event." verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + + Please run this test in chip tool interactive mode ./chip-tool interactive start + basic subscribe-event start-up 10 100 1 0 On TH (On the reference app), On reference app verify that the subscription message received has the all fields which mentioned in expected outcome @@ -57,6 +60,49 @@ tests: [1657455555.195593][11525:11525] CHIP:DMG: Final negotiated min/max parameters: Min = 10s, Max = 100s [1657455555.195766][11525:11525] CHIP:DMG: IM RH moving to [GeneratingReports] [1657455555.195955][11525:11525] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + + On DUT as a client side, verify that TH all-clusters-app sent ReportDataMessage + + [1657886501.456822][3430:3435] CHIP:DMG: ReportDataMessage = + [1657886501.456851][3430:3435] CHIP:DMG: { + [1657886501.456886][3430:3435] CHIP:DMG: SubscriptionId = 0xb746e9ed, + [1657886501.456911][3430:3435] CHIP:DMG: EventReportIBs = + [1657886501.456944][3430:3435] CHIP:DMG: [ + [1657886501.456979][3430:3435] CHIP:DMG: EventReportIB = + [1657886501.457015][3430:3435] CHIP:DMG: { + [1657886501.457049][3430:3435] CHIP:DMG: EventDataIB = + [1657886501.457091][3430:3435] CHIP:DMG: { + [1657886501.457118][3430:3435] CHIP:DMG: EventPath = + [1657886501.457162][3430:3435] CHIP:DMG: { + [1657886501.457199][3430:3435] CHIP:DMG: Endpoint = 0x0, + [1657886501.457245][3430:3435] CHIP:DMG: Cluster = 0x28, + [1657886501.457288][3430:3435] CHIP:DMG: Event = 0x0, + [1657886501.457329][3430:3435] CHIP:DMG: }, + [1657886501.457365][3430:3435] CHIP:DMG: + [1657886501.457404][3430:3435] CHIP:DMG: EventNumber = 0x0, + [1657886501.457437][3430:3435] CHIP:DMG: PriorityLevel = 0x2, + [1657886501.457479][3430:3435] CHIP:DMG: SystemTimestamp = 0xa1de6f, + [1657886501.457519][3430:3435] CHIP:DMG: EventData = + [1657886501.457584][3430:3435] CHIP:DMG: { + [1657886501.457632][3430:3435] CHIP:DMG: 0x0 = 1, + [1657886501.457666][3430:3435] CHIP:DMG: }, + [1657886501.457696][3430:3435] CHIP:DMG: }, + [1657886501.457738][3430:3435] CHIP:DMG: + [1657886501.457766][3430:3435] CHIP:DMG: }, + [1657886501.457806][3430:3435] CHIP:DMG: + [1657886501.457830][3430:3435] CHIP:DMG: ], + [1657886501.457873][3430:3435] CHIP:DMG: + [1657886501.457897][3430:3435] CHIP:DMG: InteractionModelRevision = 1 + [1657886501.457929][3430:3435] CHIP:DMG: } + [1657886501.458091][3430:3435] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Event 0x0000_0000 + [1657886501.458116][3430:3435] CHIP:TOO: Event number: 0 + [1657886501.458139][3430:3435] CHIP:TOO: Priority: Critical + [1657886501.458160][3430:3435] CHIP:TOO: Timestamp: 10608239 + [1657886501.458237][3430:3435] CHIP:TOO: StartUp: { + [1657886501.458284][3430:3435] CHIP:TOO: SoftwareVersion: 1 + [1657886501.458309][3430:3435] CHIP:TOO: } + [1657886501.458358][3430:3435] CHIP:DMG: MoveToState ReadClient[0xffff6c0091f0]: Moving to [AwaitingSu] + [1657886501.458420][3430:3435] CHIP:EM: Piggybacking Ack for MessageCounter:245754654 on exchange: 20326i disabled: true - label: @@ -65,6 +111,8 @@ tests: verification: | The cluster used in the below command is an example, User can use any supported chip cluster. + Please run this test in chip tool interactive mode ./chip-tool interactive start + basic subscribe-event-by-id 0x000 20 400 1 0 Verify DUT is responsds with status response for the data sent in the above command On TH (On the reference app) @@ -77,6 +125,32 @@ tests: [1657455691.695574][11525:11525] CHIP:DMG: } [1657455691.695600][11525:11525] CHIP:IM: Received status response, status is 0x00 (SUCCESS) [1657455691.695643][11525:11525] CHIP:DMG: Refresh Subscribe Sync Timer with max 400 seconds + + On DUT as a client side, verify that TH all-clusters-app sent ReportDataMessage + + [1657886532.588762][3430:3435] CHIP:DMG: } + [1657886532.588882][3430:3435] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Event 0x0000_0000 + [1657886532.588908][3430:3435] CHIP:TOO: Event number: 0 + [1657886532.588930][3430:3435] CHIP:TOO: Priority: Critical + [1657886532.588952][3430:3435] CHIP:TOO: Timestamp: 10608239 + [1657886532.588986][3430:3435] CHIP:TOO: StartUp: { + [1657886532.589013][3430:3435] CHIP:TOO: SoftwareVersion: 1 + [1657886532.589036][3430:3435] CHIP:TOO: } + [1657886532.589085][3430:3435] CHIP:DMG: MoveToState ReadClient[0xffff6c0092e0]: Moving to [AwaitingSu] + [1657886532.589143][3430:3435] CHIP:EM: Piggybacking Ack for MessageCounter:245754656 on exchange: 20327i + [1657886532.589207][3430:3435] CHIP:IN: Prepared secure message 0xaaab13395548 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 20327i with MessageCounter:216322285. + [1657886532.589245][3430:3435] CHIP:IN: Sending encrypted msg 0xaaab13395548 with MessageCounter:216322285 to 0x0000000000000001 (1) at monotonic time: 00000000008CF0C5 msec + [1657886532.590633][3430:3435] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:245754657 on exchange 20327i + [1657886532.590669][3430:3435] CHIP:EM: Found matching exchange: 20327i, Delegate: 0xffff6c0092e0 + [1657886532.590700][3430:3435] CHIP:EM: Rxd Ack; Removing MessageCounter:216322285 from Retrans Table on exchange 20327i + [1657886532.590726][3430:3435] CHIP:EM: Removed CHIP MessageCounter:216322285 from RetransTable on exchange 20327i + [1657886532.590772][3430:3435] CHIP:DMG: SubscribeResponseMessage = + [1657886532.590811][3430:3435] CHIP:DMG: { + [1657886532.590836][3430:3435] CHIP:DMG: SubscriptionId = 0x84d07a37, + [1657886532.590862][3430:3435] CHIP:DMG: MaxInterval = 0x190, + [1657886532.590887][3430:3435] CHIP:DMG: InteractionModelRevision = 1 + [1657886532.590910][3430:3435] CHIP:DMG: } + [1657886532.590935][3430:3435] CHIP:DMG: Subscription established with SubscriptionID = 0x84d07a37 MinInterval = 20s MaxInterval = 400s Peer = 01:0000000000000001 disabled: true - label: @@ -84,6 +158,7 @@ tests: with Report Data message to DUT." verification: | This is not testable in normal scenario, and needs to be tested as part of Unit test. + https://github.com/CHIP-Specifications/chip-test-plans/issues/1885 disabled: true - label: @@ -92,6 +167,7 @@ tests: not respond with Subscribe Response message to DUT." verification: | This is not testable in normal scenario, and needs to be tested as part of Unit test. + https://github.com/CHIP-Specifications/chip-test-plans/issues/1885 disabled: true - label: @@ -99,6 +175,7 @@ tests: Data message to DUT with an inactive SubscriptionId." verification: | This is not testable in normal scenario, and needs to be tested as part of Unit test. + https://github.com/CHIP-Specifications/chip-test-plans/issues/1885 disabled: true - label: @@ -107,4 +184,5 @@ tests: Data." verification: | This is not testable in normal scenario, and needs to be tested as part of Unit test. + https://github.com/CHIP-Specifications/chip-test-plans/issues/1885 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_7_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_7_1.yaml index 5c8ffe96cbdcfa..df77dc9aa46c5e 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_7_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_7_1.yaml @@ -29,6 +29,9 @@ tests: the attributes that have been subscribed or trigger an action on the DUT to generate an event." verification: | + Please run this test in chip tool interactive mode ./chip-tool interactive start + + Send 3 Subscriptionrequest message from each Reference Device(Eg. RD1...) to DUT and verify all the subscription requests are succes, and change the value of all the attributes by sending write command, after sending write commanfd @@ -639,6 +642,8 @@ tests: contain 3 different paths. The subscription request from RD1 should contain 4 paths." verification: | + Please run this test in chip tool interactive mode ./chip-tool interactive start + Send 3 Subscriptionrequest message from each Reference Device(Eg. RD1...) to DUT and verify all the subscription requests are succes. and in The subscription request from RD1 should contain 4 paths, Verify that the subscriptions from RD2, RD3, RD4 and RD5 are not affected. @@ -981,6 +986,8 @@ tests: Requests are activated, RD1 sends 6 subscription request messages with each of them having 3 different paths." verification: | + Please run this test in chip tool interactive mode ./chip-tool interactive start + Send 3 Subscriptionrequest message from each Reference Device(Eg. RD1...) to DUT and verify all the subscription requests are succes. and in The subscription request from RD1 should contain 6 paths, Verify that the subscriptions from RD2, RD3, RD4 and @@ -988,9 +995,6 @@ tests: Example commands given below are using 3 reference device (User can use 5 reference device and send the below command in from each reference device) - on the first reference deice enter: - - on the first reference deice enter: levelcontrol subscribe min-level 10 100 1 1 @@ -1427,12 +1431,15 @@ tests: Subscription Requests are activated, send a Subscribe request messages having 3 different paths from RD1A to the DUT." verification: | + Please run this test in chip tool interactive mode ./chip-tool interactive start + Send 3 Subscriptionrequest message from each Reference Device(Eg. RD1...) to DUT and verify all the subscription requests are succes, then send a Subscribe request messages having 3 different paths from RD1A to the DUT. Example commands given below are using 3 reference device (User can use 5 reference device and send the below command in from each reference device) + on the 1st reference deice enter: onoff subscribe start-up-on-off 10 100 1 1 [1657716965.736576][6034:6039] CHIP:EM: Removed CHIP MessageCounter:12313969 from RetransTable on exchange 50225i @@ -1608,237 +1615,6 @@ tests: [1657716911.281338][6034:6039] CHIP:DMG: { [1657716911.281408][6034:6039] CHIP:DMG: AttributeDataIB = [1657716911.281487][6034:6039] CHIP:DMG: { - on the first reference deice enter: - - levelcontrol subscribe min-level 10 100 1 1 - [1657717758.176398][6034:6039] CHIP:DMG: ReportDataMessage = - [1657717758.176466][6034:6039] CHIP:DMG: { - [1657717758.176545][6034:6039] CHIP:DMG: SubscriptionId = 0xbf960b6c, - [1657717758.176619][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657717758.176698][6034:6039] CHIP:DMG: [ - [1657717758.176750][6034:6039] CHIP:DMG: AttributeReportIB = - [1657717758.176818][6034:6039] CHIP:DMG: { - [1657717758.176872][6034:6039] CHIP:DMG: AttributeDataIB = - [1657717758.176959][6034:6039] CHIP:DMG: { - [1657717758.177034][6034:6039] CHIP:DMG: DataVersion = 0x319eedab, - [1657717758.177136][6034:6039] CHIP:DMG: AttributePathIB = - [1657717758.177206][6034:6039] CHIP:DMG: { - [1657717758.177269][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657717758.177377][6034:6039] CHIP:DMG: Cluster = 0x8, - [1657717758.177429][6034:6039] CHIP:DMG: Attribute = 0x0000_0002, - [1657717758.177488][6034:6039] CHIP:DMG: } - [1657717758.177551][6034:6039] CHIP:DMG: - [1657717758.177600][6034:6039] CHIP:DMG: Data = 1, - [1657717758.177655][6034:6039] CHIP:DMG: }, - [1657717758.177716][6034:6039] CHIP:DMG: - [1657717758.177755][6034:6039] CHIP:DMG: }, - [1657717758.177813][6034:6039] CHIP:DMG: - [1657717758.177850][6034:6039] CHIP:DMG: ], - [1657717758.177896][6034:6039] CHIP:DMG: - [1657717758.177933][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657717758.177969][6034:6039] CHIP:DMG: } - [1657717758.178105][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0002 DataVersion: 832499115 - [1657717758.178156][6034:6039] CHIP:TOO: min level: 1 - [1657717758.178215][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c004100]: Moving to [AwaitingSu] - - - - onoff subscribe global-scene-control 10 100 1 1 - [1657717721.303602][6034:6039] CHIP:DMG: ReportDataMessage = - [1657717721.303670][6034:6039] CHIP:DMG: { - [1657717721.303730][6034:6039] CHIP:DMG: SubscriptionId = 0x2b768ffd, - [1657717721.303791][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657717721.303867][6034:6039] CHIP:DMG: [ - [1657717721.303928][6034:6039] CHIP:DMG: AttributeReportIB = - [1657717721.304007][6034:6039] CHIP:DMG: { - [1657717721.304071][6034:6039] CHIP:DMG: AttributeDataIB = - [1657717721.304149][6034:6039] CHIP:DMG: { - [1657717721.304225][6034:6039] CHIP:DMG: DataVersion = 0x734a2d85, - [1657717721.304297][6034:6039] CHIP:DMG: AttributePathIB = - [1657717721.304372][6034:6039] CHIP:DMG: { - [1657717721.304454][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657717721.304542][6034:6039] CHIP:DMG: Cluster = 0x6, - [1657717721.304628][6034:6039] CHIP:DMG: Attribute = 0x0000_4000, - [1657717721.304711][6034:6039] CHIP:DMG: } - [1657717721.304797][6034:6039] CHIP:DMG: - [1657717721.304881][6034:6039] CHIP:DMG: Data = true, - [1657717721.304958][6034:6039] CHIP:DMG: }, - [1657717721.305039][6034:6039] CHIP:DMG: - [1657717721.305102][6034:6039] CHIP:DMG: }, - [1657717721.305178][6034:6039] CHIP:DMG: - [1657717721.305238][6034:6039] CHIP:DMG: ], - [1657717721.305348][6034:6039] CHIP:DMG: - [1657717721.305412][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657717721.305470][6034:6039] CHIP:DMG: } - [1657717721.305679][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4000 DataVersion: 1934241157 - [1657717721.305761][6034:6039] CHIP:TOO: GlobalSceneControl: TRUE - [1657717721.305849][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c0092b0]: Moving to [AwaitingSu] - - - temperaturemeasurement subscribe tolerance 10 100 1 1 - [1657717893.368431][6034:6039] CHIP:DMG: ReportDataMessage = - [1657717893.368514][6034:6039] CHIP:DMG: { - [1657717893.368562][6034:6039] CHIP:DMG: SubscriptionId = 0x87e778d7, - [1657717893.368649][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657717893.368744][6034:6039] CHIP:DMG: [ - [1657717893.368837][6034:6039] CHIP:DMG: AttributeReportIB = - [1657717893.368943][6034:6039] CHIP:DMG: { - [1657717893.369046][6034:6039] CHIP:DMG: AttributeDataIB = - [1657717893.369138][6034:6039] CHIP:DMG: { - [1657717893.369231][6034:6039] CHIP:DMG: DataVersion = 0x8ca282b3, - [1657717893.369359][6034:6039] CHIP:DMG: AttributePathIB = - [1657717893.369461][6034:6039] CHIP:DMG: { - [1657717893.369563][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657717893.369674][6034:6039] CHIP:DMG: Cluster = 0x402, - [1657717893.369786][6034:6039] CHIP:DMG: Attribute = 0x0000_0003, - [1657717893.369896][6034:6039] CHIP:DMG: } - [1657717893.370000][6034:6039] CHIP:DMG: - [1657717893.370094][6034:6039] CHIP:DMG: Data = 0, - [1657717893.370192][6034:6039] CHIP:DMG: }, - [1657717893.370284][6034:6039] CHIP:DMG: - [1657717893.370359][6034:6039] CHIP:DMG: }, - [1657717893.370439][6034:6039] CHIP:DMG: - [1657717893.370504][6034:6039] CHIP:DMG: ], - [1657717893.370575][6034:6039] CHIP:DMG: - [1657717893.370630][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657717893.370699][6034:6039] CHIP:DMG: } - [1657717893.370819][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0402 Attribute 0x0000_0003 DataVersion: 2359460531 - [1657717893.370888][6034:6039] CHIP:TOO: Tolerance: 0 - [1657717893.370929][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c0092b0]: Moving to [AwaitingSu] - - - - - - any subscribe-by-id 0x0008 0x0010 10 100 1 1 - - [1657716563.242433][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716563.242475][6034:6039] CHIP:DMG: { - [1657716563.242507][6034:6039] CHIP:DMG: SubscriptionId = 0xebc26cc4, - [1657716563.242538][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716563.242577][6034:6039] CHIP:DMG: [ - [1657716563.242607][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716563.242648][6034:6039] CHIP:DMG: { - [1657716563.242680][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716563.242721][6034:6039] CHIP:DMG: { - [1657716563.242762][6034:6039] CHIP:DMG: DataVersion = 0x319eedab, - [1657716563.242801][6034:6039] CHIP:DMG: AttributePathIB = - [1657716563.242842][6034:6039] CHIP:DMG: { - [1657716563.242883][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716563.242928][6034:6039] CHIP:DMG: Cluster = 0x8, - [1657716563.242971][6034:6039] CHIP:DMG: Attribute = 0x0000_0010, - [1657716563.243012][6034:6039] CHIP:DMG: } - [1657716563.243056][6034:6039] CHIP:DMG: - [1657716563.243100][6034:6039] CHIP:DMG: Data = 1, - [1657716563.243138][6034:6039] CHIP:DMG: }, - [1657716563.243179][6034:6039] CHIP:DMG: - [1657716563.243213][6034:6039] CHIP:DMG: }, - [1657716563.243251][6034:6039] CHIP:DMG: - [1657716563.243280][6034:6039] CHIP:DMG: ], - [1657716563.243318][6034:6039] CHIP:DMG: - [1657716563.243348][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716563.243377][6034:6039] CHIP:DMG: } - [1657716563.243531][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0010 DataVersion: 832499115 - [1657716563.243601][6034:6039] CHIP:TOO: on off transition time: 1 - [1657716563.243648][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008e30]: Moving to [AwaitingSu] - - - - basic subscribe node-label 10 100 1 0 - [1657716599.928585][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716599.928652][6034:6039] CHIP:DMG: { - [1657716599.928825][6034:6039] CHIP:DMG: SubscriptionId = 0x3d9f1c1, - [1657716599.928890][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716599.928968][6034:6039] CHIP:DMG: [ - [1657716599.929029][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716599.929122][6034:6039] CHIP:DMG: { - [1657716599.929192][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716599.929278][6034:6039] CHIP:DMG: { - [1657716599.929399][6034:6039] CHIP:DMG: DataVersion = 0x1b93dc36, - [1657716599.929476][6034:6039] CHIP:DMG: AttributePathIB = - [1657716599.929687][6034:6039] CHIP:DMG: { - [1657716599.929774][6034:6039] CHIP:DMG: Endpoint = 0x0, - [1657716599.929861][6034:6039] CHIP:DMG: Cluster = 0x28, - [1657716599.929949][6034:6039] CHIP:DMG: Attribute = 0x0000_0005, - [1657716599.930031][6034:6039] CHIP:DMG: } - [1657716599.930115][6034:6039] CHIP:DMG: - [1657716599.930285][6034:6039] CHIP:DMG: Data = "1", - [1657716599.930370][6034:6039] CHIP:DMG: }, - [1657716599.930454][6034:6039] CHIP:DMG: - [1657716599.930578][6034:6039] CHIP:DMG: }, - [1657716599.930660][6034:6039] CHIP:DMG: - [1657716599.930720][6034:6039] CHIP:DMG: ], - [1657716599.930796][6034:6039] CHIP:DMG: - [1657716599.930856][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716599.930914][6034:6039] CHIP:DMG: } - [1657716599.931131][6034:6039] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 462674998 - [1657716599.931326][6034:6039] CHIP:TOO: NodeLabel: 1 - [1657716599.931420][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008f20]: Moving to [AwaitingSu] - - onoff subscribe on-time 10 100 1 1 - [1657716634.400468][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716634.400499][6034:6039] CHIP:DMG: { - [1657716634.400525][6034:6039] CHIP:DMG: SubscriptionId = 0xf9b815a2, - [1657716634.400551][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716634.400585][6034:6039] CHIP:DMG: [ - [1657716634.400610][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716634.400647][6034:6039] CHIP:DMG: { - [1657716634.400674][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716634.400705][6034:6039] CHIP:DMG: { - [1657716634.400739][6034:6039] CHIP:DMG: DataVersion = 0x734a2d85, - [1657716634.400775][6034:6039] CHIP:DMG: AttributePathIB = - [1657716634.400809][6034:6039] CHIP:DMG: { - [1657716634.400847][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716634.400883][6034:6039] CHIP:DMG: Cluster = 0x6, - [1657716634.400920][6034:6039] CHIP:DMG: Attribute = 0x0000_4001, - [1657716634.400950][6034:6039] CHIP:DMG: } - [1657716634.400987][6034:6039] CHIP:DMG: - [1657716634.401024][6034:6039] CHIP:DMG: Data = 1, - [1657716634.401058][6034:6039] CHIP:DMG: }, - [1657716634.401092][6034:6039] CHIP:DMG: - [1657716634.401117][6034:6039] CHIP:DMG: }, - [1657716634.401148][6034:6039] CHIP:DMG: - [1657716634.401172][6034:6039] CHIP:DMG: ], - [1657716634.401202][6034:6039] CHIP:DMG: - [1657716634.401227][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716634.401250][6034:6039] CHIP:DMG: } - [1657716634.401383][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 1934241157 - [1657716634.401428][6034:6039] CHIP:TOO: OnTime: 1 - [1657716634.401466][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008c70]: Moving to [AwaitingSu] - - - levelcontrol subscribe on-level 10 100 1 1 - [1657716667.237484][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716667.237515][6034:6039] CHIP:DMG: { - [1657716667.237541][6034:6039] CHIP:DMG: SubscriptionId = 0xe457240d, - [1657716667.237571][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716667.237738][6034:6039] CHIP:DMG: [ - [1657716667.237768][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716667.237819][6034:6039] CHIP:DMG: { - [1657716667.237850][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716667.237897][6034:6039] CHIP:DMG: { - [1657716667.237944][6034:6039] CHIP:DMG: DataVersion = 0x319eedab, - [1657716667.237993][6034:6039] CHIP:DMG: AttributePathIB = - [1657716667.238044][6034:6039] CHIP:DMG: { - [1657716667.238094][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716667.238145][6034:6039] CHIP:DMG: Cluster = 0x8, - [1657716667.238196][6034:6039] CHIP:DMG: Attribute = 0x0000_0011, - [1657716667.238244][6034:6039] CHIP:DMG: } - [1657716667.238294][6034:6039] CHIP:DMG: - [1657716667.238345][6034:6039] CHIP:DMG: Data = 1, - [1657716667.238391][6034:6039] CHIP:DMG: }, - [1657716667.238437][6034:6039] CHIP:DMG: - [1657716667.238467][6034:6039] CHIP:DMG: }, - [1657716667.238509][6034:6039] CHIP:DMG: - [1657716667.238535][6034:6039] CHIP:DMG: ], - [1657716667.238567][6034:6039] CHIP:DMG: - [1657716667.238591][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716667.238614][6034:6039] CHIP:DMG: } - [1657716667.238709][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0011 DataVersion: 832499115 - [1657716667.238752][6034:6039] CHIP:TOO: on level: 1 - [1657716667.238790][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c0092b0]: Moving to [AwaitingSu] - - [1657716911.281570][6034:6039] CHIP:DMG: DataVersion = 0x319eedab, [1657716911.281649][6034:6039] CHIP:DMG: AttributePathIB = [1657716911.281723][6034:6039] CHIP:DMG: { @@ -1861,7 +1637,6 @@ tests: [1657716911.283172][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008f20]: Moving to [AwaitingSu] - on the 3rd reference deice enter: levelcontrol subscribe min-level 10 100 1 1 @@ -1963,7 +1738,8 @@ tests: - After all above mentioned subscription are activated send below mentioned command in 1st reference device + After all above mentioned subscription are activated send below mentioned command in 4th reference device which is having same same fabric as 1st reference device + any subscribe-by-id 0x0008 0x0010 10 100 1 1 [1657716563.242433][6034:6039] CHIP:DMG: ReportDataMessage = @@ -2059,36 +1835,4 @@ tests: [1657716634.401383][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 1934241157 [1657716634.401428][6034:6039] CHIP:TOO: OnTime: 1 [1657716634.401466][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c008c70]: Moving to [AwaitingSu] - - - levelcontrol subscribe on-level 10 100 1 1 - [1657716667.237484][6034:6039] CHIP:DMG: ReportDataMessage = - [1657716667.237515][6034:6039] CHIP:DMG: { - [1657716667.237541][6034:6039] CHIP:DMG: SubscriptionId = 0xe457240d, - [1657716667.237571][6034:6039] CHIP:DMG: AttributeReportIBs = - [1657716667.237738][6034:6039] CHIP:DMG: [ - [1657716667.237768][6034:6039] CHIP:DMG: AttributeReportIB = - [1657716667.237819][6034:6039] CHIP:DMG: { - [1657716667.237850][6034:6039] CHIP:DMG: AttributeDataIB = - [1657716667.237897][6034:6039] CHIP:DMG: { - [1657716667.237944][6034:6039] CHIP:DMG: DataVersion = 0x319eedab, - [1657716667.237993][6034:6039] CHIP:DMG: AttributePathIB = - [1657716667.238044][6034:6039] CHIP:DMG: { - [1657716667.238094][6034:6039] CHIP:DMG: Endpoint = 0x1, - [1657716667.238145][6034:6039] CHIP:DMG: Cluster = 0x8, - [1657716667.238196][6034:6039] CHIP:DMG: Attribute = 0x0000_0011, - [1657716667.238244][6034:6039] CHIP:DMG: } - [1657716667.238294][6034:6039] CHIP:DMG: - [1657716667.238345][6034:6039] CHIP:DMG: Data = 1, - [1657716667.238391][6034:6039] CHIP:DMG: }, - [1657716667.238437][6034:6039] CHIP:DMG: - [1657716667.238467][6034:6039] CHIP:DMG: }, - [1657716667.238509][6034:6039] CHIP:DMG: - [1657716667.238535][6034:6039] CHIP:DMG: ], - [1657716667.238567][6034:6039] CHIP:DMG: - [1657716667.238591][6034:6039] CHIP:DMG: InteractionModelRevision = 1 - [1657716667.238614][6034:6039] CHIP:DMG: } - [1657716667.238709][6034:6039] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0011 DataVersion: 832499115 - [1657716667.238752][6034:6039] CHIP:TOO: on level: 1 - [1657716667.238790][6034:6039] CHIP:DMG: MoveToState ReadClient[0xffff8c0092b0]: Moving to [AwaitingSu] disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_8_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_8_1.yaml index 9e2fed69ccd143..47465af39f617e 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_8_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_8_1.yaml @@ -26,8 +26,11 @@ tests: attribute, which is a fabric scoped list, from the DUT. Fabric filtered should be set to false." verification: | - ./chip-tool accesscontrol read acl 1 0 --fabric-filtered 0 + On RC1 and RC2, Verify that the number of entries returned by the DUT for both the reads are same.By sending below commands + + ./chip-tool accesscontrol read acl 1 0 --fabric-filtered 0 + On RC1, verify that the number of entries [1657779742.905642][2620:2625] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 4140182590 [1657779742.905736][2620:2625] CHIP:TOO: ACL: 2 entries [1657779742.905794][2620:2625] CHIP:TOO: [1]: { @@ -50,7 +53,7 @@ tests: ./chip-tool accesscontrol read acl 2 0 --fabric-filtered 0 - + On RC2, verify that the number of entries [1657777306.528148][2474:2479] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 3942609879 [1657777306.529101][2474:2479] CHIP:TOO: ACL: 2 entries [1657777306.529144][2474:2479] CHIP:TOO: [1]: { @@ -80,8 +83,10 @@ tests: fabric-filtered Read Request Message from each of RC1 and RC2 to read the fabric scoped list from the DUT." verification: | - ./chip-tool accesscontrol read acl 1 0 --commissioner-name beta + By sending the command mentioned below, change attribute values on DUT to create events multiple times.Send a fabric-filtered Read Request Message from each of RC1 and RC2 + ./chip-tool accesscontrol read acl 1 0 --commissioner-name beta + On RC1, verify that acl atrribute reading an entries from DUT [1657781757.866389][2878:2883] CHIP:DMG: } [1657781757.866649][2878:2883] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 4140182590 [1657781757.866722][2878:2883] CHIP:TOO: ACL: 1 entries @@ -97,6 +102,7 @@ tests: ./chip-tool accesscontrol read acl 2 0 --commissioner-name gamma + On RC2, verify that acl atrribute reading an entries from DUT [1657781810.474993][2821:2826] CHIP:DMG: } [1657781810.475304][2821:2826] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 4140182590 [1657781810.475389][2821:2826] CHIP:TOO: ACL: 1 entries @@ -111,7 +117,12 @@ tests: [1657781810.475763][2821:2826] CHIP:EM: Sending Standalone Ack for MessageCounter:227198602 on exchange 37948i + From RC1 send a Write Request message to the DUT to write to an entry in the fabric scoped list associated with its own fabric. + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 --commissioner-name beta + + On RC1, Verify that DUT responds as success + [1657782547.448455][2974:2979] CHIP:DMG: WriteResponseMessage = [1657782547.448486][2974:2979] CHIP:DMG: { [1657782547.448513][2974:2979] CHIP:DMG: AttributeStatusIBs = @@ -157,11 +168,10 @@ tests: - - + Send a fabric-filtered Read Request Message from each of RC1 and RC2 to read the fabric scoped list from the DUT. ./chip-tool accesscontrol read acl 2 0 --fabric-filtered 0 --commissioner-name gamma - + On RC2, Verify that the data received from DUT is same as the data received in first read request [1657782203.827787][2957:2962] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 4140182592 [1657782203.827866][2957:2962] CHIP:TOO: ACL: 2 entries [1657782203.827914][2957:2962] CHIP:TOO: [1]: { @@ -183,8 +193,10 @@ tests: ./chip-tool accesscontrol read acl 1 0 --commissioner-name beta - [1657782688.737945][2996:3001] CHIP:DMG: SuppressResponse = true, - [1657782688.737974][2996:3001] CHIP:DMG: InteractionModelRevision = 1 + + On RC1, Verify that DUT responds as UNSUPPORTED_ACCESS + [1657782688.737945][2996:3001] CHIP:DMG: SuppressResponse = true, + [1657782688.737974][2996:3001] CHIP:DMG: InteractionModelRevision = 1 [1657782688.737999][2996:3001] CHIP:DMG: } [1657782688.738108][2996:3001] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) [1657782688.738197][2996:3001] CHIP:EM: Sending Standalone Ack for MessageCounter:110177776 on exchange 22939i @@ -198,7 +210,10 @@ tests: non-filtered Read Request Message from RC1 and RC2 to read the fabric scoped list from the DUT.' verification: | + Send a Read Request Message to the DUT from RC1 and RC2 to read the fabric scoped list "Fabrics" from OperationalCredentialsCluster. Fabric filtered should be set to false. + ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 --commissioner-name beta + [1657780124.975404][2664:2669] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 1307873919 [1657780124.975642][2664:2669] CHIP:TOO: Fabrics: 2 entries [1657780124.975710][2664:2669] CHIP:TOO: [1]: { @@ -330,7 +345,30 @@ tests: whose value is a list of structs which contain some fabric-sensitive data. Modify attribute1 on the DUT." verification: | - + Please run this test in chip tool interactive mode ./chip-tool interactive start + + + operationalcredentials subscribe nocs 10 100 1 0 + + [1657802879.008816][4548:4553] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0000 DataVersion: 567747175 + [1657802879.008927][4548:4553] CHIP:TOO: NOCs: 1 entries + [1657802879.009017][4548:4553] CHIP:TOO: [1]: { + [1657802879.009105][4548:4553] CHIP:TOO: Noc: 1530010101240201370324130118260480228127260580254D3A37062415012411011824070124080130094104EA61A44385992E365092182D59E3DAF164D2B2F1818B071779A8A0C8832720B52691E4100925D0427C7643BDB43D4ECBCF3D740B0DA0D5E00517143E88676E87370A350128011824020136030402040118300414668A31137585F054F68F571251E644FECF98BEEB3005142179BF06A074A00549577FF0F68071038C6019A118300B407E6F0AFEFAF6EA93D8F39B077C97F175B9C417E37816F229C39D2A36F46576E52787E4610075270222053BFDDE853F06EF52F5C4BCC1102A25F089AFA675200418 + [1657802879.009203][4548:4553] CHIP:TOO: Icac: 1530010100240201370324140018260480228127260580254D3A37062413011824070124080130094104E02FFF23357C6B135568AA3E456204672E5BDDF5B68B1A9B39E670E56B9982298B1BBEEBD9F3723C2B58944A11ACD9B2CD8DE7C94DC6FEEFA67E2CBF0A8CCDBC370A35012901182402603004142179BF06A074A00549577FF0F68071038C6019A130051474B77548C9D04E936F951F0775C7AE9F88AF9FA318300B405AB8763179CF1E865E20E19F81E1286EF7B9D417BDC85D536406230816A438EDB48E946D5821FE54D97D1C337505AA6DEC1746C884344A769F63E9DC8318186918 + [1657802879.009273][4548:4553] CHIP:TOO: FabricIndex: 1 + [1657802879.009329][4548:4553] CHIP:TOO: } + [1657802879.009426][4548:4553] CHIP:DMG: MoveToState ReadClient[0xffff7c008e40]: Moving to [AwaitingSu] + + operationalcredentials subscribe nocs 10 100 2 0 --commissioner-name beta + [1657803363.013803][5522:5527] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0000 DataVersion: 567747179 + [1657803363.013897][5522:5527] CHIP:TOO: NOCs: 1 entries + [1657803363.013971][5522:5527] CHIP:TOO: [1]: { + [1657803363.014015][5522:5527] CHIP:TOO: Noc: 1530010101240201370324130118260480228127260580254D3A37062415022411021824070124080130094104CBB7ECF6D0E5814461597F9EA23B2616F55CA3144225CAFDFA651E88C0C6E79B6E02A734F61F8DA0D0A286C9C6E3C786680E8419C505F07DF431D86F7D900A10370A350128011824020136030402040118300414FE58E8B6E61BD3B492E81DF99EC967B0C26BF711300514A75280F34A91D76EA45936672A84D498FB1D67B418300B40175ECC1BA10A4F90D408468F4E212534B74537AE0178B22E05DBD14048748AD50CB7C5324FFE28356E7D37717384EA500B9B6423D12E64D3B825C4E72CCE199918 + [1657803363.014077][5522:5527] CHIP:TOO: Icac: 1530010100240201370324140018260480228127260580254D3A3706241301182407012408013009410434E10386BC3B08489513C394AC3EFB2151EEAEFC929D157586DD31838D79A2FCED41CCB036D312EBBC879504CA7C5889E447E1F602141F9C9531D6A3178A0B91370A3501290118240260300414A75280F34A91D76EA45936672A84D498FB1D67B43005144DC5ED208AA1EEC31D5C5A52F95EAC45FE6AFA0D18300B40702DEDF1A21987C4675D53F050024AC51BE975CCAC09BC6398522FF337E023AA20185E9D68D7CA22A26B937FD4A9644015AF75EAAB2F43E8415E17F698A48CEA18 + [1657803363.014113][5522:5527] CHIP:TOO: FabricIndex: 2 + [1657803363.014141][5522:5527] CHIP:TOO: } + [1657803363.014189][5522:5527] CHIP:DMG: MoveToState ReadClient[0xffff6c008e70]: Moving to [AwaitingSu] + [1657803363.014248][5522:5527] CHIP:EM: Piggybacking Ack for MessageCounter:84457338 on exchange: 56555i disabled: true - label: @@ -339,7 +377,115 @@ tests: same Event1 which is fabric sensitive. Trigger Event1 on DUT on the fabric where RC1 is present." verification: | - + Please run this test in chip tool interactive mode ./chip-tool interactive start + + + Activate the subscription between RC1 and DUT for an Event1 which is fabric sensitive + accesscontrol subscribe-event access-control-entry-changed 20 500 1 0 + + + [1657887424.932830][3496:3501] CHIP:DMG: } + [1657887424.933020][3496:3501] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1657887424.933049][3496:3501] CHIP:TOO: Event number: 1 + [1657887424.933075][3496:3501] CHIP:TOO: Priority: Info + [1657887424.933100][3496:3501] CHIP:TOO: Timestamp: 10640831 + [1657887424.933204][3496:3501] CHIP:TOO: AccessControlEntryChanged: { + [1657887424.933247][3496:3501] CHIP:TOO: AdminNodeID: null + [1657887424.933287][3496:3501] CHIP:TOO: AdminPasscodeID: 0 + [1657887424.933315][3496:3501] CHIP:TOO: ChangeType: 1 + [1657887424.933342][3496:3501] CHIP:TOO: LatestValue: { + [1657887424.933368][3496:3501] CHIP:TOO: Privilege: 5 + [1657887424.933395][3496:3501] CHIP:TOO: AuthMode: 2 + [1657887424.933426][3496:3501] CHIP:TOO: Subjects: 1 entries + [1657887424.933460][3496:3501] CHIP:TOO: [1]: 112233 + [1657887424.933489][3496:3501] CHIP:TOO: Targets: null + [1657887424.933515][3496:3501] CHIP:TOO: FabricIndex: 1 + [1657887424.933541][3496:3501] CHIP:TOO: } + [1657887424.933567][3496:3501] CHIP:TOO: AdminFabricIndex: 1 + [1657887424.933593][3496:3501] CHIP:TOO: } + [1657887424.933661][3496:3501] CHIP:DMG: MoveToState ReadClient[0xffff940091f0]: Moving to [AwaitingSu] + [1657887424.933717][3496:3501] CHIP:EM: Piggybacking Ack for MessageCounter:100554100 on exchange: 44633i + + + accesscontrol subscribe-event access-control-entry-changed 20 700 2 0 --commissioner-name beta + [1657887441.417553][2862:2867] CHIP:DMG: } + [1657887441.417766][2862:2867] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1657887441.417796][2862:2867] CHIP:TOO: Event number: 2 + [1657887441.417822][2862:2867] CHIP:TOO: Priority: Info + [1657887441.417849][2862:2867] CHIP:TOO: Timestamp: 13545202 + [1657887441.417964][2862:2867] CHIP:TOO: AccessControlEntryChanged: { + [1657887441.418020][2862:2867] CHIP:TOO: AdminNodeID: null + [1657887441.418061][2862:2867] CHIP:TOO: AdminPasscodeID: 0 + [1657887441.418090][2862:2867] CHIP:TOO: ChangeType: 1 + [1657887441.418128][2862:2867] CHIP:TOO: LatestValue: { + [1657887441.418156][2862:2867] CHIP:TOO: Privilege: 5 + [1657887441.418193][2862:2867] CHIP:TOO: AuthMode: 2 + [1657887441.418228][2862:2867] CHIP:TOO: Subjects: 1 entries + [1657887441.418273][2862:2867] CHIP:TOO: [1]: 112233 + [1657887441.418305][2862:2867] CHIP:TOO: Targets: null + [1657887441.418344][2862:2867] CHIP:TOO: FabricIndex: 2 + [1657887441.418371][2862:2867] CHIP:TOO: } + [1657887441.418409][2862:2867] CHIP:TOO: AdminFabricIndex: 2 + [1657887441.418436][2862:2867] CHIP:TOO: } + [1657887441.418517][2862:2867] CHIP:DMG: MoveToState ReadClient[0xffff74009260]: Moving to [AwaitingSu] + [1657887441.418591][2862:2867] CHIP:EM: Piggybacking Ack for MessageCounter:217452290 on exchange: 44658i + + + accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets":[{ "cluster": 3, "endpoint": 1, "deviceType": null }]}]' 1 0 + [1658231022.614323][2305:2310] CHIP:DMG: } + [1658231022.614489][2305:2310] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) + [1658231022.614598][2305:2310] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) + [1658231022.614699][2305:2310] CHIP:TOO: Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) + [1658231022.614795][2305:2310] CHIP:DMG: MoveToState ReadClient[0xffff88008e70]: Moving to [AwaitingSu] + [1658231022.614873][2305:2310] CHIP:EM: Piggybacking Ack for MessageCounter:177580574 on exchange: 34289i + [1658231022.614987][2305:2310] CHIP:IN: Prepared secure message 0xffff880057e8 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 34289i with MessageCounter:134890885. + [1658231022.615047][2305:2310] CHIP:IN: Sending encrypted msg 0xffff880057e8 with MessageCounter:134890885 to 0x0000000000000001 (1) at monotonic time: 00000000000C7D98 msec + [1658231022.616881][2305:2310] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:177580575 on exchange 34289i + [1658231022.616932][2305:2310] CHIP:EM: Found matching exchange: 34289i, Delegate: 0xffff88008e70 + [1658231022.616983][2305:2310] CHIP:EM: Rxd Ack; Removing MessageCounter:134890885 from Retrans Table on exchange 34289i + [1658231022.617023][2305:2310] CHIP:EM: Removed CHIP MessageCounter:134890885 from RetransTable on exchange 34289i + [1658231022.617085][2305:2310] CHIP:DMG: SubscribeResponseMessage = + [1658231022.617129][2305:2310] CHIP:DMG: { + [1658231022.617169][2305:2310] CHIP:DMG: SubscriptionId = 0x1cf72de7, + [1658231022.617214][2305:2310] CHIP:DMG: MaxInterval = 0x1f4, + [1658231022.617257][2305:2310] CHIP:DMG: InteractionModelRevision = 1 + [1658231022.617297][2305:2310] CHIP:DMG: } + [1658231022.617340][2305:2310] CHIP:DMG: Subscription established with SubscriptionID = 0x1cf72de7 MinInterval = 20s MaxInterval = 500s Peer = 01:0000000000000001 + + + [1658231053.511709][10291:10296] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 + [1658231053.511772][10291:10296] CHIP:TOO: Event number: 3 + [1658231053.511828][10291:10296] CHIP:TOO: Priority: Info + [1658231053.511879][10291:10296] CHIP:TOO: Timestamp: 386270 + [1658231053.511997][10291:10296] CHIP:TOO: AccessControlEntryChanged: { + [1658231053.512038][10291:10296] CHIP:TOO: AdminNodeID: null + [1658231053.512076][10291:10296] CHIP:TOO: AdminPasscodeID: 0 + [1658231053.512183][10291:10296] CHIP:TOO: ChangeType: 1 + [1658231053.512222][10291:10296] CHIP:TOO: LatestValue: { + [1658231053.512256][10291:10296] CHIP:TOO: Privilege: 5 + [1658231053.512291][10291:10296] CHIP:TOO: AuthMode: 2 + [1658231053.512333][10291:10296] CHIP:TOO: Subjects: 1 entries + [1658231053.512376][10291:10296] CHIP:TOO: [1]: 112233 + [1658231053.512415][10291:10296] CHIP:TOO: Targets: null + [1658231053.512450][10291:10296] CHIP:TOO: FabricIndex: 2 + [1658231053.512484][10291:10296] CHIP:TOO: } + [1658231053.512519][10291:10296] CHIP:TOO: AdminFabricIndex: 2 + [1658231053.512553][10291:10296] CHIP:TOO: } + [1658231053.512642][10291:10296] CHIP:DMG: MoveToState ReadClient[0xffff98009000]: Moving to [AwaitingSu] + [1658231053.512715][10291:10296] CHIP:EM: Piggybacking Ack for MessageCounter:36331302 on exchange: 58513i + [1658231053.512799][10291:10296] CHIP:IN: Prepared secure message 0xaaaac4ba0828 to 0x0000000000000002 (2) of type 0x1 and protocolId (0, 1) on exchange 58513i with MessageCounter:160830417. + [1658231053.512853][10291:10296] CHIP:IN: Sending encrypted msg 0xaaaac4ba0828 with MessageCounter:160830417 to 0x0000000000000002 (2) at monotonic time: 0000000001A6A793 msec + [1658231053.514813][10291:10296] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:36331303 on exchange 58513i + [1658231053.514863][10291:10296] CHIP:EM: Found matching exchange: 58513i, Delegate: 0xffff98009000 + [1658231053.514909][10291:10296] CHIP:EM: Rxd Ack; Removing MessageCounter:160830417 from Retrans Table on exchange 58513i + [1658231053.514946][10291:10296] CHIP:EM: Removed CHIP MessageCounter:160830417 from RetransTable on exchange 58513i + [1658231053.515006][10291:10296] CHIP:DMG: SubscribeResponseMessage = + [1658231053.515046][10291:10296] CHIP:DMG: { + [1658231053.515082][10291:10296] CHIP:DMG: SubscriptionId = 0x8260b5, + [1658231053.515121][10291:10296] CHIP:DMG: MaxInterval = 0x2bc, + [1658231053.515160][10291:10296] CHIP:DMG: InteractionModelRevision = 1 + [1658231053.515195][10291:10296] CHIP:DMG: } + [1658231053.515235][10291:10296] CHIP:DMG: Subscription established with SubscriptionID = 0x008260b5 MinInterval = 20s MaxInterval = 700s Peer = 02:0000000000000002 disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml index b5c7f29532ce5d..66e4cf05eb1f44 100644 --- a/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 3 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -42,7 +42,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_ILL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_ILL_2_1.yaml index 1d209e6a774514..4f6348cde9a247 100644 --- a/src/app/tests/suites/certification/Test_TC_ILL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ILL_2_1.yaml @@ -34,7 +34,7 @@ tests: attribute: "MeasuredValue" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65534 @@ -44,7 +44,7 @@ tests: attribute: "MinMeasuredValue" response: constraints: - type: uint16 + type: int16u minValue: 1 maxValue: 65533 @@ -54,7 +54,7 @@ tests: attribute: "MaxMeasuredValue" response: constraints: - type: uint16 + type: int16u minValue: 2 maxValue: 65534 @@ -64,7 +64,7 @@ tests: attribute: "Tolerance" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 2048 diff --git a/src/app/tests/suites/certification/Test_TC_ILL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_ILL_2_2.yaml index 9d49bf8beaf9f1..1f025a4a4593c3 100644 --- a/src/app/tests/suites/certification/Test_TC_ILL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_ILL_2_2.yaml @@ -32,17 +32,15 @@ tests: MaxMeasuredValue attribute from DUT." PICS: ILL.S.A0001 && ILL.S.A0002 verification: | - Verify in TH Log - - - ./chip-tool illuminancemeasurement read min-measured-value 1 1 - + ./chip-tool illuminancemeasurement read min-measured-value 1 1 + On TH verify that value for MinMeasuredValue attribute [1650881571.375482][2777:2782] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0400 Attribute 0x0000_0001 DataVersion: 1034665079 [1650881571.375596][2777:2782] CHIP:TOO: MinMeasuredValue: 1 ./chip-tool illuminancemeasurement read max-measured-value 1 1 - + On TH verify that value for MaxMeasuredValue attribute [1650881715.935533][2791:2797] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0400 Attribute 0x0000_0002 DataVersion: 1034665079 + Verify in TH Log [1650881715.935645][2791:2797] CHIP:TOO: MaxMeasuredValue: 65534 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_I_1_1.yaml b/src/app/tests/suites/certification/Test_TC_I_1_1.yaml index 2d5c16e3e89b9f..ba3faef871404c 100644 --- a/src/app/tests/suites/certification/Test_TC_I_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_I_1_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 4 constraints: - type: uint16 + type: int16u - label: "TH reads the FeatureMap attribute from the DUT" PICS: " !I.S.F00 " @@ -43,7 +43,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "TH reads the FeatureMap attribute from the DUT" PICS: I.S.F00 @@ -52,7 +52,7 @@ tests: response: value: 1 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" @@ -63,22 +63,21 @@ tests: contains: [0, 1, 65528, 65529, 65531, 65532, 65533] - label: "Read the global attribute: AcceptedCommandList" - PICS: I.C.C40.Tx command: "readAttribute" attribute: "AcceptedCommandList" response: constraints: type: list - contains: [0, 64] + contains: [0] - - label: "Read the global attribute: AcceptedCommandList" - PICS: " !I.C.C40.Tx " + - label: "Read the optional command(TriggerEffect) in AcceptedCommandList" + PICS: I.C.C40.Tx command: "readAttribute" attribute: "AcceptedCommandList" response: constraints: type: list - contains: [0] + contains: [64] - label: "Read the optional attribute(IdentifyQuery) in AcceptedCommandList" PICS: I.C.C01.Tx @@ -90,20 +89,21 @@ tests: contains: [1] - label: "Read the global attribute: GeneratedCommandList" - PICS: I.S.C00.Tx command: "readAttribute" attribute: "GeneratedCommandList" response: - value: [0] + value: [] constraints: type: list - - label: "Read the global attribute: GeneratedCommandList" - PICS: " !I.S.C00.Tx " + - label: + "Read the optional attribute(IdentifyQueryResponse) in + GeneratedCommandList" + PICS: I.S.C00.Tx command: "readAttribute" attribute: "GeneratedCommandList" response: - value: [] + value: [0] constraints: type: list diff --git a/src/app/tests/suites/certification/Test_TC_I_2_1.yaml b/src/app/tests/suites/certification/Test_TC_I_2_1.yaml index d34a86313d7fdf..695e0ba4b057cc 100644 --- a/src/app/tests/suites/certification/Test_TC_I_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_I_2_1.yaml @@ -33,7 +33,7 @@ tests: attribute: "identify time" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 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 2326a6c0f11b62..0f9a7c4105b788 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 @@ -39,14 +39,14 @@ tests: - name: "IdentifyTime" value: 60 - - label: "TH reads immediately IdentifyTime attribute from DUT1" + - label: "TH reads immediately IdentifyTime attribute from DUT" PICS: I.S.A0000 command: "readAttribute" attribute: "identify time" response: constraints: - minValue: 55 - maxValue: 65 + minValue: 51 + maxValue: 69 - label: "Wait 10000ms" cluster: "DelayCommands" @@ -62,8 +62,8 @@ tests: attribute: "identify time" response: constraints: - minValue: 45 - maxValue: 55 + minValue: 43 + maxValue: 57 - label: "TH sends IdentifyQuery command to DUT and Verify @@ -73,7 +73,7 @@ tests: IdentifyQuery is not supported by Matter cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && I.S.C01.Rsp && I.S.C00.Tx arguments: values: - name: "message" @@ -91,7 +91,7 @@ tests: - name: "IdentifyTime" value: 0 - - label: "TH reads immediately IdentifyTime attribute from DUT2" + - label: "TH reads immediately IdentifyTime attribute from DUT" PICS: I.S.A0000 command: "readAttribute" attribute: "identify time" @@ -104,7 +104,7 @@ tests: IdentifyQuery is not supported by Matter cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && I.S.C01.Rsp && I.S.C00.Tx arguments: values: - name: "message" diff --git a/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_1_2.yaml b/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_1_2.yaml index 7d7aa0e979a0e8..aa7df448634208 100644 --- a/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_1_2.yaml @@ -36,7 +36,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" PICS: KEYPADINPUT.S.NV || KEYPADINPUT.S.LK || KEYPADINPUT.S.NK @@ -44,7 +44,7 @@ tests: attribute: "FeatureMap" response: constraints: - type: map32 + type: bitmap32 minValue: 0 maxValue: 7 diff --git a/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_3_2.yaml b/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_3_2.yaml index 34634381342c21..7b532f34c1b37e 100644 --- a/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_3_2.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 19.3.1. [TC-KEYPADINPUT-3.1] Send Key Command Verification (DUT as Client) +name: 19.3.2. [TC-KEYPADINPUT-3.2] Location Keys Verification config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_LOWPOWER_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LOWPOWER_1_1.yaml index c9bb5e1803c760..7232c912e86270 100644 --- a/src/app/tests/suites/certification/Test_TC_LOWPOWER_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LOWPOWER_1_1.yaml @@ -36,7 +36,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -44,7 +44,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_LTIME_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LTIME_1_1.yaml index 89ef7500f882a3..21a4137aea55d0 100644 --- a/src/app/tests/suites/certification/Test_TC_LTIME_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LTIME_1_1.yaml @@ -13,7 +13,7 @@ # 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: 109.1.1. [TC-LTIME-1.1] Global Attributes [DUT as Client] +name: 4.1.1. [TC-LTIME-1.1] Global Attributes [DUT as Client] config: nodeId: 0x12344321 @@ -21,11 +21,15 @@ config: endpoint: 0 tests: - - label: "DUT reads from the TH the (0xFFFD) ClusterRevision attribute" + - label: "Commission DUT to TH" verification: | - Verify in TH all-clusters-app + disabled: true + + - label: "DUT reads from the TH the (0xFFFD) ClusterRevision attribute" + verification: | ./chip-tool timeformatlocalization read cluster-revision 1 0 + Verify in DUT as client side: verify that TH sends ClusterRevision attribute value as 1 [1651185991606] [10988:109915] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFD DataVersion: 3316530441 [1651185991606] [10988:109915] CHIP: [TOO] ClusterRevision: 1 @@ -33,18 +37,18 @@ tests: - label: "DUT reads from the TH the (0xFFFC) FeatureMap attribute" verification: | - Verify in TH all-clusters-app - ./chip-tool timeformatlocalization read feature-map 1 0 + + Verify in DUT as client side: verify that TH sends FeatureMap attribute value as 1 + [1653379129.497852][7509:7514] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFC DataVersion: 724978222 [1653379129.497936][7509:7514] CHIP:TOO: FeatureMap: 0 disabled: true - label: "DUT reads from the TH the (0xFFFB) AttributeList attribute" verification: | - Verify in TH all-clusters-app - ./chip-tool timeformatlocalization read attribute-list 1 0 + Verify in DUT as client side: verify that TH sends a list of supported attributes [1653999139.214139][7477:7482] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFB DataVersion: 3201720795 [1653999139.214208][7477:7482] CHIP:TOO: AttributeList: 8 entries [1653999139.214241][7477:7482] CHIP:TOO: [1]: 0 @@ -65,18 +69,17 @@ tests: - label: "DUT reads from the TH the (0xFFF9) AcceptedCommandList attribute" verification: | - Verify in TH all-clusters-app - ./chip-tool timeformatlocalization read accepted-command-list 1 0 + Verify in DUT as client side: verify that TH responsds as list of Accepted Command as 0 entries. + [1651186189564] [11076:112595] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFF9 DataVersion: 3316530441 [1651186189564] [11076:112595] CHIP: [TOO] AcceptedCommandList: 0 entries disabled: true - label: "DUT reads from the TH the (0xFFF8) GeneratedCommandList attribute" verification: | - Verify in TH all-clusters-app - ./chip-tool timeformatlocalization read generated-command-list 1 0 + Verify in DUT as client side: verify that TH responsds as list of GeneratedCommandList as 0 entries. [1651191789962] [13591:180646] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFF8 DataVersion: 3316530441 [1651191789963] [13591:180646] CHIP: [TOO] GeneratedCommandList: 0 entries disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml b/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml index f51f52db956c96..e123e5433af78f 100644 --- a/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml @@ -28,9 +28,8 @@ tests: - label: "TH reads from the DUT the (0xFFFD) ClusterRevision attribute" verification: | - Verify in TH log: - ./chip-tool timeformatlocalization read cluster-revision 1 0 + On TH, verify that DUT sends ClusterRevision attribute value as 1 [1651185991606] [10988:109915] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFD DataVersion: 3316530441 [1651185991606] [10988:109915] CHIP: [TOO] ClusterRevision: 1 @@ -38,10 +37,10 @@ tests: - label: "TH reads from the DUT the (0xFFFC) FeatureMap attribute" verification: | - Verify in TH log: - ./chip-tool timeformatlocalization read feature-map 1 0 + On TH, verify that DUT sends FeatureMap attribute value as 1 + [1653400472.682259][11385:11390] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFC DataVersion: 4156010624 [1653400472.682314][11385:11390] CHIP:TOO: FeatureMap: 0 [1653400472.682416][11385:11390] CHIP:EM: Sending Standalone Ack for MessageCounter:10442089 on exchange 10027i @@ -49,9 +48,11 @@ tests: - label: "TH reads from the DUT the (0xFFFB) AttributeList attribute" verification: | - Verify in TH log: - ./chip-tool timeformatlocalization read attribute-list 1 0 + + + On TH, verify that DUT sends a list of supported attributes + [1653999139.214139][7477:7482] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFB DataVersion: 3201720795 [1653999139.214208][7477:7482] CHIP:TOO: AttributeList: 8 entries [1653999139.214241][7477:7482] CHIP:TOO: [1]: 0 @@ -72,18 +73,21 @@ tests: - label: "TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute" verification: | - Verify in TH log: - ./chip-tool timeformatlocalization read accepted-command-list 1 0 + + On TH, verify that DUT responsds as list of Accepted Command as 0 entries. + [1651186189564] [11076:112595] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFF9 DataVersion: 3316530441 [1651186189564] [11076:112595] CHIP: [TOO] AcceptedCommandList: 0 entries disabled: true - label: "TH reads from the DUT the (0xFFF8) GeneratedCommandList attribute" verification: | - Verify in TH log: - ./chip-tool timeformatlocalization read generated-command-list 1 0 + + + On TH, verify that DUT responsds as list of GeneratedCommandList as 0 entries. + [1651191789962] [13591:180646] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFF8 DataVersion: 3316530441 [1651191789963] [13591:180646] CHIP: [TOO] GeneratedCommandList: 0 entries disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LTIME_2_1.yaml b/src/app/tests/suites/certification/Test_TC_LTIME_2_1.yaml index 9463ccca25630f..97286a7ad5d096 100644 --- a/src/app/tests/suites/certification/Test_TC_LTIME_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LTIME_2_1.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 109.2.1. [TC-LTIME-2.1] Read and Write Time Format Localization Cluster + 110.2.1. [TC-LTIME-2.1] Read and Write Time Format Localization Cluster Attributes [DUT as Client] config: @@ -26,9 +26,8 @@ tests: - label: "DUT reads HourFormat attribute from TH" PICS: LTIME.C.A0000 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read hour-format 1 0 + Verify in DUT as client side: Verify that the HourFormat attribute value [1657106866.828694][4891:4896] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0000 DataVersion: 2232855152 [1657106866.828763][4891:4896] CHIP:TOO: HourFormat: 0 @@ -37,9 +36,8 @@ tests: - label: "If (LTIME.C.A0000.12HR) DUT writes 0 to HourFormat attribute" PICS: LTIME.C.A0000.12HR verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write hour-format 0 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657106893.878113][4897:4902] CHIP:DMG: WriteResponseMessage = [1657106893.878138][4897:4902] CHIP:DMG: { @@ -71,9 +69,8 @@ tests: - label: "DUT reads HourFormat attribute" PICS: LTIME.C.A0000 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read hour-format 1 0 + Verify in DUT as client side: Verify that the HourFormat attribute value as 0 [1657106866.828694][4891:4896] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0000 DataVersion: 2232855152 [1657106866.828763][4891:4896] CHIP:TOO: HourFormat: 0 @@ -82,9 +79,8 @@ tests: - label: "If (LTIME.C.A0000.24HR) DUT writes 1 to HourFormat attribute" PICS: LTIME.C.A0000.24HR verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write hour-format 1 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657106989.102102][4907:4912] CHIP:DMG: WriteResponseMessage = [1657106989.102137][4907:4912] CHIP:DMG: { @@ -116,9 +112,8 @@ tests: - label: "DUT reads HourFormat attribute" PICS: LTIME.C.A0000 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read hour-format 1 0 + Verify in DUT as client side: Verify that HourFormat attribute value as 1 [1654605170.332304][7266:7271] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0000 DataVersion: 3185003975 [1654605170.332388][7266:7271] CHIP:TOO: HourFormat: 1 [1654605170.332493][7266:7271] CHIP:EM: Sending Standalone Ack for MessageCounter:6045450 on exchange 44106i @@ -127,9 +122,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute from DUT" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that the ActiveCalendarType attribute value [1657107039.005036][4917:4922] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855154 [1657107039.005112][4917:4922] CHIP:TOO: ActiveCalendarType: 0 @@ -138,9 +132,8 @@ tests: - label: "DUT reads SupportedCalendarTypes attribute from DUT" PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read supported-calendar-types 1 0 + Verify in DUT as client side: Verify that SupportedCalendarTypes attribute value [1657107056.982007][4924:4929] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0002 DataVersion: 2232855154 [1657107056.982095][4924:4929] CHIP:TOO: SupportedCalendarTypes: 12 entries @@ -161,11 +154,10 @@ tests: - label: "If (0 in LTIME.C.A0002.SCT) DUT writes 0 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write active-calendar-type 0 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657107074.760869][4932:4937] CHIP:DMG: WriteResponseMessage = [1657107074.760897][4932:4937] CHIP:DMG: { @@ -197,9 +189,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that the ActiveCalendarType attribute value as 0 [1657107039.005036][4917:4922] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855154 [1657107039.005112][4917:4922] CHIP:TOO: ActiveCalendarType: 0 @@ -208,11 +199,10 @@ tests: - label: "If (1 in LTIME.C.A0002.SCT) DUT writes 1 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write active-calendar-type 1 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657107238.274764][4949:4954] CHIP:DMG: WriteResponseMessage = [1657107238.274795][4949:4954] CHIP:DMG: { @@ -244,9 +234,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that the ActiveCalendarType attribute value as 1 [1657107039.005036][4917:4922] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855154 [1657107039.005112][4917:4922] CHIP:TOO: ActiveCalendarType: 1 @@ -255,11 +244,10 @@ tests: - label: "If (2 in LTIME.C.A0002.SCT) DUT writes 2 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write active-calendar-type 2 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657107378.279674][4960:4965] CHIP:DMG: WriteResponseMessage = [1657107378.279720][4960:4965] CHIP:DMG: { @@ -291,9 +279,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that the ActiveCalendarType attribute value as 2 [1657107404.774339][4968:4973] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855157 [1657107404.774453][4968:4973] CHIP:TOO: ActiveCalendarType: 2 @@ -302,11 +289,10 @@ tests: - label: "If (3 in LTIME.C.A0002.SCT) DUT writes 3 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write active-calendar-type 3 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657107432.589832][4975:4980] CHIP:DMG: WriteResponseMessage = [1657107432.589869][4975:4980] CHIP:DMG: { @@ -338,9 +324,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that ActiveCalendarType attribute value as 3 [1657107452.389424][4983:4988] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855158 [1657107452.389490][4983:4988] CHIP:TOO: ActiveCalendarType: 3 @@ -349,11 +334,10 @@ tests: - label: "If (4 in LTIME.C.A0002.SCT) DUT writes 4 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write active-calendar-type 4 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657107472.754436][4990:4996] CHIP:DMG: WriteResponseMessage = [1657107472.754462][4990:4996] CHIP:DMG: { @@ -385,9 +369,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that ActiveCalendarType attribute value as 4 [1657107496.925134][4997:5002] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855159 [1657107496.925199][4997:5002] CHIP:TOO: ActiveCalendarType: 4 @@ -396,11 +379,10 @@ tests: - label: "If (5 in LTIME.C.A0002.SCT) DUT writes 5 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write active-calendar-type 5 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657107518.977989][5005:5010] CHIP:DMG: WriteResponseMessage = [1657107518.978030][5005:5010] CHIP:DMG: { @@ -432,9 +414,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that ActiveCalendarType attribute value as 5 [1657107552.874504][5011:5016] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855160 [1657107552.874572][5011:5016] CHIP:TOO: ActiveCalendarType: 5 @@ -443,12 +424,10 @@ tests: - label: "If (6 in LTIME.C.A0002.SCT) DUT writes 6 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - - ./chip-tool timeformatlocalization write active-calendar-type 6 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657107711.004508][5030:5035] CHIP:DMG: WriteResponseMessage = [1657107711.004535][5030:5035] CHIP:DMG: { @@ -480,9 +459,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that ActiveCalendarType attribute value as 6 [1657107808.981214][5042:5047] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855162 [1657107808.981291][5042:5047] CHIP:TOO: ActiveCalendarType: 6 @@ -491,11 +469,10 @@ tests: - label: "If (7 in LTIME.C.A0002.SCT) DUT writes 7 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write active-calendar-type 7 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657107845.528814][5048:5053] CHIP:DMG: WriteResponseMessage = [1657107845.528843][5048:5053] CHIP:DMG: { @@ -527,9 +504,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that ActiveCalendarType attribute value as 7 [1657107867.321473][5055:5060] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855163 [1657107867.321550][5055:5060] CHIP:TOO: ActiveCalendarType: 7 @@ -538,11 +514,10 @@ tests: - label: "If (8 in LTIME.C.A0002.SCT) DUT writes 8 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write active-calendar-type 8 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657107895.609252][5062:5067] CHIP:DMG: WriteResponseMessage = [1657107895.609278][5062:5067] CHIP:DMG: { @@ -574,9 +549,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that ActiveCalendarType attribute value as 8 [1657107912.560322][5068:5073] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855164 [1657107912.560397][5068:5073] CHIP:TOO: ActiveCalendarType: 8 @@ -585,11 +559,10 @@ tests: - label: "If (9 in LTIME.C.A0002.SCT) DUT writes 9 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write active-calendar-type 9 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657107930.629239][5076:5081] CHIP:DMG: WriteResponseMessage = [1657107930.629265][5076:5081] CHIP:DMG: { @@ -621,9 +594,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that the ActiveCalendarType attribute value as 9 [1657107951.056785][5082:5087] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855165 [1657107951.056861][5082:5087] CHIP:TOO: ActiveCalendarType: 9 @@ -632,11 +604,10 @@ tests: - label: "If (10 in LTIME.C.A0002.SCT) DUT writes 10 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write active-calendar-type 10 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657107969.768286][5090:5095] CHIP:DMG: WriteResponseMessage = [1657107969.768313][5090:5095] CHIP:DMG: { @@ -668,9 +639,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that the ActiveCalendarType attribute value as 10 [1657107989.893985][5097:5102] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855166 [1657107989.894063][5097:5102] CHIP:TOO: ActiveCalendarType: 10 @@ -679,11 +649,10 @@ tests: - label: "If (11 in LTIME.C.A0002.SCT) DUT writes 11 to ActiveCalendarType attribute" - PICS: LTIME.C.A0002.SCT + PICS: LTIME.C.A0002 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization write active-calendar-type 11 1 0 + Verify in DUT as client side: verify that TH sends a success response [1657108006.545369][5103:5108] CHIP:DMG: WriteResponseMessage = [1657108006.545394][5103:5108] CHIP:DMG: { @@ -715,9 +684,8 @@ tests: - label: "DUT reads ActiveCalendarType attribute" PICS: LTIME.C.A0001 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool timeformatlocalization read active-calendar-type 1 0 + Verify in DUT as client side: Verify that ActiveCalendarType attribute value as 11 [1657108026.518564][5111:5116] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2232855167 [1657108026.518640][5111:5116] CHIP:TOO: ActiveCalendarType: 11 diff --git a/src/app/tests/suites/certification/Test_TC_LUNIT_2_1.yaml b/src/app/tests/suites/certification/Test_TC_LUNIT_2_1.yaml index 74ef77e3b0d6ba..89b29acacd22c5 100644 --- a/src/app/tests/suites/certification/Test_TC_LUNIT_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LUNIT_2_1.yaml @@ -26,143 +26,57 @@ tests: - label: "DUT reads TemperatureUnit attribute from TH" PICS: LUNIT.C.A0000 verification: | - verify on Reference app receives the right response for the data sent in the below commands - - ./chip-tool unitlocalization read temperature-unit 1 0 - - [1657108071.586424][5119:5124] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_0000 DataVersion: 4164031415 - [1657108071.586491][5119:5124] CHIP:TOO: TemperatureUnit: 0 - disabled: true - - - label: "DUT writes 0 to TemperatureUnit attribute" - PICS: LUNIT.C.A0000.Fahrenheit - verification: | - verify on Reference app receives the right response for the data sent in the below commands - - ./chip-tool unitlocalization write temperature-unit 0 1 0 - - [1657108113.524411][5127:5132] CHIP:DMG: WriteResponseMessage = - [1657108113.524437][5127:5132] CHIP:DMG: { - [1657108113.524460][5127:5132] CHIP:DMG: AttributeStatusIBs = - [1657108113.524497][5127:5132] CHIP:DMG: [ - [1657108113.524521][5127:5132] CHIP:DMG: AttributeStatusIB = - [1657108113.524551][5127:5132] CHIP:DMG: { - [1657108113.524579][5127:5132] CHIP:DMG: AttributePathIB = - [1657108113.524610][5127:5132] CHIP:DMG: { - [1657108113.524645][5127:5132] CHIP:DMG: Endpoint = 0x0, - [1657108113.524678][5127:5132] CHIP:DMG: Cluster = 0x2d, - [1657108113.524708][5127:5132] CHIP:DMG: Attribute = 0x0000_0000, - [1657108113.524739][5127:5132] CHIP:DMG: } - [1657108113.524771][5127:5132] CHIP:DMG: - [1657108113.524800][5127:5132] CHIP:DMG: StatusIB = - [1657108113.524831][5127:5132] CHIP:DMG: { - [1657108113.524862][5127:5132] CHIP:DMG: status = 0x00 (SUCCESS), - [1657108113.524895][5127:5132] CHIP:DMG: }, - [1657108113.524924][5127:5132] CHIP:DMG: - [1657108113.524951][5127:5132] CHIP:DMG: }, - [1657108113.524981][5127:5132] CHIP:DMG: - [1657108113.525005][5127:5132] CHIP:DMG: ], - [1657108113.525034][5127:5132] CHIP:DMG: - [1657108113.525058][5127:5132] CHIP:DMG: InteractionModelRevision = 1 - [1657108113.525081][5127:5132] CHIP:DMG: } - [1657108113.525148][5127:5132] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: "DUT reads TemperatureUnit attribute from TH" - PICS: LUNIT.C.A0000 - verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool unitlocalization read temperature-unit 1 0 - - [1657108071.586424][5119:5124] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_0000 DataVersion: 4164031415 - [1657108071.586491][5119:5124] CHIP:TOO: TemperatureUnit: 0 + Verify in DUT as client side: Verify that DUT reads TemperatureUnit attribute value is in the range 0 to 3 + [1658246774.701510][2262:2267] CHIP:DMG: } + [1658246774.701747][2262:2267] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_0000 DataVersion: 2312195207 + [1658246774.702985][2262:2267] CHIP:TOO: TemperatureUnit: 0 + [1658246774.703107][2262:2267] CHIP:EM: Sending Standalone Ack for MessageCounter:177086388 on exchange 32231i disabled: true - - label: "DUT writes 1 to TemperatureUnit attribute" - PICS: LUNIT.C.A0000.Celsius - verification: | - verify on Reference app receives the right response for the data sent in the below commands - - ./chip-tool unitlocalization write temperature-unit 1 1 0 - - [1657108163.429166][5149:5154] CHIP:DMG: WriteResponseMessage = - [1657108163.429205][5149:5154] CHIP:DMG: { - [1657108163.429228][5149:5154] CHIP:DMG: AttributeStatusIBs = - [1657108163.429259][5149:5154] CHIP:DMG: [ - [1657108163.429283][5149:5154] CHIP:DMG: AttributeStatusIB = - [1657108163.429310][5149:5154] CHIP:DMG: { - [1657108163.429335][5149:5154] CHIP:DMG: AttributePathIB = - [1657108163.429374][5149:5154] CHIP:DMG: { - [1657108163.429405][5149:5154] CHIP:DMG: Endpoint = 0x0, - [1657108163.429441][5149:5154] CHIP:DMG: Cluster = 0x2d, - [1657108163.429474][5149:5154] CHIP:DMG: Attribute = 0x0000_0000, - [1657108163.429505][5149:5154] CHIP:DMG: } - [1657108163.429539][5149:5154] CHIP:DMG: - [1657108163.429572][5149:5154] CHIP:DMG: StatusIB = - [1657108163.429606][5149:5154] CHIP:DMG: { - [1657108163.429637][5149:5154] CHIP:DMG: status = 0x00 (SUCCESS), - [1657108163.429671][5149:5154] CHIP:DMG: }, - [1657108163.429702][5149:5154] CHIP:DMG: - [1657108163.429728][5149:5154] CHIP:DMG: }, - [1657108163.429759][5149:5154] CHIP:DMG: - [1657108163.429782][5149:5154] CHIP:DMG: ], - [1657108163.429811][5149:5154] CHIP:DMG: - [1657108163.429834][5149:5154] CHIP:DMG: InteractionModelRevision = 1 - [1657108163.429857][5149:5154] CHIP:DMG: } - [1657108163.429923][5149:5154] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: "DUT reads TemperatureUnit attribute from TH" + - label: "DUT writes 3 to TemperatureUnit attribute on TH" PICS: LUNIT.C.A0000 verification: | - verify on Reference app receives the right response for the data sent in the below commands - - ./chip-tool unitlocalization read temperature-unit 1 0 - [1657108230.188723][5156:5161] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_0000 DataVersion: 4164031418 - [1657108230.188792][5156:5161] CHIP:TOO: TemperatureUnit: 1 - disabled: true - - - label: "DUT writes 2 to TemperatureUnit attribute" - PICS: LUNIT.C.A0000.Kelvin - verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool unitlocalization write temperature-unit 2 1 0 - - [1657108163.429166][5149:5154] CHIP:DMG: WriteResponseMessage = - [1657108163.429205][5149:5154] CHIP:DMG: { - [1657108163.429228][5149:5154] CHIP:DMG: AttributeStatusIBs = - [1657108163.429259][5149:5154] CHIP:DMG: [ - [1657108163.429283][5149:5154] CHIP:DMG: AttributeStatusIB = - [1657108163.429310][5149:5154] CHIP:DMG: { - [1657108163.429335][5149:5154] CHIP:DMG: AttributePathIB = - [1657108163.429374][5149:5154] CHIP:DMG: { - [1657108163.429405][5149:5154] CHIP:DMG: Endpoint = 0x0, - [1657108163.429441][5149:5154] CHIP:DMG: Cluster = 0x2d, - [1657108163.429474][5149:5154] CHIP:DMG: Attribute = 0x0000_0000, - [1657108163.429505][5149:5154] CHIP:DMG: } - [1657108163.429539][5149:5154] CHIP:DMG: - [1657108163.429572][5149:5154] CHIP:DMG: StatusIB = - [1657108163.429606][5149:5154] CHIP:DMG: { - [1657108163.429637][5149:5154] CHIP:DMG: status = 0x00 (SUCCESS), - [1657108163.429671][5149:5154] CHIP:DMG: }, - [1657108163.429702][5149:5154] CHIP:DMG: - [1657108163.429728][5149:5154] CHIP:DMG: }, - [1657108163.429759][5149:5154] CHIP:DMG: - [1657108163.429782][5149:5154] CHIP:DMG: ], - [1657108163.429811][5149:5154] CHIP:DMG: - [1657108163.429834][5149:5154] CHIP:DMG: InteractionModelRevision = 1 - [1657108163.429857][5149:5154] CHIP:DMG: } - [1657108163.429923][5149:5154] CHIP:DMG: WriteClient moving to [AwaitingDe] + ./chip-tool unitlocalization write temperature-unit 3 1 0 + Verify in DUT as client side: verify that DUT sends a success response + + [1658246841.988723][2274:2279] CHIP:DMG: WriteClient moving to [ResponseRe] + [1658246841.988793][2274:2279] CHIP:DMG: WriteResponseMessage = + [1658246841.988835][2274:2279] CHIP:DMG: { + [1658246841.988871][2274:2279] CHIP:DMG: AttributeStatusIBs = + [1658246841.988921][2274:2279] CHIP:DMG: [ + [1658246841.988960][2274:2279] CHIP:DMG: AttributeStatusIB = + [1658246841.989005][2274:2279] CHIP:DMG: { + [1658246841.989046][2274:2279] CHIP:DMG: AttributePathIB = + [1658246841.989102][2274:2279] CHIP:DMG: { + [1658246841.989153][2274:2279] CHIP:DMG: Endpoint = 0x0, + [1658246841.989208][2274:2279] CHIP:DMG: Cluster = 0x2d, + [1658246841.989261][2274:2279] CHIP:DMG: Attribute = 0x0000_0000, + [1658246841.989313][2274:2279] CHIP:DMG: } + [1658246841.989369][2274:2279] CHIP:DMG: + [1658246841.989418][2274:2279] CHIP:DMG: StatusIB = + [1658246841.989469][2274:2279] CHIP:DMG: { + [1658246841.989518][2274:2279] CHIP:DMG: status = 0x00 (SUCCESS), + [1658246841.989569][2274:2279] CHIP:DMG: }, + [1658246841.989620][2274:2279] CHIP:DMG: + [1658246841.989664][2274:2279] CHIP:DMG: }, + [1658246841.989712][2274:2279] CHIP:DMG: + [1658246841.989750][2274:2279] CHIP:DMG: ], + [1658246841.989797][2274:2279] CHIP:DMG: + [1658246841.989836][2274:2279] CHIP:DMG: InteractionModelRevision = 1 + [1658246841.989874][2274:2279] CHIP:DMG: } + [1658246841.990021][2274:2279] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1658246841.990103][2274:2279] CHIP:EM: Sending Standalone Ack for MessageCounter:83846292 on exchange 33799i disabled: true - label: "DUT reads TemperatureUnit attribute from TH" PICS: LUNIT.C.A0000 verification: | - verify on Reference app receives the right response for the data sent in the below commands - ./chip-tool unitlocalization read temperature-unit 1 0 + Verify in DUT as client side: Verify that DUT reads TemperatureUnit attribute value as 3 - [1657108230.188723][5156:5161] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_0000 DataVersion: 4164031418 - [1657108230.188792][5156:5161] CHIP:TOO: TemperatureUnit: 2 + [1658246890.082009][2283:2288] CHIP:DMG: } + [1658246890.082194][2283:2288] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_0000 DataVersion: 2312195208 + [1658246890.082278][2283:2288] CHIP:TOO: TemperatureUnit: 3 + [1658246890.082378][2283:2288] CHIP:EM: Sending Standalone Ack for MessageCounter:2721421 on exchange 29345i disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LUNIT_3_1.yaml b/src/app/tests/suites/certification/Test_TC_LUNIT_3_1.yaml index fe3bd7f1e55b46..51b0774a98f30f 100644 --- a/src/app/tests/suites/certification/Test_TC_LUNIT_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LUNIT_3_1.yaml @@ -37,7 +37,7 @@ tests: attribute: "TemperatureUnit" response: constraints: - type: uint8 + type: enum8 - label: "TH writes 0 (Fahrenheit) to TemperatureUnit attribute" PICS: LUNIT.C.A0000.Fahrenheit diff --git a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml index fa578cd9145de2..599a74ca31c732 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 5 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" PICS: LVL.S.F00 || LVL.S.F01 || LVL.S.F02 @@ -42,7 +42,7 @@ tests: attribute: "FeatureMap" response: constraints: - type: map32 + type: bitmap32 minValue: 0 maxValue: 7 @@ -131,22 +131,23 @@ tests: contains: [20] - label: "Read the global attribute: AcceptedCommandList" - PICS: LVL.S.F02 command: "readAttribute" attribute: "AcceptedCommandList" response: constraints: type: list - contains: [0, 1, 2, 3, 4, 5, 6, 7, 8] + contains: [0, 1, 2, 3, 4, 5, 6, 7] - - label: "Read the global attribute: AcceptedCommandList" - PICS: " !LVL.S.F02 " + - label: + "Read the Feature-dependent(LVL.S.F02) attribute in + AcceptedCommandList" + PICS: LVL.S.F02 command: "readAttribute" attribute: "AcceptedCommandList" response: constraints: type: list - contains: [0, 1, 2, 3, 4, 5, 6, 7] + contains: [8] - label: "Read the global attribute: GeneratedCommandList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml index 5a5cbfe3c5fb47..179ba1b5b9ecbb 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml @@ -35,7 +35,7 @@ tests: response: saveAs: CurrentLevelValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -45,7 +45,7 @@ tests: attribute: "remaining time" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -57,7 +57,7 @@ tests: value: 1 saveAs: MinLevelValue constraints: - type: uint8 + type: int8u - label: "Reads the MinLevel attribute" PICS: LVL.S.A0002 && !LVL.S.F01 @@ -66,7 +66,7 @@ tests: response: saveAs: MinLevelFeatureMapNotSupportedValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -78,7 +78,7 @@ tests: value: 254 saveAs: MaxLevelValue constraints: - type: uint8 + type: int8u minValue: MinLevelValue - label: "Reads the MaxLevel attribute" @@ -88,7 +88,7 @@ tests: response: saveAs: MaxLevelFeatureMapNotSupportedValue constraints: - type: uint8 + type: int8u minValue: MinLevelFeatureMapNotSupportedValue maxValue: 254 @@ -98,7 +98,7 @@ tests: attribute: "current level" response: constraints: - type: uint8 + type: int8u minValue: MinLevelValue maxValue: MaxLevelValue @@ -108,7 +108,7 @@ tests: attribute: "current level" response: constraints: - type: uint8 + type: int8u minValue: MinLevelFeatureMapNotSupportedValue maxValue: MaxLevelFeatureMapNotSupportedValue @@ -118,7 +118,7 @@ tests: attribute: "current frequency" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -129,7 +129,7 @@ tests: response: saveAs: MinFrequencyValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -140,7 +140,7 @@ tests: response: saveAs: MaxFrequencyValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -150,7 +150,7 @@ tests: attribute: "current frequency" response: constraints: - type: uint16 + type: int16u minValue: MinFrequencyValue maxValue: MaxFrequencyValue @@ -160,7 +160,7 @@ tests: attribute: "on off transition time" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -170,7 +170,7 @@ tests: attribute: "on level" response: constraints: - type: uint8 + type: int8u minValue: MinLevelValue maxValue: MaxLevelValue @@ -180,7 +180,7 @@ tests: attribute: "on level" response: constraints: - type: uint8 + type: int8u minValue: MinLevelFeatureMapNotSupportedValue maxValue: MaxLevelFeatureMapNotSupportedValue @@ -190,7 +190,7 @@ tests: attribute: "on transition time" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -200,7 +200,7 @@ tests: attribute: "off transition time" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -210,7 +210,7 @@ tests: attribute: "default move rate" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -221,7 +221,7 @@ tests: response: value: 0 constraints: - type: map8 + type: bitmap8 - label: "Reads the StartUpCurrentLevel attribute " PICS: LVL.S.A4000 @@ -229,6 +229,6 @@ tests: attribute: "start up current level" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 diff --git a/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml index 791618634c6cbe..d6a3ae0b17a032 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml @@ -19,22 +19,22 @@ config: cluster: "Level Control" endpoint: 1 OnOffTransitionTimeConfigValue: - type: INT16U + type: int16u defaultValue: 10 OnLevelConfigValue: - type: INT8U + type: int8u defaultValue: 5 OnTransitionTimeConfigValue: - type: INT16U + type: int16u defaultValue: 5 OffTransitionTimeConfigValue: - type: INT16U + type: int16u defaultValue: 10 DefaultMoveRateConfigValue: - type: INT8U + type: int8u defaultValue: 111 StartUpCurrentLevelConfigValue: - type: INT8U + type: int8u defaultValue: 5 tests: @@ -53,7 +53,7 @@ tests: response: saveAs: OnOffTransitionTimeValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -71,7 +71,7 @@ tests: response: value: OnOffTransitionTimeConfigValue constraints: - type: uint16 + type: int16u notValue: OnOffTransitionTimeValue - label: "Reads the OnLevel attribute from the DUT" @@ -81,7 +81,7 @@ tests: response: saveAs: OnLevelValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -99,7 +99,7 @@ tests: response: value: OnLevelConfigValue constraints: - type: uint8 + type: int8u notValue: OnLevelValue - label: "Reads the OnTransitionTime attribute from the DUT" @@ -109,7 +109,7 @@ tests: response: saveAs: OnTransitionTimeValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -127,7 +127,7 @@ tests: response: value: OnTransitionTimeConfigValue constraints: - type: uint16 + type: int16u notValue: OnTransitionTimeValue - label: "Reads the OffTransitionTime attribute from the DUT" @@ -137,7 +137,7 @@ tests: response: saveAs: OffTransitionTimeValue constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -155,7 +155,7 @@ tests: response: value: OffTransitionTimeConfigValue constraints: - type: uint16 + type: int16u notValue: OffTransitionTimeValue - label: "Reads the DefaultMoveRate attribute from the DUT" @@ -165,7 +165,7 @@ tests: response: saveAs: DefaultMoveRatevalue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -183,7 +183,7 @@ tests: response: value: DefaultMoveRateConfigValue constraints: - type: uint8 + type: int8u notValue: DefaultMoveRatevalue - label: "Reads the StartUpCurrentLevel attribute from the DUT" @@ -193,7 +193,7 @@ tests: response: saveAs: StartUpCurrentLevelValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -211,9 +211,10 @@ tests: response: value: StartUpCurrentLevelConfigValue constraints: - type: uint8 + type: int8u notValue: StartUpCurrentLevelValue + #This is a reset step that is needed to reset the value of the attribute to the default values so as to not effect other test cases. - label: "writes back default value of OnOffTransitionTime attribute" PICS: LVL.S.A0010 command: "writeAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_2_3.yaml b/src/app/tests/suites/certification/Test_TC_LVL_2_3.yaml index 7d87c801db219c..a58ef22a068dbc 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_2_3.yaml @@ -589,9 +589,9 @@ tests: "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order" verification: | + ./chip-tool levelcontrol read remaining-time 1 1 Verify in TH all-clusters-app - ./chip-tool levelcontrol read remaining-time 1 1 [1657913955.033202][3126:3126] CHIP:IM: Received Read request [1657913955.033289][3126:3126] CHIP:DMG: ReadRequestMessage = [1657913955.033319][3126:3126] CHIP:DMG: { @@ -611,7 +611,9 @@ tests: [1657913955.033764][3126:3126] CHIP:DMG: }, - ./chip-tool levelcontrol read min-level 1 1 + ./chip-tool levelcontrol read min-level 1 1 + Verify in TH all-clusters-app + [1657914034.938109][3245:3245] CHIP:DMG: ReadRequestMessage = [1657914034.938157][3245:3245] CHIP:DMG: { [1657914034.938197][3245:3245] CHIP:DMG: AttributePathIBs = @@ -631,6 +633,8 @@ tests: ./chip-tool levelcontrol read max-level 1 1 + Verify in TH all-clusters-app + [1657914049.937379][3245:3245] CHIP:IM: Received Read request [1657914049.937458][3245:3245] CHIP:DMG: ReadRequestMessage = [1657914049.937487][3245:3245] CHIP:DMG: { @@ -651,6 +655,7 @@ tests: ./chip-tool levelcontrol read current-frequency 1 1 + Verify in TH all-clusters-app [1657914066.583478][3245:3245] CHIP:DMG: ReadRequestMessage = [1657914066.583530][3245:3245] CHIP:DMG: { [1657914066.583568][3245:3245] CHIP:DMG: AttributePathIBs = @@ -670,6 +675,7 @@ tests: ./chip-tool levelcontrol read min-frequency 1 1 + Verify in TH all-clusters-app [1657914086.207991][3245:3245] CHIP:IM: Received Read request [1657914086.208155][3245:3245] CHIP:DMG: ReadRequestMessage = [1657914086.208207][3245:3245] CHIP:DMG: { @@ -690,6 +696,7 @@ tests: ./chip-tool levelcontrol read max-frequency 1 1 + Verify in TH all-clusters-app [1657914105.798625][3245:3245] CHIP:IM: Received Read request [1657914105.798770][3245:3245] CHIP:DMG: ReadRequestMessage = [1657914105.798846][3245:3245] CHIP:DMG: { @@ -709,6 +716,7 @@ tests: [1657914105.799842][3245:3245] CHIP:DMG: }, ./chip-tool levelcontrol read on-off-transition-time 1 1 + Verify in TH all-clusters-app [1657914125.515789][3245:3245] CHIP:IM: Received Read request [1657914125.515917][3245:3245] CHIP:DMG: ReadRequestMessage = [1657914125.515964][3245:3245] CHIP:DMG: { @@ -732,9 +740,9 @@ tests: "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer specific order" verification: | + ./chip-tool levelcontrol write on-off-transition-time 5 1 1 Verify in TH all-clusters-app - ./chip-tool levelcontrol write on-off-transition-time 5 1 1 [1657914163.137445][3245:3245] CHIP:DMG: WriteRequestMessage = [1657914163.137491][3245:3245] CHIP:DMG: { [1657914163.137533][3245:3245] CHIP:DMG: suppressResponse = false, @@ -761,6 +769,8 @@ tests: ./chip-tool levelcontrol write on-transition-time 5 1 1 + Verify in TH all-clusters-app + [1657914187.402168][3245:3245] CHIP:DMG: WriteRequestMessage = [1657914187.402215][3245:3245] CHIP:DMG: { [1657914187.402258][3245:3245] CHIP:DMG: suppressResponse = false, @@ -812,6 +822,8 @@ tests: [1657914206.149489][3245:3245] CHIP:DMG: }, ./chip-tool levelcontrol write default-move-rate 5 1 1 + Verify in TH all-clusters-app + [1657914228.843788][3245:3245] CHIP:DMG: WriteRequestMessage = [1657914228.843839][3245:3245] CHIP:DMG: { [1657914228.843881][3245:3245] CHIP:DMG: suppressResponse = false, diff --git a/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml index 7e87c9785e43cf..b1bafbe1a9c3ce 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml @@ -41,13 +41,20 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: LVL.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "Reads the MinLevel attribute" PICS: LVL.S.A0002 command: "readAttribute" attribute: "min level" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -57,7 +64,7 @@ tests: attribute: "max level" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -70,10 +77,10 @@ tests: value: 64 - name: "transitionTime" value: 0 - - name: "optionMask" - value: 1 - - name: "optionOverride" - value: 1 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 - label: "Wait 100ms" cluster: "DelayCommands" @@ -99,10 +106,10 @@ tests: value: 100 - name: "transitionTime" value: 0 - - name: "optionMask" - value: 1 - - name: "optionOverride" - value: 1 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 - label: "Wait 100 ms" cluster: "DelayCommands" @@ -128,10 +135,10 @@ tests: value: 128 - name: "transitionTime" value: 100 - - name: "optionMask" - value: 1 - - name: "optionOverride" - value: 1 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 - label: "Wait 11000ms" cluster: "DelayCommands" @@ -154,7 +161,7 @@ tests: attribute: "on off transition time" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -168,10 +175,10 @@ tests: value: 64 - name: "transitionTime" value: 0xFFFF - - name: "optionMask" - value: 1 - - name: "optionOverride" - value: 1 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 - label: "Wait 1000ms" cluster: "DelayCommands" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml index 9545b773649e5d..f03caa284c3927 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml @@ -41,6 +41,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: LVL.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "Reads Minlevel attribute from DUT" PICS: LVL.S.A0002 command: "readAttribute" @@ -48,7 +55,7 @@ tests: response: saveAs: MinlevelValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -61,9 +68,9 @@ tests: value: 1 - name: "transitionTime" value: 0 - - name: "optionMask" + - name: "OptionsMask" value: 1 - - name: "optionOverride" + - name: "OptionsOverride" value: 1 - label: "reads max level attribute from DUT" @@ -73,7 +80,7 @@ tests: response: saveAs: MaxlevelValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -86,9 +93,9 @@ tests: value: 0 - name: "rate" value: 32 - - name: "optionMask" + - name: "OptionsMask" value: 1 - - name: "optionOverride" + - name: "OptionsOverride" value: 1 - label: @@ -97,7 +104,7 @@ tests: maximum level" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && LVL.S.C01.Rsp arguments: values: - name: "message" @@ -120,18 +127,18 @@ tests: response: value: MaxlevelValue - - label: "sends a MoveWithOnOff command" + - label: "sends a Move command" PICS: LVL.S.C05.Rsp - command: "MoveWithOnOff" + command: "Move" arguments: values: - name: "moveMode" value: 1 - name: "rate" value: 64 - - name: "optionMask" + - name: "OptionsMask" value: 1 - - name: "optionOverride" + - name: "OptionsOverride" value: 1 - label: @@ -140,7 +147,7 @@ tests: minimum level" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && LVL.S.C05.Rsp arguments: values: - name: "message" @@ -173,7 +180,7 @@ tests: response: saveAs: DefaultMoveRateValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -186,25 +193,25 @@ tests: value: 0 - name: "rate" value: 255 - - name: "optionMask" + - name: "OptionsMask" value: 1 - - name: "optionOverride" + - name: "OptionsOverride" value: 1 - - label: "Wait 100ms" + - label: "Wait 500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 100 + value: 500 - label: "Physically verify that the device moves at the rate recorded in step 3a and completes moving to its maximum level" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && LVL.S.C05.Rsp && LVL.S.A0014 arguments: values: - name: "message" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml index 333b9c1d65b31f..600b487af75e70 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml @@ -41,6 +41,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: LVL.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "Reads Minlevel attribute from DUT" PICS: LVL.S.A0002 command: "readAttribute" @@ -48,9 +55,9 @@ tests: response: saveAs: MinlevelValue constraints: - type: uint8 + type: int8u minValue: 0 - maxValue: 255 + maxValue: 254 - label: "Sends MoveToLevelWithOnOff command to DUT" PICS: LVL.S.C04.Rsp && LVL.S.A0002 @@ -61,10 +68,10 @@ tests: value: MinlevelValue + 1 - name: "transitionTime" value: 0 - - name: "optionMask" - value: 1 - - name: "optionOverride" - value: 1 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 - label: "Sends MoveToLevelWithOnOff command to DUT" PICS: LVL.S.C04.Rsp && !LVL.S.A0002 @@ -75,33 +82,33 @@ tests: value: 2 - name: "transitionTime" value: 0 - - name: "optionMask" - value: 1 - - name: "optionOverride" - value: 1 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 - label: "Reads current level attribute from DUT" - PICS: LVL.S.A0000 + PICS: LVL.S.A0000 && LVL.S.C04.Rsp command: "readAttribute" attribute: "current level" response: value: MinlevelValue + 1 saveAs: CurrentlevelValue constraints: - type: uint8 + type: int8u minValue: 0 - maxValue: 255 + maxValue: 254 - label: "Reads current level attribute from DUT" - PICS: LVL.S.A0000 && !LVL.S.A0002 + PICS: LVL.S.A0000 && !LVL.S.A0002 && LVL.S.C04.Rsp command: "readAttribute" attribute: "current level" response: value: 2 constraints: - type: uint8 + type: int8u minValue: 0 - maxValue: 255 + maxValue: 254 - label: "Sends step up command to DUT" PICS: LVL.S.C02.Rsp && LVL.S.M.VarRate @@ -114,28 +121,52 @@ tests: value: 64 - name: "transitionTime" value: 20 - - name: "optionMask" - value: 1 - - name: "optionOverride" - value: 1 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 - - label: "Wait 4000ms" + - label: "Sends step up command to DUT" + PICS: LVL.S.C02.Rsp && !LVL.S.M.VarRate + command: "Step" + arguments: + values: + - name: "stepMode" + value: 0 + - name: "stepSize" + value: 64 + - name: "transitionTime" + value: 20 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 + + - label: "Wait 2500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 4000 + value: 2500 - label: "Reads current level attribute from DUT" - PICS: LVL.S.A0000 && LVL.S.C02.Rsp + PICS: LVL.S.A0000 && LVL.S.C02.Rsp && LVL.S.M.VarRate command: "readAttribute" attribute: "current level" response: + value: 66 constraints: - type: uint8 - minValue: 60 - maxValue: 68 + type: int8u + + - label: "Reads current level attribute from DUT" + PICS: LVL.S.A0000 && LVL.S.C02.Rsp && !LVL.S.M.VarRate + command: "readAttribute" + attribute: "current level" + response: + value: 66 + constraints: + type: int8u - label: "Sends a StepWithOnOff command" PICS: LVL.S.C06.Rsp && LVL.S.M.VarRate @@ -148,28 +179,58 @@ tests: value: 64 - name: "transitionTime" value: 20 - - name: "optionMask" - value: 1 - - name: "optionOverride" + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 + + - label: "Sends a StepWithOnOff command" + PICS: LVL.S.C06.Rsp && !LVL.S.M.VarRate + command: "StepWithOnOff" + arguments: + values: + - name: "stepMode" value: 1 + - name: "stepSize" + value: 64 + - name: "transitionTime" + value: 20 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 - - label: "Wait 4000ms" + - label: "Wait 2500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 4000 + value: 2500 - label: "Reads current level attribute from DUT" - PICS: LVL.S.C06.Rsp && LVL.S.A0000 + PICS: LVL.S.C06.Rsp && LVL.S.A0000 && LVL.S.M.VarRate command: "readAttribute" attribute: "current level" response: value: CurrentlevelValue - label: "Reads current level attribute from DUT" - PICS: LVL.S.C06.Rsp && LVL.S.A0000 && !LVL.S.A0002 + PICS: LVL.S.C06.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate + command: "readAttribute" + attribute: "current level" + response: + value: CurrentlevelValue + + - label: "Reads current level attribute from DUT" + PICS: LVL.S.C06.Rsp && LVL.S.A0000 && !LVL.S.A0002 && LVL.S.M.VarRate + command: "readAttribute" + attribute: "current level" + response: + value: 2 + + - label: "Reads current level attribute from DUT" + PICS: LVL.S.C06.Rsp && LVL.S.A0000 && !LVL.S.A0002 && !LVL.S.M.VarRate command: "readAttribute" attribute: "current level" response: diff --git a/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml index 016f5ac594be7a..f68f33ec310669 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml @@ -41,6 +41,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: LVL.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "Reads Minlevel attribute from DUT" PICS: LVL.S.A0002 command: "readAttribute" @@ -48,7 +55,7 @@ tests: response: saveAs: MinlevelValue constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -61,13 +68,13 @@ tests: value: 1 - name: "transitionTime" value: 0 - - name: "optionMask" + - name: "optionsMask" value: 1 - - name: "optionOverride" + - name: "optionsOverride" value: 1 - label: "Reads CurrentLevel attribute from DUT" - PICS: LVL.S.A0000 + PICS: LVL.S.A0000 && LVL.S.C04.Rsp command: "readAttribute" attribute: "current level" response: @@ -85,9 +92,9 @@ tests: value: 0 - name: "rate" value: 5 - - name: "optionMask" + - name: "optionsMask" value: 1 - - name: "optionOverride" + - name: "optionsOverride" value: 1 - label: "Wait 5000ms" @@ -103,15 +110,15 @@ tests: command: "Stop" arguments: values: - - name: "optionMask" + - name: "optionsMask" value: 1 - - name: "optionOverride" + - name: "optionsOverride" value: 1 - label: "Physically verify that the device has stopped transitioning" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && LVL.S.C03.Rsp arguments: values: - name: "message" @@ -125,8 +132,8 @@ tests: attribute: "current level" response: constraints: - minValue: 22 - maxValue: 28 + minValue: 21 + maxValue: 29 notValue: CurrentLevelValue - label: "Sends a move up command to DUT" @@ -138,9 +145,9 @@ tests: value: 0 - name: "rate" value: 5 - - name: "optionMask" + - name: "optionsMask" value: 1 - - name: "optionOverride" + - name: "optionsOverride" value: 1 - label: "Wait 5000ms" @@ -151,19 +158,20 @@ tests: - name: "ms" value: 5000 - - label: "Sends stop command to DUT" - command: "Stop" + - label: "Sends StopWithOnOff command to DUT" + PICS: LVL.S.C07.Rsp + command: "StopWithOnOff" arguments: values: - - name: "optionMask" + - name: "optionsMask" value: 1 - - name: "optionOverride" + - name: "optionsOverride" value: 1 - label: "Physically verify that the device has stopped transitioning" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && LVL.S.C07.Rsp arguments: values: - name: "message" @@ -177,8 +185,8 @@ tests: attribute: "current level" response: constraints: - minValue: 45 - maxValue: 55 + minValue: 43 + maxValue: 57 notValue: CurrentLevelValue - label: "Precondition send Off Command" diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_1_4.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_1_4.yaml index db0296b2ffb8ba..54cab6a3183249 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_1_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_1_4.yaml @@ -36,19 +36,18 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" - PICS: MEDIAINPUT.S.NU command: "readAttribute" attribute: "FeatureMap" response: - value: 1 constraints: - type: map32 + type: bitmap32 + minValue: 0 + maxValue: 1 - label: "Read the global attribute: AttributeList" - PICS: MEDIAINPUT.S.A0000 && MEDIAINPUT.S.A0001 command: "readAttribute" attribute: "AttributeList" response: diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_3_13.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_3_13.yaml index 5a9bba52929bd3..adab80b37fe39b 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_3_13.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_3_13.yaml @@ -73,7 +73,7 @@ tests: [1651055193.215585][155444:155449] CHIP:TOO: } cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT && MEDIAINPUT.S.A0000 + PICS: PICS_USER_PROMPT && MEDIAINPUT.S.A0000 && MEDIAINPUT.S.C0003 arguments: values: - name: "message" diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml index 5ac838f7fb8c94..1f8e0acd5f5ade 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml @@ -36,7 +36,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" PICS: MEDIAPLAYBACK.S.AS || MEDIAPLAYBACK.S.VS @@ -44,7 +44,7 @@ tests: attribute: "FeatureMap" response: constraints: - type: map32 + type: bitmap32 minValue: 0 maxValue: 3 @@ -153,6 +153,7 @@ tests: constraints: type: list contains: [6] + - label: "Read the optional command(FastForward) in AcceptedCommandList" PICS: MEDIAPLAYBACK.S.C07.Rsp command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_1.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_1.yaml index 0e2707ab7826ea..bd6f0f5869b4d5 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_1.yaml @@ -32,21 +32,21 @@ tests: "Precondition: Media content in a paused state at the beginning of the content" command: "Pause" - PICS: MEDIAPLAYBACK.S.C0001 + PICS: MEDIAPLAYBACK.S.C01.Rsp response: values: - name: "status" value: 0 - label: "Reads the CurrentState attribute" - PICS: MEDIAPLAYBACK.S.A0000 + PICS: MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp command: "readAttribute" attribute: "CurrentState" response: value: 1 - label: "Sends a Play command" - PICS: MEDIAPLAYBACK.S.C0000 + PICS: MEDIAPLAYBACK.S.C00.Rsp command: "Play" response: values: @@ -56,7 +56,7 @@ tests: - label: "Verify that the media state is playing" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C00.Rsp arguments: values: - name: "message" @@ -65,14 +65,14 @@ tests: value: "y" - label: "Reads the CurrentState attribute" - PICS: MEDIAPLAYBACK.S.A0000 + PICS: MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C00.Rsp command: "readAttribute" attribute: "CurrentState" response: value: 0 - label: "sends a Pause command" - PICS: MEDIAPLAYBACK.S.C0001 + PICS: MEDIAPLAYBACK.S.C01.Rsp command: "Pause" response: values: @@ -82,7 +82,7 @@ tests: - label: "Verify that the media is paused" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C01.Rsp arguments: values: - name: "message" @@ -91,13 +91,14 @@ tests: value: "y" - label: "Reads the CurrentState attribute" + PICS: MEDIAPLAYBACK.S.C01.Rsp && MEDIAPLAYBACK.S.A0000 command: "readAttribute" attribute: "CurrentState" response: value: 1 - label: "Sends a Stop command" - PICS: MEDIAPLAYBACK.S.C0002 + PICS: MEDIAPLAYBACK.S.C02.Rsp command: "StopPlayback" response: values: @@ -107,7 +108,7 @@ tests: - label: "Verify that the media is stoped" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C02.Rsp arguments: values: - name: "message" @@ -116,7 +117,7 @@ tests: value: "y" - label: "Reads the CurrentState attribute" - PICS: MEDIAPLAYBACK.S.A0000 + PICS: MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C02.Rsp command: "readAttribute" attribute: "CurrentState" response: diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_2.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_2.yaml index 8a2918e2d7c264..8e32a15acd3744 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_2.yaml @@ -32,21 +32,21 @@ tests: "Precondition: Media content in a paused state at the beginning of the content" command: "Pause" - PICS: MEDIAPLAYBACK.S.C0001 + PICS: MEDIAPLAYBACK.S.C01.Rsp response: values: - name: "status" value: 0 - label: "Reads the CurrentState attribute from the DUT" - PICS: MEDIAPLAYBACK.S.A0000 + PICS: MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp command: "readAttribute" attribute: "CurrentState" response: value: 1 - label: "Sends a Play command to the DUT" - PICS: MEDIAPLAYBACK.S.C0000 + PICS: MEDIAPLAYBACK.S.C00.Rsp command: "Play" response: values: @@ -56,7 +56,7 @@ tests: - label: "Verify that the media state is playing" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C00.Rsp arguments: values: - name: "message" @@ -65,7 +65,7 @@ tests: value: "y" - label: "Reads the CurrentState attribute" - PICS: MEDIAPLAYBACK.S.A0000 + PICS: MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C00.Rsp command: "readAttribute" attribute: "CurrentState" response: @@ -82,7 +82,7 @@ tests: - label: "Verify that the media is started over" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C03.Rsp arguments: values: - name: "message" @@ -101,7 +101,7 @@ tests: - label: "Verify that the next media item in the queue has been loaded" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C05.Rsp arguments: values: - name: "message" @@ -121,7 +121,7 @@ tests: - label: "Verify that the previous media item in the queue has been loaded" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C04.Rsp arguments: values: - name: "message" @@ -146,7 +146,7 @@ tests: - label: "Verify that the media has skipped forward 10 seconds" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C08.Rsp arguments: values: - name: "message" @@ -156,7 +156,7 @@ tests: value: "y" - label: "Reads the SampledPosition attribute from the DUT" - PICS: MEDIAPLAYBACK.S.A0003 + PICS: MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C08.Rsp command: "readAttribute" attribute: "SampledPosition" response: @@ -177,7 +177,7 @@ tests: - label: "Verify that the media has skipped backward 10 seconds" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C09.Rsp arguments: values: - name: "message" @@ -187,7 +187,7 @@ tests: value: "y" - label: "Reads the SampledPosition attribute from the DUT" - PICS: MEDIAPLAYBACK.S.A0003 + PICS: MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C09.Rsp command: "readAttribute" attribute: "SampledPosition" response: diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_3.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_3.yaml index 15b6cf62ae264d..cdf3b92190c987 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_3.yaml @@ -19,7 +19,7 @@ config: cluster: "Media Playback" endpoint: 1 SeekPosition: - type: INT64U + type: int64u defaultValue: 100000000 tests: @@ -35,7 +35,7 @@ tests: "Precondition: Media content in a paused state at the beginning of the content" command: "Pause" - PICS: MEDIAPLAYBACK.S.C0001 + PICS: MEDIAPLAYBACK.S.C01.Rsp response: values: - name: "status" @@ -57,7 +57,7 @@ tests: "Verify that the media has moved to 10 seconds from the starting point" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C0B.Rsp arguments: values: - name: "message" @@ -68,7 +68,7 @@ tests: value: "y" - label: "Reads the SampledPosition attribute" - PICS: MEDIAPLAYBACK.S.A0003 + PICS: MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C0B.Rsp command: "readAttribute" attribute: "SampledPosition" response: diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_4.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_4.yaml index 43c14b0bc586ec..6f52c15856c88f 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_4.yaml @@ -32,14 +32,14 @@ tests: "Precondition: Media content in a paused state at the beginning of the content" command: "Pause" - PICS: MEDIAPLAYBACK.S.C0001 + PICS: MEDIAPLAYBACK.S.C01.Rsp response: values: - name: "status" value: 0 - label: "Reads the CurrentState attribute from the DUT" - PICS: MEDIAPLAYBACK.S.A0000 + PICS: MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp command: "readAttribute" attribute: "CurrentState" response: @@ -61,14 +61,14 @@ tests: value: 0 - label: "Reads the CurrentState attribute" - PICS: MEDIAPLAYBACK.S.A0000 + PICS: MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C07.Rsp command: "readAttribute" attribute: "CurrentState" response: value: 0 - label: "Reads the PlaybackSpeed attribute from the DUT" - PICS: MEDIAPLAYBACK.S.A0004 + PICS: MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C07.Rsp command: "readAttribute" attribute: "PlaybackSpeed" response: @@ -83,7 +83,7 @@ tests: value: 0 - label: "Reads the PlaybackSpeed attribute from the DUT" - PICS: MEDIAPLAYBACK.S.A0004 + PICS: MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C07.Rsp command: "readAttribute" attribute: "PlaybackSpeed" response: @@ -98,7 +98,7 @@ tests: value: 0 - label: "Reads the CurrentState attribute" - PICS: MEDIAPLAYBACK.S.A0000 + PICS: MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C06.Rsp command: "readAttribute" attribute: "CurrentState" response: @@ -113,11 +113,11 @@ tests: [1655114487.018421][41855:41860] CHIP:EM: Sending Standalone Ack for MessageCounter:163883813 on exchange 24959 cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.C07.Rsp + PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.A0004 arguments: values: - name: "message" - value: "Please enter 'y' if PlaybackSpeed value is -2" + value: "Please enter 'y' if PlaybackSpeed value is -1" - name: "expectedValue" value: "y" @@ -147,7 +147,7 @@ tests: value: "y" - label: "Sends a Play command" - PICS: MEDIAPLAYBACK.S.C0000 + PICS: MEDIAPLAYBACK.S.C00.Rsp command: "Play" response: values: @@ -157,7 +157,7 @@ tests: - label: "Reads the PlaybackSpeed attribute from the DUT" command: "readAttribute" attribute: "PlaybackSpeed" - PICS: MEDIAPLAYBACK.S.A0004 + PICS: MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C00.Rsp response: value: 1 diff --git a/src/app/tests/suites/certification/Test_TC_MOD_1_1.yaml b/src/app/tests/suites/certification/Test_TC_MOD_1_1.yaml index 5852934e541aac..f4deeee328d384 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_1_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "TH reads the FeatureMap attribute from the DUT" PICS: MOD.S.F00 @@ -43,7 +43,7 @@ tests: response: value: 1 constraints: - type: map32 + type: bitmap32 - label: "TH reads the FeatureMap attribute from the DUT" PICS: " !MOD.S.F00 " @@ -52,7 +52,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "TH reads the AttributeList attribute from the DUT" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml index 3da9ee749d6d8d..f30a3b1cc381bb 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml @@ -28,13 +28,13 @@ tests: - name: "nodeId" value: nodeId - - label: "read the global attribute: ClusterRevision" + - label: "Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" response: value: 3 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -42,7 +42,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml index 228b64c7dbbb78..c559eea82eb7f8 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml @@ -34,7 +34,7 @@ tests: attribute: "occupancy" response: constraints: - type: map8 + type: bitmap8 minValue: 0 maxValue: 1 @@ -54,7 +54,7 @@ tests: attribute: "occupancy sensor type bitmap" response: constraints: - type: map8 + type: bitmap8 minValue: 1 maxValue: 273 @@ -65,7 +65,7 @@ tests: response: value: 0 constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -76,7 +76,7 @@ tests: response: value: 0 constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -88,7 +88,7 @@ tests: response: value: 1 constraints: - type: uint8 + type: int8u minValue: 1 maxValue: 254 @@ -99,7 +99,7 @@ tests: response: value: 0 constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -110,7 +110,7 @@ tests: response: value: 0 constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -121,7 +121,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int8u minValue: 1 maxValue: 254 @@ -134,7 +134,7 @@ tests: response: value: 0 constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -147,7 +147,7 @@ tests: response: value: 0 constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -160,6 +160,6 @@ tests: response: value: 1 constraints: - type: uint8 + type: int8u minValue: 1 maxValue: 254 diff --git a/src/app/tests/suites/certification/Test_TC_OCC_3_1.yaml b/src/app/tests/suites/certification/Test_TC_OCC_3_1.yaml index 1f4c0c701c8100..07710d8274d6bb 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_3_1.yaml @@ -33,7 +33,6 @@ tests: command: "readAttribute" attribute: "occupancy" response: - value: 0 saveAs: OccupancyValue - label: "Operate on DUT to change the occupancy status" @@ -48,7 +47,7 @@ tests: value: "y" - label: "Reads back Occupancy attribute from DUT after few seconds" - PICS: OCC.S.A0000 + PICS: OCC.S.A0000 && OCC.M.OccupancyChange command: "readAttribute" attribute: "occupancy" response: diff --git a/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml index bfb98d05c32a89..6c811f34c153d2 100644 --- a/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 4 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -43,7 +43,7 @@ tests: response: value: 1 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -52,55 +52,42 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" - PICS: OO.S.F00 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: - [ - 0, - 16384, - 16385, - 16386, - 16387, - 65528, - 65529, - 65531, - 65532, - 65533, - ] + contains: [0, 65528, 65529, 65531, 65532, 65533] - - label: "Read the global attribute: AttributeList" - PICS: " !OO.S.F00 " + - label: "Read the feature dependent(OO.S.F00) attribute in AttributeList" + PICS: OO.S.F00 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [0, 65528, 65529, 65531, 65532, 65533] + contains: [16384, 16385, 16386, 16387] - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: OO.S.F00 response: constraints: type: list - contains: [0, 1, 2, 64, 65, 66] + contains: [0, 1, 2] - - label: "Read the global attribute: AcceptedCommandList" + - label: + "Read the feature dependent(OO.S.F00) commands in AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: " !OO.S.F00 " + PICS: OO.S.F00 response: constraints: type: list - contains: [0, 1, 2] + contains: [64, 65, 66] - label: "Read the global attribute: GeneratedCommandList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_OO_2_1.yaml b/src/app/tests/suites/certification/Test_TC_OO_2_1.yaml index 2580de9ddd88f8..a471f39e6bce2f 100644 --- a/src/app/tests/suites/certification/Test_TC_OO_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OO_2_1.yaml @@ -28,43 +28,43 @@ tests: - name: "nodeId" value: nodeId - - label: "read the mandatory attribute: OnOff" + - label: "Read the mandatory attribute: OnOff" PICS: OO.S.A0000 command: "readAttribute" attribute: "OnOff" response: constraints: - type: bool + type: boolean - - label: "read LT attribute: GlobalSceneControl" + - label: "Read LT attribute: GlobalSceneControl" PICS: OO.S.A4000 command: "readAttribute" attribute: "GlobalSceneControl" response: constraints: - type: bool + type: boolean - - label: "read LT attribute: OnTime" + - label: "Read LT attribute: OnTime" PICS: OO.S.A4001 command: "readAttribute" attribute: "OnTime" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "read LT attribute: OffWaitTime" + - label: "Read LT attribute: OffWaitTime" PICS: OO.S.A4002 command: "readAttribute" attribute: "OffWaitTime" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - - label: "read LT attribute: StartUpOnOff" + - label: "Read LT attribute: StartUpOnOff" PICS: OO.S.A4003 command: "readAttribute" attribute: "StartUpOnOff" diff --git a/src/app/tests/suites/certification/Test_TC_OO_2_2.yaml b/src/app/tests/suites/certification/Test_TC_OO_2_2.yaml index 8181dba46b76da..f65f9f647eeb39 100644 --- a/src/app/tests/suites/certification/Test_TC_OO_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_OO_2_2.yaml @@ -124,7 +124,7 @@ tests: - label: "Operate on device to set OnOff attribute manually to on" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT && OO.M.ManuallyControlled + PICS: PICS_USER_PROMPT && OO.M.ManuallyControlled && OO.S.A0000 arguments: values: - name: "message" @@ -134,7 +134,7 @@ tests: # Skipped this step because the above test need manual input - label: "Check on/off attribute value is true after on command" - PICS: PICS_SKIP_SAMPLE_APP && OO.S.A0000 + PICS: PICS_SKIP_SAMPLE_APP && OO.S.A0000 && OO.M.ManuallyControlled command: "readAttribute" attribute: "OnOff" response: @@ -143,7 +143,7 @@ tests: - label: "Operate on device to set OnOff attribute manually to off" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT && OO.M.ManuallyControlled + PICS: PICS_USER_PROMPT && OO.M.ManuallyControlled && OO.S.A0000 arguments: values: - name: "message" @@ -153,7 +153,7 @@ tests: # Skipped the step because the above test need manual input - label: "Check on/off attribute value is false after off command" - PICS: PICS_SKIP_SAMPLE_APP && OO.S.A0000 + PICS: PICS_SKIP_SAMPLE_APP && OO.S.A0000 && OO.M.ManuallyControlled command: "readAttribute" attribute: "OnOff" response: diff --git a/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml index bf3689ae62d2c4..a095cc771d2219 100644 --- a/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 3 constraints: - type: uint16 + type: int16u - label: "TH reads the FeatureMap attribute from the DUT" command: "readAttribute" @@ -42,7 +42,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "TH reads the AttributeList attribute from the DUT" command: "readAttribute" @@ -53,6 +53,182 @@ tests: contains: [0, 1, 2, 17, 18, 19, 32, 65528, 65529, 65531, 65532, 65533] + - label: + "TH reads optional attribute(MinConstPressure) attribute in + AttributeList from the DUT" + PICS: PCC.S.A0003 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [3] + + - label: + "TH reads optional attribute(MaxConstPressure) attribute in + AttributeList from the DUT" + PICS: PCC.S.A0004 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [4] + + - label: + "TH reads optional attribute(MinCompPressure) attribute in + AttributeList from the DUT" + PICS: PCC.S.A0005 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [5] + + - label: + "TH reads optional attribute(MaxCompPressure) attribute in + AttributeList from the DUT" + PICS: PCC.S.A0006 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [6] + + - label: + "TH reads optional attribute(MinConstSpeed) attribute in AttributeList + from the DUT" + PICS: PCC.S.A0007 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [7] + + - label: + "TH reads optional attribute(MaxConstSpeed) attribute in AttributeList + from the DUT" + PICS: PCC.S.A0008 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [8] + + - label: + "TH reads optional attribute(MinConstFlow) attribute in AttributeList + from the DUT" + PICS: PCC.S.A0009 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [9] + + - label: + "TH reads optional attribute(MaxConstFlow) attribute in AttributeList + from the DUT" + PICS: PCC.S.A000a + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [10] + + - label: + "TH reads optional attribute(MinConstTemp) attribute in AttributeList + from the DUT" + PICS: PCC.S.A000b + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [11] + + - label: + "TH reads optional attribute(MaxConstTemp) attribute in AttributeList + from the DUT" + PICS: PCC.S.A000c + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [12] + + - label: + "TH reads optional attribute(PumpStatus) attribute in AttributeList + from the DUT" + PICS: PCC.S.A0010 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [16] + + - label: + "TH reads optional attribute(Speed) attribute in AttributeList from + the DUT" + PICS: PCC.S.A0014 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [20] + + - label: + "TH reads optional attribute(LifetimeRunningHours) attribute in + AttributeList from the DUT" + PICS: PCC.S.A0015 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [21] + + - label: + "TH reads optional attribute(Power) attribute in AttributeList from + the DUT" + PICS: PCC.S.A0016 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [22] + + - label: + "TH reads optional attribute(LifetimeEnergyConsumed) attribute in + AttributeList from the DUT" + PICS: PCC.S.A0017 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [23] + + - label: + "TH reads optional attribute(ControlMode) attribute in AttributeList + from the DUT" + PICS: PCC.S.A0021 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [33] + - label: "TH reads the AcceptedCommandList attribute from the DUT" command: "readAttribute" attribute: "AcceptedCommandList" diff --git a/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml index 5ce4bdf574593d..d69ef7d98629e5 100644 --- a/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml @@ -34,7 +34,7 @@ tests: attribute: "MaxPressure" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 @@ -44,7 +44,7 @@ tests: attribute: "MaxSpeed" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -54,128 +54,117 @@ tests: attribute: "MaxFlow" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - label: "Read the optional attribute: MinConstPressure" PICS: PCC.S.A0003 - optional: true command: "readAttribute" attribute: "MinConstPressure" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 - label: "Read the optional attribute: MaxConstPressure" PICS: PCC.S.A0004 - optional: true command: "readAttribute" attribute: "MaxConstPressure" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 - label: "Read the optional attribute: MinCompPressure" PICS: PCC.S.A0005 - optional: true command: "readAttribute" attribute: "MinCompPressure" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 - label: "Read the optional attribute: MaxCompPressure" PICS: PCC.S.A0006 - optional: true command: "readAttribute" attribute: "MaxCompPressure" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 - label: "Read the optional attribute: MinConstSpeed" PICS: PCC.S.A0007 - optional: true command: "readAttribute" attribute: "MinConstSpeed" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - label: "Read the optional attribute: MaxConstSpeed" PICS: PCC.S.A0008 - optional: true command: "readAttribute" attribute: "MaxConstSpeed" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - label: "Read the optional attribute: MinConstFlow" PICS: PCC.S.A0009 - optional: true command: "readAttribute" attribute: "MinConstFlow" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - label: "Read the optional attribute: MaxConstFlow" PICS: PCC.S.A000a - optional: true command: "readAttribute" attribute: "MaxConstFlow" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - label: "Read the optional attribute: MinConstTemp" PICS: PCC.S.A000b - optional: true command: "readAttribute" attribute: "MinConstTemp" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 - label: "Read the optional attribute: MaxConstTemp" PICS: PCC.S.A000c - optional: true command: "readAttribute" attribute: "MaxConstTemp" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 - label: "Read the optional attribute: PumpStatus" PICS: PCC.S.A0010 - optional: true command: "readAttribute" attribute: "PumpStatus" response: constraints: - type: map16 + type: bitmap16 minValue: 0 maxValue: 8 @@ -205,51 +194,47 @@ tests: attribute: "Capacity" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 - label: "Read the optional attribute: Speed" PICS: PCC.S.A0014 - optional: true command: "readAttribute" attribute: "Speed" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 - label: "Read the optional attribute: LifetimeRunningHours" PICS: PCC.S.A0015 - optional: true command: "readAttribute" attribute: "LifetimeRunningHours" response: constraints: - type: uint24 + type: int24u minValue: 0 maxValue: 16777215 - label: "Read the optional attribute: Power" PICS: PCC.S.A0016 - optional: true command: "readAttribute" attribute: "Power" response: constraints: - type: uint24 + type: int24u minValue: 0 maxValue: 16777215 - label: "Read the optional attribute: LifetimeEnergyConsumed" PICS: PCC.S.A0017 - optional: true command: "readAttribute" attribute: "LifetimeEnergyConsumed" response: constraints: - type: uint32 + type: int32u minValue: 0 maxValue: 4294967295 @@ -265,7 +250,6 @@ tests: - label: "Read optional attribute: ControlMode" PICS: PCC.S.A0021 - optional: true command: "readAttribute" attribute: "ControlMode" response: diff --git a/src/app/tests/suites/certification/Test_TC_PCC_2_2.yaml b/src/app/tests/suites/certification/Test_TC_PCC_2_2.yaml index c24059997de3a4..9f716da6798c62 100644 --- a/src/app/tests/suites/certification/Test_TC_PCC_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_PCC_2_2.yaml @@ -28,42 +28,58 @@ tests: - name: "nodeId" value: nodeId - - label: "Write 1 to the OperationMode attribute to DUT: OperationMode" + - label: "TH write 0 (Normal) to the OperationMode attribute to DUT" command: "writeAttribute" attribute: "OperationMode" PICS: PCC.S.A0020 arguments: - value: 1 + value: 0 - - label: "Reads the attribute: EffectiveOperationMode" + - label: "TH reads from the DUT the EffectiveOperationMode attribute" command: "readAttribute" attribute: "EffectiveOperationMode" PICS: PCC.S.A0011 + response: + value: 0 + + - label: "TH write 1 (Minimum) to the OperationMode attribute to DUT" + command: "writeAttribute" + attribute: "OperationMode" + PICS: PCC.S.A0020 && PCC.M.ControlModeConstSpeed + arguments: + value: 1 + + - label: "TH reads from the DUT the EffectiveOperationMode attribute" + command: "readAttribute" + attribute: "EffectiveOperationMode" + PICS: PCC.S.A0011 && PCC.M.ControlModeConstSpeed response: value: 1 - - label: "Write 2 to the OperationMode attribute to DUT: OperationMode" + - label: + "TH write 2 (Maximum) to the OperationMode attribute to DUT one at a + time." command: "writeAttribute" attribute: "OperationMode" - PICS: PCC.S.A0020 + PICS: PCC.S.A0020 && PCC.M.ControlModeConstSpeed arguments: value: 2 - - label: "Reads the attribute: EffectiveOperationMode" + - label: "TH reads from the DUT the EffectiveOperationMode attribute" command: "readAttribute" attribute: "EffectiveOperationMode" - PICS: PCC.S.A0011 + PICS: PCC.S.A0011 && PCC.M.ControlModeConstSpeed response: value: 2 - - label: "Write 3 to the OperationMode attribute to DUT: OperationMode" + - label: "TH write 3 (Local) to the OperationMode attribute to DUT" command: "writeAttribute" attribute: "OperationMode" PICS: PCC.S.A0020 arguments: value: 3 - - label: "Reads the attribute: EffectiveOperationMode" + - label: "TH reads from the DUT the EffectiveOperationMode attribute" command: "readAttribute" attribute: "EffectiveOperationMode" PICS: PCC.S.A0011 diff --git a/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml index dd99ae2d50de7a..e7e8a142285b62 100644 --- a/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 3 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" PICS: PRS.S.F00 @@ -43,7 +43,7 @@ tests: response: value: 1 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: FeatureMap" PICS: " !PRS.S.F00 " @@ -52,7 +52,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global mandatory attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml b/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml index 86c74bfb54f6a6..cc541918a4bccc 100644 --- a/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml @@ -34,7 +34,7 @@ tests: attribute: "MeasuredValue" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 @@ -44,7 +44,7 @@ tests: attribute: "MinMeasuredValue" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 @@ -54,7 +54,7 @@ tests: attribute: "MaxMeasuredValue" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 @@ -64,7 +64,7 @@ tests: attribute: "Tolerance" response: constraints: - type: int16 + type: int16u minValue: 0 maxValue: 2048 @@ -74,7 +74,7 @@ tests: attribute: "ScaledValue" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 @@ -84,7 +84,7 @@ tests: attribute: "MinScaledValue" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 @@ -94,7 +94,7 @@ tests: attribute: "MaxScaledValue" response: constraints: - type: int16 + type: int16s minValue: -32768 maxValue: 32767 @@ -104,7 +104,7 @@ tests: attribute: "ScaledTolerance" response: constraints: - type: int16 + type: int16u minValue: 0 maxValue: 2048 @@ -114,6 +114,6 @@ tests: attribute: "Scale" response: constraints: - type: int8 + type: int8s minValue: -127 maxValue: 127 diff --git a/src/app/tests/suites/certification/Test_TC_PSCFG_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PSCFG_1_1.yaml index c355fc10682848..4053ea3195a19a 100644 --- a/src/app/tests/suites/certification/Test_TC_PSCFG_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PSCFG_1_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "TH reads the FeatureMap attribute from the DUT" command: "readAttribute" @@ -42,7 +42,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "TH reads the AttributeList attribute from the DUT" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml index 48832a0e44245a..dc766658a7594c 100644 --- a/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" PICS: PS.S.F00 || PS.S.F01 || PS.S.F02 || PS.S.F03 @@ -42,9 +42,9 @@ tests: attribute: "FeatureMap" response: constraints: - type: map32 + type: bitmap32 minValue: 0 - maxValue: 7 + maxValue: 15 - label: "Read the global attribute: AttributeList" command: "readAttribute" @@ -55,7 +55,7 @@ tests: contains: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] - label: - "Read the Feature related(PS.S.F00-WIRED) attribute in AttributeList" + "Read the Feature dependent(PS.S.F00-WIRED) attribute in AttributeList" PICS: PS.S.F00 command: "readAttribute" attribute: "AttributeList" @@ -64,7 +64,8 @@ tests: type: list contains: [5] - - label: "Read the Feature related(PS.S.F01-BAT) attribute in AttributeList" + - label: + "Read the Feature dependent(PS.S.F01-BAT) attribute in AttributeList" PICS: PS.S.F01 command: "readAttribute" attribute: "AttributeList" @@ -74,7 +75,7 @@ tests: contains: [14, 15, 16] - label: - "Read the Feature related(PS.S.F02-RECHG) attribute in AttributeList" + "Read the Feature dependent(PS.S.F02-RECHG) attribute in AttributeList" PICS: PS.S.F02 command: "readAttribute" attribute: "AttributeList" @@ -84,7 +85,7 @@ tests: contains: [26, 28] - label: - "Read the Feature related(PS.S.F03-REPLC) attribute in AttributeList" + "Read the Feature dependent(PS.S.F03-REPLC) attribute in AttributeList" PICS: PS.S.F03 command: "readAttribute" attribute: "AttributeList" diff --git a/src/app/tests/suites/certification/Test_TC_PS_2_1.yaml b/src/app/tests/suites/certification/Test_TC_PS_2_1.yaml index e76b9e49f9a167..969e453c6d1373 100644 --- a/src/app/tests/suites/certification/Test_TC_PS_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PS_2_1.yaml @@ -44,7 +44,7 @@ tests: attribute: "Order" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -54,7 +54,7 @@ tests: attribute: "Description" response: constraints: - type: string + type: char_string - label: "Test Harness Client reads WiredAssessedInputVoltage attribue from @@ -64,7 +64,7 @@ tests: attribute: "WiredAssessedInputVoltage" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -76,7 +76,7 @@ tests: attribute: "WiredAssessedInputFrequency" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -99,7 +99,7 @@ tests: attribute: "WiredAssessedCurrent" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -109,7 +109,7 @@ tests: attribute: "WiredNominalVoltage" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -119,7 +119,7 @@ tests: attribute: "WiredMaximumCurrent" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -129,7 +129,7 @@ tests: attribute: "WiredPresent" response: constraints: - type: bool + type: boolean - label: "Test Harness Client reads ActiveWiredFaults from Server DUT" PICS: PICS_SKIP_SAMPLE_APP && PS.S.A000a @@ -146,7 +146,7 @@ tests: attribute: "BatVoltage" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -156,7 +156,7 @@ tests: attribute: "BatPercentRemaining" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 200 @@ -166,7 +166,7 @@ tests: attribute: "BatTimeRemaining" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -186,7 +186,7 @@ tests: attribute: "BatReplacementNeeded" response: constraints: - type: bool + type: boolean - label: "Test Harness Client reads BatReplaceability from Server DUT" PICS: PICS_SKIP_SAMPLE_APP && PS.S.A0010 @@ -204,7 +204,7 @@ tests: attribute: "BatPresent" response: constraints: - type: bool + type: boolean - label: "Test Harness Client readsActiveBatFaults from Server DUT" PICS: PICS_SKIP_SAMPLE_APP && PS.S.A0012 @@ -222,7 +222,7 @@ tests: attribute: "BatReplacementDescription" response: constraints: - type: string + type: char_string maxLength: 60 - label: "Test Harness Client reads BatCommonDesignation from Server DUT" @@ -231,7 +231,7 @@ tests: attribute: "BatCommonDesignation" response: constraints: - type: uint32 + type: int32u minValue: 0 maxValue: 80 @@ -241,7 +241,7 @@ tests: attribute: "BatANSIDesignation" response: constraints: - type: string + type: char_string maxLength: 20 - label: "Test Harness Client reads BatIECDesignation from Server DUT" @@ -250,7 +250,7 @@ tests: attribute: "BatIECDesignation" response: constraints: - type: string + type: char_string maxLength: 20 - label: "Test Harness Client reads BatApprovedChemistry from Server DUT" @@ -259,7 +259,7 @@ tests: attribute: "BatApprovedChemistry" response: constraints: - type: uint32 + type: int32u minValue: 0 maxValue: 32 @@ -269,7 +269,7 @@ tests: attribute: "BatCapacity" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -279,7 +279,7 @@ tests: attribute: "BatQuantity" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -299,7 +299,7 @@ tests: attribute: "BatTimeToFullCharge" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF @@ -310,7 +310,7 @@ tests: attribute: "BatFunctionalWhileCharging" response: constraints: - type: bool + type: boolean - label: "Test Harness Client reads BatChargingCurrent from Server DUT" PICS: PICS_SKIP_SAMPLE_APP && PS.S.A001d @@ -318,7 +318,7 @@ tests: attribute: "BatChargingCurrent" response: constraints: - type: uint32 + type: int32u minValue: 0x0 maxValue: 0xFFFFFFFF diff --git a/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml index 8fd7e9a9723d27..79362ca7f613da 100644 --- a/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 3 constraints: - type: list + type: int16u - label: "Read FeatureMap attribute from the DUT" command: "readAttribute" @@ -42,7 +42,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml b/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml index bbca0f62114a0b..588190de738f6f 100644 --- a/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml @@ -34,7 +34,7 @@ tests: attribute: "measured value" response: constraints: - type: int16 + type: int16u minValue: 0 maxValue: 10000 @@ -44,16 +44,17 @@ tests: attribute: "min measured value" response: constraints: - type: int16 + type: int16u minValue: 0 maxValue: 9999 - label: "Reads constraints of attribute: MaxMeasuredValue" + PICS: RH.S.A0002 command: "readAttribute" attribute: "max measured value" response: constraints: - type: int16 + type: int16u minValue: 1 maxValue: 10000 @@ -63,6 +64,6 @@ tests: attribute: "tolerance" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 2048 diff --git a/src/app/tests/suites/certification/Test_TC_RH_2_2.yaml b/src/app/tests/suites/certification/Test_TC_RH_2_2.yaml index 0e73c4587852a7..fc4a8ab535f6f1 100644 --- a/src/app/tests/suites/certification/Test_TC_RH_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_RH_2_2.yaml @@ -34,17 +34,17 @@ tests: attribute: "min measured value" response: constraints: - type: int16 + type: int16u minValue: 0 maxValue: 9999 - label: "Reads constraints of attribute: MaxMeasuredValue" - PICS: PICS_SKIP_SAMPLE_APP + PICS: RH.S.A0002 command: "readAttribute" attribute: "max measured value" response: constraints: - type: int16 + type: int16u minValue: 1 maxValue: 10000 @@ -55,7 +55,7 @@ tests: response: saveAs: ValueBeforeChange constraints: - type: int16 + type: int16u minValue: 0 maxValue: 10000 @@ -73,8 +73,8 @@ tests: - label: "Read the mandatory attribute: MeasuredValue" command: "readAttribute" attribute: "measured value" - PICS: RH.S.A0000 + PICS: RH.S.A0000 && RH.M.ManuallyControlled response: constraints: - type: uint16 + type: int16u notValue: ValueBeforeChange diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml index 9ed1f75e4edc23..536019ae31e03c 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml @@ -21,16 +21,16 @@ config: cluster: "Secure Channel" endpoint: 0 discriminator: - type: INT16U + type: int16u defaultValue: 3840 vendorId: - type: INT16U + type: int16u defaultValue: 65521 productId: - type: INT16U + type: int16u defaultValue: 32769 deviceType: - type: INT16U + type: int16u defaultValue: 5 tests: @@ -70,7 +70,7 @@ tests: #validate the service type and the service domain not implemented in CI - label: "Check Hostname" - PICS: "(WIFI || ETH) && !THREAD" + PICS: "( MCORE.SC.WIFI || MCORE.SC.ETH ) && !MCORE.SC.THR" cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -83,7 +83,7 @@ tests: isHexString: true - label: "Check Hostname" - PICS: "PICS_SKIP_SAMPLE_APP && (!WIFI && !ETH) && THREAD" + PICS: "( !MCORE.SC.WIFI && !MCORE.SC.ETH ) && MCORE.SC.THR " cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -113,7 +113,7 @@ tests: value: discriminator - label: "Check Vendor ID (_V)" - PICS: VENDOR_SUBTYPE + PICS: MCORE.SC.VENDOR_SUBTYPE cluster: "DiscoveryCommands" command: "FindCommissionableByVendorId" arguments: @@ -122,7 +122,7 @@ tests: value: vendorId - label: "Check Device Type ID (_T)" - PICS: PICS_SKIP_SAMPLE_APP && DEVTYPE_SUBTYPE + PICS: PICS_SKIP_SAMPLE_APP && MCORE.SC.DEVTYPE_SUBTYPE cluster: "DiscoveryCommands" command: "FindCommissionableByDeviceType" arguments: @@ -135,7 +135,7 @@ tests: command: "FindCommissionableByCommissioningMode" - label: "TXT key for Vendor ID and Product ID (VP)" - PICS: VP_KEY + PICS: MCORE.SC.VP_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -144,7 +144,7 @@ tests: value: vendorId - label: "TXT key for Vendor ID and Product ID (VP)" - PICS: VP_KEY + PICS: MCORE.SC.VP_KEY optional: true cluster: "DiscoveryCommands" command: "FindCommissionable" @@ -154,7 +154,7 @@ tests: value: productId - label: "Optional TXT key for MRP Retry Interval Idle (CRI)" - PICS: CRI_COMM_DISCOVERY_KEY + PICS: MCORE.SC.SII_OP_DISCOVERY_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -164,7 +164,7 @@ tests: maxValue: 3600000 - label: "Optional TXT key for MRP Retry Interval Active (CRA)" - PICS: CRA_COMM_DISCOVERY_KEY + PICS: MCORE.SC.SAI_OP_DISCOVERY_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -182,7 +182,7 @@ tests: value: 1 - label: "Optional TXT key for device type (DT)" - PICS: PICS_SKIP_SAMPLE_APP && DT_KEY + PICS: PICS_SKIP_SAMPLE_APP && MCORE.SC.DT_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -193,7 +193,7 @@ tests: maxValue: 999 - label: "Optional TXT key for device name (DN)" - PICS: DN_KEY + PICS: MCORE.SC.DN_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -203,7 +203,7 @@ tests: maxLength: 32 - label: "Optional TXT key for rotating device identifier (RI)" - PICS: RI_KEY + PICS: MCORE.SC.RI_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -213,7 +213,7 @@ tests: maxValue: 100 - label: "Optional TXT key for pairing hint (PH)" - PICS: PH_KEY + PICS: MCORE.SC.PH_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -223,7 +223,7 @@ tests: notValue: 0 - label: "Optional TXT key for pairing instructions (PI)" - PICS: PI_KEY + PICS: MCORE.SC.PI_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -242,6 +242,7 @@ tests: minValue: 1 - label: "Stop target device" + PICS: PICS_SDK_CI_ONLY cluster: "SystemCommands" command: "Stop" @@ -249,12 +250,26 @@ tests: "Start target device with the provided discriminator for basic commissioning advertisement" cluster: "SystemCommands" + PICS: PICS_SDK_CI_ONLY command: "Start" arguments: values: - name: "discriminator" value: discriminator + - label: "TH is rebooted" + verification: | + Not implemented in YAML + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Please reboot the TH and enter 'y' after TH starts" + - name: "expectedValue" + value: "y" + - label: "Wait for the commissioned device to be retrieved" cluster: "DelayCommands" command: "WaitForCommissionee" @@ -288,7 +303,7 @@ tests: #validate the service type and the service domain not implemented in CI - label: "Check Hostname" - PICS: "(WIFI || ETH) && !THREAD" + PICS: "( MCORE.SC.WIFI || MCORE.SC.ETH ) && !MCORE.SC.THR " cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -301,7 +316,7 @@ tests: isHexString: true - label: "Check Hostname" - PICS: "PICS_SKIP_SAMPLE_APP && (!WIFI && !ETH) && THREAD" + PICS: "( !MCORE.SC.WIFI && !MCORE.SC.ETH ) && MCORE.SC.THR" cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -330,7 +345,7 @@ tests: value: discriminator - label: "Check Vendor ID (_V)" - PICS: VENDOR_SUBTYPE + PICS: MCORE.SC.VENDOR_SUBTYPE cluster: "DiscoveryCommands" command: "FindCommissionableByVendorId" arguments: @@ -339,7 +354,7 @@ tests: value: vendorId - label: "Check Device Type ID (_T)" - PICS: PICS_SKIP_SAMPLE_APP && DEVTYPE_SUBTYPE + PICS: PICS_SKIP_SAMPLE_APP && MCORE.SC.DEVTYPE_SUBTYPE cluster: "DiscoveryCommands" command: "FindCommissionableByDeviceType" arguments: @@ -352,7 +367,7 @@ tests: command: "FindCommissionableByCommissioningMode" - label: "TXT key for Vendor ID and Product ID (VP)" - PICS: VP_KEY + PICS: MCORE.SC.VP_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -361,7 +376,7 @@ tests: value: vendorId - label: "TXT key for Vendor ID and Product ID (VP)" - PICS: VP_KEY + PICS: MCORE.SC.VP_KEY optional: true cluster: "DiscoveryCommands" command: "FindCommissionable" @@ -371,7 +386,7 @@ tests: value: productId - label: "Optional TXT key for MRP Retry Interval Idle (CRI)" - PICS: CRI_COMM_DISCOVERY_KEY + PICS: MCORE.SC.SII_OP_DISCOVERY_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -381,7 +396,7 @@ tests: maxValue: 3600000 - label: "Optional TXT key for MRP Retry Interval Active (CRA)" - PICS: CRA_COMM_DISCOVERY_KEY + PICS: MCORE.SC.SAI_OP_DISCOVERY_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -399,7 +414,7 @@ tests: value: 1 - label: "Optional TXT key for device type (DT)" - PICS: PICS_SKIP_SAMPLE_APP && DT_KEY + PICS: PICS_SKIP_SAMPLE_APP && MCORE.SC.DT_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -410,7 +425,7 @@ tests: maxValue: 999 - label: "Optional TXT key for device name (DN)" - PICS: DN_KEY + PICS: MCORE.SC.DN_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -420,7 +435,7 @@ tests: maxLength: 32 - label: "Optional TXT key for rotating device identifier (RI)" - PICS: RI_KEY + PICS: MCORE.SC.RI_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -430,7 +445,7 @@ tests: maxValue: 100 - label: "Optional TXT key for pairing hint (PH)" - PICS: PH_KEY + PICS: MCORE.SC.PH_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -440,7 +455,7 @@ tests: notValue: 0 - label: "Optional TXT key for pairing instructions (PI)" - PICS: PI_KEY + PICS: MCORE.SC.PI_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_5.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_5.yaml index 54562b68394241..ac4478dcaf2d5c 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_5.yaml @@ -33,27 +33,13 @@ tests: - label: "By any means, DUT is instructed to perform an unicast UDP query to the DNS-SD Discovery Proxy on TH for services" + PICS: + MCORE.SC.SII_OP_DISCOVERY_KEY && MCORE.SC.SAI_OP_DISCOVERY_KEY && + MCORE.SC.T_KEY verification: | - 1. Proviosion the node(accessory/device) to thread network - - 2. Open the matter shell in the SDK and run resolve command, Verify if the device detects the published IP address and the Common Txt Key/Value Pairs , as advertised in the service. Ref below example. - - - uart:~$ matter dns resolve 9791300599901692208 10360380464321857174 - Resolving ... - uart:~$ I: 127317 [DIS]Node ID resolved for 0x8FC7772401CD0696 to [fd7b:a81b:9770:0:dea6:32ff:fe8d:7072]:22222 - DNS resolve for 87E1B004E235A130-8FC7772401CD0696 succeeded: - Hostname: ubuntuserverAcce - IP address: fd7b:a81b:9770:0:dea6:32ff:fe8d:7072 - Port: 22222 - MRP retry interval (idle): 3000ms - MRP retry interval (active): 4000ms - Supports TCP: no - - avahi-browse -rt _matter._tcp - + Verify on the TH Log: + eth0 IPv6 3A235FF3FA2DAC10-0000000000000055 _matter._tcp local + eth0 IPv4 3A235FF3FA2DAC10-0000000000000055 _matter._tcp local @@ -77,34 +63,25 @@ tests: disabled: true - label: "DUT must receive a notification with new data" + PICS: + MCORE.SC.SII_OP_DISCOVERY_KEY && MCORE.SC.SAI_OP_DISCOVERY_KEY && + MCORE.SC.T_KEY verification: | - 1. Open the matter shell in the SDK and run resolve command, Verify if the device detects updated values in the service, i..e Support TCP is '1'(Yes) - - - uart:~$ matter dns resolve 9791300599901692208 10360380464321857174 - Resolving ... - uart:~$ I: 542364 [DIS]Node ID resolved for 0x8FC7772401CD0696 to [fd7b:a81b:9770:0:dea6:32ff:fe8d:7072]:22222 - DNS resolve for 87E1B004E235A130-8FC7772401CD0696 succeeded: - Hostname: ubuntuserverAcce - IP address: fd7b:a81b:9770:0:dea6:32ff:fe8d:7072 - Port: 22222 - MRP retry interval (idle): 3000ms - MRP retry interval (active): 4000ms - Supports TCP: yes + avahi-browse -rt _matter._tcp + Verify on the TH Log: - avahi-browse -rt _matter._tcp + eth0 IPv6 3A235FF3FA2DAC10-0000000000000055 _matter._tcp local + eth0 IPv4 3A235FF3FA2DAC10-0000000000000055 _matter._tcp local = eth0 IPv4 3A235FF3FA2DAC10-0000000000000055 _matter._tcp local hostname = [D21165B5F440B033.local] address = [fd11:22::4b31:9932:cffe:b41a] port = [5540] - txt = ["T=0" "SAI=300" "SII=5000"] + txt = ["T=1" "SAI=300" "SII=5000"] = eth0 IPv6 3A235FF3FA2DAC10-0000000000000055 _matter._tcp local hostname = [D21165B5F440B033.local] address = [fd11:22::4b31:9932:cffe:b41a] port = [5540] - txt = ["T=0" "SAI=300" "SII=5000"] + txt = ["T=1" "SAI=300" "SII=5000"] disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_8.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_8.yaml index f7d859a2e71c72..590965b9a1d86a 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_8.yaml @@ -30,9 +30,12 @@ tests: ./chip-tool pairing onnetwork 2 20202021 - Assigned compressed fabric ID: 0xF3C001637A30CEEC - Assigned compressed fabric ID: 0xBE320A8460153487 - Assigned compressed fabric ID: 0x8A124463B858624F + + avahi-browse _matter._tcp -rt + + Verify on the TH Log: + + eth0 IPv6 8840D142C33AB653-0000000000000001 _matter._tcp local disabled: true - label: "Commission TH2 to DUTs Fabric" @@ -43,19 +46,26 @@ tests: ./chip-tool pairing ble-wifi 1 chipsetup4 matter123 20202021 3841 - Assigned compressed fabric ID: 0xF3C001637A30CEEC - Assigned compressed fabric ID: 0xBE320A8460153487 - Assigned compressed fabric ID: 0x8A124463B858624F + Verify you got below message Device commissioning completed with success + + + avahi-browse _matter._tcp -rt + + Verify on the TH Log: + + + eth0 IPv6 8840D142C33AB653-0000000000000001 _matter._tcp local disabled: true - label: "Send RemoveFabric from DUT to TH1 and comission DUT to TH1 again" verification: | ./chip-tool operationalcredentials remove-fabric 1 1 0 - Verify the below log on the DUT as client device + Verify in TH all-clusters-app log + + CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 [1651571274.154864][10562:10567] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 @@ -67,15 +77,19 @@ tests: ./chip-tool pairing ble-wifi 1 chipsetup4 matter123 20202021 3841 - Assigned compressed fabric ID: 0xF3C001637A30CEEC - Assigned compressed fabric ID: 0xBE320A8460153487 - Assigned compressed fabric ID: 0x8A124463B858624F + avahi-browse _matter._tcp -rt + + Verify on the TH Log: + + + eth0 IPv6 8840D142C33AB653-0000000000000001 _matter._tcp local disabled: true - label: "Send RemoveFabric from DUT to TH2 and comission DUT to TH2 again" verification: | ./chip-tool operationalcredentials remove-fabric 1 2 0 + Verify in TH all-clusters-app log + [1657628679275] [78509:912135] CHIP: [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 [1657628679275] [78509:912135] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 [1657628679275] [78509:912135] CHIP: [TOO] NOCResponse: { @@ -88,7 +102,9 @@ tests: ./chip-tool pairing onnetwork 2 20202021 - Assigned compressed fabric ID: 0xF3C001637A30CEEC - Assigned compressed fabric ID: 0xBE320A8460153487 - Assigned compressed fabric ID: 0x8A124463B858624F + avahi-browse _matter._tcp -rt + + Verify on the TH Log: + + + eth0 IPv6 8840D142C33AB653-0000000000000002 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml index 9b9b46ae11e8c4..9d2b3415f11a38 100644 --- a/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml @@ -11,110 +11,142 @@ # 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: 74.1.1. [TC-SWTCH-1.1] Global attributes with server as DUT config: nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 + cluster: "Switch" + endpoint: 1 tests: - - label: "Commission DUT to TH (can be skipped if done in a preceding test)" - verification: | - - disabled: true - - - label: "Read FeatureMap (global attribute 65532)" - verification: | - ./chip-tool switch read feature-map 1 1 - - Verify on the TH Log: - - [1655271856.827371][2855:2860] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_FFFC DataVersion: 4291766665 - [1655271856.827493][2855:2860] CHIP:TOO: FeatureMap: 1 - disabled: true - - - label: "Check values of flags in this FeatureMap" + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Read the global attribute: FeatureMap" + command: "readAttribute" + attribute: "FeatureMap" + response: + saveAs: FeatureMapValue + + - label: + "Read the FeatureMap value and verify LS is set to 1; MS, MSR, MSL, + MSM are all set to 0" PICS: SWTCH.S.F00 - verification: | - no Matter messages, but TH internal checking - disabled: true + command: "readAttribute" + attribute: "FeatureMap" + response: + value: FeatureMapValue - label: "Check values of flags in this FeatureMap" - PICS: SWTCH.S.F01 verification: | - no Matter messages, but TH internal checking - disabled: true + LS is set to 0; MS is set to 1 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && SWTCH.S.F01 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "Check values of flags in this FeatureMap" - PICS: SWTCH.S.F02 verification: | - no Matter messages, but TH internal checking - disabled: true + LS is set to 0; MS, MSR are set to 1 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && SWTCH.S.F02 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "Check values of flags in this FeatureMap" - PICS: SWTCH.S.F03 verification: | - no Matter messages, but TH internal checking - disabled: true + LS is set to 0; MS, MSR, MSL are all set to 1 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && SWTCH.S.F03 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "Check values of flags in this FeatureMap" - PICS: SWTCH.S.F04 - verification: | - no Matter messages, but TH internal checking - disabled: true - - - label: "Read ClusterRevision (global attribute 65533)" - verification: | - ./chip-tool switch read cluster-revision 1 1 - - Verify on the TH Log: - - [1651563714.073979][8331:8336] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_FFFD DataVersion: 3331396879 - [1651563714.074140][8331:8336] CHIP:TOO: ClusterRevision: 1 - disabled: true - - - label: "Read AttributeList (global attribute 65531)" verification: | - ./chip-tool switch read attribute-list 1 1 - - Verify on the TH Log: - - [1651563753.140074][8338:8343] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_FFFB DataVersion: 3331396879 - [1651563753.140200][8338:8343] CHIP:TOO: AttributeList: 8 entries - [1651563753.140246][8338:8343] CHIP:TOO: [1]: 0 - [1651563753.140283][8338:8343] CHIP:TOO: [2]: 1 - [1651563753.140319][8338:8343] CHIP:TOO: [3]: 2 - [1651563753.140355][8338:8343] CHIP:TOO: [4]: 65528 - [1651563753.140389][8338:8343] CHIP:TOO: [5]: 65529 - [1651563753.140425][8338:8343] CHIP:TOO: [6]: 65531 - [1651563753.140460][8338:8343] CHIP:TOO: [7]: 65532 - [1651563753.140495][8338:8343] CHIP:TOO: [8]: 65533 - disabled: true - - - label: "Read EventList (global attribute 65530)" + LS is set to 0; MS, MSR, MSM are all set to 1 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && SWTCH.S.F04 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: "read the global attribute: ClusterRevision" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + + - label: "Read the global attribute: AttributeList" + PICS: SWTCH.S.F04 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] + + - label: "Read the global attribute: AttributeList" + PICS: "!SWTCH.S.F04" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 65528, 65529, 65531, 65532, 65533] + + - label: "Read the global attribute: AcceptedCommandList" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [] + + - label: "Read the global attribute: GeneratedCommandList" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list + + #issue #15011 + - label: + "Read EventList attribute from the DUT and Verify that the DUT + response provides a list of supported events." verification: | OUT OF SCOPE FOR V1.0 - disabled: true - - - label: "Read AcceptedCommandList (global attribute 65529)" - verification: | - ./chip-tool switch read accepted-command-list 1 1 - - Verify on the TH Log: - - [1651563822.164319][8348:8353] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_FFF9 DataVersion: 3331396879 - [1651563822.164424][8348:8353] CHIP:TOO: AcceptedCommandList: 0 entries - disabled: true - - - label: "Read GeneratedCommandList (global attribute 65528)" - verification: | - ./chip-tool switch read generated-command-list 1 1 - - Verify on the TH Log: - - [1651563849.608873][8355:8361] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_FFF8 DataVersion: 3331396879 - [1651563849.608977][8355:8361] CHIP:TOO: GeneratedCommandList: 0 entries - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_2_1.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_2_1.yaml index 5f0653034876bf..d66ad3aa45f22a 100644 --- a/src/app/tests/suites/certification/Test_TC_SWTCH_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWTCH_2_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 2 constraints: - type: uint8 + type: int8u minValue: 2 - label: "Read CurrentPosition attribute" @@ -43,7 +43,7 @@ tests: response: value: 0 constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -54,6 +54,6 @@ tests: response: value: 2 constraints: - type: uint8 + type: int8u minValue: 2 maxValue: 255 diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml index e80d3e1c5bfb46..e9339db43775b9 100644 --- a/src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml @@ -13,7 +13,7 @@ # 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: 73.2.2. [TC-SWTCH-2.2] Primary functionality with server as DUT +name: 74.2.2. [TC-SWTCH-2.2] Primary functionality with server as DUT config: nodeId: 0x12344321 @@ -31,7 +31,7 @@ tests: verification: | ./chip-tool switch subscribe-event switch-latched 1 100 1 1 - Verify in TH Log: + Verify inTH Log: [1646209067.917157][2496:2501] CHIP:DMG: SubscribeResponseMessage = [1646209067.917184][2496:2501] CHIP:DMG: { @@ -53,7 +53,7 @@ tests: verification: | ./chip-tool switch read current-position 1 1 - Verify in TH Log: + Verify inTH Log: [1646209289.746157][2617:2622] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001DataVersion: 1206711661 [1646209289.746228][2617:2622] CHIP:TOO: current position: 0 @@ -70,6 +70,9 @@ tests: PICS: SWTCH.S.F00 verification: | ./chip-tool switch read current-position 1 1 + + Verify inTH Log: + [1646209289.746157][2617:2622] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001DataVersion: 1206711661 [1646209289.746228][2617:2622] CHIP:TOO: current position: 1 disabled: true @@ -81,7 +84,7 @@ tests: verification: | ./chip-tool switch read current-position 1 1 - Verify in TH Log: + Verify inTH Log: Event (content will vary on the device) [1646209167.923346][2190:2190] CHIP:DMG: StatusResponseMessage = @@ -98,7 +101,7 @@ tests: Read CurrentPosition attribute" PICS: SWTCH.S.F00 verification: | - 2 + disabled: true - label: "Operator returns switch to first position" @@ -111,8 +114,7 @@ tests: PICS: SWTCH.S.F00 verification: | ./chip-tool switch read current-position 1 1 - - Verify in TH Log: + Verify inTH Log: [1646209289.746157][2617:2622] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001DataVersion: 1206711661 [1646209289.746228][2617:2622] CHIP:TOO: current position: 0 @@ -122,8 +124,7 @@ tests: PICS: SWTCH.S.F01 verification: | ./chip-tool switch subscribe-event initial-press 1 100 1 1 - - Verify in TH Log: + Verify inTH Log: [1646209546.313236][2641:2646] CHIP:DMG: SubscribeResponseMessage = [1646209546.313263][2641:2646] CHIP:DMG: { @@ -146,7 +147,7 @@ tests: verification: | ./chip-tool switch read current-position 1 1 - Verify in TH Log: + Verify inTH Log: [1646209289.746157][2617:2622] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001DataVersion: 1206711661 [1646209289.746228][2617:2622] CHIP:TOO: current position: 0 @@ -162,6 +163,10 @@ tests: PICS: SWTCH.S.F01 verification: | ./chip-tool switch read current-position 1 1 + + Verify inTH Log: + [1646209289.746157][2617:2622] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001DataVersion: 1206711661 + [1646209289.746228][2617:2622] CHIP:TOO: current position: 1 disabled: true - label: "Operator does not operate switch (release switch)" @@ -173,15 +178,19 @@ tests: - label: "Read CurrentPosition attribute" PICS: SWTCH.S.F01 verification: | - Read attrbute + ./chip-tool switch read current-position 1 1 + + Verify inTH Log: + [1646209289.746157][2617:2622] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001DataVersion: 1206711661 + [1646209289.746228][2617:2622] CHIP:TOO: current position: 0 disabled: true - label: "Set up subscription to InitialPress and ShortRelease events" PICS: SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 verification: | - ./chip-tool switch subscribe-event initial-press 1 100 1 1 1 + ./chip-tool switch subscribe-event initial-press 1 100 1 1 - ./chip-tool switch subscribe-event short-release 1 100 1 1 1 + ./chip-tool switch subscribe-event short-release 1 100 1 1 disabled: true - label: "Operator does not operate switch" @@ -220,12 +229,12 @@ tests: LongRelease events" PICS: SWTCH.S.F01 && SWTCH.S.F03 verification: | + Verify inTH Log: + ./chip-tool switch subscribe-event initial-press 1 100 1 1 ./chip-tool switch subscribe-event short-release 1 100 1 1 - Verify in TH Log: - [1655272080.983330][2922:2927] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0003 [1655272080.983357][2922:2927] CHIP:TOO: Event number: 2 [1655272080.983380][2922:2927] CHIP:TOO: Priority: Info @@ -381,13 +390,13 @@ tests: MultiPressComplete events" PICS: SWTCH.S.F01 && SWTCH.S.F04 verification: | - ./chip-tool switch subscribe-event initial-press 1 100 1 1 1 + ./chip-tool switch subscribe-event initial-press 1 100 1 1 - ./chip-tool switch subscribe-event short-release 1 100 1 1 1 + ./chip-tool switch subscribe-event short-release 1 100 1 1 - ./chip-tool switch subscribe-event multi-press-ongoing 1 100 1 1 1 + ./chip-tool switch subscribe-event multi-press-ongoing 1 100 1 1 - ./chip-tool switch subscribe-event multi-press-complete 1 100 1 1 1 + ./chip-tool switch subscribe-event multi-press-complete 1 100 1 1 disabled: true - label: "Operator does not operate switch" @@ -432,7 +441,8 @@ tests: receive 2 events disabled: true - - label: "If MultiPressMax == 2, skip steps 6j .. 6o" + - label: + "If MultiPressMax == 2 (see 2c of TC-SWTCH-2.1), skip steps 6j .. 6o" PICS: SWTCH.S.F01 && SWTCH.S.F04 verification: | no Matter messages for this step diff --git a/src/app/tests/suites/certification/Test_TC_TGTNAV_1_9.yaml b/src/app/tests/suites/certification/Test_TC_TGTNAV_1_9.yaml index 627d1237d91d3b..8bbfe298a9748e 100644 --- a/src/app/tests/suites/certification/Test_TC_TGTNAV_1_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_TGTNAV_1_9.yaml @@ -36,7 +36,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -44,25 +44,24 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" - PICS: TGTNAV.S.A0001 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [0, 1, 65528, 65529, 65531, 65532, 65533] + contains: [0, 65528, 65529, 65531, 65532, 65533] - - label: "Read the global attribute: AttributeList" - PICS: " !TGTNAV.S.A0001 " + - label: "Read the optional attribute(CurrentTarget) in AttributeList" + PICS: TGTNAV.S.A0001 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [0, 65528, 65529, 65531, 65532, 65533] + contains: [1] - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_TGTNAV_8_1.yaml b/src/app/tests/suites/certification/Test_TC_TGTNAV_8_1.yaml index a58b42e1735c7d..c7ffec68e69bd4 100644 --- a/src/app/tests/suites/certification/Test_TC_TGTNAV_8_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TGTNAV_8_1.yaml @@ -19,10 +19,10 @@ config: cluster: "Target Navigator" endpoint: 1 targetvalue1: - type: INT8U + type: int8u defaultValue: 1 targetvalue2: - type: INT8U + type: int8u defaultValue: 2 tests: @@ -40,7 +40,7 @@ tests: attribute: "CurrentTarget" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -62,7 +62,7 @@ tests: value: targetvalue1 - label: "Reads the CurrentTarget attribute" - PICS: TGTNAV.S.A0001 + PICS: TGTNAV.S.A0001 && TGTNAV.S.C0000 command: "readAttribute" attribute: "CurrentTarget" response: diff --git a/src/app/tests/suites/certification/Test_TC_TMP_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TMP_1_1.yaml index bcc8ce2b45645f..c3e466ff57ca6c 100644 --- a/src/app/tests/suites/certification/Test_TC_TMP_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TMP_1_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 4 constraints: - type: unit16 + type: int16u - label: "Read FeatureMap attribute from the DUT" command: "readAttribute" @@ -42,30 +42,30 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" - PICS: TMP.S.A0003 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533] + contains: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] - - label: "Read the global attribute: AttributeList" - PICS: " !TMP.S.A0003 " + - label: "Read the optional attribute(Tolerance) in AttributeList" + PICS: TMP.S.A0003 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] + contains: [3] - label: "Read AcceptedCommandList attribute from the DUT" command: "readAttribute" attribute: "AcceptedCommandList" response: + value: [] constraints: type: list diff --git a/src/app/tests/suites/certification/Test_TC_TMP_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TMP_2_1.yaml index 4b0018e94e38df..37baa132bb605b 100644 --- a/src/app/tests/suites/certification/Test_TC_TMP_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TMP_2_1.yaml @@ -28,42 +28,42 @@ tests: - name: "nodeId" value: nodeId - - label: "read the mandatory attribute: MeasuredValue" + - label: "Read the mandatory attribute: MeasuredValue" PICS: TMP.S.A0000 command: "readAttribute" attribute: "MeasuredValue" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 - - label: "read the mandatory attribute: MinMeasuredValue" + - label: "Read the mandatory attribute: MinMeasuredValue" PICS: TMP.S.A0001 command: "readAttribute" attribute: "MinMeasuredValue" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 - - label: "read the mandatory attribute: MaxMeasuredValue" + - label: "Read the mandatory attribute: MaxMeasuredValue" PICS: TMP.S.A0002 command: "readAttribute" attribute: "MaxMeasuredValue" response: constraints: - type: int16 + type: int16s minValue: -27314 maxValue: 32767 - - label: "read the optional attribute: Tolerance" + - label: "Read the optional attribute: Tolerance" PICS: TMP.S.A0003 command: "readAttribute" attribute: "Tolerance" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 2048 diff --git a/src/app/tests/suites/certification/Test_TC_TMP_2_2.yaml b/src/app/tests/suites/certification/Test_TC_TMP_2_2.yaml index c0ee0370643242..1caecd702318e1 100644 --- a/src/app/tests/suites/certification/Test_TC_TMP_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TMP_2_2.yaml @@ -28,23 +28,23 @@ tests: - name: "nodeId" value: nodeId - - label: "read the mandatory attribute: MinMeasuredValue" + - label: "Read the mandatory attribute: MinMeasuredValue" PICS: TMP.S.A0001 command: "readAttribute" attribute: "MinMeasuredValue" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32766 - - label: "read the mandatory attribute: MaxMeasuredValue" + - label: "Read the mandatory attribute: MaxMeasuredValue" PICS: TMP.S.A0002 command: "readAttribute" attribute: "MaxMeasuredValue" response: constraints: - type: int16 + type: int16s minValue: -27314 maxValue: 32767 @@ -55,9 +55,9 @@ tests: response: saveAs: valueBeforeChange constraints: - type: uint16 - minValue: 0 - maxValue: 65535 + type: int16s + minValue: -27314 + maxValue: 32767 - label: "Operate on device to change the temperature significantly" cluster: "LogCommands" @@ -73,10 +73,10 @@ tests: - label: "Read the mandatory attribute: MeasuredValue" command: "readAttribute" attribute: "MeasuredValue" - PICS: TMP.S.A0000 + PICS: TMP.S.A0000 && TMP.M.ManuallyControlled response: constraints: - type: uint16 - minValue: 0 - maxValue: 65535 + type: int16s + minValue: -27314 + maxValue: 32767 notValue: valueBeforeChange diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml index df0aabef7cabff..ba9181bc229551 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 5 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" PICS: @@ -44,7 +44,7 @@ tests: attribute: "FeatureMap" response: constraints: - type: map32 + type: bitmap32 minValue: 1 maxValue: 63 diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml index 1ddc6392d490df..a0ffea63eb050f 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml @@ -33,7 +33,7 @@ tests: attribute: "LocalTemperature" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 @@ -43,7 +43,7 @@ tests: attribute: "OutdoorTemperature" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 @@ -53,7 +53,7 @@ tests: attribute: "Occupancy" response: constraints: - type: int16 + type: bitmap8 minValue: 0 maxValue: 1 @@ -63,7 +63,7 @@ tests: attribute: "AbsMinHeatSetpointLimit" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 @@ -73,7 +73,7 @@ tests: attribute: "AbsMaxHeatSetpointLimit" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 @@ -83,7 +83,7 @@ tests: attribute: "AbsMinCoolSetpointLimit" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 @@ -93,7 +93,7 @@ tests: attribute: "AbsMaxCoolSetpointLimit" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 @@ -103,7 +103,7 @@ tests: attribute: "PICoolingDemand" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 100 @@ -113,7 +113,7 @@ tests: attribute: "PIHeatingDemand" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 100 @@ -123,7 +123,7 @@ tests: attribute: "HVACSystemTypeConfiguration" response: constraints: - type: map8 + type: bitmap8 minValue: 0 maxValue: 63 @@ -133,7 +133,7 @@ tests: attribute: "LocalTemperatureCalibration" response: constraints: - type: int8 + type: int8s minValue: 25 maxValue: -25 @@ -143,7 +143,7 @@ tests: attribute: "OccupiedCoolingSetpoint" response: constraints: - type: int16 + type: int16s minValue: 1600 maxValue: 3200 @@ -153,7 +153,7 @@ tests: attribute: "OccupiedHeatingSetpoint" response: constraints: - type: int16 + type: int16s minValue: 700 maxValue: 3000 @@ -163,7 +163,7 @@ tests: attribute: "UnoccupiedCoolingSetpoint" response: constraints: - type: int16 + type: int16s minValue: 1600 maxValue: 3200 @@ -173,7 +173,7 @@ tests: attribute: "UnoccupiedHeatingSetpoint" response: constraints: - type: int16 + type: int16s minValue: 700 maxValue: 3000 @@ -183,7 +183,7 @@ tests: attribute: "MinHeatSetpointLimit" response: constraints: - type: int16 + type: int16s minValue: 700 maxValue: 3000 @@ -193,7 +193,7 @@ tests: attribute: "MaxHeatSetpointLimit" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 @@ -203,7 +203,7 @@ tests: attribute: "MinCoolSetpointLimit" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 @@ -213,7 +213,7 @@ tests: attribute: "MaxCoolSetpointLimit" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 @@ -223,7 +223,7 @@ tests: attribute: "MinSetpointDeadBand" response: constraints: - type: int8 + type: int8s minValue: 0 maxValue: 25 @@ -233,7 +233,7 @@ tests: attribute: "RemoteSensing" response: constraints: - type: map8 + type: bitmap8 minValue: 0 maxValue: 7 @@ -281,7 +281,7 @@ tests: attribute: "NumberOfWeeklyTransitions" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -291,7 +291,7 @@ tests: attribute: "NumberOfDailyTransitions" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -311,7 +311,7 @@ tests: attribute: "TemperatureSetpointHoldDuration" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 1440 @@ -321,7 +321,7 @@ tests: attribute: "ThermostatProgrammingOperationMode" response: constraints: - type: map8 + type: bitmap8 minValue: 0 maxValue: 7 @@ -331,7 +331,7 @@ tests: attribute: "ThermostatRunningState" response: constraints: - type: map16 + type: bitmap16 minValue: 0 maxValue: 127 @@ -351,7 +351,7 @@ tests: attribute: "SetpointChangeAmount" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 @@ -369,7 +369,7 @@ tests: attribute: "OccupiedSetback" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -379,7 +379,7 @@ tests: attribute: "OccupiedSetbackMin" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -389,7 +389,7 @@ tests: attribute: "OccupiedSetbackMax" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -399,7 +399,7 @@ tests: attribute: "UnoccupiedSetback" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -409,7 +409,7 @@ tests: attribute: "UnoccupiedSetbackMin" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -419,7 +419,7 @@ tests: attribute: "UnoccupiedSetbackMax" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -429,7 +429,7 @@ tests: attribute: "EmergencyHeatDelta" response: constraints: - type: uint8 + type: int8u minValue: 0 maxValue: 255 @@ -449,7 +449,7 @@ tests: attribute: "ACCapacity" response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -479,7 +479,7 @@ tests: attribute: "ACErrorCode" response: constraints: - type: map32 + type: bitmap32 - label: "Read ACLouverPosition attribute from the DUT" PICS: TSTAT.S.A0045 @@ -497,7 +497,7 @@ tests: attribute: "ACCoilTemperature" response: constraints: - type: int16 + type: int16s minValue: -27315 maxValue: 32767 diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_2_2.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_2_2.yaml index b6ef39e12cb377..4b0328d502a885 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_2_2.yaml @@ -36,7 +36,7 @@ tests: PICS: TSTAT.S.F01 response: constraints: - type: int16 + type: int16s minValue: 1600 maxValue: 3200 @@ -117,7 +117,7 @@ tests: PICS: TSTAT.S.F00 response: constraints: - type: int16 + type: int16s minValue: 700 maxValue: 3000 @@ -208,7 +208,7 @@ tests: response: value: 2600 constraints: - type: int16 + type: int16s minValue: 1600 maxValue: 3200 @@ -279,7 +279,7 @@ tests: response: value: 2000 constraints: - type: int16 + type: int16s minValue: 700 maxValue: 3000 @@ -351,7 +351,7 @@ tests: response: value: 700 constraints: - type: int16 + type: int16s minValue: 700 maxValue: 3000 @@ -431,7 +431,7 @@ tests: response: value: 3000 constraints: - type: int16 + type: int16s minValue: 700 maxValue: 3000 @@ -522,7 +522,7 @@ tests: response: value: 1600 constraints: - type: int16 + type: int16s minValue: 1600 maxValue: 3200 @@ -601,7 +601,7 @@ tests: response: value: 3200 constraints: - type: int16 + type: int16s minValue: 1600 maxValue: 3200 @@ -706,7 +706,7 @@ tests: response: value: 25 constraints: - type: temp-s8 + type: int8s minValue: 0 maxValue: 25 diff --git a/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml index fabe547f94e490..34cb80974ef93e 100644 --- a/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 2 constraints: - type: uint16 + type: int16u - label: "Read FeatureMap attribute from the DUT" command: "readAttribute" @@ -42,7 +42,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_TSUIC_2_2.yaml b/src/app/tests/suites/certification/Test_TC_TSUIC_2_2.yaml index bd11c9f5e0fd53..720b53de9e8c8e 100644 --- a/src/app/tests/suites/certification/Test_TC_TSUIC_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSUIC_2_2.yaml @@ -38,7 +38,7 @@ tests: - label: "Verify device temperature displayed in °C" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && TSUIC.S.A0000 arguments: values: - name: "message" @@ -63,7 +63,7 @@ tests: - label: "Verify device temperature displayed in °F" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && TSUIC.S.A0000 arguments: values: - name: "message" @@ -106,7 +106,7 @@ tests: - label: "Verify all device functionality available to the user" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && TSUIC.S.A0001 arguments: values: - name: "message" @@ -131,7 +131,7 @@ tests: - label: "Verify device operates at Level 1 reduced functionality" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && TSUIC.S.A0001 arguments: values: - name: "message" @@ -156,7 +156,7 @@ tests: - label: "Verify device operates at Level 2 reduced functionality" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && TSUIC.S.A0001 arguments: values: - name: "message" @@ -181,7 +181,7 @@ tests: - label: "Verify device operates at Level 3 reduced functionality" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && TSUIC.S.A0001 arguments: values: - name: "message" @@ -206,7 +206,7 @@ tests: - label: "Verify device operates at Level 4 reduced functionality" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && TSUIC.S.A0001 arguments: values: - name: "message" @@ -231,7 +231,7 @@ tests: - label: "Verify device operates at least functionality level" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && TSUIC.S.A0001 arguments: values: - name: "message" @@ -265,7 +265,7 @@ tests: - label: "Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT" - PICS: TSUIC.S.A0001 + PICS: TSUIC.S.A0002 command: "writeAttribute" attribute: "schedule programming visibility" arguments: @@ -276,7 +276,7 @@ tests: thermostat" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && TSUIC.S.A0002 arguments: values: - name: "message" @@ -304,7 +304,7 @@ tests: thermostat" cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && TSUIC.S.A0002 arguments: values: - name: "message" diff --git a/src/app/tests/suites/certification/Test_TC_TSUIC_3_1.yaml b/src/app/tests/suites/certification/Test_TC_TSUIC_3_1.yaml index cbaad5712e4885..e2baf5004b94a0 100644 --- a/src/app/tests/suites/certification/Test_TC_TSUIC_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSUIC_3_1.yaml @@ -25,76 +25,64 @@ tests: "DUT reads all supported mandatory attributes from TH one at a time in a manufacturer specific order" verification: | - ./chip-tool thermostatuserinterfaceconfiguration read temperature-display-mode 12345 1 - - - Verify in TH all-clusters-app Log: - - [1650966000.959191][11186:11191] CHIP:DMG: ReportDataMessage = - [1650966000.959287][11186:11191] CHIP:DMG: { - [1650966000.959338][11186:11191] CHIP:DMG: AttributeReportIBs = - [1650966000.959390][11186:11191] CHIP:DMG: [ - [1650966000.959430][11186:11191] CHIP:DMG: AttributeReportIB = - [1650966000.959504][11186:11191] CHIP:DMG: { - [1650966000.959548][11186:11191] CHIP:DMG: AttributeDataIB = - [1650966000.959613][11186:11191] CHIP:DMG: { - [1650966000.959682][11186:11191] CHIP:DMG: DataVersion = 0x90d9261a, - [1650966000.959736][11186:11191] CHIP:DMG: AttributePathIB = - [1650966000.959803][11186:11191] CHIP:DMG: { - [1650966000.959861][11186:11191] CHIP:DMG: Endpoint = 0x1, - [1650966000.959934][11186:11191] CHIP:DMG: Cluster = 0x204, - [1650966000.960001][11186:11191] CHIP:DMG: Attribute = 0x0000_0000, - [1650966000.960055][11186:11191] CHIP:DMG: } - [1650966000.960128][11186:11191] CHIP:DMG: - [1650966000.960191][11186:11191] CHIP:DMG: Data = 0, - [1650966000.960259][11186:11191] CHIP:DMG: }, - [1650966000.960328][11186:11191] CHIP:DMG: - [1650966000.960374][11186:11191] CHIP:DMG: }, - [1650966000.960441][11186:11191] CHIP:DMG: - [1650966000.960481][11186:11191] CHIP:DMG: ], - [1650966000.960545][11186:11191] CHIP:DMG: - [1650966000.960588][11186:11191] CHIP:DMG: SuppressResponse = true, - [1650966000.960645][11186:11191] CHIP:DMG: InteractionModelRevision = 1 - [1650966000.960684][11186:11191] CHIP:DMG: } - [1650966000.960934][11186:11191] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_0000 DataVersion: 2430150170 - [1650966000.961031][11186:11191] CHIP:TOO: temperature display mode: 0 - - - - - ./chip-tool thermostatuserinterfaceconfiguration read keypad-lockout 12345 1 - - Verify in TH all-clusters-app Log: - - - [1650966035.736227][11195:11200] CHIP:DMG: ReportDataMessage = - [1650966035.736277][11195:11200] CHIP:DMG: { - [1650966035.736317][11195:11200] CHIP:DMG: AttributeReportIBs = - [1650966035.736374][11195:11200] CHIP:DMG: [ - [1650966035.736419][11195:11200] CHIP:DMG: AttributeReportIB = - [1650966035.736484][11195:11200] CHIP:DMG: { - [1650966035.736532][11195:11200] CHIP:DMG: AttributeDataIB = - [1650966035.736589][11195:11200] CHIP:DMG: { - [1650966035.736649][11195:11200] CHIP:DMG: DataVersion = 0x90d9261a, - [1650966035.736708][11195:11200] CHIP:DMG: AttributePathIB = - [1650966035.736770][11195:11200] CHIP:DMG: { - [1650966035.736832][11195:11200] CHIP:DMG: Endpoint = 0x1, - [1650966035.736892][11195:11200] CHIP:DMG: Cluster = 0x204, - [1650966035.736962][11195:11200] CHIP:DMG: Attribute = 0x0000_0001, - [1650966035.737028][11195:11200] CHIP:DMG: } - [1650966035.737092][11195:11200] CHIP:DMG: - [1650966035.737155][11195:11200] CHIP:DMG: Data = 0, - [1650966035.737216][11195:11200] CHIP:DMG: }, - [1650966035.737279][11195:11200] CHIP:DMG: - [1650966035.737328][11195:11200] CHIP:DMG: }, - [1650966035.737387][11195:11200] CHIP:DMG: - [1650966035.737431][11195:11200] CHIP:DMG: ], - [1650966035.737486][11195:11200] CHIP:DMG: - [1650966035.737532][11195:11200] CHIP:DMG: SuppressResponse = true, - [1650966035.737579][11195:11200] CHIP:DMG: InteractionModelRevision = 1 - [1650966035.737622][11195:11200] CHIP:DMG: } - [1650966035.737848][11195:11200] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_0001 DataVersion: 2430150170 - [1650966035.737952][11195:11200] CHIP:TOO: keypad lockout: 0" + ./chip-tool thermostatuserinterfaceconfiguration read temperature-display-mode 1 1 + verify On TH(Reference app) receives the right Read Request Message for the data sent in the above command + [1658142864.198892][13946:13946] CHIP:IM: Received Read request + [1658142864.198979][13946:13946] CHIP:DMG: ReadRequestMessage = + [1658142864.199008][13946:13946] CHIP:DMG: { + [1658142864.199032][13946:13946] CHIP:DMG: AttributePathIBs = + [1658142864.199059][13946:13946] CHIP:DMG: [ + [1658142864.199085][13946:13946] CHIP:DMG: AttributePathIB = + [1658142864.199114][13946:13946] CHIP:DMG: { + [1658142864.199144][13946:13946] CHIP:DMG: Endpoint = 0x1, + [1658142864.199181][13946:13946] CHIP:DMG: Cluster = 0x204, + [1658142864.199221][13946:13946] CHIP:DMG: Attribute = 0x0000_0000, + [1658142864.199253][13946:13946] CHIP:DMG: } + [1658142864.199284][13946:13946] CHIP:DMG: + [1658142864.199311][13946:13946] CHIP:DMG: ], + [1658142864.199341][13946:13946] CHIP:DMG: + [1658142864.199369][13946:13946] CHIP:DMG: isFabricFiltered = true, + [1658142864.199396][13946:13946] CHIP:DMG: InteractionModelRevision = 1 + [1658142864.199421][13946:13946] CHIP:DMG: }, + [1658142864.199502][13946:13946] CHIP:DMG: IM RH moving to [GeneratingReports] + + On DUT as a client side, verify that TH all-clusters-app sent temperature display mode attribute value + [1658142864.203659][8868:8873] CHIP:DMG: } + [1658142864.203865][8868:8873] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_0000 DataVersion: 682086754 + [1658142864.203966][8868:8873] CHIP:TOO: temperature display mode: 0 + [1658142864.204082][8868:8873] CHIP:EM: Sending Standalone Ack for MessageCounter:26677540 on exchange 12305i + + + + + + ./chip-tool thermostatuserinterfaceconfiguration read keypad-lockout 1 1 + verify On TH(Reference app) receives the right Read Request Message for the data sent in the above command + [1658142905.390042][13946:13946] CHIP:IM: Received Read request + [1658142905.390148][13946:13946] CHIP:DMG: ReadRequestMessage = + [1658142905.390177][13946:13946] CHIP:DMG: { + [1658142905.390199][13946:13946] CHIP:DMG: AttributePathIBs = + [1658142905.390225][13946:13946] CHIP:DMG: [ + [1658142905.390249][13946:13946] CHIP:DMG: AttributePathIB = + [1658142905.390276][13946:13946] CHIP:DMG: { + [1658142905.390304][13946:13946] CHIP:DMG: Endpoint = 0x1, + [1658142905.390335][13946:13946] CHIP:DMG: Cluster = 0x204, + [1658142905.390370][13946:13946] CHIP:DMG: Attribute = 0x0000_0001, + [1658142905.390400][13946:13946] CHIP:DMG: } + [1658142905.390430][13946:13946] CHIP:DMG: + [1658142905.390455][13946:13946] CHIP:DMG: ], + [1658142905.390483][13946:13946] CHIP:DMG: + [1658142905.390509][13946:13946] CHIP:DMG: isFabricFiltered = true, + [1658142905.390534][13946:13946] CHIP:DMG: InteractionModelRevision = 1 + [1658142905.390557][13946:13946] CHIP:DMG: }, + [1658142905.390634][13946:13946] CHIP:DMG: IM RH moving to [GeneratingReports] + [1658142905.390718][13946:13946] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + + On DUT as a client side, verify that TH all-clusters-app sent keypad lockout attribute value + [1658142905.393178][8876:8881] CHIP:DMG: } + [1658142905.393364][8876:8881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_0001 DataVersion: 682086754 + [1658142905.393454][8876:8881] CHIP:TOO: keypad lockout: 0 + [1658142905.393558][8876:8881] CHIP:EM: Sending Standalone Ack for MessageCounter:118574768 on exchange 20562i disabled: true - label: @@ -102,88 +90,107 @@ tests: a manufacturer specific order" verification: | ./chip-tool thermostatuserinterfaceconfiguration read schedule-programming-visibility 1 1 - - Verify in TH all-clusters-app Log: - [1654689278.722504][8215:8215] CHIP:DMG: ReadRequestMessage = - [1654689278.722531][8215:8215] CHIP:DMG: { - [1654689278.722552][8215:8215] CHIP:DMG: AttributePathIBs = - [1654689278.722578][8215:8215] CHIP:DMG: [ - [1654689278.722602][8215:8215] CHIP:DMG: AttributePathIB = - [1654689278.722638][8215:8215] CHIP:DMG: { - [1654689278.722667][8215:8215] CHIP:DMG: Endpoint = 0x1, - [1654689278.722703][8215:8215] CHIP:DMG: Cluster = 0x204, - [1654689278.722739][8215:8215] CHIP:DMG: Attribute = 0x0000_0002, - [1654689278.722766][8215:8215] CHIP:DMG: } - [1654689278.722792][8215:8215] CHIP:DMG: - [1654689278.722814][8215:8215] CHIP:DMG: ], - [1654689278.722843][8215:8215] CHIP:DMG: - [1654689278.722870][8215:8215] CHIP:DMG: isFabricFiltered = true, - [1654689278.722895][8215:8215] CHIP:DMG: InteractionModelRevision = 1 - [1654689278.722919][8215:8215] CHIP:DMG: }, - [1654689278.723033][8215:8215] CHIP:DMG: IM RH moving to [GeneratingReports] - [1654689278.723134][8215:8215] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + verify On TH(Reference app) receives the right Read Request Message for the data sent in the above command + [1658143293.502829][13946:13946] CHIP:EM: Handling via exchange: 655r, Delegate: 0xaaaad3403ed0 + [1658143293.502867][13946:13946] CHIP:IM: Received Read request + [1658143293.502943][13946:13946] CHIP:DMG: ReadRequestMessage = + [1658143293.502969][13946:13946] CHIP:DMG: { + [1658143293.503018][13946:13946] CHIP:DMG: AttributePathIBs = + [1658143293.503046][13946:13946] CHIP:DMG: [ + [1658143293.503069][13946:13946] CHIP:DMG: AttributePathIB = + [1658143293.503097][13946:13946] CHIP:DMG: { + [1658143293.503125][13946:13946] CHIP:DMG: Endpoint = 0x1, + [1658143293.503159][13946:13946] CHIP:DMG: Cluster = 0x204, + [1658143293.503190][13946:13946] CHIP:DMG: Attribute = 0x0000_0002, + [1658143293.503218][13946:13946] CHIP:DMG: } + [1658143293.503248][13946:13946] CHIP:DMG: + [1658143293.503273][13946:13946] CHIP:DMG: ], + [1658143293.503300][13946:13946] CHIP:DMG: + [1658143293.503326][13946:13946] CHIP:DMG: isFabricFiltered = true, + [1658143293.503351][13946:13946] CHIP:DMG: InteractionModelRevision = 1 + [1658143293.503374][13946:13946] CHIP:DMG: }, + [1658143293.503450][13946:13946] CHIP:DMG: IM RH moving to [GeneratingReports] + + On DUT as a client side, verify that TH all-clusters-app sent schedule programming visibility attribute value + [1658143293.447125][8901:8906] CHIP:DMG: } + [1658143293.447279][8901:8906] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_0002 DataVersion: 682086754 + [1658143293.447352][8901:8906] CHIP:TOO: schedule programming visibility: 0 + [1658143293.447431][8901:8906] CHIP:EM: Sending Standalone Ack for MessageCounter:142018492 on exchange 655i disabled: true - label: "DUT writes a suitable value to all supported mandatory attributes on the TH one at a time in a manufacturer specific order" verification: | - ./chip-tool thermostatuserinterfaceconfiguration write temperature-display-mode 1 1 1 - - Verify in TH all-clusters-app Log: - [1649674212.150303][2241:2241] CHIP:DMG: WriteRequestMessage = - [1649674212.150341][2241:2241] CHIP:DMG: { - [1649674212.150375][2241:2241] CHIP:DMG: suppressResponse = false, - [1649674212.150414][2241:2241] CHIP:DMG: timedRequest = false, - [1649674212.150464][2241:2241] CHIP:DMG: AttributeDataIBs = - [1649674212.150509][2241:2241] CHIP:DMG: [ - [1649674212.150558][2241:2241] CHIP:DMG: AttributeDataIB = - [1649674212.150616][2241:2241] CHIP:DMG: { - [1649674212.150656][2241:2241] CHIP:DMG: AttributePathIB = - [1649674212.150714][2241:2241] CHIP:DMG: { - [1649674212.150766][2241:2241] CHIP:DMG: Endpoint = 0x1, - [1649674212.150830][2241:2241] CHIP:DMG: Cluster = 0x204, - [1649674212.150893][2241:2241] CHIP:DMG: Attribute = 0x0000_0000, - [1649674212.150945][2241:2241] CHIP:DMG: } - [1649674212.151007][2241:2241] CHIP:DMG: - [1649674212.151057][2241:2241] CHIP:DMG: Data = 1, - [1649674212.151114][2241:2241] CHIP:DMG: }, - [1649674212.151199][2241:2241] CHIP:DMG: - [1649674212.151239][2241:2241] CHIP:DMG: ], - [1649674212.151284][2241:2241] CHIP:DMG: - [1649674212.151333][2241:2241] CHIP:DMG: moreChunkedMessages = false, - [1649674212.151371][2241:2241] CHIP:DMG: InteractionModelRevision = 1 - [1649674212.151417][2241:2241] CHIP:DMG: }, - - - ./chip-tool thermostatuserinterfaceconfiguration write keypad-lockout 1 1 1 - - - Verify in TH all-clusters-app Log: - [1649674352.430976][2241:2241] CHIP:DMG: WriteRequestMessage = - [1649674352.431028][2241:2241] CHIP:DMG: { - [1649674352.431064][2241:2241] CHIP:DMG: suppressResponse = false, - [1649674352.431116][2241:2241] CHIP:DMG: timedRequest = false, - [1649674352.431153][2241:2241] CHIP:DMG: AttributeDataIBs = - [1649674352.431227][2241:2241] CHIP:DMG: [ - [1649674352.431277][2241:2241] CHIP:DMG: AttributeDataIB = - [1649674352.431342][2241:2241] CHIP:DMG: { - [1649674352.431382][2241:2241] CHIP:DMG: AttributePathIB = - [1649674352.431440][2241:2241] CHIP:DMG: { - [1649674352.431491][2241:2241] CHIP:DMG: Endpoint = 0x1, - [1649674352.431555][2241:2241] CHIP:DMG: Cluster = 0x204, - [1649674352.431618][2241:2241] CHIP:DMG: Attribute = 0x0000_0001, - [1649674352.431665][2241:2241] CHIP:DMG: } - [1649674352.431728][2241:2241] CHIP:DMG: - [1649674352.431778][2241:2241] CHIP:DMG: Data = 1, - [1649674352.431823][2241:2241] CHIP:DMG: }, - [1649674352.431883][2241:2241] CHIP:DMG: - [1649674352.431919][2241:2241] CHIP:DMG: ], - [1649674352.431975][2241:2241] CHIP:DMG: - [1649674352.432012][2241:2241] CHIP:DMG: moreChunkedMessages = false, - [1649674352.432062][2241:2241] CHIP:DMG: InteractionModelRevision = 1 - [1649674352.432097][2241:2241] CHIP:DMG: }, + verify On TH(Reference app) receives the right write Request Message for the data sent in the above command + [1658143515.699171][13946:13946] CHIP:DMG: WriteRequestMessage = + [1658143515.699197][13946:13946] CHIP:DMG: { + [1658143515.699221][13946:13946] CHIP:DMG: suppressResponse = false, + [1658143515.699248][13946:13946] CHIP:DMG: timedRequest = false, + [1658143515.699272][13946:13946] CHIP:DMG: AttributeDataIBs = + [1658143515.699302][13946:13946] CHIP:DMG: [ + [1658143515.699326][13946:13946] CHIP:DMG: AttributeDataIB = + [1658143515.699362][13946:13946] CHIP:DMG: { + [1658143515.699388][13946:13946] CHIP:DMG: AttributePathIB = + [1658143515.699419][13946:13946] CHIP:DMG: { + [1658143515.699451][13946:13946] CHIP:DMG: Endpoint = 0x1, + [1658143515.699484][13946:13946] CHIP:DMG: Cluster = 0x204, + [1658143515.699514][13946:13946] CHIP:DMG: Attribute = 0x0000_0001, + [1658143515.699544][13946:13946] CHIP:DMG: } + [1658143515.699577][13946:13946] CHIP:DMG: + [1658143515.699609][13946:13946] CHIP:DMG: Data = 1, + [1658143515.699638][13946:13946] CHIP:DMG: }, + [1658143515.699667][13946:13946] CHIP:DMG: + [1658143515.699690][13946:13946] CHIP:DMG: ], + [1658143515.699719][13946:13946] CHIP:DMG: + [1658143515.699743][13946:13946] CHIP:DMG: moreChunkedMessages = false, + [1658143515.699768][13946:13946] CHIP:DMG: InteractionModelRevision = 1 + [1658143515.699792][13946:13946] CHIP:DMG: }, + [1658143515.699876][13946:13946] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0204 e=1 p=m + + On DUT as a client side, verify that TH all-clusters-app sent success response + [1658143515.619630][8919:8924] CHIP:DMG: StatusIB = + [1658143515.619669][8919:8924] CHIP:DMG: { + [1658143515.619707][8919:8924] CHIP:DMG: status = 0x00 (SUCCESS), + [1658143515.619747][8919:8924] CHIP:DMG: }, + + + + + ./chip-tool thermostatuserinterfaceconfiguration write keypad-lockout 1 1 1 + verify On TH(Reference app) receives the right write Request Message for the data sent in the above command + [1658143708.436060][13946:13946] CHIP:DMG: WriteRequestMessage = + [1658143708.436090][13946:13946] CHIP:DMG: { + [1658143708.436115][13946:13946] CHIP:DMG: suppressResponse = false, + [1658143708.436148][13946:13946] CHIP:DMG: timedRequest = false, + [1658143708.436176][13946:13946] CHIP:DMG: AttributeDataIBs = + [1658143708.436210][13946:13946] CHIP:DMG: [ + [1658143708.436238][13946:13946] CHIP:DMG: AttributeDataIB = + [1658143708.436269][13946:13946] CHIP:DMG: { + [1658143708.436295][13946:13946] CHIP:DMG: AttributePathIB = + [1658143708.436330][13946:13946] CHIP:DMG: { + [1658143708.436368][13946:13946] CHIP:DMG: Endpoint = 0x1, + [1658143708.436406][13946:13946] CHIP:DMG: Cluster = 0x204, + [1658143708.436444][13946:13946] CHIP:DMG: Attribute = 0x0000_0001, + [1658143708.436483][13946:13946] CHIP:DMG: } + [1658143708.436520][13946:13946] CHIP:DMG: + [1658143708.436561][13946:13946] CHIP:DMG: Data = 1, + [1658143708.436592][13946:13946] CHIP:DMG: }, + [1658143708.436627][13946:13946] CHIP:DMG: + [1658143708.436654][13946:13946] CHIP:DMG: ], + [1658143708.436686][13946:13946] CHIP:DMG: + [1658143708.436714][13946:13946] CHIP:DMG: moreChunkedMessages = false, + [1658143708.436743][13946:13946] CHIP:DMG: InteractionModelRevision = 1 + [1658143708.436770][13946:13946] CHIP:DMG: }, + [1658143708.436862][13946:13946] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0204 e=1 p=m + [1658143708.436903][13946:13946] CHIP:DMG: AccessControl: allowed + + On DUT as a client side, verify that TH all-clusters-app sent success response + [1658143708.341102][8933:8938] CHIP:DMG: StatusIB = + [1658143708.341156][8933:8938] CHIP:DMG: { + [1658143708.341211][8933:8938] CHIP:DMG: status = 0x00 (SUCCESS), + [1658143708.341257][8933:8938] CHIP:DMG: }, disabled: true - label: @@ -191,20 +198,40 @@ tests: the TH one at a time in a manufacturer specific order" verification: | ./chip-tool thermostatuserinterfaceconfiguration write schedule-programming-visibility 1 1 1 - - - Verify in TH all-clusters-app Log: - [1649673609.998586][2338:2344] CHIP:DMG: AttributePathIB = - [1649673609.998644][2338:2344] CHIP:DMG: { - [1649673609.998690][2338:2344] CHIP:DMG: Endpoint = 0x1, - [1649673609.998748][2338:2344] CHIP:DMG: Cluster = 0x204, - [1649673609.998805][2338:2344] CHIP:DMG: Attribute = 0x0000_0002, - [1649673609.998844][2338:2344] CHIP:DMG: } - [1649673609.998902][2338:2344] CHIP:DMG: - [1649673609.998945][2338:2344] CHIP:DMG: StatusIB = - [1649673609.999000][2338:2344] CHIP:DMG: { - [1649673609.999057][2338:2344] CHIP:DMG: status = 0x00 (SUCCESS), - [1649673609.999101][2338:2344] CHIP:DMG: }, + verify On TH(Reference app) receives the right write Request Message for the data sent in the above command + [1658143828.619738][13946:13946] CHIP:DMG: WriteRequestMessage = + [1658143828.619764][13946:13946] CHIP:DMG: { + [1658143828.619787][13946:13946] CHIP:DMG: suppressResponse = false, + [1658143828.619814][13946:13946] CHIP:DMG: timedRequest = false, + [1658143828.619838][13946:13946] CHIP:DMG: AttributeDataIBs = + [1658143828.619867][13946:13946] CHIP:DMG: [ + [1658143828.619891][13946:13946] CHIP:DMG: AttributeDataIB = + [1658143828.619919][13946:13946] CHIP:DMG: { + [1658143828.619944][13946:13946] CHIP:DMG: AttributePathIB = + [1658143828.619980][13946:13946] CHIP:DMG: { + [1658143828.620011][13946:13946] CHIP:DMG: Endpoint = 0x1, + [1658143828.620045][13946:13946] CHIP:DMG: Cluster = 0x204, + [1658143828.620078][13946:13946] CHIP:DMG: Attribute = 0x0000_0002, + [1658143828.620108][13946:13946] CHIP:DMG: } + [1658143828.620140][13946:13946] CHIP:DMG: + [1658143828.620172][13946:13946] CHIP:DMG: Data = 1, + [1658143828.620200][13946:13946] CHIP:DMG: }, + [1658143828.620228][13946:13946] CHIP:DMG: + [1658143828.620252][13946:13946] CHIP:DMG: ], + [1658143828.620280][13946:13946] CHIP:DMG: + [1658143828.620305][13946:13946] CHIP:DMG: moreChunkedMessages = false, + [1658143828.620330][13946:13946] CHIP:DMG: InteractionModelRevision = 1 + [1658143828.620353][13946:13946] CHIP:DMG: }, + [1658143828.620434][13946:13946] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0204 e=1 p=m + + + On DUT as a client side, verify that TH all-clusters-app sent success response + [1658143828.519585][8944:8949] CHIP:DMG: + [1658143828.519632][8944:8949] CHIP:DMG: StatusIB = + [1658143828.519683][8944:8949] CHIP:DMG: { + [1658143828.519734][8944:8949] CHIP:DMG: status = 0x00 (SUCCESS), + [1658143828.519784][8944:8949] CHIP:DMG: }, + [1658143828.519834][8944:8949] CHIP:DMG: disabled: true - label: @@ -213,73 +240,64 @@ tests: also reflects this in global attributes such as FeatureMap and AttributeList. Commission DUT to TH again" verification: | - ./chip-tool thermostatuserinterfaceconfiguration read attribute-list 1 1 - - - Verify in TH all-clusters-minimal-app Log: - [1654248197885] [91899:4015040] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_FFFB DataVersion: 2039959817 - [1654248197885] [91899:4015040] CHIP: [TOO] AttributeList: 7 entries - [1654248197885] [91899:4015040] CHIP: [TOO] [1]: 0 - [1654248197885] [91899:4015040] CHIP: [TOO] [2]: 1 - [1654248197885] [91899:4015040] CHIP: [TOO] [3]: 65528 - [1654248197885] [91899:4015040] CHIP: [TOO] [4]: 65529 - [1654248197885] [91899:4015040] CHIP: [TOO] [5]: 65531 - [1654248197885] [91899:4015040] CHIP: [TOO] [6]: 65532 - [1654248197885] [91899:4015040] CHIP: [TOO] [7]: 65533 - - - ./chip-tool thermostatuserinterfaceconfiguration write temperature-display-mode 1 1 1 - Verify in TH all-clusters-minimal-app Log: - [1649674212.150303][2241:2241] CHIP:DMG: WriteRequestMessage = - [1649674212.150341][2241:2241] CHIP:DMG: { - [1649674212.150375][2241:2241] CHIP:DMG: suppressResponse = false, - [1649674212.150414][2241:2241] CHIP:DMG: timedRequest = false, - [1649674212.150464][2241:2241] CHIP:DMG: AttributeDataIBs = - [1649674212.150509][2241:2241] CHIP:DMG: [ - [1649674212.150558][2241:2241] CHIP:DMG: AttributeDataIB = - [1649674212.150616][2241:2241] CHIP:DMG: { - [1649674212.150656][2241:2241] CHIP:DMG: AttributePathIB = - [1649674212.150714][2241:2241] CHIP:DMG: { - [1649674212.150766][2241:2241] CHIP:DMG: Endpoint = 0x1, - [1649674212.150830][2241:2241] CHIP:DMG: Cluster = 0x204, - [1649674212.150893][2241:2241] CHIP:DMG: Attribute = 0x0000_0000, - [1649674212.150945][2241:2241] CHIP:DMG: } - [1649674212.151007][2241:2241] CHIP:DMG: - [1649674212.151057][2241:2241] CHIP:DMG: Data = 1, - [1649674212.151114][2241:2241] CHIP:DMG: }, - [1649674212.151199][2241:2241] CHIP:DMG: - [1649674212.151239][2241:2241] CHIP:DMG: ], - [1649674212.151284][2241:2241] CHIP:DMG: - [1649674212.151333][2241:2241] CHIP:DMG: moreChunkedMessages = false, - [1649674212.151371][2241:2241] CHIP:DMG: InteractionModelRevision = 1 - [1649674212.151417][2241:2241] CHIP:DMG: }, - - - ./chip-tool thermostatuserinterfaceconfiguration write keypad-lockout 1 1 1 - Verify in TH all-clusters-minimal-app Log: - [1649674352.430976][2241:2241] CHIP:DMG: WriteRequestMessage = - [1649674352.431028][2241:2241] CHIP:DMG: { - [1649674352.431064][2241:2241] CHIP:DMG: suppressResponse = false, - [1649674352.431116][2241:2241] CHIP:DMG: timedRequest = false, - [1649674352.431153][2241:2241] CHIP:DMG: AttributeDataIBs = - [1649674352.431227][2241:2241] CHIP:DMG: [ - [1649674352.431277][2241:2241] CHIP:DMG: AttributeDataIB = - [1649674352.431342][2241:2241] CHIP:DMG: { - [1649674352.431382][2241:2241] CHIP:DMG: AttributePathIB = - [1649674352.431440][2241:2241] CHIP:DMG: { - [1649674352.431491][2241:2241] CHIP:DMG: Endpoint = 0x1, - [1649674352.431555][2241:2241] CHIP:DMG: Cluster = 0x204, - [1649674352.431618][2241:2241] CHIP:DMG: Attribute = 0x0000_0001, - [1649674352.431665][2241:2241] CHIP:DMG: } - [1649674352.431728][2241:2241] CHIP:DMG: - [1649674352.431778][2241:2241] CHIP:DMG: Data = 1, - [1649674352.431823][2241:2241] CHIP:DMG: }, - [1649674352.431883][2241:2241] CHIP:DMG: - [1649674352.431919][2241:2241] CHIP:DMG: ], - [1649674352.431975][2241:2241] CHIP:DMG: - [1649674352.432012][2241:2241] CHIP:DMG: moreChunkedMessages = false, - [1649674352.432062][2241:2241] CHIP:DMG: InteractionModelRevision = 1 - [1649674352.432097][2241:2241] CHIP:DMG: }," + ./chip-tool thermostatuserinterfaceconfiguration read temperature-display-mode 1 1 + verify On TH(Reference app) receives the right Read Request Message for the data sent in the above command + [1658142864.198892][13946:13946] CHIP:IM: Received Read request + [1658142864.198979][13946:13946] CHIP:DMG: ReadRequestMessage = + [1658142864.199008][13946:13946] CHIP:DMG: { + [1658142864.199032][13946:13946] CHIP:DMG: AttributePathIBs = + [1658142864.199059][13946:13946] CHIP:DMG: [ + [1658142864.199085][13946:13946] CHIP:DMG: AttributePathIB = + [1658142864.199114][13946:13946] CHIP:DMG: { + [1658142864.199144][13946:13946] CHIP:DMG: Endpoint = 0x1, + [1658142864.199181][13946:13946] CHIP:DMG: Cluster = 0x204, + [1658142864.199221][13946:13946] CHIP:DMG: Attribute = 0x0000_0000, + [1658142864.199253][13946:13946] CHIP:DMG: } + [1658142864.199284][13946:13946] CHIP:DMG: + [1658142864.199311][13946:13946] CHIP:DMG: ], + [1658142864.199341][13946:13946] CHIP:DMG: + [1658142864.199369][13946:13946] CHIP:DMG: isFabricFiltered = true, + [1658142864.199396][13946:13946] CHIP:DMG: InteractionModelRevision = 1 + [1658142864.199421][13946:13946] CHIP:DMG: }, + [1658142864.199502][13946:13946] CHIP:DMG: IM RH moving to [GeneratingReports] + + On DUT as a client side, verify that TH all-clusters-app sent temperature display mode attribute value + [1658142864.203659][8868:8873] CHIP:DMG: } + [1658142864.203865][8868:8873] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_0000 DataVersion: 682086754 + [1658142864.203966][8868:8873] CHIP:TOO: temperature display mode: 0 + [1658142864.204082][8868:8873] CHIP:EM: Sending Standalone Ack for MessageCounter:26677540 on exchange 12305i + + + + + + ./chip-tool thermostatuserinterfaceconfiguration read keypad-lockout 1 1 + verify On TH(Reference app) receives the right Read Request Message for the data sent in the above command + [1658142905.390042][13946:13946] CHIP:IM: Received Read request + [1658142905.390148][13946:13946] CHIP:DMG: ReadRequestMessage = + [1658142905.390177][13946:13946] CHIP:DMG: { + [1658142905.390199][13946:13946] CHIP:DMG: AttributePathIBs = + [1658142905.390225][13946:13946] CHIP:DMG: [ + [1658142905.390249][13946:13946] CHIP:DMG: AttributePathIB = + [1658142905.390276][13946:13946] CHIP:DMG: { + [1658142905.390304][13946:13946] CHIP:DMG: Endpoint = 0x1, + [1658142905.390335][13946:13946] CHIP:DMG: Cluster = 0x204, + [1658142905.390370][13946:13946] CHIP:DMG: Attribute = 0x0000_0001, + [1658142905.390400][13946:13946] CHIP:DMG: } + [1658142905.390430][13946:13946] CHIP:DMG: + [1658142905.390455][13946:13946] CHIP:DMG: ], + [1658142905.390483][13946:13946] CHIP:DMG: + [1658142905.390509][13946:13946] CHIP:DMG: isFabricFiltered = true, + [1658142905.390534][13946:13946] CHIP:DMG: InteractionModelRevision = 1 + [1658142905.390557][13946:13946] CHIP:DMG: }, + [1658142905.390634][13946:13946] CHIP:DMG: IM RH moving to [GeneratingReports] + [1658142905.390718][13946:13946] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + + On DUT as a client side, verify that TH all-clusters-app sent keypad lockout attribute value + [1658142905.393178][8876:8881] CHIP:DMG: } + [1658142905.393364][8876:8881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_0001 DataVersion: 682086754 + [1658142905.393454][8876:8881] CHIP:TOO: keypad lockout: 0 + [1658142905.393558][8876:8881] CHIP:EM: Sending Standalone Ack for MessageCounter:118574768 on exchange 20562i disabled: true - label: @@ -288,6 +306,7 @@ tests: verification: | ./chip-tool thermostatuserinterfaceconfiguration read schedule-programming-visibility 1 1 + On DUT as a client side, verify that TH all-clusters-app sent UNSUPPORTED_ATTRIBUTE response General error: 0x86 (UNSUPPORTED_ATTRIBUTE) disabled: true @@ -296,6 +315,6 @@ tests: the TH one at a time in a manufacturer specific order" verification: | ./chip-tool thermostatuserinterfaceconfiguration write schedule-programming-visibility 1 1 1 - + On DUT as a client side, verify that TH all-clusters-app sent UNSUPPORTED_ATTRIBUTE response General error: 0x86 (UNSUPPORTED_ATTRIBUTE) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_ULABEL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ULABEL_1_1.yaml index e78deaba7ee13e..894da6642d1112 100644 --- a/src/app/tests/suites/certification/Test_TC_ULABEL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ULABEL_1_1.yaml @@ -34,7 +34,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -42,7 +42,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_ULABEL_2_3.yaml b/src/app/tests/suites/certification/Test_TC_ULABEL_2_3.yaml index 9321a7d0116a27..5377136bf16850 100644 --- a/src/app/tests/suites/certification/Test_TC_ULABEL_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_ULABEL_2_3.yaml @@ -46,7 +46,7 @@ tests: response: error: CONSTRAINT_ERROR - - label: "TH reads LabelList attribute of the DUT" + - label: "TH writes LabelList attribute of the DUT" PICS: ULABEL.S.A0000 command: "writeAttribute" attribute: "label list" diff --git a/src/app/tests/suites/certification/Test_TC_ULABEL_2_4.yaml b/src/app/tests/suites/certification/Test_TC_ULABEL_2_4.yaml index 2abf04ece85a4e..d47a05c741a128 100644 --- a/src/app/tests/suites/certification/Test_TC_ULABEL_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_ULABEL_2_4.yaml @@ -58,11 +58,11 @@ tests: command: "writeAttribute" attribute: "label list" arguments: - value: [] + value: [{ "label": "", "value": "" }] - label: "TH reads LabelList attribute of the DUT" PICS: ULABEL.S.A0000 command: "readAttribute" attribute: "label list" response: - value: [] + value: [{ "label": "", "value": "" }] diff --git a/src/app/tests/suites/certification/Test_TC_WAKEONLAN_1_5.yaml b/src/app/tests/suites/certification/Test_TC_WAKEONLAN_1_5.yaml index fe2d8887d782d3..ec2c6b4a0a79b9 100644 --- a/src/app/tests/suites/certification/Test_TC_WAKEONLAN_1_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_WAKEONLAN_1_5.yaml @@ -36,7 +36,7 @@ tests: response: value: 1 constraints: - type: uint16 + type: int16u - label: "Read the global attribute: FeatureMap" command: "readAttribute" @@ -44,7 +44,7 @@ tests: response: value: 0 constraints: - type: map32 + type: bitmap32 - label: "Read the global attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml index 377dd159bc0032..6062b499fc8e12 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml @@ -37,7 +37,7 @@ tests: response: value: 5 constraints: - type: uint16 + type: int16u minValue: 5 maxValue: 200 @@ -47,7 +47,7 @@ tests: attribute: "FeatureMap" response: constraints: - type: uint32 + type: bitmap32 minValue: 0 maxValue: 32768 diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml index 19843f0ab28679..6b30454bb892f2 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml @@ -50,7 +50,7 @@ tests: PICS: WNCV.S.A0007 response: constraints: - type: map8 + type: bitmap8 minValue: 0 maxValue: 63 @@ -61,7 +61,7 @@ tests: PICS: WNCV.S.A000a response: constraints: - type: map8 + type: bitmap8 minValue: 0 maxValue: 63 @@ -83,7 +83,7 @@ tests: PICS: WNCV.S.A0017 response: constraints: - type: map8 + type: bitmap8 minValue: 0 maxValue: 15 @@ -155,7 +155,7 @@ tests: PICS: WNCV.S.A0010 response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -167,7 +167,7 @@ tests: PICS: WNCV.S.A0011 response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -179,7 +179,7 @@ tests: PICS: WNCV.S.A0012 response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -191,7 +191,7 @@ tests: PICS: WNCV.S.A0013 response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -203,7 +203,7 @@ tests: PICS: WNCV.S.A001a response: constraints: - type: map16 + type: bitmap16 minValue: 0 maxValue: 2047 @@ -215,7 +215,7 @@ tests: PICS: WNCV.S.A0001 response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -227,7 +227,7 @@ tests: PICS: WNCV.S.A0002 response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -238,7 +238,7 @@ tests: PICS: WNCV.S.A0003 response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -249,7 +249,7 @@ tests: PICS: WNCV.S.A0004 response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -261,7 +261,7 @@ tests: PICS: WNCV.S.A0005 response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 @@ -273,7 +273,7 @@ tests: PICS: WNCV.S.A0006 response: constraints: - type: uint16 + type: int16u minValue: 0 maxValue: 65535 diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_3_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_3_1.yaml index a6381b88223273..80cb89614f5230 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_3_1.yaml @@ -59,7 +59,7 @@ tests: PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e response: constraints: - type: uint16 + type: Percent100ths minValue: 1 maxValue: 10000 @@ -72,7 +72,7 @@ tests: PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008 response: constraints: - type: uint8 + type: Percent minValue: 1 maxValue: 100 @@ -85,7 +85,7 @@ tests: PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f response: constraints: - type: uint16 + type: Percent100ths minValue: 1 maxValue: 10000 @@ -98,7 +98,7 @@ tests: PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009 response: constraints: - type: uint8 + type: Percent minValue: 1 maxValue: 100 @@ -112,7 +112,7 @@ tests: maxInterval: 5 response: constraints: - type: map8 + type: bitmap8 ### MANDATORY Command - label: "2a: TH sends UpOrOpen command to DUT" @@ -169,7 +169,7 @@ tests: PICS: WNCV.S.A000a response: constraints: - type: map8 + type: bitmap8 minValue: 5 maxValue: 21 @@ -191,7 +191,7 @@ tests: PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e response: constraints: - type: uint16 + type: Percent100ths minValue: 0 maxValue: 9999 @@ -204,7 +204,7 @@ tests: PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008 response: constraints: - type: uint8 + type: Percent minValue: 0 maxValue: 99 @@ -217,7 +217,7 @@ tests: PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f response: constraints: - type: uint16 + type: Percent100ths minValue: 0 maxValue: 9999 @@ -230,7 +230,7 @@ tests: PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009 response: constraints: - type: uint8 + type: Percent minValue: 0 maxValue: 99 @@ -280,7 +280,7 @@ tests: PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b response: constraints: - type: uint16 + type: Percent100ths minValue: 0 maxValue: 9999 @@ -293,6 +293,6 @@ tests: PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c response: constraints: - type: uint16 + type: Percent100ths minValue: 0 maxValue: 9999 diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_3_2.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_3_2.yaml index 65a06134cee02b..de551662f251b8 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_3_2.yaml @@ -59,7 +59,7 @@ tests: PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e response: constraints: - type: uint16 + type: Percent100ths minValue: 0 maxValue: 9999 @@ -72,7 +72,7 @@ tests: PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008 response: constraints: - type: uint8 + type: Percent minValue: 0 maxValue: 99 @@ -85,7 +85,7 @@ tests: PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f response: constraints: - type: uint16 + type: Percent100ths minValue: 0 maxValue: 9999 @@ -98,7 +98,7 @@ tests: PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009 response: constraints: - type: uint8 + type: Percent minValue: 0 maxValue: 99 @@ -112,7 +112,7 @@ tests: maxInterval: 5 response: constraints: - type: map8 + type: bitmap8 ### MANDATORY Command - label: "2a: TH sends DownOrClose command to DUT" @@ -169,7 +169,7 @@ tests: PICS: WNCV.S.A000a response: constraints: - type: map8 + type: bitmap8 minValue: 10 maxValue: 42 @@ -191,7 +191,7 @@ tests: PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e response: constraints: - type: uint16 + type: Percent100ths minValue: 1 maxValue: 10000 @@ -204,7 +204,7 @@ tests: PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008 response: constraints: - type: uint8 + type: Percent minValue: 1 maxValue: 100 @@ -217,7 +217,7 @@ tests: PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f response: constraints: - type: uint16 + type: Percent100ths minValue: 1 maxValue: 10000 @@ -230,7 +230,7 @@ tests: PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009 response: constraints: - type: uint8 + type: Percent minValue: 1 maxValue: 100 @@ -280,7 +280,7 @@ tests: PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b response: constraints: - type: uint16 + type: Percent100ths minValue: 1 maxValue: 10000 @@ -293,6 +293,6 @@ tests: PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c response: constraints: - type: uint16 + type: Percent100ths minValue: 1 maxValue: 10000 diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_3_3.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_3_3.yaml index 92cf1e63f7e46b..8e5f69b279ad53 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_3_3.yaml @@ -71,7 +71,7 @@ tests: maxInterval: 5 response: constraints: - type: map8 + type: bitmap8 ### MANDATORY Command - label: "2a: TH sends a StopMotion command to DUT" diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_3_4.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_3_4.yaml index 49f015acee6085..608d5d39a31814 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_3_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_3_4.yaml @@ -21,10 +21,10 @@ config: cluster: "Window Covering" endpoint: 1 fastMotionDuration: - type: INT16U + type: int16u defaultValue: 3000 fullMotionDuration: - type: INT16U + type: int16u defaultValue: 6000 tests: diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_3_5.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_3_5.yaml index dab1669cb7adb2..2208f81bdfb8f1 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_3_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_3_5.yaml @@ -21,10 +21,10 @@ config: cluster: "Window Covering" endpoint: 1 fastMotionDuration: - type: INT16U + type: int16u defaultValue: 3000 fullMotionDuration: - type: INT16U + type: int16u defaultValue: 6000 tests: diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_4_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_4_1.yaml index d2e1a79ac88a6f..85f93558ad6348 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_4_1.yaml @@ -21,7 +21,7 @@ config: cluster: "Window Covering" endpoint: 1 fullMotionDuration: - type: INT16U + type: int16u defaultValue: 6000 tests: diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_4_2.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_4_2.yaml index b7d2df44d95fe8..a429d1206e9879 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_4_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_4_2.yaml @@ -21,7 +21,7 @@ config: cluster: "Window Covering" endpoint: 1 fullMotionDuration: - type: INT16U + type: int16u defaultValue: 6000 tests: diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index 8887e6bdebe372..1f968549abfb96 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -317,9 +317,9 @@ MEDIAPLAYBACK.S.A0004=1 MEDIAPLAYBACK.S.A0005=1 MEDIAPLAYBACK.S.A0006=1 -MEDIAPLAYBACK.S.C0000=1 -MEDIAPLAYBACK.S.C0001=1 -MEDIAPLAYBACK.S.C0002=1 +MEDIAPLAYBACK.S.C00.Rsp=1 +MEDIAPLAYBACK.S.C01.Rsp=1 +MEDIAPLAYBACK.S.C02.Rsp=1 MEDIAPLAYBACK.S.C03.Rsp=1 MEDIAPLAYBACK.S.C04.Rsp=1 MEDIAPLAYBACK.S.C05.Rsp=1 @@ -516,10 +516,10 @@ S.C.C42.Tx=0 #Switch Cluster SWTCH.S.F00=1 -SWTCH.S.F01=1 -SWTCH.S.F02=1 -SWTCH.S.F03=1 -SWTCH.S.F04=1 +SWTCH.S.F01=0 +SWTCH.S.F02=0 +SWTCH.S.F03=0 +SWTCH.S.F04=0 SWTCH.C.F00=1 SWTCH.C.F01=1 SWTCH.C.M.RA=1 @@ -763,6 +763,16 @@ MCORE.DD.WIRELESS=1 MCORE.DD.TXT_KEY_VP=1 MCORE.DD.TXT_KEY_DT=1 MCORE.DD.DISCOVERY_BLE=1 +MCORE.DD.WIFI=1 +MCORE.DD.IE=1 +MCORE.DD.TXT_KEY_DN=1 +MCORE.DD.TXT_KEY_RI=1 +MCORE.DD.TXT_KEY_PH=1 +MCORE.DD.TXT_KEY_PI=1 +MCORE.DD.EXTENDED_DISCOVERY=1 +MCORE.DD.COMMISSIONING_SUBTYPE_V=1 +MCORE.DD.COMMISSIONING_SUBTYPE_T=1 + #Ethernet Network Diagnostics Cluster DGETH.S.C00.Rsp=1 @@ -1407,3 +1417,33 @@ MCORE.DA.CERTDECL_ORIGIN_VENDORID=1 MCORE.DA.CERTDECL_ORIGIN_PRODUCTID=1 MCORE.DA.CERTDECL_AUTH_PAA=1 MCORE.DA.ATTESTELEMENT_FW_INFO=1 + +#Descriptor Cluster TestPlan +DESC.S.A0000=1 +DESC.S.A0001=1 +DESC.S.A0002=1 +DESC.S.A0003=1 +DESC.S.A0004=1 + +DESC.C.A0000=1 +DESC.C.A0001=1 +DESC.C.A0002=1 +DESC.C.A0003=1 +DESC.C.A0004=1 + +#Secure Channel +MCORE.SC.SII_OP_DISCOVERY_KEY=1 +MCORE.SC.SAI_OP_DISCOVERY_KEY=1 +MCORE.SC.T_KEY=1 +MCORE.SC.BLE=1 +MCORE.SC.WIFI=1 +MCORE.SC.ETH=1 +MCORE.SC.THR=1 +MCORE.SC.VENDOR_SUBTYPE=1 +MCORE.SC.DEVTYPE_SUBTYPE=1 +MCORE.SC.VP_KEY=1 +MCORE.SC.DT_KEY=1 +MCORE.SC.DN_KEY=1 +MCORE.SC.RI_KEY=1 +MCORE.SC.PH_KEY=1 +MCORE.SC.PI_KEY=1 \ No newline at end of file diff --git a/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp b/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp index ab15e920fb8cbb..7cba1a4751d203 100644 --- a/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp +++ b/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp @@ -125,8 +125,6 @@ void InteractionModel::OnSubscriptionEstablished(SubscriptionId subscriptionId) ContinueOnChipMainThread(CHIP_NO_ERROR); } -void InteractionModel::OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) {} - /////////// WriteClient Callback Interface ///////// void InteractionModel::OnResponse(const WriteClient * client, const ConcreteDataAttributePath & path, StatusIB status) { diff --git a/src/app/tests/suites/commands/interaction_model/InteractionModel.h b/src/app/tests/suites/commands/interaction_model/InteractionModel.h index 6d444ef6e1c9db..e097fdc0efa1b6 100644 --- a/src/app/tests/suites/commands/interaction_model/InteractionModel.h +++ b/src/app/tests/suites/commands/interaction_model/InteractionModel.h @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -436,7 +437,6 @@ class InteractionModel : public InteractionModelReports, void OnError(CHIP_ERROR error) override; void OnDone(chip::app::ReadClient * aReadClient) override; void OnSubscriptionEstablished(chip::SubscriptionId subscriptionId) override; - void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) override; /////////// WriteClient Callback Interface ///////// void OnResponse(const chip::app::WriteClient * client, const chip::app::ConcreteDataAttributePath & path, chip::app::StatusIB status) override; diff --git a/src/app/tests/suites/include/ConstraintsChecker.h b/src/app/tests/suites/include/ConstraintsChecker.h index 3eff23d80ac761..6578a4d7610e61 100644 --- a/src/app/tests/suites/include/ConstraintsChecker.h +++ b/src/app/tests/suites/include/ConstraintsChecker.h @@ -34,7 +34,13 @@ class ConstraintsChecker bool CheckConstraintType(const char * itemName, const char * current, const char * expected) { - ChipLogError(chipTool, "Warning: %s type checking is not implemented yet. Expected type: '%s'", itemName, expected); + if (strcmp(current, expected) != 0) + { + Exit(std::string(itemName) + " type (" + std::string(current) + ") is different than the expected type (" + + std::string(expected) + ")."); + return false; + } + return true; } diff --git a/src/app/tests/suites/tests.js b/src/app/tests/suites/tests.js index eced33afc14ded..a29b7253fb6058 100644 --- a/src/app/tests/suites/tests.js +++ b/src/app/tests/suites/tests.js @@ -245,8 +245,6 @@ function getManualTests() { "Test_TC_CADMIN_1_20", "Test_TC_CADMIN_1_21", "Test_TC_CADMIN_1_22", - "Test_TC_CADMIN_1_23", - "Test_TC_CADMIN_1_24", // Slow tests that should not run in CI because they take many minutes each "Test_TC_CADMIN_1_3", "Test_TC_CADMIN_1_4", @@ -255,8 +253,8 @@ function getManualTests() { "Test_TC_CADMIN_1_9", "Test_TC_CADMIN_1_10", "Test_TC_CADMIN_1_13", - "Test_TC_CADMIN_1_25", - "Test_TC_CADMIN_1_26", + "Test_TC_CADMIN_1_23", + "Test_TC_CADMIN_1_24", ]; const ModeSelect = [ @@ -415,7 +413,6 @@ function getManualTests() { ]; const Switch = [ - "Test_TC_SWTCH_1_1", "Test_TC_SWTCH_2_2", "Test_TC_SWTCH_3_1", "Test_TC_SWTCH_3_2", @@ -751,6 +748,7 @@ function getTests() { ]; const Switch = [ + "Test_TC_SWTCH_1_1", "Test_TC_SWTCH_2_1", ]; diff --git a/src/app/zap-templates/common/ClusterTestGeneration.js b/src/app/zap-templates/common/ClusterTestGeneration.js index 6a3afd703992bc..88b15d029d6e29 100644 --- a/src/app/zap-templates/common/ClusterTestGeneration.js +++ b/src/app/zap-templates/common/ClusterTestGeneration.js @@ -25,6 +25,9 @@ const path = require('path'); // Import helpers from zap core const templateUtil = require(zapPath + 'dist/src-electron/generator/template-util.js') +const zclHelper = require(zapPath + 'dist/src-electron/generator/helper-zcl.js'); +const queryEnum = require(zapPath + 'dist/src-electron/db/query-enum'); +const queryBitmap = require(zapPath + 'dist/src-electron/db/query-bitmap'); const { getClusters, getCommands, getAttributes, getEvents, isTestOnlyCluster } = require('./simulated-clusters/SimulatedClusters.js'); @@ -1025,6 +1028,30 @@ function chip_tests_iterate_constraints(constraints, options) return asBlocks.call(this, Promise.resolve(values), options) } +async function asTestType(type, isList) +{ + if (isList) { + return 'list'; + } + + const pkgId = await templateUtil.ensureZclPackageId(this); + const db = this.global.db; + + const isEnum = await zclHelper.isEnum(db, type, pkgId); + if (isEnum != 'unknown') { + const enumObj = await queryEnum.selectEnumByName(db, type, pkgId); + return 'enum' + (8 * enumObj.size); + } + + const isBitmap = await zclHelper.isBitmap(db, type, pkgId); + if (isBitmap != 'unknown') { + const bitmapObj = await queryBitmap.selectBitmapByName(db, pkgId, type); + return 'bitmap' + (8 * bitmapObj.size); + } + + return type; +} + // // Module exports // @@ -1057,3 +1084,4 @@ exports.octetStringLengthFromHexString = octetStringLengthFromHexSt exports.octetStringFromHexString = octetStringFromHexString; exports.chip_tests_iterate_expected_list = chip_tests_iterate_expected_list; exports.chip_tests_iterate_constraints = chip_tests_iterate_constraints; +exports.asTestType = asTestType; diff --git a/src/app/zap-templates/common/override.js b/src/app/zap-templates/common/override.js index 429c37c9d4f41c..381db17a5ebae3 100644 --- a/src/app/zap-templates/common/override.js +++ b/src/app/zap-templates/common/override.js @@ -73,6 +73,7 @@ function atomicType(arg) case 'epoch_us': return 'uint64_t'; case 'epoch_s': + case 'utc': return 'uint32_t'; default: throw 'not overriding'; diff --git a/src/app/zap-templates/partials/cluster-objects-struct.zapt b/src/app/zap-templates/partials/cluster-objects-struct.zapt index 2939e4c375a664..23d22ef5965496 100644 --- a/src/app/zap-templates/partials/cluster-objects-struct.zapt +++ b/src/app/zap-templates/partials/cluster-objects-struct.zapt @@ -16,15 +16,15 @@ namespace {{asUpperCamelCase name}} { CHIP_ERROR Decode(TLV::TLVReader &reader); {{/unless}} - static constexpr bool kIsFabricScoped = {{struct_is_fabric_scoped}}; + static constexpr bool kIsFabricScoped = {{isFabricScoped}}; - {{#if struct_is_fabric_scoped}} + {{#if isFabricScoped}} auto GetFabricIndex() const { - return {{ asLowerCamelCase struct_fabric_idx_field }}; + return fabricIndex; } void SetFabricIndex(chip::FabricIndex fabricIndex_) { - {{ asLowerCamelCase struct_fabric_idx_field }} = fabricIndex_; + fabricIndex = fabricIndex_; } CHIP_ERROR EncodeForWrite(TLV::TLVWriter &writer, TLV::Tag tag) const; @@ -46,15 +46,15 @@ namespace {{asUpperCamelCase name}} { CHIP_ERROR Decode(TLV::TLVReader &reader); - static constexpr bool kIsFabricScoped = {{struct_is_fabric_scoped}}; + static constexpr bool kIsFabricScoped = {{isFabricScoped}}; - {{#if struct_is_fabric_scoped}} + {{#if isFabricScoped}} auto GetFabricIndex() const { - return {{ asLowerCamelCase struct_fabric_idx_field }}; + return fabricIndex; } void SetFabricIndex(chip::FabricIndex fabricIndex_) { - {{ asLowerCamelCase struct_fabric_idx_field }} = fabricIndex_; + fabricIndex = fabricIndex_; } {{/if}} }; @@ -65,7 +65,7 @@ namespace {{asUpperCamelCase name}} { } // namespace {{asUpperCamelCase name}} {{else}} namespace {{asUpperCamelCase name}} { -{{#if struct_is_fabric_scoped}} +{{#if isFabricScoped}} CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter &writer, TLV::Tag tag) const { return DoEncode(writer, tag, NullOptional); @@ -79,12 +79,12 @@ CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter &writer, TLV::Tag tag, FabricIndex CHIP_ERROR Type::DoEncode(TLV::TLVWriter &writer, TLV::Tag tag, const Optional & accessingFabricIndex) const { {{#if struct_has_fabric_sensitive_fields}} - bool includeSensitive = !accessingFabricIndex.HasValue() || (accessingFabricIndex.Value() == {{ asLowerCamelCase struct_fabric_idx_field }}); + bool includeSensitive = !accessingFabricIndex.HasValue() || (accessingFabricIndex.Value() == fabricIndex); {{/if}} TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); {{#zcl_struct_items}} - {{#if (isStrEqual label ../struct_fabric_idx_field)}} + {{#if (is_num_equal fieldIdentifier 254)}} if (accessingFabricIndex.HasValue()) { ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::k{{asUpperCamelCase label}})), {{asLowerCamelCase label}})); } diff --git a/src/app/zap-templates/partials/idl/structure_definition.zapt b/src/app/zap-templates/partials/idl/structure_definition.zapt index af6fbaea7124c0..9d58faef6735be 100644 --- a/src/app/zap-templates/partials/idl/structure_definition.zapt +++ b/src/app/zap-templates/partials/idl/structure_definition.zapt @@ -1,5 +1,6 @@ -{{#if struct_is_fabric_scoped}} -{{indent extraIndent~}} [fabric_scoped_by={{asUpperCamelCase struct_fabric_idx_field}}] +{{! TODO: IDL consumers can't parse the square bracket syntax }} +{{#if isFabricScoped_DISABLED_FOR_NOW}} +{{indent extraIndent~}} [fabric_scoped_by=FabricIndex] {{/if}} {{indent extraIndent~}} struct {{name}} { {{#zcl_struct_items}} diff --git a/src/app/zap-templates/templates/app/cluster-objects.zapt b/src/app/zap-templates/templates/app/cluster-objects.zapt index 93d7637b5005be..f88a85f578974b 100644 --- a/src/app/zap-templates/templates/app/cluster-objects.zapt +++ b/src/app/zap-templates/templates/app/cluster-objects.zapt @@ -177,15 +177,15 @@ public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } static constexpr EventId GetEventId() { return Events::{{asUpperCamelCase name}}::Id; } static constexpr ClusterId GetClusterId() { return Clusters::{{asUpperCamelCase parent.name}}::Id; } - static constexpr bool kIsFabricScoped = {{event_is_fabric_scoped}}; + static constexpr bool kIsFabricScoped = {{isFabricSensitive}}; {{#zcl_event_fields}} {{zapTypeToEncodableClusterObjectType type}} {{asLowerCamelCase name}}{{> cluster_objects_field_init}}; {{/zcl_event_fields}} - {{#if event_is_fabric_scoped}} + {{#if isFabricSensitive}} auto GetFabricIndex() const { - return {{ asLowerCamelCase event_fabric_idx_field }}; + return fabricIndex; } {{/if}} 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 97b8b8ad8b4f9b..e85f6c220f2c04 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 @@ -47,19 +47,17 @@ limitations under the License. - + - - + - @@ -103,22 +101,20 @@ limitations under the License. - + The cluster SHALL send AccessControlEntryChanged events whenever its ACL attribute data is changed by an Administrator. - - + The cluster SHALL send AccessControlExtensionChanged events whenever its extension attribute data is changed by an Administrator. - diff --git a/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml index 25f79b10d73e59..b9ef8a0b06a4bd 100644 --- a/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml @@ -25,7 +25,7 @@ limitations under the License. true This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. VendorName - VendorID + VendorID ApplicationName ProductID Application diff --git a/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml index f6a1ed2b4917f7..b111eaab078639 100644 --- a/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml @@ -75,6 +75,7 @@ limitations under the License. The Leave event SHOULD be emitted by a Node prior to permanently leaving the Fabric. + This event (when supported) SHALL be generated when there is a change in the Reachable attribute. diff --git a/src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml index f7cecaf94bf083..61db59a1b29c74 100644 --- a/src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml @@ -17,13 +17,12 @@ limitations under the License. - + - diff --git a/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml b/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml index 5dd8b9d7ba0aae..99d2fc6483e396 100644 --- a/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml +++ b/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml @@ -108,11 +108,10 @@ limitations under the License. - + - OTA Software Update Requestor diff --git a/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml index e38bde96295c61..980f5e45db6085 100644 --- a/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml @@ -97,6 +97,7 @@ limitations under the License. Provide a means for certification tests to trigger some test-plan-specific events + diff --git a/src/app/zap-templates/zcl/data-model/chip/group-key-mgmt-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/group-key-mgmt-cluster.xml index 3bfaeb980a6d32..5addebd25e05cf 100644 --- a/src/app/zap-templates/zcl/data-model/chip/group-key-mgmt-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/group-key-mgmt-cluster.xml @@ -17,19 +17,17 @@ limitations under the License. - + - - + - diff --git a/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml index cb35cbdf3666a1..a7356263f60138 100644 --- a/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml @@ -17,14 +17,13 @@ limitations under the License. - + - @@ -41,11 +40,10 @@ limitations under the License. - + - @@ -63,7 +61,7 @@ limitations under the License. SupportedFabrics CommissionedFabrics TrustedRootCertificates - CurrentFabricIndex + CurrentFabricIndex Sender is requesting attestation information from the receiver. 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 2af47d21b36e31..ba5db80d1708ef 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 @@ -22,7 +22,7 @@ limitations under the License. - + @@ -31,7 +31,6 @@ limitations under the License. - @@ -575,9 +574,8 @@ limitations under the License. - + Example test event - diff --git a/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml index b1f0608e9f0be5..00d568567a8ddc 100644 --- a/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml @@ -111,7 +111,7 @@ limitations under the License. ThermostatRunningState SetpointChangeSource SetpointChangeAmount - SetpointChangeSourceTimestamp + SetpointChangeSourceTimestamp OccupiedSetback diff --git a/src/app/zap-templates/zcl/data-model/silabs/general.xml b/src/app/zap-templates/zcl/data-model/silabs/general.xml index ea606941064b6c..aa193556df3bd8 100644 --- a/src/app/zap-templates/zcl/data-model/silabs/general.xml +++ b/src/app/zap-templates/zcl/data-model/silabs/general.xml @@ -216,8 +216,8 @@ limitations under the License. - - + + @@ -225,8 +225,8 @@ limitations under the License. - - + + @@ -235,15 +235,15 @@ limitations under the License. - - + + Command description for Stop - - + + @@ -251,6 +251,8 @@ limitations under the License. + + @@ -258,6 +260,8 @@ limitations under the License. + + @@ -266,11 +270,15 @@ limitations under the License. + + Command description for StopWithOnOff + + diff --git a/src/ble/BleConnectionDelegate.h b/src/ble/BleConnectionDelegate.h index 811874c95b9299..694cb26e5bf36b 100644 --- a/src/ble/BleConnectionDelegate.h +++ b/src/ble/BleConnectionDelegate.h @@ -27,6 +27,7 @@ #include #include +#include namespace chip { namespace Ble { @@ -51,8 +52,8 @@ class DLL_EXPORT BleConnectionDelegate OnConnectionErrorFunct OnConnectionError; // Call this function to delegate the connection steps required to get a BLE_CONNECTION_OBJECT - // out of a peripheral discriminator. - virtual void NewConnection(BleLayer * bleLayer, void * appState, uint16_t connDiscriminator) = 0; + // out of a peripheral that matches the given discriminator. + virtual void NewConnection(BleLayer * bleLayer, void * appState, const SetupDiscriminator & connDiscriminator) = 0; // Call this function to stop the connection virtual CHIP_ERROR CancelConnection() = 0; diff --git a/src/ble/BleLayer.cpp b/src/ble/BleLayer.cpp index 624270446f6226..881ba991cc3036 100644 --- a/src/ble/BleLayer.cpp +++ b/src/ble/BleLayer.cpp @@ -371,7 +371,7 @@ CHIP_ERROR BleLayer::CancelBleIncompleteConnection() return err; } -CHIP_ERROR BleLayer::NewBleConnectionByDiscriminator(uint16_t connDiscriminator, void * appState, +CHIP_ERROR BleLayer::NewBleConnectionByDiscriminator(const SetupDiscriminator & connDiscriminator, void * appState, BleConnectionDelegate::OnConnectionCompleteFunct onSuccess, BleConnectionDelegate::OnConnectionErrorFunct onError) { diff --git a/src/ble/BleLayer.h b/src/ble/BleLayer.h index c4bc3582dcc7ad..9d57ddee8536e9 100644 --- a/src/ble/BleLayer.h +++ b/src/ble/BleLayer.h @@ -54,6 +54,7 @@ #include +#include #include #include @@ -245,7 +246,7 @@ class DLL_EXPORT BleLayer void Shutdown(); CHIP_ERROR CancelBleIncompleteConnection(); - CHIP_ERROR NewBleConnectionByDiscriminator(uint16_t connDiscriminator, void * appState = nullptr, + CHIP_ERROR NewBleConnectionByDiscriminator(const SetupDiscriminator & connDiscriminator, void * appState = nullptr, BleConnectionDelegate::OnConnectionCompleteFunct onSuccess = OnConnectionComplete, BleConnectionDelegate::OnConnectionErrorFunct onError = OnConnectionError); CHIP_ERROR NewBleConnectionByObject(BLE_CONNECTION_OBJECT connObj); diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index feb959c3e6aba5..0a720609c1ac1d 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -97,8 +97,6 @@ using namespace chip::Encoding; using namespace chip::Protocols::UserDirectedCommissioning; #endif // CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY -constexpr uint32_t kSessionEstablishmentTimeout = 40 * kMillisecondsPerSecond; - DeviceController::DeviceController() { mState = State::NotInitialized; @@ -323,14 +321,14 @@ void DeviceController::ReleaseOperationalDevice(NodeId remoteNodeId) { VerifyOrReturn(mState == State::Initialized && mFabricIndex != kUndefinedFabricIndex, ChipLogError(Controller, "ReleaseOperationalDevice was called in incorrect state")); - mSystemState->CASESessionMgr()->ReleaseSession(PeerId(GetCompressedFabricId(), remoteNodeId)); + mSystemState->CASESessionMgr()->ReleaseSession(GetPeerScopedId(remoteNodeId)); } CHIP_ERROR DeviceController::DisconnectDevice(NodeId nodeId) { ChipLogProgress(Controller, "Force close session for node 0x%" PRIx64, nodeId); - OperationalDeviceProxy * proxy = mSystemState->CASESessionMgr()->FindExistingSession(PeerId(GetCompressedFabricId(), nodeId)); + OperationalDeviceProxy * proxy = mSystemState->CASESessionMgr()->FindExistingSession(GetPeerScopedId(nodeId)); if (proxy == nullptr) { ChipLogProgress(Controller, "Attempted to close a session that does not exist."); @@ -355,11 +353,11 @@ CHIP_ERROR DeviceController::DisconnectDevice(NodeId nodeId) return CHIP_NO_ERROR; } -CHIP_ERROR DeviceController::GetPeerAddressAndPort(PeerId peerId, Inet::IPAddress & addr, uint16_t & port) +CHIP_ERROR DeviceController::GetPeerAddressAndPort(NodeId peerId, Inet::IPAddress & addr, uint16_t & port) { VerifyOrReturnError(mState == State::Initialized, CHIP_ERROR_INCORRECT_STATE); Transport::PeerAddress peerAddr; - ReturnErrorOnFailure(mSystemState->CASESessionMgr()->GetPeerAddress(peerId, peerAddr)); + ReturnErrorOnFailure(mSystemState->CASESessionMgr()->GetPeerAddress(GetPeerScopedId(peerId), peerAddr)); addr = peerAddr.GetIPAddress(); port = peerAddr.GetPort(); return CHIP_NO_ERROR; @@ -368,8 +366,8 @@ CHIP_ERROR DeviceController::GetPeerAddressAndPort(PeerId peerId, Inet::IPAddres CHIP_ERROR DeviceController::GetPeerAddress(NodeId nodeId, Transport::PeerAddress & addr) { VerifyOrReturnError(mState == State::Initialized, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure(mSystemState->CASESessionMgr()->GetPeerAddress( - PeerId().SetCompressedFabricId(GetCompressedFabricId()).SetNodeId(nodeId), addr)); + ReturnErrorOnFailure(mSystemState->CASESessionMgr()->GetPeerAddress(GetPeerScopedId(nodeId), addr)); + return CHIP_NO_ERROR; } @@ -546,6 +544,10 @@ void DeviceCommissioner::ReleaseCommissioneeDevice(CommissioneeDeviceProxy * dev { mDeviceInPASEEstablishment = nullptr; } + if (mDeviceBeingCommissioned == device) + { + mDeviceBeingCommissioned = nullptr; + } } CHIP_ERROR DeviceCommissioner::GetDeviceBeingCommissioned(NodeId deviceId, CommissioneeDeviceProxy ** out_device) @@ -682,7 +684,9 @@ CHIP_ERROR DeviceCommissioner::EstablishPASEConnection(NodeId remoteDeviceId, Re } else if (params.HasDiscriminator()) { - SuccessOrExit(err = mSystemState->BleLayer()->NewBleConnectionByDiscriminator(params.GetDiscriminator())); + SetupDiscriminator discriminator; + discriminator.SetLongValue(params.GetDiscriminator()); + SuccessOrExit(err = mSystemState->BleLayer()->NewBleConnectionByDiscriminator(discriminator)); } else { @@ -759,9 +763,6 @@ CHIP_ERROR DeviceCommissioner::Commission(NodeId remoteDeviceId) ChipLogProgress(Controller, "Commission called for node ID 0x" ChipLogFormatX64, ChipLogValueX64(remoteDeviceId)); - mSystemState->SystemLayer()->StartTimer(chip::System::Clock::Milliseconds32(kSessionEstablishmentTimeout), - OnSessionEstablishmentTimeoutCallback, this); - mDefaultCommissioner->SetOperationalCredentialsDelegate(mOperationalCredentialsDelegate); if (device->IsSecureConnected()) { @@ -859,9 +860,6 @@ void DeviceCommissioner::RendezvousCleanup(CHIP_ERROR status) void DeviceCommissioner::OnSessionEstablishmentError(CHIP_ERROR err) { - // PASE session establishment failure. - mSystemState->SystemLayer()->CancelTimer(OnSessionEstablishmentTimeoutCallback, this); - if (mPairingDelegate != nullptr) { mPairingDelegate->OnStatusUpdate(DevicePairingDelegate::SecurePairingFailed); @@ -977,6 +975,12 @@ void DeviceCommissioner::OnDeviceAttestationInformationVerification(void * conte MATTER_TRACE_EVENT_SCOPE("OnDeviceAttestationInformationVerification", "DeviceCommissioner"); DeviceCommissioner * commissioner = reinterpret_cast(context); + if (!commissioner->mDeviceBeingCommissioned) + { + ChipLogError(Controller, "Device attestation verification result received when we're not commissioning a device"); + return; + } + if (result != AttestationVerificationResult::kSuccess) { CommissioningDelegate::CommissioningReport report; @@ -1363,8 +1367,6 @@ CHIP_ERROR DeviceCommissioner::OnOperationalCredentialsProvisioningCompletion(De ChipLogProgress(Controller, "Operational credentials provisioned on device %p", device); VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - mSystemState->SystemLayer()->CancelTimer(OnSessionEstablishmentTimeoutCallback, this); - if (mPairingDelegate != nullptr) { mPairingDelegate->OnStatusUpdate(DevicePairingDelegate::SecurePairingSuccess); @@ -1395,26 +1397,6 @@ void DeviceCommissioner::CloseBleConnection() } #endif -void DeviceCommissioner::OnSessionEstablishmentTimeout() -{ - // This is called from the session establishment timer. Please see - // https://github.com/project-chip/connectedhomeip/issues/14650 - VerifyOrReturn(mState == State::Initialized); - VerifyOrReturn(mDeviceBeingCommissioned != nullptr); - - StopPairing(mDeviceBeingCommissioned->GetDeviceId()); - - if (mPairingDelegate != nullptr) - { - mPairingDelegate->OnPairingComplete(CHIP_ERROR_TIMEOUT); - } -} - -void DeviceCommissioner::OnSessionEstablishmentTimeoutCallback(System::Layer * aLayer, void * aAppState) -{ - static_cast(aAppState)->OnSessionEstablishmentTimeout(); -} - CHIP_ERROR DeviceCommissioner::DiscoverCommissionableNodes(Dnssd::DiscoveryFilter filter) { ReturnErrorOnFailure(SetUpNodeDiscovery()); @@ -1522,6 +1504,10 @@ void DeviceCommissioner::OnDisarmFailsafeFailure(void * context, CHIP_ERROR erro void DeviceCommissioner::DisarmDone() { + // If someone nulled out our mDeviceBeingCommissioned, there's nothing else + // to do here. + VerifyOrReturn(mDeviceBeingCommissioned != nullptr); + // At this point, we also want to close off the pase session so we need to re-establish CommissioneeDeviceProxy * commissionee = FindCommissioneeDevice(mDeviceBeingCommissioned->GetDeviceId()); @@ -1617,7 +1603,7 @@ void DeviceCommissioner::OnDeviceConnectedFn(void * context, OperationalDevicePr } } -void DeviceCommissioner::OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR error) +void DeviceCommissioner::OnDeviceConnectionFailureFn(void * context, const ScopedNodeId & peerId, CHIP_ERROR error) { // CASE session establishment failed. DeviceCommissioner * commissioner = static_cast(context); @@ -2119,6 +2105,7 @@ void DeviceCommissioner::PerformCommissioningStep(DeviceProxy * proxy, Commissio CommissioningStageComplete(err); return; } + err = proxy->SetPeerId(params.GetRootCert().Value(), params.GetNoc().Value()); if (err != CHIP_NO_ERROR) { @@ -2233,18 +2220,18 @@ CHIP_ERROR DeviceController::UpdateDevice(NodeId peerNodeId) { VerifyOrReturnError(mState == State::Initialized && mFabricIndex != kUndefinedFabricIndex, CHIP_ERROR_INCORRECT_STATE); - OperationalDeviceProxy * proxy = GetDeviceSession(PeerId(GetCompressedFabricId(), peerNodeId)); + OperationalDeviceProxy * proxy = GetDeviceSession(GetPeerScopedId(peerNodeId)); VerifyOrReturnError(proxy != nullptr, CHIP_ERROR_NOT_FOUND); return proxy->LookupPeerAddress(); } -OperationalDeviceProxy * DeviceController::GetDeviceSession(const PeerId & peerId) +OperationalDeviceProxy * DeviceController::GetDeviceSession(const ScopedNodeId & peerId) { return mSystemState->CASESessionMgr()->FindExistingSession(peerId); } -OperationalDeviceProxy * DeviceCommissioner::GetDeviceSession(const PeerId & peerId) +OperationalDeviceProxy * DeviceCommissioner::GetDeviceSession(const ScopedNodeId & peerId) { mSystemState->CASESessionMgr()->FindOrEstablishSession(peerId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index 3ac9f77ebfa2d7..c647ea4dc4a10b 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -165,19 +165,21 @@ class DLL_EXPORT DeviceController : public AbstractDnssdDiscoveryController return nullptr; } - CHIP_ERROR GetPeerAddressAndPort(PeerId peerId, Inet::IPAddress & addr, uint16_t & port); + CHIP_ERROR GetPeerAddressAndPort(NodeId peerId, Inet::IPAddress & addr, uint16_t & port); /** * @brief * Looks up the PeerAddress for an established CASE session. * - * @param[in] nodeId the PeerId of the session to be found + * @param[in] nodeId the NodeId of the target. * @param[out] addr the PeerAddress to be filled on success * * @return CHIP_ERROR CHIP_ERROR_NOT_CONNECTED if no CASE session exists for the device */ CHIP_ERROR GetPeerAddress(NodeId nodeId, Transport::PeerAddress & addr); + ScopedNodeId GetPeerScopedId(NodeId nodeId) { return ScopedNodeId(nodeId, GetFabricIndex()); } + /** * This function finds the device corresponding to deviceId, and establishes * a CASE session with it. @@ -196,8 +198,7 @@ class DLL_EXPORT DeviceController : public AbstractDnssdDiscoveryController chip::Callback::Callback * onFailure) { VerifyOrReturnError(mState == State::Initialized, CHIP_ERROR_INCORRECT_STATE); - mSystemState->CASESessionMgr()->FindOrEstablishSession(PeerId(GetCompressedFabricId(), peerNodeId), onConnection, - onFailure); + mSystemState->CASESessionMgr()->FindOrEstablishSession(ScopedNodeId(peerNodeId, GetFabricIndex()), onConnection, onFailure); return CHIP_NO_ERROR; } @@ -358,7 +359,7 @@ class DLL_EXPORT DeviceController : public AbstractDnssdDiscoveryController /// Fetches the session to use for the current device. Allows overriding /// in case subclasses want to create the session if it does not yet exist - virtual OperationalDeviceProxy * GetDeviceSession(const PeerId & peerId); + virtual OperationalDeviceProxy * GetDeviceSession(const ScopedNodeId & peerId); DiscoveredNodeList GetDiscoveredNodes() override { return DiscoveredNodeList(mCommissionableNodes); } @@ -648,7 +649,7 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, void OnDone(app::ReadClient *) override; // Commissioner will establish new device connections after PASE. - OperationalDeviceProxy * GetDeviceSession(const PeerId & peerId) override; + OperationalDeviceProxy * GetDeviceSession(const ScopedNodeId & peerId) override; // Issue an NOC chain using the associated OperationalCredentialsDelegate. The NOC chain will // be provided in X509 DER format. @@ -677,10 +678,6 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, CHIP_ERROR LoadKeyId(PersistentStorageDelegate * delegate, uint16_t & out); - void OnSessionEstablishmentTimeout(); - - static void OnSessionEstablishmentTimeoutCallback(System::Layer * aLayer, void * aAppState); - /* This function sends a Device Attestation Certificate chain request to the device. The function does not hold a reference to the device object. */ @@ -752,7 +749,7 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, static void OnRootCertFailureResponse(void * context, CHIP_ERROR error); static void OnDeviceConnectedFn(void * context, OperationalDeviceProxy * device); - static void OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR error); + static void OnDeviceConnectionFailureFn(void * context, const ScopedNodeId & peerId, CHIP_ERROR error); static void OnDeviceAttestationInformationVerification(void * context, Credentials::AttestationVerificationResult result); diff --git a/src/controller/CHIPDeviceControllerFactory.cpp b/src/controller/CHIPDeviceControllerFactory.cpp index 84f67a96883003..701259d6989308 100644 --- a/src/controller/CHIPDeviceControllerFactory.cpp +++ b/src/controller/CHIPDeviceControllerFactory.cpp @@ -205,8 +205,6 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) InitDataModelHandler(stateParams.exchangeMgr); - ReturnErrorOnFailure(chip::app::InteractionModelEngine::GetInstance()->Init(stateParams.exchangeMgr, stateParams.fabricTable)); - ReturnErrorOnFailure(Dnssd::Resolver::Instance().Init(stateParams.udpEndPointManager)); if (params.enableServerInteractions) @@ -266,6 +264,9 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) stateParams.caseSessionManager = Platform::New(); ReturnErrorOnFailure(stateParams.caseSessionManager->Init(stateParams.systemLayer, sessionManagerConfig)); + ReturnErrorOnFailure(chip::app::InteractionModelEngine::GetInstance()->Init(stateParams.exchangeMgr, stateParams.fabricTable, + stateParams.caseSessionManager)); + // store the system state mSystemState = chip::Platform::New(std::move(stateParams)); mSystemState->SetTempFabricTable(tempFabricTable); diff --git a/src/controller/CommissioningWindowOpener.cpp b/src/controller/CommissioningWindowOpener.cpp index c0761cac49e111..95eb4d7c7d2a77 100644 --- a/src/controller/CommissioningWindowOpener.cpp +++ b/src/controller/CommissioningWindowOpener.cpp @@ -96,8 +96,8 @@ CHIP_ERROR CommissioningWindowOpener::OpenCommissioningWindow(NodeId deviceId, S mPBKDFSalt = ByteSpan(mPBKDFSaltBuffer); } - mSetupPayload.version = 0; - mSetupPayload.discriminator = discriminator; + mSetupPayload.version = 0; + mSetupPayload.discriminator.SetLongValue(discriminator); mSetupPayload.rendezvousInformation = RendezvousInformationFlags(RendezvousInformationFlag::kOnNetwork); mCommissioningWindowCallback = callback; @@ -142,7 +142,7 @@ CHIP_ERROR CommissioningWindowOpener::OpenCommissioningWindowInternal(Operationa AdministratorCommissioning::Commands::OpenCommissioningWindow::Type request; request.commissioningTimeout = mCommissioningWindowTimeout.count(); request.PAKEVerifier = serializedVerifierSpan; - request.discriminator = mSetupPayload.discriminator; + request.discriminator = mSetupPayload.discriminator.GetLongValue(); request.iterations = mPBKDFIterations; request.salt = mPBKDFSalt; @@ -308,7 +308,7 @@ void CommissioningWindowOpener::OnDeviceConnectedCallback(void * context, Operat } } -void CommissioningWindowOpener::OnDeviceConnectionFailureCallback(void * context, PeerId peerId, CHIP_ERROR error) +void CommissioningWindowOpener::OnDeviceConnectionFailureCallback(void * context, const ScopedNodeId & peerId, CHIP_ERROR error) { OnOpenCommissioningWindowFailure(context, error); } diff --git a/src/controller/CommissioningWindowOpener.h b/src/controller/CommissioningWindowOpener.h index 30be3d90051557..63a073122e8d3e 100644 --- a/src/controller/CommissioningWindowOpener.h +++ b/src/controller/CommissioningWindowOpener.h @@ -127,7 +127,7 @@ class CommissioningWindowOpener static void OnOpenCommissioningWindowSuccess(void * context, const app::DataModel::NullObjectType &); static void OnOpenCommissioningWindowFailure(void * context, CHIP_ERROR error); static void OnDeviceConnectedCallback(void * context, OperationalDeviceProxy * device); - static void OnDeviceConnectionFailureCallback(void * context, PeerId peerId, CHIP_ERROR error); + static void OnDeviceConnectionFailureCallback(void * context, const ScopedNodeId & peerId, CHIP_ERROR error); DeviceController * const mController = nullptr; Step mNextStep = Step::kAcceptCommissioningStart; diff --git a/src/controller/SetUpCodePairer.cpp b/src/controller/SetUpCodePairer.cpp index 98af2e86ea4ad1..12b6b3cf1e0bb5 100644 --- a/src/controller/SetUpCodePairer.cpp +++ b/src/controller/SetUpCodePairer.cpp @@ -154,10 +154,17 @@ CHIP_ERROR SetUpCodePairer::StartDiscoverOverIP(SetupPayload & payload) { ChipLogProgress(Controller, "Starting commissioning discovery over DNS-SD"); - currentFilter.type = payload.isShortDiscriminator ? Dnssd::DiscoveryFilterType::kShortDiscriminator - : Dnssd::DiscoveryFilterType::kLongDiscriminator; - currentFilter.code = - payload.isShortDiscriminator ? static_cast((payload.discriminator >> 8) & 0x0F) : payload.discriminator; + auto & discriminator = payload.discriminator; + if (discriminator.IsShortDiscriminator()) + { + currentFilter.type = Dnssd::DiscoveryFilterType::kShortDiscriminator; + currentFilter.code = discriminator.GetShortValue(); + } + else + { + currentFilter.type = Dnssd::DiscoveryFilterType::kLongDiscriminator; + currentFilter.code = discriminator.GetLongValue(); + } // Handle possibly-sync callbacks. mWaitingForDiscovery[kIPTransport] = true; CHIP_ERROR err = mCommissioner->DiscoverCommissionableNodes(currentFilter); diff --git a/src/controller/TypedReadCallback.h b/src/controller/TypedReadCallback.h index 91bee1629bfa81..7fa58df7c932b4 100644 --- a/src/controller/TypedReadCallback.h +++ b/src/controller/TypedReadCallback.h @@ -124,12 +124,16 @@ class TypedReadAttributeCallback final : public app::ReadClient::Callback } } - void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) override + CHIP_ERROR OnResubscriptionNeeded(chip::app::ReadClient * apReadClient, CHIP_ERROR aTerminationCause) override { + ReturnErrorOnFailure(app::ReadClient::Callback::OnResubscriptionNeeded(apReadClient, aTerminationCause)); + if (mOnResubscriptionAttempt) { - mOnResubscriptionAttempt(*mReadClient.get(), aTerminationCause, aNextResubscribeIntervalMsec); + mOnResubscriptionAttempt(*mReadClient.get(), aTerminationCause, apReadClient->ComputeTimeTillNextSubscription()); } + + return CHIP_NO_ERROR; } void OnDeallocatePaths(chip::app::ReadPrepareParams && aReadPrepareParams) override @@ -246,12 +250,16 @@ class TypedReadEventCallback final : public app::ReadClient::Callback } } - void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) override + CHIP_ERROR OnResubscriptionNeeded(chip::app::ReadClient * apReadClient, CHIP_ERROR aTerminationCause) override { + ReturnErrorOnFailure(app::ReadClient::Callback::OnResubscriptionNeeded(apReadClient, aTerminationCause)); + if (mOnResubscriptionAttempt) { - mOnResubscriptionAttempt(*mReadClient.get(), aTerminationCause, aNextResubscribeIntervalMsec); + mOnResubscriptionAttempt(*mReadClient.get(), aTerminationCause, apReadClient->ComputeTimeTillNextSubscription()); } + + return CHIP_NO_ERROR; } OnSuccessCallbackType mOnSuccess; diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index b6933d5f7d681e..d423ab0497bdf8 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -338,44 +338,55 @@ client cluster LevelControl = 8 { request struct MoveToLevelRequest { INT8U level = 0; INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveRequest { MoveMode moveMode = 0; INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { INT8U level = 0; INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct MoveWithOnOffRequest { MoveMode moveMode = 0; INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; } request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -385,7 +396,7 @@ client cluster LevelControl = 8 { command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(): DefaultSuccess = 7; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } client cluster BinaryInputBasic = 15 { @@ -478,7 +489,7 @@ client cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } info event access(read: administer) AccessControlExtensionChanged = 1 { @@ -486,7 +497,7 @@ client cluster AccessControl = 31 { nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; - fabric_idx adminFabricIndex = 254; + fabric_idx fabricIndex = 254; } attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; @@ -676,6 +687,7 @@ client cluster Basic = 40 { } info event Leave = 2 { + fabric_idx fabricIndex = 0; } info event ReachableChanged = 3 { @@ -1356,7 +1368,7 @@ client cluster GeneralDiagnostics = 51 { INT64U eventTrigger = 1; } - command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } client cluster SoftwareDiagnostics = 52 { @@ -1796,7 +1808,7 @@ client cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int8u currentFabricIndex = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute attrib_id attributeList[] = 65531; @@ -4000,7 +4012,7 @@ client cluster ApplicationBasic = 1293 { } readonly attribute char_string<32> vendorName = 0; - readonly attribute int16u vendorID = 1; + readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; readonly attribute ApplicationBasicApplication application = 4; @@ -4168,7 +4180,7 @@ client cluster TestCluster = 4294048773 { } info event TestFabricScopedEvent = 2 { - fabric_idx arg1 = 254; + fabric_idx fabricIndex = 254; } attribute boolean boolean = 0; diff --git a/src/controller/java/AndroidCallbacks.cpp b/src/controller/java/AndroidCallbacks.cpp index 588f47c14a9389..1966bd59ecca68 100644 --- a/src/controller/java/AndroidCallbacks.cpp +++ b/src/controller/java/AndroidCallbacks.cpp @@ -82,7 +82,7 @@ void GetConnectedDeviceCallback::OnDeviceConnectedFn(void * context, Operational env->CallVoidMethod(javaCallback, successMethod, reinterpret_cast(device)); } -void GetConnectedDeviceCallback::OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR error) +void GetConnectedDeviceCallback::OnDeviceConnectionFailureFn(void * context, const ScopedNodeId & peerId, CHIP_ERROR error) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); auto * self = static_cast(context); @@ -547,22 +547,23 @@ void ReportEventCallback::OnSubscriptionEstablished(SubscriptionId aSubscription JniReferences::GetInstance().CallSubscriptionEstablished(mSubscriptionEstablishedCallbackRef); } -void ReportEventCallback::OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) +CHIP_ERROR ReportEventCallback::OnResubscriptionNeeded(app::ReadClient * apReadClient, CHIP_ERROR aTerminationCause) { - VerifyOrReturn(mResubscriptionAttemptCallbackRef != nullptr, - ChipLogError(Controller, "mResubscriptionAttemptCallbackRef is null")); + VerifyOrReturnLogError(mResubscriptionAttemptCallbackRef != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + + ReturnErrorOnFailure(app::ReadClient::Callback::OnResubscriptionNeeded(apReadClient, aTerminationCause)); jmethodID onResubscriptionAttemptMethod; - err = JniReferences::GetInstance().FindMethod(env, mResubscriptionAttemptCallbackRef, "onResubscriptionAttempt", "(II)V", - &onResubscriptionAttemptMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Controller, "Could not find onResubscriptionAttempt method")); + ReturnLogErrorOnFailure(JniReferences::GetInstance().FindMethod( + env, mResubscriptionAttemptCallbackRef, "onResubscriptionAttempt", "(II)V", &onResubscriptionAttemptMethod)); DeviceLayer::StackUnlock unlock; env->CallVoidMethod(mResubscriptionAttemptCallbackRef, onResubscriptionAttemptMethod, aTerminationCause.AsInteger(), - aNextResubscribeIntervalMsec); + apReadClient->ComputeTimeTillNextSubscription()); + + return CHIP_NO_ERROR; } void ReportEventCallback::ReportError(jobject attributePath, CHIP_ERROR err) diff --git a/src/controller/java/AndroidCallbacks.h b/src/controller/java/AndroidCallbacks.h index 51c38d3c2b4e1a..9ba97362f53340 100644 --- a/src/controller/java/AndroidCallbacks.h +++ b/src/controller/java/AndroidCallbacks.h @@ -34,7 +34,7 @@ struct GetConnectedDeviceCallback ~GetConnectedDeviceCallback(); static void OnDeviceConnectedFn(void * context, OperationalDeviceProxy * device); - static void OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR error); + static void OnDeviceConnectionFailureFn(void * context, const ScopedNodeId & peerId, CHIP_ERROR error); Callback::Callback mOnSuccess; Callback::Callback mOnFailure; @@ -98,7 +98,7 @@ struct ReportEventCallback : public app::ReadClient::Callback void OnSubscriptionEstablished(SubscriptionId aSubscriptionId) override; - void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) override; + CHIP_ERROR OnResubscriptionNeeded(app::ReadClient * apReadClient, CHIP_ERROR aTerminationCause) override; /** Report errors back to Java layer. attributePath may be nullptr for general errors. */ void ReportError(jobject eventPath, CHIP_ERROR err); diff --git a/src/controller/java/CHIPDeviceController-JNI.cpp b/src/controller/java/CHIPDeviceController-JNI.cpp index 9b39ed0748c8e5..f545a0db19460b 100644 --- a/src/controller/java/CHIPDeviceController-JNI.cpp +++ b/src/controller/java/CHIPDeviceController-JNI.cpp @@ -517,11 +517,7 @@ JNI_METHOD(jstring, getIpAddress)(JNIEnv * env, jobject self, jlong handle, jlon uint16_t port; char addrStr[50]; - CHIP_ERROR err = - wrapper->Controller()->GetPeerAddressAndPort(PeerId() - .SetCompressedFabricId(wrapper->Controller()->GetCompressedFabricId()) - .SetNodeId(static_cast(deviceId)), - addr, port); + CHIP_ERROR err = wrapper->Controller()->GetPeerAddressAndPort(deviceId, addr, port); if (err != CHIP_NO_ERROR) { diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index af18e87a079d4f..c21a0947ccea70 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -16388,7 +16388,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + static_cast(cppValue), value); return value; } case Attributes::ApplicationName::Id: { diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index de6775d3df51d3..c51197fc6dd9ae 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -319,12 +319,12 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & value_latestValue_fabricIndex); } - jobject value_adminFabricIndex; - std::string value_adminFabricIndexClassName = "java/lang/Integer"; - std::string value_adminFabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_adminFabricIndexClassName.c_str(), - value_adminFabricIndexCtorSignature.c_str(), - cppValue.adminFabricIndex, value_adminFabricIndex); + jobject value_fabricIndex; + std::string value_fabricIndexClassName = "java/lang/Integer"; + std::string value_fabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), + value_fabricIndexCtorSignature.c_str(), + cppValue.fabricIndex, value_fabricIndex); jclass accessControlEntryChangedStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -347,7 +347,7 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value = env->NewObject(accessControlEntryChangedStructClass, accessControlEntryChangedStructCtor, value_adminNodeID, - value_adminPasscodeID, value_changeType, value_latestValue, value_adminFabricIndex); + value_adminPasscodeID, value_changeType, value_latestValue, value_fabricIndex); return value; } @@ -434,12 +434,12 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & value_latestValue_fabricIndex); } - jobject value_adminFabricIndex; - std::string value_adminFabricIndexClassName = "java/lang/Integer"; - std::string value_adminFabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_adminFabricIndexClassName.c_str(), - value_adminFabricIndexCtorSignature.c_str(), - cppValue.adminFabricIndex, value_adminFabricIndex); + jobject value_fabricIndex; + std::string value_fabricIndexClassName = "java/lang/Integer"; + std::string value_fabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), + value_fabricIndexCtorSignature.c_str(), + cppValue.fabricIndex, value_fabricIndex); jclass accessControlExtensionChangedStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -463,7 +463,7 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value = env->NewObject(accessControlExtensionChangedStructClass, accessControlExtensionChangedStructCtor, value_adminNodeID, - value_adminPasscodeID, value_changeType, value_latestValue, value_adminFabricIndex); + value_adminPasscodeID, value_changeType, value_latestValue, value_fabricIndex); return value; } @@ -653,6 +653,13 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { return nullptr; } + jobject value_fabricIndex; + std::string value_fabricIndexClassName = "java/lang/Integer"; + std::string value_fabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), + value_fabricIndexCtorSignature.c_str(), + cppValue.fabricIndex, value_fabricIndex); + jclass leaveStructClass; err = chip::JniReferences::GetInstance().GetClassRef( env, "chip/devicecontroller/ChipEventStructs$BasicClusterLeaveEvent", leaveStructClass); @@ -661,14 +668,14 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & ChipLogError(Zcl, "Could not find class ChipEventStructs$BasicClusterLeaveEvent"); return nullptr; } - jmethodID leaveStructCtor = env->GetMethodID(leaveStructClass, "", "()V"); + jmethodID leaveStructCtor = env->GetMethodID(leaveStructClass, "", "(Ljava/lang/Integer;)V"); if (leaveStructCtor == nullptr) { ChipLogError(Zcl, "Could not find ChipEventStructs$BasicClusterLeaveEvent constructor"); return nullptr; } - jobject value = env->NewObject(leaveStructClass, leaveStructCtor); + jobject value = env->NewObject(leaveStructClass, leaveStructCtor, value_fabricIndex); return value; } @@ -3394,11 +3401,12 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { return nullptr; } - jobject value_arg1; - std::string value_arg1ClassName = "java/lang/Integer"; - std::string value_arg1CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_arg1ClassName.c_str(), value_arg1CtorSignature.c_str(), cppValue.arg1, value_arg1); + jobject value_fabricIndex; + std::string value_fabricIndexClassName = "java/lang/Integer"; + std::string value_fabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), + value_fabricIndexCtorSignature.c_str(), + cppValue.fabricIndex, value_fabricIndex); jclass testFabricScopedEventStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -3417,7 +3425,7 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & return nullptr; } - jobject value = env->NewObject(testFabricScopedEventStructClass, testFabricScopedEventStructCtor, value_arg1); + jobject value = env->NewObject(testFabricScopedEventStructClass, testFabricScopedEventStructCtor, value_fabricIndex); return value; } diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index c9bbe64cc955f9..2cf7e3f32c7e26 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -12245,65 +12245,6 @@ void CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback::Callbac env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback::CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback::~CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback::CallbackFn(void * context, chip::FabricIndex value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value, - javaValue); - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::CHIPOperationalCredentialsGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), @@ -24323,6 +24264,63 @@ void CHIPApplicationLauncherAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } +CHIPApplicationBasicVendorIDAttributeCallback::CHIPApplicationBasicVendorIDAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPApplicationBasicVendorIDAttributeCallback::~CHIPApplicationBasicVendorIDAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPApplicationBasicVendorIDAttributeCallback::CallbackFn(void * context, chip::VendorId value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + static_cast(value), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + CHIPApplicationBasicAllowedVendorListAttributeCallback::CHIPApplicationBasicAllowedVendorListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index ebce0164633adc..992e58ddaf34de 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -5054,36 +5054,6 @@ class CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback bool keepAlive; }; -class CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback - : public chip::Callback::Callback -{ -public: - CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback(); - - static void maybeDestroy(CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback * callback) - { - if (!callback->keepAlive) - { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn(void * context, chip::FabricIndex value); - static void OnSubscriptionEstablished(void * context) - { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( - reinterpret_cast(context)->javaCallbackRef); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; - class CHIPOperationalCredentialsGeneratedCommandListAttributeCallback : public chip::Callback::Callback { @@ -10172,6 +10142,36 @@ class CHIPApplicationLauncherAttributeListAttributeCallback bool keepAlive; }; +class CHIPApplicationBasicVendorIDAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPApplicationBasicVendorIDAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPApplicationBasicVendorIDAttributeCallback(); + + static void maybeDestroy(CHIPApplicationBasicVendorIDAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, chip::VendorId value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPApplicationBasicAllowedVendorListAttributeCallback : public chip::Callback::Callback { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index fd4f7047d05ed6..6a3e45eca10dc1 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -1510,26 +1510,26 @@ public void moveToLevel( DefaultClusterCallback callback, Integer level, Integer transitionTime, - Integer optionMask, - Integer optionOverride) { + Integer optionsMask, + Integer optionsOverride) { moveToLevel( - chipClusterPtr, callback, level, transitionTime, optionMask, optionOverride, null); + chipClusterPtr, callback, level, transitionTime, optionsMask, optionsOverride, null); } public void moveToLevel( DefaultClusterCallback callback, Integer level, Integer transitionTime, - Integer optionMask, - Integer optionOverride, + Integer optionsMask, + Integer optionsOverride, int timedInvokeTimeoutMs) { moveToLevel( chipClusterPtr, callback, level, transitionTime, - optionMask, - optionOverride, + optionsMask, + optionsOverride, timedInvokeTimeoutMs); } @@ -1537,25 +1537,25 @@ public void move( DefaultClusterCallback callback, Integer moveMode, Integer rate, - Integer optionMask, - Integer optionOverride) { - move(chipClusterPtr, callback, moveMode, rate, optionMask, optionOverride, null); + Integer optionsMask, + Integer optionsOverride) { + move(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, null); } public void move( DefaultClusterCallback callback, Integer moveMode, Integer rate, - Integer optionMask, - Integer optionOverride, + Integer optionsMask, + Integer optionsOverride, int timedInvokeTimeoutMs) { move( chipClusterPtr, callback, moveMode, rate, - optionMask, - optionOverride, + optionsMask, + optionsOverride, timedInvokeTimeoutMs); } @@ -1564,16 +1564,16 @@ public void step( Integer stepMode, Integer stepSize, Integer transitionTime, - Integer optionMask, - Integer optionOverride) { + Integer optionsMask, + Integer optionsOverride) { step( chipClusterPtr, callback, stepMode, stepSize, transitionTime, - optionMask, - optionOverride, + optionsMask, + optionsOverride, null); } @@ -1582,8 +1582,8 @@ public void step( Integer stepMode, Integer stepSize, Integer transitionTime, - Integer optionMask, - Integer optionOverride, + Integer optionsMask, + Integer optionsOverride, int timedInvokeTimeoutMs) { step( chipClusterPtr, @@ -1591,51 +1591,93 @@ public void step( stepMode, stepSize, transitionTime, - optionMask, - optionOverride, + optionsMask, + optionsOverride, timedInvokeTimeoutMs); } - public void stop(DefaultClusterCallback callback, Integer optionMask, Integer optionOverride) { - stop(chipClusterPtr, callback, optionMask, optionOverride, null); + public void stop( + DefaultClusterCallback callback, Integer optionsMask, Integer optionsOverride) { + stop(chipClusterPtr, callback, optionsMask, optionsOverride, null); } public void stop( DefaultClusterCallback callback, - Integer optionMask, - Integer optionOverride, + Integer optionsMask, + Integer optionsOverride, int timedInvokeTimeoutMs) { - stop(chipClusterPtr, callback, optionMask, optionOverride, timedInvokeTimeoutMs); + stop(chipClusterPtr, callback, optionsMask, optionsOverride, timedInvokeTimeoutMs); } public void moveToLevelWithOnOff( - DefaultClusterCallback callback, Integer level, Integer transitionTime) { - moveToLevelWithOnOff(chipClusterPtr, callback, level, transitionTime, null); + DefaultClusterCallback callback, + Integer level, + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride) { + moveToLevelWithOnOff( + chipClusterPtr, callback, level, transitionTime, optionsMask, optionsOverride, null); } public void moveToLevelWithOnOff( DefaultClusterCallback callback, Integer level, Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, int timedInvokeTimeoutMs) { - moveToLevelWithOnOff(chipClusterPtr, callback, level, transitionTime, timedInvokeTimeoutMs); + moveToLevelWithOnOff( + chipClusterPtr, + callback, + level, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } - public void moveWithOnOff(DefaultClusterCallback callback, Integer moveMode, Integer rate) { - moveWithOnOff(chipClusterPtr, callback, moveMode, rate, null); + public void moveWithOnOff( + DefaultClusterCallback callback, + Integer moveMode, + Integer rate, + Integer optionsMask, + Integer optionsOverride) { + moveWithOnOff(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, null); } public void moveWithOnOff( - DefaultClusterCallback callback, Integer moveMode, Integer rate, int timedInvokeTimeoutMs) { - moveWithOnOff(chipClusterPtr, callback, moveMode, rate, timedInvokeTimeoutMs); + DefaultClusterCallback callback, + Integer moveMode, + Integer rate, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + moveWithOnOff( + chipClusterPtr, + callback, + moveMode, + rate, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } public void stepWithOnOff( DefaultClusterCallback callback, Integer stepMode, Integer stepSize, - Integer transitionTime) { - stepWithOnOff(chipClusterPtr, callback, stepMode, stepSize, transitionTime, null); + Integer transitionTime, + Integer optionsMask, + Integer optionsOverride) { + stepWithOnOff( + chipClusterPtr, + callback, + stepMode, + stepSize, + transitionTime, + optionsMask, + optionsOverride, + null); } public void stepWithOnOff( @@ -1643,18 +1685,31 @@ public void stepWithOnOff( Integer stepMode, Integer stepSize, Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, int timedInvokeTimeoutMs) { stepWithOnOff( - chipClusterPtr, callback, stepMode, stepSize, transitionTime, timedInvokeTimeoutMs); + chipClusterPtr, + callback, + stepMode, + stepSize, + transitionTime, + optionsMask, + optionsOverride, + timedInvokeTimeoutMs); } - public void stopWithOnOff(DefaultClusterCallback callback) { - stopWithOnOff(chipClusterPtr, callback, null); + public void stopWithOnOff( + DefaultClusterCallback callback, Integer optionsMask, Integer optionsOverride) { + stopWithOnOff(chipClusterPtr, callback, optionsMask, optionsOverride, null); } - public void stopWithOnOff(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { - - stopWithOnOff(chipClusterPtr, callback, timedInvokeTimeoutMs); + public void stopWithOnOff( + DefaultClusterCallback callback, + Integer optionsMask, + Integer optionsOverride, + int timedInvokeTimeoutMs) { + stopWithOnOff(chipClusterPtr, callback, optionsMask, optionsOverride, timedInvokeTimeoutMs); } private native void moveToLevel( @@ -1662,8 +1717,8 @@ private native void moveToLevel( DefaultClusterCallback Callback, Integer level, Integer transitionTime, - Integer optionMask, - Integer optionOverride, + Integer optionsMask, + Integer optionsOverride, @Nullable Integer timedInvokeTimeoutMs); private native void move( @@ -1671,8 +1726,8 @@ private native void move( DefaultClusterCallback Callback, Integer moveMode, Integer rate, - Integer optionMask, - Integer optionOverride, + Integer optionsMask, + Integer optionsOverride, @Nullable Integer timedInvokeTimeoutMs); private native void step( @@ -1681,15 +1736,15 @@ private native void step( Integer stepMode, Integer stepSize, Integer transitionTime, - Integer optionMask, - Integer optionOverride, + Integer optionsMask, + Integer optionsOverride, @Nullable Integer timedInvokeTimeoutMs); private native void stop( long chipClusterPtr, DefaultClusterCallback Callback, - Integer optionMask, - Integer optionOverride, + Integer optionsMask, + Integer optionsOverride, @Nullable Integer timedInvokeTimeoutMs); private native void moveToLevelWithOnOff( @@ -1697,6 +1752,8 @@ private native void moveToLevelWithOnOff( DefaultClusterCallback Callback, Integer level, Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, @Nullable Integer timedInvokeTimeoutMs); private native void moveWithOnOff( @@ -1704,6 +1761,8 @@ private native void moveWithOnOff( DefaultClusterCallback Callback, Integer moveMode, Integer rate, + Integer optionsMask, + Integer optionsOverride, @Nullable Integer timedInvokeTimeoutMs); private native void stepWithOnOff( @@ -1712,11 +1771,15 @@ private native void stepWithOnOff( Integer stepMode, Integer stepSize, Integer transitionTime, + Integer optionsMask, + Integer optionsOverride, @Nullable Integer timedInvokeTimeoutMs); private native void stopWithOnOff( long chipClusterPtr, DefaultClusterCallback Callback, + Integer optionsMask, + Integer optionsOverride, @Nullable Integer timedInvokeTimeoutMs); public interface OnLevelAttributeCallback { @@ -9975,14 +10038,6 @@ public interface TrustedRootCertificatesAttributeCallback { default void onSubscriptionEstablished() {} } - public interface CurrentFabricIndexAttributeCallback { - void onSuccess(Integer value); - - void onError(Exception ex); - - default void onSubscriptionEstablished() {} - } - public interface GeneratedCommandListAttributeCallback { void onSuccess(List valueList); @@ -10053,12 +10108,12 @@ public void subscribeTrustedRootCertificatesAttribute( subscribeTrustedRootCertificatesAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readCurrentFabricIndexAttribute(CurrentFabricIndexAttributeCallback callback) { + public void readCurrentFabricIndexAttribute(IntegerAttributeCallback callback) { readCurrentFabricIndexAttribute(chipClusterPtr, callback); } public void subscribeCurrentFabricIndexAttribute( - CurrentFabricIndexAttributeCallback callback, int minInterval, int maxInterval) { + IntegerAttributeCallback callback, int minInterval, int maxInterval) { subscribeCurrentFabricIndexAttribute(chipClusterPtr, callback, minInterval, maxInterval); } @@ -10140,13 +10195,10 @@ private native void subscribeTrustedRootCertificatesAttribute( int maxInterval); private native void readCurrentFabricIndexAttribute( - long chipClusterPtr, CurrentFabricIndexAttributeCallback callback); + long chipClusterPtr, IntegerAttributeCallback callback); private native void subscribeCurrentFabricIndexAttribute( - long chipClusterPtr, - CurrentFabricIndexAttributeCallback callback, - int minInterval, - int maxInterval); + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); private native void readGeneratedCommandListAttribute( long chipClusterPtr, GeneratedCommandListAttributeCallback callback); @@ -21027,6 +21079,14 @@ public ApplicationBasicCluster(long devicePtr, int endpointId) { @Override public native long initWithDevice(long devicePtr, int endpointId); + public interface VendorIDAttributeCallback { + void onSuccess(Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + public interface AllowedVendorListAttributeCallback { void onSuccess(List valueList); @@ -21068,12 +21128,12 @@ public void subscribeVendorNameAttribute( subscribeVendorNameAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readVendorIDAttribute(IntegerAttributeCallback callback) { + public void readVendorIDAttribute(VendorIDAttributeCallback callback) { readVendorIDAttribute(chipClusterPtr, callback); } public void subscribeVendorIDAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + VendorIDAttributeCallback callback, int minInterval, int maxInterval) { subscribeVendorIDAttribute(chipClusterPtr, callback, minInterval, maxInterval); } @@ -21177,10 +21237,10 @@ private native void subscribeVendorNameAttribute( int maxInterval); private native void readVendorIDAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, VendorIDAttributeCallback callback); private native void subscribeVendorIDAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, VendorIDAttributeCallback callback, int minInterval, int maxInterval); private native void readApplicationNameAttribute( long chipClusterPtr, CharStringAttributeCallback callback); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java index aac77c2687c54b..a6468550e3545b 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java @@ -29,19 +29,19 @@ public static class AccessControlClusterAccessControlEntryChangedEvent { public @Nullable Integer adminPasscodeID; public Integer changeType; public @Nullable ChipStructs.AccessControlClusterAccessControlEntry latestValue; - public Integer adminFabricIndex; + public Integer fabricIndex; public AccessControlClusterAccessControlEntryChangedEvent( @Nullable Long adminNodeID, @Nullable Integer adminPasscodeID, Integer changeType, @Nullable ChipStructs.AccessControlClusterAccessControlEntry latestValue, - Integer adminFabricIndex) { + Integer fabricIndex) { this.adminNodeID = adminNodeID; this.adminPasscodeID = adminPasscodeID; this.changeType = changeType; this.latestValue = latestValue; - this.adminFabricIndex = adminFabricIndex; + this.fabricIndex = fabricIndex; } @Override @@ -60,8 +60,8 @@ public String toString() { output.append("\tlatestValue: "); output.append(latestValue); output.append("\n"); - output.append("\tadminFabricIndex: "); - output.append(adminFabricIndex); + output.append("\tfabricIndex: "); + output.append(fabricIndex); output.append("\n"); output.append("}\n"); return output.toString(); @@ -73,19 +73,19 @@ public static class AccessControlClusterAccessControlExtensionChangedEvent { public @Nullable Integer adminPasscodeID; public Integer changeType; public @Nullable ChipStructs.AccessControlClusterExtensionEntry latestValue; - public Integer adminFabricIndex; + public Integer fabricIndex; public AccessControlClusterAccessControlExtensionChangedEvent( @Nullable Long adminNodeID, @Nullable Integer adminPasscodeID, Integer changeType, @Nullable ChipStructs.AccessControlClusterExtensionEntry latestValue, - Integer adminFabricIndex) { + Integer fabricIndex) { this.adminNodeID = adminNodeID; this.adminPasscodeID = adminPasscodeID; this.changeType = changeType; this.latestValue = latestValue; - this.adminFabricIndex = adminFabricIndex; + this.fabricIndex = fabricIndex; } @Override @@ -104,8 +104,8 @@ public String toString() { output.append("\tlatestValue: "); output.append(latestValue); output.append("\n"); - output.append("\tadminFabricIndex: "); - output.append(adminFabricIndex); + output.append("\tfabricIndex: "); + output.append(fabricIndex); output.append("\n"); output.append("}\n"); return output.toString(); @@ -210,13 +210,19 @@ public String toString() { } public static class BasicClusterLeaveEvent { + public Integer fabricIndex; - public BasicClusterLeaveEvent() {} + public BasicClusterLeaveEvent(Integer fabricIndex) { + this.fabricIndex = fabricIndex; + } @Override public String toString() { StringBuilder output = new StringBuilder(); output.append("BasicClusterLeaveEvent {\n"); + output.append("\tfabricIndex: "); + output.append(fabricIndex); + output.append("\n"); output.append("}\n"); return output.toString(); } @@ -1248,18 +1254,18 @@ public String toString() { } public static class TestClusterClusterTestFabricScopedEventEvent { - public Integer arg1; + public Integer fabricIndex; - public TestClusterClusterTestFabricScopedEventEvent(Integer arg1) { - this.arg1 = arg1; + public TestClusterClusterTestFabricScopedEventEvent(Integer fabricIndex) { + this.fabricIndex = fabricIndex; } @Override public String toString() { StringBuilder output = new StringBuilder(); output.append("TestClusterClusterTestFabricScopedEventEvent {\n"); - output.append("\targ1: "); - output.append(arg1); + output.append("\tfabricIndex: "); + output.append(fabricIndex); output.append("\n"); output.append("}\n"); return output.toString(); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 7c587859ab2e0f..a7431df44035e6 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -8007,15 +8007,15 @@ public Map> getCommandMap() { levelControlmoveToLevelCommandParams.put( "transitionTime", levelControlmoveToLeveltransitionTimeCommandParameterInfo); - CommandParameterInfo levelControlmoveToLeveloptionMaskCommandParameterInfo = - new CommandParameterInfo("optionMask", Integer.class, Integer.class); + CommandParameterInfo levelControlmoveToLeveloptionsMaskCommandParameterInfo = + new CommandParameterInfo("optionsMask", Integer.class, Integer.class); levelControlmoveToLevelCommandParams.put( - "optionMask", levelControlmoveToLeveloptionMaskCommandParameterInfo); + "optionsMask", levelControlmoveToLeveloptionsMaskCommandParameterInfo); - CommandParameterInfo levelControlmoveToLeveloptionOverrideCommandParameterInfo = - new CommandParameterInfo("optionOverride", Integer.class, Integer.class); + CommandParameterInfo levelControlmoveToLeveloptionsOverrideCommandParameterInfo = + new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); levelControlmoveToLevelCommandParams.put( - "optionOverride", levelControlmoveToLeveloptionOverrideCommandParameterInfo); + "optionsOverride", levelControlmoveToLeveloptionsOverrideCommandParameterInfo); InteractionInfo levelControlmoveToLevelInteractionInfo = new InteractionInfo( @@ -8025,8 +8025,8 @@ public Map> getCommandMap() { (DefaultClusterCallback) callback, (Integer) commandArguments.get("level"), (Integer) commandArguments.get("transitionTime"), - (Integer) commandArguments.get("optionMask"), - (Integer) commandArguments.get("optionOverride")); + (Integer) commandArguments.get("optionsMask"), + (Integer) commandArguments.get("optionsOverride")); }, () -> new DelegatedDefaultClusterCallback(), levelControlmoveToLevelCommandParams); @@ -8042,14 +8042,15 @@ public Map> getCommandMap() { new CommandParameterInfo("rate", Integer.class, Integer.class); levelControlmoveCommandParams.put("rate", levelControlmoverateCommandParameterInfo); - CommandParameterInfo levelControlmoveoptionMaskCommandParameterInfo = - new CommandParameterInfo("optionMask", Integer.class, Integer.class); - levelControlmoveCommandParams.put("optionMask", levelControlmoveoptionMaskCommandParameterInfo); + CommandParameterInfo levelControlmoveoptionsMaskCommandParameterInfo = + new CommandParameterInfo("optionsMask", Integer.class, Integer.class); + levelControlmoveCommandParams.put( + "optionsMask", levelControlmoveoptionsMaskCommandParameterInfo); - CommandParameterInfo levelControlmoveoptionOverrideCommandParameterInfo = - new CommandParameterInfo("optionOverride", Integer.class, Integer.class); + CommandParameterInfo levelControlmoveoptionsOverrideCommandParameterInfo = + new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); levelControlmoveCommandParams.put( - "optionOverride", levelControlmoveoptionOverrideCommandParameterInfo); + "optionsOverride", levelControlmoveoptionsOverrideCommandParameterInfo); InteractionInfo levelControlmoveInteractionInfo = new InteractionInfo( @@ -8059,8 +8060,8 @@ public Map> getCommandMap() { (DefaultClusterCallback) callback, (Integer) commandArguments.get("moveMode"), (Integer) commandArguments.get("rate"), - (Integer) commandArguments.get("optionMask"), - (Integer) commandArguments.get("optionOverride")); + (Integer) commandArguments.get("optionsMask"), + (Integer) commandArguments.get("optionsOverride")); }, () -> new DelegatedDefaultClusterCallback(), levelControlmoveCommandParams); @@ -8080,14 +8081,15 @@ public Map> getCommandMap() { levelControlstepCommandParams.put( "transitionTime", levelControlsteptransitionTimeCommandParameterInfo); - CommandParameterInfo levelControlstepoptionMaskCommandParameterInfo = - new CommandParameterInfo("optionMask", Integer.class, Integer.class); - levelControlstepCommandParams.put("optionMask", levelControlstepoptionMaskCommandParameterInfo); + CommandParameterInfo levelControlstepoptionsMaskCommandParameterInfo = + new CommandParameterInfo("optionsMask", Integer.class, Integer.class); + levelControlstepCommandParams.put( + "optionsMask", levelControlstepoptionsMaskCommandParameterInfo); - CommandParameterInfo levelControlstepoptionOverrideCommandParameterInfo = - new CommandParameterInfo("optionOverride", Integer.class, Integer.class); + CommandParameterInfo levelControlstepoptionsOverrideCommandParameterInfo = + new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); levelControlstepCommandParams.put( - "optionOverride", levelControlstepoptionOverrideCommandParameterInfo); + "optionsOverride", levelControlstepoptionsOverrideCommandParameterInfo); InteractionInfo levelControlstepInteractionInfo = new InteractionInfo( @@ -8098,22 +8100,23 @@ public Map> getCommandMap() { (Integer) commandArguments.get("stepMode"), (Integer) commandArguments.get("stepSize"), (Integer) commandArguments.get("transitionTime"), - (Integer) commandArguments.get("optionMask"), - (Integer) commandArguments.get("optionOverride")); + (Integer) commandArguments.get("optionsMask"), + (Integer) commandArguments.get("optionsOverride")); }, () -> new DelegatedDefaultClusterCallback(), levelControlstepCommandParams); levelControlClusterInteractionInfoMap.put("step", levelControlstepInteractionInfo); Map levelControlstopCommandParams = new LinkedHashMap(); - CommandParameterInfo levelControlstopoptionMaskCommandParameterInfo = - new CommandParameterInfo("optionMask", Integer.class, Integer.class); - levelControlstopCommandParams.put("optionMask", levelControlstopoptionMaskCommandParameterInfo); + CommandParameterInfo levelControlstopoptionsMaskCommandParameterInfo = + new CommandParameterInfo("optionsMask", Integer.class, Integer.class); + levelControlstopCommandParams.put( + "optionsMask", levelControlstopoptionsMaskCommandParameterInfo); - CommandParameterInfo levelControlstopoptionOverrideCommandParameterInfo = - new CommandParameterInfo("optionOverride", Integer.class, Integer.class); + CommandParameterInfo levelControlstopoptionsOverrideCommandParameterInfo = + new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); levelControlstopCommandParams.put( - "optionOverride", levelControlstopoptionOverrideCommandParameterInfo); + "optionsOverride", levelControlstopoptionsOverrideCommandParameterInfo); InteractionInfo levelControlstopInteractionInfo = new InteractionInfo( @@ -8121,8 +8124,8 @@ public Map> getCommandMap() { ((ChipClusters.LevelControlCluster) cluster) .stop( (DefaultClusterCallback) callback, - (Integer) commandArguments.get("optionMask"), - (Integer) commandArguments.get("optionOverride")); + (Integer) commandArguments.get("optionsMask"), + (Integer) commandArguments.get("optionsOverride")); }, () -> new DelegatedDefaultClusterCallback(), levelControlstopCommandParams); @@ -8139,6 +8142,16 @@ public Map> getCommandMap() { levelControlmoveToLevelWithOnOffCommandParams.put( "transitionTime", levelControlmoveToLevelWithOnOfftransitionTimeCommandParameterInfo); + CommandParameterInfo levelControlmoveToLevelWithOnOffoptionsMaskCommandParameterInfo = + new CommandParameterInfo("optionsMask", Integer.class, Integer.class); + levelControlmoveToLevelWithOnOffCommandParams.put( + "optionsMask", levelControlmoveToLevelWithOnOffoptionsMaskCommandParameterInfo); + + CommandParameterInfo levelControlmoveToLevelWithOnOffoptionsOverrideCommandParameterInfo = + new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); + levelControlmoveToLevelWithOnOffCommandParams.put( + "optionsOverride", levelControlmoveToLevelWithOnOffoptionsOverrideCommandParameterInfo); + InteractionInfo levelControlmoveToLevelWithOnOffInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8146,7 +8159,9 @@ public Map> getCommandMap() { .moveToLevelWithOnOff( (DefaultClusterCallback) callback, (Integer) commandArguments.get("level"), - (Integer) commandArguments.get("transitionTime")); + (Integer) commandArguments.get("transitionTime"), + (Integer) commandArguments.get("optionsMask"), + (Integer) commandArguments.get("optionsOverride")); }, () -> new DelegatedDefaultClusterCallback(), levelControlmoveToLevelWithOnOffCommandParams); @@ -8164,6 +8179,16 @@ public Map> getCommandMap() { levelControlmoveWithOnOffCommandParams.put( "rate", levelControlmoveWithOnOffrateCommandParameterInfo); + CommandParameterInfo levelControlmoveWithOnOffoptionsMaskCommandParameterInfo = + new CommandParameterInfo("optionsMask", Integer.class, Integer.class); + levelControlmoveWithOnOffCommandParams.put( + "optionsMask", levelControlmoveWithOnOffoptionsMaskCommandParameterInfo); + + CommandParameterInfo levelControlmoveWithOnOffoptionsOverrideCommandParameterInfo = + new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); + levelControlmoveWithOnOffCommandParams.put( + "optionsOverride", levelControlmoveWithOnOffoptionsOverrideCommandParameterInfo); + InteractionInfo levelControlmoveWithOnOffInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8171,7 +8196,9 @@ public Map> getCommandMap() { .moveWithOnOff( (DefaultClusterCallback) callback, (Integer) commandArguments.get("moveMode"), - (Integer) commandArguments.get("rate")); + (Integer) commandArguments.get("rate"), + (Integer) commandArguments.get("optionsMask"), + (Integer) commandArguments.get("optionsOverride")); }, () -> new DelegatedDefaultClusterCallback(), levelControlmoveWithOnOffCommandParams); @@ -8194,6 +8221,16 @@ public Map> getCommandMap() { levelControlstepWithOnOffCommandParams.put( "transitionTime", levelControlstepWithOnOfftransitionTimeCommandParameterInfo); + CommandParameterInfo levelControlstepWithOnOffoptionsMaskCommandParameterInfo = + new CommandParameterInfo("optionsMask", Integer.class, Integer.class); + levelControlstepWithOnOffCommandParams.put( + "optionsMask", levelControlstepWithOnOffoptionsMaskCommandParameterInfo); + + CommandParameterInfo levelControlstepWithOnOffoptionsOverrideCommandParameterInfo = + new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); + levelControlstepWithOnOffCommandParams.put( + "optionsOverride", levelControlstepWithOnOffoptionsOverrideCommandParameterInfo); + InteractionInfo levelControlstepWithOnOffInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8202,7 +8239,9 @@ public Map> getCommandMap() { (DefaultClusterCallback) callback, (Integer) commandArguments.get("stepMode"), (Integer) commandArguments.get("stepSize"), - (Integer) commandArguments.get("transitionTime")); + (Integer) commandArguments.get("transitionTime"), + (Integer) commandArguments.get("optionsMask"), + (Integer) commandArguments.get("optionsOverride")); }, () -> new DelegatedDefaultClusterCallback(), levelControlstepWithOnOffCommandParams); @@ -8210,11 +8249,24 @@ public Map> getCommandMap() { "stepWithOnOff", levelControlstepWithOnOffInteractionInfo); Map levelControlstopWithOnOffCommandParams = new LinkedHashMap(); + CommandParameterInfo levelControlstopWithOnOffoptionsMaskCommandParameterInfo = + new CommandParameterInfo("optionsMask", Integer.class, Integer.class); + levelControlstopWithOnOffCommandParams.put( + "optionsMask", levelControlstopWithOnOffoptionsMaskCommandParameterInfo); + + CommandParameterInfo levelControlstopWithOnOffoptionsOverrideCommandParameterInfo = + new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); + levelControlstopWithOnOffCommandParams.put( + "optionsOverride", levelControlstopWithOnOffoptionsOverrideCommandParameterInfo); + InteractionInfo levelControlstopWithOnOffInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.LevelControlCluster) cluster) - .stopWithOnOff((DefaultClusterCallback) callback); + .stopWithOnOff( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("optionsMask"), + (Integer) commandArguments.get("optionsOverride")); }, () -> new DelegatedDefaultClusterCallback(), levelControlstopWithOnOffCommandParams); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index 6ad1a6f0886652..b38fa1876d9b89 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -5439,9 +5439,7 @@ public Map> getReadAttributeMap() { (cluster, callback, commandArguments) -> { ((ChipClusters.OperationalCredentialsCluster) cluster) .readCurrentFabricIndexAttribute( - (ChipClusters.OperationalCredentialsCluster - .CurrentFabricIndexAttributeCallback) - callback); + (ChipClusters.IntegerAttributeCallback) callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readOperationalCredentialsCurrentFabricIndexCommandParams); @@ -10852,7 +10850,8 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.ApplicationBasicCluster) cluster) - .readVendorIDAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readVendorIDAttribute( + (ChipClusters.ApplicationBasicCluster.VendorIDAttributeCallback) callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readApplicationBasicVendorIDCommandParams); diff --git a/src/controller/python/ChipDeviceController-ScriptBinding.cpp b/src/controller/python/ChipDeviceController-ScriptBinding.cpp index 6927c6c65f4b1e..355a233561e9b6 100644 --- a/src/controller/python/ChipDeviceController-ScriptBinding.cpp +++ b/src/controller/python/ChipDeviceController-ScriptBinding.cpp @@ -298,12 +298,9 @@ ChipError::StorageType pychip_DeviceController_GetAddressAndPort(chip::Controlle uint16_t * outPort) { Inet::IPAddress address; - ReturnErrorOnFailure( - devCtrl - ->GetPeerAddressAndPort(PeerId().SetCompressedFabricId(devCtrl->GetCompressedFabricId()).SetNodeId(nodeId), address, - *outPort) - .AsInteger()); - VerifyOrReturnError(address.ToString(outAddress, maxAddressLen), CHIP_ERROR_BUFFER_TOO_SMALL.AsInteger()); + ReturnErrorOnFailure(devCtrl->GetPeerAddressAndPort(nodeId, address, *outPort).AsInteger()); + VerifyOrReturnError(address.ToString(outAddress, static_cast(maxAddressLen)), + CHIP_ERROR_BUFFER_TOO_SMALL.AsInteger()); return CHIP_NO_ERROR.AsInteger(); } @@ -621,7 +618,7 @@ struct GetDeviceCallbacks delete self; } - static void OnConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR error) + static void OnConnectionFailureFn(void * context, const ScopedNodeId & peerId, CHIP_ERROR error) { auto * self = static_cast(context); self->mCallback(nullptr, error.AsInteger()); diff --git a/src/controller/python/chip/clusters/Attribute.py b/src/controller/python/chip/clusters/Attribute.py index 87fd371cf963c3..db29b86974a284 100644 --- a/src/controller/python/chip/clusters/Attribute.py +++ b/src/controller/python/chip/clusters/Attribute.py @@ -474,6 +474,9 @@ def __init__(self, transaction: 'AsyncReadTransaction', subscriptionId, devCtrl) self._subscriptionId = subscriptionId self._devCtrl = devCtrl self._isDone = False + self._onResubscriptionSucceededCb = None + self._onResubscriptionSucceededCb_isAsync = False + self._onResubscriptionAttemptedCb_isAsync = False def GetAttributes(self): ''' Returns the attribute value cache tracking the latest state on the publisher. @@ -493,14 +496,35 @@ def GetAttribute(self, path: TypedAttributePath) -> Any: def GetEvents(self): return self._readTransaction.GetAllEventValues() - def SetResubscriptionAttemptedCallback(self, callback: Callable[[SubscriptionTransaction, int, int], None]): + def OverrideLivenessTimeoutMs(self, timeoutMs: int): + handle = chip.native.GetLibraryHandle() + builtins.chipStack.Call( + lambda: handle.pychip_ReadClient_OverrideLivenessTimeout(self._readTransaction._pReadClient, timeoutMs) + ) + + def SetResubscriptionAttemptedCallback(self, callback: Callable[[SubscriptionTransaction, int, int], None], isAsync=False): ''' Sets the callback function that gets invoked anytime a re-subscription is attempted. The callback is expected to have the following signature: def Callback(transaction: SubscriptionTransaction, errorEncountered: int, nextResubscribeIntervalMsec: int) + + If the callback is an awaitable co-routine, isAsync should be set to True. ''' if callback is not None: self._onResubscriptionAttemptedCb = callback + self._onResubscriptionAttemptedCb_isAsync = isAsync + + def SetResubscriptionSucceededCallback(self, callback: Callback[[SubscriptionTransaction], None], isAsync=False): + ''' + Sets the callback function that gets invoked when a re-subscription attempt succeeds. The callback + is expected to have the following signature: + def Callback(transaction: SubscriptionTransaction) + + If the callback is an awaitable co-routine, isAsync should be set to True. + ''' + if callback is not None: + self._onResubscriptionSucceededCb = callback + self._onResubscriptionSucceededCb_isAsync = isAsync def SetAttributeUpdateCallback(self, callback: Callable[[TypedAttributePath, SubscriptionTransaction], None]): ''' @@ -550,7 +574,7 @@ def __repr__(self): return f'' -def DefaultResubscriptionAttemptedCallback(transaction: SubscriptionTransaction, terminationError, nextResubscribeIntervalMsec): +async def DefaultResubscriptionAttemptedCallback(transaction: SubscriptionTransaction, terminationError, nextResubscribeIntervalMsec): print(f"Previous subscription failed with Error: {terminationError} - re-subscribing in {nextResubscribeIntervalMsec}ms...") @@ -691,14 +715,26 @@ def _handleSubscriptionEstablished(self, subscriptionId): self._subscription_handler = SubscriptionTransaction( self, subscriptionId, self._devCtrl) self._future.set_result(self._subscription_handler) + else: + logging.info("Re-subscription succeeded!") + if self._subscription_handler._onResubscriptionSucceededCb is not None: + if (self._subscription_handler._onResubscriptionSucceededCb_isAsync): + self._event_loop.create_task( + self._subscription_handler._onResubscriptionSucceededCb(self._subscription_handler)) + else: + self._subscription_handler._onResubscriptionSucceededCb(self._subscription_handler) def handleSubscriptionEstablished(self, subscriptionId): self._event_loop.call_soon_threadsafe( self._handleSubscriptionEstablished, subscriptionId) def handleResubscriptionAttempted(self, terminationCause: int, nextResubscribeIntervalMsec: int): - self._event_loop.call_soon_threadsafe( - self._subscription_handler._onResubscriptionAttemptedCb, self._subscription_handler, terminationCause, nextResubscribeIntervalMsec) + if (self._subscription_handler._onResubscriptionAttemptedCb_isAsync): + self._event_loop.create_task(self._subscription_handler._onResubscriptionAttemptedCb( + self._subscription_handler, terminationCause, nextResubscribeIntervalMsec)) + else: + self._event_loop.call_soon_threadsafe( + self._subscription_handler._onResubscriptionAttemptedCb, self._subscription_handler, terminationCause, nextResubscribeIntervalMsec) def _handleReportBegin(self): pass diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index b729e83bbc1284..ea60bc87d43032 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -480,8 +480,8 @@ class ChipClusters: "args": { "level": "int", "transitionTime": "int", - "optionMask": "int", - "optionOverride": "int", + "optionsMask": "int", + "optionsOverride": "int", }, }, 0x00000001: { @@ -490,8 +490,8 @@ class ChipClusters: "args": { "moveMode": "int", "rate": "int", - "optionMask": "int", - "optionOverride": "int", + "optionsMask": "int", + "optionsOverride": "int", }, }, 0x00000002: { @@ -501,16 +501,16 @@ class ChipClusters: "stepMode": "int", "stepSize": "int", "transitionTime": "int", - "optionMask": "int", - "optionOverride": "int", + "optionsMask": "int", + "optionsOverride": "int", }, }, 0x00000003: { "commandId": 0x00000003, "commandName": "Stop", "args": { - "optionMask": "int", - "optionOverride": "int", + "optionsMask": "int", + "optionsOverride": "int", }, }, 0x00000004: { @@ -519,6 +519,8 @@ class ChipClusters: "args": { "level": "int", "transitionTime": "int", + "optionsMask": "int", + "optionsOverride": "int", }, }, 0x00000005: { @@ -527,6 +529,8 @@ class ChipClusters: "args": { "moveMode": "int", "rate": "int", + "optionsMask": "int", + "optionsOverride": "int", }, }, 0x00000006: { @@ -536,12 +540,16 @@ class ChipClusters: "stepMode": "int", "stepSize": "int", "transitionTime": "int", + "optionsMask": "int", + "optionsOverride": "int", }, }, 0x00000007: { "commandId": 0x00000007, "commandName": "StopWithOnOff", "args": { + "optionsMask": "int", + "optionsOverride": "int", }, }, }, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 93586fc2196954..4951b401531cdf 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -1649,14 +1649,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ClusterObjectFieldDescriptor(Label="level", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="transitionTime", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="optionMask", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionOverride", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) level: 'uint' = 0 transitionTime: 'uint' = 0 - optionMask: 'uint' = 0 - optionOverride: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass class Move(ClusterCommand): @@ -1670,14 +1670,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=LevelControl.Enums.MoveMode), ClusterObjectFieldDescriptor(Label="rate", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="optionMask", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionOverride", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) moveMode: 'LevelControl.Enums.MoveMode' = 0 rate: 'uint' = 0 - optionMask: 'uint' = 0 - optionOverride: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass class Step(ClusterCommand): @@ -1692,15 +1692,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=LevelControl.Enums.StepMode), ClusterObjectFieldDescriptor(Label="stepSize", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionMask", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="optionOverride", Tag=4, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), ]) stepMode: 'LevelControl.Enums.StepMode' = 0 stepSize: 'uint' = 0 transitionTime: 'uint' = 0 - optionMask: 'uint' = 0 - optionOverride: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass class Stop(ClusterCommand): @@ -1712,12 +1712,12 @@ class Stop(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="optionMask", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="optionOverride", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=1, Type=uint), ]) - optionMask: 'uint' = 0 - optionOverride: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass class MoveToLevelWithOnOff(ClusterCommand): @@ -1731,10 +1731,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ClusterObjectFieldDescriptor(Label="level", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="transitionTime", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) level: 'uint' = 0 transitionTime: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass class MoveWithOnOff(ClusterCommand): @@ -1748,10 +1752,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=LevelControl.Enums.MoveMode), ClusterObjectFieldDescriptor(Label="rate", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) moveMode: 'LevelControl.Enums.MoveMode' = 0 rate: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass class StepWithOnOff(ClusterCommand): @@ -1766,11 +1774,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=LevelControl.Enums.StepMode), ClusterObjectFieldDescriptor(Label="stepSize", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), ]) stepMode: 'LevelControl.Enums.StepMode' = 0 stepSize: 'uint' = 0 transitionTime: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass class StopWithOnOff(ClusterCommand): @@ -1782,8 +1794,12 @@ class StopWithOnOff(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=1, Type=uint), ]) + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass class MoveToClosestFrequency(ClusterCommand): @@ -3106,14 +3122,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="adminPasscodeID", Tag=2, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="changeType", Tag=3, Type=AccessControl.Enums.ChangeTypeEnum), ClusterObjectFieldDescriptor(Label="latestValue", Tag=4, Type=typing.Union[Nullable, AccessControl.Structs.AccessControlEntry]), - ClusterObjectFieldDescriptor(Label="adminFabricIndex", Tag=254, Type=uint), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) adminNodeID: 'typing.Union[Nullable, uint]' = NullValue adminPasscodeID: 'typing.Union[Nullable, uint]' = NullValue changeType: 'AccessControl.Enums.ChangeTypeEnum' = 0 latestValue: 'typing.Union[Nullable, AccessControl.Structs.AccessControlEntry]' = NullValue - adminFabricIndex: 'uint' = 0 + fabricIndex: 'uint' = 0 @dataclass class AccessControlExtensionChanged(ClusterEvent): @@ -3133,14 +3149,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="adminPasscodeID", Tag=2, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="changeType", Tag=3, Type=AccessControl.Enums.ChangeTypeEnum), ClusterObjectFieldDescriptor(Label="latestValue", Tag=4, Type=typing.Union[Nullable, AccessControl.Structs.ExtensionEntry]), - ClusterObjectFieldDescriptor(Label="adminFabricIndex", Tag=254, Type=uint), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) adminNodeID: 'typing.Union[Nullable, uint]' = NullValue adminPasscodeID: 'typing.Union[Nullable, uint]' = NullValue changeType: 'AccessControl.Enums.ChangeTypeEnum' = 0 latestValue: 'typing.Union[Nullable, AccessControl.Structs.ExtensionEntry]' = NullValue - adminFabricIndex: 'uint' = 0 + fabricIndex: 'uint' = 0 @dataclass @@ -4179,8 +4195,10 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=0, Type=uint), ]) + fabricIndex: 'uint' = 0 @dataclass class ReachableChanged(ClusterEvent): @@ -28681,9 +28699,9 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="arg1", Tag=254, Type=uint), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) - arg1: 'uint' = 0 + fabricIndex: 'uint' = 0 diff --git a/src/controller/python/chip/clusters/attribute.cpp b/src/controller/python/chip/clusters/attribute.cpp index 59de72d01ffef5..488c1bc1c47521 100644 --- a/src/controller/python/chip/clusters/attribute.cpp +++ b/src/controller/python/chip/clusters/attribute.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#include "system/SystemClock.h" #include #include #include @@ -22,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -146,9 +148,12 @@ class ReadClientCallback : public ReadClient::Callback gOnSubscriptionEstablishedCallback(mAppContext, aSubscriptionId); } - void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) override + CHIP_ERROR OnResubscriptionNeeded(ReadClient * apReadClient, CHIP_ERROR aTerminationCause) override { - gOnResubscriptionAttemptedCallback(mAppContext, aTerminationCause.AsInteger(), aNextResubscribeIntervalMsec); + ReturnErrorOnFailure(ReadClient::Callback::OnResubscriptionNeeded(apReadClient, aTerminationCause)); + gOnResubscriptionAttemptedCallback(mAppContext, aTerminationCause.AsInteger(), + apReadClient->ComputeTimeTillNextSubscription()); + return CHIP_NO_ERROR; } void OnEventData(const EventHeader & aEventHeader, TLV::TLVReader * apData, const StatusIB * apStatus) override @@ -383,6 +388,12 @@ void pychip_ReadClient_Abort(ReadClient * apReadClient, ReadClientCallback * apC delete apCallback; } +void pychip_ReadClient_OverrideLivenessTimeout(ReadClient * pReadClient, uint32_t livenessTimeoutMs) +{ + VerifyOrDie(pReadClient != nullptr); + pReadClient->OverrideLivenessTimeout(System::Clock::Milliseconds32(livenessTimeoutMs)); +} + chip::ChipError::StorageType pychip_ReadClient_Read(void * appContext, ReadClient ** pReadClient, ReadClientCallback ** pCallback, DeviceProxy * device, uint8_t * readParamsBuf, size_t numAttributePaths, size_t numDataversionFilters, size_t numEventPaths, ...) @@ -464,7 +475,6 @@ chip::ChipError::StorageType pychip_ReadClient_Read(void * appContext, ReadClien params.mMinIntervalFloorSeconds = pyParams.minInterval; params.mMaxIntervalCeilingSeconds = pyParams.maxInterval; params.mKeepSubscriptions = pyParams.keepSubscriptions; - params.mResubscribePolicy = PythonResubscribePolicy; dataVersionFilters.release(); attributePaths.release(); diff --git a/src/controller/python/chip/setup_payload/Generator.cpp b/src/controller/python/chip/setup_payload/Generator.cpp index 21115b501f7949..803768964df417 100644 --- a/src/controller/python/chip/setup_payload/Generator.cpp +++ b/src/controller/python/chip/setup_payload/Generator.cpp @@ -35,11 +35,11 @@ extern "C" ChipError::StorageType pychip_SetupPayload_PrintOnboardingCodes(uint3 SetupPayload payload; RendezvousInformationFlags rendezvousFlags = RendezvousInformationFlag::kNone; - payload.version = version; - payload.setUpPINCode = passcode; - payload.vendorID = vendorId; - payload.productID = productId; - payload.discriminator = discriminator; + payload.version = version; + payload.setUpPINCode = passcode; + payload.vendorID = vendorId; + payload.productID = productId; + payload.discriminator.SetLongValue(discriminator); payload.rendezvousInformation = rendezvousFlags.SetRaw(capabilities); switch (customFlow) diff --git a/src/controller/python/chip/setup_payload/Parser.cpp b/src/controller/python/chip/setup_payload/Parser.cpp index 6dc75c793348d9..29b5ec1a8af5d8 100644 --- a/src/controller/python/chip/setup_payload/Parser.cpp +++ b/src/controller/python/chip/setup_payload/Parser.cpp @@ -39,7 +39,14 @@ void YieldSetupPayloadAttributes(const SetupPayload & payload, AttributeVisitor attrVisitor("ProductID", std::to_string(payload.productID).c_str()); attrVisitor("CommissioningFlow", std::to_string(static_cast(payload.commissioningFlow)).c_str()); attrVisitor("RendezvousInformation", std::to_string(payload.rendezvousInformation.Raw()).c_str()); - attrVisitor("Discriminator", std::to_string(payload.discriminator).c_str()); + if (payload.discriminator.IsShortDiscriminator()) + { + attrVisitor("Short discriminator", std::to_string(payload.discriminator.GetShortValue()).c_str()); + } + else + { + attrVisitor("Long discriminator", std::to_string(payload.discriminator.GetLongValue()).c_str()); + } attrVisitor("SetUpPINCode", std::to_string(payload.setUpPINCode).c_str()); std::string serialNumber; diff --git a/src/controller/python/test/test_scripts/base.py b/src/controller/python/test/test_scripts/base.py index 6cd812371f32c2..d26bc3b8a743a0 100644 --- a/src/controller/python/test/test_scripts/base.py +++ b/src/controller/python/test/test_scripts/base.py @@ -756,6 +756,52 @@ def CompareUnfilteredData(accessingFabric, otherFabric, expectedData): if (expectedDataFabric1 != readListDataFabric1): raise AssertionError("Got back mismatched data") + async def TestResubscription(self, nodeid: int): + ''' This validates the re-subscription logic by triggering a liveness failure caused by the expiration + of the underlying CASE session and the resultant failure to receive reports from the server. This should + trigger CASE session establishment and subscription restablishment. Both the attempt and successful + restablishment of the subscription are validated. + ''' + cv = asyncio.Condition() + resubAttempted = False + resubSucceeded = True + + async def OnResubscriptionAttempted(transaction, errorEncountered: int, nextResubscribeIntervalMsec: int): + self.logger.info("Re-subscription Attempted") + nonlocal resubAttempted + resubAttempted = True + + async def OnResubscriptionSucceeded(transaction): + self.logger.info("Re-subscription Succeeded") + nonlocal cv + async with cv: + cv.notify() + + subscription = await self.devCtrl.ReadAttribute(nodeid, [(Clusters.Basic.Attributes.ClusterRevision)], reportInterval=(0, 5)) + + # + # Register async callbacks that will fire when a re-sub is attempted or succeeds. + # + subscription.SetResubscriptionAttemptedCallback(OnResubscriptionAttempted, True) + subscription.SetResubscriptionSucceededCallback(OnResubscriptionSucceeded, True) + + # + # Over-ride the default liveness timeout (which is set quite high to accomodate for + # transport delays) to something very small. This ensures that our liveness timer will + # fire quickly and cause a re-subscription to occur naturally. + # + subscription.OverrideLivenessTimeoutMs(100) + + async with cv: + if (not(resubAttempted) or not(resubSucceeded)): + res = await asyncio.wait_for(cv.wait(), 3) + if not res: + self.logger.error("Timed out waiting for resubscription to succeed") + return False + + subscription.Shutdown() + return True + def TestCloseSession(self, nodeid: int): self.logger.info(f"Closing sessions with device {nodeid}") try: @@ -796,7 +842,7 @@ def TestLevelControlCluster(self, nodeid: int, endpoint: int, group: int): self.logger.info( f"Sending MoveToLevel command to device {nodeid} endpoint {endpoint}") try: - commonArgs = dict(transitionTime=0, optionMask=1, optionOverride=1) + commonArgs = dict(transitionTime=0, optionsMask=1, optionsOverride=1) # Move to 1 self.devCtrl.ZCLSend("LevelControl", "MoveToLevel", nodeid, diff --git a/src/controller/python/test/test_scripts/mobile-device-test.py b/src/controller/python/test/test_scripts/mobile-device-test.py index f02a93dc388953..b6b7a1d4e91595 100755 --- a/src/controller/python/test/test_scripts/mobile-device-test.py +++ b/src/controller/python/test/test_scripts/mobile-device-test.py @@ -140,6 +140,10 @@ def TestDatamodel(test: BaseTestHelper, device_nodeid: int): FailIfNot(test.TestSubscription(nodeid=device_nodeid, endpoint=LIGHTING_ENDPOINT_ID), "Failed to subscribe attributes.") + logger.info("Testing re-subscription") + FailIfNot(asyncio.run(test.TestResubscription(nodeid=device_nodeid)), + "Failed to validated re-subscription") + logger.info("Testing on off cluster over resolved connection") FailIfNot(test.TestOnOffCluster(nodeid=device_nodeid, endpoint=LIGHTING_ENDPOINT_ID, diff --git a/src/controller/tests/TestEventCaching.cpp b/src/controller/tests/TestEventCaching.cpp index b2368f5207916c..eaf57af6bdf8ff 100644 --- a/src/controller/tests/TestEventCaching.cpp +++ b/src/controller/tests/TestEventCaching.cpp @@ -22,7 +22,7 @@ #include "app/ConcreteAttributePath.h" #include "protocols/interaction_model/Constants.h" #include -#include +#include #include #include #include diff --git a/src/controller/tests/TestEventChunking.cpp b/src/controller/tests/TestEventChunking.cpp index 5dc88eb8dcd434..6764bb95e307c3 100644 --- a/src/controller/tests/TestEventChunking.cpp +++ b/src/controller/tests/TestEventChunking.cpp @@ -21,7 +21,7 @@ #include "app/ConcreteAttributePath.h" #include "protocols/interaction_model/Constants.h" #include -#include +#include #include #include #include @@ -157,8 +157,6 @@ class TestReadCallback : public app::ReadClient::Callback void OnSubscriptionEstablished(SubscriptionId aSubscriptionId) override { mOnSubscriptionEstablished = true; } - void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) override {} - uint32_t mAttributeCount = 0; uint32_t mEventCount = 0; bool mOnReportEnd = false; diff --git a/src/controller/tests/TestReadChunking.cpp b/src/controller/tests/TestReadChunking.cpp index 7b7f4247b86781..5dc6006edc09ba 100644 --- a/src/controller/tests/TestReadChunking.cpp +++ b/src/controller/tests/TestReadChunking.cpp @@ -21,7 +21,7 @@ #include "app/ConcreteAttributePath.h" #include "protocols/interaction_model/Constants.h" #include -#include +#include #include #include #include @@ -136,8 +136,6 @@ class TestReadCallback : public app::ReadClient::Callback void OnSubscriptionEstablished(SubscriptionId aSubscriptionId) override { mOnSubscriptionEstablished = true; } - void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) override {} - uint32_t mAttributeCount = 0; bool mOnReportEnd = false; bool mOnSubscriptionEstablished = false; @@ -306,7 +304,6 @@ class TestMutableReadCallback : public app::ReadClient::Callback void OnReportEnd() override { mOnReportEnd = true; } void OnSubscriptionEstablished(SubscriptionId aSubscriptionId) override { mOnSubscriptionEstablished = true; } - void OnResubscriptionAttempt(CHIP_ERROR aTerminationCause, uint32_t aNextResubscribeIntervalMsec) override {} uint32_t mAttributeCount = 0; // We record every dataversion field from every attribute IB. diff --git a/src/controller/tests/TestServerCommandDispatch.cpp b/src/controller/tests/TestServerCommandDispatch.cpp index 37fd1cda9bf069..c4860023702755 100644 --- a/src/controller/tests/TestServerCommandDispatch.cpp +++ b/src/controller/tests/TestServerCommandDispatch.cpp @@ -26,7 +26,7 @@ #include "app-common/zap-generated/ids/Clusters.h" #include "protocols/interaction_model/Constants.h" #include -#include +#include #include #include #include diff --git a/src/controller/tests/TestWriteChunking.cpp b/src/controller/tests/TestWriteChunking.cpp index e47134c34e1f85..bd27e649bd79d1 100644 --- a/src/controller/tests/TestWriteChunking.cpp +++ b/src/controller/tests/TestWriteChunking.cpp @@ -21,7 +21,7 @@ #include "app/ConcreteAttributePath.h" #include "protocols/interaction_model/Constants.h" #include -#include +#include #include #include #include diff --git a/src/controller/tests/data_model/TestCommands.cpp b/src/controller/tests/data_model/TestCommands.cpp index e2d314cb18defd..360425e031604b 100644 --- a/src/controller/tests/data_model/TestCommands.cpp +++ b/src/controller/tests/data_model/TestCommands.cpp @@ -24,7 +24,7 @@ #include "app/data-model/NullObject.h" #include -#include +#include #include #include #include diff --git a/src/controller/tests/data_model/TestRead.cpp b/src/controller/tests/data_model/TestRead.cpp index 6c1f85cf686cf6..0dda7e31483ce4 100644 --- a/src/controller/tests/data_model/TestRead.cpp +++ b/src/controller/tests/data_model/TestRead.cpp @@ -16,6 +16,7 @@ * limitations under the License. */ +#include "system/SystemClock.h" #include "transport/SecureSession.h" #include #include @@ -1472,66 +1473,111 @@ void TestReadInteraction::TestReadAttributeTimeout(nlTestSuite * apSuite, void * NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); } -// After client initiated subscription request, test expire session so that subscription fails to establish, and trigger the timeout -// error. Client would automatically try to resubscribe and bump the value for numResubscriptionAttemptedCalls. -void TestReadInteraction::TestSubscribeAttributeTimeout(nlTestSuite * apSuite, void * apContext) +class TestResubscriptionCallback : public app::ReadClient::Callback { - TestContext & ctx = *static_cast(apContext); - auto sessionHandle = ctx.GetSessionBobToAlice(); - bool onSuccessCbInvoked = false, onFailureCbInvoked = false; - responseDirective = kSendDataError; - uint32_t numSubscriptionEstablishedCalls = 0, numResubscriptionAttemptedCalls = 0; - // Passing of stack variables by reference is only safe because of synchronous completion of the interaction. Otherwise, it's - // not safe to do so. - auto onSuccessCb = [&onSuccessCbInvoked](const app::ConcreteDataAttributePath & attributePath, const auto & dataResponse) { - onSuccessCbInvoked = true; - }; +public: + TestResubscriptionCallback() {} - // Passing of stack variables by reference is only safe because of synchronous completion of the interaction. Otherwise, it's - // not safe to do so. - auto onFailureCb = [&onFailureCbInvoked, apSuite](const app::ConcreteDataAttributePath * attributePath, CHIP_ERROR aError) { - NL_TEST_ASSERT(apSuite, aError == CHIP_ERROR_TIMEOUT); - onFailureCbInvoked = true; - }; + void SetReadClient(app::ReadClient * apReadClient) { mpReadClient = apReadClient; } - auto onSubscriptionEstablishedCb = [&numSubscriptionEstablishedCalls](const app::ReadClient & readClient) { - numSubscriptionEstablishedCalls++; - }; + void OnDone(app::ReadClient *) override { mOnDone++; } - auto onSubscriptionAttemptedCb = [&numResubscriptionAttemptedCalls](const app::ReadClient & readClient, CHIP_ERROR aError, - uint32_t aNextResubscribeIntervalMsec) { - numResubscriptionAttemptedCalls++; - }; + void OnError(CHIP_ERROR aError) override + { + mOnError++; + mLastError = aError; + } - Controller::SubscribeAttribute( - &ctx.GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb, 0, 20, onSubscriptionEstablishedCb, - onSubscriptionAttemptedCb, false, true); + void OnSubscriptionEstablished(SubscriptionId aSubscriptionId) override + { + mOnSubscriptionEstablishedCount++; - ctx.ExpireSessionAliceToBob(); + // + // Set the liveness timeout to a super small number that isn't 0 to + // force the liveness timeout to fire. + // + mpReadClient->OverrideLivenessTimeout(System::Clock::Milliseconds32(10)); + } - ctx.DrainAndServiceIO(); + CHIP_ERROR OnResubscriptionNeeded(app::ReadClient * apReadClient, CHIP_ERROR aTerminationCause) override + { + mOnResubscriptionsAttempted++; + return apReadClient->ScheduleResubscription(apReadClient->ComputeTimeTillNextSubscription(), NullOptional, false); + } - NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 1); + void ClearCounters() + { + mOnSubscriptionEstablishedCount = 0; + mOnDone = 0; + mOnError = 0; + mOnResubscriptionsAttempted = 0; + mLastError = CHIP_NO_ERROR; + } - ctx.ExpireSessionBobToAlice(); + int32_t mAttributeCount = 0; + int32_t mOnReportEnd = 0; + int32_t mOnSubscriptionEstablishedCount = 0; + int32_t mOnResubscriptionsAttempted = 0; + int32_t mOnDone = 0; + int32_t mOnError = 0; + CHIP_ERROR mLastError = CHIP_NO_ERROR; + app::ReadClient * mpReadClient = nullptr; +}; - ctx.DrainAndServiceIO(); +// +// This validates the re-subscription logic within ReadClient. This achieves it by overriding the timeout for the liveness +// timer within ReadClient to be a smaller value than the nominal max interval of the subscription. This causes the +// subscription to fail on the client side, triggering re-subscription. +// +// TODO: This does not validate the CASE establishment pathways since we're limited by the PASE-centric TestContext. +// +// +void TestReadInteraction::TestSubscribeAttributeTimeout(nlTestSuite * apSuite, void * apContext) +{ + TestContext & ctx = *static_cast(apContext); + auto sessionHandle = ctx.GetSessionBobToAlice(); - NL_TEST_ASSERT(apSuite, - !onSuccessCbInvoked && !onFailureCbInvoked && numSubscriptionEstablishedCalls == 0 && - numResubscriptionAttemptedCalls == 1); + { + TestResubscriptionCallback callback; + app::ReadClient readClient(app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), callback, + app::ReadClient::InteractionType::Subscribe); - NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); + callback.SetReadClient(&readClient); - NL_TEST_ASSERT(apSuite, app::InteractionModelEngine::GetInstance()->GetNumActiveReadHandlers() == 0); + app::ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); - // - // Let's put back the sessions so that the next tests (which assume a valid initialized set of sessions) - // can function correctly. - // - ctx.CreateSessionAliceToBob(); - ctx.CreateSessionBobToAlice(); + // Read full wildcard paths, repeat twice to ensure chunking. + app::AttributePathParams attributePathParams[1]; + readPrepareParams.mpAttributePathParamsList = attributePathParams; + readPrepareParams.mAttributePathParamsListSize = ArraySize(attributePathParams); + + attributePathParams[0].mClusterId = app::Clusters::TestCluster::Id; + attributePathParams[0].mAttributeId = app::Clusters::TestCluster::Attributes::Boolean::Id; + + readPrepareParams.mMaxIntervalCeilingSeconds = 1; + + readClient.SendAutoResubscribeRequest(std::move(readPrepareParams)); + + // + // Drive servicing IO till we have established a subscription at least 2 times. + // + ctx.GetIOContext().DriveIOUntil(System::Clock::Seconds16(2), + [&]() { return callback.mOnSubscriptionEstablishedCount > 1; }); + + NL_TEST_ASSERT(apSuite, callback.mOnDone == 0); + // + // With re-sub enabled, we shouldn't encounter any errors. + // + NL_TEST_ASSERT(apSuite, callback.mOnError == 0); + + // + // We should have attempted just one re-subscription. + // + NL_TEST_ASSERT(apSuite, callback.mOnResubscriptionsAttempted == 1); + } + + app::InteractionModelEngine::GetInstance()->ShutdownActiveReads(); NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); } @@ -4270,7 +4316,6 @@ const nlTest sTests[] = NL_TEST_DEF("TestReadHandler_TwoSubscribesMultipleReads", TestReadInteraction::TestReadHandler_TwoSubscribesMultipleReads), NL_TEST_DEF("TestReadHandlerResourceExhaustion_MultipleReads", TestReadInteraction::TestReadHandlerResourceExhaustion_MultipleReads), NL_TEST_DEF("TestReadAttributeTimeout", TestReadInteraction::TestReadAttributeTimeout), - NL_TEST_DEF("TestSubscribeAttributeTimeout", TestReadInteraction::TestSubscribeAttributeTimeout), NL_TEST_DEF("TestReadHandler_SubscriptionReportingIntervalsTest1", TestReadInteraction::TestReadHandler_SubscriptionReportingIntervalsTest1), NL_TEST_DEF("TestReadHandler_SubscriptionReportingIntervalsTest2", TestReadInteraction::TestReadHandler_SubscriptionReportingIntervalsTest2), NL_TEST_DEF("TestReadHandler_SubscriptionReportingIntervalsTest3", TestReadInteraction::TestReadHandler_SubscriptionReportingIntervalsTest3), @@ -4289,6 +4334,7 @@ const nlTest sTests[] = NL_TEST_DEF("TestReadAttribute_ManyDataValues", TestReadInteraction::TestReadAttribute_ManyDataValues), NL_TEST_DEF("TestReadAttribute_ManyDataValuesWrongPath", TestReadInteraction::TestReadAttribute_ManyDataValuesWrongPath), NL_TEST_DEF("TestReadAttribute_ManyErrors", TestReadInteraction::TestReadAttribute_ManyErrors), + NL_TEST_DEF("TestSubscribeAttributeTimeout", TestReadInteraction::TestSubscribeAttributeTimeout), NL_TEST_SENTINEL() }; // clang-format on diff --git a/src/credentials/FabricTable.cpp b/src/credentials/FabricTable.cpp index bf380af1a74136..38f34738cc97c2 100644 --- a/src/credentials/FabricTable.cpp +++ b/src/credentials/FabricTable.cpp @@ -889,6 +889,18 @@ CHIP_ERROR FabricTable::Delete(FabricIndex fabricIndex) VerifyOrReturnError(mStorage != nullptr, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(IsValidFabricIndex(fabricIndex), CHIP_ERROR_INVALID_ARGUMENT); + { + FabricTable::Delegate * delegate = mDelegateListRoot; + while (delegate) + { + // It is possible that delegate will remove itself from the list in FabricWillBeRemoved, + // so we grab the next delegate in the list now. + FabricTable::Delegate * nextDelegate = delegate->next; + delegate->FabricWillBeRemoved(*this, fabricIndex); + delegate = nextDelegate; + } + } + FabricInfo * fabricInfo = GetMutableFabricByIndex(fabricIndex); if (fabricInfo == &mPendingFabric) { diff --git a/src/credentials/FabricTable.h b/src/credentials/FabricTable.h index 68f9f9c8e132a1..0c8c19f65550d4 100644 --- a/src/credentials/FabricTable.h +++ b/src/credentials/FabricTable.h @@ -360,6 +360,13 @@ class DLL_EXPORT FabricTable Delegate() {} virtual ~Delegate() {} + /** + * Gets called when a fabric is about to be deleted, such as on + * FabricTable::Delete(). This allows actions to be taken that need the + * fabric to still be around before we delete it. + **/ + virtual void FabricWillBeRemoved(const FabricTable & fabricTable, FabricIndex fabricIndex) {} + /** * Gets called when a fabric is deleted, such as on FabricTable::Delete(). **/ diff --git a/src/darwin/Framework/CHIP/MTRCluster.h b/src/darwin/Framework/CHIP/MTRCluster.h index 3517772447353e..fb85a93de6e786 100644 --- a/src/darwin/Framework/CHIP/MTRCluster.h +++ b/src/darwin/Framework/CHIP/MTRCluster.h @@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * CHIPWriteParams + * MTRWriteParams * This is used to control the behavior of cluster writes. * If not provided (i.e. nil passed for the CHIPWriteParams argument), will be * treated as if a default-initialized object was passed in. @@ -54,7 +54,7 @@ NS_ASSUME_NONNULL_BEGIN * This value is specified in milliseconds * */ -@property (strong, nonatomic, nullable) NSNumber * timedWriteTimeout; +@property (nonatomic, copy, nullable) NSNumber * timedWriteTimeout; /** * Sets the data version for the Write Request for the interaction. @@ -62,7 +62,7 @@ NS_ASSUME_NONNULL_BEGIN * If not nil, the write will only succeed if the current data version of * the cluster matches the provided data version. */ -@property (strong, nonatomic, nullable) NSNumber * dataVersion; +@property (nonatomic, copy, nullable) NSNumber * dataVersion; - (instancetype)init; @@ -86,7 +86,7 @@ NS_ASSUME_NONNULL_BEGIN * If NO, the read/subscribe is not fabric-filtered and will see all * non-fabric-sensitive data for the given attribute path. */ -@property (strong, nonatomic, nullable) NSNumber * fabricFiltered; +@property (nonatomic, copy, nullable) NSNumber * fabricFiltered; - (instancetype)init; @@ -109,7 +109,7 @@ NS_ASSUME_NONNULL_BEGIN * * If YES, the subscribe will allow any previous subscriptions to remain. */ -@property (strong, nonatomic, nullable) NSNumber * keepPreviousSubscriptions; +@property (nonatomic, copy, nullable) NSNumber * keepPreviousSubscriptions; /** * Whether the subscription should automatically try to re-establish if it @@ -123,7 +123,7 @@ NS_ASSUME_NONNULL_BEGIN * called again. * */ -@property (strong, nonatomic, nullable) NSNumber * autoResubscribe; +@property (nonatomic, copy, nullable) NSNumber * autoResubscribe; - (instancetype)init; diff --git a/src/darwin/Framework/CHIP/MTRCluster.mm b/src/darwin/Framework/CHIP/MTRCluster.mm index 17d943996bdba8..dc453efb35e78e 100644 --- a/src/darwin/Framework/CHIP/MTRCluster.mm +++ b/src/darwin/Framework/CHIP/MTRCluster.mm @@ -18,6 +18,7 @@ #import "MTRBaseDevice.h" #import "MTRCluster_internal.h" #import "NSDataSpanConversion.h" +#import "NSStringSpanConversion.h" using namespace ::chip; @@ -37,8 +38,7 @@ - (instancetype)initWithQueue:(dispatch_queue_t)queue - (chip::CharSpan)asCharSpan:(NSString *)value { - return chip::CharSpan(static_cast([value dataUsingEncoding:NSUTF8StringEncoding].bytes), - [value lengthOfBytesUsingEncoding:NSUTF8StringEncoding]); + return AsCharSpan(value); } @end diff --git a/src/darwin/Framework/CHIP/MTRCommissioningParameters.h b/src/darwin/Framework/CHIP/MTRCommissioningParameters.h index 04936d041e0fe3..51c13d686cdd01 100644 --- a/src/darwin/Framework/CHIP/MTRCommissioningParameters.h +++ b/src/darwin/Framework/CHIP/MTRCommissioningParameters.h @@ -30,31 +30,31 @@ NS_ASSUME_NONNULL_BEGIN /** * The CSRNonce */ -@property (nonatomic, nullable, copy, readwrite) NSData * CSRNonce; +@property (nonatomic, copy, nullable) NSData * CSRNonce; /** * The AttestationNonce */ -@property (nonatomic, nullable, copy, readwrite) NSData * attestationNonce; +@property (nonatomic, copy, nullable) NSData * attestationNonce; /** * The Wi-Fi SSID */ -@property (nonatomic, nullable, copy, readwrite) NSData * wifiSSID; +@property (nonatomic, copy, nullable) NSData * wifiSSID; /** * The Wi-Fi Credentials */ -@property (nonatomic, nullable, copy, readwrite) NSData * wifiCredentials; +@property (nonatomic, copy, nullable) NSData * wifiCredentials; /** * The Thread operational dataset */ -@property (nonatomic, nullable, copy, readwrite) NSData * threadOperationalDataset; +@property (nonatomic, copy, nullable) NSData * threadOperationalDataset; /** * The Device Attestation status delegate */ -@property (nonatomic, nullable, strong, readwrite) id deviceAttestationDelegate; +@property (nonatomic, strong, nullable) id deviceAttestationDelegate; /** * The timeout in secs to set for fail-safe when attestation fails */ -@property (nonatomic, nullable, copy, readwrite) NSNumber * failSafeExpiryTimeoutSecs; +@property (nonatomic, copy, nullable) NSNumber * failSafeExpiryTimeoutSecs; @end diff --git a/src/darwin/Framework/CHIP/MTRControllerFactory.h b/src/darwin/Framework/CHIP/MTRControllerFactory.h index 5c457b957dd39c..8e8eb8a9fcf318 100644 --- a/src/darwin/Framework/CHIP/MTRControllerFactory.h +++ b/src/darwin/Framework/CHIP/MTRControllerFactory.h @@ -25,6 +25,7 @@ NS_ASSUME_NONNULL_BEGIN @protocol MTRPersistentStorageDelegate; +@protocol MTROTAProviderDelegate; @protocol MTRKeypair; @class MTRDeviceController; @@ -36,23 +37,30 @@ NS_ASSUME_NONNULL_BEGIN * controllers. It is used to store persistent information for the fabrics the * controllers ends up interacting with. */ -@property (strong, nonatomic, readonly) id storageDelegate; +@property (nonatomic, strong, readonly) id storageDelegate; + +/* + * OTA Provider delegate to be called when an OTA Requestor is requesting a software update. + * Defaults to nil. + */ +@property (nonatomic, strong, nullable) id otaProviderDelegate; + /* * The Product Attestation Authority certificates that are trusted to sign * device attestation information. Defaults to nil. * */ -@property (strong, nonatomic, nullable) NSArray * paaCerts; +@property (nonatomic, copy, nullable) NSArray * paaCerts; /* * The network port to bind to. If not specified, an ephemeral port will be * used. */ -@property (strong, nonatomic, nullable) NSNumber * port; +@property (nonatomic, copy, nullable) NSNumber * port; /* * Whether to run a server capable of accepting incoming CASE * connections. Defaults to NO. */ -@property (nonatomic) BOOL startServer; +@property (nonatomic, assign) BOOL startServer; - (instancetype)init NS_UNAVAILABLE; - (instancetype)initWithStorage:(id)storageDelegate; diff --git a/src/darwin/Framework/CHIP/MTRControllerFactory.mm b/src/darwin/Framework/CHIP/MTRControllerFactory.mm index 676455d5916a74..3260c00c636da3 100644 --- a/src/darwin/Framework/CHIP/MTRControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRControllerFactory.mm @@ -26,6 +26,7 @@ #import "MTRDeviceController_Internal.h" #import "MTRLogging.h" #import "MTRMemory.h" +#import "MTROTAProviderDelegateBridge.h" #import "MTRP256KeypairBridge.h" #import "MTRPersistentStorageDelegateBridge.h" #import "NSDataSpanConversion.h" @@ -53,6 +54,7 @@ static NSString * const kErrorControllerFactoryInit = @"Init failure while initializing controller factory"; static NSString * const kErrorKeystoreInit = @"Init failure while initializing persistent storage keystore"; static NSString * const kErrorCertStoreInit = @"Init failure while initializing persistent storage operational certificate store"; +static NSString * const kErrorOtaProviderInit = @"Init failure while creating an OTA provider delegate"; @interface MTRControllerFactory () @@ -60,6 +62,7 @@ @interface MTRControllerFactory () @property (readonly) DeviceControllerFactory * controllerFactory; @property (readonly) MTRPersistentStorageDelegateBridge * persistentStorageDelegateBridge; @property (readonly) MTRAttestationTrustStoreBridge * attestationTrustStoreBridge; +@property (readonly) MTROTAProviderDelegateBridge * otaProviderDelegateBridge; // We use TestPersistentStorageDelegate just to get an in-memory store to back // our group data provider impl. We initialize this store correctly on every // controller startup, so don't need to actually persist it. @@ -73,6 +76,8 @@ @interface MTRControllerFactory () - (BOOL)findMatchingFabric:(FabricTable &)fabricTable params:(MTRDeviceControllerStartupParams *)params fabric:(const FabricInfo * _Nullable * _Nonnull)fabric; + +- (MTRDeviceController * _Nullable)maybeInitializeOTAProvider:(MTRDeviceController * _Nonnull)controller; @end @implementation MTRControllerFactory @@ -171,6 +176,11 @@ - (void)cleanupStartupObjects _attestationTrustStoreBridge = nullptr; } + if (_otaProviderDelegateBridge) { + delete _otaProviderDelegateBridge; + _otaProviderDelegateBridge = nullptr; + } + if (_keystore) { _keystore->Finish(); delete _keystore; @@ -211,6 +221,14 @@ - (BOOL)startup:(MTRControllerFactoryParams *)startupParams return; } + if (startupParams.otaProviderDelegate) { + _otaProviderDelegateBridge = new MTROTAProviderDelegateBridge(startupParams.otaProviderDelegate); + if (_otaProviderDelegateBridge == nil) { + MTR_LOG_ERROR("Error: %@", kErrorOtaProviderInit); + return; + } + } + // TODO: Allow passing a different keystore implementation via startupParams. _keystore = new PersistentStorageOperationalKeystore(); if (_keystore == nullptr) { @@ -371,7 +389,7 @@ - (MTRDeviceController * _Nullable)startControllerOnExistingFabric:(MTRDeviceCon return nil; } - return controller; + return [self maybeInitializeOTAProvider:controller]; } - (MTRDeviceController * _Nullable)startControllerOnNewFabric:(MTRDeviceControllerStartupParams *)startupParams @@ -431,7 +449,7 @@ - (MTRDeviceController * _Nullable)startControllerOnNewFabric:(MTRDeviceControll return nil; } - return controller; + return [self maybeInitializeOTAProvider:controller]; } - (MTRDeviceController * _Nullable)createController @@ -495,6 +513,27 @@ - (BOOL)findMatchingFabric:(FabricTable &)fabricTable return YES; } +// Initialize the MTROTAProviderDelegateBridge if it has not been initialized already +// +// Returns nil on failure, the input controller on success. +// If the provider has been initialized already, it is not considered as a failure. +// +- (MTRDeviceController * _Nullable)maybeInitializeOTAProvider:(MTRDeviceController * _Nonnull)controller +{ + VerifyOrReturnValue(_otaProviderDelegateBridge != nil, controller); + VerifyOrReturnValue([_controllers count] == 1, controller); + + auto systemState = _controllerFactory->GetSystemState(); + CHIP_ERROR err = _otaProviderDelegateBridge->Init(systemState->SystemLayer(), systemState->ExchangeMgr()); + if (CHIP_NO_ERROR != err) { + MTR_LOG_ERROR("Failed to init provider delegate bridge: %" CHIP_ERROR_FORMAT, err.Format()); + [controller shutdown]; + return nil; + } + + return controller; +} + @end @implementation MTRControllerFactory (InternalMethods) @@ -521,6 +560,10 @@ - (void)controllerShuttingDown:(MTRDeviceController *)controller [_controllers removeObject:controller]; if ([_controllers count] == 0) { + if (_otaProviderDelegateBridge) { + _otaProviderDelegateBridge->Shutdown(); + } + // That was our last controller. Stop the event loop before it // shuts down, because shutdown of the last controller will tear // down most of the world. @@ -556,6 +599,7 @@ - (instancetype)initWithStorage:(id)storageDelegat } _storageDelegate = storageDelegate; + _otaProviderDelegate = nil; _paaCerts = nil; _port = nil; _startServer = NO; diff --git a/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.h b/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.h index 95148931005c42..a748d8b2dba34c 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.h +++ b/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.h @@ -50,7 +50,7 @@ class MTRDeviceConnectionBridge : public chip::ReferenceCounted mOnConnectFailed; static void OnConnected(void * context, chip::OperationalDeviceProxy * device); - static void OnConnectionFailure(void * context, chip::PeerId peerId, CHIP_ERROR error); + static void OnConnectionFailure(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR error); }; NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.mm b/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.mm index 2ad2c2f6c08f83..da739514e3b4c1 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.mm @@ -29,7 +29,7 @@ }); } -void MTRDeviceConnectionBridge::OnConnectionFailure(void * context, chip::PeerId peerId, CHIP_ERROR error) +void MTRDeviceConnectionBridge::OnConnectionFailure(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR error) { auto * object = static_cast(context); dispatch_async(object->mQueue, ^{ diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.h b/src/darwin/Framework/CHIP/MTRDeviceController.h index fe1f0eb8b61b22..61db4061896d10 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController.h @@ -27,7 +27,6 @@ typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NS @class MTRCommissioningParameters; @protocol MTRDevicePairingDelegate; -@protocol MTROTAProviderDelegate; @interface MTRDeviceController : NSObject @@ -120,15 +119,6 @@ typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NS */ - (void)setPairingDelegate:(id)delegate queue:(dispatch_queue_t)queue; -/** - * Set the Delegate for the OTA Provider as well as the Queue on which the Delegate callbacks will be triggered - * - * @param[in] delegate The delegate the OTA Provider should use - * - * @param[in] queue The queue on which the callbacks will be delivered - */ -- (void)setOTAProviderDelegate:(id)delegate queue:(dispatch_queue_t)queue; - /** * Shutdown the controller. Calls to shutdown after the first one are NO-OPs. */ diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 2bf0192e7aa8ec..586219008e55e6 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -25,7 +25,6 @@ #import "MTRError_Internal.h" #import "MTRKeypair.h" #import "MTRLogging.h" -#import "MTROTAProviderDelegateBridge.h" #import "MTROperationalCredentialsDelegate.h" #import "MTRP256KeypairBridge.h" #import "MTRPersistentStorageDelegateBridge.h" @@ -57,7 +56,6 @@ static NSString * const kErrorOperationalCredentialsInit = @"Init failure while creating operational credentials delegate"; static NSString * const kErrorOperationalKeypairInit = @"Init failure while creating operational keypair bridge"; static NSString * const kErrorPairingInit = @"Init failure while creating a pairing delegate"; -static NSString * const kErrorOtaProviderInit = @"Init failure while creating an OTA provider delegate"; static NSString * const kErrorPairDevice = @"Failure while pairing the device"; static NSString * const kErrorUnpairDevice = @"Failure while unpairing the device"; static NSString * const kErrorStopPairing = @"Failure while trying to stop the pairing process"; @@ -77,7 +75,6 @@ @interface MTRDeviceController () @property (readonly) chip::Controller::DeviceCommissioner * cppCommissioner; @property (readonly) MTRDevicePairingDelegateBridge * pairingDelegateBridge; -@property (readonly) MTROTAProviderDelegateBridge * otaProviderDelegateBridge; @property (readonly) MTROperationalCredentialsDelegate * operationalCredentialsDelegate; @property (readonly) MTRP256KeypairBridge signingKeypairBridge; @property (readonly) MTRP256KeypairBridge operationalKeypairBridge; @@ -98,11 +95,6 @@ - (instancetype)initWithFactory:(MTRControllerFactory *)factory queue:(dispatch_ return nil; } - _otaProviderDelegateBridge = new MTROTAProviderDelegateBridge(); - if ([self checkForInitError:(_otaProviderDelegateBridge != nullptr) logMsg:kErrorOtaProviderInit]) { - return nil; - } - _operationalCredentialsDelegate = new MTROperationalCredentialsDelegate(); if ([self checkForInitError:(_operationalCredentialsDelegate != nullptr) logMsg:kErrorOperationalCredentialsInit]) { return nil; @@ -156,11 +148,6 @@ - (void)cleanup _operationalCredentialsDelegate = nullptr; } - if (_otaProviderDelegateBridge) { - delete _otaProviderDelegateBridge; - _otaProviderDelegateBridge = nullptr; - } - if (_pairingDelegateBridge) { delete _pairingDelegateBridge; _pairingDelegateBridge = nullptr; @@ -350,7 +337,7 @@ - (BOOL)pairDevice:(uint64_t)deviceID std::string manualPairingCode; chip::SetupPayload payload; - payload.discriminator = discriminator; + payload.discriminator.SetLongValue(discriminator); payload.setUpPINCode = setupPINCode; auto errorCode = chip::ManualSetupPayloadGenerator(payload).payloadDecimalStringRepresentation(manualPairingCode); @@ -629,13 +616,6 @@ - (void)setPairingDelegate:(id)delegate queue:(dispatc }); } -- (void)setOTAProviderDelegate:(id)delegate queue:(dispatch_queue_t)queue; -{ - dispatch_async(_chipWorkQueue, ^{ - self->_otaProviderDelegateBridge->setDelegate(delegate, queue); - }); -} - - (BOOL)checkForInitError:(BOOL)condition logMsg:(NSString *)logMsg { if (condition) { diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h index 819ddd39974f16..2d3a6865f67bb2 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.h @@ -30,7 +30,7 @@ NS_ASSUME_NONNULL_BEGIN * must be initialized using initWithOperationalKeypair (to provide the * operational credentials for the controller itself). */ -@property (strong, nonatomic, readonly, nullable) id nocSigner; +@property (nonatomic, copy, readonly, nullable) id nocSigner; /** * Fabric id for the controller. Must be set to a nonzero value. This is * scoped by the root public key, which is determined as follows: @@ -42,13 +42,13 @@ NS_ASSUME_NONNULL_BEGIN * key of the nocSigner keypair, since in this case we are not using an * intermediate certificate. */ -@property (nonatomic, readonly) uint64_t fabricId; +@property (nonatomic, assign, readonly) uint64_t fabricId; /** * IPK to use for the controller's fabric. Allowed to change from the last time * a controller was started on this fabric if a new IPK has been distributed to * all the devices the controller wants to interact with. */ -@property (strong, nonatomic, readonly) NSData * ipk; +@property (nonatomic, copy, readonly) NSData * ipk; /** * Vendor ID (allocated by the Connectivity Standards Alliance) for @@ -65,7 +65,7 @@ NS_ASSUME_NONNULL_BEGIN * * Will override existing value if not nil. Otherwise existing value will be * used. */ -@property (strong, nonatomic, nullable) NSNumber * vendorId; +@property (nonatomic, copy, nullable) NSNumber * vendorId; /** * Node id for this controller. @@ -95,7 +95,7 @@ NS_ASSUME_NONNULL_BEGIN * generated operational key. * */ -@property (strong, nonatomic, nullable) NSNumber * nodeId; +@property (nonatomic, copy, nullable) NSNumber * nodeId; // TODO: Add something here for CATs? @@ -130,7 +130,7 @@ NS_ASSUME_NONNULL_BEGIN * 2) The subject DN must match the subject DN of the existing root * certificate. */ -@property (strong, nonatomic, nullable) NSData * rootCertificate; +@property (nonatomic, copy, nullable) NSData * rootCertificate; /** * Intermediate certificate, in X.509 DER form, to use. @@ -162,7 +162,7 @@ NS_ASSUME_NONNULL_BEGIN * allows switching from using an intermediate CA to not using one. * */ -@property (strong, nonatomic, nullable) NSData * intermediateCertificate; +@property (nonatomic, copy, nullable) NSData * intermediateCertificate; /** * Operational certificate, in X.509 DER form, to use. @@ -173,7 +173,7 @@ NS_ASSUME_NONNULL_BEGIN * If nil, an operational certificate will be determined as described in the * documentation for nodeId. */ -@property (strong, nonatomic, nullable, readonly) NSData * operationalCertificate; +@property (nonatomic, copy, readonly, nullable) NSData * operationalCertificate; /** * Operational keypair to use. If operationalCertificate is not nil, the public @@ -184,7 +184,7 @@ NS_ASSUME_NONNULL_BEGIN * will for that certificated will be determined as described in the * documentation for nodeId. */ -@property (strong, nonatomic, nullable) id operationalKeypair; +@property (nonatomic, strong, nullable) id operationalKeypair; - (instancetype)init NS_UNAVAILABLE; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h index 22a5d895cde2a5..3be8c5d4f720b5 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h @@ -36,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRDeviceControllerStartupParams () // We want to be able to write to operationalCertificate in // MTRDeviceControllerStartupParamsInternal. -@property (strong, nonatomic, nullable) NSData * operationalCertificate; +@property (nonatomic, copy, nullable) NSData * operationalCertificate; // Init method that just copies the values of all our ivars. - (instancetype)initWithParams:(MTRDeviceControllerStartupParams *)params; @@ -45,14 +45,14 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRDeviceControllerStartupParamsInternal : MTRDeviceControllerStartupParams // Fabric table we can use to do things like allocate operational keys. -@property (nonatomic, readonly) chip::FabricTable * fabricTable; +@property (nonatomic, assign, readonly) chip::FabricTable * fabricTable; // Fabric index we're starting on. Only has a value when starting on an // existing fabric. -@property (nonatomic, readonly) chip::Optional fabricIndex; +@property (nonatomic, assign, readonly) chip::Optional fabricIndex; // Key store we're using with our fabric table, for sanity checks. -@property (nonatomic, readonly) chip::Crypto::OperationalKeystore * keystore; +@property (nonatomic, assign, readonly) chip::Crypto::OperationalKeystore * keystore; /** * Helper method that checks that our keypairs match our certificates. diff --git a/src/darwin/Framework/CHIP/MTRError.h b/src/darwin/Framework/CHIP/MTRError.h index bb1623bf2c374f..7dc123f2792806 100644 --- a/src/darwin/Framework/CHIP/MTRError.h +++ b/src/darwin/Framework/CHIP/MTRError.h @@ -50,6 +50,7 @@ typedef NS_ERROR_ENUM(MTRErrorDomain, MTRErrorCode){ MTRErrorCodeWrongAddressType = 7, MTRErrorCodeIntegrityCheckFailed = 8, MTRErrorCodeTimeout = 9, + MTRErrorCodeBufferTooSmall = 10, }; // clang-format on diff --git a/src/darwin/Framework/CHIP/MTRError.mm b/src/darwin/Framework/CHIP/MTRError.mm index e07928fa8659a5..153b034d54035b 100644 --- a/src/darwin/Framework/CHIP/MTRError.mm +++ b/src/darwin/Framework/CHIP/MTRError.mm @@ -77,6 +77,9 @@ + (NSError *)errorForCHIPErrorCode:(CHIP_ERROR)errorCode } else if (errorCode == CHIP_ERROR_TIMEOUT) { code = MTRErrorCodeTimeout; [userInfo addEntriesFromDictionary:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"Transaction timed out.", nil) }]; + } else if (errorCode == CHIP_ERROR_BUFFER_TOO_SMALL) { + code = MTRErrorCodeBufferTooSmall; + [userInfo addEntriesFromDictionary:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"A buffer is too small.", nil) }]; } else { code = MTRErrorCodeGeneralError; [userInfo addEntriesFromDictionary:@{ @@ -259,6 +262,9 @@ + (CHIP_ERROR)errorToCHIPErrorCode:(NSError * _Nullable)error case MTRErrorCodeTimeout: code = CHIP_ERROR_TIMEOUT.AsInteger(); break; + case MTRErrorCodeBufferTooSmall: + code = CHIP_ERROR_BUFFER_TOO_SMALL.AsInteger(); + break; case MTRErrorCodeGeneralError: { if (error.userInfo != nil && error.userInfo[@"errorCode"] != nil) { code = static_cast([error.userInfo[@"errorCode"] unsignedLongValue]); diff --git a/src/darwin/Framework/CHIP/MTROTAHeaderParser.h b/src/darwin/Framework/CHIP/MTROTAHeaderParser.h new file mode 100644 index 00000000000000..d578af8cae05b8 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTROTAHeaderParser.h @@ -0,0 +1,56 @@ +/** + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSUInteger, MTROTAImageDigestType) { + MTROTAImageDigestTypeSha256 = 1, + MTROTAImageDigestTypeSha256_128, + MTROTAImageDigestTypeSha256_120, + MTROTAImageDigestTypeSha256_96, + MTROTAImageDigestTypeSha256_64, + MTROTAImageDigestTypeSha256_32, + MTROTAImageDigestTypeSha384, + MTROTAImageDigestTypeSha512, + MTROTAImageDigestTypeSha3_224, + MTROTAImageDigestTypeSha3_256, + MTROTAImageDigestTypeSha3_384, + MTROTAImageDigestTypeSha3_512, +}; + +@interface MTROTAHeader : NSObject + +@property (nonatomic, strong) NSNumber * vendorID; +@property (nonatomic, strong) NSNumber * productID; +@property (nonatomic, strong) NSNumber * payloadSize; +@property (nonatomic, strong) NSNumber * softwareVersion; +@property (nonatomic, strong) NSString * softwareVersionString; +@property (nonatomic, strong) NSString * releaseNotesURL; +@property (nonatomic, strong) NSData * imageDigest; +@property (nonatomic, assign) MTROTAImageDigestType imageDigestType; +@property (nonatomic, strong) NSNumber * minApplicableVersion; +@property (nonatomic, strong) NSNumber * maxApplicableVersion; + +@end + +@interface MTROTAHeaderParser : NSObject ++ (nullable MTROTAHeader *)headerFromData:(NSData *)data error:(NSError * __autoreleasing *)error; +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTROTAHeaderParser.mm b/src/darwin/Framework/CHIP/MTROTAHeaderParser.mm new file mode 100644 index 00000000000000..558d590e98e5c1 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTROTAHeaderParser.mm @@ -0,0 +1,72 @@ +/** + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "MTROTAHeaderParser.h" + +#import "MTRError.h" +#import "MTRError_Internal.h" +#import "NSDataSpanConversion.h" +#import "NSStringSpanConversion.h" + +#include + +@implementation MTROTAHeader +@end + +@implementation MTROTAHeaderParser ++ (nullable MTROTAHeader *)headerFromData:(NSData *)data error:(NSError * __autoreleasing *)error +{ + chip::OTAImageHeaderParser parser; + + parser.Init(); + + if (!parser.IsInitialized()) { + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]; + return nil; + } + + chip::ByteSpan buffer = AsByteSpan(data); + chip::OTAImageHeader header; + CHIP_ERROR err = parser.AccumulateAndDecode(buffer, header); + if (err != CHIP_NO_ERROR) { + *error = [MTRError errorForCHIPErrorCode:err]; + parser.Clear(); + return nil; + } + + auto headerObj = [MTROTAHeader new]; + headerObj.vendorID = @(header.mVendorId); + headerObj.productID = @(header.mProductId); + headerObj.payloadSize = @(header.mPayloadSize); + headerObj.softwareVersion = @(header.mSoftwareVersion); + headerObj.softwareVersionString = AsString(header.mSoftwareVersionString); + headerObj.releaseNotesURL = AsString(header.mReleaseNotesURL); + headerObj.imageDigest = AsData(header.mImageDigest); + headerObj.imageDigestType = static_cast(chip::to_underlying(header.mImageDigestType)); + + if (header.mMinApplicableVersion.HasValue()) { + headerObj.minApplicableVersion = @(header.mMinApplicableVersion.Value()); + } + + if (header.mMaxApplicableVersion.HasValue()) { + headerObj.maxApplicableVersion = @(header.mMaxApplicableVersion.Value()); + } + + parser.Clear(); + return headerObj; +} +@end diff --git a/src/darwin/Framework/CHIP/MTROTAProviderDelegate.h b/src/darwin/Framework/CHIP/MTROTAProviderDelegate.h index 81aef65dbf5005..9f431a3f8777b1 100644 --- a/src/darwin/Framework/CHIP/MTROTAProviderDelegate.h +++ b/src/darwin/Framework/CHIP/MTROTAProviderDelegate.h @@ -50,6 +50,28 @@ NS_ASSUME_NONNULL_BEGIN - (void)handleNotifyUpdateApplied:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params completionHandler:(StatusCompletion)completionHandler; +/** + * Notify the delegate when a BDX Session starts + * + */ +- (void)handleBDXTransferSessionBegin:(NSString * _Nonnull)fileDesignator + offset:(NSNumber * _Nonnull)offset + completionHandler:(void (^)(NSError * error))completionHandler; + +/** + * Notify the delegate when a BDX Session ends + * + */ +- (void)handleBDXTransferSessionEnd:(NSError * _Nullable)error; + +/** + * Notify the delegate when a BDX Query message has been received + * + */ +- (void)handleBDXQuery:(NSNumber * _Nonnull)blockSize + blockIndex:(NSNumber * _Nonnull)blockIndex + bytesToSkip:(NSNumber * _Nonnull)bytesToSkip + completionHandler:(void (^)(NSData * _Nullable data, BOOL isEOF))completionHandler; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.h b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.h index 2bd56bf4c186c6..97aa258dad2617 100644 --- a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.h +++ b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.h @@ -24,10 +24,11 @@ NS_ASSUME_NONNULL_BEGIN class MTROTAProviderDelegateBridge : public chip::app::Clusters::OTAProviderDelegate { public: - MTROTAProviderDelegateBridge(); + MTROTAProviderDelegateBridge(id delegate); ~MTROTAProviderDelegateBridge(); - void setDelegate(id delegate, dispatch_queue_t queue); + CHIP_ERROR Init(chip::System::Layer * systemLayer, chip::Messaging::ExchangeManager * exchangeManager); + void Shutdown(); void HandleQueryImage( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, @@ -59,7 +60,7 @@ class MTROTAProviderDelegateBridge : public chip::app::Clusters::OTAProviderDele MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams * commandParams); _Nullable id mDelegate; - _Nullable dispatch_queue_t mQueue; + dispatch_queue_t mWorkQueue; }; NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm index 17c990b4c53697..2045ce1f2627ce 100644 --- a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm +++ b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm @@ -17,133 +17,434 @@ #import "MTROTAProviderDelegateBridge.h" #import "NSDataSpanConversion.h" +#import "NSStringSpanConversion.h" #include #include #include #include +#include +#include +#include +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters::OtaSoftwareUpdateProvider; +using namespace chip::bdx; + +// TODO Expose a method onto the delegate to make that configurable. +constexpr uint32_t kMaxBdxBlockSize = 1024; +constexpr uint32_t kMaxBDXURILen = 256; +constexpr System::Clock::Timeout kBdxTimeout = System::Clock::Seconds16(5 * 60); // OTA Spec mandates >= 5 minutes +constexpr System::Clock::Timeout kBdxPollIntervalMs = System::Clock::Milliseconds32(50); +constexpr bdx::TransferRole kBdxRole = bdx::TransferRole::kSender; + +class BdxOTASender : public bdx::Responder { +public: + BdxOTASender() {}; + + CHIP_ERROR PrepareForTransfer(FabricIndex fabricIndex, NodeId nodeId) + { + VerifyOrReturnError(mDelegate != nil, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mExchangeMgr != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mSystemLayer != nullptr, CHIP_ERROR_INCORRECT_STATE); + + ReturnErrorOnFailure(ConfigureState(fabricIndex, nodeId)); + + BitFlags flags(bdx::TransferControlFlags::kReceiverDrive); + return Responder::PrepareForTransfer(mSystemLayer, kBdxRole, flags, kMaxBdxBlockSize, kBdxTimeout, kBdxPollIntervalMs); + } + + CHIP_ERROR Init(System::Layer * systemLayer, Messaging::ExchangeManager * exchangeMgr) + { + VerifyOrReturnError(mSystemLayer == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mExchangeMgr == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(systemLayer != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(exchangeMgr != nullptr, CHIP_ERROR_INCORRECT_STATE); + + exchangeMgr->RegisterUnsolicitedMessageHandlerForProtocol(Protocols::BDX::Id, this); + + mSystemLayer = systemLayer; + mExchangeMgr = exchangeMgr; + mWorkQueue = DeviceLayer::PlatformMgrImpl().GetWorkQueue(); + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Shutdown() + { + VerifyOrReturnError(mSystemLayer != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mExchangeMgr != nullptr, CHIP_ERROR_INCORRECT_STATE); + + mExchangeMgr->UnregisterUnsolicitedMessageHandlerForProtocol(Protocols::BDX::Id); + + mExchangeMgr = nullptr; + mSystemLayer = nullptr; + mWorkQueue = nil; + + ResetState(); + + return CHIP_NO_ERROR; + } + + void SetDelegate(id delegate) + { + if (delegate) { + mDelegate = delegate; + } else { + ResetState(); + } + } + +private: + CHIP_ERROR OnMessageToSend(TransferSession::OutputEvent & event) + { + VerifyOrReturnError(mExchangeCtx != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mDelegate != nil, CHIP_ERROR_INCORRECT_STATE); + + Messaging::SendFlags sendFlags; + + // All messages sent from the Sender expect a response, except for a StatusReport which would indicate an error and + // the end of the transfer. + if (!event.msgTypeData.HasMessageType(Protocols::SecureChannel::MsgType::StatusReport)) { + sendFlags.Set(Messaging::SendMessageFlags::kExpectResponse); + } + + auto & msgTypeData = event.msgTypeData; + return mExchangeCtx->SendMessage(msgTypeData.ProtocolId, msgTypeData.MessageType, std::move(event.MsgData), sendFlags); + } + + CHIP_ERROR OnTransferSessionBegin(TransferSession::OutputEvent & event) + { + uint16_t fdl = 0; + auto fd = mTransfer.GetFileDesignator(fdl); + VerifyOrReturnError(fdl <= bdx::kMaxFileDesignatorLen, CHIP_ERROR_INVALID_ARGUMENT); + + auto fileDesignator = [[NSString alloc] initWithBytes:fd length:fdl encoding:NSUTF8StringEncoding]; + auto offset = @(mTransfer.GetStartOffset()); + auto completionHandler = ^(NSError * error) { + dispatch_async(mWorkQueue, ^{ + if (error != nil) { + LogErrorOnFailure([MTRError errorToCHIPErrorCode:error]); + LogErrorOnFailure(mTransfer.AbortTransfer(bdx::StatusCode::kUnknown)); + return; + } + + // bdx::TransferSession will automatically reject a transfer if there are no + // common supported control modes. It will also default to the smaller + // block size. + TransferSession::TransferAcceptData acceptData; + acceptData.ControlMode = bdx::TransferControlFlags::kReceiverDrive; + acceptData.MaxBlockSize = mTransfer.GetTransferBlockSize(); + acceptData.StartOffset = mTransfer.GetStartOffset(); + acceptData.Length = mTransfer.GetTransferLength(); + + LogErrorOnFailure(mTransfer.AcceptTransfer(acceptData)); + }); + }; + + auto strongDelegate = mDelegate; + dispatch_async(mWorkQueue, ^{ + [strongDelegate handleBDXTransferSessionBegin:fileDesignator offset:offset completionHandler:completionHandler]; + }); + + return CHIP_NO_ERROR; + } + + CHIP_ERROR OnTransferSessionEnd(TransferSession::OutputEvent & event) + { + CHIP_ERROR error = CHIP_NO_ERROR; + if (event.EventType == TransferSession::OutputEventType::kTransferTimeout) { + error = CHIP_ERROR_TIMEOUT; + } else if (event.EventType != TransferSession::OutputEventType::kAckEOFReceived) { + error = CHIP_ERROR_INTERNAL; + } + + auto strongDelegate = mDelegate; + dispatch_async(mWorkQueue, ^{ + [strongDelegate handleBDXTransferSessionEnd:[MTRError errorForCHIPErrorCode:error]]; + }); + + ResetState(); + return CHIP_NO_ERROR; + } + + CHIP_ERROR OnBlockQuery(TransferSession::OutputEvent & event) + { + auto blockSize = @(mTransfer.GetTransferBlockSize()); + auto blockIndex = @(mTransfer.GetNextBlockNum()); + + auto bytesToSkip = @(0); + if (event.EventType == TransferSession::OutputEventType::kQueryWithSkipReceived) { + bytesToSkip = @(event.bytesToSkip.BytesToSkip); + } + + auto completionHandler = ^(NSData * _Nullable data, BOOL isEOF) { + dispatch_async(mWorkQueue, ^{ + if (data == nil) { + LogErrorOnFailure(mTransfer.AbortTransfer(bdx::StatusCode::kUnknown)); + return; + } + + TransferSession::BlockData blockData; + blockData.Data = static_cast([data bytes]); + blockData.Length = static_cast([data length]); + blockData.IsEof = isEOF; + + CHIP_ERROR err = mTransfer.PrepareBlock(blockData); + if (CHIP_NO_ERROR != err) { + LogErrorOnFailure(err); + LogErrorOnFailure(mTransfer.AbortTransfer(bdx::StatusCode::kUnknown)); + } + }); + }; + + // TODO Handle MaxLength + + auto strongDelegate = mDelegate; + dispatch_async(mWorkQueue, ^{ + [strongDelegate handleBDXQuery:blockSize + blockIndex:blockIndex + bytesToSkip:bytesToSkip + completionHandler:completionHandler]; + }); + + return CHIP_NO_ERROR; + } + + void HandleTransferSessionOutput(TransferSession::OutputEvent & event) override + { + VerifyOrReturn(mDelegate != nil); + + CHIP_ERROR err = CHIP_NO_ERROR; + switch (event.EventType) { + case TransferSession::OutputEventType::kInitReceived: + err = OnTransferSessionBegin(event); + break; + case TransferSession::OutputEventType::kStatusReceived: + ChipLogError(BDX, "Got StatusReport %x", static_cast(event.statusData.statusCode)); + [[fallthrough]]; + case TransferSession::OutputEventType::kAckEOFReceived: + case TransferSession::OutputEventType::kInternalError: + case TransferSession::OutputEventType::kTransferTimeout: + err = OnTransferSessionEnd(event); + break; + case TransferSession::OutputEventType::kQueryWithSkipReceived: + case TransferSession::OutputEventType::kQueryReceived: + err = OnBlockQuery(event); + break; + case TransferSession::OutputEventType::kMsgToSend: + err = OnMessageToSend(event); + break; + case TransferSession::OutputEventType::kNone: + case TransferSession::OutputEventType::kAckReceived: + // Nothing to do. + break; + case TransferSession::OutputEventType::kAcceptReceived: + case TransferSession::OutputEventType::kBlockReceived: + default: + // Should never happens. + chipDie(); + break; + } + LogErrorOnFailure(err); + } + + CHIP_ERROR ConfigureState(chip::FabricIndex fabricIndex, chip::NodeId nodeId) + { + if (mInitialized) { + // Prevent a new node connection since another is active. + VerifyOrReturnError(mFabricIndex.Value() == fabricIndex && mNodeId.Value() == nodeId, CHIP_ERROR_BUSY); + + // Reset stale connection from the same Node if exists. + ResetState(); + } + + mFabricIndex.SetValue(fabricIndex); + mNodeId.SetValue(nodeId); + + mInitialized = true; + + return CHIP_NO_ERROR; + } + + void ResetState() + { + if (!mInitialized) { + return; + } + + mFabricIndex.ClearValue(); + mNodeId.ClearValue(); + mTransfer.Reset(); + + if (mExchangeCtx != nullptr) { + mExchangeCtx->Close(); + mExchangeCtx = nullptr; + } + + mInitialized = false; + } + + bool mInitialized = false; + Optional mFabricIndex; + Optional mNodeId; + id mDelegate = nil; + dispatch_queue_t mWorkQueue = nil; + Messaging::ExchangeManager * mExchangeMgr = nullptr; +}; + +BdxOTASender gOtaSender; + static NSInteger const kOtaProviderEndpoint = 0; -MTROTAProviderDelegateBridge::MTROTAProviderDelegateBridge(void) - : mDelegate(nil) +MTROTAProviderDelegateBridge::MTROTAProviderDelegateBridge(id delegate) + : mDelegate(delegate) + , mWorkQueue(DeviceLayer::PlatformMgrImpl().GetWorkQueue()) { + gOtaSender.SetDelegate(delegate); + Clusters::OTAProvider::SetDelegate(kOtaProviderEndpoint, this); } -MTROTAProviderDelegateBridge::~MTROTAProviderDelegateBridge(void) {} - -void MTROTAProviderDelegateBridge::setDelegate(id delegate, dispatch_queue_t queue) +MTROTAProviderDelegateBridge::~MTROTAProviderDelegateBridge() { - mDelegate = delegate ?: nil; - mQueue = queue ?: nil; + gOtaSender.SetDelegate(nil); + Clusters::OTAProvider::SetDelegate(kOtaProviderEndpoint, nullptr); +} - chip::app::Clusters::OTAProvider::SetDelegate(kOtaProviderEndpoint, this); +CHIP_ERROR MTROTAProviderDelegateBridge::Init(System::Layer * systemLayer, Messaging::ExchangeManager * exchangeManager) +{ + return gOtaSender.Init(systemLayer, exchangeManager); } -void MTROTAProviderDelegateBridge::HandleQueryImage(chip::app::CommandHandler * commandObj, - const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::DecodableType & commandData) +void MTROTAProviderDelegateBridge::Shutdown() { gOtaSender.Shutdown(); } + +void MTROTAProviderDelegateBridge::HandleQueryImage( + CommandHandler * commandObj, const ConcreteCommandPath & commandPath, const Commands::QueryImage::DecodableType & commandData) { - id strongDelegate = mDelegate; - if (strongDelegate && mQueue) { - auto * commandParams = [[MTROtaSoftwareUpdateProviderClusterQueryImageParams alloc] init]; - CHIP_ERROR err = ConvertToQueryImageParams(commandData, commandParams); - if (err != CHIP_NO_ERROR) { - commandObj->AddStatus(commandPath, chip::Protocols::InteractionModel::Status::InvalidCommand); - return; - } + auto * commandParams = [[MTROtaSoftwareUpdateProviderClusterQueryImageParams alloc] init]; + CHIP_ERROR err = ConvertToQueryImageParams(commandData, commandParams); + if (err != CHIP_NO_ERROR) { + commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::InvalidCommand); + return; + } - // Make sure to hold on to the command handler and command path to be used in the completion block - __block chip::app::CommandHandler::Handle handle(commandObj); - __block chip::app::ConcreteCommandPath cachedCommandPath( - commandPath.mEndpointId, commandPath.mClusterId, commandPath.mCommandId); - - dispatch_async(mQueue, ^{ - [strongDelegate handleQueryImage:commandParams - completionHandler:^(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, - NSError * _Nullable error) { - dispatch_async(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::Type response; - ConvertFromQueryImageResponseParms(data, response); - - chip::app::CommandHandler * handler = handle.Get(); - if (handler) { - handler->AddResponse(cachedCommandPath, response); - handle.Release(); - } - }); - }]; + // Make sure to hold on to the command handler and command path to be used in the completion block + __block CommandHandler::Handle handle(commandObj); + __block ConcreteCommandPath cachedCommandPath(commandPath.mEndpointId, commandPath.mClusterId, commandPath.mCommandId); + + auto completionHandler = ^( + MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error) { + dispatch_async(mWorkQueue, ^{ + CommandHandler * handler = handle.Get(); + VerifyOrReturn(handler != nullptr); + + Commands::QueryImageResponse::Type response; + ConvertFromQueryImageResponseParms(data, response); + + auto hasUpdate = [data.status isEqual:@(MTROtaSoftwareUpdateProviderOTAQueryStatusUpdateAvailable)]; + auto isBDXProtocolSupported = + [commandParams.protocolsSupported containsObject:@(MTROtaSoftwareUpdateProviderOTADownloadProtocolBDXSynchronous)]; + + if (hasUpdate && isBDXProtocolSupported) { + auto fabricIndex = handler->GetSubjectDescriptor().fabricIndex; + auto nodeId = handler->GetSubjectDescriptor().subject; + CHIP_ERROR err = gOtaSender.PrepareForTransfer(fabricIndex, nodeId); + if (CHIP_NO_ERROR != err) { + LogErrorOnFailure(err); + handler->AddStatus(cachedCommandPath, Protocols::InteractionModel::Status::Failure); + handle.Release(); + return; + } + + auto targetNodeId = handler->GetExchangeContext()->GetSessionHandle()->AsSecureSession()->GetLocalScopedNodeId(); + + char uriBuffer[kMaxBDXURILen]; + MutableCharSpan uri(uriBuffer); + err = bdx::MakeURI(targetNodeId.GetNodeId(), AsCharSpan(data.imageURI), uri); + if (CHIP_NO_ERROR != err) { + LogErrorOnFailure(err); + handler->AddStatus(cachedCommandPath, Protocols::InteractionModel::Status::Failure); + handle.Release(); + return; + } + + response.imageURI.SetValue(uri); + handler->AddResponse(cachedCommandPath, response); + handle.Release(); + return; + } + + handler->AddResponse(cachedCommandPath, response); + handle.Release(); }); - } + }; + + auto strongDelegate = mDelegate; + dispatch_async(mWorkQueue, ^{ + [strongDelegate handleQueryImage:commandParams completionHandler:completionHandler]; + }); } -void MTROTAProviderDelegateBridge::HandleApplyUpdateRequest(chip::app::CommandHandler * commandObj, - const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::DecodableType & commandData) +void MTROTAProviderDelegateBridge::HandleApplyUpdateRequest(CommandHandler * commandObj, const ConcreteCommandPath & commandPath, + const Commands::ApplyUpdateRequest::DecodableType & commandData) { // Make sure to hold on to the command handler and command path to be used in the completion block - __block chip::app::CommandHandler::Handle handle(commandObj); - __block chip::app::ConcreteCommandPath cachedCommandPath( - commandPath.mEndpointId, commandPath.mClusterId, commandPath.mCommandId); - - id strongDelegate = mDelegate; - if (strongDelegate && mQueue) { - auto * commandParams = [[MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams alloc] init]; - ConvertToApplyUpdateRequestParams(commandData, commandParams); - - dispatch_async(mQueue, ^{ - [strongDelegate - handleApplyUpdateRequest:commandParams - completionHandler:^(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, - NSError * _Nullable error) { - dispatch_async(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::Type response; - ConvertFromApplyUpdateRequestResponseParms(data, response); - - chip::app::CommandHandler * handler = handle.Get(); - if (handler) { - handler->AddResponse(cachedCommandPath, response); - handle.Release(); - } - }); - }]; - }); - } + __block CommandHandler::Handle handle(commandObj); + __block ConcreteCommandPath cachedCommandPath(commandPath.mEndpointId, commandPath.mClusterId, commandPath.mCommandId); + + auto completionHandler + = ^(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, NSError * _Nullable error) { + dispatch_async(mWorkQueue, ^{ + CommandHandler * handler = handle.Get(); + VerifyOrReturn(handler != nullptr); + + Commands::ApplyUpdateResponse::Type response; + ConvertFromApplyUpdateRequestResponseParms(data, response); + handler->AddResponse(cachedCommandPath, response); + handle.Release(); + }); + }; + + auto * commandParams = [[MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams alloc] init]; + ConvertToApplyUpdateRequestParams(commandData, commandParams); + + auto strongDelegate = mDelegate; + dispatch_async(mWorkQueue, ^{ + [strongDelegate handleApplyUpdateRequest:commandParams completionHandler:completionHandler]; + }); } -void MTROTAProviderDelegateBridge::HandleNotifyUpdateApplied(chip::app::CommandHandler * commandObj, - const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::DecodableType & commandData) +void MTROTAProviderDelegateBridge::HandleNotifyUpdateApplied(CommandHandler * commandObj, const ConcreteCommandPath & commandPath, + const Commands::NotifyUpdateApplied::DecodableType & commandData) { // Make sure to hold on to the command handler and command path to be used in the completion block - __block chip::app::CommandHandler::Handle handle(commandObj); - __block chip::app::ConcreteCommandPath cachedCommandPath( - commandPath.mEndpointId, commandPath.mClusterId, commandPath.mCommandId); - - id strongDelegate = mDelegate; - if (strongDelegate && mQueue) { - auto * commandParams = [[MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams alloc] init]; - ConvertToNotifyUpdateAppliedParams(commandData, commandParams); - - dispatch_async(mQueue, ^{ - [strongDelegate - handleNotifyUpdateApplied:commandParams - completionHandler:^(NSError * _Nullable error) { - dispatch_async(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ - chip::app::CommandHandler * handler = handle.Get(); - if (handler) { - handler->AddStatus(cachedCommandPath, chip::Protocols::InteractionModel::Status::Success); - handle.Release(); - } - }); - }]; + __block CommandHandler::Handle handle(commandObj); + __block ConcreteCommandPath cachedCommandPath(commandPath.mEndpointId, commandPath.mClusterId, commandPath.mCommandId); + + auto completionHandler = ^(NSError * _Nullable error) { + dispatch_async(mWorkQueue, ^{ + CommandHandler * handler = handle.Get(); + VerifyOrReturn(handler != nullptr); + + handler->AddStatus(cachedCommandPath, Protocols::InteractionModel::Status::Success); + handle.Release(); }); - } + }; + + auto * commandParams = [[MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams alloc] init]; + ConvertToNotifyUpdateAppliedParams(commandData, commandParams); + + auto strongDelegate = mDelegate; + dispatch_async(mWorkQueue, ^{ + [strongDelegate handleNotifyUpdateApplied:commandParams completionHandler:completionHandler]; + }); } CHIP_ERROR MTROTAProviderDelegateBridge::ConvertToQueryImageParams( - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::DecodableType & commandData, - MTROtaSoftwareUpdateProviderClusterQueryImageParams * commandParams) + const Commands::QueryImage::DecodableType & commandData, MTROtaSoftwareUpdateProviderClusterQueryImageParams * commandParams) { commandParams.vendorId = [NSNumber numberWithUnsignedShort:commandData.vendorId]; commandParams.productId = [NSNumber numberWithUnsignedShort:commandData.productId]; @@ -151,8 +452,8 @@ auto iterator = commandData.protocolsSupported.begin(); NSMutableArray * protocolsSupported = [[NSMutableArray alloc] init]; while (iterator.Next()) { - chip::app::Clusters::OtaSoftwareUpdateProvider::OTADownloadProtocol protocol = iterator.GetValue(); - [protocolsSupported addObject:[NSNumber numberWithInt:chip::to_underlying(protocol)]]; + OTADownloadProtocol protocol = iterator.GetValue(); + [protocolsSupported addObject:[NSNumber numberWithInt:to_underlying(protocol)]]; } ReturnErrorOnFailure(iterator.GetStatus()); commandParams.protocolsSupported = protocolsSupported; @@ -162,9 +463,7 @@ } if (commandData.location.HasValue()) { - commandParams.location = [[NSString alloc] initWithBytes:commandData.location.Value().data() - length:commandData.location.Value().size() - encoding:NSUTF8StringEncoding]; + commandParams.location = AsString(commandData.location.Value()); } if (commandData.requestorCanConsent.HasValue()) { @@ -179,16 +478,16 @@ void MTROTAProviderDelegateBridge::ConvertFromQueryImageResponseParms( const MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * responseParams, - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::Type & response) + Commands::QueryImageResponse::Type & response) { - response.status = static_cast([responseParams.status intValue]); + response.status = static_cast([responseParams.status intValue]); if (responseParams.delayedActionTime) { response.delayedActionTime.SetValue([responseParams.delayedActionTime unsignedIntValue]); } if (responseParams.imageURI) { - response.imageURI.SetValue(chip::CharSpan([responseParams.imageURI UTF8String], responseParams.imageURI.length)); + response.imageURI.SetValue(AsCharSpan(responseParams.imageURI)); } if (responseParams.softwareVersion) { @@ -196,8 +495,7 @@ } if (responseParams.softwareVersionString) { - response.softwareVersionString.SetValue( - chip::CharSpan([responseParams.softwareVersionString UTF8String], responseParams.softwareVersionString.length)); + response.softwareVersionString.SetValue(AsCharSpan(responseParams.softwareVersionString)); } if (responseParams.updateToken) { @@ -214,7 +512,7 @@ } void MTROTAProviderDelegateBridge::ConvertToApplyUpdateRequestParams( - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::DecodableType & commandData, + const Commands::ApplyUpdateRequest::DecodableType & commandData, MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams * commandParams) { commandParams.updateToken = AsData(commandData.updateToken); @@ -223,15 +521,14 @@ void MTROTAProviderDelegateBridge::ConvertFromApplyUpdateRequestResponseParms( const MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * responseParams, - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::Type & response) + Commands::ApplyUpdateResponse::Type & response) { - response.action - = static_cast([responseParams.action intValue]); + response.action = static_cast([responseParams.action intValue]); response.delayedActionTime = [responseParams.delayedActionTime unsignedIntValue]; } void MTROTAProviderDelegateBridge::ConvertToNotifyUpdateAppliedParams( - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::DecodableType & commandData, + const Commands::NotifyUpdateApplied::DecodableType & commandData, MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams * commandParams) { commandParams.updateToken = AsData(commandData.updateToken); diff --git a/src/darwin/Framework/CHIP/MTRSetupPayload.h b/src/darwin/Framework/CHIP/MTRSetupPayload.h index 61f98ca9c23920..4f0b02a7ed5ffb 100644 --- a/src/darwin/Framework/CHIP/MTRSetupPayload.h +++ b/src/darwin/Framework/CHIP/MTRSetupPayload.h @@ -43,23 +43,24 @@ typedef NS_ENUM(NSUInteger, MTROptionalQRCodeInfoType) { }; @interface MTROptionalQRCodeInfo : NSObject -@property (nonatomic, strong) NSNumber * infoType; -@property (nonatomic, strong) NSNumber * tag; -@property (nonatomic, strong) NSNumber * integerValue; -@property (nonatomic, strong) NSString * stringValue; +@property (nonatomic, copy) NSNumber * infoType; +@property (nonatomic, copy) NSNumber * tag; +@property (nonatomic, copy) NSNumber * integerValue; +@property (nonatomic, copy) NSString * stringValue; @end @interface MTRSetupPayload : NSObject -@property (nonatomic, strong) NSNumber * version; -@property (nonatomic, strong) NSNumber * vendorID; -@property (nonatomic, strong) NSNumber * productID; +@property (nonatomic, copy) NSNumber * version; +@property (nonatomic, copy) NSNumber * vendorID; +@property (nonatomic, copy) NSNumber * productID; @property (nonatomic, assign) MTRCommissioningFlow commissioningFlow; @property (nonatomic, assign) MTRRendezvousInformationFlags rendezvousInformation; -@property (nonatomic, strong) NSNumber * discriminator; -@property (nonatomic, strong) NSNumber * setUpPINCode; +@property (nonatomic, copy) NSNumber * discriminator; +@property (nonatomic, assign) BOOL hasShortDiscriminator; +@property (nonatomic, copy) NSNumber * setUpPINCode; -@property (nonatomic, strong) NSString * serialNumber; +@property (nonatomic, copy) NSString * serialNumber; - (nullable NSArray *)getAllOptionalVendorData:(NSError * __autoreleasing *)error; /** diff --git a/src/darwin/Framework/CHIP/MTRSetupPayload.mm b/src/darwin/Framework/CHIP/MTRSetupPayload.mm index 3c026cfb68e850..7b9638687615ff 100644 --- a/src/darwin/Framework/CHIP/MTRSetupPayload.mm +++ b/src/darwin/Framework/CHIP/MTRSetupPayload.mm @@ -64,7 +64,12 @@ - (id)initWithSetupPayload:(chip::SetupPayload)setupPayload _productID = [NSNumber numberWithUnsignedShort:setupPayload.productID]; _commissioningFlow = [self convertCommissioningFlow:setupPayload.commissioningFlow]; _rendezvousInformation = [self convertRendezvousFlags:setupPayload.rendezvousInformation]; - _discriminator = [NSNumber numberWithUnsignedShort:setupPayload.discriminator]; + _hasShortDiscriminator = setupPayload.discriminator.IsShortDiscriminator(); + if (_hasShortDiscriminator) { + _discriminator = [NSNumber numberWithUnsignedShort:setupPayload.discriminator.GetShortValue()]; + } else { + _discriminator = [NSNumber numberWithUnsignedShort:setupPayload.discriminator.GetLongValue()]; + } _setUpPINCode = [NSNumber numberWithUnsignedInt:setupPayload.setUpPINCode]; [self getSerialNumber:setupPayload]; @@ -134,6 +139,7 @@ + (NSUInteger)generateRandomPIN static NSString * const MTRSetupPayloadCodingKeyProductID = @"MTRSP.ck.productID"; static NSString * const MTRSetupPayloadCodingKeyCommissioningFlow = @"MTRSP.ck.commissioningFlow"; static NSString * const MTRSetupPayloadCodingKeyRendezvousFlags = @"MTRSP.ck.rendezvousFlags"; +static NSString * const MTRSetupPayloadCodingKeyHasShortDiscriminator = @"MTRSP.ck.hasShortDiscriminator"; static NSString * const MTRSetupPayloadCodingKeyDiscriminator = @"MTRSP.ck.discriminator"; static NSString * const MTRSetupPayloadCodingKeySetupPINCode = @"MTRSP.ck.setupPINCode"; static NSString * const MTRSetupPayloadCodingKeySerialNumber = @"MTRSP.ck.serialNumber"; @@ -148,10 +154,11 @@ - (void)encodeWithCoder:(NSCoder *)coder [coder encodeObject:self.version forKey:MTRSetupPayloadCodingKeyVersion]; [coder encodeObject:self.vendorID forKey:MTRSetupPayloadCodingKeyVendorID]; [coder encodeObject:self.productID forKey:MTRSetupPayloadCodingKeyProductID]; - // Casts are safe because commissioning flow and rendezvous information - // values are all pretty small and non-negative. + // Casts are safe because commissioning flow, rendezvous information, and + // hasShortDiscriminator values are all pretty small and non-negative. [coder encodeInteger:static_cast(self.commissioningFlow) forKey:MTRSetupPayloadCodingKeyCommissioningFlow]; [coder encodeInteger:static_cast(self.rendezvousInformation) forKey:MTRSetupPayloadCodingKeyRendezvousFlags]; + [coder encodeInteger:static_cast(self.hasShortDiscriminator) forKey:MTRSetupPayloadCodingKeyHasShortDiscriminator]; [coder encodeObject:self.discriminator forKey:MTRSetupPayloadCodingKeyDiscriminator]; [coder encodeObject:self.setUpPINCode forKey:MTRSetupPayloadCodingKeySetupPINCode]; [coder encodeObject:self.serialNumber forKey:MTRSetupPayloadCodingKeySerialNumber]; @@ -164,6 +171,7 @@ - (nullable instancetype)initWithCoder:(NSCoder *)decoder NSNumber * productID = [decoder decodeObjectOfClass:[NSNumber class] forKey:MTRSetupPayloadCodingKeyProductID]; NSInteger commissioningFlow = [decoder decodeIntegerForKey:MTRSetupPayloadCodingKeyCommissioningFlow]; NSInteger rendezvousInformation = [decoder decodeIntegerForKey:MTRSetupPayloadCodingKeyRendezvousFlags]; + NSInteger hasShortDiscriminator = [decoder decodeIntegerForKey:MTRSetupPayloadCodingKeyHasShortDiscriminator]; NSNumber * discriminator = [decoder decodeObjectOfClass:[NSNumber class] forKey:MTRSetupPayloadCodingKeyDiscriminator]; NSNumber * setUpPINCode = [decoder decodeObjectOfClass:[NSNumber class] forKey:MTRSetupPayloadCodingKeySetupPINCode]; NSString * serialNumber = [decoder decodeObjectOfClass:[NSString class] forKey:MTRSetupPayloadCodingKeySerialNumber]; @@ -174,6 +182,7 @@ - (nullable instancetype)initWithCoder:(NSCoder *)decoder payload.productID = productID; payload.commissioningFlow = static_cast(commissioningFlow); payload.rendezvousInformation = static_cast(rendezvousInformation); + payload.hasShortDiscriminator = static_cast(hasShortDiscriminator); payload.discriminator = discriminator; payload.setUpPINCode = setUpPINCode; payload.serialNumber = serialNumber; diff --git a/src/darwin/Framework/CHIP/Matter.h b/src/darwin/Framework/CHIP/Matter.h index 3f5856e892c8e6..cabba655deaa11 100644 --- a/src/darwin/Framework/CHIP/Matter.h +++ b/src/darwin/Framework/CHIP/Matter.h @@ -34,6 +34,7 @@ #import #import #import +#import #import #import #import diff --git a/src/darwin/Framework/CHIP/NSStringSpanConversion.h b/src/darwin/Framework/CHIP/NSStringSpanConversion.h new file mode 100644 index 00000000000000..a973e5bb56cab8 --- /dev/null +++ b/src/darwin/Framework/CHIP/NSStringSpanConversion.h @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#import "Foundation/Foundation.h" + +#include + +NS_ASSUME_NONNULL_BEGIN + +/** + * Utilities for converting between NSString and chip::CharSpan. + */ + +inline chip::CharSpan AsCharSpan(NSString * str) +{ + return chip::CharSpan([str UTF8String], [str lengthOfBytesUsingEncoding:NSUTF8StringEncoding]); +} + +inline NSString * AsString(chip::CharSpan span) +{ + return [[NSString alloc] initWithBytes:span.data() length:span.size() encoding:NSUTF8StringEncoding]; +} + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt index f6a31156e84bc4..592f99ad40adba 100644 --- a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt @@ -19,6 +19,18 @@ NS_ASSUME_NONNULL_BEGIN return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params alloc] init]; + + {{#zcl_command_arguments}} + other.{{asStructPropertyName label}} = self.{{asStructPropertyName label}}; + {{/zcl_command_arguments}} + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString *descriptionString = [NSString stringWithFormat:@"<%@: {{#zcl_command_arguments}}{{asStructPropertyName label}}:%@; {{/zcl_command_arguments}}>", NSStringFromClass([self class]) {{#zcl_command_arguments}},{{#if isArray}}_{{asStructPropertyName label}}{{else if (isOctetString type)}}[_{{asStructPropertyName label}} base64EncodedStringWithOptions:0]{{else}}_{{asStructPropertyName label}}{{/if}}{{/zcl_command_arguments}}]; diff --git a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt index f96a55cd0f21f0..873cd5b739ef0b 100644 --- a/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt @@ -7,16 +7,16 @@ NS_ASSUME_NONNULL_BEGIN {{#zcl_clusters}} {{#zcl_commands}} -@interface MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params : NSObject +@interface MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params : NSObject {{#zcl_command_arguments}} {{! Override the getter name because some of our properties start with things like "new" or "init" }} -@property (strong, nonatomic{{#unless (isStrEqual (asGetterName label) (asStructPropertyName label))}}, getter={{asGetterName label}}{{/unless}}) {{asObjectiveCType type parent.parent.name}} {{asStructPropertyName label}}; +@property (nonatomic, copy{{#unless (isStrEqual (asGetterName label) (asStructPropertyName label))}}, getter={{asGetterName label}}{{/unless}}) {{asObjectiveCType type parent.parent.name}} {{asStructPropertyName label}}; {{/zcl_command_arguments}} /** * Controls whether the command is a timed command (using Timed Invoke). - * + * * If nil (the default value), a regular invoke is done for commands that do * not require a timed invoke and a timed invoke with some default timed request * timeout is done for commands that require a timed invoke. @@ -26,12 +26,12 @@ NS_ASSUME_NONNULL_BEGIN * desired security properties but large enough that it will allow a round-trip * from the sever to the client (for the status response and actual invoke * request) within the timeout window. - * - */ - @property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - - (instancetype)init; - +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end {{/zcl_commands}} {{/zcl_clusters}} diff --git a/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt b/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt index ffba4f7a66a17b..75821772c901f3 100644 --- a/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt @@ -17,6 +17,17 @@ NS_ASSUME_NONNULL_BEGIN return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}} alloc] init]; + + {{#zcl_struct_items}} + other.{{asStructPropertyName label}} = self.{{asStructPropertyName label}}; + {{/zcl_struct_items}} + + return other; +} + - (NSString *)description { NSString *descriptionString = [NSString stringWithFormat:@"<%@: {{#zcl_struct_items}}{{asStructPropertyName label}}:%@; {{/zcl_struct_items}}>", NSStringFromClass([self class]){{#zcl_struct_items}},{{#if isArray}}_{{asStructPropertyName label}}{{else if (isOctetString type)}}[_{{asStructPropertyName label}} base64EncodedStringWithOptions:0]{{else}}_{{asStructPropertyName label}}{{/if}}{{/zcl_struct_items}}]; @@ -39,6 +50,17 @@ NS_ASSUME_NONNULL_BEGIN return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Event alloc] init]; + + {{#zcl_event_fields}} + other.{{asStructPropertyName name}} = self.{{asStructPropertyName name}}; + {{/zcl_event_fields}} + + return other; +} + - (NSString *)description { NSString *descriptionString = [NSString stringWithFormat:@"<%@: {{#zcl_event_fields}}{{asStructPropertyName name}}:%@; {{/zcl_event_fields}}>", NSStringFromClass([self class]){{#zcl_event_fields}},{{#if isArray}}_{{asStructPropertyName name}}{{else if (isOctetString type)}}[_{{asStructPropertyName name}} base64EncodedStringWithOptions:0]{{else}}_{{asStructPropertyName name}}{{/if}}{{/zcl_event_fields}}]; diff --git a/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt b/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt index 2066c7ac89af69..eaa30217ba200c 100644 --- a/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt @@ -6,23 +6,27 @@ NS_ASSUME_NONNULL_BEGIN {{#zcl_clusters}} {{#zcl_structs}} -@interface MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}} : NSObject +@interface MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}} : NSObject {{! Override the getter name because some of our properties start with things like "new" or "init" }} {{#zcl_struct_items}} -@property (strong, nonatomic{{#unless (isStrEqual (asGetterName label) (asStructPropertyName label))}}, getter={{asGetterName label}}{{/unless}}) {{asObjectiveCType type parent.parent.name}} {{asStructPropertyName label}}; +@property (nonatomic, copy{{#unless (isStrEqual (asGetterName label) (asStructPropertyName label))}}, getter={{asGetterName label}}{{/unless}}) {{asObjectiveCType type parent.parent.name}} {{asStructPropertyName label}}; {{/zcl_struct_items}} -- (instancetype)init; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end {{/zcl_structs}} {{#zcl_events}} -@interface MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Event : NSObject +@interface MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Event : NSObject {{#zcl_event_fields}} -@property (strong, nonatomic{{#unless (isStrEqual (asGetterName name) (asStructPropertyName name))}}, getter={{asGetterName name}}{{/unless}}) {{asObjectiveCType type parent.parent.name}} {{asStructPropertyName name}}; +@property (nonatomic, copy{{#unless (isStrEqual (asGetterName name) (asStructPropertyName name))}}, getter={{asGetterName name}}{{/unless}}) {{asObjectiveCType type parent.parent.name}} {{asStructPropertyName name}}; {{/zcl_event_fields}} + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end {{/zcl_events}} diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 4b61ec50ed0351..1e7efee40675ef 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -14216,7 +14216,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedShort:chip::to_underlying(cppValue)]; return value; } case Attributes::ApplicationName::Id: { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index cd23e90e68d856..ed0d190d771cbc 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -941,9 +941,8 @@ NS_ASSUME_NONNULL_BEGIN completionHandler:(StatusCompletion)completionHandler; - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams * _Nullable)params +- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)stopWithOnOffWithCompletionHandler:(StatusCompletion)completionHandler; - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params completionHandler:(StatusCompletion)completionHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 0a987741f0fb1a..c34aa77a252490 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -3769,8 +3769,8 @@ - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params } request.level = params.level.unsignedCharValue; request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionMask = params.optionMask.unsignedCharValue; - request.optionOverride = params.optionOverride.unsignedCharValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; new MTRCommandSuccessCallbackBridge( self.callbackQueue, @@ -3797,8 +3797,8 @@ - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completionHand } request.moveMode = static_cast>(params.moveMode.unsignedCharValue); request.rate = params.rate.unsignedCharValue; - request.optionMask = params.optionMask.unsignedCharValue; - request.optionOverride = params.optionOverride.unsignedCharValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; new MTRCommandSuccessCallbackBridge( self.callbackQueue, @@ -3826,8 +3826,8 @@ - (void)stepWithParams:(MTRLevelControlClusterStepParams *)params completionHand request.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedCharValue; request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionMask = params.optionMask.unsignedCharValue; - request.optionOverride = params.optionOverride.unsignedCharValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; new MTRCommandSuccessCallbackBridge( self.callbackQueue, @@ -3852,8 +3852,8 @@ - (void)stopWithParams:(MTRLevelControlClusterStopParams *)params completionHand timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.optionMask = params.optionMask.unsignedCharValue; - request.optionOverride = params.optionOverride.unsignedCharValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; new MTRCommandSuccessCallbackBridge( self.callbackQueue, @@ -3881,6 +3881,8 @@ - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnO } request.level = params.level.unsignedCharValue; request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; new MTRCommandSuccessCallbackBridge( self.callbackQueue, @@ -3908,6 +3910,8 @@ - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)par } request.moveMode = static_cast>(params.moveMode.unsignedCharValue); request.rate = params.rate.unsignedCharValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; new MTRCommandSuccessCallbackBridge( self.callbackQueue, @@ -3936,6 +3940,8 @@ - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)par request.stepMode = static_cast>(params.stepMode.unsignedCharValue); request.stepSize = params.stepSize.unsignedCharValue; request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; new MTRCommandSuccessCallbackBridge( self.callbackQueue, @@ -3950,11 +3956,7 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)stopWithOnOffWithCompletionHandler:(StatusCompletion)completionHandler -{ - [self stopWithOnOffWithParams:nil completionHandler:completionHandler]; -} -- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams * _Nullable)params +- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; @@ -3965,6 +3967,8 @@ - (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams * _Nu timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; new MTRCommandSuccessCallbackBridge( self.callbackQueue, @@ -65227,9 +65231,9 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable - (void)readAttributeVendorIDWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -65241,7 +65245,7 @@ - (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterv subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16uAttributeCallbackSubscriptionBridge( + new MTRVendorIdAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -65249,11 +65253,11 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -65265,7 +65269,7 @@ + (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)at queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRVendorIdAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; @@ -65274,7 +65278,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index a006465905e527..bb4e315d325092 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -22,9 +22,9 @@ NS_ASSUME_NONNULL_BEGIN -@interface MTRIdentifyClusterIdentifyParams : NSObject +@interface MTRIdentifyClusterIdentifyParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull identifyTime; +@property (nonatomic, copy) NSNumber * _Nonnull identifyTime; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -39,16 +39,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRIdentifyClusterTriggerEffectParams : NSObject +@interface MTRIdentifyClusterTriggerEffectParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull effectIdentifier; +@property (nonatomic, copy) NSNumber * _Nonnull effectIdentifier; -@property (strong, nonatomic) NSNumber * _Nonnull effectVariant; +@property (nonatomic, copy) NSNumber * _Nonnull effectVariant; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -63,16 +63,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupsClusterAddGroupParams : NSObject +@interface MTRGroupsClusterAddGroupParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSString * _Nonnull groupName; +@property (nonatomic, copy) NSString * _Nonnull groupName; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -87,16 +87,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupsClusterAddGroupResponseParams : NSObject +@interface MTRGroupsClusterAddGroupResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -111,14 +111,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupsClusterViewGroupParams : NSObject +@interface MTRGroupsClusterViewGroupParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -133,18 +133,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupsClusterViewGroupResponseParams : NSObject +@interface MTRGroupsClusterViewGroupResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSString * _Nonnull groupName; +@property (nonatomic, copy) NSString * _Nonnull groupName; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -159,14 +159,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupsClusterGetGroupMembershipParams : NSObject +@interface MTRGroupsClusterGetGroupMembershipParams : NSObject -@property (strong, nonatomic) NSArray * _Nonnull groupList; +@property (nonatomic, copy) NSArray * _Nonnull groupList; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -181,16 +181,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupsClusterGetGroupMembershipResponseParams : NSObject +@interface MTRGroupsClusterGetGroupMembershipResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nullable capacity; +@property (nonatomic, copy) NSNumber * _Nullable capacity; -@property (strong, nonatomic) NSArray * _Nonnull groupList; +@property (nonatomic, copy) NSArray * _Nonnull groupList; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -205,14 +205,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupsClusterRemoveGroupParams : NSObject +@interface MTRGroupsClusterRemoveGroupParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -227,16 +227,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupsClusterRemoveGroupResponseParams : NSObject +@interface MTRGroupsClusterRemoveGroupResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -251,12 +251,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupsClusterRemoveAllGroupsParams : NSObject +@interface MTRGroupsClusterRemoveAllGroupsParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -271,16 +271,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupsClusterAddGroupIfIdentifyingParams : NSObject +@interface MTRGroupsClusterAddGroupIfIdentifyingParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSString * _Nonnull groupName; +@property (nonatomic, copy) NSString * _Nonnull groupName; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -295,22 +295,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterAddSceneParams : NSObject +@interface MTRScenesClusterAddSceneParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSString * _Nonnull sceneName; +@property (nonatomic, copy) NSString * _Nonnull sceneName; -@property (strong, nonatomic) NSArray * _Nonnull extensionFieldSets; +@property (nonatomic, copy) NSArray * _Nonnull extensionFieldSets; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -325,18 +325,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterAddSceneResponseParams : NSObject +@interface MTRScenesClusterAddSceneResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -351,16 +351,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterViewSceneParams : NSObject +@interface MTRScenesClusterViewSceneParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -375,24 +375,24 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterViewSceneResponseParams : NSObject +@interface MTRScenesClusterViewSceneResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; -@property (strong, nonatomic) NSNumber * _Nullable transitionTime; +@property (nonatomic, copy) NSNumber * _Nullable transitionTime; -@property (strong, nonatomic) NSString * _Nullable sceneName; +@property (nonatomic, copy) NSString * _Nullable sceneName; -@property (strong, nonatomic) NSArray * _Nullable extensionFieldSets; +@property (nonatomic, copy) NSArray * _Nullable extensionFieldSets; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -407,16 +407,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterRemoveSceneParams : NSObject +@interface MTRScenesClusterRemoveSceneParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -431,18 +431,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterRemoveSceneResponseParams : NSObject +@interface MTRScenesClusterRemoveSceneResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -457,14 +457,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterRemoveAllScenesParams : NSObject +@interface MTRScenesClusterRemoveAllScenesParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -479,16 +479,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterRemoveAllScenesResponseParams : NSObject +@interface MTRScenesClusterRemoveAllScenesResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -503,16 +503,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterStoreSceneParams : NSObject +@interface MTRScenesClusterStoreSceneParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -527,18 +527,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterStoreSceneResponseParams : NSObject +@interface MTRScenesClusterStoreSceneResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -553,18 +553,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterRecallSceneParams : NSObject +@interface MTRScenesClusterRecallSceneParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; -@property (strong, nonatomic) NSNumber * _Nullable transitionTime; +@property (nonatomic, copy) NSNumber * _Nullable transitionTime; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -579,14 +579,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterGetSceneMembershipParams : NSObject +@interface MTRScenesClusterGetSceneMembershipParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -601,20 +601,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterGetSceneMembershipResponseParams : NSObject +@interface MTRScenesClusterGetSceneMembershipResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nullable capacity; +@property (nonatomic, copy) NSNumber * _Nullable capacity; -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSArray * _Nullable sceneList; +@property (nonatomic, copy) NSArray * _Nullable sceneList; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -629,22 +629,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterEnhancedAddSceneParams : NSObject +@interface MTRScenesClusterEnhancedAddSceneParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSString * _Nonnull sceneName; +@property (nonatomic, copy) NSString * _Nonnull sceneName; -@property (strong, nonatomic) NSArray * _Nonnull extensionFieldSets; +@property (nonatomic, copy) NSArray * _Nonnull extensionFieldSets; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -659,18 +659,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterEnhancedAddSceneResponseParams : NSObject +@interface MTRScenesClusterEnhancedAddSceneResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -685,16 +685,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterEnhancedViewSceneParams : NSObject +@interface MTRScenesClusterEnhancedViewSceneParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -709,24 +709,24 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterEnhancedViewSceneResponseParams : NSObject +@interface MTRScenesClusterEnhancedViewSceneResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull sceneId; +@property (nonatomic, copy) NSNumber * _Nonnull sceneId; -@property (strong, nonatomic) NSNumber * _Nullable transitionTime; +@property (nonatomic, copy) NSNumber * _Nullable transitionTime; -@property (strong, nonatomic) NSString * _Nullable sceneName; +@property (nonatomic, copy) NSString * _Nullable sceneName; -@property (strong, nonatomic) NSArray * _Nullable extensionFieldSets; +@property (nonatomic, copy) NSArray * _Nullable extensionFieldSets; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -741,22 +741,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterCopySceneParams : NSObject +@interface MTRScenesClusterCopySceneParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull mode; +@property (nonatomic, copy) NSNumber * _Nonnull mode; -@property (strong, nonatomic) NSNumber * _Nonnull groupIdFrom; +@property (nonatomic, copy) NSNumber * _Nonnull groupIdFrom; -@property (strong, nonatomic) NSNumber * _Nonnull sceneIdFrom; +@property (nonatomic, copy) NSNumber * _Nonnull sceneIdFrom; -@property (strong, nonatomic) NSNumber * _Nonnull groupIdTo; +@property (nonatomic, copy) NSNumber * _Nonnull groupIdTo; -@property (strong, nonatomic) NSNumber * _Nonnull sceneIdTo; +@property (nonatomic, copy) NSNumber * _Nonnull sceneIdTo; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -771,18 +771,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterCopySceneResponseParams : NSObject +@interface MTRScenesClusterCopySceneResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull groupIdFrom; +@property (nonatomic, copy) NSNumber * _Nonnull groupIdFrom; -@property (strong, nonatomic) NSNumber * _Nonnull sceneIdFrom; +@property (nonatomic, copy) NSNumber * _Nonnull sceneIdFrom; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -797,12 +797,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROnOffClusterOffParams : NSObject +@interface MTROnOffClusterOffParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -817,12 +817,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROnOffClusterOnParams : NSObject +@interface MTROnOffClusterOnParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -837,12 +837,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROnOffClusterToggleParams : NSObject +@interface MTROnOffClusterToggleParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -857,16 +857,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROnOffClusterOffWithEffectParams : NSObject +@interface MTROnOffClusterOffWithEffectParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull effectId; +@property (nonatomic, copy) NSNumber * _Nonnull effectId; -@property (strong, nonatomic) NSNumber * _Nonnull effectVariant; +@property (nonatomic, copy) NSNumber * _Nonnull effectVariant; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -881,12 +881,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROnOffClusterOnWithRecallGlobalSceneParams : NSObject +@interface MTROnOffClusterOnWithRecallGlobalSceneParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -901,18 +901,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROnOffClusterOnWithTimedOffParams : NSObject +@interface MTROnOffClusterOnWithTimedOffParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull onOffControl; +@property (nonatomic, copy) NSNumber * _Nonnull onOffControl; -@property (strong, nonatomic) NSNumber * _Nonnull onTime; +@property (nonatomic, copy) NSNumber * _Nonnull onTime; -@property (strong, nonatomic) NSNumber * _Nonnull offWaitTime; +@property (nonatomic, copy) NSNumber * _Nonnull offWaitTime; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -927,20 +927,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRLevelControlClusterMoveToLevelParams : NSObject +@interface MTRLevelControlClusterMoveToLevelParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull level; +@property (nonatomic, copy) NSNumber * _Nonnull level; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -955,20 +955,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRLevelControlClusterMoveParams : NSObject +@interface MTRLevelControlClusterMoveParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull moveMode; +@property (nonatomic, copy) NSNumber * _Nonnull moveMode; -@property (strong, nonatomic) NSNumber * _Nonnull rate; +@property (nonatomic, copy) NSNumber * _Nonnull rate; -@property (strong, nonatomic) NSNumber * _Nonnull optionMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -983,22 +983,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRLevelControlClusterStepParams : NSObject +@interface MTRLevelControlClusterStepParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull stepMode; +@property (nonatomic, copy) NSNumber * _Nonnull stepMode; -@property (strong, nonatomic) NSNumber * _Nonnull stepSize; +@property (nonatomic, copy) NSNumber * _Nonnull stepSize; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1013,16 +1013,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRLevelControlClusterStopParams : NSObject +@interface MTRLevelControlClusterStopParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull optionMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1037,16 +1037,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRLevelControlClusterMoveToLevelWithOnOffParams : NSObject +@interface MTRLevelControlClusterMoveToLevelWithOnOffParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull level; -@property (strong, nonatomic) NSNumber * _Nonnull level; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1061,16 +1065,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRLevelControlClusterMoveWithOnOffParams : NSObject +@interface MTRLevelControlClusterMoveWithOnOffParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull moveMode; +@property (nonatomic, copy) NSNumber * _Nonnull moveMode; -@property (strong, nonatomic) NSNumber * _Nonnull rate; +@property (nonatomic, copy) NSNumber * _Nonnull rate; + +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1085,18 +1093,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRLevelControlClusterStepWithOnOffParams : NSObject +@interface MTRLevelControlClusterStepWithOnOffParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull stepMode; -@property (strong, nonatomic) NSNumber * _Nonnull stepMode; +@property (nonatomic, copy) NSNumber * _Nonnull stepSize; -@property (strong, nonatomic) NSNumber * _Nonnull stepSize; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1111,12 +1123,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRLevelControlClusterStopWithOnOffParams : NSObject +@interface MTRLevelControlClusterStopWithOnOffParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1131,14 +1147,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRLevelControlClusterMoveToClosestFrequencyParams : NSObject +@interface MTRLevelControlClusterMoveToClosestFrequencyParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull frequency; +@property (nonatomic, copy) NSNumber * _Nonnull frequency; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1153,16 +1169,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterInstantActionParams : NSObject +@interface MTRBridgedActionsClusterInstantActionParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1177,18 +1193,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterInstantActionWithTransitionParams : NSObject +@interface MTRBridgedActionsClusterInstantActionWithTransitionParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1203,16 +1219,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterStartActionParams : NSObject +@interface MTRBridgedActionsClusterStartActionParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1227,18 +1243,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterStartActionWithDurationParams : NSObject +@interface MTRBridgedActionsClusterStartActionWithDurationParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; -@property (strong, nonatomic) NSNumber * _Nonnull duration; +@property (nonatomic, copy) NSNumber * _Nonnull duration; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1253,16 +1269,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterStopActionParams : NSObject +@interface MTRBridgedActionsClusterStopActionParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1277,16 +1293,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterPauseActionParams : NSObject +@interface MTRBridgedActionsClusterPauseActionParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1301,18 +1317,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterPauseActionWithDurationParams : NSObject +@interface MTRBridgedActionsClusterPauseActionWithDurationParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; -@property (strong, nonatomic) NSNumber * _Nonnull duration; +@property (nonatomic, copy) NSNumber * _Nonnull duration; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1327,16 +1343,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterResumeActionParams : NSObject +@interface MTRBridgedActionsClusterResumeActionParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1351,16 +1367,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterEnableActionParams : NSObject +@interface MTRBridgedActionsClusterEnableActionParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1375,18 +1391,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterEnableActionWithDurationParams : NSObject +@interface MTRBridgedActionsClusterEnableActionWithDurationParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; -@property (strong, nonatomic) NSNumber * _Nonnull duration; +@property (nonatomic, copy) NSNumber * _Nonnull duration; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1401,16 +1417,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterDisableActionParams : NSObject +@interface MTRBridgedActionsClusterDisableActionParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1425,18 +1441,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterDisableActionWithDurationParams : NSObject +@interface MTRBridgedActionsClusterDisableActionWithDurationParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nullable invokeID; +@property (nonatomic, copy) NSNumber * _Nullable invokeID; -@property (strong, nonatomic) NSNumber * _Nonnull duration; +@property (nonatomic, copy) NSNumber * _Nonnull duration; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1451,12 +1467,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBasicClusterMfgSpecificPingParams : NSObject +@interface MTRBasicClusterMfgSpecificPingParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1471,28 +1487,28 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROtaSoftwareUpdateProviderClusterQueryImageParams : NSObject +@interface MTROtaSoftwareUpdateProviderClusterQueryImageParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull vendorId; +@property (nonatomic, copy) NSNumber * _Nonnull vendorId; -@property (strong, nonatomic) NSNumber * _Nonnull productId; +@property (nonatomic, copy) NSNumber * _Nonnull productId; -@property (strong, nonatomic) NSNumber * _Nonnull softwareVersion; +@property (nonatomic, copy) NSNumber * _Nonnull softwareVersion; -@property (strong, nonatomic) NSArray * _Nonnull protocolsSupported; +@property (nonatomic, copy) NSArray * _Nonnull protocolsSupported; -@property (strong, nonatomic) NSNumber * _Nullable hardwareVersion; +@property (nonatomic, copy) NSNumber * _Nullable hardwareVersion; -@property (strong, nonatomic) NSString * _Nullable location; +@property (nonatomic, copy) NSString * _Nullable location; -@property (strong, nonatomic) NSNumber * _Nullable requestorCanConsent; +@property (nonatomic, copy) NSNumber * _Nullable requestorCanConsent; -@property (strong, nonatomic) NSData * _Nullable metadataForProvider; +@property (nonatomic, copy) NSData * _Nullable metadataForProvider; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1507,28 +1523,28 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams : NSObject +@interface MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nullable delayedActionTime; +@property (nonatomic, copy) NSNumber * _Nullable delayedActionTime; -@property (strong, nonatomic) NSString * _Nullable imageURI; +@property (nonatomic, copy) NSString * _Nullable imageURI; -@property (strong, nonatomic) NSNumber * _Nullable softwareVersion; +@property (nonatomic, copy) NSNumber * _Nullable softwareVersion; -@property (strong, nonatomic) NSString * _Nullable softwareVersionString; +@property (nonatomic, copy) NSString * _Nullable softwareVersionString; -@property (strong, nonatomic) NSData * _Nullable updateToken; +@property (nonatomic, copy) NSData * _Nullable updateToken; -@property (strong, nonatomic) NSNumber * _Nullable userConsentNeeded; +@property (nonatomic, copy) NSNumber * _Nullable userConsentNeeded; -@property (strong, nonatomic) NSData * _Nullable metadataForRequestor; +@property (nonatomic, copy) NSData * _Nullable metadataForRequestor; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1543,16 +1559,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams : NSObject +@interface MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull updateToken; +@property (nonatomic, copy) NSData * _Nonnull updateToken; -@property (strong, nonatomic, getter=getNewVersion) NSNumber * _Nonnull newVersion; +@property (nonatomic, copy, getter=getNewVersion) NSNumber * _Nonnull newVersion; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1567,16 +1583,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams : NSObject +@interface MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull action; +@property (nonatomic, copy) NSNumber * _Nonnull action; -@property (strong, nonatomic) NSNumber * _Nonnull delayedActionTime; +@property (nonatomic, copy) NSNumber * _Nonnull delayedActionTime; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1591,16 +1607,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams : NSObject +@interface MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull updateToken; +@property (nonatomic, copy) NSData * _Nonnull updateToken; -@property (strong, nonatomic) NSNumber * _Nonnull softwareVersion; +@property (nonatomic, copy) NSNumber * _Nonnull softwareVersion; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1615,22 +1631,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams : NSObject +@interface MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull providerNodeId; +@property (nonatomic, copy) NSNumber * _Nonnull providerNodeId; -@property (strong, nonatomic) NSNumber * _Nonnull vendorId; +@property (nonatomic, copy) NSNumber * _Nonnull vendorId; -@property (strong, nonatomic) NSNumber * _Nonnull announcementReason; +@property (nonatomic, copy) NSNumber * _Nonnull announcementReason; -@property (strong, nonatomic) NSData * _Nullable metadataForNode; +@property (nonatomic, copy) NSData * _Nullable metadataForNode; -@property (strong, nonatomic) NSNumber * _Nonnull endpoint; +@property (nonatomic, copy) NSNumber * _Nonnull endpoint; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1645,16 +1661,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGeneralCommissioningClusterArmFailSafeParams : NSObject +@interface MTRGeneralCommissioningClusterArmFailSafeParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull expiryLengthSeconds; +@property (nonatomic, copy) NSNumber * _Nonnull expiryLengthSeconds; -@property (strong, nonatomic) NSNumber * _Nonnull breadcrumb; +@property (nonatomic, copy) NSNumber * _Nonnull breadcrumb; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1669,16 +1685,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGeneralCommissioningClusterArmFailSafeResponseParams : NSObject +@interface MTRGeneralCommissioningClusterArmFailSafeResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull errorCode; +@property (nonatomic, copy) NSNumber * _Nonnull errorCode; -@property (strong, nonatomic) NSString * _Nonnull debugText; +@property (nonatomic, copy) NSString * _Nonnull debugText; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1693,18 +1709,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGeneralCommissioningClusterSetRegulatoryConfigParams : NSObject +@interface MTRGeneralCommissioningClusterSetRegulatoryConfigParams : NSObject -@property (strong, nonatomic, getter=getNewRegulatoryConfig) NSNumber * _Nonnull newRegulatoryConfig; +@property (nonatomic, copy, getter=getNewRegulatoryConfig) NSNumber * _Nonnull newRegulatoryConfig; -@property (strong, nonatomic) NSString * _Nonnull countryCode; +@property (nonatomic, copy) NSString * _Nonnull countryCode; -@property (strong, nonatomic) NSNumber * _Nonnull breadcrumb; +@property (nonatomic, copy) NSNumber * _Nonnull breadcrumb; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1719,16 +1735,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams : NSObject +@interface MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull errorCode; +@property (nonatomic, copy) NSNumber * _Nonnull errorCode; -@property (strong, nonatomic) NSString * _Nonnull debugText; +@property (nonatomic, copy) NSString * _Nonnull debugText; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1743,12 +1759,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGeneralCommissioningClusterCommissioningCompleteParams : NSObject +@interface MTRGeneralCommissioningClusterCommissioningCompleteParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1763,16 +1779,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGeneralCommissioningClusterCommissioningCompleteResponseParams : NSObject +@interface MTRGeneralCommissioningClusterCommissioningCompleteResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull errorCode; +@property (nonatomic, copy) NSNumber * _Nonnull errorCode; -@property (strong, nonatomic) NSString * _Nonnull debugText; +@property (nonatomic, copy) NSString * _Nonnull debugText; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1787,16 +1803,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterScanNetworksParams : NSObject +@interface MTRNetworkCommissioningClusterScanNetworksParams : NSObject -@property (strong, nonatomic) NSData * _Nullable ssid; +@property (nonatomic, copy) NSData * _Nullable ssid; -@property (strong, nonatomic) NSNumber * _Nullable breadcrumb; +@property (nonatomic, copy) NSNumber * _Nullable breadcrumb; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1811,20 +1827,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterScanNetworksResponseParams : NSObject +@interface MTRNetworkCommissioningClusterScanNetworksResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull networkingStatus; +@property (nonatomic, copy) NSNumber * _Nonnull networkingStatus; -@property (strong, nonatomic) NSString * _Nullable debugText; +@property (nonatomic, copy) NSString * _Nullable debugText; -@property (strong, nonatomic) NSArray * _Nullable wiFiScanResults; +@property (nonatomic, copy) NSArray * _Nullable wiFiScanResults; -@property (strong, nonatomic) NSArray * _Nullable threadScanResults; +@property (nonatomic, copy) NSArray * _Nullable threadScanResults; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1839,18 +1855,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams : NSObject +@interface MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull ssid; +@property (nonatomic, copy) NSData * _Nonnull ssid; -@property (strong, nonatomic) NSData * _Nonnull credentials; +@property (nonatomic, copy) NSData * _Nonnull credentials; -@property (strong, nonatomic) NSNumber * _Nullable breadcrumb; +@property (nonatomic, copy) NSNumber * _Nullable breadcrumb; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1865,16 +1881,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams : NSObject +@interface MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull operationalDataset; +@property (nonatomic, copy) NSData * _Nonnull operationalDataset; -@property (strong, nonatomic) NSNumber * _Nullable breadcrumb; +@property (nonatomic, copy) NSNumber * _Nullable breadcrumb; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1889,16 +1905,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterRemoveNetworkParams : NSObject +@interface MTRNetworkCommissioningClusterRemoveNetworkParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull networkID; +@property (nonatomic, copy) NSData * _Nonnull networkID; -@property (strong, nonatomic) NSNumber * _Nullable breadcrumb; +@property (nonatomic, copy) NSNumber * _Nullable breadcrumb; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1913,18 +1929,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterNetworkConfigResponseParams : NSObject +@interface MTRNetworkCommissioningClusterNetworkConfigResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull networkingStatus; +@property (nonatomic, copy) NSNumber * _Nonnull networkingStatus; -@property (strong, nonatomic) NSString * _Nullable debugText; +@property (nonatomic, copy) NSString * _Nullable debugText; -@property (strong, nonatomic) NSNumber * _Nullable networkIndex; +@property (nonatomic, copy) NSNumber * _Nullable networkIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1939,16 +1955,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterConnectNetworkParams : NSObject +@interface MTRNetworkCommissioningClusterConnectNetworkParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull networkID; +@property (nonatomic, copy) NSData * _Nonnull networkID; -@property (strong, nonatomic) NSNumber * _Nullable breadcrumb; +@property (nonatomic, copy) NSNumber * _Nullable breadcrumb; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1963,18 +1979,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterConnectNetworkResponseParams : NSObject +@interface MTRNetworkCommissioningClusterConnectNetworkResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull networkingStatus; +@property (nonatomic, copy) NSNumber * _Nonnull networkingStatus; -@property (strong, nonatomic) NSString * _Nullable debugText; +@property (nonatomic, copy) NSString * _Nullable debugText; -@property (strong, nonatomic) NSNumber * _Nullable errorValue; +@property (nonatomic, copy) NSNumber * _Nullable errorValue; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1989,18 +2005,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterReorderNetworkParams : NSObject +@interface MTRNetworkCommissioningClusterReorderNetworkParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull networkID; +@property (nonatomic, copy) NSData * _Nonnull networkID; -@property (strong, nonatomic) NSNumber * _Nonnull networkIndex; +@property (nonatomic, copy) NSNumber * _Nonnull networkIndex; -@property (strong, nonatomic) NSNumber * _Nullable breadcrumb; +@property (nonatomic, copy) NSNumber * _Nullable breadcrumb; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2015,18 +2031,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDiagnosticLogsClusterRetrieveLogsRequestParams : NSObject +@interface MTRDiagnosticLogsClusterRetrieveLogsRequestParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull intent; +@property (nonatomic, copy) NSNumber * _Nonnull intent; -@property (strong, nonatomic) NSNumber * _Nonnull requestedProtocol; +@property (nonatomic, copy) NSNumber * _Nonnull requestedProtocol; -@property (strong, nonatomic) NSData * _Nonnull transferFileDesignator; +@property (nonatomic, copy) NSData * _Nonnull transferFileDesignator; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2041,20 +2057,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDiagnosticLogsClusterRetrieveLogsResponseParams : NSObject +@interface MTRDiagnosticLogsClusterRetrieveLogsResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSData * _Nonnull content; +@property (nonatomic, copy) NSData * _Nonnull content; -@property (strong, nonatomic) NSNumber * _Nonnull timeStamp; +@property (nonatomic, copy) NSNumber * _Nonnull timeStamp; -@property (strong, nonatomic) NSNumber * _Nonnull timeSinceBoot; +@property (nonatomic, copy) NSNumber * _Nonnull timeSinceBoot; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2069,16 +2085,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGeneralDiagnosticsClusterTestEventTriggerParams : NSObject +@interface MTRGeneralDiagnosticsClusterTestEventTriggerParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull enableKey; +@property (nonatomic, copy) NSData * _Nonnull enableKey; -@property (strong, nonatomic) NSNumber * _Nonnull eventTrigger; +@property (nonatomic, copy) NSNumber * _Nonnull eventTrigger; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2093,12 +2109,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRSoftwareDiagnosticsClusterResetWatermarksParams : NSObject +@interface MTRSoftwareDiagnosticsClusterResetWatermarksParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2113,12 +2129,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRThreadNetworkDiagnosticsClusterResetCountsParams : NSObject +@interface MTRThreadNetworkDiagnosticsClusterResetCountsParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2133,12 +2149,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRWiFiNetworkDiagnosticsClusterResetCountsParams : NSObject +@interface MTRWiFiNetworkDiagnosticsClusterResetCountsParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2153,12 +2169,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTREthernetNetworkDiagnosticsClusterResetCountsParams : NSObject +@interface MTREthernetNetworkDiagnosticsClusterResetCountsParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2173,22 +2189,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAdministratorCommissioningClusterOpenCommissioningWindowParams : NSObject +@interface MTRAdministratorCommissioningClusterOpenCommissioningWindowParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull commissioningTimeout; +@property (nonatomic, copy) NSNumber * _Nonnull commissioningTimeout; -@property (strong, nonatomic) NSData * _Nonnull pakeVerifier; +@property (nonatomic, copy) NSData * _Nonnull pakeVerifier; -@property (strong, nonatomic) NSNumber * _Nonnull discriminator; +@property (nonatomic, copy) NSNumber * _Nonnull discriminator; -@property (strong, nonatomic) NSNumber * _Nonnull iterations; +@property (nonatomic, copy) NSNumber * _Nonnull iterations; -@property (strong, nonatomic) NSData * _Nonnull salt; +@property (nonatomic, copy) NSData * _Nonnull salt; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2203,14 +2219,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams : NSObject +@interface MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull commissioningTimeout; +@property (nonatomic, copy) NSNumber * _Nonnull commissioningTimeout; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2225,12 +2241,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAdministratorCommissioningClusterRevokeCommissioningParams : NSObject +@interface MTRAdministratorCommissioningClusterRevokeCommissioningParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2245,14 +2261,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterAttestationRequestParams : NSObject +@interface MTROperationalCredentialsClusterAttestationRequestParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull attestationNonce; +@property (nonatomic, copy) NSData * _Nonnull attestationNonce; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2267,16 +2283,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterAttestationResponseParams : NSObject +@interface MTROperationalCredentialsClusterAttestationResponseParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull attestationElements; +@property (nonatomic, copy) NSData * _Nonnull attestationElements; -@property (strong, nonatomic) NSData * _Nonnull signature; +@property (nonatomic, copy) NSData * _Nonnull signature; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2291,14 +2307,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterCertificateChainRequestParams : NSObject +@interface MTROperationalCredentialsClusterCertificateChainRequestParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull certificateType; +@property (nonatomic, copy) NSNumber * _Nonnull certificateType; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2313,14 +2329,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterCertificateChainResponseParams : NSObject +@interface MTROperationalCredentialsClusterCertificateChainResponseParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull certificate; +@property (nonatomic, copy) NSData * _Nonnull certificate; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2335,16 +2351,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterCSRRequestParams : NSObject +@interface MTROperationalCredentialsClusterCSRRequestParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull csrNonce; +@property (nonatomic, copy) NSData * _Nonnull csrNonce; -@property (strong, nonatomic) NSNumber * _Nullable isForUpdateNOC; +@property (nonatomic, copy) NSNumber * _Nullable isForUpdateNOC; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2359,16 +2375,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterCSRResponseParams : NSObject +@interface MTROperationalCredentialsClusterCSRResponseParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull nocsrElements; +@property (nonatomic, copy) NSData * _Nonnull nocsrElements; -@property (strong, nonatomic) NSData * _Nonnull attestationSignature; +@property (nonatomic, copy) NSData * _Nonnull attestationSignature; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2383,22 +2399,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterAddNOCParams : NSObject +@interface MTROperationalCredentialsClusterAddNOCParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull nocValue; +@property (nonatomic, copy) NSData * _Nonnull nocValue; -@property (strong, nonatomic) NSData * _Nullable icacValue; +@property (nonatomic, copy) NSData * _Nullable icacValue; -@property (strong, nonatomic) NSData * _Nonnull ipkValue; +@property (nonatomic, copy) NSData * _Nonnull ipkValue; -@property (strong, nonatomic) NSNumber * _Nonnull caseAdminSubject; +@property (nonatomic, copy) NSNumber * _Nonnull caseAdminSubject; -@property (strong, nonatomic) NSNumber * _Nonnull adminVendorId; +@property (nonatomic, copy) NSNumber * _Nonnull adminVendorId; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2413,16 +2429,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterUpdateNOCParams : NSObject +@interface MTROperationalCredentialsClusterUpdateNOCParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull nocValue; +@property (nonatomic, copy) NSData * _Nonnull nocValue; -@property (strong, nonatomic) NSData * _Nullable icacValue; +@property (nonatomic, copy) NSData * _Nullable icacValue; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2437,18 +2453,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterNOCResponseParams : NSObject +@interface MTROperationalCredentialsClusterNOCResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull statusCode; +@property (nonatomic, copy) NSNumber * _Nonnull statusCode; -@property (strong, nonatomic) NSNumber * _Nullable fabricIndex; +@property (nonatomic, copy) NSNumber * _Nullable fabricIndex; -@property (strong, nonatomic) NSString * _Nullable debugText; +@property (nonatomic, copy) NSString * _Nullable debugText; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2463,14 +2479,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterUpdateFabricLabelParams : NSObject +@interface MTROperationalCredentialsClusterUpdateFabricLabelParams : NSObject -@property (strong, nonatomic) NSString * _Nonnull label; +@property (nonatomic, copy) NSString * _Nonnull label; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2485,14 +2501,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterRemoveFabricParams : NSObject +@interface MTROperationalCredentialsClusterRemoveFabricParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull fabricIndex; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2507,14 +2523,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterAddTrustedRootCertificateParams : NSObject +@interface MTROperationalCredentialsClusterAddTrustedRootCertificateParams : NSObject -@property (strong, nonatomic) NSData * _Nonnull rootCertificate; +@property (nonatomic, copy) NSData * _Nonnull rootCertificate; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2529,14 +2545,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupKeyManagementClusterKeySetWriteParams : NSObject +@interface MTRGroupKeyManagementClusterKeySetWriteParams : NSObject -@property (strong, nonatomic) MTRGroupKeyManagementClusterGroupKeySetStruct * _Nonnull groupKeySet; +@property (nonatomic, copy) MTRGroupKeyManagementClusterGroupKeySetStruct * _Nonnull groupKeySet; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2551,14 +2567,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupKeyManagementClusterKeySetReadParams : NSObject +@interface MTRGroupKeyManagementClusterKeySetReadParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupKeySetID; +@property (nonatomic, copy) NSNumber * _Nonnull groupKeySetID; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2573,14 +2589,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupKeyManagementClusterKeySetReadResponseParams : NSObject +@interface MTRGroupKeyManagementClusterKeySetReadResponseParams : NSObject -@property (strong, nonatomic) MTRGroupKeyManagementClusterGroupKeySetStruct * _Nonnull groupKeySet; +@property (nonatomic, copy) MTRGroupKeyManagementClusterGroupKeySetStruct * _Nonnull groupKeySet; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2595,14 +2611,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupKeyManagementClusterKeySetRemoveParams : NSObject +@interface MTRGroupKeyManagementClusterKeySetRemoveParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupKeySetID; +@property (nonatomic, copy) NSNumber * _Nonnull groupKeySetID; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2617,14 +2633,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupKeyManagementClusterKeySetReadAllIndicesParams : NSObject +@interface MTRGroupKeyManagementClusterKeySetReadAllIndicesParams : NSObject -@property (strong, nonatomic) NSArray * _Nonnull groupKeySetIDs; +@property (nonatomic, copy) NSArray * _Nonnull groupKeySetIDs; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2639,14 +2655,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams : NSObject +@interface MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams : NSObject -@property (strong, nonatomic) NSArray * _Nonnull groupKeySetIDs; +@property (nonatomic, copy) NSArray * _Nonnull groupKeySetIDs; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2661,14 +2677,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRModeSelectClusterChangeToModeParams : NSObject +@interface MTRModeSelectClusterChangeToModeParams : NSObject -@property (strong, nonatomic, getter=getNewMode) NSNumber * _Nonnull newMode; +@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2683,14 +2699,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterLockDoorParams : NSObject +@interface MTRDoorLockClusterLockDoorParams : NSObject -@property (strong, nonatomic) NSData * _Nullable pinCode; +@property (nonatomic, copy) NSData * _Nullable pinCode; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2705,14 +2721,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterUnlockDoorParams : NSObject +@interface MTRDoorLockClusterUnlockDoorParams : NSObject -@property (strong, nonatomic) NSData * _Nullable pinCode; +@property (nonatomic, copy) NSData * _Nullable pinCode; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2727,16 +2743,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterUnlockWithTimeoutParams : NSObject +@interface MTRDoorLockClusterUnlockWithTimeoutParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull timeout; +@property (nonatomic, copy) NSNumber * _Nonnull timeout; -@property (strong, nonatomic) NSData * _Nullable pinCode; +@property (nonatomic, copy) NSData * _Nullable pinCode; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2751,26 +2767,26 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterSetWeekDayScheduleParams : NSObject +@interface MTRDoorLockClusterSetWeekDayScheduleParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull weekDayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull weekDayIndex; -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; -@property (strong, nonatomic) NSNumber * _Nonnull daysMask; +@property (nonatomic, copy) NSNumber * _Nonnull daysMask; -@property (strong, nonatomic) NSNumber * _Nonnull startHour; +@property (nonatomic, copy) NSNumber * _Nonnull startHour; -@property (strong, nonatomic) NSNumber * _Nonnull startMinute; +@property (nonatomic, copy) NSNumber * _Nonnull startMinute; -@property (strong, nonatomic) NSNumber * _Nonnull endHour; +@property (nonatomic, copy) NSNumber * _Nonnull endHour; -@property (strong, nonatomic) NSNumber * _Nonnull endMinute; +@property (nonatomic, copy) NSNumber * _Nonnull endMinute; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2785,16 +2801,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterGetWeekDayScheduleParams : NSObject +@interface MTRDoorLockClusterGetWeekDayScheduleParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull weekDayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull weekDayIndex; -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2809,28 +2825,28 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterGetWeekDayScheduleResponseParams : NSObject +@interface MTRDoorLockClusterGetWeekDayScheduleResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull weekDayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull weekDayIndex; -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nullable daysMask; +@property (nonatomic, copy) NSNumber * _Nullable daysMask; -@property (strong, nonatomic) NSNumber * _Nullable startHour; +@property (nonatomic, copy) NSNumber * _Nullable startHour; -@property (strong, nonatomic) NSNumber * _Nullable startMinute; +@property (nonatomic, copy) NSNumber * _Nullable startMinute; -@property (strong, nonatomic) NSNumber * _Nullable endHour; +@property (nonatomic, copy) NSNumber * _Nullable endHour; -@property (strong, nonatomic) NSNumber * _Nullable endMinute; +@property (nonatomic, copy) NSNumber * _Nullable endMinute; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2845,16 +2861,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterClearWeekDayScheduleParams : NSObject +@interface MTRDoorLockClusterClearWeekDayScheduleParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull weekDayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull weekDayIndex; -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2869,20 +2885,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterSetYearDayScheduleParams : NSObject +@interface MTRDoorLockClusterSetYearDayScheduleParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull yearDayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull yearDayIndex; -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; -@property (strong, nonatomic) NSNumber * _Nonnull localStartTime; +@property (nonatomic, copy) NSNumber * _Nonnull localStartTime; -@property (strong, nonatomic) NSNumber * _Nonnull localEndTime; +@property (nonatomic, copy) NSNumber * _Nonnull localEndTime; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2897,16 +2913,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterGetYearDayScheduleParams : NSObject +@interface MTRDoorLockClusterGetYearDayScheduleParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull yearDayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull yearDayIndex; -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2921,22 +2937,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterGetYearDayScheduleResponseParams : NSObject +@interface MTRDoorLockClusterGetYearDayScheduleResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull yearDayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull yearDayIndex; -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nullable localStartTime; +@property (nonatomic, copy) NSNumber * _Nullable localStartTime; -@property (strong, nonatomic) NSNumber * _Nullable localEndTime; +@property (nonatomic, copy) NSNumber * _Nullable localEndTime; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2951,16 +2967,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterClearYearDayScheduleParams : NSObject +@interface MTRDoorLockClusterClearYearDayScheduleParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull yearDayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull yearDayIndex; -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2975,20 +2991,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterSetHolidayScheduleParams : NSObject +@interface MTRDoorLockClusterSetHolidayScheduleParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull holidayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull holidayIndex; -@property (strong, nonatomic) NSNumber * _Nonnull localStartTime; +@property (nonatomic, copy) NSNumber * _Nonnull localStartTime; -@property (strong, nonatomic) NSNumber * _Nonnull localEndTime; +@property (nonatomic, copy) NSNumber * _Nonnull localEndTime; -@property (strong, nonatomic) NSNumber * _Nonnull operatingMode; +@property (nonatomic, copy) NSNumber * _Nonnull operatingMode; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3003,14 +3019,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterGetHolidayScheduleParams : NSObject +@interface MTRDoorLockClusterGetHolidayScheduleParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull holidayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull holidayIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3025,22 +3041,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterGetHolidayScheduleResponseParams : NSObject +@interface MTRDoorLockClusterGetHolidayScheduleResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull holidayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull holidayIndex; -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nullable localStartTime; +@property (nonatomic, copy) NSNumber * _Nullable localStartTime; -@property (strong, nonatomic) NSNumber * _Nullable localEndTime; +@property (nonatomic, copy) NSNumber * _Nullable localEndTime; -@property (strong, nonatomic) NSNumber * _Nullable operatingMode; +@property (nonatomic, copy) NSNumber * _Nullable operatingMode; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3055,14 +3071,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterClearHolidayScheduleParams : NSObject +@interface MTRDoorLockClusterClearHolidayScheduleParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull holidayIndex; +@property (nonatomic, copy) NSNumber * _Nonnull holidayIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3077,26 +3093,26 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterSetUserParams : NSObject +@interface MTRDoorLockClusterSetUserParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull operationType; +@property (nonatomic, copy) NSNumber * _Nonnull operationType; -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; -@property (strong, nonatomic) NSString * _Nullable userName; +@property (nonatomic, copy) NSString * _Nullable userName; -@property (strong, nonatomic) NSNumber * _Nullable userUniqueId; +@property (nonatomic, copy) NSNumber * _Nullable userUniqueId; -@property (strong, nonatomic) NSNumber * _Nullable userStatus; +@property (nonatomic, copy) NSNumber * _Nullable userStatus; -@property (strong, nonatomic) NSNumber * _Nullable userType; +@property (nonatomic, copy) NSNumber * _Nullable userType; -@property (strong, nonatomic) NSNumber * _Nullable credentialRule; +@property (nonatomic, copy) NSNumber * _Nullable credentialRule; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3111,14 +3127,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterGetUserParams : NSObject +@interface MTRDoorLockClusterGetUserParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3133,32 +3149,32 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterGetUserResponseParams : NSObject +@interface MTRDoorLockClusterGetUserResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; -@property (strong, nonatomic) NSString * _Nullable userName; +@property (nonatomic, copy) NSString * _Nullable userName; -@property (strong, nonatomic) NSNumber * _Nullable userUniqueId; +@property (nonatomic, copy) NSNumber * _Nullable userUniqueId; -@property (strong, nonatomic) NSNumber * _Nullable userStatus; +@property (nonatomic, copy) NSNumber * _Nullable userStatus; -@property (strong, nonatomic) NSNumber * _Nullable userType; +@property (nonatomic, copy) NSNumber * _Nullable userType; -@property (strong, nonatomic) NSNumber * _Nullable credentialRule; +@property (nonatomic, copy) NSNumber * _Nullable credentialRule; -@property (strong, nonatomic) NSArray * _Nullable credentials; +@property (nonatomic, copy) NSArray * _Nullable credentials; -@property (strong, nonatomic) NSNumber * _Nullable creatorFabricIndex; +@property (nonatomic, copy) NSNumber * _Nullable creatorFabricIndex; -@property (strong, nonatomic) NSNumber * _Nullable lastModifiedFabricIndex; +@property (nonatomic, copy) NSNumber * _Nullable lastModifiedFabricIndex; -@property (strong, nonatomic) NSNumber * _Nullable nextUserIndex; +@property (nonatomic, copy) NSNumber * _Nullable nextUserIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3173,14 +3189,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterClearUserParams : NSObject +@interface MTRDoorLockClusterClearUserParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull userIndex; +@property (nonatomic, copy) NSNumber * _Nonnull userIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3195,24 +3211,24 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterSetCredentialParams : NSObject +@interface MTRDoorLockClusterSetCredentialParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull operationType; +@property (nonatomic, copy) NSNumber * _Nonnull operationType; -@property (strong, nonatomic) MTRDoorLockClusterDlCredential * _Nonnull credential; +@property (nonatomic, copy) MTRDoorLockClusterDlCredential * _Nonnull credential; -@property (strong, nonatomic) NSData * _Nonnull credentialData; +@property (nonatomic, copy) NSData * _Nonnull credentialData; -@property (strong, nonatomic) NSNumber * _Nullable userIndex; +@property (nonatomic, copy) NSNumber * _Nullable userIndex; -@property (strong, nonatomic) NSNumber * _Nullable userStatus; +@property (nonatomic, copy) NSNumber * _Nullable userStatus; -@property (strong, nonatomic) NSNumber * _Nullable userType; +@property (nonatomic, copy) NSNumber * _Nullable userType; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3227,18 +3243,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterSetCredentialResponseParams : NSObject +@interface MTRDoorLockClusterSetCredentialResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nullable userIndex; +@property (nonatomic, copy) NSNumber * _Nullable userIndex; -@property (strong, nonatomic) NSNumber * _Nullable nextCredentialIndex; +@property (nonatomic, copy) NSNumber * _Nullable nextCredentialIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3253,14 +3269,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterGetCredentialStatusParams : NSObject +@interface MTRDoorLockClusterGetCredentialStatusParams : NSObject -@property (strong, nonatomic) MTRDoorLockClusterDlCredential * _Nonnull credential; +@property (nonatomic, copy) MTRDoorLockClusterDlCredential * _Nonnull credential; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3275,22 +3291,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterGetCredentialStatusResponseParams : NSObject +@interface MTRDoorLockClusterGetCredentialStatusResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull credentialExists; +@property (nonatomic, copy) NSNumber * _Nonnull credentialExists; -@property (strong, nonatomic) NSNumber * _Nullable userIndex; +@property (nonatomic, copy) NSNumber * _Nullable userIndex; -@property (strong, nonatomic) NSNumber * _Nullable creatorFabricIndex; +@property (nonatomic, copy) NSNumber * _Nullable creatorFabricIndex; -@property (strong, nonatomic) NSNumber * _Nullable lastModifiedFabricIndex; +@property (nonatomic, copy) NSNumber * _Nullable lastModifiedFabricIndex; -@property (strong, nonatomic) NSNumber * _Nullable nextCredentialIndex; +@property (nonatomic, copy) NSNumber * _Nullable nextCredentialIndex; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3305,14 +3321,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterClearCredentialParams : NSObject +@interface MTRDoorLockClusterClearCredentialParams : NSObject -@property (strong, nonatomic) MTRDoorLockClusterDlCredential * _Nullable credential; +@property (nonatomic, copy) MTRDoorLockClusterDlCredential * _Nullable credential; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3327,12 +3343,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRWindowCoveringClusterUpOrOpenParams : NSObject +@interface MTRWindowCoveringClusterUpOrOpenParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3347,12 +3363,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRWindowCoveringClusterDownOrCloseParams : NSObject +@interface MTRWindowCoveringClusterDownOrCloseParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3367,12 +3383,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRWindowCoveringClusterStopMotionParams : NSObject +@interface MTRWindowCoveringClusterStopMotionParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3387,14 +3403,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRWindowCoveringClusterGoToLiftValueParams : NSObject +@interface MTRWindowCoveringClusterGoToLiftValueParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull liftValue; +@property (nonatomic, copy) NSNumber * _Nonnull liftValue; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3409,14 +3425,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRWindowCoveringClusterGoToLiftPercentageParams : NSObject +@interface MTRWindowCoveringClusterGoToLiftPercentageParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull liftPercent100thsValue; +@property (nonatomic, copy) NSNumber * _Nonnull liftPercent100thsValue; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3431,14 +3447,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRWindowCoveringClusterGoToTiltValueParams : NSObject +@interface MTRWindowCoveringClusterGoToTiltValueParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull tiltValue; +@property (nonatomic, copy) NSNumber * _Nonnull tiltValue; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3453,14 +3469,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRWindowCoveringClusterGoToTiltPercentageParams : NSObject +@interface MTRWindowCoveringClusterGoToTiltPercentageParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull tiltPercent100thsValue; +@property (nonatomic, copy) NSNumber * _Nonnull tiltPercent100thsValue; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3475,14 +3491,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBarrierControlClusterBarrierControlGoToPercentParams : NSObject +@interface MTRBarrierControlClusterBarrierControlGoToPercentParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull percentOpen; +@property (nonatomic, copy) NSNumber * _Nonnull percentOpen; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3497,12 +3513,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBarrierControlClusterBarrierControlStopParams : NSObject +@interface MTRBarrierControlClusterBarrierControlStopParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3517,16 +3533,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRThermostatClusterSetpointRaiseLowerParams : NSObject +@interface MTRThermostatClusterSetpointRaiseLowerParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull mode; +@property (nonatomic, copy) NSNumber * _Nonnull mode; -@property (strong, nonatomic) NSNumber * _Nonnull amount; +@property (nonatomic, copy) NSNumber * _Nonnull amount; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3541,20 +3557,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRThermostatClusterGetWeeklyScheduleResponseParams : NSObject +@interface MTRThermostatClusterGetWeeklyScheduleResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull numberOfTransitionsForSequence; +@property (nonatomic, copy) NSNumber * _Nonnull numberOfTransitionsForSequence; -@property (strong, nonatomic) NSNumber * _Nonnull dayOfWeekForSequence; +@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekForSequence; -@property (strong, nonatomic) NSNumber * _Nonnull modeForSequence; +@property (nonatomic, copy) NSNumber * _Nonnull modeForSequence; -@property (strong, nonatomic) NSArray * _Nonnull transitions; +@property (nonatomic, copy) NSArray * _Nonnull transitions; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3569,20 +3585,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRThermostatClusterSetWeeklyScheduleParams : NSObject +@interface MTRThermostatClusterSetWeeklyScheduleParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull numberOfTransitionsForSequence; +@property (nonatomic, copy) NSNumber * _Nonnull numberOfTransitionsForSequence; -@property (strong, nonatomic) NSNumber * _Nonnull dayOfWeekForSequence; +@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekForSequence; -@property (strong, nonatomic) NSNumber * _Nonnull modeForSequence; +@property (nonatomic, copy) NSNumber * _Nonnull modeForSequence; -@property (strong, nonatomic) NSArray * _Nonnull transitions; +@property (nonatomic, copy) NSArray * _Nonnull transitions; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3597,16 +3613,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRThermostatClusterGetWeeklyScheduleParams : NSObject +@interface MTRThermostatClusterGetWeeklyScheduleParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull daysToReturn; +@property (nonatomic, copy) NSNumber * _Nonnull daysToReturn; -@property (strong, nonatomic) NSNumber * _Nonnull modeToReturn; +@property (nonatomic, copy) NSNumber * _Nonnull modeToReturn; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3621,12 +3637,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRThermostatClusterClearWeeklyScheduleParams : NSObject +@interface MTRThermostatClusterClearWeeklyScheduleParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3641,22 +3657,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterMoveToHueParams : NSObject +@interface MTRColorControlClusterMoveToHueParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull hue; +@property (nonatomic, copy) NSNumber * _Nonnull hue; -@property (strong, nonatomic) NSNumber * _Nonnull direction; +@property (nonatomic, copy) NSNumber * _Nonnull direction; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3671,20 +3687,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterMoveHueParams : NSObject +@interface MTRColorControlClusterMoveHueParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull moveMode; +@property (nonatomic, copy) NSNumber * _Nonnull moveMode; -@property (strong, nonatomic) NSNumber * _Nonnull rate; +@property (nonatomic, copy) NSNumber * _Nonnull rate; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3699,22 +3715,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterStepHueParams : NSObject +@interface MTRColorControlClusterStepHueParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull stepMode; +@property (nonatomic, copy) NSNumber * _Nonnull stepMode; -@property (strong, nonatomic) NSNumber * _Nonnull stepSize; +@property (nonatomic, copy) NSNumber * _Nonnull stepSize; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3729,20 +3745,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterMoveToSaturationParams : NSObject +@interface MTRColorControlClusterMoveToSaturationParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull saturation; +@property (nonatomic, copy) NSNumber * _Nonnull saturation; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3757,20 +3773,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterMoveSaturationParams : NSObject +@interface MTRColorControlClusterMoveSaturationParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull moveMode; +@property (nonatomic, copy) NSNumber * _Nonnull moveMode; -@property (strong, nonatomic) NSNumber * _Nonnull rate; +@property (nonatomic, copy) NSNumber * _Nonnull rate; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3785,22 +3801,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterStepSaturationParams : NSObject +@interface MTRColorControlClusterStepSaturationParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull stepMode; +@property (nonatomic, copy) NSNumber * _Nonnull stepMode; -@property (strong, nonatomic) NSNumber * _Nonnull stepSize; +@property (nonatomic, copy) NSNumber * _Nonnull stepSize; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3815,22 +3831,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterMoveToHueAndSaturationParams : NSObject +@interface MTRColorControlClusterMoveToHueAndSaturationParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull hue; +@property (nonatomic, copy) NSNumber * _Nonnull hue; -@property (strong, nonatomic) NSNumber * _Nonnull saturation; +@property (nonatomic, copy) NSNumber * _Nonnull saturation; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3845,22 +3861,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterMoveToColorParams : NSObject +@interface MTRColorControlClusterMoveToColorParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull colorX; +@property (nonatomic, copy) NSNumber * _Nonnull colorX; -@property (strong, nonatomic) NSNumber * _Nonnull colorY; +@property (nonatomic, copy) NSNumber * _Nonnull colorY; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3875,20 +3891,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterMoveColorParams : NSObject +@interface MTRColorControlClusterMoveColorParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull rateX; +@property (nonatomic, copy) NSNumber * _Nonnull rateX; -@property (strong, nonatomic) NSNumber * _Nonnull rateY; +@property (nonatomic, copy) NSNumber * _Nonnull rateY; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3903,22 +3919,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterStepColorParams : NSObject +@interface MTRColorControlClusterStepColorParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull stepX; +@property (nonatomic, copy) NSNumber * _Nonnull stepX; -@property (strong, nonatomic) NSNumber * _Nonnull stepY; +@property (nonatomic, copy) NSNumber * _Nonnull stepY; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3933,20 +3949,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterMoveToColorTemperatureParams : NSObject +@interface MTRColorControlClusterMoveToColorTemperatureParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull colorTemperature; +@property (nonatomic, copy) NSNumber * _Nonnull colorTemperature; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3961,22 +3977,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterEnhancedMoveToHueParams : NSObject +@interface MTRColorControlClusterEnhancedMoveToHueParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull enhancedHue; +@property (nonatomic, copy) NSNumber * _Nonnull enhancedHue; -@property (strong, nonatomic) NSNumber * _Nonnull direction; +@property (nonatomic, copy) NSNumber * _Nonnull direction; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3991,20 +4007,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterEnhancedMoveHueParams : NSObject +@interface MTRColorControlClusterEnhancedMoveHueParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull moveMode; +@property (nonatomic, copy) NSNumber * _Nonnull moveMode; -@property (strong, nonatomic) NSNumber * _Nonnull rate; +@property (nonatomic, copy) NSNumber * _Nonnull rate; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4019,22 +4035,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterEnhancedStepHueParams : NSObject +@interface MTRColorControlClusterEnhancedStepHueParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull stepMode; +@property (nonatomic, copy) NSNumber * _Nonnull stepMode; -@property (strong, nonatomic) NSNumber * _Nonnull stepSize; +@property (nonatomic, copy) NSNumber * _Nonnull stepSize; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4049,22 +4065,22 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterEnhancedMoveToHueAndSaturationParams : NSObject +@interface MTRColorControlClusterEnhancedMoveToHueAndSaturationParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull enhancedHue; +@property (nonatomic, copy) NSNumber * _Nonnull enhancedHue; -@property (strong, nonatomic) NSNumber * _Nonnull saturation; +@property (nonatomic, copy) NSNumber * _Nonnull saturation; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4079,26 +4095,26 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterColorLoopSetParams : NSObject +@interface MTRColorControlClusterColorLoopSetParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull updateFlags; +@property (nonatomic, copy) NSNumber * _Nonnull updateFlags; -@property (strong, nonatomic) NSNumber * _Nonnull action; +@property (nonatomic, copy) NSNumber * _Nonnull action; -@property (strong, nonatomic) NSNumber * _Nonnull direction; +@property (nonatomic, copy) NSNumber * _Nonnull direction; -@property (strong, nonatomic) NSNumber * _Nonnull time; +@property (nonatomic, copy) NSNumber * _Nonnull time; -@property (strong, nonatomic) NSNumber * _Nonnull startHue; +@property (nonatomic, copy) NSNumber * _Nonnull startHue; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4113,16 +4129,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterStopMoveStepParams : NSObject +@interface MTRColorControlClusterStopMoveStepParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4137,24 +4153,24 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterMoveColorTemperatureParams : NSObject +@interface MTRColorControlClusterMoveColorTemperatureParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull moveMode; +@property (nonatomic, copy) NSNumber * _Nonnull moveMode; -@property (strong, nonatomic) NSNumber * _Nonnull rate; +@property (nonatomic, copy) NSNumber * _Nonnull rate; -@property (strong, nonatomic) NSNumber * _Nonnull colorTemperatureMinimumMireds; +@property (nonatomic, copy) NSNumber * _Nonnull colorTemperatureMinimumMireds; -@property (strong, nonatomic) NSNumber * _Nonnull colorTemperatureMaximumMireds; +@property (nonatomic, copy) NSNumber * _Nonnull colorTemperatureMaximumMireds; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4169,26 +4185,26 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRColorControlClusterStepColorTemperatureParams : NSObject +@interface MTRColorControlClusterStepColorTemperatureParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull stepMode; +@property (nonatomic, copy) NSNumber * _Nonnull stepMode; -@property (strong, nonatomic) NSNumber * _Nonnull stepSize; +@property (nonatomic, copy) NSNumber * _Nonnull stepSize; -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nonnull colorTemperatureMinimumMireds; +@property (nonatomic, copy) NSNumber * _Nonnull colorTemperatureMinimumMireds; -@property (strong, nonatomic) NSNumber * _Nonnull colorTemperatureMaximumMireds; +@property (nonatomic, copy) NSNumber * _Nonnull colorTemperatureMaximumMireds; -@property (strong, nonatomic) NSNumber * _Nonnull optionsMask; +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask; -@property (strong, nonatomic) NSNumber * _Nonnull optionsOverride; +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4203,14 +4219,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRChannelClusterChangeChannelParams : NSObject +@interface MTRChannelClusterChangeChannelParams : NSObject -@property (strong, nonatomic) NSString * _Nonnull match; +@property (nonatomic, copy) NSString * _Nonnull match; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4225,16 +4241,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRChannelClusterChangeChannelResponseParams : NSObject +@interface MTRChannelClusterChangeChannelResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSString * _Nullable data; +@property (nonatomic, copy) NSString * _Nullable data; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4249,16 +4265,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRChannelClusterChangeChannelByNumberParams : NSObject +@interface MTRChannelClusterChangeChannelByNumberParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull majorNumber; +@property (nonatomic, copy) NSNumber * _Nonnull majorNumber; -@property (strong, nonatomic) NSNumber * _Nonnull minorNumber; +@property (nonatomic, copy) NSNumber * _Nonnull minorNumber; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4273,14 +4289,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRChannelClusterSkipChannelParams : NSObject +@interface MTRChannelClusterSkipChannelParams : NSObject -@property (strong, nonatomic, getter=getCount) NSNumber * _Nonnull count; +@property (nonatomic, copy, getter=getCount) NSNumber * _Nonnull count; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4295,16 +4311,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTargetNavigatorClusterNavigateTargetParams : NSObject +@interface MTRTargetNavigatorClusterNavigateTargetParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull target; +@property (nonatomic, copy) NSNumber * _Nonnull target; -@property (strong, nonatomic) NSString * _Nullable data; +@property (nonatomic, copy) NSString * _Nullable data; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4319,16 +4335,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTargetNavigatorClusterNavigateTargetResponseParams : NSObject +@interface MTRTargetNavigatorClusterNavigateTargetResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSString * _Nullable data; +@property (nonatomic, copy) NSString * _Nullable data; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4343,12 +4359,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterPlayParams : NSObject +@interface MTRMediaPlaybackClusterPlayParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4363,12 +4379,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterPauseParams : NSObject +@interface MTRMediaPlaybackClusterPauseParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4383,12 +4399,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterStopPlaybackParams : NSObject +@interface MTRMediaPlaybackClusterStopPlaybackParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4403,12 +4419,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterStartOverParams : NSObject +@interface MTRMediaPlaybackClusterStartOverParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4423,12 +4439,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterPreviousParams : NSObject +@interface MTRMediaPlaybackClusterPreviousParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4443,12 +4459,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterNextParams : NSObject +@interface MTRMediaPlaybackClusterNextParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4463,12 +4479,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterRewindParams : NSObject +@interface MTRMediaPlaybackClusterRewindParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4483,12 +4499,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterFastForwardParams : NSObject +@interface MTRMediaPlaybackClusterFastForwardParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4503,14 +4519,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterSkipForwardParams : NSObject +@interface MTRMediaPlaybackClusterSkipForwardParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull deltaPositionMilliseconds; +@property (nonatomic, copy) NSNumber * _Nonnull deltaPositionMilliseconds; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4525,14 +4541,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterSkipBackwardParams : NSObject +@interface MTRMediaPlaybackClusterSkipBackwardParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull deltaPositionMilliseconds; +@property (nonatomic, copy) NSNumber * _Nonnull deltaPositionMilliseconds; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4547,16 +4563,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterPlaybackResponseParams : NSObject +@interface MTRMediaPlaybackClusterPlaybackResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSString * _Nullable data; +@property (nonatomic, copy) NSString * _Nullable data; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4571,14 +4587,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterSeekParams : NSObject +@interface MTRMediaPlaybackClusterSeekParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull position; +@property (nonatomic, copy) NSNumber * _Nonnull position; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4593,14 +4609,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaInputClusterSelectInputParams : NSObject +@interface MTRMediaInputClusterSelectInputParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull index; +@property (nonatomic, copy) NSNumber * _Nonnull index; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4615,12 +4631,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaInputClusterShowInputStatusParams : NSObject +@interface MTRMediaInputClusterShowInputStatusParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4635,12 +4651,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaInputClusterHideInputStatusParams : NSObject +@interface MTRMediaInputClusterHideInputStatusParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4655,16 +4671,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaInputClusterRenameInputParams : NSObject +@interface MTRMediaInputClusterRenameInputParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull index; +@property (nonatomic, copy) NSNumber * _Nonnull index; -@property (strong, nonatomic) NSString * _Nonnull name; +@property (nonatomic, copy) NSString * _Nonnull name; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4679,12 +4695,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRLowPowerClusterSleepParams : NSObject +@interface MTRLowPowerClusterSleepParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4699,14 +4715,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRKeypadInputClusterSendKeyParams : NSObject +@interface MTRKeypadInputClusterSendKeyParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull keyCode; +@property (nonatomic, copy) NSNumber * _Nonnull keyCode; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4721,14 +4737,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRKeypadInputClusterSendKeyResponseParams : NSObject +@interface MTRKeypadInputClusterSendKeyResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4743,18 +4759,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRContentLauncherClusterLaunchContentParams : NSObject +@interface MTRContentLauncherClusterLaunchContentParams : NSObject -@property (strong, nonatomic) MTRContentLauncherClusterContentSearch * _Nonnull search; +@property (nonatomic, copy) MTRContentLauncherClusterContentSearch * _Nonnull search; -@property (strong, nonatomic) NSNumber * _Nonnull autoPlay; +@property (nonatomic, copy) NSNumber * _Nonnull autoPlay; -@property (strong, nonatomic) NSString * _Nullable data; +@property (nonatomic, copy) NSString * _Nullable data; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4769,18 +4785,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRContentLauncherClusterLaunchURLParams : NSObject +@interface MTRContentLauncherClusterLaunchURLParams : NSObject -@property (strong, nonatomic) NSString * _Nonnull contentURL; +@property (nonatomic, copy) NSString * _Nonnull contentURL; -@property (strong, nonatomic) NSString * _Nullable displayString; +@property (nonatomic, copy) NSString * _Nullable displayString; -@property (strong, nonatomic) MTRContentLauncherClusterBrandingInformation * _Nullable brandingInformation; +@property (nonatomic, copy) MTRContentLauncherClusterBrandingInformation * _Nullable brandingInformation; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4795,16 +4811,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRContentLauncherClusterLaunchResponseParams : NSObject +@interface MTRContentLauncherClusterLaunchResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSString * _Nullable data; +@property (nonatomic, copy) NSString * _Nullable data; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4819,14 +4835,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAudioOutputClusterSelectOutputParams : NSObject +@interface MTRAudioOutputClusterSelectOutputParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull index; +@property (nonatomic, copy) NSNumber * _Nonnull index; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4841,16 +4857,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAudioOutputClusterRenameOutputParams : NSObject +@interface MTRAudioOutputClusterRenameOutputParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull index; +@property (nonatomic, copy) NSNumber * _Nonnull index; -@property (strong, nonatomic) NSString * _Nonnull name; +@property (nonatomic, copy) NSString * _Nonnull name; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4865,16 +4881,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRApplicationLauncherClusterLaunchAppParams : NSObject +@interface MTRApplicationLauncherClusterLaunchAppParams : NSObject -@property (strong, nonatomic) MTRApplicationLauncherClusterApplication * _Nonnull application; +@property (nonatomic, copy) MTRApplicationLauncherClusterApplication * _Nonnull application; -@property (strong, nonatomic) NSData * _Nullable data; +@property (nonatomic, copy) NSData * _Nullable data; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4889,14 +4905,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRApplicationLauncherClusterStopAppParams : NSObject +@interface MTRApplicationLauncherClusterStopAppParams : NSObject -@property (strong, nonatomic) MTRApplicationLauncherClusterApplication * _Nonnull application; +@property (nonatomic, copy) MTRApplicationLauncherClusterApplication * _Nonnull application; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4911,14 +4927,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRApplicationLauncherClusterHideAppParams : NSObject +@interface MTRApplicationLauncherClusterHideAppParams : NSObject -@property (strong, nonatomic) MTRApplicationLauncherClusterApplication * _Nonnull application; +@property (nonatomic, copy) MTRApplicationLauncherClusterApplication * _Nonnull application; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4933,16 +4949,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRApplicationLauncherClusterLauncherResponseParams : NSObject +@interface MTRApplicationLauncherClusterLauncherResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSData * _Nonnull data; +@property (nonatomic, copy) NSData * _Nonnull data; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4957,14 +4973,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAccountLoginClusterGetSetupPINParams : NSObject +@interface MTRAccountLoginClusterGetSetupPINParams : NSObject -@property (strong, nonatomic) NSString * _Nonnull tempAccountIdentifier; +@property (nonatomic, copy) NSString * _Nonnull tempAccountIdentifier; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4979,14 +4995,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAccountLoginClusterGetSetupPINResponseParams : NSObject +@interface MTRAccountLoginClusterGetSetupPINResponseParams : NSObject -@property (strong, nonatomic) NSString * _Nonnull setupPIN; +@property (nonatomic, copy) NSString * _Nonnull setupPIN; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5001,16 +5017,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAccountLoginClusterLoginParams : NSObject +@interface MTRAccountLoginClusterLoginParams : NSObject -@property (strong, nonatomic) NSString * _Nonnull tempAccountIdentifier; +@property (nonatomic, copy) NSString * _Nonnull tempAccountIdentifier; -@property (strong, nonatomic) NSString * _Nonnull setupPIN; +@property (nonatomic, copy) NSString * _Nonnull setupPIN; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5025,12 +5041,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAccountLoginClusterLogoutParams : NSObject +@interface MTRAccountLoginClusterLogoutParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5045,20 +5061,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams : NSObject +@interface MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull profileCount; +@property (nonatomic, copy) NSNumber * _Nonnull profileCount; -@property (strong, nonatomic) NSNumber * _Nonnull profileIntervalPeriod; +@property (nonatomic, copy) NSNumber * _Nonnull profileIntervalPeriod; -@property (strong, nonatomic) NSNumber * _Nonnull maxNumberOfIntervals; +@property (nonatomic, copy) NSNumber * _Nonnull maxNumberOfIntervals; -@property (strong, nonatomic) NSArray * _Nonnull listOfAttributes; +@property (nonatomic, copy) NSArray * _Nonnull listOfAttributes; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5073,12 +5089,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRElectricalMeasurementClusterGetProfileInfoCommandParams : NSObject +@interface MTRElectricalMeasurementClusterGetProfileInfoCommandParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5093,24 +5109,24 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams : NSObject +@interface MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull startTime; +@property (nonatomic, copy) NSNumber * _Nonnull startTime; -@property (strong, nonatomic) NSNumber * _Nonnull status; +@property (nonatomic, copy) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSNumber * _Nonnull profileIntervalPeriod; +@property (nonatomic, copy) NSNumber * _Nonnull profileIntervalPeriod; -@property (strong, nonatomic) NSNumber * _Nonnull numberOfIntervalsDelivered; +@property (nonatomic, copy) NSNumber * _Nonnull numberOfIntervalsDelivered; -@property (strong, nonatomic) NSNumber * _Nonnull attributeId; +@property (nonatomic, copy) NSNumber * _Nonnull attributeId; -@property (strong, nonatomic) NSArray * _Nonnull intervals; +@property (nonatomic, copy) NSArray * _Nonnull intervals; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5125,18 +5141,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams : NSObject +@interface MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull attributeId; +@property (nonatomic, copy) NSNumber * _Nonnull attributeId; -@property (strong, nonatomic) NSNumber * _Nonnull startTime; +@property (nonatomic, copy) NSNumber * _Nonnull startTime; -@property (strong, nonatomic) NSNumber * _Nonnull numberOfIntervals; +@property (nonatomic, copy) NSNumber * _Nonnull numberOfIntervals; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5151,12 +5167,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestParams : NSObject +@interface MTRTestClusterClusterTestParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5171,14 +5187,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestSpecificResponseParams : NSObject +@interface MTRTestClusterClusterTestSpecificResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull returnValue; +@property (nonatomic, copy) NSNumber * _Nonnull returnValue; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5193,12 +5209,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestNotHandledParams : NSObject +@interface MTRTestClusterClusterTestNotHandledParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5213,14 +5229,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestAddArgumentsResponseParams : NSObject +@interface MTRTestClusterClusterTestAddArgumentsResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull returnValue; +@property (nonatomic, copy) NSNumber * _Nonnull returnValue; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5235,12 +5251,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestSpecificParams : NSObject +@interface MTRTestClusterClusterTestSpecificParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5255,14 +5271,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestSimpleArgumentResponseParams : NSObject +@interface MTRTestClusterClusterTestSimpleArgumentResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull returnValue; +@property (nonatomic, copy) NSNumber * _Nonnull returnValue; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5277,12 +5293,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestUnknownCommandParams : NSObject +@interface MTRTestClusterClusterTestUnknownCommandParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5297,24 +5313,24 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestStructArrayArgumentResponseParams : NSObject +@interface MTRTestClusterClusterTestStructArrayArgumentResponseParams : NSObject -@property (strong, nonatomic) NSArray * _Nonnull arg1; +@property (nonatomic, copy) NSArray * _Nonnull arg1; -@property (strong, nonatomic) NSArray * _Nonnull arg2; +@property (nonatomic, copy) NSArray * _Nonnull arg2; -@property (strong, nonatomic) NSArray * _Nonnull arg3; +@property (nonatomic, copy) NSArray * _Nonnull arg3; -@property (strong, nonatomic) NSArray * _Nonnull arg4; +@property (nonatomic, copy) NSArray * _Nonnull arg4; -@property (strong, nonatomic) NSNumber * _Nonnull arg5; +@property (nonatomic, copy) NSNumber * _Nonnull arg5; -@property (strong, nonatomic) NSNumber * _Nonnull arg6; +@property (nonatomic, copy) NSNumber * _Nonnull arg6; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5329,16 +5345,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestAddArgumentsParams : NSObject +@interface MTRTestClusterClusterTestAddArgumentsParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull arg1; +@property (nonatomic, copy) NSNumber * _Nonnull arg1; -@property (strong, nonatomic) NSNumber * _Nonnull arg2; +@property (nonatomic, copy) NSNumber * _Nonnull arg2; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5353,14 +5369,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestListInt8UReverseResponseParams : NSObject +@interface MTRTestClusterClusterTestListInt8UReverseResponseParams : NSObject -@property (strong, nonatomic) NSArray * _Nonnull arg1; +@property (nonatomic, copy) NSArray * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5375,14 +5391,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestSimpleArgumentRequestParams : NSObject +@interface MTRTestClusterClusterTestSimpleArgumentRequestParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull arg1; +@property (nonatomic, copy) NSNumber * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5397,16 +5413,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestEnumsResponseParams : NSObject +@interface MTRTestClusterClusterTestEnumsResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull arg1; +@property (nonatomic, copy) NSNumber * _Nonnull arg1; -@property (strong, nonatomic) NSNumber * _Nonnull arg2; +@property (nonatomic, copy) NSNumber * _Nonnull arg2; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5421,24 +5437,24 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestStructArrayArgumentRequestParams : NSObject +@interface MTRTestClusterClusterTestStructArrayArgumentRequestParams : NSObject -@property (strong, nonatomic) NSArray * _Nonnull arg1; +@property (nonatomic, copy) NSArray * _Nonnull arg1; -@property (strong, nonatomic) NSArray * _Nonnull arg2; +@property (nonatomic, copy) NSArray * _Nonnull arg2; -@property (strong, nonatomic) NSArray * _Nonnull arg3; +@property (nonatomic, copy) NSArray * _Nonnull arg3; -@property (strong, nonatomic) NSArray * _Nonnull arg4; +@property (nonatomic, copy) NSArray * _Nonnull arg4; -@property (strong, nonatomic) NSNumber * _Nonnull arg5; +@property (nonatomic, copy) NSNumber * _Nonnull arg5; -@property (strong, nonatomic) NSNumber * _Nonnull arg6; +@property (nonatomic, copy) NSNumber * _Nonnull arg6; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5453,20 +5469,20 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestNullableOptionalResponseParams : NSObject +@interface MTRTestClusterClusterTestNullableOptionalResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull wasPresent; +@property (nonatomic, copy) NSNumber * _Nonnull wasPresent; -@property (strong, nonatomic) NSNumber * _Nullable wasNull; +@property (nonatomic, copy) NSNumber * _Nullable wasNull; -@property (strong, nonatomic) NSNumber * _Nullable value; +@property (nonatomic, copy) NSNumber * _Nullable value; -@property (strong, nonatomic) NSNumber * _Nullable originalValue; +@property (nonatomic, copy) NSNumber * _Nullable originalValue; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5481,14 +5497,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestStructArgumentRequestParams : NSObject +@interface MTRTestClusterClusterTestStructArgumentRequestParams : NSObject -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nonnull arg1; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5503,68 +5519,68 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestComplexNullableOptionalResponseParams : NSObject +@interface MTRTestClusterClusterTestComplexNullableOptionalResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull nullableIntWasNull; +@property (nonatomic, copy) NSNumber * _Nonnull nullableIntWasNull; -@property (strong, nonatomic) NSNumber * _Nullable nullableIntValue; +@property (nonatomic, copy) NSNumber * _Nullable nullableIntValue; -@property (strong, nonatomic) NSNumber * _Nonnull optionalIntWasPresent; +@property (nonatomic, copy) NSNumber * _Nonnull optionalIntWasPresent; -@property (strong, nonatomic) NSNumber * _Nullable optionalIntValue; +@property (nonatomic, copy) NSNumber * _Nullable optionalIntValue; -@property (strong, nonatomic) NSNumber * _Nonnull nullableOptionalIntWasPresent; +@property (nonatomic, copy) NSNumber * _Nonnull nullableOptionalIntWasPresent; -@property (strong, nonatomic) NSNumber * _Nullable nullableOptionalIntWasNull; +@property (nonatomic, copy) NSNumber * _Nullable nullableOptionalIntWasNull; -@property (strong, nonatomic) NSNumber * _Nullable nullableOptionalIntValue; +@property (nonatomic, copy) NSNumber * _Nullable nullableOptionalIntValue; -@property (strong, nonatomic) NSNumber * _Nonnull nullableStringWasNull; +@property (nonatomic, copy) NSNumber * _Nonnull nullableStringWasNull; -@property (strong, nonatomic) NSString * _Nullable nullableStringValue; +@property (nonatomic, copy) NSString * _Nullable nullableStringValue; -@property (strong, nonatomic) NSNumber * _Nonnull optionalStringWasPresent; +@property (nonatomic, copy) NSNumber * _Nonnull optionalStringWasPresent; -@property (strong, nonatomic) NSString * _Nullable optionalStringValue; +@property (nonatomic, copy) NSString * _Nullable optionalStringValue; -@property (strong, nonatomic) NSNumber * _Nonnull nullableOptionalStringWasPresent; +@property (nonatomic, copy) NSNumber * _Nonnull nullableOptionalStringWasPresent; -@property (strong, nonatomic) NSNumber * _Nullable nullableOptionalStringWasNull; +@property (nonatomic, copy) NSNumber * _Nullable nullableOptionalStringWasNull; -@property (strong, nonatomic) NSString * _Nullable nullableOptionalStringValue; +@property (nonatomic, copy) NSString * _Nullable nullableOptionalStringValue; -@property (strong, nonatomic) NSNumber * _Nonnull nullableStructWasNull; +@property (nonatomic, copy) NSNumber * _Nonnull nullableStructWasNull; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nullable nullableStructValue; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable nullableStructValue; -@property (strong, nonatomic) NSNumber * _Nonnull optionalStructWasPresent; +@property (nonatomic, copy) NSNumber * _Nonnull optionalStructWasPresent; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nullable optionalStructValue; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable optionalStructValue; -@property (strong, nonatomic) NSNumber * _Nonnull nullableOptionalStructWasPresent; +@property (nonatomic, copy) NSNumber * _Nonnull nullableOptionalStructWasPresent; -@property (strong, nonatomic) NSNumber * _Nullable nullableOptionalStructWasNull; +@property (nonatomic, copy) NSNumber * _Nullable nullableOptionalStructWasNull; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nullable nullableOptionalStructValue; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable nullableOptionalStructValue; -@property (strong, nonatomic) NSNumber * _Nonnull nullableListWasNull; +@property (nonatomic, copy) NSNumber * _Nonnull nullableListWasNull; -@property (strong, nonatomic) NSArray * _Nullable nullableListValue; +@property (nonatomic, copy) NSArray * _Nullable nullableListValue; -@property (strong, nonatomic) NSNumber * _Nonnull optionalListWasPresent; +@property (nonatomic, copy) NSNumber * _Nonnull optionalListWasPresent; -@property (strong, nonatomic) NSArray * _Nullable optionalListValue; +@property (nonatomic, copy) NSArray * _Nullable optionalListValue; -@property (strong, nonatomic) NSNumber * _Nonnull nullableOptionalListWasPresent; +@property (nonatomic, copy) NSNumber * _Nonnull nullableOptionalListWasPresent; -@property (strong, nonatomic) NSNumber * _Nullable nullableOptionalListWasNull; +@property (nonatomic, copy) NSNumber * _Nullable nullableOptionalListWasNull; -@property (strong, nonatomic) NSArray * _Nullable nullableOptionalListValue; +@property (nonatomic, copy) NSArray * _Nullable nullableOptionalListValue; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5579,14 +5595,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestNestedStructArgumentRequestParams : NSObject +@interface MTRTestClusterClusterTestNestedStructArgumentRequestParams : NSObject -@property (strong, nonatomic) MTRTestClusterClusterNestedStruct * _Nonnull arg1; +@property (nonatomic, copy) MTRTestClusterClusterNestedStruct * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5601,14 +5617,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterBooleanResponseParams : NSObject +@interface MTRTestClusterClusterBooleanResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull value; +@property (nonatomic, copy) NSNumber * _Nonnull value; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5623,14 +5639,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestListStructArgumentRequestParams : NSObject +@interface MTRTestClusterClusterTestListStructArgumentRequestParams : NSObject -@property (strong, nonatomic) NSArray * _Nonnull arg1; +@property (nonatomic, copy) NSArray * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5645,14 +5661,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterSimpleStructResponseParams : NSObject +@interface MTRTestClusterClusterSimpleStructResponseParams : NSObject -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nonnull arg1; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5667,14 +5683,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestListInt8UArgumentRequestParams : NSObject +@interface MTRTestClusterClusterTestListInt8UArgumentRequestParams : NSObject -@property (strong, nonatomic) NSArray * _Nonnull arg1; +@property (nonatomic, copy) NSArray * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5689,14 +5705,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestEmitTestEventResponseParams : NSObject +@interface MTRTestClusterClusterTestEmitTestEventResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull value; +@property (nonatomic, copy) NSNumber * _Nonnull value; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5711,14 +5727,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestNestedStructListArgumentRequestParams : NSObject +@interface MTRTestClusterClusterTestNestedStructListArgumentRequestParams : NSObject -@property (strong, nonatomic) MTRTestClusterClusterNestedStructList * _Nonnull arg1; +@property (nonatomic, copy) MTRTestClusterClusterNestedStructList * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5733,14 +5749,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams : NSObject +@interface MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull value; +@property (nonatomic, copy) NSNumber * _Nonnull value; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5755,14 +5771,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestListNestedStructListArgumentRequestParams : NSObject +@interface MTRTestClusterClusterTestListNestedStructListArgumentRequestParams : NSObject -@property (strong, nonatomic) NSArray * _Nonnull arg1; +@property (nonatomic, copy) NSArray * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5777,14 +5793,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestListInt8UReverseRequestParams : NSObject +@interface MTRTestClusterClusterTestListInt8UReverseRequestParams : NSObject -@property (strong, nonatomic) NSArray * _Nonnull arg1; +@property (nonatomic, copy) NSArray * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5799,16 +5815,16 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestEnumsRequestParams : NSObject +@interface MTRTestClusterClusterTestEnumsRequestParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull arg1; +@property (nonatomic, copy) NSNumber * _Nonnull arg1; -@property (strong, nonatomic) NSNumber * _Nonnull arg2; +@property (nonatomic, copy) NSNumber * _Nonnull arg2; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5823,14 +5839,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestNullableOptionalRequestParams : NSObject +@interface MTRTestClusterClusterTestNullableOptionalRequestParams : NSObject -@property (strong, nonatomic) NSNumber * _Nullable arg1; +@property (nonatomic, copy) NSNumber * _Nullable arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5845,36 +5861,36 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestComplexNullableOptionalRequestParams : NSObject +@interface MTRTestClusterClusterTestComplexNullableOptionalRequestParams : NSObject -@property (strong, nonatomic) NSNumber * _Nullable nullableInt; +@property (nonatomic, copy) NSNumber * _Nullable nullableInt; -@property (strong, nonatomic) NSNumber * _Nullable optionalInt; +@property (nonatomic, copy) NSNumber * _Nullable optionalInt; -@property (strong, nonatomic) NSNumber * _Nullable nullableOptionalInt; +@property (nonatomic, copy) NSNumber * _Nullable nullableOptionalInt; -@property (strong, nonatomic) NSString * _Nullable nullableString; +@property (nonatomic, copy) NSString * _Nullable nullableString; -@property (strong, nonatomic) NSString * _Nullable optionalString; +@property (nonatomic, copy) NSString * _Nullable optionalString; -@property (strong, nonatomic) NSString * _Nullable nullableOptionalString; +@property (nonatomic, copy) NSString * _Nullable nullableOptionalString; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nullable nullableStruct; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable nullableStruct; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nullable optionalStruct; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable optionalStruct; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nullable nullableOptionalStruct; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable nullableOptionalStruct; -@property (strong, nonatomic) NSArray * _Nullable nullableList; +@property (nonatomic, copy) NSArray * _Nullable nullableList; -@property (strong, nonatomic) NSArray * _Nullable optionalList; +@property (nonatomic, copy) NSArray * _Nullable optionalList; -@property (strong, nonatomic) NSArray * _Nullable nullableOptionalList; +@property (nonatomic, copy) NSArray * _Nullable nullableOptionalList; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5889,14 +5905,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterSimpleStructEchoRequestParams : NSObject +@interface MTRTestClusterClusterSimpleStructEchoRequestParams : NSObject -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nonnull arg1; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5911,12 +5927,12 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTimedInvokeRequestParams : NSObject +@interface MTRTestClusterClusterTimedInvokeRequestParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5931,14 +5947,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams : NSObject +@interface MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams : NSObject -@property (strong, nonatomic) NSNumber * _Nullable arg1; +@property (nonatomic, copy) NSNumber * _Nullable arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5953,18 +5969,18 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestEmitTestEventRequestParams : NSObject +@interface MTRTestClusterClusterTestEmitTestEventRequestParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull arg1; +@property (nonatomic, copy) NSNumber * _Nonnull arg1; -@property (strong, nonatomic) NSNumber * _Nonnull arg2; +@property (nonatomic, copy) NSNumber * _Nonnull arg2; -@property (strong, nonatomic) NSNumber * _Nonnull arg3; +@property (nonatomic, copy) NSNumber * _Nonnull arg3; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5979,14 +5995,14 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams : NSObject +@interface MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull arg1; +@property (nonatomic, copy) NSNumber * _Nonnull arg1; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -6001,10 +6017,10 @@ NS_ASSUME_NONNULL_BEGIN * request) within the timeout window. * */ -@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index cdd9a5d7cb8325..28844016eebe06 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -32,6 +32,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRIdentifyClusterIdentifyParams alloc] init]; + + other.identifyTime = self.identifyTime; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -53,6 +63,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRIdentifyClusterTriggerEffectParams alloc] init]; + + other.effectIdentifier = self.effectIdentifier; + other.effectVariant = self.effectVariant; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: effectIdentifier:%@; effectVariant:%@; >", @@ -74,6 +95,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupsClusterAddGroupParams alloc] init]; + + other.groupId = self.groupId; + other.groupName = self.groupName; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -95,6 +127,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupsClusterAddGroupResponseParams alloc] init]; + + other.status = self.status; + other.groupId = self.groupId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -114,6 +157,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupsClusterViewGroupParams alloc] init]; + + other.groupId = self.groupId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupId:%@; >", NSStringFromClass([self class]), _groupId]; @@ -136,6 +189,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupsClusterViewGroupResponseParams alloc] init]; + + other.status = self.status; + other.groupId = self.groupId; + other.groupName = self.groupName; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupId:%@; groupName:%@; >", @@ -155,6 +220,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupsClusterGetGroupMembershipParams alloc] init]; + + other.groupList = self.groupList; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupList:%@; >", NSStringFromClass([self class]), _groupList]; @@ -175,6 +250,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupsClusterGetGroupMembershipResponseParams alloc] init]; + + other.capacity = self.capacity; + other.groupList = self.groupList; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -194,6 +280,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupsClusterRemoveGroupParams alloc] init]; + + other.groupId = self.groupId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupId:%@; >", NSStringFromClass([self class]), _groupId]; @@ -214,6 +310,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupsClusterRemoveGroupResponseParams alloc] init]; + + other.status = self.status; + other.groupId = self.groupId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -231,6 +338,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupsClusterRemoveAllGroupsParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -251,6 +367,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupsClusterAddGroupIfIdentifyingParams alloc] init]; + + other.groupId = self.groupId; + other.groupName = self.groupName; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -278,6 +405,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterAddSceneParams alloc] init]; + + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.transitionTime = self.transitionTime; + other.sceneName = self.sceneName; + other.extensionFieldSets = self.extensionFieldSets; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -302,6 +443,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterAddSceneResponseParams alloc] init]; + + other.status = self.status; + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupId:%@; sceneId:%@; >", @@ -323,6 +476,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterViewSceneParams alloc] init]; + + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -352,6 +516,21 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterViewSceneResponseParams alloc] init]; + + other.status = self.status; + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.transitionTime = self.transitionTime; + other.sceneName = self.sceneName; + other.extensionFieldSets = self.extensionFieldSets; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -374,6 +553,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterRemoveSceneParams alloc] init]; + + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -397,6 +587,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterRemoveSceneResponseParams alloc] init]; + + other.status = self.status; + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupId:%@; sceneId:%@; >", @@ -416,6 +618,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterRemoveAllScenesParams alloc] init]; + + other.groupId = self.groupId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupId:%@; >", NSStringFromClass([self class]), _groupId]; @@ -436,6 +648,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterRemoveAllScenesResponseParams alloc] init]; + + other.status = self.status; + other.groupId = self.groupId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -457,6 +680,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterStoreSceneParams alloc] init]; + + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -480,6 +714,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterStoreSceneResponseParams alloc] init]; + + other.status = self.status; + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupId:%@; sceneId:%@; >", @@ -503,6 +749,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterRecallSceneParams alloc] init]; + + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.transitionTime = self.transitionTime; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupId:%@; sceneId:%@; transitionTime:%@; >", @@ -522,6 +780,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterGetSceneMembershipParams alloc] init]; + + other.groupId = self.groupId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupId:%@; >", NSStringFromClass([self class]), _groupId]; @@ -546,6 +814,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterGetSceneMembershipResponseParams alloc] init]; + + other.status = self.status; + other.capacity = self.capacity; + other.groupId = self.groupId; + other.sceneList = self.sceneList; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; capacity:%@; groupId:%@; sceneList:%@; >", @@ -573,6 +854,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterEnhancedAddSceneParams alloc] init]; + + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.transitionTime = self.transitionTime; + other.sceneName = self.sceneName; + other.extensionFieldSets = self.extensionFieldSets; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -597,6 +892,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterEnhancedAddSceneResponseParams alloc] init]; + + other.status = self.status; + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupId:%@; sceneId:%@; >", @@ -618,6 +925,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterEnhancedViewSceneParams alloc] init]; + + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -647,6 +965,21 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterEnhancedViewSceneResponseParams alloc] init]; + + other.status = self.status; + other.groupId = self.groupId; + other.sceneId = self.sceneId; + other.transitionTime = self.transitionTime; + other.sceneName = self.sceneName; + other.extensionFieldSets = self.extensionFieldSets; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -675,6 +1008,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterCopySceneParams alloc] init]; + + other.mode = self.mode; + other.groupIdFrom = self.groupIdFrom; + other.sceneIdFrom = self.sceneIdFrom; + other.groupIdTo = self.groupIdTo; + other.sceneIdTo = self.sceneIdTo; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -699,6 +1046,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRScenesClusterCopySceneResponseParams alloc] init]; + + other.status = self.status; + other.groupIdFrom = self.groupIdFrom; + other.sceneIdFrom = self.sceneIdFrom; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupIdFrom:%@; sceneIdFrom:%@; >", @@ -716,6 +1075,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROnOffClusterOffParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -732,6 +1100,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROnOffClusterOnParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -748,6 +1125,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROnOffClusterToggleParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -768,6 +1154,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROnOffClusterOffWithEffectParams alloc] init]; + + other.effectId = self.effectId; + other.effectVariant = self.effectVariant; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -785,6 +1182,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROnOffClusterOnWithRecallGlobalSceneParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -807,6 +1213,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROnOffClusterOnWithTimedOffParams alloc] init]; + + other.onOffControl = self.onOffControl; + other.onTime = self.onTime; + other.offWaitTime = self.offWaitTime; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: onOffControl:%@; onTime:%@; offWaitTime:%@; >", @@ -824,19 +1242,32 @@ - (instancetype)init _transitionTime = @(0); - _optionMask = @(0); + _optionsMask = @(0); - _optionOverride = @(0); + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; } return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + + other.level = self.level; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = - [NSString stringWithFormat:@"<%@: level:%@; transitionTime:%@; optionMask:%@; optionOverride:%@; >", - NSStringFromClass([self class]), _level, _transitionTime, _optionMask, _optionOverride]; + [NSString stringWithFormat:@"<%@: level:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", + NSStringFromClass([self class]), _level, _transitionTime, _optionsMask, _optionsOverride]; return descriptionString; } @@ -850,18 +1281,31 @@ - (instancetype)init _rate = @(0); - _optionMask = @(0); + _optionsMask = @(0); - _optionOverride = @(0); + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; } return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRLevelControlClusterMoveParams alloc] init]; + + other.moveMode = self.moveMode; + other.rate = self.rate; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; optionMask:%@; optionOverride:%@; >", - NSStringFromClass([self class]), _moveMode, _rate, _optionMask, _optionOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; optionsMask:%@; optionsOverride:%@; >", + NSStringFromClass([self class]), _moveMode, _rate, _optionsMask, _optionsOverride]; return descriptionString; } @@ -877,19 +1321,33 @@ - (instancetype)init _transitionTime = @(0); - _optionMask = @(0); + _optionsMask = @(0); - _optionOverride = @(0); + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; } return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRLevelControlClusterStepParams alloc] init]; + + other.stepMode = self.stepMode; + other.stepSize = self.stepSize; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = - [NSString stringWithFormat:@"<%@: stepMode:%@; stepSize:%@; transitionTime:%@; optionMask:%@; optionOverride:%@; >", - NSStringFromClass([self class]), _stepMode, _stepSize, _transitionTime, _optionMask, _optionOverride]; + [NSString stringWithFormat:@"<%@: stepMode:%@; stepSize:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", + NSStringFromClass([self class]), _stepMode, _stepSize, _transitionTime, _optionsMask, _optionsOverride]; return descriptionString; } @@ -899,18 +1357,29 @@ - (instancetype)init { if (self = [super init]) { - _optionMask = @(0); + _optionsMask = @(0); - _optionOverride = @(0); + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; } return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRLevelControlClusterStopParams alloc] init]; + + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: optionMask:%@; optionOverride:%@; >", - NSStringFromClass([self class]), _optionMask, _optionOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: optionsMask:%@; optionsOverride:%@; >", + NSStringFromClass([self class]), _optionsMask, _optionsOverride]; return descriptionString; } @@ -923,15 +1392,33 @@ - (instancetype)init _level = @(0); _transitionTime = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; } return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; + + other.level = self.level; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { - NSString * descriptionString = [NSString - stringWithFormat:@"<%@: level:%@; transitionTime:%@; >", NSStringFromClass([self class]), _level, _transitionTime]; + NSString * descriptionString = + [NSString stringWithFormat:@"<%@: level:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", + NSStringFromClass([self class]), _level, _transitionTime, _optionsMask, _optionsOverride]; return descriptionString; } @@ -944,15 +1431,32 @@ - (instancetype)init _moveMode = @(0); _rate = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; } return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRLevelControlClusterMoveWithOnOffParams alloc] init]; + + other.moveMode = self.moveMode; + other.rate = self.rate; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { - NSString * descriptionString = - [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; >", NSStringFromClass([self class]), _moveMode, _rate]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; optionsMask:%@; optionsOverride:%@; >", + NSStringFromClass([self class]), _moveMode, _rate, _optionsMask, _optionsOverride]; return descriptionString; } @@ -967,15 +1471,34 @@ - (instancetype)init _stepSize = @(0); _transitionTime = @(0); + + _optionsMask = @(0); + + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; } return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRLevelControlClusterStepWithOnOffParams alloc] init]; + + other.stepMode = self.stepMode; + other.stepSize = self.stepSize; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: stepMode:%@; stepSize:%@; transitionTime:%@; >", - NSStringFromClass([self class]), _stepMode, _stepSize, _transitionTime]; + NSString * descriptionString = + [NSString stringWithFormat:@"<%@: stepMode:%@; stepSize:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", + NSStringFromClass([self class]), _stepMode, _stepSize, _transitionTime, _optionsMask, _optionsOverride]; return descriptionString; } @@ -984,14 +1507,30 @@ @implementation MTRLevelControlClusterStopWithOnOffParams - (instancetype)init { if (self = [super init]) { + + _optionsMask = @(0); + + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; } return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRLevelControlClusterStopWithOnOffParams alloc] init]; + + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: optionsMask:%@; optionsOverride:%@; >", + NSStringFromClass([self class]), _optionsMask, _optionsOverride]; return descriptionString; } @@ -1007,6 +1546,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRLevelControlClusterMoveToClosestFrequencyParams alloc] init]; + + other.frequency = self.frequency; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: frequency:%@; >", NSStringFromClass([self class]), _frequency]; @@ -1027,6 +1576,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterInstantActionParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1050,6 +1610,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterInstantActionWithTransitionParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.transitionTime = self.transitionTime; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; transitionTime:%@; >", @@ -1071,6 +1643,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterStartActionParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1094,6 +1677,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterStartActionWithDurationParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.duration = self.duration; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; duration:%@; >", @@ -1115,6 +1710,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterStopActionParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1136,6 +1742,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterPauseActionParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1159,6 +1776,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterPauseActionWithDurationParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.duration = self.duration; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; duration:%@; >", @@ -1180,6 +1809,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterResumeActionParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1201,6 +1841,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterEnableActionParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1224,6 +1875,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterEnableActionWithDurationParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.duration = self.duration; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; duration:%@; >", @@ -1245,6 +1908,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterDisableActionParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1268,6 +1942,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBridgedActionsClusterDisableActionWithDurationParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.duration = self.duration; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; duration:%@; >", @@ -1285,6 +1971,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBasicClusterMfgSpecificPingParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1317,6 +2012,23 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROtaSoftwareUpdateProviderClusterQueryImageParams alloc] init]; + + other.vendorId = self.vendorId; + other.productId = self.productId; + other.softwareVersion = self.softwareVersion; + other.protocolsSupported = self.protocolsSupported; + other.hardwareVersion = self.hardwareVersion; + other.location = self.location; + other.requestorCanConsent = self.requestorCanConsent; + other.metadataForProvider = self.metadataForProvider; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1353,6 +2065,23 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams alloc] init]; + + other.status = self.status; + other.delayedActionTime = self.delayedActionTime; + other.imageURI = self.imageURI; + other.softwareVersion = self.softwareVersion; + other.softwareVersionString = self.softwareVersionString; + other.updateToken = self.updateToken; + other.userConsentNeeded = self.userConsentNeeded; + other.metadataForRequestor = self.metadataForRequestor; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1378,6 +2107,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams alloc] init]; + + other.updateToken = self.updateToken; + other.newVersion = self.newVersion; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1400,6 +2140,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams alloc] init]; + + other.action = self.action; + other.delayedActionTime = self.delayedActionTime; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -1421,6 +2172,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams alloc] init]; + + other.updateToken = self.updateToken; + other.softwareVersion = self.softwareVersion; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1449,6 +2211,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams alloc] init]; + + other.providerNodeId = self.providerNodeId; + other.vendorId = self.vendorId; + other.announcementReason = self.announcementReason; + other.metadataForNode = self.metadataForNode; + other.endpoint = self.endpoint; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -1472,6 +2248,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; + + other.expiryLengthSeconds = self.expiryLengthSeconds; + other.breadcrumb = self.breadcrumb; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: expiryLengthSeconds:%@; breadcrumb:%@; >", @@ -1493,6 +2280,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGeneralCommissioningClusterArmFailSafeResponseParams alloc] init]; + + other.errorCode = self.errorCode; + other.debugText = self.debugText; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1516,6 +2314,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGeneralCommissioningClusterSetRegulatoryConfigParams alloc] init]; + + other.newRegulatoryConfig = self.newRegulatoryConfig; + other.countryCode = self.countryCode; + other.breadcrumb = self.breadcrumb; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: newRegulatoryConfig:%@; countryCode:%@; breadcrumb:%@; >", @@ -1537,6 +2347,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams alloc] init]; + + other.errorCode = self.errorCode; + other.debugText = self.debugText; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1554,6 +2375,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGeneralCommissioningClusterCommissioningCompleteParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1574,6 +2404,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGeneralCommissioningClusterCommissioningCompleteResponseParams alloc] init]; + + other.errorCode = self.errorCode; + other.debugText = self.debugText; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1595,6 +2436,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRNetworkCommissioningClusterScanNetworksParams alloc] init]; + + other.ssid = self.ssid; + other.breadcrumb = self.breadcrumb; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: ssid:%@; breadcrumb:%@; >", NSStringFromClass([self class]), @@ -1620,6 +2472,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRNetworkCommissioningClusterScanNetworksResponseParams alloc] init]; + + other.networkingStatus = self.networkingStatus; + other.debugText = self.debugText; + other.wiFiScanResults = self.wiFiScanResults; + other.threadScanResults = self.threadScanResults; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1644,6 +2509,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams alloc] init]; + + other.ssid = self.ssid; + other.credentials = self.credentials; + other.breadcrumb = self.breadcrumb; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1666,6 +2543,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams alloc] init]; + + other.operationalDataset = self.operationalDataset; + other.breadcrumb = self.breadcrumb; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1688,6 +2576,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRNetworkCommissioningClusterRemoveNetworkParams alloc] init]; + + other.networkID = self.networkID; + other.breadcrumb = self.breadcrumb; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1712,6 +2611,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRNetworkCommissioningClusterNetworkConfigResponseParams alloc] init]; + + other.networkingStatus = self.networkingStatus; + other.debugText = self.debugText; + other.networkIndex = self.networkIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkingStatus:%@; debugText:%@; networkIndex:%@; >", @@ -1733,6 +2644,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRNetworkCommissioningClusterConnectNetworkParams alloc] init]; + + other.networkID = self.networkID; + other.breadcrumb = self.breadcrumb; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1757,6 +2679,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRNetworkCommissioningClusterConnectNetworkResponseParams alloc] init]; + + other.networkingStatus = self.networkingStatus; + other.debugText = self.debugText; + other.errorValue = self.errorValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkingStatus:%@; debugText:%@; errorValue:%@; >", @@ -1780,6 +2714,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRNetworkCommissioningClusterReorderNetworkParams alloc] init]; + + other.networkID = self.networkID; + other.networkIndex = self.networkIndex; + other.breadcrumb = self.breadcrumb; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1804,6 +2750,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDiagnosticLogsClusterRetrieveLogsRequestParams alloc] init]; + + other.intent = self.intent; + other.requestedProtocol = self.requestedProtocol; + other.transferFileDesignator = self.transferFileDesignator; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: intent:%@; requestedProtocol:%@; transferFileDesignator:%@; >", @@ -1830,6 +2788,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDiagnosticLogsClusterRetrieveLogsResponseParams alloc] init]; + + other.status = self.status; + other.content = self.content; + other.timeStamp = self.timeStamp; + other.timeSinceBoot = self.timeSinceBoot; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; content:%@; timeStamp:%@; timeSinceBoot:%@; >", @@ -1852,6 +2823,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; + + other.enableKey = self.enableKey; + other.eventTrigger = self.eventTrigger; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1870,6 +2852,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRSoftwareDiagnosticsClusterResetWatermarksParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1886,6 +2877,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRThreadNetworkDiagnosticsClusterResetCountsParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1902,6 +2902,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRWiFiNetworkDiagnosticsClusterResetCountsParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1918,6 +2927,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTREthernetNetworkDiagnosticsClusterResetCountsParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1944,6 +2962,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; + + other.commissioningTimeout = self.commissioningTimeout; + other.pakeVerifier = self.pakeVerifier; + other.discriminator = self.discriminator; + other.iterations = self.iterations; + other.salt = self.salt; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1965,6 +2997,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; + + other.commissioningTimeout = self.commissioningTimeout; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1982,6 +3024,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRAdministratorCommissioningClusterRevokeCommissioningParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -2000,6 +3051,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterAttestationRequestParams alloc] init]; + + other.attestationNonce = self.attestationNonce; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: attestationNonce:%@; >", NSStringFromClass([self class]), @@ -2021,6 +3082,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterAttestationResponseParams alloc] init]; + + other.attestationElements = self.attestationElements; + other.signature = self.signature; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2041,6 +3113,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterCertificateChainRequestParams alloc] init]; + + other.certificateType = self.certificateType; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2060,6 +3142,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterCertificateChainResponseParams alloc] init]; + + other.certificate = self.certificate; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: certificate:%@; >", NSStringFromClass([self class]), @@ -2081,6 +3173,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterCSRRequestParams alloc] init]; + + other.csrNonce = self.csrNonce; + other.isForUpdateNOC = self.isForUpdateNOC; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2103,6 +3206,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterCSRResponseParams alloc] init]; + + other.nocsrElements = self.nocsrElements; + other.attestationSignature = self.attestationSignature; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2131,6 +3245,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterAddNOCParams alloc] init]; + + other.nocValue = self.nocValue; + other.icacValue = self.icacValue; + other.ipkValue = self.ipkValue; + other.caseAdminSubject = self.caseAdminSubject; + other.adminVendorId = self.adminVendorId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2155,6 +3283,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterUpdateNOCParams alloc] init]; + + other.nocValue = self.nocValue; + other.icacValue = self.icacValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2179,6 +3318,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterNOCResponseParams alloc] init]; + + other.statusCode = self.statusCode; + other.fabricIndex = self.fabricIndex; + other.debugText = self.debugText; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: statusCode:%@; fabricIndex:%@; debugText:%@; >", @@ -2198,6 +3349,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterUpdateFabricLabelParams alloc] init]; + + other.label = self.label; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: label:%@; >", NSStringFromClass([self class]), _label]; @@ -2216,6 +3377,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; + + other.fabricIndex = self.fabricIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2235,6 +3406,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; + + other.rootCertificate = self.rootCertificate; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: rootCertificate:%@; >", NSStringFromClass([self class]), @@ -2254,6 +3435,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + + other.groupKeySet = self.groupKeySet; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2273,6 +3464,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; + + other.groupKeySetID = self.groupKeySetID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2292,6 +3493,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupKeyManagementClusterKeySetReadResponseParams alloc] init]; + + other.groupKeySet = self.groupKeySet; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2311,6 +3522,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; + + other.groupKeySetID = self.groupKeySetID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2330,6 +3551,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams alloc] init]; + + other.groupKeySetIDs = self.groupKeySetIDs; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2349,6 +3580,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams alloc] init]; + + other.groupKeySetIDs = self.groupKeySetIDs; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2368,6 +3609,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRModeSelectClusterChangeToModeParams alloc] init]; + + other.newMode = self.newMode; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; @@ -2386,6 +3637,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterLockDoorParams alloc] init]; + + other.pinCode = self.pinCode; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2405,6 +3666,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; + + other.pinCode = self.pinCode; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2426,6 +3697,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterUnlockWithTimeoutParams alloc] init]; + + other.timeout = self.timeout; + other.pinCode = self.pinCode; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: timeout:%@; pinCode:%@; >", NSStringFromClass([self class]), @@ -2457,6 +3739,22 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; + + other.weekDayIndex = self.weekDayIndex; + other.userIndex = self.userIndex; + other.daysMask = self.daysMask; + other.startHour = self.startHour; + other.startMinute = self.startMinute; + other.endHour = self.endHour; + other.endMinute = self.endMinute; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2480,6 +3778,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; + + other.weekDayIndex = self.weekDayIndex; + other.userIndex = self.userIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2513,6 +3822,23 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterGetWeekDayScheduleResponseParams alloc] init]; + + other.weekDayIndex = self.weekDayIndex; + other.userIndex = self.userIndex; + other.status = self.status; + other.daysMask = self.daysMask; + other.startHour = self.startHour; + other.startMinute = self.startMinute; + other.endHour = self.endHour; + other.endMinute = self.endMinute; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: weekDayIndex:%@; userIndex:%@; status:%@; daysMask:%@; " @@ -2536,6 +3862,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; + + other.weekDayIndex = self.weekDayIndex; + other.userIndex = self.userIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2561,6 +3898,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; + + other.yearDayIndex = self.yearDayIndex; + other.userIndex = self.userIndex; + other.localStartTime = self.localStartTime; + other.localEndTime = self.localEndTime; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2583,6 +3933,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; + + other.yearDayIndex = self.yearDayIndex; + other.userIndex = self.userIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2610,6 +3971,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterGetYearDayScheduleResponseParams alloc] init]; + + other.yearDayIndex = self.yearDayIndex; + other.userIndex = self.userIndex; + other.status = self.status; + other.localStartTime = self.localStartTime; + other.localEndTime = self.localEndTime; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2632,6 +4007,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; + + other.yearDayIndex = self.yearDayIndex; + other.userIndex = self.userIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2657,6 +4043,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; + + other.holidayIndex = self.holidayIndex; + other.localStartTime = self.localStartTime; + other.localEndTime = self.localEndTime; + other.operatingMode = self.operatingMode; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2677,6 +4076,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; + + other.holidayIndex = self.holidayIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2704,6 +4113,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterGetHolidayScheduleResponseParams alloc] init]; + + other.holidayIndex = self.holidayIndex; + other.status = self.status; + other.localStartTime = self.localStartTime; + other.localEndTime = self.localEndTime; + other.operatingMode = self.operatingMode; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2724,6 +4147,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; + + other.holidayIndex = self.holidayIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2755,6 +4188,22 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterSetUserParams alloc] init]; + + other.operationType = self.operationType; + other.userIndex = self.userIndex; + other.userName = self.userName; + other.userUniqueId = self.userUniqueId; + other.userStatus = self.userStatus; + other.userType = self.userType; + other.credentialRule = self.credentialRule; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2777,6 +4226,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterGetUserParams alloc] init]; + + other.userIndex = self.userIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: userIndex:%@; >", NSStringFromClass([self class]), _userIndex]; @@ -2813,6 +4272,25 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterGetUserResponseParams alloc] init]; + + other.userIndex = self.userIndex; + other.userName = self.userName; + other.userUniqueId = self.userUniqueId; + other.userStatus = self.userStatus; + other.userType = self.userType; + other.credentialRule = self.credentialRule; + other.credentials = self.credentials; + other.creatorFabricIndex = self.creatorFabricIndex; + other.lastModifiedFabricIndex = self.lastModifiedFabricIndex; + other.nextUserIndex = self.nextUserIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2835,6 +4313,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterClearUserParams alloc] init]; + + other.userIndex = self.userIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: userIndex:%@; >", NSStringFromClass([self class]), _userIndex]; @@ -2863,6 +4351,21 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterSetCredentialParams alloc] init]; + + other.operationType = self.operationType; + other.credential = self.credential; + other.credentialData = self.credentialData; + other.userIndex = self.userIndex; + other.userStatus = self.userStatus; + other.userType = self.userType; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2888,6 +4391,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterSetCredentialResponseParams alloc] init]; + + other.status = self.status; + other.userIndex = self.userIndex; + other.nextCredentialIndex = self.nextCredentialIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; userIndex:%@; nextCredentialIndex:%@; >", @@ -2907,6 +4422,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; + + other.credential = self.credential; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2934,6 +4459,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterGetCredentialStatusResponseParams alloc] init]; + + other.credentialExists = self.credentialExists; + other.userIndex = self.userIndex; + other.creatorFabricIndex = self.creatorFabricIndex; + other.lastModifiedFabricIndex = self.lastModifiedFabricIndex; + other.nextCredentialIndex = self.nextCredentialIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2956,6 +4495,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRDoorLockClusterClearCredentialParams alloc] init]; + + other.credential = self.credential; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2973,6 +4522,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRWindowCoveringClusterUpOrOpenParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -2989,6 +4547,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRWindowCoveringClusterDownOrCloseParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -3005,6 +4572,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRWindowCoveringClusterStopMotionParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -3023,6 +4599,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRWindowCoveringClusterGoToLiftValueParams alloc] init]; + + other.liftValue = self.liftValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: liftValue:%@; >", NSStringFromClass([self class]), _liftValue]; @@ -3041,6 +4627,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; + + other.liftPercent100thsValue = self.liftPercent100thsValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3060,6 +4656,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRWindowCoveringClusterGoToTiltValueParams alloc] init]; + + other.tiltValue = self.tiltValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: tiltValue:%@; >", NSStringFromClass([self class]), _tiltValue]; @@ -3078,6 +4684,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; + + other.tiltPercent100thsValue = self.tiltPercent100thsValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3097,6 +4713,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBarrierControlClusterBarrierControlGoToPercentParams alloc] init]; + + other.percentOpen = self.percentOpen; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3114,6 +4740,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRBarrierControlClusterBarrierControlStopParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -3134,6 +4769,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; + + other.mode = self.mode; + other.amount = self.amount; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3159,6 +4805,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRThermostatClusterGetWeeklyScheduleResponseParams alloc] init]; + + other.numberOfTransitionsForSequence = self.numberOfTransitionsForSequence; + other.dayOfWeekForSequence = self.dayOfWeekForSequence; + other.modeForSequence = self.modeForSequence; + other.transitions = self.transitions; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -3185,6 +4844,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRThermostatClusterSetWeeklyScheduleParams alloc] init]; + + other.numberOfTransitionsForSequence = self.numberOfTransitionsForSequence; + other.dayOfWeekForSequence = self.dayOfWeekForSequence; + other.modeForSequence = self.modeForSequence; + other.transitions = self.transitions; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -3207,6 +4879,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRThermostatClusterGetWeeklyScheduleParams alloc] init]; + + other.daysToReturn = self.daysToReturn; + other.modeToReturn = self.modeToReturn; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: daysToReturn:%@; modeToReturn:%@; >", @@ -3224,6 +4907,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRThermostatClusterClearWeeklyScheduleParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -3250,6 +4942,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterMoveToHueParams alloc] init]; + + other.hue = self.hue; + other.direction = self.direction; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3276,6 +4982,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterMoveHueParams alloc] init]; + + other.moveMode = self.moveMode; + other.rate = self.rate; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; optionsMask:%@; optionsOverride:%@; >", @@ -3303,6 +5022,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterStepHueParams alloc] init]; + + other.stepMode = self.stepMode; + other.stepSize = self.stepSize; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3329,6 +5062,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; + + other.saturation = self.saturation; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3355,6 +5101,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterMoveSaturationParams alloc] init]; + + other.moveMode = self.moveMode; + other.rate = self.rate; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; optionsMask:%@; optionsOverride:%@; >", @@ -3382,6 +5141,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterStepSaturationParams alloc] init]; + + other.stepMode = self.stepMode; + other.stepSize = self.stepSize; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3410,6 +5183,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; + + other.hue = self.hue; + other.saturation = self.saturation; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3438,6 +5225,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterMoveToColorParams alloc] init]; + + other.colorX = self.colorX; + other.colorY = self.colorY; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3464,6 +5265,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterMoveColorParams alloc] init]; + + other.rateX = self.rateX; + other.rateY = self.rateY; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: rateX:%@; rateY:%@; optionsMask:%@; optionsOverride:%@; >", @@ -3491,6 +5305,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterStepColorParams alloc] init]; + + other.stepX = self.stepX; + other.stepY = self.stepY; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3517,6 +5345,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; + + other.colorTemperature = self.colorTemperature; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3545,6 +5386,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; + + other.enhancedHue = self.enhancedHue; + other.direction = self.direction; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3571,6 +5426,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; + + other.moveMode = self.moveMode; + other.rate = self.rate; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; optionsMask:%@; optionsOverride:%@; >", @@ -3598,6 +5466,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; + + other.stepMode = self.stepMode; + other.stepSize = self.stepSize; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3626,6 +5508,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; + + other.enhancedHue = self.enhancedHue; + other.saturation = self.saturation; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3658,6 +5554,22 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterColorLoopSetParams alloc] init]; + + other.updateFlags = self.updateFlags; + other.action = self.action; + other.direction = self.direction; + other.time = self.time; + other.startHue = self.startHue; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -3681,6 +5593,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterStopMoveStepParams alloc] init]; + + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: optionsMask:%@; optionsOverride:%@; >", @@ -3710,6 +5633,21 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; + + other.moveMode = self.moveMode; + other.rate = self.rate; + other.colorTemperatureMinimumMireds = self.colorTemperatureMinimumMireds; + other.colorTemperatureMaximumMireds = self.colorTemperatureMaximumMireds; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3744,6 +5682,22 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; + + other.stepMode = self.stepMode; + other.stepSize = self.stepSize; + other.transitionTime = self.transitionTime; + other.colorTemperatureMinimumMireds = self.colorTemperatureMinimumMireds; + other.colorTemperatureMaximumMireds = self.colorTemperatureMaximumMireds; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3766,6 +5720,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRChannelClusterChangeChannelParams alloc] init]; + + other.match = self.match; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: match:%@; >", NSStringFromClass([self class]), _match]; @@ -3786,6 +5750,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRChannelClusterChangeChannelResponseParams alloc] init]; + + other.status = self.status; + other.data = self.data; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3807,6 +5782,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRChannelClusterChangeChannelByNumberParams alloc] init]; + + other.majorNumber = self.majorNumber; + other.minorNumber = self.minorNumber; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -3826,6 +5812,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRChannelClusterSkipChannelParams alloc] init]; + + other.count = self.count; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: count:%@; >", NSStringFromClass([self class]), _count]; @@ -3846,6 +5842,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTargetNavigatorClusterNavigateTargetParams alloc] init]; + + other.target = self.target; + other.data = self.data; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3867,6 +5874,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTargetNavigatorClusterNavigateTargetResponseParams alloc] init]; + + other.status = self.status; + other.data = self.data; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -3884,6 +5902,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterPlayParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -3900,6 +5927,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterPauseParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -3916,6 +5952,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterStopPlaybackParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -3932,6 +5977,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterStartOverParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -3948,6 +6002,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterPreviousParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -3964,6 +6027,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterNextParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -3980,6 +6052,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterRewindParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -3996,6 +6077,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterFastForwardParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -4014,6 +6104,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterSkipForwardParams alloc] init]; + + other.deltaPositionMilliseconds = self.deltaPositionMilliseconds; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -4033,6 +6133,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterSkipBackwardParams alloc] init]; + + other.deltaPositionMilliseconds = self.deltaPositionMilliseconds; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -4054,6 +6164,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterPlaybackResponseParams alloc] init]; + + other.status = self.status; + other.data = self.data; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4073,6 +6194,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaPlaybackClusterSeekParams alloc] init]; + + other.position = self.position; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: position:%@; >", NSStringFromClass([self class]), _position]; @@ -4091,6 +6222,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaInputClusterSelectInputParams alloc] init]; + + other.index = self.index; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: index:%@; >", NSStringFromClass([self class]), _index]; @@ -4107,6 +6248,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaInputClusterShowInputStatusParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -4123,6 +6273,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaInputClusterHideInputStatusParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -4143,6 +6302,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRMediaInputClusterRenameInputParams alloc] init]; + + other.index = self.index; + other.name = self.name; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4160,6 +6330,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRLowPowerClusterSleepParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -4178,6 +6357,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRKeypadInputClusterSendKeyParams alloc] init]; + + other.keyCode = self.keyCode; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: keyCode:%@; >", NSStringFromClass([self class]), _keyCode]; @@ -4196,6 +6385,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRKeypadInputClusterSendKeyResponseParams alloc] init]; + + other.status = self.status; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; >", NSStringFromClass([self class]), _status]; @@ -4218,6 +6417,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRContentLauncherClusterLaunchContentParams alloc] init]; + + other.search = self.search; + other.autoPlay = self.autoPlay; + other.data = self.data; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -4241,6 +6452,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRContentLauncherClusterLaunchURLParams alloc] init]; + + other.contentURL = self.contentURL; + other.displayString = self.displayString; + other.brandingInformation = self.brandingInformation; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: contentURL:%@; displayString:%@; brandingInformation:%@; >", @@ -4262,6 +6485,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRContentLauncherClusterLaunchResponseParams alloc] init]; + + other.status = self.status; + other.data = self.data; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4281,6 +6515,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRAudioOutputClusterSelectOutputParams alloc] init]; + + other.index = self.index; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: index:%@; >", NSStringFromClass([self class]), _index]; @@ -4301,6 +6545,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRAudioOutputClusterRenameOutputParams alloc] init]; + + other.index = self.index; + other.name = self.name; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4322,6 +6577,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRApplicationLauncherClusterLaunchAppParams alloc] init]; + + other.application = self.application; + other.data = self.data; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: application:%@; data:%@; >", NSStringFromClass([self class]), @@ -4341,6 +6607,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRApplicationLauncherClusterStopAppParams alloc] init]; + + other.application = self.application; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4360,6 +6636,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRApplicationLauncherClusterHideAppParams alloc] init]; + + other.application = self.application; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4381,6 +6667,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRApplicationLauncherClusterLauncherResponseParams alloc] init]; + + other.status = self.status; + other.data = self.data; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; data:%@; >", NSStringFromClass([self class]), @@ -4400,6 +6697,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRAccountLoginClusterGetSetupPINParams alloc] init]; + + other.tempAccountIdentifier = self.tempAccountIdentifier; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4419,6 +6726,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRAccountLoginClusterGetSetupPINResponseParams alloc] init]; + + other.setupPIN = self.setupPIN; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: setupPIN:%@; >", NSStringFromClass([self class]), _setupPIN]; @@ -4439,6 +6756,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRAccountLoginClusterLoginParams alloc] init]; + + other.tempAccountIdentifier = self.tempAccountIdentifier; + other.setupPIN = self.setupPIN; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: tempAccountIdentifier:%@; setupPIN:%@; >", @@ -4456,6 +6784,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRAccountLoginClusterLogoutParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -4480,6 +6817,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams alloc] init]; + + other.profileCount = self.profileCount; + other.profileIntervalPeriod = self.profileIntervalPeriod; + other.maxNumberOfIntervals = self.maxNumberOfIntervals; + other.listOfAttributes = self.listOfAttributes; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -4498,6 +6848,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRElectricalMeasurementClusterGetProfileInfoCommandParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -4526,6 +6885,21 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams alloc] init]; + + other.startTime = self.startTime; + other.status = self.status; + other.profileIntervalPeriod = self.profileIntervalPeriod; + other.numberOfIntervalsDelivered = self.numberOfIntervalsDelivered; + other.attributeId = self.attributeId; + other.intervals = self.intervals; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: startTime:%@; status:%@; profileIntervalPeriod:%@; " @@ -4551,6 +6925,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams alloc] init]; + + other.attributeId = self.attributeId; + other.startTime = self.startTime; + other.numberOfIntervals = self.numberOfIntervals; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: attributeId:%@; startTime:%@; numberOfIntervals:%@; >", @@ -4568,6 +6954,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -4586,6 +6981,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestSpecificResponseParams alloc] init]; + + other.returnValue = self.returnValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4603,6 +7008,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestNotHandledParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -4621,6 +7035,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestAddArgumentsResponseParams alloc] init]; + + other.returnValue = self.returnValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4638,6 +7062,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestSpecificParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -4656,6 +7089,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestSimpleArgumentResponseParams alloc] init]; + + other.returnValue = self.returnValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4673,6 +7116,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestUnknownCommandParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -4701,6 +7153,21 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestStructArrayArgumentResponseParams alloc] init]; + + other.arg1 = self.arg1; + other.arg2 = self.arg2; + other.arg3 = self.arg3; + other.arg4 = self.arg4; + other.arg5 = self.arg5; + other.arg6 = self.arg6; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; arg2:%@; arg3:%@; arg4:%@; arg5:%@; arg6:%@; >", @@ -4722,6 +7189,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; + + other.arg1 = self.arg1; + other.arg2 = self.arg2; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4741,6 +7219,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestListInt8UReverseResponseParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -4759,6 +7247,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestSimpleArgumentRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -4779,6 +7277,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestEnumsResponseParams alloc] init]; + + other.arg1 = self.arg1; + other.arg2 = self.arg2; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -4808,6 +7317,21 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestStructArrayArgumentRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.arg2 = self.arg2; + other.arg3 = self.arg3; + other.arg4 = self.arg4; + other.arg5 = self.arg5; + other.arg6 = self.arg6; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; arg2:%@; arg3:%@; arg4:%@; arg5:%@; arg6:%@; >", @@ -4833,6 +7357,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestNullableOptionalResponseParams alloc] init]; + + other.wasPresent = self.wasPresent; + other.wasNull = self.wasNull; + other.value = self.value; + other.originalValue = self.originalValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: wasPresent:%@; wasNull:%@; value:%@; originalValue:%@; >", @@ -4852,6 +7389,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestStructArgumentRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -4924,6 +7471,43 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestComplexNullableOptionalResponseParams alloc] init]; + + other.nullableIntWasNull = self.nullableIntWasNull; + other.nullableIntValue = self.nullableIntValue; + other.optionalIntWasPresent = self.optionalIntWasPresent; + other.optionalIntValue = self.optionalIntValue; + other.nullableOptionalIntWasPresent = self.nullableOptionalIntWasPresent; + other.nullableOptionalIntWasNull = self.nullableOptionalIntWasNull; + other.nullableOptionalIntValue = self.nullableOptionalIntValue; + other.nullableStringWasNull = self.nullableStringWasNull; + other.nullableStringValue = self.nullableStringValue; + other.optionalStringWasPresent = self.optionalStringWasPresent; + other.optionalStringValue = self.optionalStringValue; + other.nullableOptionalStringWasPresent = self.nullableOptionalStringWasPresent; + other.nullableOptionalStringWasNull = self.nullableOptionalStringWasNull; + other.nullableOptionalStringValue = self.nullableOptionalStringValue; + other.nullableStructWasNull = self.nullableStructWasNull; + other.nullableStructValue = self.nullableStructValue; + other.optionalStructWasPresent = self.optionalStructWasPresent; + other.optionalStructValue = self.optionalStructValue; + other.nullableOptionalStructWasPresent = self.nullableOptionalStructWasPresent; + other.nullableOptionalStructWasNull = self.nullableOptionalStructWasNull; + other.nullableOptionalStructValue = self.nullableOptionalStructValue; + other.nullableListWasNull = self.nullableListWasNull; + other.nullableListValue = self.nullableListValue; + other.optionalListWasPresent = self.optionalListWasPresent; + other.optionalListValue = self.optionalListValue; + other.nullableOptionalListWasPresent = self.nullableOptionalListWasPresent; + other.nullableOptionalListWasNull = self.nullableOptionalListWasNull; + other.nullableOptionalListValue = self.nullableOptionalListValue; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -4957,6 +7541,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestNestedStructArgumentRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -4975,6 +7569,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterBooleanResponseParams alloc] init]; + + other.value = self.value; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: value:%@; >", NSStringFromClass([self class]), _value]; @@ -4993,6 +7597,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestListStructArgumentRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -5011,6 +7625,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterSimpleStructResponseParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -5029,6 +7653,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestListInt8UArgumentRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -5047,6 +7681,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestEmitTestEventResponseParams alloc] init]; + + other.value = self.value; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: value:%@; >", NSStringFromClass([self class]), _value]; @@ -5065,6 +7709,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestNestedStructListArgumentRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -5083,6 +7737,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams alloc] init]; + + other.value = self.value; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: value:%@; >", NSStringFromClass([self class]), _value]; @@ -5101,6 +7765,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestListNestedStructListArgumentRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -5119,6 +7793,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestListInt8UReverseRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -5139,6 +7823,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestEnumsRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.arg2 = self.arg2; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -5158,6 +7853,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestNullableOptionalRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -5198,6 +7903,27 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestComplexNullableOptionalRequestParams alloc] init]; + + other.nullableInt = self.nullableInt; + other.optionalInt = self.optionalInt; + other.nullableOptionalInt = self.nullableOptionalInt; + other.nullableString = self.nullableString; + other.optionalString = self.optionalString; + other.nullableOptionalString = self.nullableOptionalString; + other.nullableStruct = self.nullableStruct; + other.optionalStruct = self.optionalStruct; + other.nullableOptionalStruct = self.nullableOptionalStruct; + other.nullableList = self.nullableList; + other.optionalList = self.optionalList; + other.nullableOptionalList = self.nullableOptionalList; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -5222,6 +7948,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterSimpleStructEchoRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -5238,6 +7974,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTimedInvokeRequestParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -5256,6 +8001,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; @@ -5278,6 +8033,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestEmitTestEventRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.arg2 = self.arg2; + other.arg3 = self.arg3; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -5297,6 +8064,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone; +{ + auto other = [[MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams alloc] init]; + + other.arg1 = self.arg1; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index 4fd720ab45c0d1..98dfb99f3a189f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -235,8 +235,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead } while (0); do { NSNumber * _Nonnull memberValue; - memberValue = [NSNumber numberWithUnsignedChar:cppValue.adminFabricIndex]; - value.adminFabricIndex = memberValue; + memberValue = [NSNumber numberWithUnsignedChar:cppValue.fabricIndex]; + value.fabricIndex = memberValue; } while (0); return value; @@ -289,8 +289,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead } while (0); do { NSNumber * _Nonnull memberValue; - memberValue = [NSNumber numberWithUnsignedChar:cppValue.adminFabricIndex]; - value.adminFabricIndex = memberValue; + memberValue = [NSNumber numberWithUnsignedChar:cppValue.fabricIndex]; + value.fabricIndex = memberValue; } while (0); return value; @@ -416,6 +416,12 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead MTRBasicClusterLeaveEvent * value = [MTRBasicClusterLeaveEvent new]; + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:cppValue.fabricIndex]; + value.fabricIndex = memberValue; + } while (0); + return value; } @@ -2173,8 +2179,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead do { NSNumber * _Nonnull memberValue; - memberValue = [NSNumber numberWithUnsignedChar:cppValue.arg1]; - value.arg1 = memberValue; + memberValue = [NSNumber numberWithUnsignedChar:cppValue.fabricIndex]; + value.fabricIndex = memberValue; } while (0); return value; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index a5d12d54ddb15b..695ef2f46b6a6e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -21,776 +21,1002 @@ NS_ASSUME_NONNULL_BEGIN -@interface MTRScenesClusterAttributeValuePair : NSObject -@property (strong, nonatomic) NSNumber * _Nullable attributeId; -@property (strong, nonatomic) NSArray * _Nonnull attributeValue; -- (instancetype)init; +@interface MTRScenesClusterAttributeValuePair : NSObject +@property (nonatomic, copy) NSNumber * _Nullable attributeId; +@property (nonatomic, copy) NSArray * _Nonnull attributeValue; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRScenesClusterExtensionFieldSet : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull clusterId; -@property (strong, nonatomic) NSArray * _Nonnull attributeValueList; -- (instancetype)init; +@interface MTRScenesClusterExtensionFieldSet : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull clusterId; +@property (nonatomic, copy) NSArray * _Nonnull attributeValueList; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDescriptorClusterDeviceType : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull type; -@property (strong, nonatomic) NSNumber * _Nonnull revision; -- (instancetype)init; +@interface MTRDescriptorClusterDeviceType : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull type; +@property (nonatomic, copy) NSNumber * _Nonnull revision; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBindingClusterTargetStruct : NSObject -@property (strong, nonatomic) NSNumber * _Nullable node; -@property (strong, nonatomic) NSNumber * _Nullable group; -@property (strong, nonatomic) NSNumber * _Nullable endpoint; -@property (strong, nonatomic) NSNumber * _Nullable cluster; -@property (strong, nonatomic) NSNumber * _Nonnull fabricIndex; -- (instancetype)init; +@interface MTRBindingClusterTargetStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nullable node; +@property (nonatomic, copy) NSNumber * _Nullable group; +@property (nonatomic, copy) NSNumber * _Nullable endpoint; +@property (nonatomic, copy) NSNumber * _Nullable cluster; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAccessControlClusterTarget : NSObject -@property (strong, nonatomic) NSNumber * _Nullable cluster; -@property (strong, nonatomic) NSNumber * _Nullable endpoint; -@property (strong, nonatomic) NSNumber * _Nullable deviceType; -- (instancetype)init; +@interface MTRAccessControlClusterTarget : NSObject +@property (nonatomic, copy) NSNumber * _Nullable cluster; +@property (nonatomic, copy) NSNumber * _Nullable endpoint; +@property (nonatomic, copy) NSNumber * _Nullable deviceType; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAccessControlClusterAccessControlEntry : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull privilege; -@property (strong, nonatomic) NSNumber * _Nonnull authMode; -@property (strong, nonatomic) NSArray * _Nullable subjects; -@property (strong, nonatomic) NSArray * _Nullable targets; -@property (strong, nonatomic) NSNumber * _Nonnull fabricIndex; -- (instancetype)init; +@interface MTRAccessControlClusterAccessControlEntry : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull privilege; +@property (nonatomic, copy) NSNumber * _Nonnull authMode; +@property (nonatomic, copy) NSArray * _Nullable subjects; +@property (nonatomic, copy) NSArray * _Nullable targets; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAccessControlClusterExtensionEntry : NSObject -@property (strong, nonatomic) NSData * _Nonnull data; -@property (strong, nonatomic) NSNumber * _Nonnull fabricIndex; -- (instancetype)init; +@interface MTRAccessControlClusterExtensionEntry : NSObject +@property (nonatomic, copy) NSData * _Nonnull data; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAccessControlClusterAccessControlEntryChangedEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nullable adminNodeID; -@property (strong, nonatomic) NSNumber * _Nullable adminPasscodeID; -@property (strong, nonatomic) NSNumber * _Nonnull changeType; -@property (strong, nonatomic) MTRAccessControlClusterAccessControlEntry * _Nullable latestValue; -@property (strong, nonatomic) NSNumber * _Nonnull adminFabricIndex; -@end +@interface MTRAccessControlClusterAccessControlEntryChangedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nullable adminNodeID; +@property (nonatomic, copy) NSNumber * _Nullable adminPasscodeID; +@property (nonatomic, copy) NSNumber * _Nonnull changeType; +@property (nonatomic, copy) MTRAccessControlClusterAccessControlEntry * _Nullable latestValue; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; -@interface MTRAccessControlClusterAccessControlExtensionChangedEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nullable adminNodeID; -@property (strong, nonatomic) NSNumber * _Nullable adminPasscodeID; -@property (strong, nonatomic) NSNumber * _Nonnull changeType; -@property (strong, nonatomic) MTRAccessControlClusterExtensionEntry * _Nullable latestValue; -@property (strong, nonatomic) NSNumber * _Nonnull adminFabricIndex; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterActionStruct : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSString * _Nonnull name; -@property (strong, nonatomic) NSNumber * _Nonnull type; -@property (strong, nonatomic) NSNumber * _Nonnull endpointListID; -@property (strong, nonatomic) NSNumber * _Nonnull supportedCommands; -@property (strong, nonatomic) NSNumber * _Nonnull status; -- (instancetype)init; +@interface MTRAccessControlClusterAccessControlExtensionChangedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nullable adminNodeID; +@property (nonatomic, copy) NSNumber * _Nullable adminPasscodeID; +@property (nonatomic, copy) NSNumber * _Nonnull changeType; +@property (nonatomic, copy) MTRAccessControlClusterExtensionEntry * _Nullable latestValue; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterEndpointListStruct : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull endpointListID; -@property (strong, nonatomic) NSString * _Nonnull name; -@property (strong, nonatomic) NSNumber * _Nonnull type; -@property (strong, nonatomic) NSArray * _Nonnull endpoints; -- (instancetype)init; +@interface MTRBridgedActionsClusterActionStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSString * _Nonnull name; +@property (nonatomic, copy) NSNumber * _Nonnull type; +@property (nonatomic, copy) NSNumber * _Nonnull endpointListID; +@property (nonatomic, copy) NSNumber * _Nonnull supportedCommands; +@property (nonatomic, copy) NSNumber * _Nonnull status; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedActionsClusterStateChangedEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nonnull invokeID; -@property (strong, nonatomic, getter=getNewState) NSNumber * _Nonnull newState; -@end +@interface MTRBridgedActionsClusterEndpointListStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull endpointListID; +@property (nonatomic, copy) NSString * _Nonnull name; +@property (nonatomic, copy) NSNumber * _Nonnull type; +@property (nonatomic, copy) NSArray * _Nonnull endpoints; -@interface MTRBridgedActionsClusterActionFailedEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull actionID; -@property (strong, nonatomic) NSNumber * _Nonnull invokeID; -@property (strong, nonatomic, getter=getNewState) NSNumber * _Nonnull newState; -@property (strong, nonatomic) NSNumber * _Nonnull error; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBasicClusterCapabilityMinimaStruct : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull caseSessionsPerFabric; -@property (strong, nonatomic) NSNumber * _Nonnull subscriptionsPerFabric; -- (instancetype)init; +@interface MTRBridgedActionsClusterStateChangedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull invokeID; +@property (nonatomic, copy, getter=getNewState) NSNumber * _Nonnull newState; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBasicClusterStartUpEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull softwareVersion; -@end +@interface MTRBridgedActionsClusterActionFailedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull actionID; +@property (nonatomic, copy) NSNumber * _Nonnull invokeID; +@property (nonatomic, copy, getter=getNewState) NSNumber * _Nonnull newState; +@property (nonatomic, copy) NSNumber * _Nonnull error; -@interface MTRBasicClusterShutDownEvent : NSObject +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBasicClusterLeaveEvent : NSObject -@end +@interface MTRBasicClusterCapabilityMinimaStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull caseSessionsPerFabric; +@property (nonatomic, copy) NSNumber * _Nonnull subscriptionsPerFabric; -@interface MTRBasicClusterReachableChangedEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull reachableNewValue; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROtaSoftwareUpdateRequestorClusterProviderLocation : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull providerNodeID; -@property (strong, nonatomic) NSNumber * _Nonnull endpoint; -@property (strong, nonatomic) NSNumber * _Nonnull fabricIndex; -- (instancetype)init; +@interface MTRBasicClusterStartUpEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull softwareVersion; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROtaSoftwareUpdateRequestorClusterStateTransitionEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull previousState; -@property (strong, nonatomic, getter=getNewState) NSNumber * _Nonnull newState; -@property (strong, nonatomic) NSNumber * _Nonnull reason; -@property (strong, nonatomic) NSNumber * _Nullable targetSoftwareVersion; -@end +@interface MTRBasicClusterShutDownEvent : NSObject -@interface MTROtaSoftwareUpdateRequestorClusterVersionAppliedEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull softwareVersion; -@property (strong, nonatomic) NSNumber * _Nonnull productID; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROtaSoftwareUpdateRequestorClusterDownloadErrorEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull softwareVersion; -@property (strong, nonatomic) NSNumber * _Nonnull bytesDownloaded; -@property (strong, nonatomic) NSNumber * _Nullable progressPercent; -@property (strong, nonatomic) NSNumber * _Nullable platformCode; -@end +@interface MTRBasicClusterLeaveEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; -@interface MTRPowerSourceClusterBatChargeFaultChangeType : NSObject -@property (strong, nonatomic) NSArray * _Nonnull current; -@property (strong, nonatomic) NSArray * _Nonnull previous; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPowerSourceClusterBatFaultChangeType : NSObject -@property (strong, nonatomic) NSArray * _Nonnull current; -@property (strong, nonatomic) NSArray * _Nonnull previous; -- (instancetype)init; +@interface MTRBasicClusterReachableChangedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull reachableNewValue; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPowerSourceClusterWiredFaultChangeType : NSObject -@property (strong, nonatomic) NSArray * _Nonnull current; -@property (strong, nonatomic) NSArray * _Nonnull previous; -- (instancetype)init; +@interface MTROtaSoftwareUpdateRequestorClusterProviderLocation : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull providerNodeID; +@property (nonatomic, copy) NSNumber * _Nonnull endpoint; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGeneralCommissioningClusterBasicCommissioningInfo : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull failSafeExpiryLengthSeconds; -@property (strong, nonatomic) NSNumber * _Nonnull maxCumulativeFailsafeSeconds; -- (instancetype)init; +@interface MTROtaSoftwareUpdateRequestorClusterStateTransitionEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull previousState; +@property (nonatomic, copy, getter=getNewState) NSNumber * _Nonnull newState; +@property (nonatomic, copy) NSNumber * _Nonnull reason; +@property (nonatomic, copy) NSNumber * _Nullable targetSoftwareVersion; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterNetworkInfo : NSObject -@property (strong, nonatomic) NSData * _Nonnull networkID; -@property (strong, nonatomic) NSNumber * _Nonnull connected; -- (instancetype)init; +@interface MTROtaSoftwareUpdateRequestorClusterVersionAppliedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull softwareVersion; +@property (nonatomic, copy) NSNumber * _Nonnull productID; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterThreadInterfaceScanResult : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull panId; -@property (strong, nonatomic) NSNumber * _Nonnull extendedPanId; -@property (strong, nonatomic) NSString * _Nonnull networkName; -@property (strong, nonatomic) NSNumber * _Nonnull channel; -@property (strong, nonatomic) NSNumber * _Nonnull version; -@property (strong, nonatomic) NSData * _Nonnull extendedAddress; -@property (strong, nonatomic) NSNumber * _Nonnull rssi; -@property (strong, nonatomic) NSNumber * _Nonnull lqi; -- (instancetype)init; +@interface MTROtaSoftwareUpdateRequestorClusterDownloadErrorEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull softwareVersion; +@property (nonatomic, copy) NSNumber * _Nonnull bytesDownloaded; +@property (nonatomic, copy) NSNumber * _Nullable progressPercent; +@property (nonatomic, copy) NSNumber * _Nullable platformCode; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRNetworkCommissioningClusterWiFiInterfaceScanResult : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull security; -@property (strong, nonatomic) NSData * _Nonnull ssid; -@property (strong, nonatomic) NSData * _Nonnull bssid; -@property (strong, nonatomic) NSNumber * _Nonnull channel; -@property (strong, nonatomic) NSNumber * _Nonnull wiFiBand; -@property (strong, nonatomic) NSNumber * _Nonnull rssi; -- (instancetype)init; +@interface MTRPowerSourceClusterBatChargeFaultChangeType : NSObject +@property (nonatomic, copy) NSArray * _Nonnull current; +@property (nonatomic, copy) NSArray * _Nonnull previous; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGeneralDiagnosticsClusterNetworkInterfaceType : NSObject -@property (strong, nonatomic) NSString * _Nonnull name; -@property (strong, nonatomic) NSNumber * _Nonnull isOperational; -@property (strong, nonatomic) NSNumber * _Nullable offPremiseServicesReachableIPv4; -@property (strong, nonatomic) NSNumber * _Nullable offPremiseServicesReachableIPv6; -@property (strong, nonatomic) NSData * _Nonnull hardwareAddress; -@property (strong, nonatomic) NSArray * _Nonnull iPv4Addresses; -@property (strong, nonatomic) NSArray * _Nonnull iPv6Addresses; -@property (strong, nonatomic) NSNumber * _Nonnull type; -- (instancetype)init; +@interface MTRPowerSourceClusterBatFaultChangeType : NSObject +@property (nonatomic, copy) NSArray * _Nonnull current; +@property (nonatomic, copy) NSArray * _Nonnull previous; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGeneralDiagnosticsClusterHardwareFaultChangeEvent : NSObject -@property (strong, nonatomic) NSArray * _Nonnull current; -@property (strong, nonatomic) NSArray * _Nonnull previous; -@end +@interface MTRPowerSourceClusterWiredFaultChangeType : NSObject +@property (nonatomic, copy) NSArray * _Nonnull current; +@property (nonatomic, copy) NSArray * _Nonnull previous; -@interface MTRGeneralDiagnosticsClusterRadioFaultChangeEvent : NSObject -@property (strong, nonatomic) NSArray * _Nonnull current; -@property (strong, nonatomic) NSArray * _Nonnull previous; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGeneralDiagnosticsClusterNetworkFaultChangeEvent : NSObject -@property (strong, nonatomic) NSArray * _Nonnull current; -@property (strong, nonatomic) NSArray * _Nonnull previous; -@end +@interface MTRGeneralCommissioningClusterBasicCommissioningInfo : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull failSafeExpiryLengthSeconds; +@property (nonatomic, copy) NSNumber * _Nonnull maxCumulativeFailsafeSeconds; -@interface MTRGeneralDiagnosticsClusterBootReasonEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull bootReason; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRSoftwareDiagnosticsClusterThreadMetrics : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull id; -@property (strong, nonatomic) NSString * _Nullable name; -@property (strong, nonatomic) NSNumber * _Nullable stackFreeCurrent; -@property (strong, nonatomic) NSNumber * _Nullable stackFreeMinimum; -@property (strong, nonatomic) NSNumber * _Nullable stackSize; -- (instancetype)init; +@interface MTRNetworkCommissioningClusterNetworkInfo : NSObject +@property (nonatomic, copy) NSData * _Nonnull networkID; +@property (nonatomic, copy) NSNumber * _Nonnull connected; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRSoftwareDiagnosticsClusterSoftwareFaultEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull id; -@property (strong, nonatomic) NSString * _Nullable name; -@property (strong, nonatomic) NSData * _Nullable faultRecording; -@end +@interface MTRNetworkCommissioningClusterThreadInterfaceScanResult : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull panId; +@property (nonatomic, copy) NSNumber * _Nonnull extendedPanId; +@property (nonatomic, copy) NSString * _Nonnull networkName; +@property (nonatomic, copy) NSNumber * _Nonnull channel; +@property (nonatomic, copy) NSNumber * _Nonnull version; +@property (nonatomic, copy) NSData * _Nonnull extendedAddress; +@property (nonatomic, copy) NSNumber * _Nonnull rssi; +@property (nonatomic, copy) NSNumber * _Nonnull lqi; -@interface MTRThreadNetworkDiagnosticsClusterNeighborTable : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull extAddress; -@property (strong, nonatomic) NSNumber * _Nonnull age; -@property (strong, nonatomic) NSNumber * _Nonnull rloc16; -@property (strong, nonatomic) NSNumber * _Nonnull linkFrameCounter; -@property (strong, nonatomic) NSNumber * _Nonnull mleFrameCounter; -@property (strong, nonatomic) NSNumber * _Nonnull lqi; -@property (strong, nonatomic) NSNumber * _Nullable averageRssi; -@property (strong, nonatomic) NSNumber * _Nullable lastRssi; -@property (strong, nonatomic) NSNumber * _Nonnull frameErrorRate; -@property (strong, nonatomic) NSNumber * _Nonnull messageErrorRate; -@property (strong, nonatomic) NSNumber * _Nonnull rxOnWhenIdle; -@property (strong, nonatomic) NSNumber * _Nonnull fullThreadDevice; -@property (strong, nonatomic) NSNumber * _Nonnull fullNetworkData; -@property (strong, nonatomic) NSNumber * _Nonnull isChild; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull activeTimestampPresent; -@property (strong, nonatomic) NSNumber * _Nonnull pendingTimestampPresent; -@property (strong, nonatomic) NSNumber * _Nonnull masterKeyPresent; -@property (strong, nonatomic) NSNumber * _Nonnull networkNamePresent; -@property (strong, nonatomic) NSNumber * _Nonnull extendedPanIdPresent; -@property (strong, nonatomic) NSNumber * _Nonnull meshLocalPrefixPresent; -@property (strong, nonatomic) NSNumber * _Nonnull delayPresent; -@property (strong, nonatomic) NSNumber * _Nonnull panIdPresent; -@property (strong, nonatomic) NSNumber * _Nonnull channelPresent; -@property (strong, nonatomic) NSNumber * _Nonnull pskcPresent; -@property (strong, nonatomic) NSNumber * _Nonnull securityPolicyPresent; -@property (strong, nonatomic) NSNumber * _Nonnull channelMaskPresent; -- (instancetype)init; +@interface MTRNetworkCommissioningClusterWiFiInterfaceScanResult : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull security; +@property (nonatomic, copy) NSData * _Nonnull ssid; +@property (nonatomic, copy) NSData * _Nonnull bssid; +@property (nonatomic, copy) NSNumber * _Nonnull channel; +@property (nonatomic, copy) NSNumber * _Nonnull wiFiBand; +@property (nonatomic, copy) NSNumber * _Nonnull rssi; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRThreadNetworkDiagnosticsClusterRouteTable : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull extAddress; -@property (strong, nonatomic) NSNumber * _Nonnull rloc16; -@property (strong, nonatomic) NSNumber * _Nonnull routerId; -@property (strong, nonatomic) NSNumber * _Nonnull nextHop; -@property (strong, nonatomic) NSNumber * _Nonnull pathCost; -@property (strong, nonatomic) NSNumber * _Nonnull lqiIn; -@property (strong, nonatomic) NSNumber * _Nonnull lqiOut; -@property (strong, nonatomic) NSNumber * _Nonnull age; -@property (strong, nonatomic) NSNumber * _Nonnull allocated; -@property (strong, nonatomic) NSNumber * _Nonnull linkEstablished; -- (instancetype)init; +@interface MTRGeneralDiagnosticsClusterNetworkInterfaceType : NSObject +@property (nonatomic, copy) NSString * _Nonnull name; +@property (nonatomic, copy) NSNumber * _Nonnull isOperational; +@property (nonatomic, copy) NSNumber * _Nullable offPremiseServicesReachableIPv4; +@property (nonatomic, copy) NSNumber * _Nullable offPremiseServicesReachableIPv6; +@property (nonatomic, copy) NSData * _Nonnull hardwareAddress; +@property (nonatomic, copy) NSArray * _Nonnull iPv4Addresses; +@property (nonatomic, copy) NSArray * _Nonnull iPv6Addresses; +@property (nonatomic, copy) NSNumber * _Nonnull type; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRThreadNetworkDiagnosticsClusterSecurityPolicy : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull rotationTime; -@property (strong, nonatomic) NSNumber * _Nonnull flags; -- (instancetype)init; +@interface MTRGeneralDiagnosticsClusterHardwareFaultChangeEvent : NSObject +@property (nonatomic, copy) NSArray * _Nonnull current; +@property (nonatomic, copy) NSArray * _Nonnull previous; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRThreadNetworkDiagnosticsClusterConnectionStatusEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull connectionStatus; -@end +@interface MTRGeneralDiagnosticsClusterRadioFaultChangeEvent : NSObject +@property (nonatomic, copy) NSArray * _Nonnull current; +@property (nonatomic, copy) NSArray * _Nonnull previous; -@interface MTRWiFiNetworkDiagnosticsClusterDisconnectionEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull reasonCode; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRWiFiNetworkDiagnosticsClusterAssociationFailureEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull associationFailure; -@property (strong, nonatomic) NSNumber * _Nonnull status; -@end +@interface MTRGeneralDiagnosticsClusterNetworkFaultChangeEvent : NSObject +@property (nonatomic, copy) NSArray * _Nonnull current; +@property (nonatomic, copy) NSArray * _Nonnull previous; -@interface MTRWiFiNetworkDiagnosticsClusterConnectionStatusEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull connectionStatus; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedDeviceBasicClusterStartUpEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull softwareVersion; -@end +@interface MTRGeneralDiagnosticsClusterBootReasonEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull bootReason; -@interface MTRBridgedDeviceBasicClusterShutDownEvent : NSObject +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBridgedDeviceBasicClusterLeaveEvent : NSObject -@end +@interface MTRSoftwareDiagnosticsClusterThreadMetrics : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull id; +@property (nonatomic, copy) NSString * _Nullable name; +@property (nonatomic, copy) NSNumber * _Nullable stackFreeCurrent; +@property (nonatomic, copy) NSNumber * _Nullable stackFreeMinimum; +@property (nonatomic, copy) NSNumber * _Nullable stackSize; -@interface MTRBridgedDeviceBasicClusterReachableChangedEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull reachableNewValue; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRSwitchClusterSwitchLatchedEvent : NSObject -@property (strong, nonatomic, getter=getNewPosition) NSNumber * _Nonnull newPosition; -@end +@interface MTRSoftwareDiagnosticsClusterSoftwareFaultEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull id; +@property (nonatomic, copy) NSString * _Nullable name; +@property (nonatomic, copy) NSData * _Nullable faultRecording; -@interface MTRSwitchClusterInitialPressEvent : NSObject -@property (strong, nonatomic, getter=getNewPosition) NSNumber * _Nonnull newPosition; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRSwitchClusterLongPressEvent : NSObject -@property (strong, nonatomic, getter=getNewPosition) NSNumber * _Nonnull newPosition; -@end +@interface MTRThreadNetworkDiagnosticsClusterNeighborTable : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull extAddress; +@property (nonatomic, copy) NSNumber * _Nonnull age; +@property (nonatomic, copy) NSNumber * _Nonnull rloc16; +@property (nonatomic, copy) NSNumber * _Nonnull linkFrameCounter; +@property (nonatomic, copy) NSNumber * _Nonnull mleFrameCounter; +@property (nonatomic, copy) NSNumber * _Nonnull lqi; +@property (nonatomic, copy) NSNumber * _Nullable averageRssi; +@property (nonatomic, copy) NSNumber * _Nullable lastRssi; +@property (nonatomic, copy) NSNumber * _Nonnull frameErrorRate; +@property (nonatomic, copy) NSNumber * _Nonnull messageErrorRate; +@property (nonatomic, copy) NSNumber * _Nonnull rxOnWhenIdle; +@property (nonatomic, copy) NSNumber * _Nonnull fullThreadDevice; +@property (nonatomic, copy) NSNumber * _Nonnull fullNetworkData; +@property (nonatomic, copy) NSNumber * _Nonnull isChild; -@interface MTRSwitchClusterShortReleaseEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull previousPosition; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRSwitchClusterLongReleaseEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull previousPosition; -@end +@interface MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull activeTimestampPresent; +@property (nonatomic, copy) NSNumber * _Nonnull pendingTimestampPresent; +@property (nonatomic, copy) NSNumber * _Nonnull masterKeyPresent; +@property (nonatomic, copy) NSNumber * _Nonnull networkNamePresent; +@property (nonatomic, copy) NSNumber * _Nonnull extendedPanIdPresent; +@property (nonatomic, copy) NSNumber * _Nonnull meshLocalPrefixPresent; +@property (nonatomic, copy) NSNumber * _Nonnull delayPresent; +@property (nonatomic, copy) NSNumber * _Nonnull panIdPresent; +@property (nonatomic, copy) NSNumber * _Nonnull channelPresent; +@property (nonatomic, copy) NSNumber * _Nonnull pskcPresent; +@property (nonatomic, copy) NSNumber * _Nonnull securityPolicyPresent; +@property (nonatomic, copy) NSNumber * _Nonnull channelMaskPresent; -@interface MTRSwitchClusterMultiPressOngoingEvent : NSObject -@property (strong, nonatomic, getter=getNewPosition) NSNumber * _Nonnull newPosition; -@property (strong, nonatomic) NSNumber * _Nonnull currentNumberOfPressesCounted; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRSwitchClusterMultiPressCompleteEvent : NSObject -@property (strong, nonatomic, getter=getNewPosition) NSNumber * _Nonnull newPosition; -@property (strong, nonatomic) NSNumber * _Nonnull totalNumberOfPressesCounted; -@end +@interface MTRThreadNetworkDiagnosticsClusterRouteTable : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull extAddress; +@property (nonatomic, copy) NSNumber * _Nonnull rloc16; +@property (nonatomic, copy) NSNumber * _Nonnull routerId; +@property (nonatomic, copy) NSNumber * _Nonnull nextHop; +@property (nonatomic, copy) NSNumber * _Nonnull pathCost; +@property (nonatomic, copy) NSNumber * _Nonnull lqiIn; +@property (nonatomic, copy) NSNumber * _Nonnull lqiOut; +@property (nonatomic, copy) NSNumber * _Nonnull age; +@property (nonatomic, copy) NSNumber * _Nonnull allocated; +@property (nonatomic, copy) NSNumber * _Nonnull linkEstablished; -@interface MTROperationalCredentialsClusterFabricDescriptor : NSObject -@property (strong, nonatomic) NSData * _Nonnull rootPublicKey; -@property (strong, nonatomic) NSNumber * _Nonnull vendorId; -@property (strong, nonatomic) NSNumber * _Nonnull fabricId; -@property (strong, nonatomic) NSNumber * _Nonnull nodeId; -@property (strong, nonatomic) NSString * _Nonnull label; -@property (strong, nonatomic) NSNumber * _Nonnull fabricIndex; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTROperationalCredentialsClusterNOCStruct : NSObject -@property (strong, nonatomic) NSData * _Nonnull noc; -@property (strong, nonatomic) NSData * _Nullable icac; -@property (strong, nonatomic) NSNumber * _Nonnull fabricIndex; -- (instancetype)init; +@interface MTRThreadNetworkDiagnosticsClusterSecurityPolicy : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull rotationTime; +@property (nonatomic, copy) NSNumber * _Nonnull flags; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupKeyManagementClusterGroupInfoMapStruct : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSArray * _Nonnull endpoints; -@property (strong, nonatomic) NSString * _Nullable groupName; -@property (strong, nonatomic) NSNumber * _Nonnull fabricIndex; -- (instancetype)init; +@interface MTRThreadNetworkDiagnosticsClusterConnectionStatusEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull connectionStatus; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupKeyManagementClusterGroupKeyMapStruct : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull groupKeySetID; -@property (strong, nonatomic) NSNumber * _Nonnull fabricIndex; -- (instancetype)init; +@interface MTRWiFiNetworkDiagnosticsClusterDisconnectionEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull reasonCode; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRGroupKeyManagementClusterGroupKeySetStruct : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull groupKeySetID; -@property (strong, nonatomic) NSNumber * _Nonnull groupKeySecurityPolicy; -@property (strong, nonatomic) NSData * _Nullable epochKey0; -@property (strong, nonatomic) NSNumber * _Nullable epochStartTime0; -@property (strong, nonatomic) NSData * _Nullable epochKey1; -@property (strong, nonatomic) NSNumber * _Nullable epochStartTime1; -@property (strong, nonatomic) NSData * _Nullable epochKey2; -@property (strong, nonatomic) NSNumber * _Nullable epochStartTime2; -- (instancetype)init; +@interface MTRWiFiNetworkDiagnosticsClusterAssociationFailureEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull associationFailure; +@property (nonatomic, copy) NSNumber * _Nonnull status; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRFixedLabelClusterLabelStruct : NSObject -@property (strong, nonatomic) NSString * _Nonnull label; -@property (strong, nonatomic) NSString * _Nonnull value; -- (instancetype)init; +@interface MTRWiFiNetworkDiagnosticsClusterConnectionStatusEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull connectionStatus; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRUserLabelClusterLabelStruct : NSObject -@property (strong, nonatomic) NSString * _Nonnull label; -@property (strong, nonatomic) NSString * _Nonnull value; -- (instancetype)init; +@interface MTRBridgedDeviceBasicClusterStartUpEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull softwareVersion; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRBooleanStateClusterStateChangeEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull stateValue; -@end +@interface MTRBridgedDeviceBasicClusterShutDownEvent : NSObject -@interface MTRModeSelectClusterSemanticTag : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull mfgCode; -@property (strong, nonatomic) NSNumber * _Nonnull value; - (instancetype)init; - +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRModeSelectClusterModeOptionStruct : NSObject -@property (strong, nonatomic) NSString * _Nonnull label; -@property (strong, nonatomic) NSNumber * _Nonnull mode; -@property (strong, nonatomic) NSArray * _Nonnull semanticTags; -- (instancetype)init; +@interface MTRBridgedDeviceBasicClusterLeaveEvent : NSObject +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterDlCredential : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull credentialType; -@property (strong, nonatomic) NSNumber * _Nonnull credentialIndex; -- (instancetype)init; +@interface MTRBridgedDeviceBasicClusterReachableChangedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull reachableNewValue; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterDoorLockAlarmEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull alarmCode; -@end +@interface MTRSwitchClusterSwitchLatchedEvent : NSObject +@property (nonatomic, copy, getter=getNewPosition) NSNumber * _Nonnull newPosition; -@interface MTRDoorLockClusterDoorStateChangeEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull doorState; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterLockOperationEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull lockOperationType; -@property (strong, nonatomic) NSNumber * _Nonnull operationSource; -@property (strong, nonatomic) NSNumber * _Nullable userIndex; -@property (strong, nonatomic) NSNumber * _Nullable fabricIndex; -@property (strong, nonatomic) NSNumber * _Nullable sourceNode; -@property (strong, nonatomic) NSArray * _Nullable credentials; -@end +@interface MTRSwitchClusterInitialPressEvent : NSObject +@property (nonatomic, copy, getter=getNewPosition) NSNumber * _Nonnull newPosition; -@interface MTRDoorLockClusterLockOperationErrorEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull lockOperationType; -@property (strong, nonatomic) NSNumber * _Nonnull operationSource; -@property (strong, nonatomic) NSNumber * _Nonnull operationError; -@property (strong, nonatomic) NSNumber * _Nullable userIndex; -@property (strong, nonatomic) NSNumber * _Nullable fabricIndex; -@property (strong, nonatomic) NSNumber * _Nullable sourceNode; -@property (strong, nonatomic) NSArray * _Nullable credentials; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRDoorLockClusterLockUserChangeEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull lockDataType; -@property (strong, nonatomic) NSNumber * _Nonnull dataOperationType; -@property (strong, nonatomic) NSNumber * _Nonnull operationSource; -@property (strong, nonatomic) NSNumber * _Nullable userIndex; -@property (strong, nonatomic) NSNumber * _Nullable fabricIndex; -@property (strong, nonatomic) NSNumber * _Nullable sourceNode; -@property (strong, nonatomic) NSNumber * _Nullable dataIndex; -@end +@interface MTRSwitchClusterLongPressEvent : NSObject +@property (nonatomic, copy, getter=getNewPosition) NSNumber * _Nonnull newPosition; -@interface MTRPumpConfigurationAndControlClusterSupplyVoltageLowEvent : NSObject +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterSupplyVoltageHighEvent : NSObject -@end +@interface MTRSwitchClusterShortReleaseEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull previousPosition; -@interface MTRPumpConfigurationAndControlClusterPowerMissingPhaseEvent : NSObject +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterSystemPressureLowEvent : NSObject -@end +@interface MTRSwitchClusterLongReleaseEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull previousPosition; -@interface MTRPumpConfigurationAndControlClusterSystemPressureHighEvent : NSObject +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterDryRunningEvent : NSObject +@interface MTRSwitchClusterMultiPressOngoingEvent : NSObject +@property (nonatomic, copy, getter=getNewPosition) NSNumber * _Nonnull newPosition; +@property (nonatomic, copy) NSNumber * _Nonnull currentNumberOfPressesCounted; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterMotorTemperatureHighEvent : NSObject +@interface MTRSwitchClusterMultiPressCompleteEvent : NSObject +@property (nonatomic, copy, getter=getNewPosition) NSNumber * _Nonnull newPosition; +@property (nonatomic, copy) NSNumber * _Nonnull totalNumberOfPressesCounted; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterPumpMotorFatalFailureEvent : NSObject +@interface MTROperationalCredentialsClusterFabricDescriptor : NSObject +@property (nonatomic, copy) NSData * _Nonnull rootPublicKey; +@property (nonatomic, copy) NSNumber * _Nonnull vendorId; +@property (nonatomic, copy) NSNumber * _Nonnull fabricId; +@property (nonatomic, copy) NSNumber * _Nonnull nodeId; +@property (nonatomic, copy) NSString * _Nonnull label; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterElectronicTemperatureHighEvent : NSObject +@interface MTROperationalCredentialsClusterNOCStruct : NSObject +@property (nonatomic, copy) NSData * _Nonnull noc; +@property (nonatomic, copy) NSData * _Nullable icac; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterPumpBlockedEvent : NSObject +@interface MTRGroupKeyManagementClusterGroupInfoMapStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSArray * _Nonnull endpoints; +@property (nonatomic, copy) NSString * _Nullable groupName; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterSensorFailureEvent : NSObject +@interface MTRGroupKeyManagementClusterGroupKeyMapStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull groupId; +@property (nonatomic, copy) NSNumber * _Nonnull groupKeySetID; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterElectronicNonFatalFailureEvent : NSObject +@interface MTRGroupKeyManagementClusterGroupKeySetStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull groupKeySetID; +@property (nonatomic, copy) NSNumber * _Nonnull groupKeySecurityPolicy; +@property (nonatomic, copy) NSData * _Nullable epochKey0; +@property (nonatomic, copy) NSNumber * _Nullable epochStartTime0; +@property (nonatomic, copy) NSData * _Nullable epochKey1; +@property (nonatomic, copy) NSNumber * _Nullable epochStartTime1; +@property (nonatomic, copy) NSData * _Nullable epochKey2; +@property (nonatomic, copy) NSNumber * _Nullable epochStartTime2; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterElectronicFatalFailureEvent : NSObject +@interface MTRFixedLabelClusterLabelStruct : NSObject +@property (nonatomic, copy) NSString * _Nonnull label; +@property (nonatomic, copy) NSString * _Nonnull value; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterGeneralFaultEvent : NSObject +@interface MTRUserLabelClusterLabelStruct : NSObject +@property (nonatomic, copy) NSString * _Nonnull label; +@property (nonatomic, copy) NSString * _Nonnull value; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterLeakageEvent : NSObject +@interface MTRBooleanStateClusterStateChangeEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull stateValue; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterAirDetectionEvent : NSObject +@interface MTRModeSelectClusterSemanticTag : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull mfgCode; +@property (nonatomic, copy) NSNumber * _Nonnull value; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRPumpConfigurationAndControlClusterTurbineOperationEvent : NSObject +@interface MTRModeSelectClusterModeOptionStruct : NSObject +@property (nonatomic, copy) NSString * _Nonnull label; +@property (nonatomic, copy) NSNumber * _Nonnull mode; +@property (nonatomic, copy) NSArray * _Nonnull semanticTags; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRThermostatClusterThermostatScheduleTransition : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull transitionTime; -@property (strong, nonatomic) NSNumber * _Nullable heatSetpoint; -@property (strong, nonatomic) NSNumber * _Nullable coolSetpoint; +@interface MTRDoorLockClusterDlCredential : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull credentialType; +@property (nonatomic, copy) NSNumber * _Nonnull credentialIndex; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end +@interface MTRDoorLockClusterDoorLockAlarmEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull alarmCode; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRChannelClusterChannelInfo : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull majorNumber; -@property (strong, nonatomic) NSNumber * _Nonnull minorNumber; -@property (strong, nonatomic) NSString * _Nullable name; -@property (strong, nonatomic) NSString * _Nullable callSign; -@property (strong, nonatomic) NSString * _Nullable affiliateCallSign; +@interface MTRDoorLockClusterDoorStateChangeEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull doorState; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRDoorLockClusterLockOperationEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull lockOperationType; +@property (nonatomic, copy) NSNumber * _Nonnull operationSource; +@property (nonatomic, copy) NSNumber * _Nullable userIndex; +@property (nonatomic, copy) NSNumber * _Nullable fabricIndex; +@property (nonatomic, copy) NSNumber * _Nullable sourceNode; +@property (nonatomic, copy) NSArray * _Nullable credentials; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRChannelClusterLineupInfo : NSObject -@property (strong, nonatomic) NSString * _Nonnull operatorName; -@property (strong, nonatomic) NSString * _Nullable lineupName; -@property (strong, nonatomic) NSString * _Nullable postalCode; -@property (strong, nonatomic) NSNumber * _Nonnull lineupInfoType; +@interface MTRDoorLockClusterLockOperationErrorEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull lockOperationType; +@property (nonatomic, copy) NSNumber * _Nonnull operationSource; +@property (nonatomic, copy) NSNumber * _Nonnull operationError; +@property (nonatomic, copy) NSNumber * _Nullable userIndex; +@property (nonatomic, copy) NSNumber * _Nullable fabricIndex; +@property (nonatomic, copy) NSNumber * _Nullable sourceNode; +@property (nonatomic, copy) NSArray * _Nullable credentials; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRDoorLockClusterLockUserChangeEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull lockDataType; +@property (nonatomic, copy) NSNumber * _Nonnull dataOperationType; +@property (nonatomic, copy) NSNumber * _Nonnull operationSource; +@property (nonatomic, copy) NSNumber * _Nullable userIndex; +@property (nonatomic, copy) NSNumber * _Nullable fabricIndex; +@property (nonatomic, copy) NSNumber * _Nullable sourceNode; +@property (nonatomic, copy) NSNumber * _Nullable dataIndex; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTargetNavigatorClusterTargetInfo : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull identifier; -@property (strong, nonatomic) NSString * _Nonnull name; +@interface MTRPumpConfigurationAndControlClusterSupplyVoltageLowEvent : NSObject + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end +@interface MTRPumpConfigurationAndControlClusterSupplyVoltageHighEvent : NSObject + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaPlaybackClusterPlaybackPosition : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull updatedAt; -@property (strong, nonatomic) NSNumber * _Nullable position; +@interface MTRPumpConfigurationAndControlClusterPowerMissingPhaseEvent : NSObject + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRPumpConfigurationAndControlClusterSystemPressureLowEvent : NSObject +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRMediaInputClusterInputInfo : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull index; -@property (strong, nonatomic) NSNumber * _Nonnull inputType; -@property (strong, nonatomic) NSString * _Nonnull name; -@property (strong, nonatomic) NSString * _Nonnull descriptionString; +@interface MTRPumpConfigurationAndControlClusterSystemPressureHighEvent : NSObject + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRPumpConfigurationAndControlClusterDryRunningEvent : NSObject +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRContentLauncherClusterDimension : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull width; -@property (strong, nonatomic) NSNumber * _Nonnull height; -@property (strong, nonatomic) NSNumber * _Nonnull metric; +@interface MTRPumpConfigurationAndControlClusterMotorTemperatureHighEvent : NSObject + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end +@interface MTRPumpConfigurationAndControlClusterPumpMotorFatalFailureEvent : NSObject + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRContentLauncherClusterAdditionalInfo : NSObject -@property (strong, nonatomic) NSString * _Nonnull name; -@property (strong, nonatomic) NSString * _Nonnull value; +@interface MTRPumpConfigurationAndControlClusterElectronicTemperatureHighEvent : NSObject + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end +@interface MTRPumpConfigurationAndControlClusterPumpBlockedEvent : NSObject + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRContentLauncherClusterParameter : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull type; -@property (strong, nonatomic) NSString * _Nonnull value; -@property (strong, nonatomic) NSArray * _Nullable externalIDList; +@interface MTRPumpConfigurationAndControlClusterSensorFailureEvent : NSObject + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRPumpConfigurationAndControlClusterElectronicNonFatalFailureEvent : NSObject +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRContentLauncherClusterContentSearch : NSObject -@property (strong, nonatomic) NSArray * _Nonnull parameterList; +@interface MTRPumpConfigurationAndControlClusterElectronicFatalFailureEvent : NSObject + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRPumpConfigurationAndControlClusterGeneralFaultEvent : NSObject +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRContentLauncherClusterStyleInformation : NSObject -@property (strong, nonatomic) NSString * _Nullable imageUrl; -@property (strong, nonatomic) NSString * _Nullable color; -@property (strong, nonatomic) MTRContentLauncherClusterDimension * _Nullable size; +@interface MTRPumpConfigurationAndControlClusterLeakageEvent : NSObject + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end +@interface MTRPumpConfigurationAndControlClusterAirDetectionEvent : NSObject + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRContentLauncherClusterBrandingInformation : NSObject -@property (strong, nonatomic) NSString * _Nonnull providerName; -@property (strong, nonatomic) MTRContentLauncherClusterStyleInformation * _Nullable background; -@property (strong, nonatomic) MTRContentLauncherClusterStyleInformation * _Nullable logo; -@property (strong, nonatomic) MTRContentLauncherClusterStyleInformation * _Nullable progressBar; -@property (strong, nonatomic) MTRContentLauncherClusterStyleInformation * _Nullable splash; -@property (strong, nonatomic) MTRContentLauncherClusterStyleInformation * _Nullable waterMark; +@interface MTRPumpConfigurationAndControlClusterTurbineOperationEvent : NSObject + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRThermostatClusterThermostatScheduleTransition : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime; +@property (nonatomic, copy) NSNumber * _Nullable heatSetpoint; +@property (nonatomic, copy) NSNumber * _Nullable coolSetpoint; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRAudioOutputClusterOutputInfo : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull index; -@property (strong, nonatomic) NSNumber * _Nonnull outputType; -@property (strong, nonatomic) NSString * _Nonnull name; +@interface MTRChannelClusterChannelInfo : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull majorNumber; +@property (nonatomic, copy) NSNumber * _Nonnull minorNumber; +@property (nonatomic, copy) NSString * _Nullable name; +@property (nonatomic, copy) NSString * _Nullable callSign; +@property (nonatomic, copy) NSString * _Nullable affiliateCallSign; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRChannelClusterLineupInfo : NSObject +@property (nonatomic, copy) NSString * _Nonnull operatorName; +@property (nonatomic, copy) NSString * _Nullable lineupName; +@property (nonatomic, copy) NSString * _Nullable postalCode; +@property (nonatomic, copy) NSNumber * _Nonnull lineupInfoType; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRApplicationLauncherClusterApplication : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull catalogVendorId; -@property (strong, nonatomic) NSString * _Nonnull applicationId; +@interface MTRTargetNavigatorClusterTargetInfo : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull identifier; +@property (nonatomic, copy) NSString * _Nonnull name; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end +@interface MTRMediaPlaybackClusterPlaybackPosition : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull updatedAt; +@property (nonatomic, copy) NSNumber * _Nullable position; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRApplicationLauncherClusterApplicationEP : NSObject -@property (strong, nonatomic) MTRApplicationLauncherClusterApplication * _Nonnull application; -@property (strong, nonatomic) NSNumber * _Nullable endpoint; +@interface MTRMediaInputClusterInputInfo : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull index; +@property (nonatomic, copy) NSNumber * _Nonnull inputType; +@property (nonatomic, copy) NSString * _Nonnull name; +@property (nonatomic, copy) NSString * _Nonnull descriptionString; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end +@interface MTRContentLauncherClusterDimension : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull width; +@property (nonatomic, copy) NSNumber * _Nonnull height; +@property (nonatomic, copy) NSNumber * _Nonnull metric; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRApplicationBasicClusterApplicationBasicApplication : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull catalogVendorId; -@property (strong, nonatomic) NSString * _Nonnull applicationId; +@interface MTRContentLauncherClusterAdditionalInfo : NSObject +@property (nonatomic, copy) NSString * _Nonnull name; +@property (nonatomic, copy) NSString * _Nonnull value; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRContentLauncherClusterParameter : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull type; +@property (nonatomic, copy) NSString * _Nonnull value; +@property (nonatomic, copy) NSArray * _Nullable externalIDList; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterSimpleStruct : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull a; -@property (strong, nonatomic) NSNumber * _Nonnull b; -@property (strong, nonatomic) NSNumber * _Nonnull c; -@property (strong, nonatomic) NSData * _Nonnull d; -@property (strong, nonatomic) NSString * _Nonnull e; -@property (strong, nonatomic) NSNumber * _Nonnull f; -@property (strong, nonatomic) NSNumber * _Nonnull g; -@property (strong, nonatomic) NSNumber * _Nonnull h; +@interface MTRContentLauncherClusterContentSearch : NSObject +@property (nonatomic, copy) NSArray * _Nonnull parameterList; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRContentLauncherClusterStyleInformation : NSObject +@property (nonatomic, copy) NSString * _Nullable imageUrl; +@property (nonatomic, copy) NSString * _Nullable color; +@property (nonatomic, copy) MTRContentLauncherClusterDimension * _Nullable size; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestFabricScoped : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull fabricSensitiveInt8u; -@property (strong, nonatomic) NSNumber * _Nullable optionalFabricSensitiveInt8u; -@property (strong, nonatomic) NSNumber * _Nullable nullableFabricSensitiveInt8u; -@property (strong, nonatomic) NSNumber * _Nullable nullableOptionalFabricSensitiveInt8u; -@property (strong, nonatomic) NSString * _Nonnull fabricSensitiveCharString; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nonnull fabricSensitiveStruct; -@property (strong, nonatomic) NSArray * _Nonnull fabricSensitiveInt8uList; -@property (strong, nonatomic) NSNumber * _Nonnull fabricIndex; +@interface MTRContentLauncherClusterBrandingInformation : NSObject +@property (nonatomic, copy) NSString * _Nonnull providerName; +@property (nonatomic, copy) MTRContentLauncherClusterStyleInformation * _Nullable background; +@property (nonatomic, copy) MTRContentLauncherClusterStyleInformation * _Nullable logo; +@property (nonatomic, copy) MTRContentLauncherClusterStyleInformation * _Nullable progressBar; +@property (nonatomic, copy) MTRContentLauncherClusterStyleInformation * _Nullable splash; +@property (nonatomic, copy) MTRContentLauncherClusterStyleInformation * _Nullable waterMark; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end +@interface MTRAudioOutputClusterOutputInfo : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull index; +@property (nonatomic, copy) NSNumber * _Nonnull outputType; +@property (nonatomic, copy) NSString * _Nonnull name; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterNullablesAndOptionalsStruct : NSObject -@property (strong, nonatomic) NSNumber * _Nullable nullableInt; -@property (strong, nonatomic) NSNumber * _Nullable optionalInt; -@property (strong, nonatomic) NSNumber * _Nullable nullableOptionalInt; -@property (strong, nonatomic) NSString * _Nullable nullableString; -@property (strong, nonatomic) NSString * _Nullable optionalString; -@property (strong, nonatomic) NSString * _Nullable nullableOptionalString; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nullable nullableStruct; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nullable optionalStruct; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nullable nullableOptionalStruct; -@property (strong, nonatomic) NSArray * _Nullable nullableList; -@property (strong, nonatomic) NSArray * _Nullable optionalList; -@property (strong, nonatomic) NSArray * _Nullable nullableOptionalList; +@interface MTRApplicationLauncherClusterApplication : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull catalogVendorId; +@property (nonatomic, copy) NSString * _Nonnull applicationId; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRApplicationLauncherClusterApplicationEP : NSObject +@property (nonatomic, copy) MTRApplicationLauncherClusterApplication * _Nonnull application; +@property (nonatomic, copy) NSNumber * _Nullable endpoint; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterNestedStruct : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull a; -@property (strong, nonatomic) NSNumber * _Nonnull b; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nonnull c; +@interface MTRApplicationBasicClusterApplicationBasicApplication : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull catalogVendorId; +@property (nonatomic, copy) NSString * _Nonnull applicationId; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRTestClusterClusterSimpleStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull a; +@property (nonatomic, copy) NSNumber * _Nonnull b; +@property (nonatomic, copy) NSNumber * _Nonnull c; +@property (nonatomic, copy) NSData * _Nonnull d; +@property (nonatomic, copy) NSString * _Nonnull e; +@property (nonatomic, copy) NSNumber * _Nonnull f; +@property (nonatomic, copy) NSNumber * _Nonnull g; +@property (nonatomic, copy) NSNumber * _Nonnull h; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterNestedStructList : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull a; -@property (strong, nonatomic) NSNumber * _Nonnull b; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nonnull c; -@property (strong, nonatomic) NSArray * _Nonnull d; -@property (strong, nonatomic) NSArray * _Nonnull e; -@property (strong, nonatomic) NSArray * _Nonnull f; -@property (strong, nonatomic) NSArray * _Nonnull g; +@interface MTRTestClusterClusterTestFabricScoped : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull fabricSensitiveInt8u; +@property (nonatomic, copy) NSNumber * _Nullable optionalFabricSensitiveInt8u; +@property (nonatomic, copy) NSNumber * _Nullable nullableFabricSensitiveInt8u; +@property (nonatomic, copy) NSNumber * _Nullable nullableOptionalFabricSensitiveInt8u; +@property (nonatomic, copy) NSString * _Nonnull fabricSensitiveCharString; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull fabricSensitiveStruct; +@property (nonatomic, copy) NSArray * _Nonnull fabricSensitiveInt8uList; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end +@interface MTRTestClusterClusterNullablesAndOptionalsStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nullable nullableInt; +@property (nonatomic, copy) NSNumber * _Nullable optionalInt; +@property (nonatomic, copy) NSNumber * _Nullable nullableOptionalInt; +@property (nonatomic, copy) NSString * _Nullable nullableString; +@property (nonatomic, copy) NSString * _Nullable optionalString; +@property (nonatomic, copy) NSString * _Nullable nullableOptionalString; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable nullableStruct; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable optionalStruct; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable nullableOptionalStruct; +@property (nonatomic, copy) NSArray * _Nullable nullableList; +@property (nonatomic, copy) NSArray * _Nullable optionalList; +@property (nonatomic, copy) NSArray * _Nullable nullableOptionalList; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterDoubleNestedStructList : NSObject -@property (strong, nonatomic) NSArray * _Nonnull a; +@interface MTRTestClusterClusterNestedStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull a; +@property (nonatomic, copy) NSNumber * _Nonnull b; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull c; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end +@interface MTRTestClusterClusterNestedStructList : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull a; +@property (nonatomic, copy) NSNumber * _Nonnull b; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull c; +@property (nonatomic, copy) NSArray * _Nonnull d; +@property (nonatomic, copy) NSArray * _Nonnull e; +@property (nonatomic, copy) NSArray * _Nonnull f; +@property (nonatomic, copy) NSArray * _Nonnull g; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestListStructOctet : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull member1; -@property (strong, nonatomic) NSData * _Nonnull member2; +@interface MTRTestClusterClusterDoubleNestedStructList : NSObject +@property (nonatomic, copy) NSArray * _Nonnull a; + - (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +@end + +@interface MTRTestClusterClusterTestListStructOctet : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull member1; +@property (nonatomic, copy) NSData * _Nonnull member2; +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestEventEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull arg1; -@property (strong, nonatomic) NSNumber * _Nonnull arg2; -@property (strong, nonatomic) NSNumber * _Nonnull arg3; -@property (strong, nonatomic) MTRTestClusterClusterSimpleStruct * _Nonnull arg4; -@property (strong, nonatomic) NSArray * _Nonnull arg5; -@property (strong, nonatomic) NSArray * _Nonnull arg6; +@interface MTRTestClusterClusterTestEventEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull arg1; +@property (nonatomic, copy) NSNumber * _Nonnull arg2; +@property (nonatomic, copy) NSNumber * _Nonnull arg3; +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull arg4; +@property (nonatomic, copy) NSArray * _Nonnull arg5; +@property (nonatomic, copy) NSArray * _Nonnull arg6; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end -@interface MTRTestClusterClusterTestFabricScopedEventEvent : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull arg1; +@interface MTRTestClusterClusterTestFabricScopedEventEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex; + +- (instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index ca7bfb733f967a..740c4d61bbbc51 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -33,6 +33,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRScenesClusterAttributeValuePair alloc] init]; + + other.attributeId = self.attributeId; + other.attributeValue = self.attributeValue; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: attributeId:%@; attributeValue:%@; >", @@ -54,6 +64,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRScenesClusterExtensionFieldSet alloc] init]; + + other.clusterId = self.clusterId; + other.attributeValueList = self.attributeValueList; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: clusterId:%@; attributeValueList:%@; >", @@ -75,6 +95,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRDescriptorClusterDeviceType alloc] init]; + + other.type = self.type; + other.revision = self.revision; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -102,6 +132,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBindingClusterTargetStruct alloc] init]; + + other.node = self.node; + other.group = self.group; + other.endpoint = self.endpoint; + other.cluster = self.cluster; + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: node:%@; group:%@; endpoint:%@; cluster:%@; fabricIndex:%@; >", @@ -125,6 +168,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRAccessControlClusterTarget alloc] init]; + + other.cluster = self.cluster; + other.endpoint = self.endpoint; + other.deviceType = self.deviceType; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: cluster:%@; endpoint:%@; deviceType:%@; >", @@ -152,6 +206,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRAccessControlClusterAccessControlEntry alloc] init]; + + other.privilege = self.privilege; + other.authMode = self.authMode; + other.subjects = self.subjects; + other.targets = self.targets; + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -174,6 +241,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRAccessControlClusterExtensionEntry alloc] init]; + + other.data = self.data; + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: data:%@; fabricIndex:%@; >", NSStringFromClass([self class]), @@ -196,16 +273,29 @@ - (instancetype)init _latestValue = nil; - _adminFabricIndex = @(0); + _fabricIndex = @(0); } return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRAccessControlClusterAccessControlEntryChangedEvent alloc] init]; + + other.adminNodeID = self.adminNodeID; + other.adminPasscodeID = self.adminPasscodeID; + other.changeType = self.changeType; + other.latestValue = self.latestValue; + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { - NSString * descriptionString = [NSString - stringWithFormat:@"<%@: adminNodeID:%@; adminPasscodeID:%@; changeType:%@; latestValue:%@; adminFabricIndex:%@; >", - NSStringFromClass([self class]), _adminNodeID, _adminPasscodeID, _changeType, _latestValue, _adminFabricIndex]; + NSString * descriptionString = + [NSString stringWithFormat:@"<%@: adminNodeID:%@; adminPasscodeID:%@; changeType:%@; latestValue:%@; fabricIndex:%@; >", + NSStringFromClass([self class]), _adminNodeID, _adminPasscodeID, _changeType, _latestValue, _fabricIndex]; return descriptionString; } @@ -224,16 +314,29 @@ - (instancetype)init _latestValue = nil; - _adminFabricIndex = @(0); + _fabricIndex = @(0); } return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRAccessControlClusterAccessControlExtensionChangedEvent alloc] init]; + + other.adminNodeID = self.adminNodeID; + other.adminPasscodeID = self.adminPasscodeID; + other.changeType = self.changeType; + other.latestValue = self.latestValue; + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { - NSString * descriptionString = [NSString - stringWithFormat:@"<%@: adminNodeID:%@; adminPasscodeID:%@; changeType:%@; latestValue:%@; adminFabricIndex:%@; >", - NSStringFromClass([self class]), _adminNodeID, _adminPasscodeID, _changeType, _latestValue, _adminFabricIndex]; + NSString * descriptionString = + [NSString stringWithFormat:@"<%@: adminNodeID:%@; adminPasscodeID:%@; changeType:%@; latestValue:%@; fabricIndex:%@; >", + NSStringFromClass([self class]), _adminNodeID, _adminPasscodeID, _changeType, _latestValue, _fabricIndex]; return descriptionString; } @@ -259,6 +362,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBridgedActionsClusterActionStruct alloc] init]; + + other.actionID = self.actionID; + other.name = self.name; + other.type = self.type; + other.endpointListID = self.endpointListID; + other.supportedCommands = self.supportedCommands; + other.status = self.status; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -285,6 +402,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBridgedActionsClusterEndpointListStruct alloc] init]; + + other.endpointListID = self.endpointListID; + other.name = self.name; + other.type = self.type; + other.endpoints = self.endpoints; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: endpointListID:%@; name:%@; type:%@; endpoints:%@; >", @@ -308,6 +437,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBridgedActionsClusterStateChangedEvent alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.newState = self.newState; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; newState:%@; >", @@ -333,6 +473,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBridgedActionsClusterActionFailedEvent alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.newState = self.newState; + other.error = self.error; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; newState:%@; error:%@; >", @@ -354,6 +506,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBasicClusterCapabilityMinimaStruct alloc] init]; + + other.caseSessionsPerFabric = self.caseSessionsPerFabric; + other.subscriptionsPerFabric = self.subscriptionsPerFabric; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: caseSessionsPerFabric:%@; subscriptionsPerFabric:%@; >", @@ -373,6 +535,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBasicClusterStartUpEvent alloc] init]; + + other.softwareVersion = self.softwareVersion; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -390,6 +561,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBasicClusterShutDownEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -402,13 +580,25 @@ @implementation MTRBasicClusterLeaveEvent - (instancetype)init { if (self = [super init]) { + + _fabricIndex = @(0); } return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBasicClusterLeaveEvent alloc] init]; + + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = + [NSString stringWithFormat:@"<%@: fabricIndex:%@; >", NSStringFromClass([self class]), _fabricIndex]; return descriptionString; } @@ -424,6 +614,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBasicClusterReachableChangedEvent alloc] init]; + + other.reachableNewValue = self.reachableNewValue; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -447,6 +646,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTROtaSoftwareUpdateRequestorClusterProviderLocation alloc] init]; + + other.providerNodeID = self.providerNodeID; + other.endpoint = self.endpoint; + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: providerNodeID:%@; endpoint:%@; fabricIndex:%@; >", @@ -472,6 +682,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTROtaSoftwareUpdateRequestorClusterStateTransitionEvent alloc] init]; + + other.previousState = self.previousState; + other.newState = self.newState; + other.reason = self.reason; + other.targetSoftwareVersion = self.targetSoftwareVersion; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -494,6 +716,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTROtaSoftwareUpdateRequestorClusterVersionAppliedEvent alloc] init]; + + other.softwareVersion = self.softwareVersion; + other.productID = self.productID; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: softwareVersion:%@; productID:%@; >", @@ -519,6 +751,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTROtaSoftwareUpdateRequestorClusterDownloadErrorEvent alloc] init]; + + other.softwareVersion = self.softwareVersion; + other.bytesDownloaded = self.bytesDownloaded; + other.progressPercent = self.progressPercent; + other.platformCode = self.platformCode; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -541,6 +785,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPowerSourceClusterBatChargeFaultChangeType alloc] init]; + + other.current = self.current; + other.previous = self.previous; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -562,6 +816,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPowerSourceClusterBatFaultChangeType alloc] init]; + + other.current = self.current; + other.previous = self.previous; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -583,6 +847,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPowerSourceClusterWiredFaultChangeType alloc] init]; + + other.current = self.current; + other.previous = self.previous; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -604,6 +878,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRGeneralCommissioningClusterBasicCommissioningInfo alloc] init]; + + other.failSafeExpiryLengthSeconds = self.failSafeExpiryLengthSeconds; + other.maxCumulativeFailsafeSeconds = self.maxCumulativeFailsafeSeconds; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -626,6 +910,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRNetworkCommissioningClusterNetworkInfo alloc] init]; + + other.networkID = self.networkID; + other.connected = self.connected; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -660,6 +954,22 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRNetworkCommissioningClusterThreadInterfaceScanResult alloc] init]; + + other.panId = self.panId; + other.extendedPanId = self.extendedPanId; + other.networkName = self.networkName; + other.channel = self.channel; + other.version = self.version; + other.extendedAddress = self.extendedAddress; + other.rssi = self.rssi; + other.lqi = self.lqi; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -692,6 +1002,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRNetworkCommissioningClusterWiFiInterfaceScanResult alloc] init]; + + other.security = self.security; + other.ssid = self.ssid; + other.bssid = self.bssid; + other.channel = self.channel; + other.wiFiBand = self.wiFiBand; + other.rssi = self.rssi; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -727,6 +1051,22 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRGeneralDiagnosticsClusterNetworkInterfaceType alloc] init]; + + other.name = self.name; + other.isOperational = self.isOperational; + other.offPremiseServicesReachableIPv4 = self.offPremiseServicesReachableIPv4; + other.offPremiseServicesReachableIPv6 = self.offPremiseServicesReachableIPv6; + other.hardwareAddress = self.hardwareAddress; + other.iPv4Addresses = self.iPv4Addresses; + other.iPv6Addresses = self.iPv6Addresses; + other.type = self.type; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -751,6 +1091,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRGeneralDiagnosticsClusterHardwareFaultChangeEvent alloc] init]; + + other.current = self.current; + other.previous = self.previous; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -772,6 +1122,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRGeneralDiagnosticsClusterRadioFaultChangeEvent alloc] init]; + + other.current = self.current; + other.previous = self.previous; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -793,6 +1153,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRGeneralDiagnosticsClusterNetworkFaultChangeEvent alloc] init]; + + other.current = self.current; + other.previous = self.previous; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -812,6 +1182,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRGeneralDiagnosticsClusterBootReasonEvent alloc] init]; + + other.bootReason = self.bootReason; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -839,6 +1218,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRSoftwareDiagnosticsClusterThreadMetrics alloc] init]; + + other.id = self.id; + other.name = self.name; + other.stackFreeCurrent = self.stackFreeCurrent; + other.stackFreeMinimum = self.stackFreeMinimum; + other.stackSize = self.stackSize; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -863,6 +1255,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRSoftwareDiagnosticsClusterSoftwareFaultEvent alloc] init]; + + other.id = self.id; + other.name = self.name; + other.faultRecording = self.faultRecording; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -909,6 +1312,28 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRThreadNetworkDiagnosticsClusterNeighborTable alloc] init]; + + other.extAddress = self.extAddress; + other.age = self.age; + other.rloc16 = self.rloc16; + other.linkFrameCounter = self.linkFrameCounter; + other.mleFrameCounter = self.mleFrameCounter; + other.lqi = self.lqi; + other.averageRssi = self.averageRssi; + other.lastRssi = self.lastRssi; + other.frameErrorRate = self.frameErrorRate; + other.messageErrorRate = self.messageErrorRate; + other.rxOnWhenIdle = self.rxOnWhenIdle; + other.fullThreadDevice = self.fullThreadDevice; + other.fullNetworkData = self.fullNetworkData; + other.isChild = self.isChild; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -954,6 +1379,26 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents alloc] init]; + + other.activeTimestampPresent = self.activeTimestampPresent; + other.pendingTimestampPresent = self.pendingTimestampPresent; + other.masterKeyPresent = self.masterKeyPresent; + other.networkNamePresent = self.networkNamePresent; + other.extendedPanIdPresent = self.extendedPanIdPresent; + other.meshLocalPrefixPresent = self.meshLocalPrefixPresent; + other.delayPresent = self.delayPresent; + other.panIdPresent = self.panIdPresent; + other.channelPresent = self.channelPresent; + other.pskcPresent = self.pskcPresent; + other.securityPolicyPresent = self.securityPolicyPresent; + other.channelMaskPresent = self.channelMaskPresent; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -996,6 +1441,24 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRThreadNetworkDiagnosticsClusterRouteTable alloc] init]; + + other.extAddress = self.extAddress; + other.rloc16 = self.rloc16; + other.routerId = self.routerId; + other.nextHop = self.nextHop; + other.pathCost = self.pathCost; + other.lqiIn = self.lqiIn; + other.lqiOut = self.lqiOut; + other.age = self.age; + other.allocated = self.allocated; + other.linkEstablished = self.linkEstablished; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1020,6 +1483,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRThreadNetworkDiagnosticsClusterSecurityPolicy alloc] init]; + + other.rotationTime = self.rotationTime; + other.flags = self.flags; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1039,6 +1512,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRThreadNetworkDiagnosticsClusterConnectionStatusEvent alloc] init]; + + other.connectionStatus = self.connectionStatus; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1058,6 +1540,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRWiFiNetworkDiagnosticsClusterDisconnectionEvent alloc] init]; + + other.reasonCode = self.reasonCode; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1079,6 +1570,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRWiFiNetworkDiagnosticsClusterAssociationFailureEvent alloc] init]; + + other.associationFailure = self.associationFailure; + other.status = self.status; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: associationFailure:%@; status:%@; >", @@ -1098,6 +1599,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRWiFiNetworkDiagnosticsClusterConnectionStatusEvent alloc] init]; + + other.connectionStatus = self.connectionStatus; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1117,6 +1627,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBridgedDeviceBasicClusterStartUpEvent alloc] init]; + + other.softwareVersion = self.softwareVersion; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1134,6 +1653,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBridgedDeviceBasicClusterShutDownEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1150,6 +1676,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBridgedDeviceBasicClusterLeaveEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1168,6 +1701,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBridgedDeviceBasicClusterReachableChangedEvent alloc] init]; + + other.reachableNewValue = self.reachableNewValue; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1187,6 +1729,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRSwitchClusterSwitchLatchedEvent alloc] init]; + + other.newPosition = self.newPosition; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1206,6 +1757,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRSwitchClusterInitialPressEvent alloc] init]; + + other.newPosition = self.newPosition; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1225,6 +1785,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRSwitchClusterLongPressEvent alloc] init]; + + other.newPosition = self.newPosition; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1244,6 +1813,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRSwitchClusterShortReleaseEvent alloc] init]; + + other.previousPosition = self.previousPosition; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1263,6 +1841,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRSwitchClusterLongReleaseEvent alloc] init]; + + other.previousPosition = self.previousPosition; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1284,6 +1871,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRSwitchClusterMultiPressOngoingEvent alloc] init]; + + other.newPosition = self.newPosition; + other.currentNumberOfPressesCounted = self.currentNumberOfPressesCounted; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: newPosition:%@; currentNumberOfPressesCounted:%@; >", @@ -1305,6 +1902,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRSwitchClusterMultiPressCompleteEvent alloc] init]; + + other.newPosition = self.newPosition; + other.totalNumberOfPressesCounted = self.totalNumberOfPressesCounted; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: newPosition:%@; totalNumberOfPressesCounted:%@; >", @@ -1334,6 +1941,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTROperationalCredentialsClusterFabricDescriptor alloc] init]; + + other.rootPublicKey = self.rootPublicKey; + other.vendorId = self.vendorId; + other.fabricId = self.fabricId; + other.nodeId = self.nodeId; + other.label = self.label; + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1359,6 +1980,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTROperationalCredentialsClusterNOCStruct alloc] init]; + + other.noc = self.noc; + other.icac = self.icac; + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1385,6 +2017,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRGroupKeyManagementClusterGroupInfoMapStruct alloc] init]; + + other.groupId = self.groupId; + other.endpoints = self.endpoints; + other.groupName = self.groupName; + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupId:%@; endpoints:%@; groupName:%@; fabricIndex:%@; >", @@ -1408,6 +2052,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + + other.groupId = self.groupId; + other.groupKeySetID = self.groupKeySetID; + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupId:%@; groupKeySetID:%@; fabricIndex:%@; >", @@ -1441,6 +2096,22 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + + other.groupKeySetID = self.groupKeySetID; + other.groupKeySecurityPolicy = self.groupKeySecurityPolicy; + other.epochKey0 = self.epochKey0; + other.epochStartTime0 = self.epochStartTime0; + other.epochKey1 = self.epochKey1; + other.epochStartTime1 = self.epochStartTime1; + other.epochKey2 = self.epochKey2; + other.epochStartTime2 = self.epochStartTime2; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1466,6 +2137,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRFixedLabelClusterLabelStruct alloc] init]; + + other.label = self.label; + other.value = self.value; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1487,6 +2168,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRUserLabelClusterLabelStruct alloc] init]; + + other.label = self.label; + other.value = self.value; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1506,6 +2197,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRBooleanStateClusterStateChangeEvent alloc] init]; + + other.stateValue = self.stateValue; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1527,6 +2227,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRModeSelectClusterSemanticTag alloc] init]; + + other.mfgCode = self.mfgCode; + other.value = self.value; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -1550,6 +2260,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRModeSelectClusterModeOptionStruct alloc] init]; + + other.label = self.label; + other.mode = self.mode; + other.semanticTags = self.semanticTags; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: label:%@; mode:%@; semanticTags:%@; >", @@ -1571,6 +2292,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRDoorLockClusterDlCredential alloc] init]; + + other.credentialType = self.credentialType; + other.credentialIndex = self.credentialIndex; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: credentialType:%@; credentialIndex:%@; >", @@ -1590,6 +2321,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRDoorLockClusterDoorLockAlarmEvent alloc] init]; + + other.alarmCode = self.alarmCode; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: alarmCode:%@; >", NSStringFromClass([self class]), _alarmCode]; @@ -1608,6 +2348,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRDoorLockClusterDoorStateChangeEvent alloc] init]; + + other.doorState = self.doorState; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: doorState:%@; >", NSStringFromClass([self class]), _doorState]; @@ -1636,6 +2385,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRDoorLockClusterLockOperationEvent alloc] init]; + + other.lockOperationType = self.lockOperationType; + other.operationSource = self.operationSource; + other.userIndex = self.userIndex; + other.fabricIndex = self.fabricIndex; + other.sourceNode = self.sourceNode; + other.credentials = self.credentials; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -1669,6 +2432,21 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRDoorLockClusterLockOperationErrorEvent alloc] init]; + + other.lockOperationType = self.lockOperationType; + other.operationSource = self.operationSource; + other.operationError = self.operationError; + other.userIndex = self.userIndex; + other.fabricIndex = self.fabricIndex; + other.sourceNode = self.sourceNode; + other.credentials = self.credentials; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: lockOperationType:%@; operationSource:%@; operationError:%@; " @@ -1702,6 +2480,21 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRDoorLockClusterLockUserChangeEvent alloc] init]; + + other.lockDataType = self.lockDataType; + other.dataOperationType = self.dataOperationType; + other.operationSource = self.operationSource; + other.userIndex = self.userIndex; + other.fabricIndex = self.fabricIndex; + other.sourceNode = self.sourceNode; + other.dataIndex = self.dataIndex; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: lockDataType:%@; dataOperationType:%@; operationSource:%@; " @@ -1721,6 +2514,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterSupplyVoltageLowEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1737,6 +2537,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterSupplyVoltageHighEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1753,6 +2560,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterPowerMissingPhaseEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1769,6 +2583,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterSystemPressureLowEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1785,6 +2606,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterSystemPressureHighEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1801,6 +2629,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterDryRunningEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1817,6 +2652,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterMotorTemperatureHighEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1833,6 +2675,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterPumpMotorFatalFailureEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1849,6 +2698,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterElectronicTemperatureHighEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1865,6 +2721,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterPumpBlockedEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1881,6 +2744,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterSensorFailureEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1897,6 +2767,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterElectronicNonFatalFailureEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1913,6 +2790,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterElectronicFatalFailureEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1929,6 +2813,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterGeneralFaultEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1945,6 +2836,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterLeakageEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1961,6 +2859,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterAirDetectionEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1977,6 +2882,13 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRPumpConfigurationAndControlClusterTurbineOperationEvent alloc] init]; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; @@ -1999,6 +2911,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRThermostatClusterThermostatScheduleTransition alloc] init]; + + other.transitionTime = self.transitionTime; + other.heatSetpoint = self.heatSetpoint; + other.coolSetpoint = self.coolSetpoint; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: transitionTime:%@; heatSetpoint:%@; coolSetpoint:%@; >", @@ -2026,6 +2949,19 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRChannelClusterChannelInfo alloc] init]; + + other.majorNumber = self.majorNumber; + other.minorNumber = self.minorNumber; + other.name = self.name; + other.callSign = self.callSign; + other.affiliateCallSign = self.affiliateCallSign; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2052,6 +2988,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRChannelClusterLineupInfo alloc] init]; + + other.operatorName = self.operatorName; + other.lineupName = self.lineupName; + other.postalCode = self.postalCode; + other.lineupInfoType = self.lineupInfoType; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2074,6 +3022,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRTargetNavigatorClusterTargetInfo alloc] init]; + + other.identifier = self.identifier; + other.name = self.name; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2095,6 +3053,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRMediaPlaybackClusterPlaybackPosition alloc] init]; + + other.updatedAt = self.updatedAt; + other.position = self.position; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2120,6 +3088,18 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRMediaInputClusterInputInfo alloc] init]; + + other.index = self.index; + other.inputType = self.inputType; + other.name = self.name; + other.descriptionString = self.descriptionString; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: index:%@; inputType:%@; name:%@; descriptionString:%@; >", @@ -2143,6 +3123,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRContentLauncherClusterDimension alloc] init]; + + other.width = self.width; + other.height = self.height; + other.metric = self.metric; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2164,6 +3155,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRContentLauncherClusterAdditionalInfo alloc] init]; + + other.name = self.name; + other.value = self.value; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2187,6 +3188,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRContentLauncherClusterParameter alloc] init]; + + other.type = self.type; + other.value = self.value; + other.externalIDList = self.externalIDList; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: type:%@; value:%@; externalIDList:%@; >", @@ -2206,6 +3218,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRContentLauncherClusterContentSearch alloc] init]; + + other.parameterList = self.parameterList; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2229,6 +3250,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRContentLauncherClusterStyleInformation alloc] init]; + + other.imageUrl = self.imageUrl; + other.color = self.color; + other.size = self.size; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2258,6 +3290,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRContentLauncherClusterBrandingInformation alloc] init]; + + other.providerName = self.providerName; + other.background = self.background; + other.logo = self.logo; + other.progressBar = self.progressBar; + other.splash = self.splash; + other.waterMark = self.waterMark; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2282,6 +3328,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRAudioOutputClusterOutputInfo alloc] init]; + + other.index = self.index; + other.outputType = self.outputType; + other.name = self.name; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2303,6 +3360,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRApplicationLauncherClusterApplication alloc] init]; + + other.catalogVendorId = self.catalogVendorId; + other.applicationId = self.applicationId; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: catalogVendorId:%@; applicationId:%@; >", @@ -2324,6 +3391,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRApplicationLauncherClusterApplicationEP alloc] init]; + + other.application = self.application; + other.endpoint = self.endpoint; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2345,6 +3422,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRApplicationBasicClusterApplicationBasicApplication alloc] init]; + + other.catalogVendorId = self.catalogVendorId; + other.applicationId = self.applicationId; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: catalogVendorId:%@; applicationId:%@; >", @@ -2378,6 +3465,22 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRTestClusterClusterSimpleStruct alloc] init]; + + other.a = self.a; + other.b = self.b; + other.c = self.c; + other.d = self.d; + other.e = self.e; + other.f = self.f; + other.g = self.g; + other.h = self.h; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2412,6 +3515,22 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRTestClusterClusterTestFabricScoped alloc] init]; + + other.fabricSensitiveInt8u = self.fabricSensitiveInt8u; + other.optionalFabricSensitiveInt8u = self.optionalFabricSensitiveInt8u; + other.nullableFabricSensitiveInt8u = self.nullableFabricSensitiveInt8u; + other.nullableOptionalFabricSensitiveInt8u = self.nullableOptionalFabricSensitiveInt8u; + other.fabricSensitiveCharString = self.fabricSensitiveCharString; + other.fabricSensitiveStruct = self.fabricSensitiveStruct; + other.fabricSensitiveInt8uList = self.fabricSensitiveInt8uList; + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString @@ -2458,6 +3577,26 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRTestClusterClusterNullablesAndOptionalsStruct alloc] init]; + + other.nullableInt = self.nullableInt; + other.optionalInt = self.optionalInt; + other.nullableOptionalInt = self.nullableOptionalInt; + other.nullableString = self.nullableString; + other.optionalString = self.optionalString; + other.nullableOptionalString = self.nullableOptionalString; + other.nullableStruct = self.nullableStruct; + other.optionalStruct = self.optionalStruct; + other.nullableOptionalStruct = self.nullableOptionalStruct; + other.nullableList = self.nullableList; + other.optionalList = self.optionalList; + other.nullableOptionalList = self.nullableOptionalList; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2486,6 +3625,17 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRTestClusterClusterNestedStruct alloc] init]; + + other.a = self.a; + other.b = self.b; + other.c = self.c; + + return other; +} + - (NSString *)description { NSString * descriptionString = @@ -2517,6 +3667,21 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRTestClusterClusterNestedStructList alloc] init]; + + other.a = self.a; + other.b = self.b; + other.c = self.c; + other.d = self.d; + other.e = self.e; + other.f = self.f; + other.g = self.g; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: a:%@; b:%@; c:%@; d:%@; e:%@; f:%@; g:%@; >", @@ -2536,6 +3701,15 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRTestClusterClusterDoubleNestedStructList alloc] init]; + + other.a = self.a; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: a:%@; >", NSStringFromClass([self class]), _a]; @@ -2556,6 +3730,16 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRTestClusterClusterTestListStructOctet alloc] init]; + + other.member1 = self.member1; + other.member2 = self.member2; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: member1:%@; member2:%@; >", NSStringFromClass([self class]), @@ -2585,6 +3769,20 @@ - (instancetype)init return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRTestClusterClusterTestEventEvent alloc] init]; + + other.arg1 = self.arg1; + other.arg2 = self.arg2; + other.arg3 = self.arg3; + other.arg4 = self.arg4; + other.arg5 = self.arg5; + other.arg6 = self.arg6; + + return other; +} + - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; arg2:%@; arg3:%@; arg4:%@; arg5:%@; arg6:%@; >", @@ -2599,14 +3797,24 @@ - (instancetype)init { if (self = [super init]) { - _arg1 = @(0); + _fabricIndex = @(0); } return self; } +- (id)copyWithZone:(nullable NSZone *)zone +{ + auto other = [[MTRTestClusterClusterTestFabricScopedEventEvent alloc] init]; + + other.fabricIndex = self.fabricIndex; + + return other; +} + - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: arg1:%@; >", NSStringFromClass([self class]), _arg1]; + NSString * descriptionString = + [NSString stringWithFormat:@"<%@: fabricIndex:%@; >", NSStringFromClass([self class]), _fabricIndex]; return descriptionString; } diff --git a/src/darwin/Framework/CHIPTests/MTRControllerTests.m b/src/darwin/Framework/CHIPTests/MTRControllerTests.m index c4e7955c6890c1..de998162500dce 100644 --- a/src/darwin/Framework/CHIPTests/MTRControllerTests.m +++ b/src/darwin/Framework/CHIPTests/MTRControllerTests.m @@ -24,6 +24,7 @@ #import #import "MTRTestKeys.h" +#import "MTRTestOTAProvider.h" #import "MTRTestStorage.h" static uint16_t kTestVendorId = 0xFFF1u; @@ -158,6 +159,62 @@ - (void)testControllerMultipleShutdown XCTAssertFalse([factory isRunning]); } +- (void)testControllerWithOTAProviderDelegate +{ + __auto_type * factory = [MTRControllerFactory sharedInstance]; + XCTAssertNotNil(factory); + + __auto_type * otaProvider = [[MTRTestOTAProvider alloc] init]; + __auto_type * storage = [[MTRTestStorage alloc] init]; + __auto_type * factoryParams = [[MTRControllerFactoryParams alloc] initWithStorage:storage]; + factoryParams.otaProviderDelegate = otaProvider; + XCTAssertTrue([factory startup:factoryParams]); + XCTAssertTrue([factory isRunning]); + + __auto_type * testKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(testKeys); + + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys fabricId:1 ipk:testKeys.ipk]; + XCTAssertNotNil(params); + + params.vendorId = @(kTestVendorId); + MTRDeviceController * controller = [factory startControllerOnNewFabric:params]; + XCTAssertTrue([controller isRunning]); + [controller shutdown]; + + // OTA Provider depends on the system state maintained by CHIPDeviceControllerFactory that is destroyed when + // the controller count goes down to 0. Make sure that a new controller can still be started successfully onto the + // same fabric. + MTRDeviceController * controller2 = [factory startControllerOnExistingFabric:params]; + XCTAssertTrue([controller2 isRunning]); + [controller2 shutdown]; + + // Check that a new controller can be started on a different fabric too. + __auto_type * params2 = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:testKeys fabricId:2 ipk:testKeys.ipk]; + XCTAssertNotNil(params2); + + params2.vendorId = @(kTestVendorId); + + MTRDeviceController * controller3 = [factory startControllerOnNewFabric:params2]; + XCTAssertTrue([controller3 isRunning]); + [controller3 shutdown]; + + // Stop the factory, start it up again and create a controller to ensure that no dead state from the previous + // ota provider delegate is staying around. + [factory shutdown]; + XCTAssertFalse([factory isRunning]); + + XCTAssertTrue([factory startup:factoryParams]); + XCTAssertTrue([factory isRunning]); + + MTRDeviceController * controller4 = [factory startControllerOnExistingFabric:params2]; + XCTAssertTrue([controller4 isRunning]); + [controller4 shutdown]; + + [factory shutdown]; + XCTAssertFalse([factory isRunning]); +} + - (void)testControllerInvalidAccess { __auto_type * factory = [MTRControllerFactory sharedInstance]; diff --git a/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m b/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m index 6605e43e30f5de..4c043b7814246f 100644 --- a/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m +++ b/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m @@ -45,7 +45,8 @@ - (void)testOnboardingPayloadParser_Manual_NoError XCTAssertNotNil(payload); XCTAssertNil(error); - XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 2560); + XCTAssertTrue(payload.hasShortDiscriminator); + XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 10); XCTAssertEqual(payload.setUpPINCode.unsignedIntegerValue, 123456780); XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 1); XCTAssertEqual(payload.productID.unsignedIntegerValue, 1); @@ -75,7 +76,8 @@ - (void)testOnboardingPayloadParser_Admin_NoError XCTAssertNotNil(payload); XCTAssertNil(error); - XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 2560); + XCTAssertTrue(payload.hasShortDiscriminator); + XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 10); XCTAssertEqual(payload.setUpPINCode.unsignedIntegerValue, 123456780); XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 1); XCTAssertEqual(payload.productID.unsignedIntegerValue, 1); @@ -105,6 +107,7 @@ - (void)testOnboardingPayloadParser_QRCode_NoError XCTAssertNotNil(payload); XCTAssertNil(error); + XCTAssertFalse(payload.hasShortDiscriminator); XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 128); XCTAssertEqual(payload.setUpPINCode.unsignedIntegerValue, 2048); XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 12); @@ -136,6 +139,7 @@ - (void)testOnboardingPayloadParser_NFC_NoError XCTAssertNotNil(payload); XCTAssertNil(error); + XCTAssertFalse(payload.hasShortDiscriminator); XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 128); XCTAssertEqual(payload.setUpPINCode.unsignedIntegerValue, 2048); XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 12); @@ -167,7 +171,8 @@ - (void)testManualParser XCTAssertNotNil(payload); XCTAssertNil(error); - XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 2560); + XCTAssertTrue(payload.hasShortDiscriminator); + XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 10); XCTAssertEqual(payload.setUpPINCode.unsignedIntegerValue, 123456780); XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 1); XCTAssertEqual(payload.productID.unsignedIntegerValue, 1); @@ -207,6 +212,7 @@ - (void)testQRCodeParser XCTAssertNotNil(payload); XCTAssertNil(error); + XCTAssertFalse(payload.hasShortDiscriminator); XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 128); XCTAssertEqual(payload.setUpPINCode.unsignedIntegerValue, 2048); XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 12); @@ -227,6 +233,7 @@ - (void)testQRCodeParserWithOptionalData XCTAssertNil(error); XCTAssertEqual(payload.version.unsignedIntegerValue, 5); + XCTAssertFalse(payload.hasShortDiscriminator); XCTAssertEqual(payload.discriminator.unsignedIntegerValue, 128); XCTAssertEqual(payload.setUpPINCode.unsignedIntegerValue, 2048); XCTAssertEqual(payload.vendorID.unsignedIntegerValue, 12); diff --git a/src/darwin/Framework/CHIPTests/MTRTestOTAProvider.h b/src/darwin/Framework/CHIPTests/MTRTestOTAProvider.h new file mode 100644 index 00000000000000..29aafedcc4a03c --- /dev/null +++ b/src/darwin/Framework/CHIPTests/MTRTestOTAProvider.h @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface MTRTestOTAProvider : NSObject +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIPTests/MTRTestOTAProvider.m b/src/darwin/Framework/CHIPTests/MTRTestOTAProvider.m new file mode 100644 index 00000000000000..25c2d0647d31fd --- /dev/null +++ b/src/darwin/Framework/CHIPTests/MTRTestOTAProvider.m @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "MTRTestOTAProvider.h" + +@interface MTRTestOTAProvider () +@end + +@implementation MTRTestOTAProvider +- (void)handleQueryImage:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ +} + +- (void)handleApplyUpdateRequest:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ +} + +- (void)handleNotifyUpdateApplied:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params + completionHandler:(StatusCompletion)completionHandler +{ +} + +- (void)handleBDXTransferSessionBegin:(NSString * _Nonnull)fileDesignator + offset:(NSNumber * _Nonnull)offset + completionHandler:(void (^)(NSError * error))completionHandler +{ +} + +- (void)handleBDXTransferSessionEnd:(NSError * _Nullable)error +{ +} + +- (void)handleBDXQuery:(NSNumber * _Nonnull)blockSize + blockIndex:(NSNumber * _Nonnull)blockIndex + bytesToSkip:(NSNumber * _Nonnull)bytesToSkip + completionHandler:(void (^)(NSData * _Nullable data, BOOL isEOF))completionHandler +{ +} + +@end diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index d0464d268fc426..df60f6d6756f34 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 1E5801C328941C050033A199 /* MTRTestOTAProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E748B3828941A44008A1BE8 /* MTRTestOTAProvider.m */; }; 1E85730C265519AE0050A4D9 /* callback-stub.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E857307265519AE0050A4D9 /* callback-stub.cpp */; }; 1EB41B7B263C4CC60048E4C1 /* MTRClustersTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EB41B7A263C4CC60048E4C1 /* MTRClustersTests.m */; }; 1EC3238D271999E2002A8BF0 /* cluster-objects.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC3238C271999E2002A8BF0 /* cluster-objects.cpp */; }; @@ -15,6 +16,8 @@ 1ED276E026C57CF000547A89 /* MTRCallbackBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1ED276DF26C57CF000547A89 /* MTRCallbackBridge.mm */; }; 1ED276E226C5812A00547A89 /* MTRCluster.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1ED276E126C5812A00547A89 /* MTRCluster.mm */; }; 1ED276E426C5832500547A89 /* MTRCluster.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED276E326C5832500547A89 /* MTRCluster.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1EDCE545289049A100E41EC9 /* MTROTAHeaderParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDCE543289049A100E41EC9 /* MTROTAHeaderParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1EDCE546289049A100E41EC9 /* MTROTAHeaderParser.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1EDCE544289049A100E41EC9 /* MTROTAHeaderParser.mm */; }; 27A53C1727FBC6920053F131 /* MTRAttestationTrustStoreBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 27A53C1527FBC6920053F131 /* MTRAttestationTrustStoreBridge.h */; }; 27A53C1827FBC6920053F131 /* MTRAttestationTrustStoreBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 27A53C1627FBC6920053F131 /* MTRAttestationTrustStoreBridge.mm */; }; 2C1B027A2641DB4E00780EF1 /* MTROperationalCredentialsDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2C1B02782641DB4E00780EF1 /* MTROperationalCredentialsDelegate.mm */; }; @@ -125,6 +128,8 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 1E748B3828941A44008A1BE8 /* MTRTestOTAProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRTestOTAProvider.m; sourceTree = ""; }; + 1E748B3928941A45008A1BE8 /* MTRTestOTAProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRTestOTAProvider.h; sourceTree = ""; }; 1E857307265519AE0050A4D9 /* callback-stub.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "callback-stub.cpp"; path = "../../../../zzz_generated/controller-clusters/zap-generated/callback-stub.cpp"; sourceTree = ""; }; 1EB41B7A263C4CC60048E4C1 /* MTRClustersTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRClustersTests.m; sourceTree = ""; }; 1EC3238C271999E2002A8BF0 /* cluster-objects.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "cluster-objects.cpp"; path = "../../../../zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp"; sourceTree = ""; }; @@ -133,6 +138,8 @@ 1ED276DF26C57CF000547A89 /* MTRCallbackBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MTRCallbackBridge.mm; path = "zap-generated/MTRCallbackBridge.mm"; sourceTree = ""; }; 1ED276E126C5812A00547A89 /* MTRCluster.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRCluster.mm; sourceTree = ""; }; 1ED276E326C5832500547A89 /* MTRCluster.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRCluster.h; sourceTree = ""; }; + 1EDCE543289049A100E41EC9 /* MTROTAHeaderParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTROTAHeaderParser.h; sourceTree = ""; }; + 1EDCE544289049A100E41EC9 /* MTROTAHeaderParser.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTROTAHeaderParser.mm; sourceTree = ""; }; 27A53C1527FBC6920053F131 /* MTRAttestationTrustStoreBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRAttestationTrustStoreBridge.h; sourceTree = ""; }; 27A53C1627FBC6920053F131 /* MTRAttestationTrustStoreBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRAttestationTrustStoreBridge.mm; sourceTree = ""; }; 2C1B02782641DB4E00780EF1 /* MTROperationalCredentialsDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTROperationalCredentialsDelegate.mm; sourceTree = ""; }; @@ -313,6 +320,8 @@ B202528F2459E34F00F97062 /* CHIP */ = { isa = PBXGroup; children = ( + 1EDCE543289049A100E41EC9 /* MTROTAHeaderParser.h */, + 1EDCE544289049A100E41EC9 /* MTROTAHeaderParser.mm */, 27A53C1527FBC6920053F131 /* MTRAttestationTrustStoreBridge.h */, 27A53C1627FBC6920053F131 /* MTRAttestationTrustStoreBridge.mm */, 88EBF8CB27FABDD500686BC1 /* MTRDeviceAttestationDelegate.h */, @@ -398,6 +407,8 @@ B202529A2459E34F00F97062 /* CHIPTests */ = { isa = PBXGroup; children = ( + 1E748B3928941A45008A1BE8 /* MTRTestOTAProvider.h */, + 1E748B3828941A44008A1BE8 /* MTRTestOTAProvider.m */, D437613E285BDC0D0051FEA2 /* MTRErrorTestUtils.h */, D437613F285BDC0D0051FEA2 /* MTRTestKeys.h */, D4376140285BDC0D0051FEA2 /* MTRTestStorage.h */, @@ -484,6 +495,7 @@ 991DC08B247704DC00C13860 /* MTRLogging.h in Headers */, 5A7947E527C0129F00434CF2 /* MTRDeviceController+XPC.h in Headers */, B2E0D7B4245B0B5C003C5B48 /* MTRError_Internal.h in Headers */, + 1EDCE545289049A100E41EC9 /* MTROTAHeaderParser.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -623,6 +635,7 @@ 1EC3238D271999E2002A8BF0 /* cluster-objects.cpp in Sources */, 991DC0892475F47D00C13860 /* MTRDeviceController.mm in Sources */, B2E0D7B7245B0B5C003C5B48 /* MTRQRCodeSetupPayloadParser.mm in Sources */, + 1EDCE546289049A100E41EC9 /* MTROTAHeaderParser.mm in Sources */, 1EC4CE5D25CC26E900D7304F /* MTRBaseClusters.mm in Sources */, 51E0310127EA20D20083DC9C /* MTRControllerAccessControl.mm in Sources */, 1ED276E226C5812A00547A89 /* MTRCluster.mm in Sources */, @@ -659,6 +672,7 @@ 997DED1A26955D0200975E97 /* MTRThreadOperationalDatasetTests.mm in Sources */, 51C8E3F82825CDB600D47D00 /* MTRTestKeys.m in Sources */, 99C65E10267282F1003402F6 /* MTRControllerTests.m in Sources */, + 1E5801C328941C050033A199 /* MTRTestOTAProvider.m in Sources */, 5A6FEC9D27B5E48900F25F42 /* MTRXPCProtocolTests.m in Sources */, 5AE6D4E427A99041001F2493 /* MTRDeviceTests.m in Sources */, 5A7947DE27BEC3F500434CF2 /* MTRXPCListenerSampleTests.m in Sources */, diff --git a/src/include/platform/ConfigurationManager.h b/src/include/platform/ConfigurationManager.h index fae1475030eb11..607f9776980e29 100644 --- a/src/include/platform/ConfigurationManager.h +++ b/src/include/platform/ConfigurationManager.h @@ -26,12 +26,15 @@ #include +#if CHIP_HAVE_CONFIG_H +#include +#include +#endif + #include #include -#include #include #include -#include namespace chip { namespace Ble { @@ -178,9 +181,18 @@ class ConfigurationManager /** * Returns a reference to a ConfigurationManager object. * - * Applications should use this to access the features of the ConfigurationManager. + * Applications should use this to access features of the ConfigurationManager object + * that are common to all platforms. + */ +ConfigurationManager & ConfigurationMgr(); + +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. */ -extern ConfigurationManager & ConfigurationMgr(); +extern ConfigurationManager & ConfigurationMgrImpl(); /** * Sets a reference to a ConfigurationManager object. @@ -188,7 +200,7 @@ extern ConfigurationManager & ConfigurationMgr(); * This must be called before any calls to ConfigurationMgr. If a nullptr is passed in, * no changes will be made. */ -extern void SetConfigurationMgr(ConfigurationManager * configurationManager); +void SetConfigurationMgr(ConfigurationManager * configurationManager); inline CHIP_ERROR ConfigurationManager::GetLocationCapability(uint8_t & location) { diff --git a/src/inet/TCPEndPointImplSockets.cpp b/src/inet/TCPEndPointImplSockets.cpp index c34603e2099a46..2efdaba6c3222d 100644 --- a/src/inet/TCPEndPointImplSockets.cpp +++ b/src/inet/TCPEndPointImplSockets.cpp @@ -132,30 +132,6 @@ CHIP_ERROR TCPEndPointImplSockets::BindImpl(IPAddressType addrType, const IPAddr } } -#if CHIP_SYSTEM_CONFIG_USE_DISPATCH - dispatch_queue_t dispatchQueue = static_cast(GetSystemLayer()).GetDispatchQueue(); - if (dispatchQueue != nullptr) - { - unsigned long fd = static_cast(mSocket); - - mReadableSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_READ, fd, 0, dispatchQueue); - ReturnErrorCodeIf(mReadableSource == nullptr, CHIP_ERROR_NO_MEMORY); - - mWriteableSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_WRITE, fd, 0, dispatchQueue); - ReturnErrorCodeIf(mWriteableSource == nullptr, CHIP_ERROR_NO_MEMORY); - - dispatch_source_set_event_handler(mReadableSource, ^{ - this->HandlePendingIO(System::SocketEventFlags::kRead); - }); - - dispatch_source_set_event_handler(mWriteableSource, ^{ - this->HandlePendingIO(System::SocketEventFlags::kWrite); - }); - - dispatch_resume(mReadableSource); - dispatch_resume(mWriteableSource); - } -#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH return res; } @@ -648,19 +624,6 @@ void TCPEndPointImplSockets::DoCloseImpl(CHIP_ERROR err, State oldState) mSocket = kInvalidSocketFd; } } - -#if CHIP_SYSTEM_CONFIG_USE_DISPATCH - if (mReadableSource) - { - dispatch_source_cancel(mReadableSource); - dispatch_release(mReadableSource); - } - if (mWriteableSource) - { - dispatch_source_cancel(mWriteableSource); - dispatch_release(mWriteableSource); - } -#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH } #if INET_CONFIG_OVERRIDE_SYSTEM_TCP_USER_TIMEOUT diff --git a/src/inet/TCPEndPointImplSockets.h b/src/inet/TCPEndPointImplSockets.h index 036939e826323a..40e81eeb6a0d06 100644 --- a/src/inet/TCPEndPointImplSockets.h +++ b/src/inet/TCPEndPointImplSockets.h @@ -25,10 +25,6 @@ #include #include -#if CHIP_SYSTEM_CONFIG_USE_DISPATCH -#include -#endif - namespace chip { namespace Inet { @@ -74,11 +70,6 @@ class TCPEndPointImplSockets : public TCPEndPoint, public EndPointStateSockets CHIP_ERROR BindSrcAddrFromIntf(IPAddressType addrType, InterfaceId intfId); static void HandlePendingIO(System::SocketEvents events, intptr_t data); -#if CHIP_SYSTEM_CONFIG_USE_DISPATCH - dispatch_source_t mReadableSource = nullptr; - dispatch_source_t mWriteableSource = nullptr; -#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH - #if INET_CONFIG_OVERRIDE_SYSTEM_TCP_USER_TIMEOUT /// This counts the number of bytes written on the TCP socket since thelast probe into the TCP outqueue was made. uint32_t mBytesWrittenSinceLastProbe; diff --git a/src/inet/UDPEndPointImplSockets.cpp b/src/inet/UDPEndPointImplSockets.cpp index 93b0828f5a1e21..a9e078cc5f48fd 100644 --- a/src/inet/UDPEndPointImplSockets.cpp +++ b/src/inet/UDPEndPointImplSockets.cpp @@ -205,22 +205,6 @@ CHIP_ERROR UDPEndPointImplSockets::BindImpl(IPAddressType addressType, const IPA } } -#if CHIP_SYSTEM_CONFIG_USE_DISPATCH - dispatch_queue_t dispatchQueue = static_cast(&GetSystemLayer())->GetDispatchQueue(); - if (dispatchQueue != nullptr) - { - unsigned long fd = static_cast(mSocket); - - mReadableSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_READ, fd, 0, dispatchQueue); - ReturnErrorCodeIf(mReadableSource == nullptr, CHIP_ERROR_NO_MEMORY); - - dispatch_source_set_event_handler(mReadableSource, ^{ - this->HandlePendingIO(System::SocketEventFlags::kRead); - }); - dispatch_resume(mReadableSource); - } -#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH - return CHIP_NO_ERROR; } @@ -431,14 +415,6 @@ void UDPEndPointImplSockets::CloseImpl() close(mSocket); mSocket = kInvalidSocketFd; } - -#if CHIP_SYSTEM_CONFIG_USE_DISPATCH - if (mReadableSource) - { - dispatch_source_cancel(mReadableSource); - dispatch_release(mReadableSource); - } -#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH } void UDPEndPointImplSockets::Free() diff --git a/src/inet/UDPEndPointImplSockets.h b/src/inet/UDPEndPointImplSockets.h index 490360da5e9ec1..c078722fbb4bdd 100644 --- a/src/inet/UDPEndPointImplSockets.h +++ b/src/inet/UDPEndPointImplSockets.h @@ -26,10 +26,6 @@ #include #include -#if CHIP_SYSTEM_CONFIG_USE_DISPATCH -#include -#endif - namespace chip { namespace Inet { @@ -65,10 +61,6 @@ class UDPEndPointImplSockets : public UDPEndPoint, public EndPointStateSockets InterfaceId mBoundIntfId; uint16_t mBoundPort; -#if CHIP_SYSTEM_CONFIG_USE_DISPATCH - dispatch_source_t mReadableSource = nullptr; -#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH - #if CHIP_SYSTEM_CONFIG_USE_PLATFORM_MULTICAST_API public: using MulticastGroupHandler = CHIP_ERROR (*)(InterfaceId, const IPAddress &); diff --git a/src/lib/shell/BUILD.gn b/src/lib/shell/BUILD.gn index de7925a142adfc..9c003607b03116 100644 --- a/src/lib/shell/BUILD.gn +++ b/src/lib/shell/BUILD.gn @@ -89,6 +89,11 @@ static_library("shell") { "MainLoopMW320.cpp", "streamer_mw320.cpp", ] + } else if (chip_device_platform == "ameba") { + sources += [ + "MainLoopDefault.cpp", + "streamer_ameba.cpp", + ] } else { sources += [ "MainLoopDefault.cpp" ] } diff --git a/src/lib/shell/streamer_ameba.cpp b/src/lib/shell/streamer_ameba.cpp new file mode 100644 index 00000000000000..7f497d647cc3ac --- /dev/null +++ b/src/lib/shell/streamer_ameba.cpp @@ -0,0 +1,93 @@ +/* + * + * 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. + */ + +/** + * @file + * Source implementation of an input / output stream for zehpyr targets. + */ + +#include +#include + +#include +#include + +#include "serial_api.h" + +// UART pin location: +// KM4 UART0: +// PA_18 (TX) +// PA_19 (RX) + +#define UART_TX PA_18 // UART0 TX +#define UART_RX PA_19 // UART0 RX + +namespace chip { +namespace Shell { +namespace { + +serial_t sobj; + +int streamer_ameba_init(streamer_t * streamer) +{ + (void) streamer; + serial_init(&sobj, UART_TX, UART_RX); + serial_baud(&sobj, 115200); + serial_format(&sobj, 8, ParityNone, 1); + return 0; +} + +ssize_t streamer_ameba_read(streamer_t * streamer, char * buffer, size_t length) +{ + (void) streamer; + uint16_t len_read = 0; + + while (len_read < length) + { + *(buffer + len_read) = (char) serial_getc(&sobj); + len_read++; + } + return len_read; +} + +ssize_t streamer_ameba_write(streamer_t * streamer, const char * buffer, size_t length) +{ + (void) streamer; + uint16_t len_written = 0; + + while (len_written < length) + { + serial_putc(&sobj, *(buffer + len_written)); + len_written++; + } + return len_written; +} + +static streamer_t streamer_ameba = { + .init_cb = streamer_ameba_init, + .read_cb = streamer_ameba_read, + .write_cb = streamer_ameba_write, +}; +} // namespace + +streamer_t * streamer_get(void) +{ + return &streamer_ameba; +} + +} // namespace Shell +} // namespace chip diff --git a/src/lib/support/BUILD.gn b/src/lib/support/BUILD.gn index 103555cde30b27..d5e18e69f702f0 100644 --- a/src/lib/support/BUILD.gn +++ b/src/lib/support/BUILD.gn @@ -124,6 +124,7 @@ static_library("support") { "SafeInt.h", "SerializableIntegerSet.cpp", "SerializableIntegerSet.h", + "SetupDiscriminator.h", "SortUtils.h", "StateMachine.h", "ThreadOperationalDataset.cpp", diff --git a/src/lib/support/SetupDiscriminator.h b/src/lib/support/SetupDiscriminator.h new file mode 100644 index 00000000000000..5c1fabae71ba1e --- /dev/null +++ b/src/lib/support/SetupDiscriminator.h @@ -0,0 +1,111 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * This file defines the SetupDiscriminator type, which is used by + * low-level code (e.g. BLE) in addition to setup payload code. + */ + +#pragma once + +#include + +#include + +namespace chip { + +class SetupDiscriminator +{ +public: + constexpr SetupDiscriminator() : mDiscriminator(0), mIsShortDiscriminator(0) {} + + // See section 5.1.2. QR Code in the Matter specification + static constexpr int kLongBits = 12; + + // See section 5.1.3. Manual Pairing Code in the Matter specification + static constexpr int kShortBits = 4; + + void SetShortValue(uint8_t discriminator) + { + VerifyOrDie(discriminator == (discriminator & kShortMask)); + mDiscriminator = (discriminator & kShortMask); + mIsShortDiscriminator = true; + } + + void SetLongValue(uint16_t discriminator) + { + VerifyOrDie(discriminator == (discriminator & kLongMask)); + mDiscriminator = (discriminator & kLongMask); + mIsShortDiscriminator = false; + } + + bool IsShortDiscriminator() const { return mIsShortDiscriminator; } + + uint8_t GetShortValue() const + { + if (IsShortDiscriminator()) + { + return static_cast(mDiscriminator); + } + + return LongToShortValue(mDiscriminator); + } + + uint16_t GetLongValue() const + { + VerifyOrDie(!IsShortDiscriminator()); + return mDiscriminator; + } + + bool MatchesLongDiscriminator(uint16_t discriminator) const + { + if (!IsShortDiscriminator()) + { + return mDiscriminator == discriminator; + } + + return mDiscriminator == LongToShortValue(discriminator); + } + + bool operator==(const SetupDiscriminator & other) const + { + return mIsShortDiscriminator == other.mIsShortDiscriminator && mDiscriminator == other.mDiscriminator; + } + +private: + static constexpr uint16_t kLongMask = (1 << kLongBits) - 1; + static constexpr uint8_t kShortMask = (1 << kShortBits) - 1; + + static uint8_t LongToShortValue(uint16_t longValue) + { + // Short value consists of the high bits of the long value. + constexpr int kLongToShortShift = kLongBits - kShortBits; + return static_cast(longValue >> kLongToShortShift); + } + + // If long discriminator, all 12 bits are used. If short discriminator, + // only the low kShortBits bits are used, to store the value of the short + // discriminator (which contains only the high bits of the complete 12-bit + // discriminator). + static_assert(kLongBits == 12, "Unexpected field length"); + static_assert(kShortBits <= kLongBits, "Unexpected field length"); + uint16_t mDiscriminator : 12; + uint16_t mIsShortDiscriminator : 1; +}; + +} // namespace chip diff --git a/src/messaging/ApplicationExchangeDispatch.cpp b/src/messaging/ApplicationExchangeDispatch.cpp index 170e6bb702864d..183e8540e075fb 100644 --- a/src/messaging/ApplicationExchangeDispatch.cpp +++ b/src/messaging/ApplicationExchangeDispatch.cpp @@ -38,7 +38,6 @@ bool ApplicationExchangeDispatch::MessagePermitted(Protocols::Id protocol, uint8 case static_cast(Protocols::SecureChannel::MsgType::PASE_Pake1): case static_cast(Protocols::SecureChannel::MsgType::PASE_Pake2): case static_cast(Protocols::SecureChannel::MsgType::PASE_Pake3): - case static_cast(Protocols::SecureChannel::MsgType::PASE_PakeError): case static_cast(Protocols::SecureChannel::MsgType::CASE_Sigma1): case static_cast(Protocols::SecureChannel::MsgType::CASE_Sigma2): case static_cast(Protocols::SecureChannel::MsgType::CASE_Sigma3): diff --git a/src/messaging/ExchangeHolder.h b/src/messaging/ExchangeHolder.h index 7bb27458489c58..fb7e2cd39c55bd 100644 --- a/src/messaging/ExchangeHolder.h +++ b/src/messaging/ExchangeHolder.h @@ -64,6 +64,8 @@ class ExchangeHolder : public ExchangeDelegate */ void Grab(ExchangeContext * exchange) { + VerifyOrDie(exchange != nullptr); + Release(); mpExchangeCtx = exchange; diff --git a/src/platform/Ameba/ConfigurationManagerImpl.cpp b/src/platform/Ameba/ConfigurationManagerImpl.cpp index a1f4f00eac306b..e64b097b86c253 100644 --- a/src/platform/Ameba/ConfigurationManagerImpl.cpp +++ b/src/platform/Ameba/ConfigurationManagerImpl.cpp @@ -284,5 +284,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) // sys_reset(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Ameba/ConfigurationManagerImpl.h b/src/platform/Ameba/ConfigurationManagerImpl.h index def780ea343817..7587f5366d7ddf 100644 --- a/src/platform/Ameba/ConfigurationManagerImpl.h +++ b/src/platform/Ameba/ConfigurationManagerImpl.h @@ -76,5 +76,13 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp static void DoFactoryReset(intptr_t arg); }; +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Ameba/ConnectivityManagerImpl.cpp b/src/platform/Ameba/ConnectivityManagerImpl.cpp index d9dfa8bc9a38e8..8e8af6049e3c38 100644 --- a/src/platform/Ameba/ConnectivityManagerImpl.cpp +++ b/src/platform/Ameba/ConnectivityManagerImpl.cpp @@ -163,6 +163,7 @@ void ConnectivityManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event) { ChangeWiFiStationState(kWiFiStationState_Connecting_Failed); } + DriveStationState(); } if (event->Type == DeviceEventType::kRtkWiFiScanCompletedEvent) { diff --git a/src/platform/Ameba/PlatformManagerImpl.cpp b/src/platform/Ameba/PlatformManagerImpl.cpp index 1d5a8d8aa2e9c8..0b89c4a8c24971 100644 --- a/src/platform/Ameba/PlatformManagerImpl.cpp +++ b/src/platform/Ameba/PlatformManagerImpl.cpp @@ -59,8 +59,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) CHIP_ERROR err; - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - // Make sure the LwIP core lock has been initialized err = Internal::InitLwIPCoreLock(); diff --git a/src/platform/BUILD.gn b/src/platform/BUILD.gn index 1ca7fee1a8fdd9..b8b20ee5739379 100644 --- a/src/platform/BUILD.gn +++ b/src/platform/BUILD.gn @@ -381,7 +381,7 @@ if (chip_device_platform != "none") { public_deps = [ ":platform_base", - "${chip_root}/src/app:app_buildconfig", + "${chip_root}/src/app:app_config", "${chip_root}/src/app/common:cluster-objects", "${chip_root}/src/crypto", "${chip_root}/src/lib/support", diff --git a/src/platform/CYW30739/ConfigurationManagerImpl.cpp b/src/platform/CYW30739/ConfigurationManagerImpl.cpp index 71d32970f10881..a706ceec55e492 100644 --- a/src/platform/CYW30739/ConfigurationManagerImpl.cpp +++ b/src/platform/CYW30739/ConfigurationManagerImpl.cpp @@ -212,5 +212,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) wiced_hal_wdog_reset_system(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/CYW30739/ConfigurationManagerImpl.h b/src/platform/CYW30739/ConfigurationManagerImpl.h index 284f4d37e94551..40538888170245 100644 --- a/src/platform/CYW30739/ConfigurationManagerImpl.h +++ b/src/platform/CYW30739/ConfigurationManagerImpl.h @@ -74,5 +74,13 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp static void DoFactoryReset(intptr_t arg); }; +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/CYW30739/PlatformManagerImpl.cpp b/src/platform/CYW30739/PlatformManagerImpl.cpp index c8b547d199fba8..41e91ea0a205a6 100644 --- a/src/platform/CYW30739/PlatformManagerImpl.cpp +++ b/src/platform/CYW30739/PlatformManagerImpl.cpp @@ -45,8 +45,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) err = PersistedStorage::KeyValueStoreMgrImpl().Init(); SuccessOrExit(err); - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - /* Create the thread object. */ mThread = wiced_rtos_create_thread(); VerifyOrExit(mThread != nullptr, err = CHIP_ERROR_NO_MEMORY); diff --git a/src/platform/Darwin/BUILD.gn b/src/platform/Darwin/BUILD.gn index c0c4416643ad3f..dc58f04faa75e9 100644 --- a/src/platform/Darwin/BUILD.gn +++ b/src/platform/Darwin/BUILD.gn @@ -94,7 +94,7 @@ static_library("Darwin") { ] public_deps = [ - "${chip_root}/src/app:app_buildconfig", + "${chip_root}/src/app:app_config", "${chip_root}/src/platform:platform_base", ] diff --git a/src/platform/Darwin/BleConnectionDelegate.h b/src/platform/Darwin/BleConnectionDelegate.h index a86171b823cce1..1a7057ee43c48a 100644 --- a/src/platform/Darwin/BleConnectionDelegate.h +++ b/src/platform/Darwin/BleConnectionDelegate.h @@ -26,7 +26,7 @@ namespace Internal { class BleConnectionDelegateImpl : public Ble::BleConnectionDelegate { public: - virtual void NewConnection(Ble::BleLayer * bleLayer, void * appState, const uint16_t connDiscriminator); + virtual void NewConnection(Ble::BleLayer * bleLayer, void * appState, const SetupDiscriminator & connDiscriminator); virtual CHIP_ERROR CancelConnection(); }; diff --git a/src/platform/Darwin/BleConnectionDelegateImpl.mm b/src/platform/Darwin/BleConnectionDelegateImpl.mm index 22f97cef79c54f..e5cfd39778b9f8 100644 --- a/src/platform/Darwin/BleConnectionDelegateImpl.mm +++ b/src/platform/Darwin/BleConnectionDelegateImpl.mm @@ -49,13 +49,13 @@ @interface BleConnection : NSObject (txtLen), txtRecord); InterfaceInfo interface; interface.service.mPort = ntohs(port); @@ -406,7 +403,7 @@ void ResolveContext::OnNewInterface(uint32_t interfaceId, const char * fullname, // resolving. interface.fullyQualifiedDomainName = hostnameWithDomain; - interfaces.insert(std::pair(interfaceId, interface)); + interfaces.insert(std::make_pair(interfaceId, std::move(interface))); } bool ResolveContext::HasInterface() @@ -414,21 +411,37 @@ bool ResolveContext::HasInterface() return interfaces.size(); } -void ResolveContext::RemoveInterfaces() +InterfaceInfo::InterfaceInfo() { - for (auto & interface : interfaces) + service.mTextEntrySize = 0; + service.mTextEntries = nullptr; +} + +InterfaceInfo::InterfaceInfo(InterfaceInfo && other) : + service(std::move(other.service)), addresses(std::move(other.addresses)), + fullyQualifiedDomainName(std::move(other.fullyQualifiedDomainName)) +{ + // Make sure we're not trying to free any state from the other DnssdService, + // since we took over ownership of its allocated bits. + other.service.mTextEntrySize = 0; + other.service.mTextEntries = nullptr; +} + +InterfaceInfo::~InterfaceInfo() +{ + if (service.mTextEntries == nullptr) { - size_t count = interface.second.service.mTextEntrySize; - for (size_t i = 0; i < count; i++) - { - const auto & textEntry = interface.second.service.mTextEntries[i]; - free(const_cast(textEntry.mKey)); - free(const_cast(textEntry.mData)); - } - Platform::MemoryFree(const_cast(interface.second.service.mTextEntries)); + return; } - interfaces.clear(); + const size_t count = service.mTextEntrySize; + for (size_t i = 0; i < count; i++) + { + const auto & textEntry = service.mTextEntries[i]; + free(const_cast(textEntry.mKey)); + free(const_cast(textEntry.mData)); + } + Platform::MemoryFree(const_cast(service.mTextEntries)); } } // namespace Dnssd diff --git a/src/platform/Darwin/DnssdImpl.h b/src/platform/Darwin/DnssdImpl.h index e41b61421028a7..3c9c5f141cc1f8 100644 --- a/src/platform/Darwin/DnssdImpl.h +++ b/src/platform/Darwin/DnssdImpl.h @@ -117,6 +117,13 @@ struct BrowseContext : public GenericContext struct InterfaceInfo { + InterfaceInfo(); + InterfaceInfo(InterfaceInfo && other); + // Copying is not safe, because DnssdService bits need to be + // copied/deallocated properly. + InterfaceInfo(const InterfaceInfo & other) = delete; + ~InterfaceInfo(); + DnssdService service; std::vector addresses; std::string fullyQualifiedDomainName; @@ -141,7 +148,6 @@ struct ResolveContext : public GenericContext void OnNewInterface(uint32_t interfaceId, const char * fullname, const char * hostname, uint16_t port, uint16_t txtLen, const unsigned char * txtRecord); bool HasInterface(); - void RemoveInterfaces(); }; } // namespace Dnssd diff --git a/src/platform/Darwin/PlatformManagerImpl.cpp b/src/platform/Darwin/PlatformManagerImpl.cpp index d47d8830c215e5..e883f319305971 100644 --- a/src/platform/Darwin/PlatformManagerImpl.cpp +++ b/src/platform/Darwin/PlatformManagerImpl.cpp @@ -50,9 +50,7 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack() #if !CHIP_DISABLE_PLATFORM_KVS err = Internal::PosixConfig::Init(); SuccessOrExit(err); - SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl()); #endif // CHIP_DISABLE_PLATFORM_KVS - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); mRunLoopSem = dispatch_semaphore_create(0); @@ -64,6 +62,12 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack() err = Internal::GenericPlatformManagerImpl::_InitChipStack(); SuccessOrExit(err); +#if !CHIP_DISABLE_PLATFORM_KVS + // Now set up our device instance info provider. We couldn't do that + // earlier, because the generic implementation sets a generic one. + SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl()); +#endif // CHIP_DISABLE_PLATFORM_KVS + mStartTime = System::SystemClock().GetMonotonicTimestamp(); static_cast(DeviceLayer::SystemLayer()).SetDispatchQueue(GetWorkQueue()); diff --git a/src/platform/EFR32/BLEManagerImpl.cpp b/src/platform/EFR32/BLEManagerImpl.cpp index 72d55817042c16..344d6c58a7d362 100644 --- a/src/platform/EFR32/BLEManagerImpl.cpp +++ b/src/platform/EFR32/BLEManagerImpl.cpp @@ -423,12 +423,6 @@ void BLEManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event) } break; - case DeviceEventType::kCHIPoBLENotifyConfirm: { - ChipLogProgress(DeviceLayer, "_OnPlatformEvent kCHIPoBLENotifyConfirm"); - HandleTxConfirmationEvent(event->CHIPoBLENotifyConfirm.ConId); - } - break; - default: ChipLogProgress(DeviceLayer, "_OnPlatformEvent default: event->Type = %d", event->Type); break; @@ -479,24 +473,16 @@ bool BLEManagerImpl::SendIndication(BLE_CONNECTION_OBJECT conId, const ChipBleUU sl_status_t ret; uint16_t cId = (UUIDsMatch(&ChipUUID_CHIPoBLEChar_RX, charId) ? gattdb_CHIPoBLEChar_Rx : gattdb_CHIPoBLEChar_Tx); uint8_t timerHandle = GetTimerHandle(conId, true); - ChipDeviceEvent event; VerifyOrExit(((conState != NULL) && (conState->subscribed != 0)), err = CHIP_ERROR_INVALID_ARGUMENT); VerifyOrExit(timerHandle != kMaxConnections, err = CHIP_ERROR_NO_MEMORY); - // start timer for light notification confirmation. Long delay for spake2 indication + // start timer for light indication confirmation. Long delay for spake2 indication sl_bt_system_set_lazy_soft_timer(TIMER_S_2_TIMERTICK(6), 0, timerHandle, true); - ret = sl_bt_gatt_server_send_notification(conId, cId, (data->DataLength()), data->Start()); + ret = sl_bt_gatt_server_send_indication(conId, cId, (data->DataLength()), data->Start()); err = MapBLEError(ret); - if (err == CHIP_NO_ERROR) - { - event.Type = DeviceEventType::kCHIPoBLENotifyConfirm; - event.CHIPoBLENotifyConfirm.ConId = conId; - err = PlatformMgr().PostEvent(&event); - } - exit: if (err != CHIP_NO_ERROR) { @@ -873,20 +859,20 @@ void BLEManagerImpl::HandleTXCharCCCDWrite(volatile sl_bt_msg_t * evt) { CHIP_ERROR err = CHIP_NO_ERROR; CHIPoBLEConState * bleConnState; - bool isDisabled; + bool isIndicationEnabled = false; ChipDeviceEvent event; bleConnState = GetConnectionState(evt->data.evt_gatt_server_user_write_request.connection); VerifyOrExit(bleConnState != NULL, err = CHIP_ERROR_NO_MEMORY); // Determine if the client is enabling or disabling notification/indication. - isDisabled = (evt->data.evt_gatt_server_characteristic_status.client_config_flags == sl_bt_gatt_disable); + isIndicationEnabled = (evt->data.evt_gatt_server_characteristic_status.client_config_flags == sl_bt_gatt_indication); ChipLogProgress(DeviceLayer, "HandleTXcharCCCDWrite - Config Flags value : %d", evt->data.evt_gatt_server_characteristic_status.client_config_flags); - ChipLogProgress(DeviceLayer, "CHIPoBLE %s received", isDisabled ? "unsubscribe" : "subscribe"); + ChipLogProgress(DeviceLayer, "CHIPoBLE %s received", isIndicationEnabled ? "subscribe" : "unsubscribe"); - if (!isDisabled) + if (isIndicationEnabled) { // If indications are not already enabled for the connection... if (!bleConnState->subscribed) diff --git a/src/platform/EFR32/ConfigurationManagerImpl.cpp b/src/platform/EFR32/ConfigurationManagerImpl.cpp index 9c370bf3b52e6d..64a66be824f61a 100644 --- a/src/platform/EFR32/ConfigurationManagerImpl.cpp +++ b/src/platform/EFR32/ConfigurationManagerImpl.cpp @@ -307,5 +307,10 @@ CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * buf) } #endif +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/EFR32/ConfigurationManagerImpl.h b/src/platform/EFR32/ConfigurationManagerImpl.h index baa3e5849afaec..aaebd3ea65ac91 100644 --- a/src/platform/EFR32/ConfigurationManagerImpl.h +++ b/src/platform/EFR32/ConfigurationManagerImpl.h @@ -82,7 +82,15 @@ inline CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * b { return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } - #endif /* SL_WIFI */ + +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/EFR32/PlatformManagerImpl.cpp b/src/platform/EFR32/PlatformManagerImpl.cpp index 29dc7bbe1e17e7..8d5acfba621c95 100644 --- a/src/platform/EFR32/PlatformManagerImpl.cpp +++ b/src/platform/EFR32/PlatformManagerImpl.cpp @@ -50,8 +50,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) err = chip::DeviceLayer::PersistedStorage::KeyValueStoreMgrImpl().Init(); SuccessOrExit(err); - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - #if CHIP_SYSTEM_CONFIG_USE_LWIP // Initialize LwIP. tcpip_init(NULL, NULL); diff --git a/src/platform/EFR32/gatt_configuration.btconf b/src/platform/EFR32/btconf/gatt_configuration.btconf similarity index 98% rename from src/platform/EFR32/gatt_configuration.btconf rename to src/platform/EFR32/btconf/gatt_configuration.btconf index b6e4af590a8ae3..060af956d3893b 100644 --- a/src/platform/EFR32/gatt_configuration.btconf +++ b/src/platform/EFR32/btconf/gatt_configuration.btconf @@ -81,7 +81,6 @@ - diff --git a/src/platform/EFR32/btconf/in_place_ota_dfu.xml b/src/platform/EFR32/btconf/in_place_ota_dfu.xml new file mode 100644 index 00000000000000..28ca5930597228 --- /dev/null +++ b/src/platform/EFR32/btconf/in_place_ota_dfu.xml @@ -0,0 +1,12 @@ + + + Abstract: The Silicon Labs OTA Service enables in-place over-the-air firmware update of the device. + + Abstract: Silicon Labs OTA Control. + + + + + + + \ No newline at end of file diff --git a/src/platform/EFR32/gatt_db.c b/src/platform/EFR32/gatt_db.c index aa10ec56fa920d..110b069e2c23d7 100644 --- a/src/platform/EFR32/gatt_db.c +++ b/src/platform/EFR32/gatt_db.c @@ -55,7 +55,7 @@ GATT_DATA(const sli_bt_gattdb_value_t gattdb_attribute_field_28) = { .len = 16, 0x1d, } }; GATT_DATA(sli_bt_gattdb_attribute_chrvalue_t - gattdb_attribute_field_24) = { .properties = 0x3e, + gattdb_attribute_field_24) = { .properties = 0x2e, .max_len = 247, .len = 1, .data = { @@ -353,7 +353,7 @@ GATT_DATA(const sli_bt_gattdb_attribute_t gattdb_attributes_map[]) = { .caps = 0xffff, .state = 0x00, .datatype = 0x05, - .characteristic = { .properties = 0x3e, .char_uuid = 0x8001 } }, + .characteristic = { .properties = 0x2e, .char_uuid = 0x8001 } }, { .handle = 0x19, .uuid = 0x8001, .permissions = 0x807, @@ -367,7 +367,7 @@ GATT_DATA(const sli_bt_gattdb_attribute_t gattdb_attributes_map[]) = { .caps = 0xffff, .state = 0x00, .datatype = 0x03, - .configdata = { .flags = 0x03, .clientconfig_index = 0x01 } }, + .configdata = { .flags = 0x02, .clientconfig_index = 0x01 } }, { .handle = 0x1b, .uuid = 0x0002, .permissions = 0x801, diff --git a/src/platform/ESP32/ConfigurationManagerImpl.cpp b/src/platform/ESP32/ConfigurationManagerImpl.cpp index ba2bdddef6b7d8..f11576f621a7fc 100644 --- a/src/platform/ESP32/ConfigurationManagerImpl.cpp +++ b/src/platform/ESP32/ConfigurationManagerImpl.cpp @@ -337,5 +337,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) esp_restart(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/ESP32/ConfigurationManagerImpl.h b/src/platform/ESP32/ConfigurationManagerImpl.h index 01e31473a31ada..56c5e5ad7679a0 100644 --- a/src/platform/ESP32/ConfigurationManagerImpl.h +++ b/src/platform/ESP32/ConfigurationManagerImpl.h @@ -87,5 +87,13 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp static void DoFactoryReset(intptr_t arg); }; +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/ESP32/DiagnosticDataProviderImpl.cpp b/src/platform/ESP32/DiagnosticDataProviderImpl.cpp index 78855b9095ebeb..fde6aacd96be6a 100644 --- a/src/platform/ESP32/DiagnosticDataProviderImpl.cpp +++ b/src/platform/ESP32/DiagnosticDataProviderImpl.cpp @@ -198,6 +198,8 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** { esp_netif_t * netif = esp_netif_next(NULL); NetworkInterface * head = NULL; + uint8_t ipv6_addr_count = 0; + esp_ip6_addr_t ip6_addr[kMaxIPv6AddrCount]; if (netif == NULL) { ChipLogError(DeviceLayer, "Failed to get network interfaces"); @@ -207,6 +209,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** for (esp_netif_t * ifa = netif; ifa != NULL; ifa = esp_netif_next(ifa)) { NetworkInterface * ifp = new NetworkInterface(); + esp_netif_ip_info_t ipv4_info; strncpy(ifp->Name, esp_netif_get_ifkey(ifa), Inet::InterfaceId::kMaxIfNameLength); ifp->Name[Inet::InterfaceId::kMaxIfNameLength - 1] = '\0'; ifp->name = CharSpan::fromCharString(ifp->Name); @@ -222,6 +225,20 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** { ifp->hardwareAddress = ByteSpan(ifp->MacAddress, 6); } + if (esp_netif_get_ip_info(ifa, &ipv4_info) == ESP_OK) + { + memcpy(ifp->Ipv4AddressesBuffer[0], &(ipv4_info.ip.addr), kMaxIPv4AddrSize); + ifp->Ipv4AddressSpans[0] = ByteSpan(ifp->Ipv4AddressesBuffer[0], kMaxIPv4AddrSize); + ifp->IPv4Addresses = chip::app::DataModel::List(ifp->Ipv4AddressSpans, 1); + } + ipv6_addr_count = esp_netif_get_all_ip6(ifa, ip6_addr); + for (uint8_t idx = 0; idx < ipv6_addr_count; ++idx) + { + memcpy(ifp->Ipv6AddressesBuffer[idx], ip6_addr[idx].addr, kMaxIPv6AddrSize); + ifp->Ipv6AddressSpans[idx] = ByteSpan(ifp->Ipv6AddressesBuffer[idx], kMaxIPv6AddrSize); + } + ifp->IPv6Addresses = chip::app::DataModel::List(ifp->Ipv6AddressSpans, ipv6_addr_count); + ifp->Next = head; head = ifp; } diff --git a/src/platform/ESP32/PlatformManagerImpl.cpp b/src/platform/ESP32/PlatformManagerImpl.cpp index d387814f3241f2..c96caeb03934ef 100644 --- a/src/platform/ESP32/PlatformManagerImpl.cpp +++ b/src/platform/ESP32/PlatformManagerImpl.cpp @@ -59,8 +59,6 @@ static int app_entropy_source(void * data, unsigned char * output, size_t len, s CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) { - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - esp_err_t err; // Arrange for CHIP-encapsulated ESP32 errors to be translated to text Internal::ESP32Utils::RegisterESP32ErrorFormatter(); diff --git a/src/platform/ESP32/nimble/BLEManagerImpl.cpp b/src/platform/ESP32/nimble/BLEManagerImpl.cpp index b3ec3b80ce8291..29dd2e7bd7d3de 100644 --- a/src/platform/ESP32/nimble/BLEManagerImpl.cpp +++ b/src/platform/ESP32/nimble/BLEManagerImpl.cpp @@ -115,7 +115,7 @@ const struct ble_gatt_svc_def BLEManagerImpl::CHIPoBLEGATTAttrs[] = { { .uuid = (ble_uuid_t *) (&UUID_CHIPoBLEChar_TX), .access_cb = gatt_svr_chr_access, - .flags = BLE_GATT_CHR_F_READ | BLE_GATT_CHR_F_NOTIFY | BLE_GATT_CHR_F_INDICATE, + .flags = BLE_GATT_CHR_F_READ | BLE_GATT_CHR_F_INDICATE, .val_handle = &sInstance.mTXCharCCCDAttrHandle, }, #if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING @@ -364,10 +364,10 @@ bool BLEManagerImpl::SendIndication(BLE_CONNECTION_OBJECT conId, const ChipBleUU ExitNow(); } - err = MapBLEError(ble_gattc_notify_custom(conId, mTXCharCCCDAttrHandle, om)); + err = MapBLEError(ble_gattc_indicate_custom(conId, mTXCharCCCDAttrHandle, om)); if (err != CHIP_NO_ERROR) { - ChipLogError(DeviceLayer, "ble_gattc_notify_custom() failed: %s", ErrorStr(err)); + ChipLogError(DeviceLayer, "ble_gattc_indicate_custom() failed: %s", ErrorStr(err)); ExitNow(); } @@ -795,19 +795,17 @@ void BLEManagerImpl::HandleTXCharCCCDWrite(struct ble_gap_event * gapEvent) { CHIP_ERROR err = CHIP_NO_ERROR; bool indicationsEnabled; - bool notificationsEnabled; ChipLogProgress(DeviceLayer, "Write request/command received for CHIPoBLE TX CCCD characteristic (con %u" - " ) indicate = %d notify = %d", - gapEvent->subscribe.conn_handle, gapEvent->subscribe.cur_indicate, gapEvent->subscribe.cur_notify); + " ) indicate = %d", + gapEvent->subscribe.conn_handle, gapEvent->subscribe.cur_indicate); - // Determine if the client is enabling or disabling indications/notification. - indicationsEnabled = gapEvent->subscribe.cur_indicate; - notificationsEnabled = gapEvent->subscribe.cur_notify; + // Determine if the client is enabling or disabling indications. + indicationsEnabled = gapEvent->subscribe.cur_indicate; - // If the client has requested to enabled indications/notifications - if (indicationsEnabled || notificationsEnabled) + // If the client has requested to enabled indications + if (indicationsEnabled) { // If indications are not already enabled for the connection... if (!IsSubscribed(gapEvent->subscribe.conn_handle)) @@ -830,14 +828,12 @@ void BLEManagerImpl::HandleTXCharCCCDWrite(struct ble_gap_event * gapEvent) // whether the client is enabling or disabling indications. { ChipDeviceEvent event; - event.Type = (indicationsEnabled || notificationsEnabled) ? DeviceEventType::kCHIPoBLESubscribe - : DeviceEventType::kCHIPoBLEUnsubscribe; + event.Type = (indicationsEnabled) ? DeviceEventType::kCHIPoBLESubscribe : DeviceEventType::kCHIPoBLEUnsubscribe; event.CHIPoBLESubscribe.ConId = gapEvent->subscribe.conn_handle; err = PlatformMgr().PostEvent(&event); } - ChipLogProgress(DeviceLayer, "CHIPoBLE %s received", - (indicationsEnabled || notificationsEnabled) ? "subscribe" : "unsubscribe"); + ChipLogProgress(DeviceLayer, "CHIPoBLE %s received", (indicationsEnabled) ? "subscribe" : "unsubscribe"); exit: if (err != CHIP_NO_ERROR) diff --git a/src/platform/Linux/BLEManagerImpl.cpp b/src/platform/Linux/BLEManagerImpl.cpp index 7de6ac8dba6e1d..cec9dabefebcba 100644 --- a/src/platform/Linux/BLEManagerImpl.cpp +++ b/src/platform/Linux/BLEManagerImpl.cpp @@ -712,7 +712,7 @@ void BLEManagerImpl::InitiateScan(intptr_t arg) sInstance.InitiateScan(static_cast(arg)); } -void BLEManagerImpl::NewConnection(BleLayer * bleLayer, void * appState, const uint16_t connDiscriminator) +void BLEManagerImpl::NewConnection(BleLayer * bleLayer, void * appState, const SetupDiscriminator & connDiscriminator) { mBLEScanConfig.mDiscriminator = connDiscriminator; mBLEScanConfig.mAppState = appState; @@ -768,7 +768,7 @@ void BLEManagerImpl::OnDeviceScanned(BluezDevice1 * device, const chip::Ble::Chi if (mBLEScanConfig.mBleScanState == BleScanState::kScanForDiscriminator) { - if (info.GetDeviceDiscriminator() != mBLEScanConfig.mDiscriminator) + if (!mBLEScanConfig.mDiscriminator.MatchesLongDiscriminator(info.GetDeviceDiscriminator())) { return; } diff --git a/src/platform/Linux/BLEManagerImpl.h b/src/platform/Linux/BLEManagerImpl.h index eed743e6c53b7c..8c0d06b066cbd8 100644 --- a/src/platform/Linux/BLEManagerImpl.h +++ b/src/platform/Linux/BLEManagerImpl.h @@ -66,7 +66,7 @@ struct BLEScanConfig BleScanState mBleScanState = BleScanState::kNotScanning; // If scanning by discriminator, what are we scanning for - uint16_t mDiscriminator = 0; + SetupDiscriminator mDiscriminator; // If scanning by address, what address are we searching for std::string mAddress; @@ -148,7 +148,7 @@ class BLEManagerImpl final : public BLEManager, // ===== Members that implement virtual methods on BleConnectionDelegate. - void NewConnection(BleLayer * bleLayer, void * appState, uint16_t connDiscriminator) override; + void NewConnection(BleLayer * bleLayer, void * appState, const SetupDiscriminator & connDiscriminator) override; CHIP_ERROR CancelConnection() override; // ===== Members that implement virtual methods on ChipDeviceScannerDelegate diff --git a/src/platform/Linux/ConfigurationManagerImpl.cpp b/src/platform/Linux/ConfigurationManagerImpl.cpp index 68a624ae3ce066..2f603f1f3ba31e 100644 --- a/src/platform/Linux/ConfigurationManagerImpl.cpp +++ b/src/platform/Linux/ConfigurationManagerImpl.cpp @@ -397,5 +397,10 @@ CHIP_ERROR ConfigurationManagerImpl::GetLocationCapability(uint8_t & location) return err; } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Linux/ConfigurationManagerImpl.h b/src/platform/Linux/ConfigurationManagerImpl.h index 866710fc8faac9..ecf5aea77830b3 100644 --- a/src/platform/Linux/ConfigurationManagerImpl.h +++ b/src/platform/Linux/ConfigurationManagerImpl.h @@ -88,5 +88,13 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp static void DoFactoryReset(intptr_t arg); }; +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Linux/NetworkCommissioningDriver.h b/src/platform/Linux/NetworkCommissioningDriver.h index 1fbe4588fcf264..d54470e70cb7fe 100644 --- a/src/platform/Linux/NetworkCommissioningDriver.h +++ b/src/platform/Linux/NetworkCommissioningDriver.h @@ -104,7 +104,6 @@ class LinuxWiFiDriver final : public WiFiDriver WiFiNetwork mSavedNetwork; WiFiNetwork mStagingNetwork; - Optional mScanStatus; }; #endif // CHIP_DEVICE_CONFIG_ENABLE_WPA diff --git a/src/platform/Linux/NetworkCommissioningWiFiDriver.cpp b/src/platform/Linux/NetworkCommissioningWiFiDriver.cpp index 68ffb9d56afcb4..2e51be5fef2b1d 100644 --- a/src/platform/Linux/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/Linux/NetworkCommissioningWiFiDriver.cpp @@ -179,14 +179,8 @@ void LinuxWiFiDriver::ScanNetworks(ByteSpan ssid, WiFiDriver::ScanCallback * cal CHIP_ERROR err = DeviceLayer::ConnectivityMgrImpl().StartWiFiScan(ssid, callback); if (err != CHIP_NO_ERROR) { - mScanStatus.SetValue(Status::kUnknownError); callback->OnFinished(Status::kUnknownError, CharSpan(), nullptr); } - else - { - // On linux platform, once "scan" is started, we can say the result will always be success. - mScanStatus.SetValue(Status::kSuccess); - } } size_t LinuxWiFiDriver::WiFiNetworkIterator::Count() diff --git a/src/platform/Linux/PlatformManagerImpl.cpp b/src/platform/Linux/PlatformManagerImpl.cpp index 23ca6af8d07903..d92203a0dfacd6 100644 --- a/src/platform/Linux/PlatformManagerImpl.cpp +++ b/src/platform/Linux/PlatformManagerImpl.cpp @@ -175,13 +175,15 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack() // Initialize the configuration system. ReturnErrorOnFailure(Internal::PosixConfig::Init()); - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl()); // Call _InitChipStack() on the generic implementation base class // to finish the initialization process. ReturnErrorOnFailure(Internal::GenericPlatformManagerImpl_POSIX::_InitChipStack()); + // Now set up our device instance info provider. We couldn't do that + // earlier, because the generic implementation sets a generic one. + SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl()); + mStartTime = System::SystemClock().GetMonotonicTimestamp(); return CHIP_NO_ERROR; diff --git a/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp b/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp index 05e34149a29da5..92a390625410c2 100644 --- a/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp +++ b/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp @@ -177,17 +177,10 @@ void GenericThreadDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * c void GenericThreadDriver::ScanNetworks(ThreadDriver::ScanCallback * callback) { - CHIP_ERROR err = DeviceLayer::ThreadStackMgrImpl().StartThreadScan(callback); - if (err != CHIP_NO_ERROR) + if (DeviceLayer::ThreadStackMgrImpl().StartThreadScan(callback) != CHIP_NO_ERROR) { - mScanStatus.SetValue(Status::kUnknownError); callback->OnFinished(Status::kUnknownError, CharSpan(), nullptr); } - else - { - // OpenThread's "scan" will always success once started, so we can set the value of scan result here. - mScanStatus.SetValue(Status::kSuccess); - } } Status GenericThreadDriver::MatchesNetworkId(const Thread::OperationalDataset & dataset, const ByteSpan & networkId) const diff --git a/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.h b/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.h index 05050b9d818892..8a445e8d6c08e8 100644 --- a/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.h +++ b/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.h @@ -27,7 +27,6 @@ template class otScanResponseIterator : public Iterator { public: - otScanResponseIterator(T * apScanResponse) : mpScanResponse(apScanResponse) {} size_t Count() override { return itemCount; } bool Next(T & item) override { @@ -62,7 +61,7 @@ class otScanResponseIterator : public Iterator size_t currentIterating = 0; size_t itemCount = 0; static constexpr size_t kItemSize = sizeof(T); - T * mpScanResponse; + T * mpScanResponse = nullptr; }; class GenericThreadDriver final : public ThreadDriver @@ -109,7 +108,6 @@ class GenericThreadDriver final : public ThreadDriver ThreadNetworkIterator mThreadIterator = ThreadNetworkIterator(this); Thread::OperationalDataset mStagingNetwork = {}; - Optional mScanStatus; }; } // namespace NetworkCommissioning diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp index 43c412ca6f2118..1acfd00b30b3fd 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp @@ -92,8 +92,7 @@ void initNetworkCommissioningThreadDriver(void) #endif } -NetworkCommissioning::ThreadScanResponse * sScanResult; -NetworkCommissioning::otScanResponseIterator mScanResponseIter(sScanResult); +NetworkCommissioning::otScanResponseIterator mScanResponseIter; } // namespace /** @@ -386,6 +385,9 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::_StartThreadScan(NetworkCommissioning::ThreadDriver::ScanCallback * callback) { CHIP_ERROR error = CHIP_NO_ERROR; +#if CHIP_DEVICE_CONFIG_ENABLE_SED + otLinkModeConfig linkMode; +#endif // If there is another ongoing scan request, reject the new one. VerifyOrReturnError(mpScanCallback == nullptr, CHIP_ERROR_INCORRECT_STATE); @@ -400,6 +402,18 @@ GenericThreadStackManagerImpl_OpenThread::_StartThreadScan(NetworkCom SuccessOrExit(error = MapOpenThreadError(otIp6SetEnabled(mOTInst, true))); } +#if CHIP_DEVICE_CONFIG_ENABLE_SED + // Thread network discovery makes Sleepy End Devices detach from a network, so temporarily disable the SED mode. + linkMode = otThreadGetLinkMode(mOTInst); + + if (!linkMode.mRxOnWhenIdle) + { + mTemporaryRxOnWhenIdle = true; + linkMode.mRxOnWhenIdle = true; + otThreadSetLinkMode(mOTInst, linkMode); + } +#endif + error = MapOpenThreadError(otThreadDiscover(mOTInst, 0, /* all channels */ OT_PANID_BROADCAST, false, false, /* disable PAN ID, EUI64 and Joiner filtering */ _OnNetworkScanFinished, this)); @@ -426,6 +440,16 @@ void GenericThreadStackManagerImpl_OpenThread::_OnNetworkScanFinished { if (aResult == nullptr) // scan completed { +#if CHIP_DEVICE_CONFIG_ENABLE_SED + if (mTemporaryRxOnWhenIdle) + { + otLinkModeConfig linkMode = otThreadGetLinkMode(mOTInst); + linkMode.mRxOnWhenIdle = false; + mTemporaryRxOnWhenIdle = false; + otThreadSetLinkMode(mOTInst, linkMode); + } +#endif + // If Thread scanning was done before commissioning, turn off the IPv6 interface. if (otThreadGetDeviceRole(mOTInst) == OT_DEVICE_ROLE_DISABLED && !otDatasetIsCommissioned(mOTInst)) { diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.h b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.h index 9e0d9c0acac32f..38c9938c8ee694 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.h +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.h @@ -150,8 +150,9 @@ class GenericThreadStackManagerImpl_OpenThread // ===== Private members for use by this class only. otInstance * mOTInst; - uint64_t mOverrunCount = 0; - bool mIsAttached = false; + uint64_t mOverrunCount = 0; + bool mIsAttached = false; + bool mTemporaryRxOnWhenIdle = false; NetworkCommissioning::ThreadDriver::ScanCallback * mpScanCallback; NetworkCommissioning::Internal::WirelessDriver::ConnectCallback * mpConnectCallback; diff --git a/src/platform/P6/ConfigurationManagerImpl.cpp b/src/platform/P6/ConfigurationManagerImpl.cpp index b8c2c0ad3eb618..afa771d5acb837 100644 --- a/src/platform/P6/ConfigurationManagerImpl.cpp +++ b/src/platform/P6/ConfigurationManagerImpl.cpp @@ -238,5 +238,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) NVIC_SystemReset(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/P6/ConfigurationManagerImpl.h b/src/platform/P6/ConfigurationManagerImpl.h index a9fd74facf9220..1327b3bc546214 100644 --- a/src/platform/P6/ConfigurationManagerImpl.h +++ b/src/platform/P6/ConfigurationManagerImpl.h @@ -78,5 +78,13 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp static void DoFactoryReset(intptr_t arg); }; +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/P6/PlatformManagerImpl.cpp b/src/platform/P6/PlatformManagerImpl.cpp index 112c9c779745aa..ac22597407dc98 100644 --- a/src/platform/P6/PlatformManagerImpl.cpp +++ b/src/platform/P6/PlatformManagerImpl.cpp @@ -43,8 +43,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) { CHIP_ERROR err; - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - // Make sure the LwIP core lock has been initialized err = Internal::InitLwIPCoreLock(); SuccessOrExit(err); diff --git a/src/platform/SingletonConfigurationManager.cpp b/src/platform/SingletonConfigurationManager.cpp index 0658ebfbc776bc..01122c3ae0a030 100644 --- a/src/platform/SingletonConfigurationManager.cpp +++ b/src/platform/SingletonConfigurationManager.cpp @@ -21,6 +21,7 @@ */ #include +#include namespace chip { namespace DeviceLayer { @@ -37,8 +38,12 @@ ConfigurationManager * gInstance = nullptr; ConfigurationManager & ConfigurationMgr() { - VerifyOrDie(gInstance != nullptr); - return *gInstance; + if (gInstance != nullptr) + { + return *gInstance; + } + + return ConfigurationMgrImpl(); } void SetConfigurationMgr(ConfigurationManager * configurationManager) diff --git a/src/platform/Tizen/BLEManagerImpl.cpp b/src/platform/Tizen/BLEManagerImpl.cpp index 4fa9d66c1deab1..693ffb5665e053 100644 --- a/src/platform/Tizen/BLEManagerImpl.cpp +++ b/src/platform/Tizen/BLEManagerImpl.cpp @@ -455,7 +455,7 @@ void BLEManagerImpl::OnChipDeviceScanned(void * device, const chip::Ble::ChipBLE if (mBLEScanConfig.mBleScanState == BleScanState::kScanForDiscriminator) { - if (info.GetDeviceDiscriminator() != mBLEScanConfig.mDiscriminator) + if (!mBLEScanConfig.mDiscriminator.MatchesLongDiscriminator(info.GetDeviceDiscriminator())) { return; } @@ -1287,11 +1287,18 @@ bool BLEManagerImpl::SendReadResponse(BLE_CONNECTION_OBJECT conId, BLE_READ_REQU void BLEManagerImpl::NotifyChipConnectionClosed(BLE_CONNECTION_OBJECT conId) {} -void BLEManagerImpl::NewConnection(BleLayer * bleLayer, void * appState, const uint16_t connDiscriminator) +void BLEManagerImpl::NewConnection(BleLayer * bleLayer, void * appState, const SetupDiscriminator & connDiscriminator) { mBLEScanConfig.mDiscriminator = connDiscriminator; mBLEScanConfig.mAppState = appState; - ChipLogProgress(DeviceLayer, "NewConnection: discriminator value [%u]", connDiscriminator); + if (connDiscriminator.IsShortDiscriminator()) + { + ChipLogProgress(DeviceLayer, "NewConnection: short discriminator value [%u]", connDiscriminator.GetShortValue()); + } + else + { + ChipLogProgress(DeviceLayer, "NewConnection: long discriminator value [%u]", connDiscriminator.GetLongValue()); + } // Initiate Scan. PlatformMgr().ScheduleWork(InitiateScan, static_cast(BleScanState::kScanForDiscriminator)); diff --git a/src/platform/Tizen/BLEManagerImpl.h b/src/platform/Tizen/BLEManagerImpl.h index a54d6ec9d7e792..8866263fafbc7e 100644 --- a/src/platform/Tizen/BLEManagerImpl.h +++ b/src/platform/Tizen/BLEManagerImpl.h @@ -57,7 +57,7 @@ struct BLEScanConfig BleScanState mBleScanState = BleScanState::kNotScanning; // If scanning by discriminator, what are we scanning for - uint16_t mDiscriminator = 0; + SetupDiscriminator mDiscriminator; // If scanning by address, what address are we searching for std::string mAddress; @@ -122,7 +122,7 @@ class BLEManagerImpl final : public BLEManager, // ===== Members that implement virtual methods on BleConnectionDelegate. - void NewConnection(BleLayer * bleLayer, void * appState, uint16_t connDiscriminator) override; + void NewConnection(BleLayer * bleLayer, void * appState, const SetupDiscriminator & connDiscriminator) override; CHIP_ERROR CancelConnection() override; // ===== Members that implement virtual methods on ChipDeviceScannerDelegate diff --git a/src/platform/Tizen/BUILD.gn b/src/platform/Tizen/BUILD.gn index 825224b90e1417..37ce8507c7f6cc 100644 --- a/src/platform/Tizen/BUILD.gn +++ b/src/platform/Tizen/BUILD.gn @@ -20,6 +20,11 @@ import("${build_root}/config/linux/pkg_config.gni") import("${chip_root}/src/platform/device.gni") +if (chip_enable_openthread) { + import("//build_overrides/openthread.gni") + import("//build_overrides/ot_br_posix.gni") +} + assert(chip_device_platform == "tizen") static_library("Tizen") { @@ -29,9 +34,6 @@ static_library("Tizen") { "../SingletonConfigurationManager.cpp", "AppPreference.cpp", "AppPreference.h", - "BLEManagerImpl.cpp", - "BLEManagerImpl.h", - "BlePlatformConfig.h", "CHIPDevicePlatformConfig.h", "CHIPDevicePlatformEvent.h", "CHIPPlatformConfig.h", @@ -41,6 +43,8 @@ static_library("Tizen") { "ConfigurationManagerImpl.h", "ConnectivityManagerImpl.cpp", "ConnectivityManagerImpl.h", + "ConnectivityUtils.cpp", + "ConnectivityUtils.h", "DeviceInstanceInfoProviderImpl.cpp", "DeviceInstanceInfoProviderImpl.h", "DeviceNetworkProvisioningDelegateImpl.cpp", @@ -54,16 +58,13 @@ static_library("Tizen") { "MainLoop.cpp", "MainLoop.h", "NetworkCommissioningDriver.h", - "NetworkCommissioningThreadDriver.cpp", - "NetworkCommissioningWiFiDriver.cpp", + "NetworkCommissioningEthernetDriver.cpp", "PlatformManagerImpl.cpp", "PlatformManagerImpl.h", "PosixConfig.cpp", "PosixConfig.h", "SystemPlatformConfig.h", "SystemTimeSupport.cpp", - "WiFiManager.cpp", - "WiFiManager.h", ] deps = [ "${chip_root}/src/setup_payload" ] @@ -76,15 +77,35 @@ static_library("Tizen") { public_configs = [] if (chip_mdns == "platform") { - sources += [ "DnssdImpl.cpp" ] + sources += [ + "DnssdImpl.cpp", + "DnssdImpl.h", + ] deps += [ "${chip_root}/src/lib/dnssd:platform_header" ] } + if (chip_enable_ble) { + sources += [ + "BLEManagerImpl.cpp", + "BLEManagerImpl.h", + "BlePlatformConfig.h", + ] + } + if (chip_enable_openthread) { sources += [ + "NetworkCommissioningThreadDriver.cpp", "ThreadStackManagerImpl.cpp", "ThreadStackManagerImpl.h", ] } + + if (chip_enable_wifi) { + sources += [ + "NetworkCommissioningWiFiDriver.cpp", + "WiFiManager.cpp", + "WiFiManager.h", + ] + } } diff --git a/src/platform/Tizen/ConfigurationManagerImpl.cpp b/src/platform/Tizen/ConfigurationManagerImpl.cpp index 507c22cacdd8ac..d57bd6a7454d69 100644 --- a/src/platform/Tizen/ConfigurationManagerImpl.cpp +++ b/src/platform/Tizen/ConfigurationManagerImpl.cpp @@ -177,5 +177,10 @@ void ConfigurationManagerImpl::RunConfigUnitTest(void) PosixConfig::RunConfigUnitTest(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Tizen/ConfigurationManagerImpl.h b/src/platform/Tizen/ConfigurationManagerImpl.h index 779fa93518a6a9..2180eec73da4a2 100644 --- a/src/platform/Tizen/ConfigurationManagerImpl.h +++ b/src/platform/Tizen/ConfigurationManagerImpl.h @@ -72,5 +72,13 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp void RunConfigUnitTest(void) override; }; +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Tizen/ConnectivityUtils.cpp b/src/platform/Tizen/ConnectivityUtils.cpp new file mode 100644 index 00000000000000..e86e2349318f76 --- /dev/null +++ b/src/platform/Tizen/ConnectivityUtils.cpp @@ -0,0 +1,81 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +// XXX: This is a workaround for a bug in the Tizen SDK header files. It is not +// possible to include both and at the same time. +// This will cause warning that struct ifmap is redefined. On Linux, this +// is not a problem, because in the struct is guarded with +// ifdef. To prevent this, we will define _LINUX_IF_H, so the +// will not be included. +#define _LINUX_IF_H + +#include +#include +#include +#include +#include +#include +#include + +using namespace ::chip::app::Clusters::GeneralDiagnostics; + +namespace chip { +namespace DeviceLayer { +namespace Internal { + +InterfaceType ConnectivityUtils::GetInterfaceConnectionType(const char * ifname) +{ + InterfaceType ret = InterfaceType::EMBER_ZCL_INTERFACE_TYPE_UNSPECIFIED; + int sock = -1; + + if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1) + { + ChipLogError(DeviceLayer, "Failed to open socket"); + return ret; + } + + // Test wireless extensions for CONNECTION_WIFI + struct iwreq pwrq = {}; + strncpy(pwrq.ifr_name, ifname, IFNAMSIZ - 1); + + if (ioctl(sock, SIOCGIWNAME, &pwrq) != -1) + { + ret = InterfaceType::EMBER_ZCL_INTERFACE_TYPE_WI_FI; + } + else if ((strncmp(ifname, "en", 2) == 0) || (strncmp(ifname, "eth", 3) == 0)) + { + struct ethtool_cmd ecmd = {}; + ecmd.cmd = ETHTOOL_GSET; + struct ifreq ifr = {}; + ifr.ifr_data = reinterpret_cast(&ecmd); + strncpy(ifr.ifr_name, ifname, IFNAMSIZ - 1); + + if (ioctl(sock, SIOCETHTOOL, &ifr) != -1) + ret = InterfaceType::EMBER_ZCL_INTERFACE_TYPE_ETHERNET; + } + + close(sock); + + return ret; +} + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/Tizen/ConnectivityUtils.h b/src/platform/Tizen/ConnectivityUtils.h new file mode 100644 index 00000000000000..439e427905ace1 --- /dev/null +++ b/src/platform/Tizen/ConnectivityUtils.h @@ -0,0 +1,35 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +namespace chip { +namespace DeviceLayer { +namespace Internal { + +class ConnectivityUtils +{ +public: + static app::Clusters::GeneralDiagnostics::InterfaceType GetInterfaceConnectionType(const char * ifname); +}; + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/Tizen/NetworkCommissioningDriver.h b/src/platform/Tizen/NetworkCommissioningDriver.h index d998d76c6c7384..50137033ccb95b 100644 --- a/src/platform/Tizen/NetworkCommissioningDriver.h +++ b/src/platform/Tizen/NetworkCommissioningDriver.h @@ -18,6 +18,7 @@ #pragma once #include +#include #include namespace chip { @@ -125,6 +126,28 @@ class TizenThreadDriver final : public ThreadDriver #endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD +class TizenEthernetDriver final : public EthernetDriver +{ +public: + class EthernetNetworkIterator final : public NetworkIterator + { + public: + EthernetNetworkIterator(TizenEthernetDriver * aDriver); + ~EthernetNetworkIterator() override = default; + size_t Count() override { return mInterfaces.size(); } + bool Next(Network & item) override; + void Release() override { delete this; } + + private: + TizenEthernetDriver * mDriver; + std::vector mInterfaces; + size_t mInterfacesIdx = 0; + }; + + uint8_t GetMaxNetworks() override { return 1; }; + NetworkIterator * GetNetworks() override { return new EthernetNetworkIterator(this); }; +}; + } // namespace NetworkCommissioning } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Tizen/NetworkCommissioningEthernetDriver.cpp b/src/platform/Tizen/NetworkCommissioningEthernetDriver.cpp new file mode 100644 index 00000000000000..f700832651361b --- /dev/null +++ b/src/platform/Tizen/NetworkCommissioningEthernetDriver.cpp @@ -0,0 +1,71 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +using namespace chip::app::Clusters::GeneralDiagnostics; +using namespace chip::DeviceLayer::Internal; + +namespace chip { +namespace DeviceLayer { +namespace NetworkCommissioning { + +TizenEthernetDriver::EthernetNetworkIterator::EthernetNetworkIterator(TizenEthernetDriver * aDriver) : mDriver(aDriver) +{ + struct ifaddrs * ifaddr = nullptr; + VerifyOrReturn(getifaddrs(&ifaddr) == 0, ChipLogError(DeviceLayer, "Failed to get network interfaces: %s", strerror(errno))); + + for (const auto * ifa = ifaddr; ifa != nullptr; ifa = ifa->ifa_next) + { + if (ConnectivityUtils::GetInterfaceConnectionType(ifa->ifa_name) == InterfaceType::EMBER_ZCL_INTERFACE_TYPE_ETHERNET) + { + mInterfaces.push_back(ifa->ifa_name); + if (mInterfaces.size() == mDriver->GetMaxNetworks()) + { + break; + } + } + } + + freeifaddrs(ifaddr); +} + +bool TizenEthernetDriver::EthernetNetworkIterator::Next(Network & item) +{ + VerifyOrReturnValue(mInterfacesIdx < mInterfaces.size(), false); + + const auto & iface = mInterfaces[mInterfacesIdx++]; + item.networkIDLen = std::min(iface.size(), kMaxNetworkIDLen); + memcpy(item.networkID, iface.c_str(), item.networkIDLen); + item.connected = true; + + mInterfacesIdx++; + return true; +} + +} // namespace NetworkCommissioning +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/Tizen/NetworkCommissioningWiFiDriver.cpp b/src/platform/Tizen/NetworkCommissioningWiFiDriver.cpp index 85a1b13f95a103..07159e0bb5de5f 100644 --- a/src/platform/Tizen/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/Tizen/NetworkCommissioningWiFiDriver.cpp @@ -89,6 +89,12 @@ Status TizenWiFiDriver::AddOrUpdateNetwork(ByteSpan ssid, ByteSpan credentials, outDebugText.reduce_size(0); outNetworkIndex = 0; VerifyOrReturnError(mStagingNetwork.ssidLen == 0 || NetworkMatch(mStagingNetwork, ssid), Status::kBoundsExceeded); + + static_assert(sizeof(WiFiNetwork::ssid) <= std::numeric_limits::max(), + "Max length of WiFi ssid exceeds the limit of ssidLen field"); + static_assert(sizeof(WiFiNetwork::credentials) <= std::numeric_limits::max(), + "Max length of WiFi credentials exceeds the limit of credentialsLen field"); + VerifyOrReturnError(credentials.size() <= sizeof(mStagingNetwork.credentials), Status::kOutOfRange); VerifyOrReturnError(ssid.size() <= sizeof(mStagingNetwork.ssid), Status::kOutOfRange); diff --git a/src/platform/Tizen/PlatformManagerImpl.cpp b/src/platform/Tizen/PlatformManagerImpl.cpp index b053ab44d7aaaf..cc36d91a3aa507 100644 --- a/src/platform/Tizen/PlatformManagerImpl.cpp +++ b/src/platform/Tizen/PlatformManagerImpl.cpp @@ -39,10 +39,14 @@ PlatformManagerImpl PlatformManagerImpl::sInstance; CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) { ReturnErrorOnFailure(Internal::PosixConfig::Init()); - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); + + ReturnErrorOnFailure(Internal::GenericPlatformManagerImpl_POSIX::_InitChipStack()); + + // Now set up our device instance info provider. We couldn't do that + // earlier, because the generic implementation sets a generic one. SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl()); - return Internal::GenericPlatformManagerImpl_POSIX::_InitChipStack(); + return CHIP_NO_ERROR; } } // namespace DeviceLayer diff --git a/src/platform/Zephyr/ConfigurationManagerImpl.cpp b/src/platform/Zephyr/ConfigurationManagerImpl.cpp index 6dfe51ab023f55..bd19057e65d3bf 100644 --- a/src/platform/Zephyr/ConfigurationManagerImpl.cpp +++ b/src/platform/Zephyr/ConfigurationManagerImpl.cpp @@ -180,5 +180,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) PlatformMgr().Shutdown(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Zephyr/ConfigurationManagerImpl.h b/src/platform/Zephyr/ConfigurationManagerImpl.h index 5f331d14d81897..166237fba32d81 100644 --- a/src/platform/Zephyr/ConfigurationManagerImpl.h +++ b/src/platform/Zephyr/ConfigurationManagerImpl.h @@ -99,5 +99,13 @@ inline CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * / return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Zephyr/PlatformManagerImpl.cpp b/src/platform/Zephyr/PlatformManagerImpl.cpp index 22c9961fba989b..53053b5eae74f7 100644 --- a/src/platform/Zephyr/PlatformManagerImpl.cpp +++ b/src/platform/Zephyr/PlatformManagerImpl.cpp @@ -106,7 +106,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) // Initialize the configuration system. err = Internal::ZephyrConfig::Init(); SuccessOrExit(err); - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); #if !CONFIG_NORDIC_SECURITY_BACKEND // Add entropy source based on Zephyr entropy driver diff --git a/src/platform/android/BLEManagerImpl.cpp b/src/platform/android/BLEManagerImpl.cpp index 4aab1c74c62aaa..f2068dc5da7eb3 100644 --- a/src/platform/android/BLEManagerImpl.cpp +++ b/src/platform/android/BLEManagerImpl.cpp @@ -449,7 +449,7 @@ void BLEManagerImpl::NotifyChipConnectionClosed(BLE_CONNECTION_OBJECT conId) // ===== start implement virtual methods on BleConnectionDelegate. -void BLEManagerImpl::NewConnection(BleLayer * bleLayer, void * appState, const uint16_t connDiscriminator) +void BLEManagerImpl::NewConnection(BleLayer * bleLayer, void * appState, const SetupDiscriminator & connDiscriminator) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -461,7 +461,20 @@ void BLEManagerImpl::NewConnection(BleLayer * bleLayer, void * appState, const u VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); env->ExceptionClear(); - env->CallVoidMethod(mBLEManagerObject, mOnNewConnectionMethod, static_cast(connDiscriminator)); + // TODO: The API we have here does not handle short discriminators in any + // sane way. Just do what we used to do, which is pretend that a short + // discriminator is actually a long discriminator with the low bits all 0. + uint16_t discriminator; + if (connDiscriminator.IsShortDiscriminator()) + { + discriminator = static_cast(connDiscriminator.GetShortValue()) + << (SetupDiscriminator::kLongBits - SetupDiscriminator::kShortBits); + } + else + { + discriminator = connDiscriminator.GetLongValue(); + } + env->CallVoidMethod(mBLEManagerObject, mOnNewConnectionMethod, static_cast(discriminator)); VerifyOrExit(!env->ExceptionCheck(), err = CHIP_JNI_ERROR_EXCEPTION_THROWN); exit: diff --git a/src/platform/android/BLEManagerImpl.h b/src/platform/android/BLEManagerImpl.h index 718db85c71b147..361129cdd42bbe 100644 --- a/src/platform/android/BLEManagerImpl.h +++ b/src/platform/android/BLEManagerImpl.h @@ -90,7 +90,7 @@ class BLEManagerImpl final : public BLEManager, // ===== Members that implement virtual methods on BleConnectionDelegate. - void NewConnection(BleLayer * bleLayer, void * appState, uint16_t connDiscriminator) override; + void NewConnection(BleLayer * bleLayer, void * appState, const SetupDiscriminator & connDiscriminator) override; CHIP_ERROR CancelConnection() override; // ===== Members for internal use by the following friends. diff --git a/src/platform/android/ConfigurationManagerImpl.cpp b/src/platform/android/ConfigurationManagerImpl.cpp index 5c42175148e641..9ce80257b53fcc 100644 --- a/src/platform/android/ConfigurationManagerImpl.cpp +++ b/src/platform/android/ConfigurationManagerImpl.cpp @@ -215,5 +215,10 @@ CHIP_ERROR ConfigurationManagerImpl::GetUniqueId(char * buf, size_t bufSize) return ReadConfigValueStr(AndroidConfig::kConfigKey_UniqueId, buf, bufSize, dateLen); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/android/ConfigurationManagerImpl.h b/src/platform/android/ConfigurationManagerImpl.h index 45b93bdc76b618..6e1a2ed9870e66 100644 --- a/src/platform/android/ConfigurationManagerImpl.h +++ b/src/platform/android/ConfigurationManagerImpl.h @@ -83,5 +83,13 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp jobject mConfigurationManagerObject = nullptr; }; +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/android/PlatformManagerImpl.cpp b/src/platform/android/PlatformManagerImpl.cpp index 0fe62600ad6e0c..4a6211b68713e0 100644 --- a/src/platform/android/PlatformManagerImpl.cpp +++ b/src/platform/android/PlatformManagerImpl.cpp @@ -46,14 +46,16 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack() // Initialize the configuration system. err = Internal::AndroidConfig::Init(); SuccessOrExit(err); - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl()); // Call _InitChipStack() on the generic implementation base class // to finish the initialization process. err = Internal::GenericPlatformManagerImpl_POSIX::_InitChipStack(); SuccessOrExit(err); + // Now set up our device instance info provider. We couldn't do that + // earlier, because the generic implementation sets a generic one. + SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl()); + exit: return err; } diff --git a/src/platform/bouffalolab/BL602/ConfigurationManagerImpl.cpp b/src/platform/bouffalolab/BL602/ConfigurationManagerImpl.cpp index 23c860a1a32d82..b30390506580bd 100644 --- a/src/platform/bouffalolab/BL602/ConfigurationManagerImpl.cpp +++ b/src/platform/bouffalolab/BL602/ConfigurationManagerImpl.cpp @@ -180,5 +180,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) hal_reboot(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/bouffalolab/BL602/ConfigurationManagerImpl.h b/src/platform/bouffalolab/BL602/ConfigurationManagerImpl.h index 0239f9a8dee22e..037ad2019967e7 100644 --- a/src/platform/bouffalolab/BL602/ConfigurationManagerImpl.h +++ b/src/platform/bouffalolab/BL602/ConfigurationManagerImpl.h @@ -91,9 +91,6 @@ class ConfigurationManagerImpl final : public Internal::GenericConfigurationMana CHIP_ERROR WriteConfigValueBin(Key key, const uint8_t * data, size_t dataLen) override; void RunConfigUnitTest(void) override; - friend ConfigurationManager & ConfigurationMgr(void); - friend ConfigurationManagerImpl & ConfigurationMgrImpl(void); - static ConfigurationManagerImpl sInstance; // ===== Private members reserved for use by this class only. @@ -101,33 +98,19 @@ class ConfigurationManagerImpl final : public Internal::GenericConfigurationMana static void DoFactoryReset(intptr_t arg); }; -/** - * Returns the public interface of the ConfigurationManager singleton object. - * - * Chip applications should use this to access features of the ConfigurationManager object - * that are common to all platforms. - */ -inline ConfigurationManager & ConfigurationMgr(void) +inline CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * buf) { - return ConfigurationManagerImpl::sInstance; + log_error("ConfigurationManagerImpl::_GetPrimaryWiFiMACAddress() is not supported now.\r\n"); + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } /** - * Returns the platform-specific implementation of the ConfigurationManager singleton object. + * Returns the platform-specific implementation of the ConfigurationManager object. * - * Chip applications can use this to gain access to features of the ConfigurationManager - * that are specific to the BL602 platform. + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. */ -inline ConfigurationManagerImpl & ConfigurationMgrImpl(void) -{ - return ConfigurationManagerImpl::sInstance; -} - -inline CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * buf) -{ - log_error("ConfigurationManagerImpl::_GetPrimaryWiFiMACAddress() is not supported now.\r\n"); - return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; -} +ConfigurationManager & ConfigurationMgrImpl(); } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/bouffalolab/BL602/InetPlatformConfig.h b/src/platform/bouffalolab/BL602/InetPlatformConfig.h index cdf045a928069d..0c17f57a4c798a 100644 --- a/src/platform/bouffalolab/BL602/InetPlatformConfig.h +++ b/src/platform/bouffalolab/BL602/InetPlatformConfig.h @@ -43,5 +43,5 @@ #endif // INET_CONFIG_NUM_TCP_ENDPOINTS #ifndef INET_CONFIG_NUM_UDP_ENDPOINTS -#define INET_CONFIG_NUM_UDP_ENDPOINTS 4 +#define INET_CONFIG_NUM_UDP_ENDPOINTS 6 #endif // INET_CONFIG_NUM_UDP_ENDPOINTS diff --git a/src/platform/bouffalolab/BL602/PlatformManagerImpl.cpp b/src/platform/bouffalolab/BL602/PlatformManagerImpl.cpp index 3e359ff707fbc6..26585e132fc91b 100644 --- a/src/platform/bouffalolab/BL602/PlatformManagerImpl.cpp +++ b/src/platform/bouffalolab/BL602/PlatformManagerImpl.cpp @@ -188,8 +188,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) { CHIP_ERROR err; - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - // Initialize the configuration system. err = Internal::BL602Config::Init(); log_error("err: %d\r\n", err); diff --git a/src/platform/cc13x2_26x2/ConfigurationManagerImpl.cpp b/src/platform/cc13x2_26x2/ConfigurationManagerImpl.cpp index 15a00a54aa1ca7..5ceae39b5d5ed4 100644 --- a/src/platform/cc13x2_26x2/ConfigurationManagerImpl.cpp +++ b/src/platform/cc13x2_26x2/ConfigurationManagerImpl.cpp @@ -184,5 +184,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) SysCtrlSystemReset(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/cc13x2_26x2/ConfigurationManagerImpl.h b/src/platform/cc13x2_26x2/ConfigurationManagerImpl.h index ad44199c34ddb5..0e1cb7726c587e 100644 --- a/src/platform/cc13x2_26x2/ConfigurationManagerImpl.h +++ b/src/platform/cc13x2_26x2/ConfigurationManagerImpl.h @@ -75,5 +75,13 @@ inline CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * b return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/cc13x2_26x2/PlatformManagerImpl.cpp b/src/platform/cc13x2_26x2/PlatformManagerImpl.cpp index b9b85e67845717..ec87573cd54e98 100644 --- a/src/platform/cc13x2_26x2/PlatformManagerImpl.cpp +++ b/src/platform/cc13x2_26x2/PlatformManagerImpl.cpp @@ -107,7 +107,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) // Initialize the configuration system. err = Internal::CC13X2_26X2Config::Init(); SuccessOrExit(err); - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); // DMM Addition DMMPolicy_Params dmmPolicyParams; diff --git a/src/platform/cc32xx/ConfigurationManagerImpl.cpp b/src/platform/cc32xx/ConfigurationManagerImpl.cpp index 36028eab69a18d..4ba66c9f80bce6 100644 --- a/src/platform/cc32xx/ConfigurationManagerImpl.cpp +++ b/src/platform/cc32xx/ConfigurationManagerImpl.cpp @@ -197,5 +197,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) MAP_PRCMHibernateCycleTrigger(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/cc32xx/ConfigurationManagerImpl.h b/src/platform/cc32xx/ConfigurationManagerImpl.h index 64be94ae27f57e..48e1771597f7a8 100644 --- a/src/platform/cc32xx/ConfigurationManagerImpl.h +++ b/src/platform/cc32xx/ConfigurationManagerImpl.h @@ -69,5 +69,13 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp static void DoFactoryReset(intptr_t arg); }; +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/cc32xx/PlatformManagerImpl.cpp b/src/platform/cc32xx/PlatformManagerImpl.cpp index 36a81fb2330ca4..258fe59d580832 100644 --- a/src/platform/cc32xx/PlatformManagerImpl.cpp +++ b/src/platform/cc32xx/PlatformManagerImpl.cpp @@ -69,7 +69,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) // Initialize the configuration system. err = Internal::CC32XXConfig::Init(); SuccessOrExit(err); - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); // Initialize LwIP. tcpip_init(NULL, NULL); diff --git a/src/platform/fake/BUILD.gn b/src/platform/fake/BUILD.gn index ab4fe755a1cfb9..858517e8bf74bd 100644 --- a/src/platform/fake/BUILD.gn +++ b/src/platform/fake/BUILD.gn @@ -20,6 +20,7 @@ assert(chip_device_platform == "fake") static_library("fake") { sources = [ + "../SingletonConfigurationManager.cpp", "CHIPDevicePlatformEvent.h", "ConfigurationManagerImpl.cpp", "ConfigurationManagerImpl.h", diff --git a/src/platform/fake/ConfigurationManagerImpl.cpp b/src/platform/fake/ConfigurationManagerImpl.cpp index abfaecbbe6dd44..04b4b52ca89df1 100644 --- a/src/platform/fake/ConfigurationManagerImpl.cpp +++ b/src/platform/fake/ConfigurationManagerImpl.cpp @@ -19,12 +19,10 @@ ConfigurationManagerImpl & ConfigurationManagerImpl::GetDefaultInstance() return sInstance; } -ConfigurationManager & ConfigurationMgr() +ConfigurationManager & ConfigurationMgrImpl() { return ConfigurationManagerImpl::GetDefaultInstance(); } -void SetConfigurationMgr(ConfigurationManager * configurationManager) {} - } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/fake/ConfigurationManagerImpl.h b/src/platform/fake/ConfigurationManagerImpl.h index 40f53e0d0f3c9d..c63b97eaaf83d5 100644 --- a/src/platform/fake/ConfigurationManagerImpl.h +++ b/src/platform/fake/ConfigurationManagerImpl.h @@ -108,5 +108,13 @@ class ConfigurationManagerImpl : public ConfigurationManager System::Clock::Seconds32 mFirmwareBuildChipEpochTime = System::Clock::Seconds32(0); }; +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/mbed/ConfigurationManagerImpl.cpp b/src/platform/mbed/ConfigurationManagerImpl.cpp index b22e48cdc7f6b3..1a5b98846143bf 100644 --- a/src/platform/mbed/ConfigurationManagerImpl.cpp +++ b/src/platform/mbed/ConfigurationManagerImpl.cpp @@ -235,5 +235,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) system_reset(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/mbed/ConfigurationManagerImpl.h b/src/platform/mbed/ConfigurationManagerImpl.h index e73c14cae0f81f..30ac3a7083a238 100644 --- a/src/platform/mbed/ConfigurationManagerImpl.h +++ b/src/platform/mbed/ConfigurationManagerImpl.h @@ -75,5 +75,13 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp static void DoFactoryReset(intptr_t arg); }; +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/mbed/PlatformManagerImpl.cpp b/src/platform/mbed/PlatformManagerImpl.cpp index 6040d36b36eae3..25b5e5e5ccb723 100644 --- a/src/platform/mbed/PlatformManagerImpl.cpp +++ b/src/platform/mbed/PlatformManagerImpl.cpp @@ -92,8 +92,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) tcpip_init(NULL, NULL); #endif - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - auto err = System::Clock::InitClock_RealTime(); SuccessOrExit(err); diff --git a/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.cpp b/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.cpp index ec29b04d2e81a8..451536e8deedbd 100644 --- a/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.cpp +++ b/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.cpp @@ -291,5 +291,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) RESET_SystemReset(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.h b/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.h index bdceee20899ace..689dc8d9732d0c 100644 --- a/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.h +++ b/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.h @@ -84,5 +84,13 @@ inline CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * b return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/nxp/k32w/k32w0/PlatformManagerImpl.cpp b/src/platform/nxp/k32w/k32w0/PlatformManagerImpl.cpp index 4e7240c1f32202..5f00b346bddcde 100644 --- a/src/platform/nxp/k32w/k32w0/PlatformManagerImpl.cpp +++ b/src/platform/nxp/k32w/k32w0/PlatformManagerImpl.cpp @@ -130,8 +130,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) goto exit; } - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - mStartTime = System::SystemClock().GetMonotonicTimestamp(); #if CHIP_SYSTEM_CONFIG_USE_LWIP diff --git a/src/platform/nxp/mw320/BUILD.gn b/src/platform/nxp/mw320/BUILD.gn index 4c934d9c682f2c..ad8f60c6240815 100644 --- a/src/platform/nxp/mw320/BUILD.gn +++ b/src/platform/nxp/mw320/BUILD.gn @@ -25,6 +25,7 @@ if (chip_enable_openthread) { static_library("mw320") { sources = [ "../../FreeRTOS/SystemTimeSupport.cpp", + "../../SingletonConfigurationManager.cpp", "BLEManagerImpl.cpp", "BLEManagerImpl.h", "CHIPDevicePlatformConfig.h", diff --git a/src/platform/nxp/mw320/ConfigurationManagerImpl.cpp b/src/platform/nxp/mw320/ConfigurationManagerImpl.cpp index 77bb20c5b84577..ce936e476cd716 100644 --- a/src/platform/nxp/mw320/ConfigurationManagerImpl.cpp +++ b/src/platform/nxp/mw320/ConfigurationManagerImpl.cpp @@ -48,11 +48,6 @@ ConfigurationManagerImpl & ConfigurationManagerImpl::GetDefaultInstance() return sInstance; } -ConfigurationManager & ConfigurationMgr() -{ - return ConfigurationManagerImpl::GetDefaultInstance(); -} - CHIP_ERROR ConfigurationManagerImpl::Init() { CHIP_ERROR err; @@ -200,5 +195,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) //__NVIC_SystemReset(void); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/nxp/mw320/ConfigurationManagerImpl.h b/src/platform/nxp/mw320/ConfigurationManagerImpl.h index ffb7bbe16bbdf8..fbfa1c5d1bb152 100644 --- a/src/platform/nxp/mw320/ConfigurationManagerImpl.h +++ b/src/platform/nxp/mw320/ConfigurationManagerImpl.h @@ -94,8 +94,6 @@ class ConfigurationManagerImpl final : public Internal::GenericConfigurationMana // ===== Members for internal use by the following friends. friend class Internal::NetworkProvisioningServerImpl; - friend ConfigurationManager & ConfigurationMgr(void); - friend ConfigurationManagerImpl & ConfigurationMgrImpl(void); // static ConfigurationManagerImpl sInstance; @@ -104,30 +102,6 @@ class ConfigurationManagerImpl final : public Internal::GenericConfigurationMana static void DoFactoryReset(intptr_t arg); }; -#if 0 -/** - * Returns the public interface of the ConfigurationManager singleton object. - * - * Chip applications should use this to access features of the ConfigurationManager object - * that are common to all platforms. - */ -inline ConfigurationManager & ConfigurationMgr(void) -{ - return ConfigurationManagerImpl::sInstance; -} - -/** - * Returns the platform-specific implementation of the ConfigurationManager singleton object. - * - * Chio applications can use this to gain access to features of the ConfigurationManager - * that are specific to the MW320 platform. - */ -inline ConfigurationManagerImpl & ConfigurationMgrImpl(void) -{ - return ConfigurationManagerImpl::sInstance; -} -#endif // 0 - inline CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * buf) { wifi_mac_addr_t mac_addr; @@ -139,5 +113,13 @@ inline CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * b return CHIP_NO_ERROR; } +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/nxp/mw320/PlatformManagerImpl.cpp b/src/platform/nxp/mw320/PlatformManagerImpl.cpp index 0ad103dc2babad..fa9732571ea6d6 100644 --- a/src/platform/nxp/mw320/PlatformManagerImpl.cpp +++ b/src/platform/nxp/mw320/PlatformManagerImpl.cpp @@ -61,8 +61,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) err = Internal::MW320Config::Init(); SuccessOrExit(err); - // SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - // Initialize LwIP. // tcpip_init(NULL, NULL); diff --git a/src/platform/qpg/ConfigurationManagerImpl.cpp b/src/platform/qpg/ConfigurationManagerImpl.cpp index 139cce0d681b8c..797e3b46c947c5 100644 --- a/src/platform/qpg/ConfigurationManagerImpl.cpp +++ b/src/platform/qpg/ConfigurationManagerImpl.cpp @@ -190,5 +190,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) qvCHIP_ResetSystem(); } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/qpg/ConfigurationManagerImpl.h b/src/platform/qpg/ConfigurationManagerImpl.h index d267c89bfcd57b..482ead8d743a52 100644 --- a/src/platform/qpg/ConfigurationManagerImpl.h +++ b/src/platform/qpg/ConfigurationManagerImpl.h @@ -74,5 +74,13 @@ inline CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * b return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/qpg/PlatformManagerImpl.cpp b/src/platform/qpg/PlatformManagerImpl.cpp index 737ac78533e623..3f32b261a4c27c 100644 --- a/src/platform/qpg/PlatformManagerImpl.cpp +++ b/src/platform/qpg/PlatformManagerImpl.cpp @@ -44,7 +44,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) // Initialize the configuration system. err = Internal::QPGConfig::Init(); SuccessOrExit(err); - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); #if CHIP_SYSTEM_CONFIG_USE_LWIP // Initialize LwIP. diff --git a/src/platform/webos/BLEManagerImpl.cpp b/src/platform/webos/BLEManagerImpl.cpp index 12376d82671c12..5afa6a09430902 100644 --- a/src/platform/webos/BLEManagerImpl.cpp +++ b/src/platform/webos/BLEManagerImpl.cpp @@ -888,7 +888,7 @@ void BLEManagerImpl::InitiateScan(intptr_t arg) sInstance.InitiateScan(static_cast(arg)); } -void BLEManagerImpl::NewConnection(BleLayer * bleLayer, void * appState, const uint16_t connDiscriminator) +void BLEManagerImpl::NewConnection(BleLayer * bleLayer, void * appState, const SetupDiscriminator & connDiscriminator) { mBLEScanConfig.mDiscriminator = connDiscriminator; mBLEScanConfig.mAppState = appState; diff --git a/src/platform/webos/BLEManagerImpl.h b/src/platform/webos/BLEManagerImpl.h index bc8ad739d82bf0..a9a8a0ac88312d 100644 --- a/src/platform/webos/BLEManagerImpl.h +++ b/src/platform/webos/BLEManagerImpl.h @@ -51,7 +51,7 @@ struct BLEScanConfig BleScanState mBleScanState = BleScanState::kNotScanning; // If scanning by discriminator, what are we scanning for - uint16_t mDiscriminator = 0; + SetupDiscriminator mDiscriminator; // If scanning by address, what address are we searching for std::string mAddress; @@ -131,7 +131,7 @@ class BLEManagerImpl final : public BLEManager, // ===== Members that implement virtual methods on BleConnectionDelegate. - void NewConnection(BleLayer * bleLayer, void * appState, uint16_t connDiscriminator) override; + void NewConnection(BleLayer * bleLayer, void * appState, const SetupDiscriminator & connDiscriminator) override; CHIP_ERROR CancelConnection() override; // ===== Members that implement virtual methods on ChipDeviceScannerDelegate diff --git a/src/platform/webos/BUILD.gn b/src/platform/webos/BUILD.gn index 06323b323528af..19fe96cf0857fd 100644 --- a/src/platform/webos/BUILD.gn +++ b/src/platform/webos/BUILD.gn @@ -78,8 +78,6 @@ static_library("webos") { "ConnectivityManagerImpl.h", "ConnectivityUtils.cpp", "ConnectivityUtils.h", - "DeviceInfoProviderImpl.cpp", - "DeviceInfoProviderImpl.h", "DeviceInstanceInfoProviderImpl.cpp", "DeviceInstanceInfoProviderImpl.h", "DeviceNetworkProvisioningDelegateImpl.cpp", diff --git a/src/platform/webos/ConfigurationManagerImpl.cpp b/src/platform/webos/ConfigurationManagerImpl.cpp index 769609406c9fd6..aaad2515f963d5 100644 --- a/src/platform/webos/ConfigurationManagerImpl.cpp +++ b/src/platform/webos/ConfigurationManagerImpl.cpp @@ -390,5 +390,10 @@ CHIP_ERROR ConfigurationManagerImpl::GetLocationCapability(uint8_t & location) return err; } +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/webos/ConfigurationManagerImpl.h b/src/platform/webos/ConfigurationManagerImpl.h index 178fd6135fd758..6fc9961d6e50c0 100644 --- a/src/platform/webos/ConfigurationManagerImpl.h +++ b/src/platform/webos/ConfigurationManagerImpl.h @@ -88,5 +88,13 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp static void DoFactoryReset(intptr_t arg); }; +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/webos/DeviceInfoProviderImpl.cpp b/src/platform/webos/DeviceInfoProviderImpl.cpp deleted file mode 100644 index de06f831ec1052..00000000000000 --- a/src/platform/webos/DeviceInfoProviderImpl.cpp +++ /dev/null @@ -1,364 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include -#include -#include -#include - -#include -#include - -namespace chip { -namespace DeviceLayer { - -namespace { -constexpr TLV::Tag kLabelNameTag = TLV::ContextTag(0); -constexpr TLV::Tag kLabelValueTag = TLV::ContextTag(1); -} // anonymous namespace - -DeviceInfoProviderImpl & DeviceInfoProviderImpl::GetDefaultInstance() -{ - static DeviceInfoProviderImpl sInstance; - return sInstance; -} - -DeviceInfoProvider::FixedLabelIterator * DeviceInfoProviderImpl::IterateFixedLabel(EndpointId endpoint) -{ - return new FixedLabelIteratorImpl(endpoint); -} - -DeviceInfoProviderImpl::FixedLabelIteratorImpl::FixedLabelIteratorImpl(EndpointId endpoint) : mEndpoint(endpoint) -{ - mIndex = 0; -} - -size_t DeviceInfoProviderImpl::FixedLabelIteratorImpl::Count() -{ - // In Linux Simulation, return the size of the hardcoded labelList on all endpoints. - return 4; -} - -bool DeviceInfoProviderImpl::FixedLabelIteratorImpl::Next(FixedLabelType & output) -{ - bool retval = true; - - // In Linux Simulation, use the following hardcoded labelList on all endpoints. - CHIP_ERROR err = CHIP_NO_ERROR; - - const char * labelPtr = nullptr; - const char * valuePtr = nullptr; - - VerifyOrReturnError(mIndex < 4, false); - - ChipLogProgress(DeviceLayer, "Get the fixed label with index:%ld at endpoint:%d", mIndex, mEndpoint); - - switch (mIndex) - { - case 0: - labelPtr = "room"; - valuePtr = "bedroom 2"; - break; - case 1: - labelPtr = "orientation"; - valuePtr = "North"; - break; - case 2: - labelPtr = "floor"; - valuePtr = "2"; - break; - case 3: - labelPtr = "direction"; - valuePtr = "up"; - break; - default: - err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; - break; - } - - if (err == CHIP_NO_ERROR) - { - VerifyOrReturnError(std::strlen(labelPtr) <= kMaxLabelNameLength, false); - VerifyOrReturnError(std::strlen(valuePtr) <= kMaxLabelValueLength, false); - - Platform::CopyString(mFixedLabelNameBuf, kMaxLabelNameLength + 1, labelPtr); - Platform::CopyString(mFixedLabelValueBuf, kMaxLabelValueLength + 1, valuePtr); - - output.label = CharSpan::fromCharString(mFixedLabelNameBuf); - output.value = CharSpan::fromCharString(mFixedLabelValueBuf); - - mIndex++; - - retval = true; - } - else - { - retval = false; - } - - return retval; -} - -CHIP_ERROR DeviceInfoProviderImpl::SetUserLabelLength(EndpointId endpoint, size_t val) -{ - DefaultStorageKeyAllocator keyAlloc; - - return mStorage->SyncSetKeyValue(keyAlloc.UserLabelLengthKey(endpoint), &val, static_cast(sizeof(val))); -} - -CHIP_ERROR DeviceInfoProviderImpl::GetUserLabelLength(EndpointId endpoint, size_t & val) -{ - DefaultStorageKeyAllocator keyAlloc; - uint16_t len = static_cast(sizeof(val)); - - return mStorage->SyncGetKeyValue(keyAlloc.UserLabelLengthKey(endpoint), &val, len); -} - -CHIP_ERROR DeviceInfoProviderImpl::SetUserLabelAt(EndpointId endpoint, size_t index, const UserLabelType & userLabel) -{ - DefaultStorageKeyAllocator keyAlloc; - uint8_t buf[UserLabelTLVMaxSize()]; - TLV::TLVWriter writer; - writer.Init(buf); - - TLV::TLVType outerType; - ReturnErrorOnFailure(writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, outerType)); - ReturnErrorOnFailure(writer.PutString(kLabelNameTag, userLabel.label)); - ReturnErrorOnFailure(writer.PutString(kLabelValueTag, userLabel.value)); - ReturnErrorOnFailure(writer.EndContainer(outerType)); - - return mStorage->SyncSetKeyValue(keyAlloc.UserLabelIndexKey(endpoint, index), buf, - static_cast(writer.GetLengthWritten())); -} - -DeviceInfoProvider::UserLabelIterator * DeviceInfoProviderImpl::IterateUserLabel(EndpointId endpoint) -{ - return new UserLabelIteratorImpl(*this, endpoint); -} - -DeviceInfoProviderImpl::UserLabelIteratorImpl::UserLabelIteratorImpl(DeviceInfoProviderImpl & provider, EndpointId endpoint) : - mProvider(provider), mEndpoint(endpoint) -{ - size_t total = 0; - - ReturnOnFailure(mProvider.GetUserLabelLength(mEndpoint, total)); - mTotal = total; - mIndex = 0; -} - -bool DeviceInfoProviderImpl::UserLabelIteratorImpl::Next(UserLabelType & output) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - VerifyOrReturnError(mIndex < mTotal, false); - - DefaultStorageKeyAllocator keyAlloc; - uint8_t buf[UserLabelTLVMaxSize()]; - uint16_t len = static_cast(sizeof(buf)); - - err = mProvider.mStorage->SyncGetKeyValue(keyAlloc.UserLabelIndexKey(mEndpoint, mIndex), buf, len); - VerifyOrReturnError(err == CHIP_NO_ERROR, false); - - TLV::ContiguousBufferTLVReader reader; - reader.Init(buf); - err = reader.Next(TLV::kTLVType_Structure, TLV::AnonymousTag()); - VerifyOrReturnError(err == CHIP_NO_ERROR, false); - - TLV::TLVType containerType; - VerifyOrReturnError(reader.EnterContainer(containerType) == CHIP_NO_ERROR, false); - - chip::CharSpan label; - chip::CharSpan value; - - VerifyOrReturnError(reader.Next(kLabelNameTag) == CHIP_NO_ERROR, false); - VerifyOrReturnError(reader.Get(label) == CHIP_NO_ERROR, false); - - VerifyOrReturnError(reader.Next(kLabelValueTag) == CHIP_NO_ERROR, false); - VerifyOrReturnError(reader.Get(value) == CHIP_NO_ERROR, false); - - VerifyOrReturnError(reader.VerifyEndOfContainer() == CHIP_NO_ERROR, false); - VerifyOrReturnError(reader.ExitContainer(containerType) == CHIP_NO_ERROR, false); - - Platform::CopyString(mUserLabelNameBuf, label); - Platform::CopyString(mUserLabelValueBuf, value); - - output.label = CharSpan::fromCharString(mUserLabelNameBuf); - output.value = CharSpan::fromCharString(mUserLabelValueBuf); - - mIndex++; - - return true; -} - -DeviceInfoProvider::SupportedLocalesIterator * DeviceInfoProviderImpl::IterateSupportedLocales() -{ - return new SupportedLocalesIteratorImpl(); -} - -size_t DeviceInfoProviderImpl::SupportedLocalesIteratorImpl::Count() -{ - // In Linux Simulation, return the size of the hardcoded list of Strings that are valid values for the ActiveLocale. - // {("en-US"), ("de-DE"), ("fr-FR"), ("en-GB"), ("es-ES"), ("zh-CN"), ("it-IT"), ("ja-JP")} - - return 8; -} - -bool DeviceInfoProviderImpl::SupportedLocalesIteratorImpl::Next(CharSpan & output) -{ - bool retval = true; - - // In Linux simulation, return following hardcoded list of Strings that are valid values for the ActiveLocale. - CHIP_ERROR err = CHIP_NO_ERROR; - - const char * activeLocalePtr = nullptr; - - VerifyOrReturnError(mIndex < 8, false); - - switch (mIndex) - { - case 0: - activeLocalePtr = "en-US"; - break; - case 1: - activeLocalePtr = "de-DE"; - break; - case 2: - activeLocalePtr = "fr-FR"; - break; - case 3: - activeLocalePtr = "en-GB"; - break; - case 4: - activeLocalePtr = "es-ES"; - break; - case 5: - activeLocalePtr = "zh-CN"; - break; - case 6: - activeLocalePtr = "it-IT"; - break; - case 7: - activeLocalePtr = "ja-JP"; - break; - default: - err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; - break; - } - - if (err == CHIP_NO_ERROR) - { - VerifyOrReturnError(std::strlen(activeLocalePtr) <= kMaxActiveLocaleLength, false); - - Platform::CopyString(mActiveLocaleBuf, kMaxActiveLocaleLength + 1, activeLocalePtr); - - output = CharSpan::fromCharString(mActiveLocaleBuf); - - mIndex++; - - retval = true; - } - else - { - retval = false; - } - - return retval; -} - -DeviceInfoProvider::SupportedCalendarTypesIterator * DeviceInfoProviderImpl::IterateSupportedCalendarTypes() -{ - return new SupportedCalendarTypesIteratorImpl(); -} - -size_t DeviceInfoProviderImpl::SupportedCalendarTypesIteratorImpl::Count() -{ - // In Linux Simulation, return the size of the hardcoded list of Strings that are valid values for the Calendar Types. - // {("kBuddhist"), ("kChinese"), ("kCoptic"), ("kEthiopian"), ("kGregorian"), ("kHebrew"), ("kIndian"), ("kJapanese"), - // ("kKorean"), ("kPersian"), ("kTaiwanese"), ("kIslamic")} - - return 12; -} - -bool DeviceInfoProviderImpl::SupportedCalendarTypesIteratorImpl::Next(CalendarType & output) -{ - bool retval = true; - - // In Linux Simulation, return following hardcoded list of Strings that are valid values for the Calendar Types. - CHIP_ERROR err = CHIP_NO_ERROR; - - VerifyOrReturnError(mIndex < 12, false); - - switch (mIndex) - { - case 0: - output = app::Clusters::TimeFormatLocalization::CalendarType::kBuddhist; - break; - case 1: - output = app::Clusters::TimeFormatLocalization::CalendarType::kChinese; - break; - case 2: - output = app::Clusters::TimeFormatLocalization::CalendarType::kCoptic; - break; - case 3: - output = app::Clusters::TimeFormatLocalization::CalendarType::kEthiopian; - break; - case 4: - output = app::Clusters::TimeFormatLocalization::CalendarType::kGregorian; - break; - case 5: - output = app::Clusters::TimeFormatLocalization::CalendarType::kHebrew; - break; - case 6: - output = app::Clusters::TimeFormatLocalization::CalendarType::kIndian; - break; - case 7: - output = app::Clusters::TimeFormatLocalization::CalendarType::kJapanese; - break; - case 8: - output = app::Clusters::TimeFormatLocalization::CalendarType::kKorean; - break; - case 9: - output = app::Clusters::TimeFormatLocalization::CalendarType::kPersian; - break; - case 10: - output = app::Clusters::TimeFormatLocalization::CalendarType::kTaiwanese; - break; - case 11: - output = app::Clusters::TimeFormatLocalization::CalendarType::kIslamic; - break; - default: - err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; - break; - } - - if (err == CHIP_NO_ERROR) - { - mIndex++; - retval = true; - } - else - { - retval = false; - } - - return retval; -} - -} // namespace DeviceLayer -} // namespace chip diff --git a/src/platform/webos/DeviceInfoProviderImpl.h b/src/platform/webos/DeviceInfoProviderImpl.h deleted file mode 100644 index 30a4643c48e440..00000000000000 --- a/src/platform/webos/DeviceInfoProviderImpl.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#pragma once - -#include -#include -#include - -namespace chip { -namespace DeviceLayer { - -class DeviceInfoProviderImpl : public DeviceInfoProvider -{ -public: - DeviceInfoProviderImpl() = default; - ~DeviceInfoProviderImpl() override {} - - // Iterators - FixedLabelIterator * IterateFixedLabel(EndpointId endpoint) override; - UserLabelIterator * IterateUserLabel(EndpointId endpoint) override; - SupportedLocalesIterator * IterateSupportedLocales() override; - SupportedCalendarTypesIterator * IterateSupportedCalendarTypes() override; - - static DeviceInfoProviderImpl & GetDefaultInstance(); - -protected: - class FixedLabelIteratorImpl : public FixedLabelIterator - { - public: - FixedLabelIteratorImpl(EndpointId endpoint); - size_t Count() override; - bool Next(FixedLabelType & output) override; - void Release() override { delete this; } - - private: - EndpointId mEndpoint = 0; - size_t mIndex = 0; - char mFixedLabelNameBuf[kMaxLabelNameLength + 1]; - char mFixedLabelValueBuf[kMaxLabelValueLength + 1]; - }; - - class UserLabelIteratorImpl : public UserLabelIterator - { - public: - UserLabelIteratorImpl(DeviceInfoProviderImpl & provider, EndpointId endpoint); - size_t Count() override { return mTotal; } - bool Next(UserLabelType & output) override; - void Release() override { delete this; } - - private: - DeviceInfoProviderImpl & mProvider; - EndpointId mEndpoint = 0; - size_t mIndex = 0; - size_t mTotal = 0; - char mUserLabelNameBuf[kMaxLabelNameLength + 1]; - char mUserLabelValueBuf[kMaxLabelValueLength + 1]; - }; - - class SupportedLocalesIteratorImpl : public SupportedLocalesIterator - { - public: - SupportedLocalesIteratorImpl() = default; - size_t Count() override; - bool Next(CharSpan & output) override; - void Release() override { delete this; } - - private: - size_t mIndex = 0; - char mActiveLocaleBuf[kMaxActiveLocaleLength + 1]; - }; - - class SupportedCalendarTypesIteratorImpl : public SupportedCalendarTypesIterator - { - public: - SupportedCalendarTypesIteratorImpl() = default; - size_t Count() override; - bool Next(CalendarType & output) override; - void Release() override { delete this; } - - private: - size_t mIndex = 0; - }; - - CHIP_ERROR SetUserLabelLength(EndpointId endpoint, size_t val) override; - CHIP_ERROR GetUserLabelLength(EndpointId endpoint, size_t & val) override; - CHIP_ERROR SetUserLabelAt(EndpointId endpoint, size_t index, const UserLabelType & userLabel) override; - -private: - static constexpr size_t UserLabelTLVMaxSize() { return TLV::EstimateStructOverhead(kMaxLabelNameLength, kMaxLabelValueLength); } -}; - -} // namespace DeviceLayer -} // namespace chip diff --git a/src/platform/webos/NetworkCommissioningDriver.h b/src/platform/webos/NetworkCommissioningDriver.h index 9a9dc45a73957f..b466353743d713 100644 --- a/src/platform/webos/NetworkCommissioningDriver.h +++ b/src/platform/webos/NetworkCommissioningDriver.h @@ -104,7 +104,6 @@ class LinuxWiFiDriver final : public WiFiDriver WiFiNetwork mSavedNetwork; WiFiNetwork mStagingNetwork; - Optional mScanStatus; }; #endif // CHIP_DEVICE_CONFIG_ENABLE_WPA diff --git a/src/platform/webos/NetworkCommissioningWiFiDriver.cpp b/src/platform/webos/NetworkCommissioningWiFiDriver.cpp index 9230572170715b..aa3d7159b3267f 100644 --- a/src/platform/webos/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/webos/NetworkCommissioningWiFiDriver.cpp @@ -179,14 +179,8 @@ void LinuxWiFiDriver::ScanNetworks(ByteSpan ssid, WiFiDriver::ScanCallback * cal CHIP_ERROR err = DeviceLayer::ConnectivityMgrImpl().StartWiFiScan(ssid, callback); if (err != CHIP_NO_ERROR) { - mScanStatus.SetValue(Status::kUnknownError); callback->OnFinished(Status::kUnknownError, CharSpan(), nullptr); } - else - { - // On linux platform, once "scan" is started, we can say the result will always be success. - mScanStatus.SetValue(Status::kSuccess); - } } size_t LinuxWiFiDriver::WiFiNetworkIterator::Count() diff --git a/src/platform/webos/PlatformManagerImpl.cpp b/src/platform/webos/PlatformManagerImpl.cpp index ec04141e621dd1..299c62dfa72e0c 100644 --- a/src/platform/webos/PlatformManagerImpl.cpp +++ b/src/platform/webos/PlatformManagerImpl.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include #include @@ -165,14 +164,15 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack() // Initialize the configuration system. ReturnErrorOnFailure(Internal::PosixConfig::Init()); - SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - SetDeviceInfoProvider(&DeviceInfoProviderImpl::GetDefaultInstance()); - SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl()); // Call _InitChipStack() on the generic implementation base class // to finish the initialization process. ReturnErrorOnFailure(Internal::GenericPlatformManagerImpl_POSIX::_InitChipStack()); + // Now set up our device instance info provider. We couldn't do that + // earlier, because the generic implementation sets a generic one. + SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl()); + mStartTime = System::SystemClock().GetMonotonicTimestamp(); return CHIP_NO_ERROR; diff --git a/src/protocols/bdx/BdxTransferSession.h b/src/protocols/bdx/BdxTransferSession.h index 7696d0473c9dc8..f5ef397ca7d9e8 100644 --- a/src/protocols/bdx/BdxTransferSession.h +++ b/src/protocols/bdx/BdxTransferSession.h @@ -174,7 +174,6 @@ class DLL_EXPORT TransferSession * @param initData Data for initializing this object and for populating a TransferInit message * The role parameter will determine whether to populate a ReceiveInit or SendInit * @param timeout The amount of time to wait for a response before considering the transfer failed - * @param curTime The current time since epoch. Needed to set a start time for the transfer timeout. * * @return CHIP_ERROR Result of initialization and preparation of a TransferInit message. May also indicate if the * TransferSession object is unable to handle this request. diff --git a/src/protocols/bdx/TransferFacilitator.h b/src/protocols/bdx/TransferFacilitator.h index 3729b4adec90e3..3cc3b55f7d0717 100644 --- a/src/protocols/bdx/TransferFacilitator.h +++ b/src/protocols/bdx/TransferFacilitator.h @@ -137,8 +137,8 @@ class Initiator : public TransferFacilitator * @param[in] layer A System::Layer pointer to use to start the polling timer * @param[in] role The role of the Initiator: Sender or Receiver of BDX data * @param[in] initData Data needed for preparing a transfer request BDX message - * @param[in] timeoutMs The chosen timeout delay for the BDX transfer in milliseconds - * @param[in] pollFreqMs The period for the TransferSession poll timer in milliseconds + * @param[in] timeout The chosen timeout delay for the BDX transfer in milliseconds + * @param[in] pollFreq The period for the TransferSession poll timer in milliseconds */ CHIP_ERROR InitiateTransfer(System::Layer * layer, TransferRole role, const TransferSession::TransferInitData & initData, System::Clock::Timeout timeout, diff --git a/src/protocols/secure_channel/Constants.h b/src/protocols/secure_channel/Constants.h index b7c66687e322db..108b547f86e4f8 100644 --- a/src/protocols/secure_channel/Constants.h +++ b/src/protocols/secure_channel/Constants.h @@ -60,7 +60,6 @@ enum class MsgType : uint8_t PASE_Pake1 = 0x22, PASE_Pake2 = 0x23, PASE_Pake3 = 0x24, - PASE_PakeError = 0x2F, // Certificate-based session establishment Message Types CASE_Sigma1 = 0x30, diff --git a/src/protocols/secure_channel/PASESession.cpp b/src/protocols/secure_channel/PASESession.cpp index cbe4988aff45f7..fc84abe8cd89f1 100644 --- a/src/protocols/secure_channel/PASESession.cpp +++ b/src/protocols/secure_channel/PASESession.cpp @@ -87,7 +87,7 @@ void PASESession::Clear() // It's done so that no security related information will be leaked. memset(&mPASEVerifier, 0, sizeof(mPASEVerifier)); memset(&mKe[0], 0, sizeof(mKe)); - mNextExpectedMsg = MsgType::PASE_PakeError; + mNextExpectedMsg.ClearValue(); mSpake2p.Clear(); mCommissioningHash.Clear(); @@ -185,8 +185,8 @@ CHIP_ERROR PASESession::WaitForPairing(SessionManager & sessionManager, const Sp memmove(mSalt, salt.data(), mSaltLength); memmove(&mPASEVerifier, &verifier, sizeof(verifier)); - mIterationCount = pbkdf2IterCount; - mNextExpectedMsg = MsgType::PBKDFParamRequest; + mIterationCount = pbkdf2IterCount; + mNextExpectedMsg.SetValue(MsgType::PBKDFParamRequest); mPairingComplete = false; mLocalMRPConfig = mrpLocalConfig; @@ -234,8 +234,9 @@ void PASESession::OnResponseTimeout(ExchangeContext * ec) VerifyOrReturn(ec != nullptr, ChipLogError(SecureChannel, "PASESession::OnResponseTimeout was called by null exchange")); VerifyOrReturn(mExchangeCtxt == nullptr || mExchangeCtxt == ec, ChipLogError(SecureChannel, "PASESession::OnResponseTimeout exchange doesn't match")); + // If we were waiting for something, mNextExpectedMsg had better have a value. ChipLogError(SecureChannel, "PASESession timed out while waiting for a response from the peer. Expected message type was %u", - to_underlying(mNextExpectedMsg)); + to_underlying(mNextExpectedMsg.Value())); // Discard the exchange so that Clear() doesn't try closing it. The // exchange will handle that. DiscardExchange(); @@ -293,7 +294,7 @@ CHIP_ERROR PASESession::SendPBKDFParamRequest() ReturnErrorOnFailure( mExchangeCtxt->SendMessage(MsgType::PBKDFParamRequest, std::move(req), SendFlags(SendMessageFlags::kExpectResponse))); - mNextExpectedMsg = MsgType::PBKDFParamResponse; + mNextExpectedMsg.SetValue(MsgType::PBKDFParamResponse); ChipLogDetail(SecureChannel, "Sent PBKDF param request"); @@ -418,7 +419,7 @@ CHIP_ERROR PASESession::SendPBKDFParamResponse(ByteSpan initiatorRandom, bool in mExchangeCtxt->SendMessage(MsgType::PBKDFParamResponse, std::move(resp), SendFlags(SendMessageFlags::kExpectResponse))); ChipLogDetail(SecureChannel, "Sent PBKDF param response"); - mNextExpectedMsg = MsgType::PASE_Pake1; + mNextExpectedMsg.SetValue(MsgType::PASE_Pake1); return CHIP_NO_ERROR; } @@ -545,7 +546,7 @@ CHIP_ERROR PASESession::SendMsg1() mExchangeCtxt->SendMessage(MsgType::PASE_Pake1, std::move(msg), SendFlags(SendMessageFlags::kExpectResponse))); ChipLogDetail(SecureChannel, "Sent spake2p msg1"); - mNextExpectedMsg = MsgType::PASE_Pake2; + mNextExpectedMsg.SetValue(MsgType::PASE_Pake2); return CHIP_NO_ERROR; } @@ -606,7 +607,7 @@ CHIP_ERROR PASESession::HandleMsg1_and_SendMsg2(System::PacketBufferHandle && ms err = mExchangeCtxt->SendMessage(MsgType::PASE_Pake2, std::move(msg2), SendFlags(SendMessageFlags::kExpectResponse)); SuccessOrExit(err); - mNextExpectedMsg = MsgType::PASE_Pake3; + mNextExpectedMsg.SetValue(MsgType::PASE_Pake3); } ChipLogDetail(SecureChannel, "Sent spake2p msg2"); @@ -682,7 +683,7 @@ CHIP_ERROR PASESession::HandleMsg2_and_SendMsg3(System::PacketBufferHandle && ms err = mExchangeCtxt->SendMessage(MsgType::PASE_Pake3, std::move(msg3), SendFlags(SendMessageFlags::kExpectResponse)); SuccessOrExit(err); - mNextExpectedMsg = MsgType::StatusReport; + mNextExpectedMsg.SetValue(MsgType::StatusReport); } ChipLogDetail(SecureChannel, "Sent spake2p msg3"); @@ -703,8 +704,7 @@ CHIP_ERROR PASESession::HandleMsg3(System::PacketBufferHandle && msg) ChipLogDetail(SecureChannel, "Received spake2p msg3"); - // We will set NextExpectedMsg to PASE_PakeError in all cases - mNextExpectedMsg = MsgType::PASE_PakeError; + mNextExpectedMsg.ClearValue(); System::PacketBufferTLVReader tlvReader; TLV::TLVType containerType = TLV::kTLVType_Structure; @@ -784,7 +784,8 @@ CHIP_ERROR PASESession::ValidateReceivedMessage(ExchangeContext * exchange, cons } VerifyOrReturnError(!msg.IsNull(), CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(payloadHeader.HasMessageType(mNextExpectedMsg) || payloadHeader.HasMessageType(MsgType::StatusReport), + VerifyOrReturnError((mNextExpectedMsg.HasValue() && payloadHeader.HasMessageType(mNextExpectedMsg.Value())) || + payloadHeader.HasMessageType(MsgType::StatusReport), CHIP_ERROR_INVALID_MESSAGE_TYPE); return CHIP_NO_ERROR; @@ -835,7 +836,8 @@ CHIP_ERROR PASESession::OnMessageReceived(ExchangeContext * exchange, const Payl break; case MsgType::StatusReport: - err = HandleStatusReport(std::move(msg), mNextExpectedMsg == MsgType::StatusReport); + err = + HandleStatusReport(std::move(msg), mNextExpectedMsg.HasValue() && (mNextExpectedMsg.Value() == MsgType::StatusReport)); break; default: diff --git a/src/protocols/secure_channel/PASESession.h b/src/protocols/secure_channel/PASESession.h index cb44865075935d..19918b7a3515d5 100644 --- a/src/protocols/secure_channel/PASESession.h +++ b/src/protocols/secure_channel/PASESession.h @@ -210,7 +210,8 @@ class DLL_EXPORT PASESession : public Messaging::UnsolicitedMessageHandler, void Finish(); - Protocols::SecureChannel::MsgType mNextExpectedMsg = Protocols::SecureChannel::MsgType::PASE_PakeError; + // mNextExpectedMsg is set when we are expecting a message. + Optional mNextExpectedMsg; #ifdef ENABLE_HSM_SPAKE Spake2pHSM_P256_SHA256_HKDF_HMAC mSpake2p; diff --git a/src/protocols/secure_channel/RendezvousParameters.h b/src/protocols/secure_channel/RendezvousParameters.h index e81162cb237c29..a5b76ed40482ee 100644 --- a/src/protocols/secure_channel/RendezvousParameters.h +++ b/src/protocols/secure_channel/RendezvousParameters.h @@ -54,6 +54,8 @@ class RendezvousParameters return *this; } + // Discriminators in RendezvousParameters are always long (12-bit) + // discriminators. bool HasDiscriminator() const { return mDiscriminator <= kMaxRendezvousDiscriminatorValue; } uint16_t GetDiscriminator() const { return mDiscriminator; } RendezvousParameters & SetDiscriminator(uint16_t discriminator) diff --git a/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.cpp b/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.cpp index 3a26d0df1ee06d..dd76f91a0cd454 100644 --- a/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.cpp +++ b/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.cpp @@ -40,7 +40,6 @@ bool SessionEstablishmentExchangeDispatch::MessagePermitted(Protocols::Id protoc case static_cast(Protocols::SecureChannel::MsgType::PASE_Pake1): case static_cast(Protocols::SecureChannel::MsgType::PASE_Pake2): case static_cast(Protocols::SecureChannel::MsgType::PASE_Pake3): - case static_cast(Protocols::SecureChannel::MsgType::PASE_PakeError): case static_cast(Protocols::SecureChannel::MsgType::CASE_Sigma1): case static_cast(Protocols::SecureChannel::MsgType::CASE_Sigma2): case static_cast(Protocols::SecureChannel::MsgType::CASE_Sigma3): diff --git a/src/setup_payload/AdditionalDataPayloadGenerator.h b/src/setup_payload/AdditionalDataPayloadGenerator.h index 912da9d1dbe60c..1b99334b8f8011 100644 --- a/src/setup_payload/AdditionalDataPayloadGenerator.h +++ b/src/setup_payload/AdditionalDataPayloadGenerator.h @@ -23,9 +23,13 @@ */ #pragma once + +#if CHIP_HAVE_CONFIG_H +#include +#endif + #include #include -#include #include namespace chip { diff --git a/src/setup_payload/ManualSetupPayloadGenerator.cpp b/src/setup_payload/ManualSetupPayloadGenerator.cpp index 25ffa738e99048..b565907d43296a 100644 --- a/src/setup_payload/ManualSetupPayloadGenerator.cpp +++ b/src/setup_payload/ManualSetupPayloadGenerator.cpp @@ -38,14 +38,14 @@ static uint32_t chunk1PayloadRepresentation(const PayloadContents & payload) * - VID/PID present flag */ - constexpr int kDiscriminatorShift = (kPayloadDiscriminatorFieldLengthInBits - kManualSetupChunk1DiscriminatorMsbitsLength); + constexpr int kDiscriminatorShift = (kManualSetupDiscriminatorFieldLengthInBits - kManualSetupChunk1DiscriminatorMsbitsLength); constexpr uint32_t kDiscriminatorMask = (1 << kManualSetupChunk1DiscriminatorMsbitsLength) - 1; static_assert(kManualSetupChunk1VidPidPresentBitPos >= kManualSetupChunk1DiscriminatorMsbitsPos + kManualSetupChunk1DiscriminatorMsbitsLength, "Discriminator won't fit"); - uint32_t discriminatorChunk = (payload.discriminator >> kDiscriminatorShift) & kDiscriminatorMask; + uint32_t discriminatorChunk = (payload.discriminator.GetShortValue() >> kDiscriminatorShift) & kDiscriminatorMask; uint32_t vidPidPresentFlag = payload.commissioningFlow != CommissioningFlow::kStandard ? 1 : 0; uint32_t result = (discriminatorChunk << kManualSetupChunk1DiscriminatorMsbitsPos) | @@ -61,11 +61,10 @@ static uint32_t chunk2PayloadRepresentation(const PayloadContents & payload) * - Discriminator */ - constexpr int kDiscriminatorShift = (kPayloadDiscriminatorFieldLengthInBits - kManualSetupDiscriminatorFieldLengthInBits); constexpr uint32_t kDiscriminatorMask = (1 << kManualSetupChunk2DiscriminatorLsbitsLength) - 1; constexpr uint32_t kPincodeMask = (1 << kManualSetupChunk2PINCodeLsbitsLength) - 1; - uint32_t discriminatorChunk = (payload.discriminator >> kDiscriminatorShift) & kDiscriminatorMask; + uint32_t discriminatorChunk = payload.discriminator.GetShortValue() & kDiscriminatorMask; uint32_t result = ((payload.setUpPINCode & kPincodeMask) << kManualSetupChunk2PINCodeLsbitsPos) | (discriminatorChunk << kManualSetupChunk2DiscriminatorLsbitsPos); diff --git a/src/setup_payload/ManualSetupPayloadParser.cpp b/src/setup_payload/ManualSetupPayloadParser.cpp index ba45646a955e0f..ec0a56427b8f0d 100644 --- a/src/setup_payload/ManualSetupPayloadParser.cpp +++ b/src/setup_payload/ManualSetupPayloadParser.cpp @@ -151,10 +151,6 @@ CHIP_ERROR ManualSetupPayloadParser::populatePayload(SetupPayload & outPayload) discriminator |= ((chunk1 >> kManualSetupChunk1DiscriminatorMsbitsPos) & kDiscriminatorMsbitsMask) << kManualSetupChunk2DiscriminatorLsbitsLength; - // Since manual code only contains upper msbits of discriminator, re-align - constexpr int kDiscriminatorShift = (kPayloadDiscriminatorFieldLengthInBits - kManualSetupDiscriminatorFieldLengthInBits); - discriminator <<= kDiscriminatorShift; - constexpr uint32_t kPincodeMsbitsMask = (1 << kManualSetupChunk3PINCodeMsbitsLength) - 1; constexpr uint32_t kPincodeLsbitsMask = (1 << kManualSetupChunk2PINCodeLsbitsLength) - 1; @@ -200,9 +196,8 @@ CHIP_ERROR ManualSetupPayloadParser::populatePayload(SetupPayload & outPayload) outPayload.commissioningFlow = isLongCode ? CommissioningFlow::kCustom : CommissioningFlow::kStandard; static_assert(kSetupPINCodeFieldLengthInBits <= 32, "Won't fit in uint32_t"); outPayload.setUpPINCode = static_cast(setUpPINCode); - static_assert(kManualSetupDiscriminatorFieldLengthInBits <= 16, "Won't fit in uint16_t"); - outPayload.discriminator = static_cast(discriminator); - outPayload.isShortDiscriminator = true; + static_assert(kManualSetupDiscriminatorFieldLengthInBits <= 8, "Won't fit in uint8_t"); + outPayload.discriminator.SetShortValue(static_cast(discriminator)); return result; } diff --git a/src/setup_payload/QRCodeSetupPayloadGenerator.cpp b/src/setup_payload/QRCodeSetupPayloadGenerator.cpp index 207a16a3e96c14..cc55888583cf84 100644 --- a/src/setup_payload/QRCodeSetupPayloadGenerator.cpp +++ b/src/setup_payload/QRCodeSetupPayloadGenerator.cpp @@ -170,8 +170,8 @@ static CHIP_ERROR generateBitSet(PayloadContents & payload, MutableByteSpan & bi kCommissioningFlowFieldLengthInBits, kTotalPayloadDataSizeInBits)); ReturnErrorOnFailure(populateBits(bits.data(), offset, payload.rendezvousInformation.Raw(), kRendezvousInfoFieldLengthInBits, kTotalPayloadDataSizeInBits)); - ReturnErrorOnFailure(populateBits(bits.data(), offset, payload.discriminator, kPayloadDiscriminatorFieldLengthInBits, - kTotalPayloadDataSizeInBits)); + ReturnErrorOnFailure(populateBits(bits.data(), offset, payload.discriminator.GetLongValue(), + kPayloadDiscriminatorFieldLengthInBits, kTotalPayloadDataSizeInBits)); ReturnErrorOnFailure( populateBits(bits.data(), offset, payload.setUpPINCode, kSetupPINCodeFieldLengthInBits, kTotalPayloadDataSizeInBits)); ReturnErrorOnFailure(populateBits(bits.data(), offset, 0, kPaddingFieldLengthInBits, kTotalPayloadDataSizeInBits)); diff --git a/src/setup_payload/QRCodeSetupPayloadParser.cpp b/src/setup_payload/QRCodeSetupPayloadParser.cpp index 0eb88be7c9d2ab..340dcf68b9a1a1 100644 --- a/src/setup_payload/QRCodeSetupPayloadParser.cpp +++ b/src/setup_payload/QRCodeSetupPayloadParser.cpp @@ -358,7 +358,7 @@ CHIP_ERROR QRCodeSetupPayloadParser::populatePayload(SetupPayload & outPayload) ReturnErrorOnFailure(readBits(buf, indexToReadFrom, dest, kPayloadDiscriminatorFieldLengthInBits)); static_assert(kPayloadDiscriminatorFieldLengthInBits <= 16, "Won't fit in uint16_t"); - outPayload.discriminator = static_cast(dest); + outPayload.discriminator.SetLongValue(static_cast(dest)); ReturnErrorOnFailure(readBits(buf, indexToReadFrom, dest, kSetupPINCodeFieldLengthInBits)); static_assert(kSetupPINCodeFieldLengthInBits <= 32, "Won't fit in uint32_t"); diff --git a/src/setup_payload/SetupPayload.cpp b/src/setup_payload/SetupPayload.cpp index 12260a0087cd29..7b951cd5be2c10 100644 --- a/src/setup_payload/SetupPayload.cpp +++ b/src/setup_payload/SetupPayload.cpp @@ -79,10 +79,7 @@ bool PayloadContents::isValidQRCodePayload() const return false; } - if (discriminator >= 1 << kPayloadDiscriminatorFieldLengthInBits) - { - return false; - } + // Discriminator validity is enforced by the SetupDiscriminator class. if (setUpPINCode >= 1 << kSetupPINCodeFieldLengthInBits) { @@ -94,15 +91,8 @@ bool PayloadContents::isValidQRCodePayload() const bool PayloadContents::isValidManualCode() const { - // The discriminator for manual setup code is 4 most significant bits - // in a regular 12 bit discriminator. Let's make sure that the provided - // discriminator fits within 12 bits (kPayloadDiscriminatorFieldLengthInBits). - // The manual setup code generator will only use 4 most significant bits from - // it. - if (discriminator >= 1 << kPayloadDiscriminatorFieldLengthInBits) - { - return false; - } + // Discriminator validity is enforced by the SetupDiscriminator class. + if (setUpPINCode >= 1 << kSetupPINCodeFieldLengthInBits) { return false; diff --git a/src/setup_payload/SetupPayload.h b/src/setup_payload/SetupPayload.h index fa9e6ded9c5662..10c664e38d153a 100644 --- a/src/setup_payload/SetupPayload.h +++ b/src/setup_payload/SetupPayload.h @@ -30,6 +30,7 @@ #include #include +#include namespace chip { @@ -39,13 +40,13 @@ const int kVendorIDFieldLengthInBits = 16; const int kProductIDFieldLengthInBits = 16; const int kCommissioningFlowFieldLengthInBits = 2; const int kRendezvousInfoFieldLengthInBits = 8; -const int kPayloadDiscriminatorFieldLengthInBits = 12; +const int kPayloadDiscriminatorFieldLengthInBits = SetupDiscriminator::kLongBits; const int kSetupPINCodeFieldLengthInBits = 27; const int kPaddingFieldLengthInBits = 4; const int kRawVendorTagLengthInBits = 7; // See section 5.1.3. Manual Pairing Code in the Matter specification -const int kManualSetupDiscriminatorFieldLengthInBits = 4; +const int kManualSetupDiscriminatorFieldLengthInBits = SetupDiscriminator::kShortBits; const int kManualSetupChunk1DiscriminatorMsbitsPos = 0; const int kManualSetupChunk1DiscriminatorMsbitsLength = 2; const int kManualSetupChunk1VidPidPresentBitPos = @@ -119,12 +120,11 @@ struct PayloadContents uint16_t productID = 0; CommissioningFlow commissioningFlow = CommissioningFlow::kStandard; RendezvousInformationFlags rendezvousInformation = RendezvousInformationFlag::kNone; - uint16_t discriminator = 0; - uint32_t setUpPINCode = 0; + SetupDiscriminator discriminator; + uint32_t setUpPINCode = 0; bool isValidQRCodePayload() const; bool isValidManualCode() const; - bool isShortDiscriminator = false; bool operator==(PayloadContents & input) const; static bool IsValidSetupPIN(uint32_t setupPIN); diff --git a/src/setup_payload/SetupPayloadHelper.cpp b/src/setup_payload/SetupPayloadHelper.cpp index 63ecb81f96a6aa..ec1ebb047738aa 100644 --- a/src/setup_payload/SetupPayloadHelper.cpp +++ b/src/setup_payload/SetupPayloadHelper.cpp @@ -129,7 +129,7 @@ static CHIP_ERROR addParameter(SetupPayload & setupPayload, const SetupPayloadPa break; case SetupPayloadKey_Discriminator: ChipLogDetail(SetupPayload, "Loaded discriminator: %u", (uint16_t) parameter.uintValue); - setupPayload.discriminator = static_cast(parameter.uintValue); + setupPayload.discriminator.SetLongValue(static_cast(parameter.uintValue)); break; case SetupPayloadKey_SetupPINCode: ChipLogDetail(SetupPayload, "Loaded setupPinCode: %lu", (unsigned long) parameter.uintValue); diff --git a/src/setup_payload/java/SetupPayloadParser-JNI.cpp b/src/setup_payload/java/SetupPayloadParser-JNI.cpp index 0cc1010ae8a1b6..52435876a961c2 100644 --- a/src/setup_payload/java/SetupPayloadParser-JNI.cpp +++ b/src/setup_payload/java/SetupPayloadParser-JNI.cpp @@ -106,7 +106,20 @@ jobject TransformSetupPayload(JNIEnv * env, SetupPayload & payload) env->SetIntField(setupPayload, vendorId, payload.vendorID); env->SetIntField(setupPayload, productId, payload.productID); env->SetIntField(setupPayload, commissioningFlow, static_cast(payload.commissioningFlow)); - env->SetIntField(setupPayload, discriminator, payload.discriminator); + // TODO: The API we have here does not handle short discriminators in any + // sane way. Just do what we used to do, which is pretend that a short + // discriminator is actually a long discriminator with the low bits all 0. + uint16_t discriminatorValue; + if (payload.discriminator.IsShortDiscriminator()) + { + discriminatorValue = static_cast(payload.discriminator.GetShortValue()) + << (SetupDiscriminator::kLongBits - SetupDiscriminator::kShortBits); + } + else + { + discriminatorValue = payload.discriminator.GetLongValue(); + } + env->SetIntField(setupPayload, discriminator, discriminatorValue); env->SetLongField(setupPayload, setUpPinCode, payload.setUpPINCode); env->SetObjectField(setupPayload, discoveryCapabilities, CreateCapabilitiesHashSet(env, payload.rendezvousInformation)); @@ -257,8 +270,8 @@ void TransformSetupPayloadFromJobject(JNIEnv * env, jobject jPayload, SetupPaylo payload.vendorID = env->GetIntField(jPayload, vendorId); payload.productID = env->GetIntField(jPayload, productId); payload.commissioningFlow = static_cast(env->GetIntField(jPayload, commissioningFlow)); - payload.discriminator = env->GetIntField(jPayload, discriminator); - payload.setUpPINCode = env->GetLongField(jPayload, setUpPinCode); + payload.discriminator.SetLongValue(env->GetIntField(jPayload, discriminator)); + payload.setUpPINCode = env->GetLongField(jPayload, setUpPinCode); jobject discoveryCapabilitiesObj = env->GetObjectField(jPayload, discoveryCapabilities); CreateCapabilitiesFromHashSet(env, discoveryCapabilitiesObj, payload.rendezvousInformation); diff --git a/src/setup_payload/tests/TestHelpers.h b/src/setup_payload/tests/TestHelpers.h index 4c1a53da9053d4..57866478ba4055 100644 --- a/src/setup_payload/tests/TestHelpers.h +++ b/src/setup_payload/tests/TestHelpers.h @@ -50,8 +50,8 @@ inline SetupPayload GetDefaultPayload() payload.productID = 1; payload.commissioningFlow = CommissioningFlow::kStandard; payload.rendezvousInformation = RendezvousInformationFlags(RendezvousInformationFlag::kSoftAP); - payload.discriminator = 128; - payload.setUpPINCode = 2048; + payload.discriminator.SetLongValue(128); + payload.setUpPINCode = 2048; return payload; } diff --git a/src/setup_payload/tests/TestManualCode.cpp b/src/setup_payload/tests/TestManualCode.cpp index d4d768820a0d8a..89a98780f9c5b8 100644 --- a/src/setup_payload/tests/TestManualCode.cpp +++ b/src/setup_payload/tests/TestManualCode.cpp @@ -64,8 +64,8 @@ bool CheckGenerator(const PayloadContents & payload, std::string expectedResult, PayloadContents GetDefaultPayload() { PayloadContents payload; - payload.setUpPINCode = 12345679; - payload.discriminator = 2560; + payload.setUpPINCode = 12345679; + payload.discriminator.SetLongValue(2560); return payload; } @@ -127,8 +127,8 @@ void TestDecimalRepresentation_FullPayloadWithoutZeros_DoesNotRequireCustomFlow( void TestDecimalRepresentation_AllZeros(nlTestSuite * inSuite, void * inContext) { PayloadContents payload; - payload.setUpPINCode = 0; - payload.discriminator = 0; + payload.setUpPINCode = 0; + payload.discriminator.SetLongValue(0); std::string expectedResult; @@ -138,8 +138,8 @@ void TestDecimalRepresentation_AllZeros(nlTestSuite * inSuite, void * inContext) void TestDecimalRepresentation_AllOnes(nlTestSuite * inSuite, void * inContext) { PayloadContents payload; - payload.setUpPINCode = 0x7FFFFFF; - payload.discriminator = 0xFFF; + payload.setUpPINCode = 0x7FFFFFF; + payload.discriminator.SetLongValue(0xFFF); payload.commissioningFlow = CommissioningFlow::kCustom; payload.vendorID = 65535; payload.productID = 65535; @@ -149,18 +149,8 @@ void TestDecimalRepresentation_AllOnes(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, CheckGenerator(payload, expectedResult, /*allowInvalidPayload*/ true)); } -void TestDecimalRepresentation_InvalidPayload(nlTestSuite * inSuite, void * inContext) -{ - PayloadContents payload = GetDefaultPayload(); - payload.discriminator = 0x1f00; - - ManualSetupPayloadGenerator generator(payload); - std::string result; - NL_TEST_ASSERT(inSuite, generator.payloadDecimalStringRepresentation(result) == CHIP_ERROR_INVALID_ARGUMENT); -} - void assertPayloadValues(nlTestSuite * inSuite, CHIP_ERROR actualError, CHIP_ERROR expectedError, const PayloadContents & payload, - uint32_t pinCode, uint16_t discriminator, uint16_t vendorID, uint16_t productID) + uint32_t pinCode, const SetupDiscriminator & discriminator, uint16_t vendorID, uint16_t productID) { NL_TEST_ASSERT(inSuite, actualError == expectedError); NL_TEST_ASSERT(inSuite, payload.setUpPINCode == pinCode); @@ -172,7 +162,7 @@ void assertPayloadValues(nlTestSuite * inSuite, CHIP_ERROR actualError, CHIP_ERR void TestGenerateAndParser_ManualSetupCodeWithLongDiscriminator(nlTestSuite * inSuite, void * inContext) { PayloadContents payload = GetDefaultPayload(); - payload.discriminator = 0xa1f; + payload.discriminator.SetLongValue(0xa1f); { // Test short 11 digit code @@ -182,14 +172,18 @@ void TestGenerateAndParser_ManualSetupCodeWithLongDiscriminator(nlTestSuite * in SetupPayload outPayload; CHIP_ERROR err = ManualSetupPayloadParser(result).populatePayload(outPayload); - assertPayloadValues(inSuite, err, CHIP_NO_ERROR, outPayload, payload.setUpPINCode, 0xa00, payload.vendorID, + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + SetupDiscriminator discriminator; + discriminator.SetShortValue(0xa); + assertPayloadValues(inSuite, err, CHIP_NO_ERROR, outPayload, payload.setUpPINCode, discriminator, payload.vendorID, payload.productID); } payload.vendorID = 1; payload.productID = 1; payload.commissioningFlow = CommissioningFlow::kCustom; - payload.discriminator = 0xb1f; + payload.discriminator.SetLongValue(0xb1f); { // Test long 21 digit code @@ -199,7 +193,11 @@ void TestGenerateAndParser_ManualSetupCodeWithLongDiscriminator(nlTestSuite * in SetupPayload outPayload; CHIP_ERROR err = ManualSetupPayloadParser(result).populatePayload(outPayload); - assertPayloadValues(inSuite, err, CHIP_NO_ERROR, outPayload, payload.setUpPINCode, 0xb00, payload.vendorID, + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + SetupDiscriminator discriminator; + discriminator.SetShortValue(0xb); + assertPayloadValues(inSuite, err, CHIP_NO_ERROR, outPayload, payload.setUpPINCode, discriminator, payload.vendorID, payload.productID); } } @@ -212,17 +210,27 @@ void TestPayloadParser_FullPayload(nlTestSuite * inSuite, void * inContext) decimalString = "63610875354536714526"; decimalString += Verhoeff10::ComputeCheckChar(decimalString.c_str()); CHIP_ERROR err = ManualSetupPayloadParser(decimalString).populatePayload(payload); - assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 123456780, 2560, 45367, 14526); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + SetupDiscriminator discriminator; + discriminator.SetShortValue(0xa); + assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 123456780, discriminator, 45367, 14526); decimalString = "52927623630456200032"; decimalString += Verhoeff10::ComputeCheckChar(decimalString.c_str()); err = ManualSetupPayloadParser(decimalString).populatePayload(payload); - assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 38728284, 1280, 4562, 32); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + discriminator.SetShortValue(0x5); + assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 38728284, discriminator, 4562, 32); decimalString = "40000100000000100001"; decimalString += Verhoeff10::ComputeCheckChar(decimalString.c_str()); err = ManualSetupPayloadParser(decimalString).populatePayload(payload); - assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 1, 0, 1, 1); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + discriminator.SetShortValue(0); + assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 1, discriminator, 1, 1); } void TestGenerateAndParser_FullPayload(nlTestSuite * inSuite, void * inContext) @@ -238,7 +246,11 @@ void TestGenerateAndParser_FullPayload(nlTestSuite * inSuite, void * inContext) SetupPayload outPayload; CHIP_ERROR err = ManualSetupPayloadParser(result).populatePayload(outPayload); - assertPayloadValues(inSuite, err, CHIP_NO_ERROR, outPayload, payload.setUpPINCode, payload.discriminator, payload.vendorID, + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + SetupDiscriminator discriminator; + discriminator.SetShortValue(payload.discriminator.GetShortValue()); + assertPayloadValues(inSuite, err, CHIP_NO_ERROR, outPayload, payload.setUpPINCode, discriminator, payload.vendorID, payload.productID); } @@ -252,7 +264,11 @@ void TestGenerateAndParser_PartialPayload(nlTestSuite * inSuite, void * inContex SetupPayload outPayload; CHIP_ERROR err = ManualSetupPayloadParser(result).populatePayload(outPayload); - assertPayloadValues(inSuite, err, CHIP_NO_ERROR, outPayload, payload.setUpPINCode, payload.discriminator, payload.vendorID, + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + SetupDiscriminator discriminator; + discriminator.SetShortValue(payload.discriminator.GetShortValue()); + assertPayloadValues(inSuite, err, CHIP_NO_ERROR, outPayload, payload.setUpPINCode, discriminator, payload.vendorID, payload.productID); } @@ -266,19 +282,29 @@ void TestPayloadParser_PartialPayload(nlTestSuite * inSuite, void * inContext) decimalString += Verhoeff10::ComputeCheckChar(decimalString.c_str()); NL_TEST_ASSERT(inSuite, decimalString.length() == 11); err = ManualSetupPayloadParser(decimalString).populatePayload(payload); - assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 123456780, 2560, 0, 0); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + SetupDiscriminator discriminator; + discriminator.SetShortValue(0xa); + assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 123456780, discriminator, 0, 0); decimalString = "0000010000"; decimalString += Verhoeff10::ComputeCheckChar(decimalString.c_str()); NL_TEST_ASSERT(inSuite, decimalString.length() == 11); err = ManualSetupPayloadParser(decimalString).populatePayload(payload); - assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 1, 0, 0, 0); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + discriminator.SetShortValue(0); + assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 1, discriminator, 0, 0); decimalString = "63610875350000000000"; decimalString += Verhoeff10::ComputeCheckChar(decimalString.c_str()); NL_TEST_ASSERT(inSuite, decimalString.length() == 21); err = ManualSetupPayloadParser(decimalString).populatePayload(payload); - assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 123456780, 2560, 0, 0); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + discriminator.SetShortValue(0xa); + assertPayloadValues(inSuite, err, CHIP_NO_ERROR, payload, 123456780, discriminator, 0, 0); // no discriminator (= 0) decimalString = "0033407535"; @@ -305,6 +331,7 @@ void TestPayloadParser_PartialPayload(nlTestSuite * inSuite, void * inContext) void TestShortCodeReadWrite(nlTestSuite * inSuite, void * context) { PayloadContents inPayload = GetDefaultPayload(); + SetupPayload outPayload; std::string result; @@ -312,6 +339,9 @@ void TestShortCodeReadWrite(nlTestSuite * inSuite, void * context) generator.payloadDecimalStringRepresentation(result); ManualSetupPayloadParser(result).populatePayload(outPayload); + // Override the discriminator in the input payload with the short version, + // since that's what we will produce. + inPayload.discriminator.SetShortValue(inPayload.discriminator.GetShortValue()); NL_TEST_ASSERT(inSuite, inPayload == outPayload); } @@ -321,6 +351,7 @@ void TestLongCodeReadWrite(nlTestSuite * inSuite, void * context) inPayload.commissioningFlow = CommissioningFlow::kCustom; inPayload.vendorID = 1; inPayload.productID = 1; + SetupPayload outPayload; std::string result; @@ -328,6 +359,9 @@ void TestLongCodeReadWrite(nlTestSuite * inSuite, void * context) generator.payloadDecimalStringRepresentation(result); ManualSetupPayloadParser(result).populatePayload(outPayload); + // Override the discriminator in the input payload with the short version, + // since that's what we will produce. + inPayload.discriminator.SetShortValue(inPayload.discriminator.GetShortValue()); NL_TEST_ASSERT(inSuite, inPayload == outPayload); } @@ -336,7 +370,8 @@ void assertEmptyPayloadWithError(nlTestSuite * inSuite, CHIP_ERROR actualError, { NL_TEST_ASSERT(inSuite, actualError == expectedError); NL_TEST_ASSERT(inSuite, - payload.setUpPINCode == 0 && payload.discriminator == 0 && payload.productID == 0 && payload.vendorID == 0); + payload.setUpPINCode == 0 && payload.discriminator.GetLongValue() == 0 && payload.productID == 0 && + payload.vendorID == 0); } void TestPayloadParser_InvalidEntry(nlTestSuite * inSuite, void * inContext) @@ -524,7 +559,6 @@ const nlTest sTests[] = NL_TEST_DEF("Generate Decimal Representation from Full Payload with Zeros", TestDecimalRepresentation_FullPayloadWithZeros), NL_TEST_DEF("Decimal Representation from Full Payload without Zeros", TestDecimalRepresentation_FullPayloadWithoutZeros_DoesNotRequireCustomFlow), NL_TEST_DEF("Decimal Representation from Full Payload without Zeros (Custom Flow)", TestDecimalRepresentation_FullPayloadWithoutZeros), - NL_TEST_DEF("Test Decimal Representation - Invalid Payload", TestDecimalRepresentation_InvalidPayload), NL_TEST_DEF("Test 12 bit discriminator for manual setup code", TestGenerateAndParser_ManualSetupCodeWithLongDiscriminator), NL_TEST_DEF("Test Decimal Representation - All Zeros", TestDecimalRepresentation_AllZeros), NL_TEST_DEF("Test Decimal Representation - All Ones", TestDecimalRepresentation_AllOnes), diff --git a/src/setup_payload/tests/TestQRCode.cpp b/src/setup_payload/tests/TestQRCode.cpp index 7b4a4d39c4c993..2eec6efceff8e8 100644 --- a/src/setup_payload/tests/TestQRCode.cpp +++ b/src/setup_payload/tests/TestQRCode.cpp @@ -89,8 +89,8 @@ void TestMaximumValues(nlTestSuite * inSuite, void * inContext) inPayload.commissioningFlow = CommissioningFlow::kCustom; inPayload.rendezvousInformation = RendezvousInformationFlags( RendezvousInformationFlag::kBLE, RendezvousInformationFlag::kSoftAP, RendezvousInformationFlag::kOnNetwork); - inPayload.discriminator = static_cast((1 << kPayloadDiscriminatorFieldLengthInBits) - 1); - inPayload.setUpPINCode = static_cast((1 << kSetupPINCodeFieldLengthInBits) - 1); + inPayload.discriminator.SetLongValue(static_cast((1 << kPayloadDiscriminatorFieldLengthInBits) - 1)); + inPayload.setUpPINCode = static_cast((1 << kSetupPINCodeFieldLengthInBits) - 1); NL_TEST_ASSERT(inSuite, CheckWriteRead(inPayload, /* allowInvalidPayload */ true)); } @@ -309,12 +309,7 @@ void TestSetupPayloadVerify(nlTestSuite * inSuite, void * inContext) test_payload.rendezvousInformation = invalid; NL_TEST_ASSERT(inSuite, test_payload.isValidQRCodePayload() == false); - // test invalid discriminator - test_payload = payload; - test_payload.discriminator = 1 << kPayloadDiscriminatorFieldLengthInBits; - NL_TEST_ASSERT(inSuite, test_payload.isValidQRCodePayload() == false); - - // test invalid stetup PIN + // test invalid setup PIN test_payload = payload; test_payload.setUpPINCode = 1 << kSetupPINCodeFieldLengthInBits; NL_TEST_ASSERT(inSuite, test_payload.isValidQRCodePayload() == false); @@ -358,9 +353,9 @@ void TestPayloadInEquality(nlTestSuite * inSuite, void * inContext) { SetupPayload payload = GetDefaultPayload(); - SetupPayload unequalPayload = GetDefaultPayload(); - unequalPayload.discriminator = 28; - unequalPayload.setUpPINCode = 121233; + SetupPayload unequalPayload = GetDefaultPayload(); + unequalPayload.discriminator.SetLongValue(28); + unequalPayload.setUpPINCode = 121233; NL_TEST_ASSERT(inSuite, !(payload == unequalPayload)); } diff --git a/src/system/SystemLayerImplSelect.cpp b/src/system/SystemLayerImplSelect.cpp index a7fc85748daf82..5d5e07e890e0f4 100644 --- a/src/system/SystemLayerImplSelect.cpp +++ b/src/system/SystemLayerImplSelect.cpp @@ -246,6 +246,30 @@ CHIP_ERROR LayerImplSelect::RequestCallbackOnPendingRead(SocketWatchToken token) VerifyOrReturnError(watch != nullptr, CHIP_ERROR_INVALID_ARGUMENT); watch->mPendingIO.Set(SocketEventFlags::kRead); + +#if CHIP_SYSTEM_CONFIG_USE_DISPATCH + dispatch_queue_t dispatchQueue = GetDispatchQueue(); + if (watch->mWrSource) + { + dispatch_resume(watch->mRdSource); + } + else + { + if (dispatchQueue) + { + watch->mRdSource = + dispatch_source_create(DISPATCH_SOURCE_TYPE_READ, static_cast(watch->mFD), 0, dispatchQueue); + ReturnErrorCodeIf(watch->mRdSource == nullptr, CHIP_ERROR_NO_MEMORY); + dispatch_source_set_event_handler(watch->mRdSource, ^{ + SocketEvents events; + events.Set(SocketEventFlags::kRead); + watch->mCallback(events, watch->mCallbackData); + }); + dispatch_activate(watch->mRdSource); + } + } +#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH + return CHIP_NO_ERROR; } @@ -255,6 +279,30 @@ CHIP_ERROR LayerImplSelect::RequestCallbackOnPendingWrite(SocketWatchToken token VerifyOrReturnError(watch != nullptr, CHIP_ERROR_INVALID_ARGUMENT); watch->mPendingIO.Set(SocketEventFlags::kWrite); + +#if CHIP_SYSTEM_CONFIG_USE_DISPATCH + if (watch->mWrSource) + { + dispatch_resume(watch->mWrSource); + } + else + { + dispatch_queue_t dispatchQueue = GetDispatchQueue(); + if (dispatchQueue) + { + watch->mWrSource = + dispatch_source_create(DISPATCH_SOURCE_TYPE_WRITE, static_cast(watch->mFD), 0, dispatchQueue); + ReturnErrorCodeIf(watch->mWrSource == nullptr, CHIP_ERROR_NO_MEMORY); + dispatch_source_set_event_handler(watch->mWrSource, ^{ + SocketEvents events; + events.Set(SocketEventFlags::kWrite); + watch->mCallback(events, watch->mCallbackData); + }); + dispatch_activate(watch->mWrSource); + } + } +#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH + return CHIP_NO_ERROR; } @@ -263,6 +311,14 @@ CHIP_ERROR LayerImplSelect::ClearCallbackOnPendingRead(SocketWatchToken token) SocketWatch * watch = reinterpret_cast(token); VerifyOrReturnError(watch != nullptr, CHIP_ERROR_INVALID_ARGUMENT); watch->mPendingIO.Clear(SocketEventFlags::kRead); + +#if CHIP_SYSTEM_CONFIG_USE_DISPATCH + if (watch->mRdSource) + { + dispatch_suspend(watch->mRdSource); + } +#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH + return CHIP_NO_ERROR; } @@ -271,6 +327,14 @@ CHIP_ERROR LayerImplSelect::ClearCallbackOnPendingWrite(SocketWatchToken token) SocketWatch * watch = reinterpret_cast(token); VerifyOrReturnError(watch != nullptr, CHIP_ERROR_INVALID_ARGUMENT); watch->mPendingIO.Clear(SocketEventFlags::kWrite); + +#if CHIP_SYSTEM_CONFIG_USE_DISPATCH + if (watch->mWrSource) + { + dispatch_suspend(watch->mWrSource); + } +#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH + return CHIP_NO_ERROR; } @@ -282,10 +346,25 @@ CHIP_ERROR LayerImplSelect::StopWatchingSocket(SocketWatchToken * tokenInOut) VerifyOrReturnError(watch != nullptr, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(watch->mFD >= 0, CHIP_ERROR_INCORRECT_STATE); +#if CHIP_SYSTEM_CONFIG_USE_DISPATCH + if (watch->mRdSource) + { + dispatch_cancel(watch->mRdSource); + dispatch_release(watch->mRdSource); + } + if (watch->mWrSource) + { + dispatch_cancel(watch->mWrSource); + dispatch_release(watch->mWrSource); + } +#endif + watch->Clear(); +#if !CHIP_SYSTEM_CONFIG_USE_DISPATCH // Wake the thread calling select so that it stops selecting on the socket. Signal(); +#endif return CHIP_NO_ERROR; } @@ -426,6 +505,10 @@ void LayerImplSelect::SocketWatch::Clear() mPendingIO.ClearAll(); mCallback = nullptr; mCallbackData = 0; +#if CHIP_SYSTEM_CONFIG_USE_DISPATCH + mRdSource = nullptr; + mWrSource = nullptr; +#endif } } // namespace System diff --git a/src/system/SystemLayerImplSelect.h b/src/system/SystemLayerImplSelect.h index 338214c3b8720a..7f2724ed732d11 100644 --- a/src/system/SystemLayerImplSelect.h +++ b/src/system/SystemLayerImplSelect.h @@ -90,6 +90,10 @@ class LayerImplSelect : public LayerSocketsLoop int mFD; SocketEvents mPendingIO; SocketWatchCallback mCallback; +#if CHIP_SYSTEM_CONFIG_USE_DISPATCH + dispatch_source_t mRdSource; + dispatch_source_t mWrSource; +#endif intptr_t mCallbackData; }; SocketWatch mSocketWatchPool[kSocketWatchMax]; diff --git a/third_party/cyw30739_sdk/repos/30739A0 b/third_party/cyw30739_sdk/repos/30739A0 index ab7601a74bdffc..c233760b419d55 160000 --- a/third_party/cyw30739_sdk/repos/30739A0 +++ b/third_party/cyw30739_sdk/repos/30739A0 @@ -1 +1 @@ -Subproject commit ab7601a74bdffc7374353c1e19b22388bb3dcedd +Subproject commit c233760b419d556632430380e3645fad1766ca22 diff --git a/third_party/cyw30739_sdk/repos/CYW930739M2EVB-01 b/third_party/cyw30739_sdk/repos/CYW930739M2EVB-01 index 3132c30e1ec305..d5f5b678236866 160000 --- a/third_party/cyw30739_sdk/repos/CYW930739M2EVB-01 +++ b/third_party/cyw30739_sdk/repos/CYW930739M2EVB-01 @@ -1 +1 @@ -Subproject commit 3132c30e1ec305fc53969220e056f5e55532a9b3 +Subproject commit d5f5b678236866620b8f4a88360fb035d3407e06 diff --git a/third_party/openthread/ot-ifx b/third_party/openthread/ot-ifx index e80949a96db29c..64bc0568bbb713 160000 --- a/third_party/openthread/ot-ifx +++ b/third_party/openthread/ot-ifx @@ -1 +1 @@ -Subproject commit e80949a96db29c6229cb78de650d120257284db7 +Subproject commit 64bc0568bbb7136244f2ae5e58ae074b64392e9b diff --git a/third_party/zap/repo b/third_party/zap/repo index 4d97641953d88a..1e9a813d5be38f 160000 --- a/third_party/zap/repo +++ b/third_party/zap/repo @@ -1 +1 @@ -Subproject commit 4d97641953d88a0449565d9fe6093fb95e239f87 +Subproject commit 1e9a813d5be38f4f6b387439454856fe4bc122d1 diff --git a/zzz_generated/all-clusters-app/zap-generated/access.h b/zzz_generated/all-clusters-app/zap-generated/access.h index 45449aa7662e8f..62a93c3f38a0a7 100644 --- a/zzz_generated/all-clusters-app/zap-generated/access.h +++ b/zzz_generated/all-clusters-app/zap-generated/access.h @@ -403,6 +403,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -452,6 +453,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -501,6 +503,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index bf73c8371b1f7a..c815d6432ffbf9 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -721,7 +721,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ @@ -1257,7 +1257,7 @@ \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ { 0x00000000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000001, ZAP_TYPE(VENDOR_ID), 2, 0, ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ { 0x00000002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* ApplicationName */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Status */ \ diff --git a/zzz_generated/all-clusters-minimal-app/zap-generated/access.h b/zzz_generated/all-clusters-minimal-app/zap-generated/access.h index 61813697e29df0..cf4692474e5c80 100644 --- a/zzz_generated/all-clusters-minimal-app/zap-generated/access.h +++ b/zzz_generated/all-clusters-minimal-app/zap-generated/access.h @@ -186,6 +186,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ 62, /* Cluster: Operational Credentials, Command: AttestationRequest, Privilege: administer */ \ @@ -222,6 +223,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ 0, /* Cluster: Operational Credentials, Command: AttestationRequest, Privilege: administer */ \ @@ -258,6 +260,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Command: AttestationRequest, Privilege: administer */ \ diff --git a/zzz_generated/all-clusters-minimal-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-minimal-app/zap-generated/endpoint_config.h index 7da5f608c4d2e0..ea5df11f3c0d4e 100644 --- a/zzz_generated/all-clusters-minimal-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-minimal-app/zap-generated/endpoint_config.h @@ -527,7 +527,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ diff --git a/zzz_generated/app-common/app-common/zap-generated/af-structs.h b/zzz_generated/app-common/app-common/zap-generated/af-structs.h index cfa3a10c40693a..c617ca134c91a3 100644 --- a/zzz_generated/app-common/app-common/zap-generated/af-structs.h +++ b/zzz_generated/app-common/app-common/zap-generated/af-structs.h @@ -53,7 +53,7 @@ typedef struct _TestFabricScoped chip::CharSpan fabricSensitiveCharString; SimpleStruct fabricSensitiveStruct; /* TYPE WARNING: array array defaults to */ uint8_t * fabricSensitiveInt8uList; - chip::FabricIndex fabricIndex; + chip::FabricIndex FabricIndex; } TestFabricScoped; // Struct for Dimension 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 ef79df312b8fc1..bb816fa71b9696 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 @@ -9937,9 +9937,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace CurrentFabricIndex { -EmberAfStatus Get(chip::EndpointId endpoint, chip::FabricIndex * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, readable, sizeof(temp)); @@ -9951,9 +9951,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::FabricIndex * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::FabricIndex value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -9961,7 +9961,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::FabricIndex value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, writable, ZCL_FABRIC_IDX_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } } // namespace CurrentFabricIndex @@ -15802,7 +15802,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_UTC_ATTRIBUTE_TYPE); } } // namespace SetpointChangeSourceTimestamp @@ -22788,9 +22788,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace VendorID { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::VendorId * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, readable, sizeof(temp)); @@ -22802,9 +22802,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::VendorId value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -22812,7 +22812,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_VENDOR_ID_ATTRIBUTE_TYPE); } } // namespace VendorID 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 4f45aeed5e5810..3223dd34192ddf 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 @@ -1745,8 +1745,8 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace CommissionedFabrics namespace CurrentFabricIndex { -EmberAfStatus Get(chip::EndpointId endpoint, chip::FabricIndex * value); // fabric_idx -EmberAfStatus Set(chip::EndpointId endpoint, chip::FabricIndex value); +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace CurrentFabricIndex namespace FeatureMap { @@ -2706,7 +2706,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl } // namespace SetpointChangeAmount namespace SetpointChangeSourceTimestamp { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // epoch_s +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // utc EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); } // namespace SetpointChangeSourceTimestamp @@ -3866,8 +3866,8 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace VendorName namespace VendorID { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::VendorId * value); // vendor_id +EmberAfStatus Set(chip::EndpointId endpoint, chip::VendorId value); } // namespace VendorID namespace ApplicationName { 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 b7f9abcae5b4b8..058787fd2a7d23 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 @@ -1972,8 +1972,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLevel)), level)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionMask)), optionMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionOverride)), optionOverride)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1998,11 +1998,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kTransitionTime): ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime)); break; - case to_underlying(Fields::kOptionMask): - ReturnErrorOnFailure(DataModel::Decode(reader, optionMask)); + case to_underlying(Fields::kOptionsMask): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask)); break; - case to_underlying(Fields::kOptionOverride): - ReturnErrorOnFailure(DataModel::Decode(reader, optionOverride)); + case to_underlying(Fields::kOptionsOverride): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride)); break; default: break; @@ -2021,8 +2021,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMoveMode)), moveMode)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRate)), rate)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionMask)), optionMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionOverride)), optionOverride)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2047,11 +2047,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kRate): ReturnErrorOnFailure(DataModel::Decode(reader, rate)); break; - case to_underlying(Fields::kOptionMask): - ReturnErrorOnFailure(DataModel::Decode(reader, optionMask)); + case to_underlying(Fields::kOptionsMask): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask)); break; - case to_underlying(Fields::kOptionOverride): - ReturnErrorOnFailure(DataModel::Decode(reader, optionOverride)); + case to_underlying(Fields::kOptionsOverride): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride)); break; default: break; @@ -2071,8 +2071,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStepMode)), stepMode)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStepSize)), stepSize)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionMask)), optionMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionOverride)), optionOverride)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2100,11 +2100,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kTransitionTime): ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime)); break; - case to_underlying(Fields::kOptionMask): - ReturnErrorOnFailure(DataModel::Decode(reader, optionMask)); + case to_underlying(Fields::kOptionsMask): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask)); break; - case to_underlying(Fields::kOptionOverride): - ReturnErrorOnFailure(DataModel::Decode(reader, optionOverride)); + case to_underlying(Fields::kOptionsOverride): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride)); break; default: break; @@ -2121,8 +2121,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionMask)), optionMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionOverride)), optionOverride)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2141,11 +2141,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kOptionMask): - ReturnErrorOnFailure(DataModel::Decode(reader, optionMask)); + case to_underlying(Fields::kOptionsMask): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask)); break; - case to_underlying(Fields::kOptionOverride): - ReturnErrorOnFailure(DataModel::Decode(reader, optionOverride)); + case to_underlying(Fields::kOptionsOverride): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride)); break; default: break; @@ -2164,6 +2164,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLevel)), level)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2188,6 +2190,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kTransitionTime): ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime)); break; + case to_underlying(Fields::kOptionsMask): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask)); + break; + case to_underlying(Fields::kOptionsOverride): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride)); + break; default: break; } @@ -2205,6 +2213,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMoveMode)), moveMode)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRate)), rate)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2229,6 +2239,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kRate): ReturnErrorOnFailure(DataModel::Decode(reader, rate)); break; + case to_underlying(Fields::kOptionsMask): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask)); + break; + case to_underlying(Fields::kOptionsOverride): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride)); + break; default: break; } @@ -2247,6 +2263,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStepMode)), stepMode)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStepSize)), stepSize)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2274,6 +2292,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kTransitionTime): ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime)); break; + case to_underlying(Fields::kOptionsMask): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask)); + break; + case to_underlying(Fields::kOptionsOverride): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride)); + break; default: break; } @@ -2289,6 +2313,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2307,6 +2333,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { + case to_underlying(Fields::kOptionsMask): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsMask)); + break; + case to_underlying(Fields::kOptionsOverride): + ReturnErrorOnFailure(DataModel::Decode(reader, optionsOverride)); + break; default: break; } @@ -2989,7 +3021,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kChangeType)), changeType)); ReturnErrorOnFailure( DataModel::EncodeForRead(writer, TLV::ContextTag(to_underlying(Fields::kLatestValue)), GetFabricIndex(), latestValue)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAdminFabricIndex)), adminFabricIndex)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFabricIndex)), fabricIndex)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -3020,8 +3052,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kLatestValue): ReturnErrorOnFailure(DataModel::Decode(reader, latestValue)); break; - case to_underlying(Fields::kAdminFabricIndex): - ReturnErrorOnFailure(DataModel::Decode(reader, adminFabricIndex)); + case to_underlying(Fields::kFabricIndex): + ReturnErrorOnFailure(DataModel::Decode(reader, fabricIndex)); break; default: break; @@ -3043,7 +3075,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kChangeType)), changeType)); ReturnErrorOnFailure( DataModel::EncodeForRead(writer, TLV::ContextTag(to_underlying(Fields::kLatestValue)), GetFabricIndex(), latestValue)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAdminFabricIndex)), adminFabricIndex)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFabricIndex)), fabricIndex)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -3074,8 +3106,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kLatestValue): ReturnErrorOnFailure(DataModel::Decode(reader, latestValue)); break; - case to_underlying(Fields::kAdminFabricIndex): - ReturnErrorOnFailure(DataModel::Decode(reader, adminFabricIndex)); + case to_underlying(Fields::kFabricIndex): + ReturnErrorOnFailure(DataModel::Decode(reader, fabricIndex)); break; default: break; @@ -4106,6 +4138,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFabricIndex)), fabricIndex)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -4124,6 +4157,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { + case to_underlying(Fields::kFabricIndex): + ReturnErrorOnFailure(DataModel::Decode(reader, fabricIndex)); + break; default: break; } @@ -20598,7 +20634,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kArg1)), arg1)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFabricIndex)), fabricIndex)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -20617,8 +20653,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kArg1): - ReturnErrorOnFailure(DataModel::Decode(reader, arg1)); + case to_underlying(Fields::kFabricIndex): + ReturnErrorOnFailure(DataModel::Decode(reader, fabricIndex)); break; default: break; 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 d6b1c9d3e85fd9..69612378441571 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 @@ -2260,10 +2260,10 @@ namespace Commands { namespace MoveToLevel { enum class Fields { - kLevel = 0, - kTransitionTime = 1, - kOptionMask = 2, - kOptionOverride = 3, + kLevel = 0, + kTransitionTime = 1, + kOptionsMask = 2, + kOptionsOverride = 3, }; struct Type @@ -2275,8 +2275,8 @@ struct Type uint8_t level = static_cast(0); uint16_t transitionTime = static_cast(0); - uint8_t optionMask = static_cast(0); - uint8_t optionOverride = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2293,18 +2293,18 @@ struct DecodableType uint8_t level = static_cast(0); uint16_t transitionTime = static_cast(0); - uint8_t optionMask = static_cast(0); - uint8_t optionOverride = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveToLevel namespace Move { enum class Fields { - kMoveMode = 0, - kRate = 1, - kOptionMask = 2, - kOptionOverride = 3, + kMoveMode = 0, + kRate = 1, + kOptionsMask = 2, + kOptionsOverride = 3, }; struct Type @@ -2314,10 +2314,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Move::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - MoveMode moveMode = static_cast(0); - uint8_t rate = static_cast(0); - uint8_t optionMask = static_cast(0); - uint8_t optionOverride = static_cast(0); + MoveMode moveMode = static_cast(0); + uint8_t rate = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2332,21 +2332,21 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::Move::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - MoveMode moveMode = static_cast(0); - uint8_t rate = static_cast(0); - uint8_t optionMask = static_cast(0); - uint8_t optionOverride = static_cast(0); + MoveMode moveMode = static_cast(0); + uint8_t rate = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Move namespace Step { enum class Fields { - kStepMode = 0, - kStepSize = 1, - kTransitionTime = 2, - kOptionMask = 3, - kOptionOverride = 4, + kStepMode = 0, + kStepSize = 1, + kTransitionTime = 2, + kOptionsMask = 3, + kOptionsOverride = 4, }; struct Type @@ -2359,8 +2359,8 @@ struct Type StepMode stepMode = static_cast(0); uint8_t stepSize = static_cast(0); uint16_t transitionTime = static_cast(0); - uint8_t optionMask = static_cast(0); - uint8_t optionOverride = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2378,16 +2378,16 @@ struct DecodableType StepMode stepMode = static_cast(0); uint8_t stepSize = static_cast(0); uint16_t transitionTime = static_cast(0); - uint8_t optionMask = static_cast(0); - uint8_t optionOverride = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Step namespace Stop { enum class Fields { - kOptionMask = 0, - kOptionOverride = 1, + kOptionsMask = 0, + kOptionsOverride = 1, }; struct Type @@ -2397,8 +2397,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - uint8_t optionMask = static_cast(0); - uint8_t optionOverride = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2413,16 +2413,18 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - uint8_t optionMask = static_cast(0); - uint8_t optionOverride = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Stop namespace MoveToLevelWithOnOff { enum class Fields { - kLevel = 0, - kTransitionTime = 1, + kLevel = 0, + kTransitionTime = 1, + kOptionsMask = 2, + kOptionsOverride = 3, }; struct Type @@ -2434,6 +2436,8 @@ struct Type uint8_t level = static_cast(0); uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2450,14 +2454,18 @@ struct DecodableType uint8_t level = static_cast(0); uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveToLevelWithOnOff namespace MoveWithOnOff { enum class Fields { - kMoveMode = 0, - kRate = 1, + kMoveMode = 0, + kRate = 1, + kOptionsMask = 2, + kOptionsOverride = 3, }; struct Type @@ -2467,8 +2475,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveWithOnOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - MoveMode moveMode = static_cast(0); - uint8_t rate = static_cast(0); + MoveMode moveMode = static_cast(0); + uint8_t rate = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2483,17 +2493,21 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveWithOnOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - MoveMode moveMode = static_cast(0); - uint8_t rate = static_cast(0); + MoveMode moveMode = static_cast(0); + uint8_t rate = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveWithOnOff namespace StepWithOnOff { enum class Fields { - kStepMode = 0, - kStepSize = 1, - kTransitionTime = 2, + kStepMode = 0, + kStepSize = 1, + kTransitionTime = 2, + kOptionsMask = 3, + kOptionsOverride = 4, }; struct Type @@ -2506,6 +2520,8 @@ struct Type StepMode stepMode = static_cast(0); uint8_t stepSize = static_cast(0); uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2523,12 +2539,16 @@ struct DecodableType StepMode stepMode = static_cast(0); uint8_t stepSize = static_cast(0); uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StepWithOnOff namespace StopWithOnOff { enum class Fields { + kOptionsMask = 0, + kOptionsOverride = 1, }; struct Type @@ -2538,6 +2558,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StopWithOnOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; using ResponseType = DataModel::NullObjectType; @@ -2551,6 +2574,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::StopWithOnOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StopWithOnOff @@ -3514,11 +3539,11 @@ static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields { - kAdminNodeID = 1, - kAdminPasscodeID = 2, - kChangeType = 3, - kLatestValue = 4, - kAdminFabricIndex = 254, + kAdminNodeID = 1, + kAdminPasscodeID = 2, + kChangeType = 3, + kLatestValue = 4, + kFabricIndex = 254, }; struct Type @@ -3533,9 +3558,9 @@ struct Type DataModel::Nullable adminPasscodeID; ChangeTypeEnum changeType = static_cast(0); DataModel::Nullable latestValue; - chip::FabricIndex adminFabricIndex = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); - auto GetFabricIndex() const { return adminFabricIndex; } + auto GetFabricIndex() const { return fabricIndex; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -3551,7 +3576,7 @@ struct DecodableType DataModel::Nullable adminPasscodeID; ChangeTypeEnum changeType = static_cast(0); DataModel::Nullable latestValue; - chip::FabricIndex adminFabricIndex = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -3561,11 +3586,11 @@ static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields { - kAdminNodeID = 1, - kAdminPasscodeID = 2, - kChangeType = 3, - kLatestValue = 4, - kAdminFabricIndex = 254, + kAdminNodeID = 1, + kAdminPasscodeID = 2, + kChangeType = 3, + kLatestValue = 4, + kFabricIndex = 254, }; struct Type @@ -3580,9 +3605,9 @@ struct Type DataModel::Nullable adminPasscodeID; ChangeTypeEnum changeType = static_cast(0); DataModel::Nullable latestValue; - chip::FabricIndex adminFabricIndex = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); - auto GetFabricIndex() const { return adminFabricIndex; } + auto GetFabricIndex() const { return fabricIndex; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -3598,7 +3623,7 @@ struct DecodableType DataModel::Nullable adminPasscodeID; ChangeTypeEnum changeType = static_cast(0); DataModel::Nullable latestValue; - chip::FabricIndex adminFabricIndex = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -4812,6 +4837,7 @@ static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields { + kFabricIndex = 0, }; struct Type @@ -4822,6 +4848,8 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::Basic::Id; } static constexpr bool kIsFabricScoped = false; + chip::FabricIndex fabricIndex = static_cast(0); + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -4832,6 +4860,8 @@ struct DecodableType static constexpr EventId GetEventId() { return Events::Leave::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Basic::Id; } + chip::FabricIndex fabricIndex = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; } // namespace Leave @@ -11451,9 +11481,9 @@ struct TypeInfo namespace CurrentFabricIndex { struct TypeInfo { - using Type = chip::FabricIndex; - using DecodableType = chip::FabricIndex; - using DecodableArgType = chip::FabricIndex; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::CurrentFabricIndex::Id; } @@ -11504,7 +11534,7 @@ struct TypeInfo Attributes::SupportedFabrics::TypeInfo::DecodableType supportedFabrics = static_cast(0); Attributes::CommissionedFabrics::TypeInfo::DecodableType commissionedFabrics = static_cast(0); Attributes::TrustedRootCertificates::TypeInfo::DecodableType trustedRootCertificates; - Attributes::CurrentFabricIndex::TypeInfo::DecodableType currentFabricIndex = static_cast(0); + Attributes::CurrentFabricIndex::TypeInfo::DecodableType currentFabricIndex = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::AttributeList::TypeInfo::DecodableType attributeList; @@ -22615,9 +22645,9 @@ struct TypeInfo namespace VendorID { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::VendorId; + using DecodableType = chip::VendorId; + using DecodableArgType = chip::VendorId; static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::VendorID::Id; } @@ -22738,7 +22768,7 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::VendorName::TypeInfo::DecodableType vendorName; - Attributes::VendorID::TypeInfo::DecodableType vendorID = static_cast(0); + Attributes::VendorID::TypeInfo::DecodableType vendorID = static_cast(0); Attributes::ApplicationName::TypeInfo::DecodableType applicationName; Attributes::ProductID::TypeInfo::DecodableType productID = static_cast(0); Attributes::Application::TypeInfo::DecodableType application; @@ -27747,7 +27777,7 @@ static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields { - kArg1 = 254, + kFabricIndex = 254, }; struct Type @@ -27758,9 +27788,9 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } static constexpr bool kIsFabricScoped = true; - chip::FabricIndex arg1 = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); - auto GetFabricIndex() const { return arg1; } + auto GetFabricIndex() const { return fabricIndex; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -27772,7 +27802,7 @@ struct DecodableType static constexpr EventId GetEventId() { return Events::TestFabricScopedEvent::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - chip::FabricIndex arg1 = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; diff --git a/zzz_generated/bridge-app/zap-generated/access.h b/zzz_generated/bridge-app/zap-generated/access.h index 3b7bef42840337..2cd7b17c69cd65 100644 --- a/zzz_generated/bridge-app/zap-generated/access.h +++ b/zzz_generated/bridge-app/zap-generated/access.h @@ -155,6 +155,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -185,6 +186,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -215,6 +217,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/bridge-app/zap-generated/endpoint_config.h b/zzz_generated/bridge-app/zap-generated/endpoint_config.h index a39aaf86134db5..e0ac99ebe511d2 100644 --- a/zzz_generated/bridge-app/zap-generated/endpoint_config.h +++ b/zzz_generated/bridge-app/zap-generated/endpoint_config.h @@ -42,7 +42,7 @@ /* Endpoint: 1, Cluster: Bridged Actions (server), big-endian */ \ \ /* 14 - setup url, */ \ - 0, 19, 'h', 't', 't', 'p', 's', ':', '/', '/', 'e', 'x', 'a', 'm', 'p', 'l', 'e', '.', 'c', 'o', 'm', \ + 19, 0, 'h', 't', 't', 'p', 's', ':', '/', '/', 'e', 'x', 'a', 'm', 'p', 'l', 'e', '.', 'c', 'o', 'm', \ } #else // !BIGENDIAN_CPU @@ -62,7 +62,7 @@ /* Endpoint: 1, Cluster: Bridged Actions (server), little-endian */ \ \ /* 14 - setup url, */ \ - 0, 19, 'h', 't', 't', 'p', 's', ':', '/', '/', 'e', 'x', 'a', 'm', 'p', 'l', 'e', '.', 'c', 'o', 'm', \ + 19, 0, 'h', 't', 't', 'p', 's', ':', '/', '/', 'e', 'x', 'a', 'm', 'p', 'l', 'e', '.', 'c', 'o', 'm', \ } #endif // BIGENDIAN_CPU @@ -414,7 +414,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/access.h b/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/access.h index b135c1cf912ca4..928e3f5cb34265 100644 --- a/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/access.h +++ b/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/access.h @@ -132,6 +132,7 @@ 48, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \ 48, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \ 48, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -163,6 +164,7 @@ 0, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \ 2, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \ 4, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -194,6 +196,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h b/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h index 6f1df065451ab7..d2cdcf6f8f4f20 100644 --- a/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-noip_rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h @@ -382,7 +382,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/access.h b/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/access.h index b88610558e0c15..83ab31643cfd9e 100644 --- a/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/access.h @@ -143,6 +143,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -176,6 +177,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -209,6 +211,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/endpoint_config.h index 720d1f510d6ac8..bcc942c9abadf3 100644 --- a/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/endpoint_config.h @@ -391,7 +391,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/access.h b/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/access.h index a9d314afc37f8f..fe61bee35204cb 100644 --- a/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/access.h @@ -159,6 +159,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -196,6 +197,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -233,6 +235,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h index 021eb8abc20846..7badcd7019d4dd 100644 --- a/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/endpoint_config.h @@ -394,7 +394,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/access.h b/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/access.h index b88610558e0c15..83ab31643cfd9e 100644 --- a/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/access.h @@ -143,6 +143,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -176,6 +177,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -209,6 +211,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/endpoint_config.h index 4e01a3f3e186d1..91350e91ff9f31 100644 --- a/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/endpoint_config.h @@ -391,7 +391,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/access.h b/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/access.h index 39daac3ddc525c..31a70e8e64e917 100644 --- a/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/access.h @@ -147,6 +147,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -184,6 +185,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -221,6 +223,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/endpoint_config.h index 7915e261cd5d6d..7e8552964f48e3 100644 --- a/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/endpoint_config.h @@ -397,7 +397,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/access.h b/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/access.h index b88610558e0c15..83ab31643cfd9e 100644 --- a/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/access.h @@ -143,6 +143,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -176,6 +177,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -209,6 +211,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/endpoint_config.h index 01a76aa0e643da..b3758058fd10cf 100644 --- a/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/endpoint_config.h @@ -391,7 +391,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/access.h b/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/access.h index b88610558e0c15..83ab31643cfd9e 100644 --- a/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/access.h @@ -143,6 +143,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -176,6 +177,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -209,6 +211,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/endpoint_config.h index 34697a561e01d5..237b41ab14f7f9 100644 --- a/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_lightsensor_lZQycTFcJK/zap-generated/endpoint_config.h @@ -391,7 +391,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/access.h b/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/access.h index b88610558e0c15..83ab31643cfd9e 100644 --- a/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/access.h @@ -143,6 +143,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -176,6 +177,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -209,6 +211,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/endpoint_config.h index 9c0cede84b8154..777e3e925bb60f 100644 --- a/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/endpoint_config.h @@ -391,7 +391,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/access.h b/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/access.h index a9d314afc37f8f..fe61bee35204cb 100644 --- a/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/access.h @@ -159,6 +159,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -196,6 +197,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -233,6 +235,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/endpoint_config.h index 17e77f9a6c34ad..80ac5467089dad 100644 --- a/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_onofflight_bbs1b7IaOV/zap-generated/endpoint_config.h @@ -394,7 +394,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/access.h b/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/access.h index 39daac3ddc525c..31a70e8e64e917 100644 --- a/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/access.h @@ -147,6 +147,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -184,6 +185,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -221,6 +223,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/endpoint_config.h index 777c9b1217935a..b6c18a45f323e5 100644 --- a/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/endpoint_config.h @@ -391,7 +391,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/access.h b/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/access.h index 201090c0eb5788..2c9812a8f49b3e 100644 --- a/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/access.h @@ -153,6 +153,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -190,6 +191,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -227,6 +229,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/endpoint_config.h index 4e06d72cd55ee4..bbe523e4b88f85 100644 --- a/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/endpoint_config.h @@ -391,7 +391,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/access.h b/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/access.h index b88610558e0c15..83ab31643cfd9e 100644 --- a/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/access.h @@ -143,6 +143,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -176,6 +177,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -209,6 +211,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/endpoint_config.h index b8b1bf0427bff6..dc52e758ac44de 100644 --- a/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/endpoint_config.h @@ -391,7 +391,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/access.h b/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/access.h index b88610558e0c15..83ab31643cfd9e 100644 --- a/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/access.h @@ -143,6 +143,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -176,6 +177,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -209,6 +211,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/endpoint_config.h index 3b140fa88a0aa9..4d8abdc6628cae 100644 --- a/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/endpoint_config.h @@ -391,7 +391,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/access.h b/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/access.h index b88610558e0c15..83ab31643cfd9e 100644 --- a/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/access.h @@ -143,6 +143,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -176,6 +177,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -209,6 +211,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/endpoint_config.h index 22a567ed0e9fd2..9b53c9f83db383 100644 --- a/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/endpoint_config.h @@ -391,7 +391,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/access.h b/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/access.h index b6d1c0dc3d2a25..8b27d8c078d2a7 100644 --- a/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/access.h @@ -213,6 +213,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -250,6 +251,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -287,6 +289,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/endpoint_config.h index 9d7c4c63106df6..bebb2854973bb1 100644 --- a/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/endpoint_config.h @@ -411,7 +411,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/access.h b/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/access.h index 1343f78a42214e..8acaa6904b52d1 100644 --- a/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/access.h +++ b/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/access.h @@ -153,6 +153,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -190,6 +191,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -227,6 +229,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/endpoint_config.h index 4bc1ccb9e3ef03..a0233a76958356 100644 --- a/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/endpoint_config.h +++ b/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/endpoint_config.h @@ -391,7 +391,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 2bbbd0fdd8a949..6082f3ca63c80f 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -1018,8 +1018,8 @@ class LevelControlMoveToLevel : public ClusterCommand { AddArgument("Level", 0, UINT8_MAX, &mRequest.level); AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); - AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -1051,8 +1051,8 @@ class LevelControlMove : public ClusterCommand { AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); - AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); - AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -1085,8 +1085,8 @@ class LevelControlStep : public ClusterCommand AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); - AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -1116,8 +1116,8 @@ class LevelControlStop : public ClusterCommand public: LevelControlStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop", credsIssuerConfig) { - AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); - AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -1150,6 +1150,8 @@ class LevelControlMoveToLevelWithOnOff : public ClusterCommand { AddArgument("Level", 0, UINT8_MAX, &mRequest.level); AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -1181,6 +1183,8 @@ class LevelControlMoveWithOnOff : public ClusterCommand { AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -1213,6 +1217,8 @@ class LevelControlStepWithOnOff : public ClusterCommand AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -1242,6 +1248,8 @@ class LevelControlStopWithOnOff : public ClusterCommand public: LevelControlStopWithOnOff(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-with-on-off", credsIssuerConfig) { + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); 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 dd46baf9a08ba2..56946e74d7efe5 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -2382,10 +2382,10 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, } } { - CHIP_ERROR err = DataModelLogger::LogValue("AdminFabricIndex", indent + 1, value.adminFabricIndex); + 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 'AdminFabricIndex'"); + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); return err; } } @@ -2430,10 +2430,10 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, } } { - CHIP_ERROR err = DataModelLogger::LogValue("AdminFabricIndex", indent + 1, value.adminFabricIndex); + 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 'AdminFabricIndex'"); + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); return err; } } @@ -2538,6 +2538,14 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Ba CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Basic::Events::Leave::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; @@ -3454,10 +3462,10 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("Arg1", indent + 1, value.arg1); + 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 'Arg1'"); + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); return err; } } @@ -6273,7 +6281,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("TrustedRootCertificates", 1, value); } case OperationalCredentials::Attributes::CurrentFabricIndex::Id: { - chip::FabricIndex value; + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("CurrentFabricIndex", 1, value); } @@ -8706,7 +8714,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("VendorName", 1, value); } case ApplicationBasic::Attributes::VendorID::Id: { - uint16_t value; + chip::VendorId value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("VendorID", 1, value); } @@ -10329,26 +10337,26 @@ CHIP_ERROR DataModelLogger::LogEvent(const chip::app::EventHeader & header, chip ChipLogProgress(chipTool, "Endpoint: %u Cluster: " ChipLogFormatMEI " Event " ChipLogFormatMEI, header.mPath.mEndpointId, ChipLogValueMEI(header.mPath.mClusterId), ChipLogValueMEI(header.mPath.mEventId)); - ChipLogProgress(chipTool, "\t Event number: %" PRIu64, header.mEventNumber); + ChipLogProgress(chipTool, " Event number: %" PRIu64, header.mEventNumber); if (header.mPriorityLevel == chip::app::PriorityLevel::Info) { - ChipLogProgress(chipTool, "\t Priority: Info"); + ChipLogProgress(chipTool, " Priority: Info"); } else if (header.mPriorityLevel == chip::app::PriorityLevel::Critical) { - ChipLogProgress(chipTool, "\t Priority: Critical"); + ChipLogProgress(chipTool, " Priority: Critical"); } else if (header.mPriorityLevel == chip::app::PriorityLevel::Debug) { - ChipLogProgress(chipTool, "\t Priority: Debug"); + ChipLogProgress(chipTool, " Priority: Debug"); } else { - ChipLogProgress(chipTool, "\t Priority: Unknown"); + ChipLogProgress(chipTool, " Priority: Unknown"); } - ChipLogProgress(chipTool, "\t Timestamp: %" PRIu64, header.mTimestamp.mValue); + ChipLogProgress(chipTool, " Timestamp: %" PRIu64, header.mTimestamp.mValue); switch (header.mPath.mClusterId) { diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 3477137a51ed1e..cea9639a4183b2 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -136,6 +136,7 @@ class TestList : public Command printf("Test_TC_RH_1_1\n"); printf("Test_TC_RH_2_1\n"); printf("Test_TC_SC_4_2\n"); + printf("Test_TC_SWTCH_1_1\n"); printf("Test_TC_SWTCH_2_1\n"); printf("Test_TC_TMP_1_1\n"); printf("Test_TC_TMP_2_1\n"); @@ -407,8 +408,6 @@ class ManualTestList : public Command printf("Test_TC_CADMIN_1_20\n"); printf("Test_TC_CADMIN_1_21\n"); printf("Test_TC_CADMIN_1_22\n"); - printf("Test_TC_CADMIN_1_23\n"); - printf("Test_TC_CADMIN_1_24\n"); printf("Test_TC_CADMIN_1_3\n"); printf("Test_TC_CADMIN_1_4\n"); printf("Test_TC_CADMIN_1_5\n"); @@ -416,8 +415,8 @@ class ManualTestList : public Command printf("Test_TC_CADMIN_1_9\n"); printf("Test_TC_CADMIN_1_10\n"); printf("Test_TC_CADMIN_1_13\n"); - printf("Test_TC_CADMIN_1_25\n"); - printf("Test_TC_CADMIN_1_26\n"); + printf("Test_TC_CADMIN_1_23\n"); + printf("Test_TC_CADMIN_1_24\n"); printf("Test_TC_MOD_1_2\n"); printf("Test_TC_MOD_1_3\n"); printf("Test_TC_MOD_2_1\n"); @@ -518,7 +517,6 @@ class ManualTestList : public Command printf("Test_TC_OO_3_2\n"); printf("Test_TC_RH_2_2\n"); printf("Test_TC_RH_3_1\n"); - printf("Test_TC_SWTCH_1_1\n"); printf("Test_TC_SWTCH_2_2\n"); printf("Test_TC_SWTCH_3_1\n"); printf("Test_TC_SWTCH_3_2\n"); @@ -1922,7 +1920,7 @@ class Test_TC_BOOL_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -1931,7 +1929,7 @@ class Test_TC_BOOL_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -1939,7 +1937,7 @@ class Test_TC_BOOL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); @@ -1957,7 +1955,7 @@ class Test_TC_BOOL_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 5: @@ -1969,7 +1967,7 @@ class Test_TC_BOOL_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -2084,7 +2082,7 @@ class Test_TC_BOOL_2_1Suite : public TestCommand { bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; default: @@ -2166,7 +2164,7 @@ class Test_TC_ACT_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -2175,7 +2173,7 @@ class Test_TC_ACT_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -2183,10 +2181,9 @@ class Test_TC_ACT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; case 4: @@ -2194,9 +2191,10 @@ class Test_TC_ACT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; case 5: @@ -2204,11 +2202,8 @@ class Test_TC_ACT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 11)); } break; case 6: @@ -2220,7 +2215,7 @@ class Test_TC_ACT_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 7: @@ -2261,13 +2256,12 @@ class Test_TC_ACT_1_1Suite : public TestCommand } case 3: { LogStep(3, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("ACT.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BridgedActions::Id, BridgedActions::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip(" !ACT.S.A0002 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Read the optional attribute(SetupURL) in AttributeList"); + VerifyOrDo(!ShouldSkip("ACT.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BridgedActions::Id, BridgedActions::Attributes::AttributeList::Id, true, chip::NullOptional); } @@ -2343,7 +2337,7 @@ class Test_TC_CC_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -2351,7 +2345,7 @@ class Test_TC_CC_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 31UL)); } @@ -2361,7 +2355,7 @@ class Test_TC_CC_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); VerifyOrReturn(CheckConstraintContains("value", value, 16385UL)); @@ -2378,7 +2372,7 @@ class Test_TC_CC_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 5: @@ -2390,7 +2384,7 @@ class Test_TC_CC_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -2509,7 +2503,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -2519,7 +2513,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -2529,7 +2523,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -2539,7 +2533,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -2549,7 +2543,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -2559,7 +2553,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); } @@ -2569,7 +2563,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 254)); } break; @@ -2578,7 +2572,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -2588,7 +2582,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); } @@ -2598,7 +2592,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bitmap8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); } @@ -2608,7 +2602,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -2618,7 +2612,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } @@ -2628,7 +2622,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -2638,7 +2632,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -2648,7 +2642,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -2658,7 +2652,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -2668,7 +2662,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -2687,7 +2681,7 @@ class Test_TC_CC_2_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("colorCapabilities", value, FeatureMapValue)); - VerifyOrReturn(CheckConstraintType("value", "", "map16")); + VerifyOrReturn(CheckConstraintType("value", "bitmap16", "bitmap16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 31U)); } @@ -2697,7 +2691,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -2707,7 +2701,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -2717,7 +2711,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -2727,7 +2721,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -2737,7 +2731,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); } @@ -2819,7 +2813,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -2829,7 +2823,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -2839,7 +2833,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -2849,7 +2843,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -2859,7 +2853,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -2869,7 +2863,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -2879,7 +2873,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -2889,7 +2883,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -2899,7 +2893,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -2909,7 +2903,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } @@ -2919,7 +2913,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -3379,11 +3373,12 @@ class Test_TC_CC_2_1Suite : public TestCommand class Test_TC_CC_3_2Suite : public TestCommand { public: - Test_TC_CC_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_2", 30, credsIssuerConfig) + Test_TC_CC_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_2", 31, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateConfigValue", 0, UINT8_MAX, &mRateConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -3398,6 +3393,7 @@ class Test_TC_CC_3_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateConfigValue; chip::Optional mTimeout; uint8_t CurrentHueValue; @@ -3431,83 +3427,86 @@ class Test_TC_CC_3_2Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); CurrentHueValue = value; } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -3515,74 +3514,74 @@ class Test_TC_CC_3_2Suite : public TestCommand VerifyOrReturn(CheckValue("currentHue", value, CurrentHueValue)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); CurrentHueValueAfterStopmode = value; } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -3590,10 +3589,10 @@ class Test_TC_CC_3_2Suite : public TestCommand VerifyOrReturn(CheckValue("currentHue", value, CurrentHueValueAfterStopmode)); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -3636,18 +3635,27 @@ class Test_TC_CC_3_2Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Reads CurrentHue attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads CurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Move hue up command"); + case 5: { + LogStep(5, "TH sends MoveHue command to DUT with MoveMode Up"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; value.moveMode = static_cast(1); - value.rate = 50U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, @@ -3655,52 +3663,52 @@ class Test_TC_CC_3_2Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 3000ms"); + case 6: { + LogStep(6, "Wait 3000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 3000UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "TH reads CurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Wait 2000"); + case 8: { + LogStep(8, "Wait 2000"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 2000UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "TH reads CurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Wait 3000"); + case 10: { + LogStep(10, "Wait 3000"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 3000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 11: { + LogStep(11, "TH reads CurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Move hue stop command"); + case 12: { + LogStep(12, "TH sends MoveHue command to DUT with MoveMode Stop"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; value.moveMode = static_cast(0); - value.rate = 50U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, @@ -3708,39 +3716,39 @@ class Test_TC_CC_3_2Suite : public TestCommand ); } - case 12: { - LogStep(12, "Wait 1000ms"); + case 13: { + LogStep(13, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 14: { + LogStep(14, "TH reads CurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Wait 1000ms"); + case 15: { + LogStep(15, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 15: { - LogStep(15, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 16: { + LogStep(16, "TH reads CurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Move hue down command"); + case 17: { + LogStep(17, "TH sends MoveHue command to DUT with MoveMode Down"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; value.moveMode = static_cast(3); - value.rate = 50U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, @@ -3748,52 +3756,52 @@ class Test_TC_CC_3_2Suite : public TestCommand ); } - case 17: { - LogStep(17, "Wait 1000ms"); + case 18: { + LogStep(18, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 18: { - LogStep(18, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 19: { + LogStep(19, "TH reads CurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "Wait 1000ms"); + case 20: { + LogStep(20, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 20: { - LogStep(20, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 21: { + LogStep(21, "TH reads CurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "Wait 1000ms"); + case 22: { + LogStep(22, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 22: { - LogStep(22, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 23: { + LogStep(23, "TH reads CurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Move hue stop command"); + case 24: { + LogStep(24, "TH sends MoveHue command to DUT with MoveMode Stop"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; value.moveMode = static_cast(0); - value.rate = 50U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, @@ -3801,42 +3809,42 @@ class Test_TC_CC_3_2Suite : public TestCommand ); } - case 24: { - LogStep(24, "Wait 1000ms"); + case 25: { + LogStep(25, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 25: { - LogStep(25, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "TH reads CurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Wait 1000ms"); + case 27: { + LogStep(27, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 27: { - LogStep(27, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 28: { + LogStep(28, "TH reads CurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Turn off light that we turned on"); + case 29: { + LogStep(29, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 29: { - LogStep(29, "Check on/off attribute value is false after off command"); + case 30: { + LogStep(30, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -3847,11 +3855,12 @@ class Test_TC_CC_3_2Suite : public TestCommand class Test_TC_CC_3_3Suite : public TestCommand { public: - Test_TC_CC_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_3", 12, credsIssuerConfig) + Test_TC_CC_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_3", 13, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("StepSizeConfigValue", 0, UINT8_MAX, &mStepSizeConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -3866,6 +3875,7 @@ class Test_TC_CC_3_3Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mStepSizeConfigValue; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -3896,53 +3906,56 @@ class Test_TC_CC_3_3Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 5U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 249U)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -3985,18 +3998,27 @@ class Test_TC_CC_3_3Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Reads CurrentHue attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads CurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Step hue up command"); + case 5: { + LogStep(5, "TH sends StepHue command to DUT with StepMode Up"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepHue::Type value; value.stepMode = static_cast(1); - value.stepSize = 5U; + value.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 5U; value.transitionTime = 5U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -4005,26 +4027,26 @@ class Test_TC_CC_3_3Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 1000ms"); + case 6: { + LogStep(6, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "Over TransitionTime,Read CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Step hue down command"); + case 8: { + LogStep(8, "TH sends StepHue command to DUT with StepMode Down"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepHue::Type value; value.stepMode = static_cast(3); - value.stepSize = 5U; + value.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 5U; value.transitionTime = 5U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -4033,29 +4055,29 @@ class Test_TC_CC_3_3Suite : public TestCommand ); } - case 8: { - LogStep(8, "Wait 1000ms"); + case 9: { + LogStep(9, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 9: { - LogStep(9, "Over TransitionTime,Read CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 10: { + LogStep(10, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Turn off light that we turned on"); + case 11: { + LogStep(11, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 11: { - LogStep(11, "Check on/off attribute value is false after off command"); + case 12: { + LogStep(12, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -4066,11 +4088,12 @@ class Test_TC_CC_3_3Suite : public TestCommand class Test_TC_CC_4_1Suite : public TestCommand { public: - Test_TC_CC_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_1", 13, credsIssuerConfig) + Test_TC_CC_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_1", 10, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("SaturationConfigValue", 0, UINT8_MAX, &mSaturationConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -4085,6 +4108,7 @@ class Test_TC_CC_4_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mSaturationConfigValue; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -4115,62 +4139,41 @@ class Test_TC_CC_4_1Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckValue("currentSaturation", value, + mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 90U)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentSaturation", value, 90U)); - } - break; - case 11: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -4213,18 +4216,27 @@ class Test_TC_CC_4_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Check Saturation attribute value matched before any change"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads CurrentSaturation attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Move to saturation command"); + case 5: { + LogStep(5, "TH sends MoveToSaturation command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type value; - value.saturation = 90U; - value.transitionTime = 15U; + value.saturation = mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 90U; + value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id, @@ -4232,55 +4244,29 @@ class Test_TC_CC_4_1Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 500ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - return WaitForMs(kIdentityAlpha, value); - } case 6: { - LogStep(6, "Check current saturation attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "Wait 500ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Check current saturation attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "Wait 1000ms"); + LogStep(6, "Wait 1500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 1500UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Check current saturation attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "Over TransitionTime, TH reads CurrentSaturation attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Turn off light that we turned on"); + case 8: { + LogStep(8, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 12: { - LogStep(12, "Check on/off attribute value is false after off command"); + case 9: { + LogStep(9, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -4291,11 +4277,12 @@ class Test_TC_CC_4_1Suite : public TestCommand class Test_TC_CC_4_2Suite : public TestCommand { public: - Test_TC_CC_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_2", 38, credsIssuerConfig) + Test_TC_CC_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_2", 39, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateConfigValue", 0, UINT8_MAX, &mRateConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -4310,6 +4297,7 @@ class Test_TC_CC_4_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateConfigValue; chip::Optional mTimeout; uint8_t CurrentSaturationStep4d; @@ -4344,145 +4332,148 @@ class Test_TC_CC_4_2Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); CurrentSaturationStep4d = value; } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -4490,61 +4481,61 @@ class Test_TC_CC_4_2Suite : public TestCommand VerifyOrReturn(CheckValue("currentSaturation", value, CurrentSaturationStep4d)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); CurrentSaturationStep5b = value; } break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, CurrentSaturationStep5b)); } break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); CurrentSaturationStep5d = value; } break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -4552,10 +4543,10 @@ class Test_TC_CC_4_2Suite : public TestCommand VerifyOrReturn(CheckValue("currentSaturation", value, CurrentSaturationStep5d)); } break; - case 36: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 37: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -4598,18 +4589,27 @@ class Test_TC_CC_4_2Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads CurrentSaturation attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads CurrentSaturation attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH sends MoveSaturation command to DUT with MoveMode Up"); + case 5: { + LogStep(5, "TH sends MoveSaturation command to DUT with MoveMode Up"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; value.moveMode = static_cast(1); - value.rate = 15U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, @@ -4617,52 +4617,52 @@ class Test_TC_CC_4_2Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 1000ms"); + case 6: { + LogStep(6, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "TH reads CurrentSaturation attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "TH reads CurrentSaturation attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Wait 1000ms"); + case 8: { + LogStep(8, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "TH reads CurrentSaturation attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "TH reads CurrentSaturation attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Wait 1000ms"); + case 10: { + LogStep(10, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "TH reads CurrentSaturation attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 11: { + LogStep(11, "TH reads CurrentSaturation attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "TH sends MoveSaturation command to DUT with MoveMode Down"); + case 12: { + LogStep(12, "TH sends MoveSaturation command to DUT with MoveMode Down"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; value.moveMode = static_cast(3); - value.rate = 10U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, @@ -4670,52 +4670,52 @@ class Test_TC_CC_4_2Suite : public TestCommand ); } - case 12: { - LogStep(12, "Wait 1000ms"); + case 13: { + LogStep(13, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "TH reads CurrentSaturation attribute from DUT several times."); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 14: { + LogStep(14, "TH reads CurrentSaturation attribute from DUT several times."); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Wait 1000ms"); + case 15: { + LogStep(15, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 15: { - LogStep(15, "TH reads CurrentSaturation attribute from DUT several times."); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 16: { + LogStep(16, "TH reads CurrentSaturation attribute from DUT several times."); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Wait 1000ms"); + case 17: { + LogStep(17, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "TH reads CurrentSaturation attribute from DUT several times."); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 18: { + LogStep(18, "TH reads CurrentSaturation attribute from DUT several times."); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "TH sends MoveSaturation command to DUT with MoveMode Up to the Maximum allowed Saturation"); + case 19: { + LogStep(19, "TH sends MoveSaturation command to DUT with MoveMode Up to the Maximum allowed Saturation"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; value.moveMode = static_cast(1); - value.rate = 100U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, @@ -4723,26 +4723,26 @@ class Test_TC_CC_4_2Suite : public TestCommand ); } - case 19: { - LogStep(19, "Wait 1000ms"); + case 20: { + LogStep(20, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 20: { - LogStep(20, "TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 21: { + LogStep(21, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the Maximum allowed."); + case 22: { + LogStep(22, "TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the Maximum allowed."); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; value.moveMode = static_cast(0); - value.rate = 50U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, @@ -4750,39 +4750,39 @@ class Test_TC_CC_4_2Suite : public TestCommand ); } - case 22: { - LogStep(22, "Wait 1000ms"); + case 23: { + LogStep(23, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 23: { - LogStep(23, "TH reads CurrentSaturation attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 24: { + LogStep(24, "TH reads CurrentSaturation attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Wait 1000ms"); + case 25: { + LogStep(25, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 25: { - LogStep(25, "CurrentSaturation value Stops incrementing"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "CurrentSaturation value Stops incrementing"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "TH sends MoveSaturation command to DUT with MoveMode Down to the Minimum allowed Saturation"); + case 27: { + LogStep(27, "TH sends MoveSaturation command to DUT with MoveMode Down to the Minimum allowed Saturation"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; value.moveMode = static_cast(3); - value.rate = 10U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, @@ -4790,39 +4790,39 @@ class Test_TC_CC_4_2Suite : public TestCommand ); } - case 27: { - LogStep(27, "Wait 1000ms"); + case 28: { + LogStep(28, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 28: { - LogStep(28, "TH reads CurrentSaturation attribute from DUT several times."); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 29: { + LogStep(29, "TH reads CurrentSaturation attribute from DUT several times."); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 29: { - LogStep(29, "Wait 1000ms"); + case 30: { + LogStep(30, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 30: { - LogStep(30, "TH reads CurrentSaturation attribute from DUT several times."); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 31: { + LogStep(31, "TH reads CurrentSaturation attribute from DUT several times."); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 31: { - LogStep(31, "TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the Minimum allowed"); + case 32: { + LogStep(32, "TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the Minimum allowed"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; value.moveMode = static_cast(0); - value.rate = 10U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, @@ -4830,42 +4830,42 @@ class Test_TC_CC_4_2Suite : public TestCommand ); } - case 32: { - LogStep(32, "Wait 1000ms"); + case 33: { + LogStep(33, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 33: { - LogStep(33, "TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 34: { + LogStep(34, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 34: { - LogStep(34, "Wait 1000ms"); + case 35: { + LogStep(35, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 35: { - LogStep(35, "CurrentSaturation value Stops decrementing"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 36: { + LogStep(36, "CurrentSaturation value Stops decrementing"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 36: { - LogStep(36, "Turn off light that we turned on"); + case 37: { + LogStep(37, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 37: { - LogStep(37, "Check on/off attribute value is false after off command"); + case 38: { + LogStep(38, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -4876,11 +4876,12 @@ class Test_TC_CC_4_2Suite : public TestCommand class Test_TC_CC_4_3Suite : public TestCommand { public: - Test_TC_CC_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_3", 12, credsIssuerConfig) + Test_TC_CC_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_3", 13, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("StepSizeConfigValue", 0, UINT8_MAX, &mStepSizeConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -4895,6 +4896,7 @@ class Test_TC_CC_4_3Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mStepSizeConfigValue; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -4925,53 +4927,56 @@ class Test_TC_CC_4_3Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -5014,18 +5019,27 @@ class Test_TC_CC_4_3Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads CurrentSaturation attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads CurrentSaturation attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH sends StepSaturation command to DUT with StepMode Up"); + case 5: { + LogStep(5, "TH sends StepSaturation command to DUT with StepMode Up"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepSaturation::Type value; value.stepMode = static_cast(1); - value.stepSize = 15U; + value.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 15U; value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -5034,26 +5048,26 @@ class Test_TC_CC_4_3Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 1000ms"); + case 6: { + LogStep(6, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "Over TransitionTime,TH read CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "Over TransitionTime,TH read CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "TH sends StepSaturation command to DUT with StepMode Down"); + case 8: { + LogStep(8, "TH sends StepSaturation command to DUT with StepMode Down"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepSaturation::Type value; value.stepMode = static_cast(3); - value.stepSize = 20U; + value.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 15U; value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -5062,29 +5076,29 @@ class Test_TC_CC_4_3Suite : public TestCommand ); } - case 8: { - LogStep(8, "Wait 1000ms"); + case 9: { + LogStep(9, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 9: { - LogStep(9, "Over TransitionTime,TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 10: { + LogStep(10, "Over TransitionTime,TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Turn off light that we turned on"); + case 11: { + LogStep(11, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 11: { - LogStep(11, "Check on/off attribute value is false after off command"); + case 12: { + LogStep(12, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -5095,11 +5109,13 @@ class Test_TC_CC_4_3Suite : public TestCommand class Test_TC_CC_4_4Suite : public TestCommand { public: - Test_TC_CC_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_4", 11, credsIssuerConfig) + Test_TC_CC_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_4", 12, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("hueConfigValue", 0, UINT8_MAX, &mHueConfigValue); + AddArgument("SaturationConfigValue", 0, UINT8_MAX, &mSaturationConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -5114,6 +5130,8 @@ class Test_TC_CC_4_4Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mHueConfigValue; + chip::Optional mSaturationConfigValue; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -5144,56 +5162,62 @@ class Test_TC_CC_4_4Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckValue("currentHue", value, mHueConfigValue.HasValue() ? mHueConfigValue.Value() : 40U)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckValue("currentSaturation", value, + mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 160U)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -5236,24 +5260,33 @@ class Test_TC_CC_4_4Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads CurrentHue attribute from DUT."); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads CurrentHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH reads CurrentSaturation attribute from DUT"); + case 5: { + LogStep(5, "TH reads CurrentSaturation attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH sends MoveToHueAndSaturation command to DUT."); + case 6: { + LogStep(6, "TH sends MoveToHueAndSaturation command to DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type value; - value.hue = 40U; - value.saturation = 160U; + value.hue = mHueConfigValue.HasValue() ? mHueConfigValue.Value() : 40U; + value.saturation = mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 160U; value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -5262,35 +5295,35 @@ class Test_TC_CC_4_4Suite : public TestCommand ); } - case 6: { - LogStep(6, "Wait 1000ms"); + case 7: { + LogStep(7, "Wait 1500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 1500UL; return WaitForMs(kIdentityAlpha, value); } - case 7: { - LogStep(7, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0000 && CC.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Over TransitionTime, TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "Over TransitionTime, TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0001 && CC.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Turn off light that we turned on"); + case 10: { + LogStep(10, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 10: { - LogStep(10, "Check on/off attribute value is false after off command"); + case 11: { + LogStep(11, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -5301,11 +5334,13 @@ class Test_TC_CC_4_4Suite : public TestCommand class Test_TC_CC_5_1Suite : public TestCommand { public: - Test_TC_CC_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_1", 11, credsIssuerConfig) + Test_TC_CC_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_1", 12, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("colorXConfigValue", 0, UINT16_MAX, &mColorXConfigValue); + AddArgument("colorYConfigValue", 0, UINT16_MAX, &mColorYConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -5320,6 +5355,8 @@ class Test_TC_CC_5_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mColorXConfigValue; + chip::Optional mColorYConfigValue; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -5350,58 +5387,61 @@ class Test_TC_CC_5_1Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentX", value, 200U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue("currentX", value, mColorXConfigValue.HasValue() ? mColorXConfigValue.Value() : 400U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentY", value, 300U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue("currentY", value, mColorYConfigValue.HasValue() ? mColorYConfigValue.Value() : 500U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -5444,24 +5484,33 @@ class Test_TC_CC_5_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads CurrentX attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads CurrentX attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH reads CurrentY attribute from DUT"); + case 5: { + LogStep(5, "TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH sends MoveToColor command to DUT"); + case 6: { + LogStep(6, "TH sends MoveToColor command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColor::Type value; - value.colorX = 200U; - value.colorY = 300U; + value.colorX = mColorXConfigValue.HasValue() ? mColorXConfigValue.Value() : 400U; + value.colorY = mColorYConfigValue.HasValue() ? mColorYConfigValue.Value() : 500U; value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -5470,35 +5519,35 @@ class Test_TC_CC_5_1Suite : public TestCommand ); } - case 6: { - LogStep(6, "Wait 1500ms"); + case 7: { + LogStep(7, "Wait 1500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1500UL; return WaitForMs(kIdentityAlpha, value); } - case 7: { - LogStep(7, "Over TransitionTime, TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "Over TransitionTime, TH reads CurrentX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Over TransitionTime, TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "Over TransitionTime, TH reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Turn off light that we turned on"); + case 10: { + LogStep(10, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 10: { - LogStep(10, "Check on/off attribute value is false after off command"); + case 11: { + LogStep(11, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -5509,11 +5558,13 @@ class Test_TC_CC_5_1Suite : public TestCommand class Test_TC_CC_5_2Suite : public TestCommand { public: - Test_TC_CC_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_2", 14, credsIssuerConfig) + Test_TC_CC_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_2", 15, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateXValue", INT16_MIN, INT16_MAX, &mRateXValue); + AddArgument("RateYValue", INT16_MIN, INT16_MAX, &mRateYValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -5528,8 +5579,15 @@ class Test_TC_CC_5_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateXValue; + chip::Optional mRateYValue; chip::Optional mTimeout; + uint16_t CurrentXValue; + uint16_t CurrentYValue; + uint16_t CurrentXBeforeStopCommand; + uint16_t CurrentYBeforeStopCommand; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -5558,79 +5616,86 @@ class Test_TC_CC_5_2Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + CurrentXValue = value; } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + CurrentYValue = value; } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentXValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + CurrentXBeforeStopCommand = value; } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentYValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + CurrentYBeforeStopCommand = value; } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentXBeforeStopCommand)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentYBeforeStopCommand)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -5673,24 +5738,33 @@ class Test_TC_CC_5_2Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads CurrentX attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads CurrentX attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH reads CurrentY attribute from DUT"); + case 5: { + LogStep(5, "TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH sends MoveColor command to DUT"); + case 6: { + LogStep(6, "TH sends MoveColor command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColor::Type value; - value.rateX = 15; - value.rateY = 20; + value.rateX = mRateXValue.HasValue() ? mRateXValue.Value() : 50; + value.rateY = mRateYValue.HasValue() ? mRateYValue.Value() : 50; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColor::Id, value, @@ -5698,27 +5772,27 @@ class Test_TC_CC_5_2Suite : public TestCommand ); } - case 6: { - LogStep(6, "Wait 1000ms"); + case 7: { + LogStep(7, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 7: { - LogStep(7, "TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "TH reads CurrentX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "TH reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "TH sends StopMoveStep command to DUT"); + case 10: { + LogStep(10, "TH sends StopMoveStep command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; @@ -5729,28 +5803,28 @@ class Test_TC_CC_5_2Suite : public TestCommand ); } - case 10: { - LogStep(10, "TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 11: { + LogStep(11, "TH reads CurrentX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 12: { + LogStep(12, "TH reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Turn off light that we turned on"); + case 13: { + LogStep(13, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 13: { - LogStep(13, "Check on/off attribute value is false after off command"); + case 14: { + LogStep(14, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -5761,11 +5835,13 @@ class Test_TC_CC_5_2Suite : public TestCommand class Test_TC_CC_5_3Suite : public TestCommand { public: - Test_TC_CC_5_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_3", 11, credsIssuerConfig) + Test_TC_CC_5_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_3", 12, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("StepXConfigValue", INT16_MIN, INT16_MAX, &mStepXConfigValue); + AddArgument("StepYConfigValue", INT16_MIN, INT16_MAX, &mStepYConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -5780,8 +5856,13 @@ class Test_TC_CC_5_3Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mStepXConfigValue; + chip::Optional mStepYConfigValue; chip::Optional mTimeout; + uint16_t CurrentXValue; + uint16_t CurrentYValue; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -5810,56 +5891,61 @@ class Test_TC_CC_5_3Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + CurrentXValue = value; } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + CurrentYValue = value; } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentXValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentYValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -5902,24 +5988,33 @@ class Test_TC_CC_5_3Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads CurrentX attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads CurrentX attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH reads CurrentY attribute from DUT"); + case 5: { + LogStep(5, "TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH sends StepColor command to DUT"); + case 6: { + LogStep(6, "TH sends StepColor command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepColor::Type value; - value.stepX = 15; - value.stepY = 20; + value.stepX = mStepXConfigValue.HasValue() ? mStepXConfigValue.Value() : 100; + value.stepY = mStepYConfigValue.HasValue() ? mStepYConfigValue.Value() : 100; value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -5928,35 +6023,35 @@ class Test_TC_CC_5_3Suite : public TestCommand ); } - case 6: { - LogStep(6, "Wait 1000ms"); + case 7: { + LogStep(7, "Wait 1500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 1500UL; return WaitForMs(kIdentityAlpha, value); } - case 7: { - LogStep(7, "Over TransitionTime, TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "Over TransitionTime, TH reads CurrentX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Over TransitionTime, TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "Over TransitionTime, TH reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Turn off light that we turned on"); + case 10: { + LogStep(10, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 10: { - LogStep(10, "Check on/off attribute value is false after off command"); + case 11: { + LogStep(11, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -5967,7 +6062,7 @@ class Test_TC_CC_5_3Suite : public TestCommand class Test_TC_CC_6_1Suite : public TestCommand { public: - Test_TC_CC_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_1", 11, credsIssuerConfig) + Test_TC_CC_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_1", 12, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -6019,59 +6114,62 @@ class Test_TC_CC_6_1Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); ColorTempPhysicalMinMiredsValue = value; } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); ColorTempPhysicalMaxMiredsValue = value; } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorTemperature", value, 100U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue("colorTemperature", value, ColorTempPhysicalMaxMiredsValue)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -6114,29 +6212,38 @@ class Test_TC_CC_6_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH reads ColorTempPhysicalMaxMireds attribute from DUT."); + case 5: { + LogStep(5, "TH reads ColorTempPhysicalMaxMireds attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH reads ColorTemperatureMireds attribute from DUT."); + case 6: { + LogStep(6, "TH reads ColorTemperatureMireds attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Move To Color Temperature command"); + case 7: { + LogStep(7, "Move To Color Temperature command"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C0A.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type value; - value.colorTemperature = 100U; + value.colorTemperature = ColorTempPhysicalMaxMiredsValue; value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -6145,29 +6252,29 @@ class Test_TC_CC_6_1Suite : public TestCommand ); } - case 7: { - LogStep(7, "Wait 1500ms"); + case 8: { + LogStep(8, "Wait 1500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1500UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Read current color temprature"); + case 9: { + LogStep(9, "Read current color temprature"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Turn off light that we turned on"); + case 10: { + LogStep(10, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 10: { - LogStep(10, "Check on/off attribute value is false after off command"); + case 11: { + LogStep(11, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -6178,7 +6285,7 @@ class Test_TC_CC_6_1Suite : public TestCommand class Test_TC_CC_6_2Suite : public TestCommand { public: - Test_TC_CC_6_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_2", 38, credsIssuerConfig) + Test_TC_CC_6_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_2", 39, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -6232,233 +6339,236 @@ class Test_TC_CC_6_2Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); ColorTempPhysicalMinMiredsValue = value; } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); ColorTempPhysicalMaxMiredsValue = value; } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); ColorTemperatureValue = value; } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("colorTemperature", value, ColorTemperatureValue)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("colorTemperature", value, ColorTemperatureValue)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); ColorTemperatureMoveModeStop = value; } break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("colorTemperature", value, ColorTemperatureMoveModeStop)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("colorTemperature", value, ColorTemperatureValue)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 36: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 37: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -6501,25 +6611,34 @@ class Test_TC_CC_6_2Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH reads ColorTempPhysicalMaxMireds attribute from DUT."); + case 5: { + LogStep(5, "TH reads ColorTempPhysicalMaxMireds attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH reads ColorTemperatureMireds attribute from DUT."); + case 6: { + LogStep(6, "TH reads ColorTemperatureMireds attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "TH sends MoveColorTemperature command to DUT with MoveMode = Up"); + case 7: { + LogStep(7, "TH sends MoveColorTemperature command to DUT with MoveMode = Up"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; @@ -6534,47 +6653,47 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 7: { - LogStep(7, "Wait 1000ms"); + case 8: { + LogStep(8, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Wait 1000ms"); + case 10: { + LogStep(10, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 11: { + LogStep(11, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Wait 1000ms"); + case 12: { + LogStep(12, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 12: { - LogStep(12, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 13: { + LogStep(13, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "TH sends MoveColorTemperature command to DUT with MoveMode = Down"); + case 14: { + LogStep(14, "TH sends MoveColorTemperature command to DUT with MoveMode = Down"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; @@ -6589,52 +6708,52 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 14: { - LogStep(14, "Wait 1000ms"); + case 15: { + LogStep(15, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 15: { - LogStep(15, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 16: { + LogStep(16, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Wait 1000ms"); + case 17: { + LogStep(17, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 18: { + LogStep(18, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Wait 1000ms"); + case 19: { + LogStep(19, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 19: { - LogStep(19, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 20: { + LogStep(20, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "TH sends MoveColorTemperature command to DUT with MoveMode = Up"); + case 21: { + LogStep(21, "TH sends MoveColorTemperature command to DUT with MoveMode = Up"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; value.moveMode = static_cast(1); - value.rate = 10U; + value.rate = 20U; value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; value.optionsMask = 0U; @@ -6644,15 +6763,15 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 21: { - LogStep(21, "TH sends MoveColorTemperature command to DUT with MoveMode = Stop"); + case 22: { + LogStep(22, "TH sends MoveColorTemperature command to DUT with MoveMode = Stop"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; value.moveMode = static_cast(0); - value.rate = 10U; - value.colorTemperatureMinimumMireds = 1U; - value.colorTemperatureMaximumMireds = 255U; + value.rate = 20U; + value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; + value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, @@ -6660,47 +6779,47 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 22: { - LogStep(22, "Wait 1000ms"); + case 23: { + LogStep(23, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 23: { - LogStep(23, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 24: { + LogStep(24, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Wait 1000ms"); + case 25: { + LogStep(25, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 25: { - LogStep(25, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Wait 1000ms"); + case 27: { + LogStep(27, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 27: { - LogStep(27, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 28: { + LogStep(28, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "TH sends MoveColorTemperature command to DUT with MoveMode = Down"); + case 29: { + LogStep(29, "TH sends MoveColorTemperature command to DUT with MoveMode = Down"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; @@ -6715,13 +6834,13 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 29: { - LogStep(29, "TH sends MoveColorTemperature command to DUT with MoveMode = Stop"); + case 30: { + LogStep(30, "TH sends MoveColorTemperature command to DUT with MoveMode = Stop"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; value.moveMode = static_cast(0); - value.rate = 10U; + value.rate = 20U; value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; value.optionsMask = 0U; @@ -6731,55 +6850,55 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 30: { - LogStep(30, "Wait 1000ms"); + case 31: { + LogStep(31, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 31: { - LogStep(31, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 32: { + LogStep(32, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 32: { - LogStep(32, "Wait 1000ms"); + case 33: { + LogStep(33, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 33: { - LogStep(33, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 34: { + LogStep(34, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 34: { - LogStep(34, "Wait 1000ms"); + case 35: { + LogStep(35, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 35: { - LogStep(35, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 36: { + LogStep(36, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 36: { - LogStep(36, "Turn off light that we turned on"); + case 37: { + LogStep(37, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 37: { - LogStep(37, "Check on/off attribute value is false after off command"); + case 38: { + LogStep(38, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -6790,7 +6909,7 @@ class Test_TC_CC_6_2Suite : public TestCommand class Test_TC_CC_6_3Suite : public TestCommand { public: - Test_TC_CC_6_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_3", 22, credsIssuerConfig) + Test_TC_CC_6_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_3", 23, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -6842,131 +6961,134 @@ class Test_TC_CC_6_3Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); ColorTempPhysicalMinMiredsValue = value; } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); ColorTempPhysicalMaxMiredsValue = value; } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -7009,25 +7131,34 @@ class Test_TC_CC_6_3Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH reads ColorTempPhysicalMaxMireds attribute from DUT."); + case 5: { + LogStep(5, "TH reads ColorTempPhysicalMaxMireds attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH reads ColorTemperatureMireds attribute from DUT."); + case 6: { + LogStep(6, "TH reads ColorTemperatureMireds attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "TH sends StepColorTemperature command to DUT with MoveMode = Up"); + case 7: { + LogStep(7, "TH sends StepColorTemperature command to DUT with MoveMode = Up"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type value; @@ -7043,53 +7174,53 @@ class Test_TC_CC_6_3Suite : public TestCommand ); } - case 7: { - LogStep(7, "Wait 500ms"); + case 8: { + LogStep(8, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "TH reads ColorTemperatureMireds attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "TH reads ColorTemperatureMireds attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Wait 500ms"); + case 10: { + LogStep(10, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "TH reads ColorTemperatureMireds attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 11: { + LogStep(11, "TH reads ColorTemperatureMireds attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Wait 500ms"); + case 12: { + LogStep(12, "Wait 700ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 700UL; return WaitForMs(kIdentityAlpha, value); } - case 12: { - LogStep(12, "TH reads ColorTemperatureMireds attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 13: { + LogStep(13, "TH reads ColorTemperatureMireds attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "TH sends StepColorTemperature command to DUT with MoveMode = Down"); + case 14: { + LogStep(14, "TH sends StepColorTemperature command to DUT with MoveMode = Down"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type value; value.stepMode = static_cast(3); - value.stepSize = 5U; - value.transitionTime = 50U; + value.stepSize = 100U; + value.transitionTime = 10U; value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; value.optionsMask = 0U; @@ -7099,55 +7230,55 @@ class Test_TC_CC_6_3Suite : public TestCommand ); } - case 14: { - LogStep(14, "Wait 500ms"); + case 15: { + LogStep(15, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 15: { - LogStep(15, "TH reads ColorTemperatureMireds attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 16: { + LogStep(16, "TH reads ColorTemperatureMireds attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Wait 500ms"); + case 17: { + LogStep(17, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "TH reads ColorTemperatureMireds attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 18: { + LogStep(18, "TH reads ColorTemperatureMireds attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Wait 500ms"); + case 19: { + LogStep(19, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 19: { - LogStep(19, "TH reads ColorTemperatureMireds attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 20: { + LogStep(20, "TH reads ColorTemperatureMireds attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "Turn off light that we turned on"); + case 21: { + LogStep(21, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 21: { - LogStep(21, "Check on/off attribute value is false after off command"); + case 22: { + LogStep(22, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -7158,11 +7289,12 @@ class Test_TC_CC_6_3Suite : public TestCommand class Test_TC_CC_7_2Suite : public TestCommand { public: - Test_TC_CC_7_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_2", 24, credsIssuerConfig) + Test_TC_CC_7_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_2", 29, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateConfigValue", 0, UINT16_MAX, &mRateConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -7177,8 +7309,12 @@ class Test_TC_CC_7_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateConfigValue; chip::Optional mTimeout; + uint16_t EnhancedCurrentHueStep3b; + uint16_t EnhancedCurrentHueStep5b; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -7207,76 +7343,77 @@ class Test_TC_CC_7_2Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + EnhancedCurrentHueStep3b = value; } break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; @@ -7286,56 +7423,90 @@ class Test_TC_CC_7_2Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue("enhancedCurrentHue", value, EnhancedCurrentHueStep3b)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 23: + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + EnhancedCurrentHueStep5b = value; + } + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("enhancedCurrentHue", value, EnhancedCurrentHueStep5b)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + } + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -7378,18 +7549,27 @@ class Test_TC_CC_7_2Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads EnhancedCurrentHue attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH sends EnhancedMoveHue command to DUT with MoveMode Up"); + case 5: { + LogStep(5, "TH sends EnhancedMoveHue command to DUT with MoveMode Up"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; value.moveMode = static_cast(1); - value.rate = 50U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, @@ -7397,47 +7577,47 @@ class Test_TC_CC_7_2Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 1000ms"); + case 6: { + LogStep(6, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "TH reads EnhancedCurrentHue attribute from DUT several times."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "TH reads EnhancedCurrentHue attribute from DUT several times."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Wait 1000ms"); + case 8: { + LogStep(8, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "TH reads EnhancedCurrentHue attribute from DUT several times."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "TH reads EnhancedCurrentHue attribute from DUT several times."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Wait 1000ms"); + case 10: { + LogStep(10, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "TH reads EnhancedCurrentHue attribute from DUT several times."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 11: { + LogStep(11, "TH reads EnhancedCurrentHue attribute from DUT several times."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "TH sends EnhancedMoveHue command to DUT with MoveMode Stop"); + case 12: { + LogStep(12, "TH sends EnhancedMoveHue command to DUT with MoveMode Stop"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; @@ -7450,19 +7630,32 @@ class Test_TC_CC_7_2Suite : public TestCommand ); } - case 12: { - LogStep(12, "TH reads EnhancedCurrentHue attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 13: { + LogStep(13, "TH reads EnhancedCurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "TH sends EnhancedMoveHue command to DUT with MoveMode Down"); + case 14: { + LogStep(14, "Wait 1000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 15: { + LogStep(15, "TH reads EnhancedCurrentHue attribute from DUT several times."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, + true, chip::NullOptional); + } + case 16: { + LogStep(16, "TH sends EnhancedMoveHue command to DUT with MoveMode Down"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; value.moveMode = static_cast(3); - value.rate = 15U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, @@ -7470,47 +7663,47 @@ class Test_TC_CC_7_2Suite : public TestCommand ); } - case 14: { - LogStep(14, "Wait 500ms"); + case 17: { + LogStep(17, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 15: { - LogStep(15, "TH reads EnhancedCurrentHue attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 18: { + LogStep(18, "TH reads EnhancedCurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Wait 500ms"); + case 19: { + LogStep(19, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "TH reads EnhancedCurrentHue attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 20: { + LogStep(20, "TH reads EnhancedCurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Wait 500ms"); + case 21: { + LogStep(21, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 19: { - LogStep(19, "TH reads EnhancedCurrentHue attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 22: { + LogStep(22, "TH reads EnhancedCurrentHue attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "TH sends EnhancedMoveHue command to DUT with MoveMode Stop"); + case 23: { + LogStep(23, "TH sends EnhancedMoveHue command to DUT with MoveMode Stop"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; @@ -7523,22 +7716,35 @@ class Test_TC_CC_7_2Suite : public TestCommand ); } - case 21: { - LogStep(21, "TH reads EnhancedCurrentHue attribute from DUT several times."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 24: { + LogStep(24, "TH reads EnhancedCurrentHue attribute from DUT several times."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "Turn off light that we turned on"); + case 25: { + LogStep(25, "Wait 1000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 26: { + LogStep(26, "TH reads EnhancedCurrentHue attribute from DUT several times."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, + true, chip::NullOptional); + } + case 27: { + LogStep(27, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 23: { - LogStep(23, "Check on/off attribute value is false after off command"); + case 28: { + LogStep(28, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -7549,11 +7755,12 @@ class Test_TC_CC_7_2Suite : public TestCommand class Test_TC_CC_7_3Suite : public TestCommand { public: - Test_TC_CC_7_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_3", 12, credsIssuerConfig) + Test_TC_CC_7_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_3", 13, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("StepSizeConfigValue", 0, UINT16_MAX, &mStepSizeConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -7568,6 +7775,7 @@ class Test_TC_CC_7_3Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mStepSizeConfigValue; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -7598,53 +7806,56 @@ class Test_TC_CC_7_3Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -7687,19 +7898,28 @@ class Test_TC_CC_7_3Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads EnhancedCurrentHue attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH sends EnhancedStepHue command to DUT with StepMode Up"); + case 5: { + LogStep(5, "TH sends EnhancedStepHue command to DUT with StepMode Up"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type value; value.stepMode = static_cast(0); - value.stepSize = 50U; - value.transitionTime = 1U; + value.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 50U; + value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id, value, @@ -7707,27 +7927,27 @@ class Test_TC_CC_7_3Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 1000ms"); + case 6: { + LogStep(6, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "Over TransitionTime,Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "Over TransitionTime,Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "TH sends EnhancedStepHue command to DUT with StepMode Down"); + case 8: { + LogStep(8, "TH sends EnhancedStepHue command to DUT with StepMode Down"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type value; value.stepMode = static_cast(1); - value.stepSize = 75U; - value.transitionTime = 1U; + value.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 50U; + value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id, value, @@ -7735,29 +7955,29 @@ class Test_TC_CC_7_3Suite : public TestCommand ); } - case 8: { - LogStep(8, "Wait 1000ms"); + case 9: { + LogStep(9, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 9: { - LogStep(9, "Over TransitionTime,Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 10: { + LogStep(10, "Over TransitionTime,Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Turn off light that we turned on"); + case 11: { + LogStep(11, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 11: { - LogStep(11, "Check on/off attribute value is false after off command"); + case 12: { + LogStep(12, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -7768,11 +7988,13 @@ class Test_TC_CC_7_3Suite : public TestCommand class Test_TC_CC_7_4Suite : public TestCommand { public: - Test_TC_CC_7_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_4", 9, credsIssuerConfig) + Test_TC_CC_7_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_4", 10, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("EnhancedHueConfigValue", 0, UINT16_MAX, &mEnhancedHueConfigValue); + AddArgument("SaturationConfigValue", 0, UINT8_MAX, &mSaturationConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -7787,6 +8009,8 @@ class Test_TC_CC_7_4Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mEnhancedHueConfigValue; + chip::Optional mSaturationConfigValue; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -7817,37 +8041,41 @@ class Test_TC_CC_7_4Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 1200U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue("enhancedCurrentHue", value, + mEnhancedHueConfigValue.HasValue() ? mEnhancedHueConfigValue.Value() : 1200U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -7890,18 +8118,27 @@ class Test_TC_CC_7_4Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads EnhancedCurrentHue attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH sends EnhancedMoveToHueAndSaturation command to DUT"); + case 5: { + LogStep(5, "TH sends EnhancedMoveToHueAndSaturation command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C43.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type value; - value.enhancedHue = 1200U; - value.saturation = 90U; + value.enhancedHue = mEnhancedHueConfigValue.HasValue() ? mEnhancedHueConfigValue.Value() : 1200U; + value.saturation = mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 90U; value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -7910,29 +8147,29 @@ class Test_TC_CC_7_4Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 1500ms"); + case 6: { + LogStep(6, "Wait 1500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1500UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C43.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Turn off light that we turned on"); + case 8: { + LogStep(8, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 8: { - LogStep(8, "Check on/off attribute value is false after off command"); + case 9: { + LogStep(9, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -7943,11 +8180,16 @@ class Test_TC_CC_7_4Suite : public TestCommand class Test_TC_CC_8_1Suite : public TestCommand { public: - Test_TC_CC_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_8_1", 38, credsIssuerConfig) + Test_TC_CC_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_8_1", 41, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateConfigValue", 0, UINT8_MAX, &mRateConfigValue); + AddArgument("RateXConfigValue", INT16_MIN, INT16_MAX, &mRateXConfigValue); + AddArgument("RateYConfigValue", INT16_MIN, INT16_MAX, &mRateYConfigValue); + AddArgument("ColorTemperatureMinMiredsConfigValue", 0, UINT16_MAX, &mColorTemperatureMinMiredsConfigValue); + AddArgument("ColorTemperatureMaxMiredsConfigValue", 0, UINT16_MAX, &mColorTemperatureMaxMiredsConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -7962,6 +8204,11 @@ class Test_TC_CC_8_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateConfigValue; + chip::Optional mRateXConfigValue; + chip::Optional mRateYConfigValue; + chip::Optional mColorTemperatureMinMiredsConfigValue; + chip::Optional mColorTemperatureMaxMiredsConfigValue; chip::Optional mTimeout; uint8_t CurrentHueValue; @@ -8002,248 +8249,259 @@ class Test_TC_CC_8_1Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); CurrentHueValue = value; } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("currentHue", value, CurrentHueValue)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); CurrentSaturationValue = value; } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("currentSaturation", value, CurrentSaturationValue)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 16: + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 17: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 18: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); CurrentXValue = value; } break; - case 20: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); CurrentYValue = value; } break; - case 21: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 22: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("currentX", value, CurrentXValue)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 23: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("currentY", value, CurrentYValue)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 24: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 25: + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 26: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 27: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); ColorTemperatureMiredsValue = value; } break; - case 28: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 29: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("colorTemperature", value, ColorTemperatureMiredsValue)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 30: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 31: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 32: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 33: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); EnhancedCurrentHueValue = value; } break; - case 34: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 35: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("enhancedCurrentHue", value, EnhancedCurrentHueValue)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 36: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 37: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -8286,12 +8544,21 @@ class Test_TC_CC_8_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH sends MoveHue command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH sends MoveHue command to DUT"); + VerifyOrDo(!ShouldSkip("CC.S.C01.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; value.moveMode = static_cast(1); - value.rate = 50U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, @@ -8299,15 +8566,15 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 4: { - LogStep(4, "TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 5: { + LogStep(5, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0000 && CC.S.C01.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH sends StopMoveStep command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 6: { + LogStep(6, "TH sends StopMoveStep command to DUT"); + VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; value.optionsMask = 0U; @@ -8317,32 +8584,32 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 6: { - LogStep(6, "TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0000 && CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Wait 100ms"); + case 8: { + LogStep(8, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0000 && CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "TH sends MoveSaturation command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 10: { + LogStep(10, "TH sends MoveSaturation command to DUT"); + VerifyOrDo(!ShouldSkip("CC.S.C04.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; value.moveMode = static_cast(1); - value.rate = 5U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, @@ -8350,15 +8617,15 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 10: { - LogStep(10, "TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 11: { + LogStep(11, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0001 && CC.S.C04.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "TH sends StopMoveStep command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 12: { + LogStep(12, "TH sends StopMoveStep command to DUT"); + VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; value.optionsMask = 0U; @@ -8368,32 +8635,32 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 12: { - LogStep(12, "TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 13: { + LogStep(13, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0001 && CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Wait 100ms"); + case 14: { + LogStep(14, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 14: { - LogStep(14, "TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 15: { + LogStep(15, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0001 && CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "TH sends MoveColor command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 16: { + LogStep(16, "TH sends MoveColor command to DUT"); + VerifyOrDo(!ShouldSkip("CC.S.C08.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColor::Type value; - value.rateX = 15; - value.rateY = 20; + value.rateX = mRateXConfigValue.HasValue() ? mRateXConfigValue.Value() : 50; + value.rateY = mRateYConfigValue.HasValue() ? mRateYConfigValue.Value() : 50; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColor::Id, value, @@ -8401,21 +8668,28 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 16: { - LogStep(16, "TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 17: { + LogStep(17, "Wait 500ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + return WaitForMs(kIdentityAlpha, value); + } + case 18: { + LogStep(18, "TH reads CurrentX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0003 && CC.S.C08.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 19: { + LogStep(19, "TH reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0004 && CC.S.C08.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "TH sends StopMoveStep command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 20: { + LogStep(20, "TH sends StopMoveStep command to DUT"); + VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; value.optionsMask = 0U; @@ -8425,62 +8699,71 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 19: { - LogStep(19, "TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 21: { + LogStep(21, "TH reads CurrentX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0003 && CC.S.C47.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 22: { + LogStep(22, "TH reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0004 && CC.S.C47.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "Wait 100ms"); + case 23: { + LogStep(23, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 22: { - LogStep(22, "TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 24: { + LogStep(24, "TH reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0003 && CC.S.C47.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 25: { + LogStep(25, "TH reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0004 && CC.S.C47.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "TH sends MoveColorTemperature command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "TH sends MoveColorTemperature command to DUT"); + VerifyOrDo(!ShouldSkip("CC.S.C4B.Rsp && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; - value.moveMode = static_cast(1); - value.rate = 10U; - value.colorTemperatureMinimumMireds = 1U; - value.colorTemperatureMaximumMireds = 255U; - value.optionsMask = 0U; - value.optionsOverride = 0U; + value.moveMode = static_cast(1); + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; + value.colorTemperatureMinimumMireds = + mColorTemperatureMinMiredsConfigValue.HasValue() ? mColorTemperatureMinMiredsConfigValue.Value() : 1U; + value.colorTemperatureMaximumMireds = + mColorTemperatureMaxMiredsConfigValue.HasValue() ? mColorTemperatureMaxMiredsConfigValue.Value() : 255U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, value, chip::NullOptional ); } - case 25: { - LogStep(25, "TH reads ColorTemperatureMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 27: { + LogStep(27, "Wait 1000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 28: { + LogStep(28, "TH reads ColorTemperatureMireds attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0007 && CC.S.C4B.Rsp && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "TH sends StopMoveStep command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 29: { + LogStep(29, "TH sends StopMoveStep command to DUT"); + VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; value.optionsMask = 0U; @@ -8490,32 +8773,32 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 27: { - LogStep(27, "TH reads ColorTemperatureMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 30: { + LogStep(30, "TH reads ColorTemperatureMireds attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0007 && CC.S.C47.Rsp && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Wait 100ms"); + case 31: { + LogStep(31, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 29: { - LogStep(29, "Reads current color attribute value matched the value sent by the last attribute"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 32: { + LogStep(32, "Reads current color attribute value matched the value sent by the last attribute"); + VerifyOrDo(!ShouldSkip("CC.S.A0007 && CC.S.C47.Rsp && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 30: { - LogStep(30, "TH sends EnhancedMoveHue command to DUT."); - VerifyOrDo(!ShouldSkip("CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 33: { + LogStep(33, "TH sends EnhancedMoveHue command to DUT."); + VerifyOrDo(!ShouldSkip("CC.S.C41.Rsp && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; value.moveMode = static_cast(1); - value.rate = 50U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, @@ -8523,15 +8806,15 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 31: { - LogStep(31, "TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 34: { + LogStep(34, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4000 && CC.S.C41.Rsp && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 32: { - LogStep(32, "TH sends StopMoveStep command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 35: { + LogStep(35, "TH sends StopMoveStep command to DUT"); + VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; value.optionsMask = 0U; @@ -8541,35 +8824,35 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 33: { - LogStep(33, "TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 36: { + LogStep(36, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4000 && CC.S.C47.Rsp && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 34: { - LogStep(34, "Wait 100ms"); + case 37: { + LogStep(37, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 35: { - LogStep(35, "TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 38: { + LogStep(38, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4000 && CC.S.C47.Rsp && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 36: { - LogStep(36, "Turn off light that we turned on"); + case 39: { + LogStep(39, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 37: { - LogStep(37, "Check on/off attribute value is false after off command"); + case 40: { + LogStep(40, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -8580,7 +8863,7 @@ class Test_TC_CC_8_1Suite : public TestCommand class Test_TC_BINFO_2_1Suite : public TestCommand { public: - Test_TC_BINFO_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_2_1", 66, credsIssuerConfig) + Test_TC_BINFO_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_2_1", 67, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -8590,11 +8873,6 @@ class Test_TC_BINFO_2_1Suite : public TestCommand ~Test_TC_BINFO_2_1Suite() { - if (CountryCodeBuffer != nullptr) - { - chip::Platform::MemoryFree(CountryCodeBuffer); - CountryCodeBuffer = nullptr; - } if (VendorNameValueBuffer != nullptr) { chip::Platform::MemoryFree(VendorNameValueBuffer); @@ -8663,8 +8941,6 @@ class Test_TC_BINFO_2_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - char * CountryCodeBuffer = nullptr; - chip::CharSpan CountryCode; uint16_t DataModelRevisionValue; char * VendorNameValueBuffer = nullptr; chip::CharSpan VendorNameValue; @@ -8712,24 +8988,14 @@ class Test_TC_BINFO_2_1Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - if (CountryCodeBuffer != nullptr) - { - chip::Platform::MemoryFree(CountryCodeBuffer); - } - CountryCodeBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(CountryCodeBuffer, value.data(), value.size()); - CountryCode = chip::CharSpan(CountryCodeBuffer, value.size()); - } + shouldContinue = true; break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); DataModelRevisionValue = value; @@ -8751,7 +9017,7 @@ class Test_TC_BINFO_2_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); if (VendorNameValueBuffer != nullptr) { @@ -8778,7 +9044,7 @@ class Test_TC_BINFO_2_1Suite : public TestCommand { chip::VendorId value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "vendor_id", "vendor_id")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65521U)); VendorIDValue = value; @@ -8800,7 +9066,7 @@ class Test_TC_BINFO_2_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); if (ProductNameValueBuffer != nullptr) { @@ -8827,7 +9093,7 @@ class Test_TC_BINFO_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); ProductIDValue = value; @@ -8849,7 +9115,7 @@ class Test_TC_BINFO_2_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); if (NodeLabelValueBuffer != nullptr) { @@ -8876,15 +9142,18 @@ class Test_TC_BINFO_2_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("location", value, CountryCode)); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 16)); } break; case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -8892,21 +9161,21 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValueAsString("location", value, chip::CharSpan("in", 2))); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); HardwareVersionValue = value; } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -8914,12 +9183,12 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValue("hardwareVersion", value, HardwareVersionValue)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMinLength("value", value, 1)); VerifyOrReturn(CheckConstraintMaxLength("value", value, 64)); if (HardwareVersionStringValueBuffer != nullptr) @@ -8931,10 +9200,10 @@ class Test_TC_BINFO_2_1Suite : public TestCommand HardwareVersionStringValue = chip::CharSpan(HardwareVersionStringValueBuffer, value.size()); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -8942,7 +9211,7 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValueAsString("hardwareVersionString", value, HardwareVersionStringValue)); } break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -8952,14 +9221,14 @@ class Test_TC_BINFO_2_1Suite : public TestCommand SoftwareVersionValue = value; } break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -8967,7 +9236,7 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValue("softwareVersion", value, SoftwareVersionValue)); } break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -8983,10 +9252,10 @@ class Test_TC_BINFO_2_1Suite : public TestCommand SoftwareVersionStringValue = chip::CharSpan(SoftwareVersionStringValueBuffer, value.size()); } break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -8994,12 +9263,12 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValueAsString("softwareVersionString", value, SoftwareVersionStringValue)); } break; - case 36: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMinLength("value", value, 8)); VerifyOrReturn(CheckConstraintMaxLength("value", value, 16)); if (ManufacturingDateValueBuffer != nullptr) @@ -9011,14 +9280,14 @@ class Test_TC_BINFO_2_1Suite : public TestCommand ManufacturingDateValue = chip::CharSpan(ManufacturingDateValueBuffer, value.size()); } break; - case 37: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 38: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 39: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -9026,12 +9295,12 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValueAsString("manufacturingDate", value, ManufacturingDateValue)); } break; - case 40: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); if (PartNumberValueBuffer != nullptr) { @@ -9042,10 +9311,10 @@ class Test_TC_BINFO_2_1Suite : public TestCommand PartNumberValue = chip::CharSpan(PartNumberValueBuffer, value.size()); } break; - case 41: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 42: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -9053,12 +9322,12 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValueAsString("partNumber", value, PartNumberValue)); } break; - case 43: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "long_char_string", "long_char_string")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 256)); if (ProductURLValueBuffer != nullptr) { @@ -9069,14 +9338,14 @@ class Test_TC_BINFO_2_1Suite : public TestCommand ProductURLValue = chip::CharSpan(ProductURLValueBuffer, value.size()); } break; - case 44: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 45: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 46: + case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -9084,12 +9353,12 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValueAsString("productURL", value, ProductURLValue)); } break; - case 47: + case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 64)); if (ProductLabelValueBuffer != nullptr) { @@ -9100,14 +9369,14 @@ class Test_TC_BINFO_2_1Suite : public TestCommand ProductLabelValue = chip::CharSpan(ProductLabelValueBuffer, value.size()); } break; - case 48: + case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 49: + case 50: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 50: + case 51: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -9115,12 +9384,12 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValueAsString("productLabel", value, ProductLabelValue)); } break; - case 51: + case 52: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); if (SerialNumberValueBuffer != nullptr) { @@ -9131,10 +9400,10 @@ class Test_TC_BINFO_2_1Suite : public TestCommand SerialNumberValue = chip::CharSpan(SerialNumberValueBuffer, value.size()); } break; - case 52: + case 53: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 53: + case 54: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -9142,19 +9411,19 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValueAsString("serialNumber", value, SerialNumberValue)); } break; - case 54: + case 55: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("localConfigDisabled", value, false)); - VerifyOrReturn(CheckConstraintType("value", "", "boolean")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; - case 55: + case 56: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 56: + case 57: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -9162,24 +9431,24 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValue("localConfigDisabled", value, true)); } break; - case 57: + case 58: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("reachable", value, true)); - VerifyOrReturn(CheckConstraintType("value", "", "boolean")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; - case 58: + case 59: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 59: + case 60: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); if (UniqueIDValueBuffer != nullptr) { @@ -9190,10 +9459,10 @@ class Test_TC_BINFO_2_1Suite : public TestCommand UniqueIDValue = chip::CharSpan(UniqueIDValueBuffer, value.size()); } break; - case 60: + case 61: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 61: + case 62: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -9201,7 +9470,7 @@ class Test_TC_BINFO_2_1Suite : public TestCommand VerifyOrReturn(CheckValueAsString("uniqueID", value, UniqueIDValue)); } break; - case 62: + case 63: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Basic::Structs::CapabilityMinimaStruct::DecodableType value; @@ -9209,14 +9478,14 @@ class Test_TC_BINFO_2_1Suite : public TestCommand CapabilityMinimaValue = value; } break; - case 63: + case 64: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 64: + case 65: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; - case 65: + case 66: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Basic::Structs::CapabilityMinimaStruct::DecodableType value; @@ -9246,9 +9515,14 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH reads Location from the DUT."); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::Location::Id, true, - chip::NullOptional); + LogStep(1, "During Commissioning, TH Saves the CountryCode Information from SetRegulatoryConfig command"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 2: { LogStep(2, "TH reads DataModelRevision from the DUT."); @@ -9383,7 +9657,17 @@ class Test_TC_BINFO_2_1Suite : public TestCommand chip::NullOptional); } case 21: { - LogStep(21, "TH write Location from the DUT"); + LogStep(21, "Verify that the Location is same as CountryCode value saved from step1"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BINFO.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 22: { + LogStep(22, "TH write Location from the DUT"); VerifyOrDo(!ShouldSkip("BINFO.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -9391,20 +9675,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::Location::Id, value, chip::NullOptional, chip::NullOptional); } - case 22: { - LogStep(22, "TH reads Location from the DUT."); + case 23: { + LogStep(23, "TH reads Location from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::Location::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "TH reads HardwareVersion from the DUT"); + case 24: { + LogStep(24, "TH reads HardwareVersion from the DUT"); VerifyOrDo(!ShouldSkip("BINFO.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::HardwareVersion::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "TH writes HardwareVersion from the DUT."); + case 25: { + LogStep(25, "TH writes HardwareVersion from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint16_t value; @@ -9412,20 +9696,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::HardwareVersion::Id, value, chip::NullOptional, chip::NullOptional); } - case 25: { - LogStep(25, "TH reads HardwareVersion from the DUT"); + case 26: { + LogStep(26, "TH reads HardwareVersion from the DUT"); VerifyOrDo(!ShouldSkip("BINFO.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::HardwareVersion::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "TH reads HardwareVersionString from the DUT."); + case 27: { + LogStep(27, "TH reads HardwareVersionString from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::HardwareVersionString::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "TH writes HardwareVersionString from the DUT."); + case 28: { + LogStep(28, "TH writes HardwareVersionString from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -9433,20 +9717,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::HardwareVersionString::Id, value, chip::NullOptional, chip::NullOptional); } - case 28: { - LogStep(28, "TH reads HardwareVersionString from the DUT."); + case 29: { + LogStep(29, "TH reads HardwareVersionString from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::HardwareVersionString::Id, true, chip::NullOptional); } - case 29: { - LogStep(29, "TH reads SoftwareVersion from the DUT"); + case 30: { + LogStep(30, "TH reads SoftwareVersion from the DUT"); VerifyOrDo(!ShouldSkip("BINFO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SoftwareVersion::Id, true, chip::NullOptional); } - case 30: { - LogStep(30, + case 31: { + LogStep(31, "Verify that the SoftwareVersion is not displayed to the end-user through any device specific means (ex: " "screen, audio)"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BINFO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -9457,8 +9741,8 @@ class Test_TC_BINFO_2_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 31: { - LogStep(31, "TH writes SoftwareVersion from the DUT."); + case 32: { + LogStep(32, "TH writes SoftwareVersion from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint32_t value; @@ -9466,20 +9750,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SoftwareVersion::Id, value, chip::NullOptional, chip::NullOptional); } - case 32: { - LogStep(32, "TH reads SoftwareVersion from the DUT"); + case 33: { + LogStep(33, "TH reads SoftwareVersion from the DUT"); VerifyOrDo(!ShouldSkip("BINFO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SoftwareVersion::Id, true, chip::NullOptional); } - case 33: { - LogStep(33, "TH reads SoftwareVersionString from the DUT"); + case 34: { + LogStep(34, "TH reads SoftwareVersionString from the DUT"); VerifyOrDo(!ShouldSkip("BINFO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SoftwareVersionString::Id, true, chip::NullOptional); } - case 34: { - LogStep(34, "TH writes SoftwareVersionString from the DUT."); + case 35: { + LogStep(35, "TH writes SoftwareVersionString from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -9487,20 +9771,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SoftwareVersionString::Id, value, chip::NullOptional, chip::NullOptional); } - case 35: { - LogStep(35, "TH reads SoftwareVersionString from the DUT"); + case 36: { + LogStep(36, "TH reads SoftwareVersionString from the DUT"); VerifyOrDo(!ShouldSkip("BINFO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SoftwareVersionString::Id, true, chip::NullOptional); } - case 36: { - LogStep(36, "TH reads ManufacturingDate from the DUT."); + case 37: { + LogStep(37, "TH reads ManufacturingDate from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ManufacturingDate::Id, true, chip::NullOptional); } - case 37: { - LogStep(37, "Verify if the first 8 characters specify date according to ISO 8601, i.e, YYYYMMDD"); + case 38: { + LogStep(38, "Verify if the first 8 characters specify date according to ISO 8601, i.e, YYYYMMDD"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BINFO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -9509,8 +9793,8 @@ class Test_TC_BINFO_2_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 38: { - LogStep(38, "TH writes ManufacturingDate from the DUT."); + case 39: { + LogStep(39, "TH writes ManufacturingDate from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -9518,20 +9802,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ManufacturingDate::Id, value, chip::NullOptional, chip::NullOptional); } - case 39: { - LogStep(39, "TH reads ManufacturingDate from the DUT."); + case 40: { + LogStep(40, "TH reads ManufacturingDate from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ManufacturingDate::Id, true, chip::NullOptional); } - case 40: { - LogStep(40, "TH reads PartNumber from the DUT"); + case 41: { + LogStep(41, "TH reads PartNumber from the DUT"); VerifyOrDo(!ShouldSkip("BINFO.S.A000c && PART_NUM"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::PartNumber::Id, true, chip::NullOptional); } - case 41: { - LogStep(41, "TH writes PartNumber from the DUT."); + case 42: { + LogStep(42, "TH writes PartNumber from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -9539,20 +9823,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::PartNumber::Id, value, chip::NullOptional, chip::NullOptional); } - case 42: { - LogStep(42, "TH reads PartNumber from the DUT"); + case 43: { + LogStep(43, "TH reads PartNumber from the DUT"); VerifyOrDo(!ShouldSkip("BINFO.S.A000c && PART_NUM"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::PartNumber::Id, true, chip::NullOptional); } - case 43: { - LogStep(43, "TH reads ProductURL from the DUT"); + case 44: { + LogStep(44, "TH reads ProductURL from the DUT"); VerifyOrDo(!ShouldSkip("BINFO.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ProductURL::Id, true, chip::NullOptional); } - case 44: { - LogStep(44, + case 45: { + LogStep(45, "Verify that it specifies a link to a specific web page, Verify that it follows the syntax rules specified in " "RFC 3986."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BINFO.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -9563,8 +9847,8 @@ class Test_TC_BINFO_2_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 45: { - LogStep(45, "TH writes ProductURL from the DUT."); + case 46: { + LogStep(46, "TH writes ProductURL from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -9572,20 +9856,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ProductURL::Id, value, chip::NullOptional, chip::NullOptional); } - case 46: { - LogStep(46, "TH reads ProductURL from the DUT"); + case 47: { + LogStep(47, "TH reads ProductURL from the DUT"); VerifyOrDo(!ShouldSkip("BINFO.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ProductURL::Id, true, chip::NullOptional); } - case 47: { - LogStep(47, "TH reads ProductLabel from the DUT."); + case 48: { + LogStep(48, "TH reads ProductLabel from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ProductLabel::Id, true, chip::NullOptional); } - case 48: { - LogStep(48, "Verify that it does not include the name of the vendor as defined within the VendorName attribute"); + case 49: { + LogStep(49, "Verify that it does not include the name of the vendor as defined within the VendorName attribute"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BINFO.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -9594,8 +9878,8 @@ class Test_TC_BINFO_2_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 49: { - LogStep(49, "TH writes ProductLabel from the DUT."); + case 50: { + LogStep(50, "TH writes ProductLabel from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -9603,19 +9887,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ProductLabel::Id, value, chip::NullOptional, chip::NullOptional); } - case 50: { - LogStep(50, "TH reads ProductLabel from the DUT."); + case 51: { + LogStep(51, "TH reads ProductLabel from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ProductLabel::Id, true, chip::NullOptional); } - case 51: { - LogStep(51, "TH reads SerialNumber from the DUT."); + case 52: { + LogStep(52, "TH reads SerialNumber from the DUT."); + VerifyOrDo(!ShouldSkip("BINFO.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SerialNumber::Id, true, chip::NullOptional); } - case 52: { - LogStep(52, "TH writes SerialNumber from the DUT."); + case 53: { + LogStep(53, "TH writes SerialNumber from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -9623,20 +9908,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SerialNumber::Id, value, chip::NullOptional, chip::NullOptional); } - case 53: { - LogStep(53, "TH reads SerialNumber from the DUT."); + case 54: { + LogStep(54, "TH reads SerialNumber from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SerialNumber::Id, true, chip::NullOptional); } - case 54: { - LogStep(54, "TH reads LocalConfigDisabled from the DUT."); + case 55: { + LogStep(55, "TH reads LocalConfigDisabled from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::LocalConfigDisabled::Id, true, chip::NullOptional); } - case 55: { - LogStep(55, "TH sets LocalConfigDisabled to True"); + case 56: { + LogStep(56, "TH sets LocalConfigDisabled to True"); VerifyOrDo(!ShouldSkip("BINFO.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; bool value; @@ -9644,20 +9929,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::LocalConfigDisabled::Id, value, chip::NullOptional, chip::NullOptional); } - case 56: { - LogStep(56, "TH reads LocalConfigDisabled from the DUT."); + case 57: { + LogStep(57, "TH reads LocalConfigDisabled from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::LocalConfigDisabled::Id, true, chip::NullOptional); } - case 57: { - LogStep(57, "TH reads Reachable from the DUT."); + case 58: { + LogStep(58, "TH reads Reachable from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::Reachable::Id, true, chip::NullOptional); } - case 58: { - LogStep(58, "TH sends Write request message to DUT to change value of Reachable to false"); + case 59: { + LogStep(59, "TH sends Write request message to DUT to change value of Reachable to false"); VerifyOrDo(!ShouldSkip("BINFO.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; bool value; @@ -9665,14 +9950,14 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::Reachable::Id, value, chip::NullOptional, chip::NullOptional); } - case 59: { - LogStep(59, "TH reads UniqueID from the DUT."); + case 60: { + LogStep(60, "TH reads UniqueID from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::UniqueID::Id, true, chip::NullOptional); } - case 60: { - LogStep(60, "TH writes UniqueID from the DUT."); + case 61: { + LogStep(61, "TH writes UniqueID from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -9680,20 +9965,20 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::UniqueID::Id, value, chip::NullOptional, chip::NullOptional); } - case 61: { - LogStep(61, "TH reads UniqueID from the DUT."); + case 62: { + LogStep(62, "TH reads UniqueID from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::UniqueID::Id, true, chip::NullOptional); } - case 62: { - LogStep(62, "TH reads CapabilityMinima attribute from the DUT."); + case 63: { + LogStep(63, "TH reads CapabilityMinima attribute from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::CapabilityMinima::Id, true, chip::NullOptional); } - case 63: { - LogStep(63, + case 64: { + LogStep(64, "Step 56 is implicitly validating the attribute(CapabilityMinima) constraints, as long as the payload is being " "parsed successfully"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BINFO.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -9704,8 +9989,8 @@ class Test_TC_BINFO_2_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 64: { - LogStep(64, "TH writes CapabilityMinima from the DUT."); + case 65: { + LogStep(65, "TH writes CapabilityMinima from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Basic::Structs::CapabilityMinimaStruct::Type value; @@ -9716,8 +10001,8 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::CapabilityMinima::Id, value, chip::NullOptional, chip::NullOptional); } - case 65: { - LogStep(65, "TH reads CapabilityMinima attribute from the DUT."); + case 66: { + LogStep(66, "TH reads CapabilityMinima attribute from the DUT."); VerifyOrDo(!ShouldSkip("BINFO.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::CapabilityMinima::Id, true, chip::NullOptional); @@ -9773,7 +10058,7 @@ class Test_TC_DESC_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -9782,7 +10067,7 @@ class Test_TC_DESC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -9790,7 +10075,7 @@ class Test_TC_DESC_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -9811,7 +10096,7 @@ class Test_TC_DESC_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 5: @@ -9823,7 +10108,7 @@ class Test_TC_DESC_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -9938,7 +10223,7 @@ class Test_TC_DGETH_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); } @@ -9948,7 +10233,7 @@ class Test_TC_DGETH_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; case 3: @@ -9956,7 +10241,7 @@ class Test_TC_DGETH_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 4: @@ -9968,7 +10253,7 @@ class Test_TC_DGETH_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 6: @@ -9980,7 +10265,7 @@ class Test_TC_DGETH_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 8: @@ -9992,7 +10277,7 @@ class Test_TC_DGETH_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 10: @@ -10004,7 +10289,7 @@ class Test_TC_DGETH_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 12: @@ -10016,7 +10301,7 @@ class Test_TC_DGETH_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; case 14: @@ -10028,7 +10313,7 @@ class Test_TC_DGETH_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 16: @@ -10197,7 +10482,7 @@ class Test_TC_DGETH_2_1Suite : public TestCommand class Test_TC_DGETH_2_2Suite : public TestCommand { public: - Test_TC_DGETH_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_2_2", 7, credsIssuerConfig) + Test_TC_DGETH_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_2_2", 22, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -10218,6 +10503,12 @@ class Test_TC_DGETH_2_2Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + uint64_t PacketRxCount; + uint64_t PacketTxCount; + uint64_t TxErrCount; + uint64_t CollisionCount; + uint64_t OverrunCount; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -10236,45 +10527,185 @@ class Test_TC_DGETH_2_2Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); + } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint64_t value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("packetRxCount", value, 0ULL)); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint64_t value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("packetTxCount", value, 0ULL)); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); } break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint64_t value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("txErrCount", value, 0ULL)); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint64_t value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("collisionCount", value, 0ULL)); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); + } + break; + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("overrunCount", value, 0ULL)); + PacketRxCount = value; + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + PacketTxCount = value; + } + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + TxErrCount = value; + } + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + CollisionCount = value; + } + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + OverrunCount = value; + } + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMaxValue("value", value, PacketRxCount)); + } + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMaxValue("value", value, PacketTxCount)); + } + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMaxValue("value", value, TxErrCount)); + } + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMaxValue("value", value, CollisionCount)); + } + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMaxValue("value", value, OverrunCount)); } break; default: @@ -10300,8 +10731,98 @@ class Test_TC_DGETH_2_2Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Sends ResetCounts command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(1, "TH reads PHYRate attribute from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads PHYRate attribute from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads PHYRate attribute from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads PHYRate attribute from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads PHYRate attribute from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "TH reads PHYRate attribute from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "TH reads PHYRate attribute from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "TH reads PHYRate attribute from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); + } + case 9: { + LogStep(9, "TH reads PHYRate attribute from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); + } + case 10: { + LogStep(10, "TH reads PHYRate attribute from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); + } + case 11: { + LogStep(11, "TH reads PacketRxCount attribute value from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id, true, chip::NullOptional); + } + case 12: { + LogStep(12, "TH reads PacketTxCount attribute value from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id, true, chip::NullOptional); + } + case 13: { + LogStep(13, "TH reads TxErrCount attribute value from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::TxErrCount::Id, true, chip::NullOptional); + } + case 14: { + LogStep(14, "TH reads CollisionCount attribute value from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::CollisionCount::Id, true, chip::NullOptional); + } + case 15: { + LogStep(15, "TH reads OverrunCount attribute value from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::OverrunCount::Id, true, chip::NullOptional); + } + case 16: { + LogStep(16, "Sends ResetCounts command"); + VerifyOrDo(!ShouldSkip("DGETH.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, @@ -10309,33 +10830,33 @@ class Test_TC_DGETH_2_2Suite : public TestCommand ); } - case 2: { - LogStep(2, "Read the PacketRxCount attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 17: { + LogStep(17, "TH reads PacketRxCount attribute value from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id, true, chip::NullOptional); } - case 3: { - LogStep(3, "Read the PacketTxCount attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 18: { + LogStep(18, "TH reads PacketTxCount attribute value from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Read the TxErrCount attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 19: { + LogStep(19, "TH reads TxErrCount attribute value from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, EthernetNetworkDiagnostics::Attributes::TxErrCount::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Read the CollisionCount attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 20: { + LogStep(20, "TH reads CollisionCount attribute value from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, EthernetNetworkDiagnostics::Attributes::CollisionCount::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Read the OverrunCount attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 21: { + LogStep(21, "TH reads OverrunCount attribute value from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, EthernetNetworkDiagnostics::Attributes::OverrunCount::Id, true, chip::NullOptional); } @@ -10390,7 +10911,7 @@ class Test_TC_FLW_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -10399,7 +10920,7 @@ class Test_TC_FLW_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -10407,7 +10928,7 @@ class Test_TC_FLW_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -10423,16 +10944,8 @@ class Test_TC_FLW_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 5: @@ -10444,7 +10957,7 @@ class Test_TC_FLW_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -10456,7 +10969,7 @@ class Test_TC_FLW_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 7: @@ -10497,12 +11010,11 @@ class Test_TC_FLW_1_1Suite : public TestCommand } case 3: { LogStep(3, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip(" !FLW.S.A0003 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, FlowMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Read the global attribute: AttributeList"); + LogStep(4, "Read the optional attribute(Tolerance) in AttributeList"); VerifyOrDo(!ShouldSkip("FLW.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, FlowMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); @@ -10578,7 +11090,7 @@ class Test_TC_FLW_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -10588,7 +11100,7 @@ class Test_TC_FLW_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -10598,7 +11110,7 @@ class Test_TC_FLW_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -10608,7 +11120,7 @@ class Test_TC_FLW_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); } @@ -10654,7 +11166,7 @@ class Test_TC_FLW_2_1Suite : public TestCommand FlowMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "read the optional attribute: Tolerance"); + LogStep(4, "Read the optional attribute: Tolerance"); VerifyOrDo(!ShouldSkip("FLW.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, FlowMeasurement::Attributes::Tolerance::Id, true, chip::NullOptional); @@ -10710,7 +11222,7 @@ class Test_TC_CGEN_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -10719,7 +11231,7 @@ class Test_TC_CGEN_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -10727,7 +11239,7 @@ class Test_TC_CGEN_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -10745,7 +11257,7 @@ class Test_TC_CGEN_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); @@ -10756,7 +11268,7 @@ class Test_TC_CGEN_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); @@ -10874,7 +11386,7 @@ class Test_TC_CGEN_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 2: @@ -10918,7 +11430,7 @@ class Test_TC_CGEN_2_1Suite : public TestCommand { bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; default: @@ -11041,7 +11553,7 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -11050,7 +11562,7 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -11058,7 +11570,7 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); @@ -11073,7 +11585,7 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; @@ -11086,7 +11598,7 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; default: @@ -11188,7 +11700,7 @@ class Test_TC_DGGEN_2_1Suite : public TestCommand chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterfaceType::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 2: @@ -11196,7 +11708,7 @@ class Test_TC_DGGEN_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -11226,7 +11738,7 @@ class Test_TC_DGGEN_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 9: @@ -11234,7 +11746,7 @@ class Test_TC_DGGEN_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967294UL)); } @@ -11474,7 +11986,7 @@ class Test_TC_I_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 4U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -11483,7 +11995,7 @@ class Test_TC_I_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -11492,7 +12004,7 @@ class Test_TC_I_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 1UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 4: @@ -11500,7 +12012,7 @@ class Test_TC_I_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); @@ -11515,9 +12027,8 @@ class Test_TC_I_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 64UL)); } break; case 6: @@ -11525,8 +12036,8 @@ class Test_TC_I_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 64UL)); } break; case 7: @@ -11534,7 +12045,7 @@ class Test_TC_I_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; @@ -11545,11 +12056,9 @@ class Test_TC_I_1_1Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 0)); - VerifyOrReturn(CheckValue("generatedCommandList[0]", iter_0.GetValue(), 0UL)); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 1)); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 9: @@ -11559,9 +12068,11 @@ class Test_TC_I_1_1Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 0)); + VerifyOrReturn(CheckValue("generatedCommandList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 1)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 10: @@ -11614,13 +12125,12 @@ class Test_TC_I_1_1Suite : public TestCommand } case 5: { LogStep(5, "Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("I.C.C40.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip(" !I.C.C40.Tx "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Read the optional command(TriggerEffect) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("I.C.C40.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } @@ -11632,13 +12142,12 @@ class Test_TC_I_1_1Suite : public TestCommand } case 8: { LogStep(8, "Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("I.S.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip(" !I.S.C00.Tx "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Read the optional attribute(IdentifyQueryResponse) in GeneratedCommandList"); + VerifyOrDo(!ShouldSkip("I.S.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -11703,7 +12212,7 @@ class Test_TC_I_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -11713,7 +12222,7 @@ class Test_TC_I_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); } @@ -11803,8 +12312,8 @@ class Test_TC_I_2_2Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 55U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 51U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 69U)); } break; case 3: @@ -11816,8 +12325,8 @@ class Test_TC_I_2_2Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 45U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 55U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 43U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 57U)); } break; case 5: @@ -11889,7 +12398,7 @@ class Test_TC_I_2_2Suite : public TestCommand ); } case 2: { - LogStep(2, "TH reads immediately IdentifyTime attribute from DUT1"); + LogStep(2, "TH reads immediately IdentifyTime attribute from DUT"); VerifyOrDo(!ShouldSkip("I.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id, true, chip::NullOptional); @@ -11911,7 +12420,8 @@ class Test_TC_I_2_2Suite : public TestCommand LogStep(5, "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"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && I.S.C01.Rsp && I.S.C00.Tx"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -11931,14 +12441,15 @@ class Test_TC_I_2_2Suite : public TestCommand ); } case 7: { - LogStep(7, "TH reads immediately IdentifyTime attribute from DUT2"); + LogStep(7, "TH reads immediately IdentifyTime attribute from DUT"); VerifyOrDo(!ShouldSkip("I.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id, true, chip::NullOptional); } case 8: { LogStep(8, "TH sends IdentifyQuery command to DUT "); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && I.S.C01.Rsp && I.S.C00.Tx"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -12396,7 +12907,7 @@ class Test_TC_ILL_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -12405,7 +12916,7 @@ class Test_TC_ILL_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -12413,7 +12924,7 @@ class Test_TC_ILL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -12429,7 +12940,7 @@ class Test_TC_ILL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; @@ -12438,7 +12949,7 @@ class Test_TC_ILL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; @@ -12451,7 +12962,7 @@ class Test_TC_ILL_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 7: @@ -12463,7 +12974,7 @@ class Test_TC_ILL_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 8: @@ -12590,7 +13101,7 @@ class Test_TC_ILL_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); } @@ -12600,7 +13111,7 @@ class Test_TC_ILL_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65533U)); } @@ -12610,7 +13121,7 @@ class Test_TC_ILL_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 2U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); } @@ -12620,7 +13131,7 @@ class Test_TC_ILL_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); } @@ -12630,7 +13141,7 @@ class Test_TC_ILL_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } @@ -12738,7 +13249,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -12746,7 +13257,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 7UL)); } @@ -12756,7 +13267,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); @@ -12767,7 +13278,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 16384UL)); } @@ -12777,7 +13288,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); @@ -12788,7 +13299,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; @@ -12797,7 +13308,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; @@ -12806,7 +13317,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); } break; @@ -12815,7 +13326,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); } break; @@ -12824,7 +13335,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); } break; @@ -12833,7 +13344,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); } break; @@ -12842,7 +13353,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -12851,7 +13362,6 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; case 13: @@ -12859,15 +13369,8 @@ class Test_TC_LVL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; case 14: @@ -12879,7 +13382,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 15: @@ -12974,13 +13477,12 @@ class Test_TC_LVL_1_1Suite : public TestCommand } case 12: { LogStep(12, "Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("LVL.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip(" !LVL.S.F02 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Read the Feature-dependent(LVL.S.F02) attribute in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("LVL.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } @@ -13058,7 +13560,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); CurrentLevelValue = value; @@ -13069,7 +13571,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -13080,7 +13582,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("minLevel", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); MinLevelValue = value; } break; @@ -13089,7 +13591,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); MinLevelFeatureMapNotSupportedValue = value; @@ -13101,7 +13603,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("maxLevel", value, 254U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, MinLevelValue)); MaxLevelValue = value; } @@ -13111,7 +13613,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, MinLevelFeatureMapNotSupportedValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); MaxLevelFeatureMapNotSupportedValue = value; @@ -13122,7 +13624,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, MinLevelValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxLevelValue)); } @@ -13132,7 +13634,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, MinLevelFeatureMapNotSupportedValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxLevelFeatureMapNotSupportedValue)); } @@ -13142,7 +13644,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -13152,7 +13654,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); MinFrequencyValue = value; @@ -13163,7 +13665,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); MaxFrequencyValue = value; @@ -13174,7 +13676,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, MinFrequencyValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxFrequencyValue)); } @@ -13184,7 +13686,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -13194,7 +13696,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, MinLevelValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxLevelValue)); } @@ -13204,7 +13706,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, MinLevelFeatureMapNotSupportedValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxLevelFeatureMapNotSupportedValue)); } @@ -13214,7 +13716,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -13224,7 +13726,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -13234,7 +13736,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -13245,7 +13747,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("options", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); } break; case 20: @@ -13253,7 +13755,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -13469,7 +13971,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); OnOffTransitionTimeValue = value; @@ -13486,7 +13988,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand VerifyOrReturn( CheckValue("onOffTransitionTime", value, mOnOffTransitionTimeConfigValue.HasValue() ? mOnOffTransitionTimeConfigValue.Value() : 10U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintNotValue("value", value, OnOffTransitionTimeValue)); } break; @@ -13495,7 +13997,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); OnLevelValue = value; @@ -13512,7 +14014,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand VerifyOrReturn(CheckValueNonNull("onLevel", value)); VerifyOrReturn(CheckValue("onLevel.Value()", value.Value(), mOnLevelConfigValue.HasValue() ? mOnLevelConfigValue.Value() : 5U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintNotValue("value", value, OnLevelValue)); } break; @@ -13521,7 +14023,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); OnTransitionTimeValue = value; @@ -13538,7 +14040,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand VerifyOrReturn(CheckValueNonNull("onTransitionTime", value)); VerifyOrReturn(CheckValue("onTransitionTime.Value()", value.Value(), mOnTransitionTimeConfigValue.HasValue() ? mOnTransitionTimeConfigValue.Value() : 5U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintNotValue("value", value, OnTransitionTimeValue)); } break; @@ -13547,7 +14049,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); OffTransitionTimeValue = value; @@ -13564,7 +14066,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand VerifyOrReturn(CheckValueNonNull("offTransitionTime", value)); VerifyOrReturn(CheckValue("offTransitionTime.Value()", value.Value(), mOffTransitionTimeConfigValue.HasValue() ? mOffTransitionTimeConfigValue.Value() : 10U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintNotValue("value", value, OffTransitionTimeValue)); } break; @@ -13573,7 +14075,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); DefaultMoveRatevalue = value; @@ -13590,7 +14092,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand VerifyOrReturn(CheckValueNonNull("defaultMoveRate", value)); VerifyOrReturn(CheckValue("defaultMoveRate.Value()", value.Value(), mDefaultMoveRateConfigValue.HasValue() ? mDefaultMoveRateConfigValue.Value() : 111U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintNotValue("value", value, DefaultMoveRatevalue)); } break; @@ -13599,7 +14101,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); StartUpCurrentLevelValue = value; @@ -13617,7 +14119,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand VerifyOrReturn( CheckValue("startUpCurrentLevel.Value()", value.Value(), mStartUpCurrentLevelConfigValue.HasValue() ? mStartUpCurrentLevelConfigValue.Value() : 5U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintNotValue("value", value, StartUpCurrentLevelValue)); } break; @@ -13794,7 +14296,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand class Test_TC_LVL_3_1Suite : public TestCommand { public: - Test_TC_LVL_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_3_1", 20, credsIssuerConfig) + Test_TC_LVL_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_3_1", 21, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -13843,33 +14345,36 @@ class Test_TC_LVL_3_1Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -13877,14 +14382,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, 64U)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -13892,14 +14397,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, 100U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -13907,24 +14412,24 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, 128U)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -13932,10 +14437,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, 64U)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -13980,132 +14485,143 @@ class Test_TC_LVL_3_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Reads the MinLevel attribute"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "Reads the MinLevel attribute"); VerifyOrDo(!ShouldSkip("LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Reads the MaxLevel attribute"); + case 5: { + LogStep(5, "Reads the MaxLevel attribute"); VerifyOrDo(!ShouldSkip("LVL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxLevel::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "sends a MoveToLevelWithOnOff command"); + case 6: { + LogStep(6, "sends a MoveToLevelWithOnOff command"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 64U; - value.transitionTime = 0U; + value.level = 64U; + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, value, chip::NullOptional ); } - case 6: { - LogStep(6, "Wait 100ms"); + case 7: { + LogStep(7, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 7: { - LogStep(7, "Reads CurrentLevel attribute from DUT"); + case 8: { + LogStep(8, "Reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "sends a Move to level command"); + case 9: { + LogStep(9, "sends a Move to level command"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 100U; - value.transitionTime = 0U; - value.optionMask = 1U; - value.optionOverride = 1U; + value.level = 100U; + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, chip::NullOptional ); } - case 9: { - LogStep(9, "Wait 100 ms"); + case 10: { + LogStep(10, "Wait 100 ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Reads CurrentLevel attribute from DUT"); + case 11: { + LogStep(11, "Reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "sends a Move to level command"); + case 12: { + LogStep(12, "sends a Move to level command"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 128U; - value.transitionTime = 100U; - value.optionMask = 1U; - value.optionOverride = 1U; + value.level = 128U; + value.transitionTime = 100U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, chip::NullOptional ); } - case 12: { - LogStep(12, "Wait 11000ms"); + case 13: { + LogStep(13, "Wait 11000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 11000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "Reads CurrentLevel attribute from DUT"); + case 14: { + LogStep(14, "Reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Reads the OnOffTransitionTime attribute from the DUT"); + case 15: { + LogStep(15, "Reads the OnOffTransitionTime attribute from the DUT"); VerifyOrDo(!ShouldSkip("LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnOffTransitionTime::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "sends a Move to level command"); + case 16: { + LogStep(16, "sends a Move to level command"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 64U; - value.transitionTime = 65535U; - value.optionMask = 1U; - value.optionOverride = 1U; + value.level = 64U; + value.transitionTime = 65535U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, chip::NullOptional ); } - case 16: { - LogStep(16, "Wait 1000ms"); + case 17: { + LogStep(17, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "Reads CurrentLevel attribute from DUT"); + case 18: { + LogStep(18, "Reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0010 && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Precondition send Off Command"); + case 19: { + LogStep(19, "Precondition send Off Command"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -14113,8 +14629,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 19: { - LogStep(19, "Check on/off attribute value is false after off command"); + case 20: { + LogStep(20, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -14126,7 +14642,7 @@ class Test_TC_LVL_3_1Suite : public TestCommand class Test_TC_LVL_4_1Suite : public TestCommand { public: - Test_TC_LVL_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_4_1", 20, credsIssuerConfig) + Test_TC_LVL_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_4_1", 21, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -14179,42 +14695,45 @@ class Test_TC_LVL_4_1Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); MinlevelValue = value; } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); MaxlevelValue = value; } break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -14222,18 +14741,18 @@ class Test_TC_LVL_4_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, MaxlevelValue)); } break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -14243,23 +14762,19 @@ class Test_TC_LVL_4_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); DefaultMoveRateValue = value; } break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -14267,8 +14782,12 @@ class Test_TC_LVL_4_1Suite : public TestCommand break; case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -14313,48 +14832,59 @@ class Test_TC_LVL_4_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Reads Minlevel attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "Reads Minlevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "sends a MoveToLevelWithOnOff command"); + case 5: { + LogStep(5, "sends a MoveToLevelWithOnOff command"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 1U; - value.transitionTime = 0U; + value.level = 1U; + value.transitionTime = 0U; + value.optionsMask = 1U; + value.optionsOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, value, chip::NullOptional ); } - case 5: { - LogStep(5, "reads max level attribute from DUT"); + case 6: { + LogStep(6, "reads max level attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxLevel::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "sends a Move up command"); + case 7: { + LogStep(7, "sends a Move up command"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Move::Type value; - value.moveMode = static_cast(0); - value.rate = 32U; - value.optionMask = 1U; - value.optionOverride = 1U; + value.moveMode = static_cast(0); + value.rate = 32U; + value.optionsMask = 1U; + value.optionsOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Move::Id, value, chip::NullOptional ); } - case 7: { - LogStep(7, + case 8: { + LogStep(8, "Physically verify that the DUT moves at a rate of 32 units per second or as close as possible to this rate " "and completes moving to its maximum level"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && LVL.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -14362,36 +14892,38 @@ class Test_TC_LVL_4_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Wait 9000ms"); + case 9: { + LogStep(9, "Wait 9000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 9: { - LogStep(9, "Reads CurrentLevel attribute from DUT"); + case 10: { + LogStep(10, "Reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000 && LVL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "sends a MoveWithOnOff command"); + case 11: { + LogStep(11, "sends a Move command"); VerifyOrDo(!ShouldSkip("LVL.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Type value; - value.moveMode = static_cast(1); - value.rate = 64U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveWithOnOff::Id, value, + chip::app::Clusters::LevelControl::Commands::Move::Type value; + value.moveMode = static_cast(1); + value.rate = 64U; + value.optionsMask = 1U; + value.optionsOverride = 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Move::Id, value, chip::NullOptional ); } - case 11: { - LogStep(11, + case 12: { + LogStep(12, "Physically verify that the DUT moves at a rate of 64 units per second or as close as possible to this rate " "and complete moving to its minimum level"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && LVL.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -14399,51 +14931,52 @@ class Test_TC_LVL_4_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 12: { - LogStep(12, "Wait 5000ms"); + case 13: { + LogStep(13, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "reads CurrentLevel attribute from DUT"); + case 14: { + LogStep(14, "reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "reads default move rate attribute from DUT"); + case 15: { + LogStep(15, "reads default move rate attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "sends a Move up command at default move rate"); + case 16: { + LogStep(16, "sends a Move up command at default move rate"); VerifyOrDo(!ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Move::Type value; - value.moveMode = static_cast(0); - value.rate = 255U; - value.optionMask = 1U; - value.optionOverride = 1U; + value.moveMode = static_cast(0); + value.rate = 255U; + value.optionsMask = 1U; + value.optionsOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Move::Id, value, chip::NullOptional ); } - case 16: { - LogStep(16, "Wait 100ms"); + case 17: { + LogStep(17, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, + case 18: { + LogStep(18, "Physically verify that the device moves at the rate recorded in step 3a and completes moving to its maximum " "level"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && LVL.S.C05.Rsp && LVL.S.A0014"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -14451,8 +14984,8 @@ class Test_TC_LVL_4_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 18: { - LogStep(18, "Precondition send Off Command"); + case 19: { + LogStep(19, "Precondition send Off Command"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -14460,8 +14993,8 @@ class Test_TC_LVL_4_1Suite : public TestCommand ); } - case 19: { - LogStep(19, "Check on/off attribute value is false after off command"); + case 20: { + LogStep(20, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -14473,7 +15006,7 @@ class Test_TC_LVL_4_1Suite : public TestCommand class Test_TC_LVL_5_1Suite : public TestCommand { public: - Test_TC_LVL_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_5_1", 17, credsIssuerConfig) + Test_TC_LVL_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_5_1", 23, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -14525,70 +15058,87 @@ class Test_TC_LVL_5_1Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); MinlevelValue = value; } break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("currentLevel", value, static_cast(MinlevelValue + 1))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); CurrentlevelValue = value; } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("currentLevel", value, 2U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 60U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 68U)); + VerifyOrReturn(CheckValue("currentLevel", value, 66U)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); } break; - case 11: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentLevel", value, 66U)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + } break; - case 12: + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -14596,7 +15146,15 @@ class Test_TC_LVL_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, CurrentlevelValue)); } break; - case 14: + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentLevel", value, CurrentlevelValue)); + } + break; + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -14604,10 +15162,18 @@ class Test_TC_LVL_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, 2U)); } break; - case 15: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentLevel", value, 2U)); + } break; - case 16: + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -14652,109 +15218,178 @@ class Test_TC_LVL_5_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Reads Minlevel attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "Reads Minlevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Sends MoveToLevelWithOnOff command to DUT"); + case 5: { + LogStep(5, "Sends MoveToLevelWithOnOff command to DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = static_cast(MinlevelValue + 1); - value.transitionTime = 0U; + value.level = static_cast(MinlevelValue + 1); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, value, chip::NullOptional ); } - case 5: { - LogStep(5, "Sends MoveToLevelWithOnOff command to DUT"); + case 6: { + LogStep(6, "Sends MoveToLevelWithOnOff command to DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp && !LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 2U; - value.transitionTime = 0U; + value.level = 2U; + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, value, chip::NullOptional ); } - case 6: { - LogStep(6, "Reads current level attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } case 7: { LogStep(7, "Reads current level attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0000 && !LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("LVL.S.A0000 && LVL.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Sends step up command to DUT"); + LogStep(8, "Reads current level attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.A0000 && !LVL.S.A0002 && LVL.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, + chip::NullOptional); + } + case 9: { + LogStep(9, "Sends step up command to DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C02.Rsp && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Step::Type value; - value.stepMode = static_cast(0); - value.stepSize = 64U; - value.transitionTime = 20U; - value.optionMask = 1U; - value.optionOverride = 1U; + value.stepMode = static_cast(0); + value.stepSize = 64U; + value.transitionTime = 20U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Step::Id, value, chip::NullOptional ); } - case 9: { - LogStep(9, "Wait 4000ms"); + case 10: { + LogStep(10, "Sends step up command to DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C02.Rsp && !LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LevelControl::Commands::Step::Type value; + value.stepMode = static_cast(0); + value.stepSize = 64U; + value.transitionTime = 20U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Step::Id, value, + chip::NullOptional + + ); + } + case 11: { + LogStep(11, "Wait 2500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 4000UL; + value.ms = 2500UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Reads current level attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0000 && LVL.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 12: { + LogStep(12, "Reads current level attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.A0000 && LVL.S.C02.Rsp && LVL.S.M.VarRate"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Sends a StepWithOnOff command"); + case 13: { + LogStep(13, "Reads current level attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.A0000 && LVL.S.C02.Rsp && !LVL.S.M.VarRate"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, + chip::NullOptional); + } + case 14: { + LogStep(14, "Sends a StepWithOnOff command"); VerifyOrDo(!ShouldSkip("LVL.S.C06.Rsp && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Type value; - value.stepMode = static_cast(1); - value.stepSize = 64U; - value.transitionTime = 20U; + value.stepMode = static_cast(1); + value.stepSize = 64U; + value.transitionTime = 20U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::StepWithOnOff::Id, value, chip::NullOptional ); } - case 12: { - LogStep(12, "Wait 4000ms"); + case 15: { + LogStep(15, "Sends a StepWithOnOff command"); + VerifyOrDo(!ShouldSkip("LVL.S.C06.Rsp && !LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Type value; + value.stepMode = static_cast(1); + value.stepSize = 64U; + value.transitionTime = 20U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::StepWithOnOff::Id, value, + chip::NullOptional + + ); + } + case 16: { + LogStep(16, "Wait 2500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 4000UL; + value.ms = 2500UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "Reads current level attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 17: { + LogStep(17, "Reads current level attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Reads current level attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000 && !LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 18: { + LogStep(18, "Reads current level attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Precondition send Off Command"); + case 19: { + LogStep(19, "Reads current level attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000 && !LVL.S.A0002 && LVL.S.M.VarRate"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, + chip::NullOptional); + } + case 20: { + LogStep(20, "Reads current level attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000 && !LVL.S.A0002 && !LVL.S.M.VarRate"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, + chip::NullOptional); + } + case 21: { + LogStep(21, "Precondition send Off Command"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -14762,8 +15397,8 @@ class Test_TC_LVL_5_1Suite : public TestCommand ); } - case 16: { - LogStep(16, "Check on/off attribute value is false after off command"); + case 22: { + LogStep(22, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -14775,7 +15410,7 @@ class Test_TC_LVL_5_1Suite : public TestCommand class Test_TC_LVL_6_1Suite : public TestCommand { public: - Test_TC_LVL_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_6_1", 18, credsIssuerConfig) + Test_TC_LVL_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_6_1", 19, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -14827,20 +15462,23 @@ class Test_TC_LVL_6_1Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); MinlevelValue = value; } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -14850,58 +15488,58 @@ class Test_TC_LVL_6_1Suite : public TestCommand CurrentLevelValue = value; } break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 22U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 28U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 21U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 29U)); VerifyOrReturn(CheckConstraintNotValue("value", value, CurrentLevelValue)); } break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 45U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 55U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 43U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 57U)); VerifyOrReturn(CheckConstraintNotValue("value", value, CurrentLevelValue)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -14946,65 +15584,76 @@ class Test_TC_LVL_6_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Reads Minlevel attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "Reads Minlevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Sends MoveToLevelWithOnOff command to DUT"); + case 5: { + LogStep(5, "Sends MoveToLevelWithOnOff command to DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 1U; - value.transitionTime = 0U; + value.level = 1U; + value.transitionTime = 0U; + value.optionsMask = 1U; + value.optionsOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, value, chip::NullOptional ); } - case 5: { - LogStep(5, "Reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 6: { + LogStep(6, "Reads CurrentLevel attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.A0000 && LVL.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Sends a move up command to DUT"); + case 7: { + LogStep(7, "Sends a move up command to DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Move::Type value; - value.moveMode = static_cast(0); - value.rate = 5U; - value.optionMask = 1U; - value.optionOverride = 1U; + value.moveMode = static_cast(0); + value.rate = 5U; + value.optionsMask = 1U; + value.optionsOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Move::Id, value, chip::NullOptional ); } - case 7: { - LogStep(7, "Wait 5000ms"); + case 8: { + LogStep(8, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Sends stop command to DUT"); + case 9: { + LogStep(9, "Sends stop command to DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Stop::Type value; - value.optionMask = 1U; - value.optionOverride = 1U; + value.optionsMask = 1U; + value.optionsOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Stop::Id, value, chip::NullOptional ); } - case 9: { - LogStep(9, "Physically verify that the device has stopped transitioning"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 10: { + LogStep(10, "Physically verify that the device has stopped transitioning"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && LVL.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -15012,48 +15661,49 @@ class Test_TC_LVL_6_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Reads CurrentLevel attribute from DUT"); + case 11: { + LogStep(11, "Reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.C03.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Sends a move up command to DUT"); + case 12: { + LogStep(12, "Sends a move up command to DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Move::Type value; - value.moveMode = static_cast(0); - value.rate = 5U; - value.optionMask = 1U; - value.optionOverride = 1U; + value.moveMode = static_cast(0); + value.rate = 5U; + value.optionsMask = 1U; + value.optionsOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Move::Id, value, chip::NullOptional ); } - case 12: { - LogStep(12, "Wait 5000ms"); + case 13: { + LogStep(13, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "Sends stop command to DUT"); + case 14: { + LogStep(14, "Sends StopWithOnOff command to DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::Stop::Type value; - value.optionMask = 1U; - value.optionOverride = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Stop::Id, value, + chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Type value; + value.optionsMask = 1U; + value.optionsOverride = 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::StopWithOnOff::Id, value, chip::NullOptional ); } - case 14: { - LogStep(14, "Physically verify that the device has stopped transitioning"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 15: { + LogStep(15, "Physically verify that the device has stopped transitioning"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && LVL.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -15061,15 +15711,15 @@ class Test_TC_LVL_6_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 15: { - LogStep(15, "Reads CurrentLevel attribute from DUT"); + case 16: { + LogStep(16, "Reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.C07.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Precondition send Off Command"); + case 17: { + LogStep(17, "Precondition send Off Command"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -15077,8 +15727,8 @@ class Test_TC_LVL_6_1Suite : public TestCommand ); } - case 17: { - LogStep(17, "Check on/off attribute value is false after off command"); + case 18: { + LogStep(18, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -15134,7 +15784,7 @@ class Test_TC_LOWPOWER_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -15143,7 +15793,7 @@ class Test_TC_LOWPOWER_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -15165,7 +15815,7 @@ class Test_TC_LOWPOWER_1_1Suite : public TestCommand VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65533UL)); VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 5)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 4: @@ -15179,7 +15829,7 @@ class Test_TC_LOWPOWER_1_1Suite : public TestCommand VerifyOrReturn(CheckValue("acceptedCommandList[0]", iter_0.GetValue(), 0UL)); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 1)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 5: @@ -15191,7 +15841,7 @@ class Test_TC_LOWPOWER_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -15308,7 +15958,7 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -15316,7 +15966,7 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 7UL)); } @@ -15326,7 +15976,7 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); @@ -15339,7 +15989,7 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; @@ -15348,7 +15998,7 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; @@ -15468,7 +16118,7 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -15477,7 +16127,7 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 1UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -15486,7 +16136,7 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 4: @@ -15494,7 +16144,7 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); @@ -15507,7 +16157,7 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; @@ -15516,7 +16166,7 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; @@ -15525,7 +16175,7 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -15536,7 +16186,7 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; @@ -15585,7 +16235,6 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand } case 4: { LogStep(4, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("APPLAUNCHER.S.A0000 && APPLAUNCHER.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, ApplicationLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); } @@ -15674,7 +16323,7 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -15682,8 +16331,9 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 1UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 1UL)); } break; case 3: @@ -15691,7 +16341,7 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); @@ -15704,7 +16354,7 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; @@ -15713,7 +16363,7 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; @@ -15722,7 +16372,7 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -15738,7 +16388,7 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 8: @@ -15774,13 +16424,11 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand } case 2: { LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.NU"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { LogStep(3, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.A0000 && MEDIAINPUT.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::AttributeList::Id, true, chip::NullOptional); } @@ -15869,7 +16517,7 @@ class Test_TC_WAKEONLAN_1_5Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -15878,7 +16526,7 @@ class Test_TC_WAKEONLAN_1_5Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -15886,7 +16534,7 @@ class Test_TC_WAKEONLAN_1_5Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); @@ -15903,7 +16551,7 @@ class Test_TC_WAKEONLAN_1_5Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 5: @@ -15915,7 +16563,7 @@ class Test_TC_WAKEONLAN_1_5Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -15989,7 +16637,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand { public: Test_TC_CHANNEL_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CHANNEL_1_6", 12, credsIssuerConfig) + TestCommand("Test_TC_CHANNEL_1_6", 13, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -16032,7 +16680,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -16040,7 +16688,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3UL)); } @@ -16050,7 +16698,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); @@ -16063,7 +16711,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; @@ -16072,7 +16720,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; @@ -16081,7 +16729,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; @@ -16090,7 +16738,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; @@ -16099,7 +16747,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; @@ -16108,7 +16756,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; @@ -16117,11 +16765,23 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + } + break; + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -16160,8 +16820,6 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand } case 3: { LogStep(3, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.A0000 && CHANNEL.S.A0001 && CHANNEL.S.A0002"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AttributeList::Id, true, chip::NullOptional); } @@ -16203,12 +16861,18 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand } case 10: { LogStep(10, "Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip(" !CHANNEL.S.C01.Tx "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, + LogStep(11, "Read the global attribute: GeneratedCommandList"); + VerifyOrDo(!ShouldSkip("CHANNEL.S.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::GeneratedCommandList::Id, true, + chip::NullOptional); + } + case 12: { + LogStep(12, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -16270,7 +16934,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -16278,7 +16942,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3UL)); } @@ -16288,7 +16952,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); @@ -16302,7 +16966,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; @@ -16311,7 +16975,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; @@ -16320,7 +16984,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; @@ -16329,7 +16993,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; @@ -16338,7 +17002,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; @@ -16347,7 +17011,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; @@ -16356,7 +17020,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -16367,7 +17031,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; @@ -16376,7 +17040,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; @@ -16385,7 +17049,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; @@ -16394,7 +17058,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; @@ -16403,7 +17067,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; @@ -16412,7 +17076,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; @@ -16421,7 +17085,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); } break; @@ -16430,7 +17094,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); } break; @@ -16439,7 +17103,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; @@ -16642,7 +17306,7 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -16650,7 +17314,7 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3UL)); } @@ -16660,7 +17324,7 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); @@ -16675,7 +17339,7 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; @@ -16690,7 +17354,7 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand VerifyOrReturn(CheckValue("generatedCommandList[0]", iter_0.GetValue(), 1UL)); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 1)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -16702,7 +17366,7 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 7: @@ -16825,7 +17489,179 @@ class Test_TC_TGTNAV_1_9Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "read the global attribute: ClusterRevision"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, + TargetNavigator::Attributes::ClusterRevision::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Read the global attribute: FeatureMap"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Attributes::FeatureMap::Id, + true, chip::NullOptional); + } + case 3: { + LogStep(3, "Read the global attribute: AttributeList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, + TargetNavigator::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "Read the optional attribute(CurrentTarget) in AttributeList"); + VerifyOrDo(!ShouldSkip("TGTNAV.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, + TargetNavigator::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, + TargetNavigator::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, + TargetNavigator::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_APBSC_1_10Suite : public TestCommand +{ +public: + Test_TC_APBSC_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_APBSC_1_10", 10, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_APBSC_1_10Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -16834,7 +17670,7 @@ class Test_TC_TGTNAV_1_9Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -16842,9 +17678,12 @@ class Test_TC_TGTNAV_1_9Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); @@ -16857,184 +17696,29 @@ class Test_TC_TGTNAV_1_9Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, - TargetNavigator::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read the global attribute: FeatureMap"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("TGTNAV.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, - TargetNavigator::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip(" !TGTNAV.S.A0001 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, - TargetNavigator::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, - TargetNavigator::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, - TargetNavigator::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_APBSC_1_10Suite : public TestCommand -{ -public: - Test_TC_APBSC_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_APBSC_1_10", 7, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_APBSC_1_10Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); - } - break; - case 3: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 4: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -17043,10 +17727,10 @@ class Test_TC_APBSC_1_10Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 5: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -17055,10 +17739,10 @@ class Test_TC_APBSC_1_10Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 6: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -17096,23 +17780,39 @@ class Test_TC_APBSC_1_10Suite : public TestCommand } case 3: { LogStep(3, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("APBSC.S.A0000 && APBSC.S.A0001 && APBSC.S.A0003"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Read the global attribute: AcceptedCommandList"); + LogStep(4, "Read the optional attribute(VendorName) in AttributeList"); + VerifyOrDo(!ShouldSkip("APBSC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + ApplicationBasic::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Read the global attribute: GeneratedCommandList"); + LogStep(5, "Read the optional attribute(VendorID) in AttributeList"); + VerifyOrDo(!ShouldSkip("APBSC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + ApplicationBasic::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, + LogStep(6, "Read the optional attribute(ProductID) in AttributeList"); + VerifyOrDo(!ShouldSkip("APBSC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, + ApplicationBasic::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, + ApplicationBasic::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, + ApplicationBasic::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + case 9: { + LogStep(9, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -17174,7 +17874,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -17182,7 +17882,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3UL)); } @@ -17192,7 +17892,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); @@ -17205,7 +17905,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; @@ -17214,7 +17914,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; @@ -17223,7 +17923,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; @@ -17232,7 +17932,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; @@ -17241,7 +17941,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; @@ -17379,7 +18079,7 @@ class Test_TC_ALOGIN_1_12Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -17388,7 +18088,7 @@ class Test_TC_ALOGIN_1_12Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -17396,7 +18096,7 @@ class Test_TC_ALOGIN_1_12Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); @@ -17409,7 +18109,7 @@ class Test_TC_ALOGIN_1_12Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); @@ -17420,7 +18120,7 @@ class Test_TC_ALOGIN_1_12Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; @@ -18827,7 +19527,8 @@ class Test_TC_MEDIAINPUT_3_13Suite : public TestCommand } case 3: { LogStep(3, "TH reads the InputList attribute from the DUT to show list of Inputs available"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAINPUT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAINPUT.S.A0000 && MEDIAINPUT.S.C0003"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -18975,7 +19676,7 @@ class Test_TC_CHANNEL_5_2Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 2: @@ -19035,7 +19736,7 @@ class Test_TC_CHANNEL_5_2Suite : public TestCommand } case 3: { LogStep(3, "Verify that the channel has changed on the device"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CHANNEL.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( @@ -19112,7 +19813,7 @@ class Test_TC_CHANNEL_5_3Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 3: @@ -19136,7 +19837,7 @@ class Test_TC_CHANNEL_5_3Suite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "ChannelInfo", "ChannelInfo")); } break; default: @@ -19194,7 +19895,7 @@ class Test_TC_CHANNEL_5_3Suite : public TestCommand } case 5: { LogStep(5, "Verify that the channel has changed on the device"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CHANNEL.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( @@ -19355,7 +20056,7 @@ class Test_TC_MEDIAPLAYBACK_6_1Suite : public TestCommand } case 1: { LogStep(1, "Precondition: Media content in a paused state at the beginning of the content"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::Pause::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Pause::Id, value, @@ -19365,13 +20066,14 @@ class Test_TC_MEDIAPLAYBACK_6_1Suite : public TestCommand } case 2: { LogStep(2, "Reads the CurrentState attribute"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, true, chip::NullOptional); } case 3: { LogStep(3, "Sends a Play command"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::Play::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Play::Id, value, @@ -19381,7 +20083,7 @@ class Test_TC_MEDIAPLAYBACK_6_1Suite : public TestCommand } case 4: { LogStep(4, "Verify that the media state is playing"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = @@ -19392,13 +20094,14 @@ class Test_TC_MEDIAPLAYBACK_6_1Suite : public TestCommand } case 5: { LogStep(5, "Reads the CurrentState attribute"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C00.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, true, chip::NullOptional); } case 6: { LogStep(6, "sends a Pause command"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::Pause::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Pause::Id, value, @@ -19408,7 +20111,7 @@ class Test_TC_MEDIAPLAYBACK_6_1Suite : public TestCommand } case 7: { LogStep(7, "Verify that the media is paused"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = @@ -19419,12 +20122,14 @@ class Test_TC_MEDIAPLAYBACK_6_1Suite : public TestCommand } case 8: { LogStep(8, "Reads the CurrentState attribute"); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp && MEDIAPLAYBACK.S.A0000"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, true, chip::NullOptional); } case 9: { LogStep(9, "Sends a Stop command"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::StopPlayback::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::StopPlayback::Id, value, @@ -19434,7 +20139,7 @@ class Test_TC_MEDIAPLAYBACK_6_1Suite : public TestCommand } case 10: { LogStep(10, "Verify that the media is stoped"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = @@ -19445,7 +20150,8 @@ class Test_TC_MEDIAPLAYBACK_6_1Suite : public TestCommand } case 11: { LogStep(11, "Reads the CurrentState attribute"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C02.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, true, chip::NullOptional); } @@ -19631,7 +20337,7 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 1: { LogStep(1, "Precondition: Media content in a paused state at the beginning of the content"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::Pause::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Pause::Id, value, @@ -19641,13 +20347,14 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 2: { LogStep(2, "Reads the CurrentState attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, true, chip::NullOptional); } case 3: { LogStep(3, "Sends a Play command to the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::Play::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Play::Id, value, @@ -19657,7 +20364,7 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 4: { LogStep(4, "Verify that the media state is playing"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = @@ -19668,7 +20375,8 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 5: { LogStep(5, "Reads the CurrentState attribute"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C00.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, true, chip::NullOptional); } @@ -19684,7 +20392,7 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 7: { LogStep(7, "Verify that the media is started over"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = @@ -19705,7 +20413,7 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 9: { LogStep(9, "Verify that the next media item in the queue has been loaded"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( @@ -19726,7 +20434,7 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 11: { LogStep(11, "Verify that the previous media item in the queue has been loaded"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( @@ -19748,7 +20456,7 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 13: { LogStep(13, "Verify that the media has skipped forward 10 seconds"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( @@ -19759,7 +20467,8 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 14: { LogStep(14, "Reads the SampledPosition attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C08.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::SampledPosition::Id, true, chip::NullOptional); } @@ -19776,7 +20485,7 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 16: { LogStep(16, "Verify that the media has skipped backward 10 seconds"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( @@ -19787,7 +20496,8 @@ class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand } case 17: { LogStep(17, "Reads the SampledPosition attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C09.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::SampledPosition::Id, true, chip::NullOptional); } @@ -19915,7 +20625,7 @@ class Test_TC_MEDIAPLAYBACK_6_3Suite : public TestCommand } case 1: { LogStep(1, "Precondition: Media content in a paused state at the beginning of the content"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::Pause::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Pause::Id, value, @@ -19936,7 +20646,7 @@ class Test_TC_MEDIAPLAYBACK_6_3Suite : public TestCommand } case 3: { LogStep(3, "Verify that the media has moved to 10 seconds from the starting point"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C0B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( @@ -19947,7 +20657,8 @@ class Test_TC_MEDIAPLAYBACK_6_3Suite : public TestCommand } case 4: { LogStep(4, "Reads the SampledPosition attribute"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C0B.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::SampledPosition::Id, true, chip::NullOptional); } @@ -20192,7 +20903,7 @@ class Test_TC_MEDIAPLAYBACK_6_4Suite : public TestCommand } case 1: { LogStep(1, "Precondition: Media content in a paused state at the beginning of the content"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::Pause::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Pause::Id, value, @@ -20202,7 +20913,8 @@ class Test_TC_MEDIAPLAYBACK_6_4Suite : public TestCommand } case 2: { LogStep(2, "Reads the CurrentState attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, true, chip::NullOptional); } @@ -20224,13 +20936,15 @@ class Test_TC_MEDIAPLAYBACK_6_4Suite : public TestCommand } case 5: { LogStep(5, "Reads the CurrentState attribute"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C07.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, true, chip::NullOptional); } case 6: { LogStep(6, "Reads the PlaybackSpeed attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C07.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, true, chip::NullOptional); } @@ -20246,7 +20960,8 @@ class Test_TC_MEDIAPLAYBACK_6_4Suite : public TestCommand } case 8: { LogStep(8, "Reads the PlaybackSpeed attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C07.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, true, chip::NullOptional); } @@ -20262,17 +20977,18 @@ class Test_TC_MEDIAPLAYBACK_6_4Suite : public TestCommand } case 10: { LogStep(10, "Reads the CurrentState attribute"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C06.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, true, chip::NullOptional); } case 11: { LogStep(11, "Reads the PlaybackSpeed attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = - chip::Span("Please enter 'y' if PlaybackSpeed value is -2garbage: not in length on purpose", 45); + chip::Span("Please enter 'y' if PlaybackSpeed value is -1garbage: not in length on purpose", 45); value.expectedValue.Emplace(); value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); @@ -20300,7 +21016,7 @@ class Test_TC_MEDIAPLAYBACK_6_4Suite : public TestCommand } case 14: { LogStep(14, "Sends a Play command"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::Play::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Play::Id, value, @@ -20310,7 +21026,8 @@ class Test_TC_MEDIAPLAYBACK_6_4Suite : public TestCommand } case 15: { LogStep(15, "Reads the PlaybackSpeed attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C00.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, true, chip::NullOptional); } @@ -20385,7 +21102,7 @@ class Test_TC_AUDIOOUTPUT_7_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "OutPutInfo")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 2: @@ -20497,7 +21214,7 @@ class Test_TC_AUDIOOUTPUT_7_2Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "OutPutInfo")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); audioOutputListValues = value; } break; @@ -20616,7 +21333,7 @@ class Test_TC_TGTNAV_8_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -20626,7 +21343,7 @@ class Test_TC_TGTNAV_8_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); TargetListValues = value; } break; @@ -20692,7 +21409,7 @@ class Test_TC_TGTNAV_8_1Suite : public TestCommand } case 4: { LogStep(4, "Reads the CurrentTarget attribute"); - VerifyOrDo(!ShouldSkip("TGTNAV.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TGTNAV.S.A0001 && TGTNAV.S.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Attributes::CurrentTarget::Id, true, chip::NullOptional); } @@ -20725,7 +21442,7 @@ class Test_TC_APBSC_9_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - uint16_t vendorID; + chip::VendorId vendorID; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -20748,16 +21465,16 @@ class Test_TC_APBSC_9_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::VendorId value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "vendor-id")); + VerifyOrReturn(CheckConstraintType("value", "vendor_id", "vendor_id")); vendorID = value; } break; @@ -20766,7 +21483,7 @@ class Test_TC_APBSC_9_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 256)); } break; @@ -20775,7 +21492,7 @@ class Test_TC_APBSC_9_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -20785,7 +21502,7 @@ class Test_TC_APBSC_9_1Suite : public TestCommand { chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "struct")); + VerifyOrReturn(CheckConstraintType("value", "ApplicationBasicApplication", "ApplicationBasicApplication")); } break; case 6: @@ -20802,7 +21519,7 @@ class Test_TC_APBSC_9_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); } break; @@ -20811,7 +21528,7 @@ class Test_TC_APBSC_9_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; default: @@ -20935,7 +21652,7 @@ class Test_TC_CONTENTLAUNCHER_10_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 2: @@ -20943,7 +21660,7 @@ class Test_TC_CONTENTLAUNCHER_10_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; default: @@ -21031,7 +21748,7 @@ class Test_TC_MOD_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -21040,7 +21757,7 @@ class Test_TC_MOD_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 1UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -21049,7 +21766,7 @@ class Test_TC_MOD_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 4: @@ -21057,7 +21774,7 @@ class Test_TC_MOD_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -21074,7 +21791,7 @@ class Test_TC_MOD_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; @@ -21083,7 +21800,7 @@ class Test_TC_MOD_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; @@ -21092,7 +21809,7 @@ class Test_TC_MOD_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; @@ -21105,7 +21822,7 @@ class Test_TC_MOD_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 9: @@ -21502,7 +22219,7 @@ class Test_TC_OCC_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -21511,7 +22228,7 @@ class Test_TC_OCC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -21519,7 +22236,7 @@ class Test_TC_OCC_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -21539,7 +22256,7 @@ class Test_TC_OCC_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 5: @@ -21551,7 +22268,7 @@ class Test_TC_OCC_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -21581,7 +22298,7 @@ class Test_TC_OCC_1_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "read the global attribute: ClusterRevision"); + LogStep(1, "Read the global attribute: ClusterRevision"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::ClusterRevision::Id, true, chip::NullOptional); } @@ -21666,7 +22383,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); } @@ -21676,7 +22393,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } @@ -21686,7 +22403,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 273U)); } @@ -21697,7 +22414,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("pirOccupiedToUnoccupiedDelay", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -21708,7 +22425,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("pirUnoccupiedToOccupiedDelay", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -21719,7 +22436,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("pirUnoccupiedToOccupiedThreshold", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } @@ -21730,7 +22447,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("ultrasonicOccupiedToUnoccupiedDelay", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -21741,7 +22458,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("ultrasonicUnoccupiedToOccupiedDelay", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -21752,7 +22469,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("ultrasonicUnoccupiedToOccupiedThreshold", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } @@ -21763,7 +22480,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("physicalContactOccupiedToUnoccupiedDelay", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -21774,7 +22491,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("physicalContactUnoccupiedToOccupiedDelay", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -21785,7 +22502,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("physicalContactUnoccupiedToOccupiedThreshold", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } @@ -21939,7 +22656,7 @@ class Test_TC_OO_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 4U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -21948,7 +22665,7 @@ class Test_TC_OO_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 1UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -21957,7 +22674,7 @@ class Test_TC_OO_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 4: @@ -21965,12 +22682,8 @@ class Test_TC_OO_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16384UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16385UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16386UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16387UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); @@ -21983,13 +22696,11 @@ class Test_TC_OO_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16384UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 16385UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 16386UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 16387UL)); } break; case 6: @@ -21997,13 +22708,10 @@ class Test_TC_OO_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 64UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 66UL)); } break; case 7: @@ -22011,10 +22719,10 @@ class Test_TC_OO_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 64UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 66UL)); } break; case 8: @@ -22026,7 +22734,7 @@ class Test_TC_OO_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 9: @@ -22074,25 +22782,23 @@ class Test_TC_OO_1_1Suite : public TestCommand } case 4: { LogStep(4, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("OO.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip(" !OO.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Read the feature dependent(OO.S.F00) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("OO.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { LogStep(6, "Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("OO.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip(" !OO.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Read the feature dependent(OO.S.F00) commands in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("OO.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } @@ -22162,7 +22868,7 @@ class Test_TC_OO_2_1Suite : public TestCommand { bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; case 2: @@ -22170,7 +22876,7 @@ class Test_TC_OO_2_1Suite : public TestCommand { bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; case 3: @@ -22178,7 +22884,7 @@ class Test_TC_OO_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -22188,7 +22894,7 @@ class Test_TC_OO_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -22198,7 +22904,7 @@ class Test_TC_OO_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); } break; default: @@ -22224,30 +22930,30 @@ class Test_TC_OO_2_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "read the mandatory attribute: OnOff"); + LogStep(1, "Read the mandatory attribute: OnOff"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "read LT attribute: GlobalSceneControl"); + LogStep(2, "Read LT attribute: GlobalSceneControl"); VerifyOrDo(!ShouldSkip("OO.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "read LT attribute: OnTime"); + LogStep(3, "Read LT attribute: OnTime"); VerifyOrDo(!ShouldSkip("OO.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "read LT attribute: OffWaitTime"); + LogStep(4, "Read LT attribute: OffWaitTime"); VerifyOrDo(!ShouldSkip("OO.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "read LT attribute: StartUpOnOff"); + LogStep(5, "Read LT attribute: StartUpOnOff"); VerifyOrDo(!ShouldSkip("OO.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::StartUpOnOff::Id, true, chip::NullOptional); @@ -22553,7 +23259,8 @@ class Test_TC_OO_2_2Suite : public TestCommand } case 17: { LogStep(17, "Operate on device to set OnOff attribute manually to on"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && OO.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && OO.M.ManuallyControlled && OO.S.A0000"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -22563,12 +23270,14 @@ class Test_TC_OO_2_2Suite : public TestCommand } case 18: { LogStep(18, "Check on/off attribute value is true after on command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && OO.S.A0000 && OO.M.ManuallyControlled"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 19: { LogStep(19, "Operate on device to set OnOff attribute manually to off"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && OO.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && OO.M.ManuallyControlled && OO.S.A0000"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -22578,7 +23287,8 @@ class Test_TC_OO_2_2Suite : public TestCommand } case 20: { LogStep(20, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && OO.S.A0000 && OO.M.ManuallyControlled"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 21: { @@ -23088,7 +23798,7 @@ class Test_TC_PS_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -23096,9 +23806,9 @@ class Test_TC_PS_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 15UL)); } break; case 3: @@ -23106,7 +23816,7 @@ class Test_TC_PS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -23122,7 +23832,7 @@ class Test_TC_PS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; @@ -23131,7 +23841,7 @@ class Test_TC_PS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 14UL)); VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); @@ -23142,7 +23852,7 @@ class Test_TC_PS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 26UL)); VerifyOrReturn(CheckConstraintContains("value", value, 28UL)); } @@ -23152,7 +23862,7 @@ class Test_TC_PS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); VerifyOrReturn(CheckConstraintContains("value", value, 25UL)); } @@ -23166,7 +23876,7 @@ class Test_TC_PS_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 9: @@ -23178,7 +23888,7 @@ class Test_TC_PS_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 10: @@ -23224,25 +23934,25 @@ class Test_TC_PS_1_1Suite : public TestCommand chip::NullOptional); } case 4: { - LogStep(4, "Read the Feature related(PS.S.F00-WIRED) attribute in AttributeList"); + LogStep(4, "Read the Feature dependent(PS.S.F00-WIRED) attribute in AttributeList"); VerifyOrDo(!ShouldSkip("PS.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Read the Feature related(PS.S.F01-BAT) attribute in AttributeList"); + LogStep(5, "Read the Feature dependent(PS.S.F01-BAT) attribute in AttributeList"); VerifyOrDo(!ShouldSkip("PS.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Read the Feature related(PS.S.F02-RECHG) attribute in AttributeList"); + LogStep(6, "Read the Feature dependent(PS.S.F02-RECHG) attribute in AttributeList"); VerifyOrDo(!ShouldSkip("PS.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Read the Feature related(PS.S.F03-REPLC) attribute in AttributeList"); + LogStep(7, "Read the Feature dependent(PS.S.F03-REPLC) attribute in AttributeList"); VerifyOrDo(!ShouldSkip("PS.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::AttributeList::Id, true, chip::NullOptional); @@ -23318,7 +24028,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::Clusters::PowerSource::PowerSourceStatus value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } @@ -23328,7 +24038,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -23338,7 +24048,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); } break; case 4: @@ -23346,7 +24056,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -23356,7 +24066,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -23366,7 +24076,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::Clusters::PowerSource::WiredCurrentType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); } @@ -23376,7 +24086,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -23386,7 +24096,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -23396,7 +24106,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -23406,7 +24116,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; case 11: @@ -23414,7 +24124,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 8)); } break; @@ -23423,7 +24133,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -23433,7 +24143,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 200U)); } @@ -23443,7 +24153,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -23453,7 +24163,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::Clusters::PowerSource::BatChargeLevel value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); } @@ -23463,7 +24173,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; case 17: @@ -23471,7 +24181,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::Clusters::PowerSource::BatReplaceability value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } @@ -23481,7 +24191,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; case 19: @@ -23489,7 +24199,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 8)); } break; @@ -23498,7 +24208,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 60)); } break; @@ -23507,7 +24217,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 80UL)); } @@ -23517,7 +24227,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 20)); } break; @@ -23526,7 +24236,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 20)); } break; @@ -23535,7 +24245,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32UL)); } @@ -23545,7 +24255,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -23555,7 +24265,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -23565,7 +24275,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::Clusters::PowerSource::BatChargeState value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } @@ -23575,7 +24285,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -23585,7 +24295,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; case 30: @@ -23593,7 +24303,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -23603,7 +24313,7 @@ class Test_TC_PS_2_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; default: @@ -23865,7 +24575,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -23874,7 +24584,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 1UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -23883,7 +24593,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 4: @@ -23891,7 +24601,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -23907,7 +24617,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); } break; @@ -23916,7 +24626,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); } break; @@ -23925,7 +24635,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); } break; @@ -23934,7 +24644,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); } break; @@ -23943,7 +24653,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; @@ -23952,7 +24662,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); } break; @@ -23965,7 +24675,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 12: @@ -23977,7 +24687,7 @@ class Test_TC_PRS_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 13: @@ -24135,7 +24845,7 @@ class Test_TC_PRS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -24145,7 +24855,7 @@ class Test_TC_PRS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -24155,7 +24865,7 @@ class Test_TC_PRS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -24165,7 +24875,7 @@ class Test_TC_PRS_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); } @@ -24175,7 +24885,7 @@ class Test_TC_PRS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -24185,7 +24895,7 @@ class Test_TC_PRS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -24195,7 +24905,7 @@ class Test_TC_PRS_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -24205,7 +24915,7 @@ class Test_TC_PRS_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); } @@ -24215,7 +24925,7 @@ class Test_TC_PRS_2_1Suite : public TestCommand { int8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int8")); + VerifyOrReturn(CheckConstraintType("value", "int8s", "int8s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -127)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 127)); } @@ -24304,7 +25014,7 @@ class Test_TC_PRS_2_1Suite : public TestCommand class Test_TC_PCC_1_1Suite : public TestCommand { public: - Test_TC_PCC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_1_1", 7, credsIssuerConfig) + Test_TC_PCC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_1_1", 23, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -24347,7 +25057,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -24356,7 +25066,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -24364,7 +25074,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -24380,6 +25090,150 @@ class Test_TC_PCC_1_1Suite : public TestCommand } break; case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); + } + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); + } + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); + } + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); + } + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 21UL)); + } + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 22UL)); + } + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 23UL)); + } + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 33UL)); + } + break; + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24388,10 +25242,10 @@ class Test_TC_PCC_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 5: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24400,10 +25254,10 @@ class Test_TC_PCC_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 6: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -24445,17 +25299,113 @@ class Test_TC_PCC_1_1Suite : public TestCommand PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "TH reads the AcceptedCommandList attribute from the DUT"); + LogStep(4, "TH reads optional attribute(MinConstPressure) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "TH reads the GeneratedCommandList attribute from the DUT"); + LogStep(5, "TH reads optional attribute(MaxConstPressure) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "TH reads the EventList attribute from the DUT"); + LogStep(6, "TH reads optional attribute(MinCompPressure) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "TH reads optional attribute(MaxCompPressure) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "TH reads optional attribute(MinConstSpeed) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 9: { + LogStep(9, "TH reads optional attribute(MaxConstSpeed) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 10: { + LogStep(10, "TH reads optional attribute(MinConstFlow) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 11: { + LogStep(11, "TH reads optional attribute(MaxConstFlow) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 12: { + LogStep(12, "TH reads optional attribute(MinConstTemp) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 13: { + LogStep(13, "TH reads optional attribute(MaxConstTemp) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 14: { + LogStep(14, "TH reads optional attribute(PumpStatus) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 15: { + LogStep(15, "TH reads optional attribute(Speed) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 16: { + LogStep(16, "TH reads optional attribute(LifetimeRunningHours) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 17: { + LogStep(17, "TH reads optional attribute(Power) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 18: { + LogStep(18, "TH reads optional attribute(LifetimeEnergyConsumed) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 19: { + LogStep(19, "TH reads optional attribute(ControlMode) attribute in AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 20: { + LogStep(20, "TH reads the AcceptedCommandList attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 21: { + LogStep(21, "TH reads the GeneratedCommandList attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + case 22: { + LogStep(22, "TH reads the EventList attribute from the DUT"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -24514,7 +25464,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -24524,7 +25474,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -24534,161 +25484,117 @@ class Test_TC_PCC_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; case 4: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; case 5: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; case 6: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; case 7: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; case 8: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; case 9: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; case 10: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; case 11: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; case 12: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; case 13: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; case 14: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map16")); + VerifyOrReturn(CheckConstraintType("value", "bitmap16", "bitmap16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 8U)); } @@ -24698,7 +25604,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand { chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } @@ -24708,7 +25614,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand { chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); } @@ -24718,63 +25624,47 @@ class Test_TC_PCC_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; case 18: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; case 19: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint24")); + VerifyOrReturn(CheckConstraintType("value", "int24u", "int24u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 16777215UL)); } break; case 20: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint24")); + VerifyOrReturn(CheckConstraintType("value", "int24u", "int24u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 16777215UL)); } break; case 21: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -24784,21 +25674,17 @@ class Test_TC_PCC_2_1Suite : public TestCommand { chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; case 23: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); } @@ -24971,7 +25857,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand class Test_TC_PCC_2_2Suite : public TestCommand { public: - Test_TC_PCC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_2_2", 7, credsIssuerConfig) + Test_TC_PCC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_2_2", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -25016,7 +25902,7 @@ class Test_TC_PCC_2_2Suite : public TestCommand { chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveOperationMode", value, 1U)); + VerifyOrReturn(CheckValue("effectiveOperationMode", value, 0U)); } break; case 3: @@ -25027,13 +25913,24 @@ class Test_TC_PCC_2_2Suite : public TestCommand { chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveOperationMode", value, 2U)); + VerifyOrReturn(CheckValue("effectiveOperationMode", value, 1U)); } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("effectiveOperationMode", value, 2U)); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; @@ -25064,39 +25961,55 @@ class Test_TC_PCC_2_2Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Write 1 to the OperationMode attribute to DUT: OperationMode"); + LogStep(1, "TH write 0 (Normal) to the OperationMode attribute to DUT"); VerifyOrDo(!ShouldSkip("PCC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; - value = static_cast(1); + value = static_cast(0); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::OperationMode::Id, value, chip::NullOptional, chip::NullOptional); } case 2: { - LogStep(2, "Reads the attribute: EffectiveOperationMode"); + LogStep(2, "TH reads from the DUT the EffectiveOperationMode attribute"); VerifyOrDo(!ShouldSkip("PCC.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Write 2 to the OperationMode attribute to DUT: OperationMode"); - VerifyOrDo(!ShouldSkip("PCC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "TH write 1 (Minimum) to the OperationMode attribute to DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0020 && PCC.M.ControlModeConstSpeed"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; - value = static_cast(2); + value = static_cast(1); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::OperationMode::Id, value, chip::NullOptional, chip::NullOptional); } case 4: { - LogStep(4, "Reads the attribute: EffectiveOperationMode"); - VerifyOrDo(!ShouldSkip("PCC.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "TH reads from the DUT the EffectiveOperationMode attribute"); + VerifyOrDo(!ShouldSkip("PCC.S.A0011 && PCC.M.ControlModeConstSpeed"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Write 3 to the OperationMode attribute to DUT: OperationMode"); + LogStep(5, "TH write 2 (Maximum) to the OperationMode attribute to DUT one at a time."); + VerifyOrDo(!ShouldSkip("PCC.S.A0020 && PCC.M.ControlModeConstSpeed"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; + value = static_cast(2); + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::OperationMode::Id, value, chip::NullOptional, + chip::NullOptional); + } + case 6: { + LogStep(6, "TH reads from the DUT the EffectiveOperationMode attribute"); + VerifyOrDo(!ShouldSkip("PCC.S.A0011 && PCC.M.ControlModeConstSpeed"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "TH write 3 (Local) to the OperationMode attribute to DUT"); VerifyOrDo(!ShouldSkip("PCC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; @@ -25105,8 +26018,8 @@ class Test_TC_PCC_2_2Suite : public TestCommand PumpConfigurationAndControl::Attributes::OperationMode::Id, value, chip::NullOptional, chip::NullOptional); } - case 6: { - LogStep(6, "Reads the attribute: EffectiveOperationMode"); + case 8: { + LogStep(8, "TH reads from the DUT the EffectiveOperationMode attribute"); VerifyOrDo(!ShouldSkip("PCC.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id, true, chip::NullOptional); @@ -25661,7 +26574,7 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -25670,7 +26583,7 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -25678,7 +26591,7 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); @@ -25696,7 +26609,7 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 5: @@ -25708,7 +26621,7 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -25824,7 +26737,7 @@ class Test_TC_RH_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -25833,7 +26746,7 @@ class Test_TC_RH_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -25841,7 +26754,7 @@ class Test_TC_RH_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -25861,7 +26774,7 @@ class Test_TC_RH_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 5: @@ -25873,7 +26786,7 @@ class Test_TC_RH_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -25988,7 +26901,7 @@ class Test_TC_RH_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -25998,7 +26911,7 @@ class Test_TC_RH_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); } @@ -26008,7 +26921,7 @@ class Test_TC_RH_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -26018,7 +26931,7 @@ class Test_TC_RH_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); } @@ -26059,6 +26972,7 @@ class Test_TC_RH_2_1Suite : public TestCommand } case 3: { LogStep(3, "Reads constraints of attribute: MaxMeasuredValue"); + VerifyOrDo(!ShouldSkip("RH.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); } @@ -26076,7 +26990,7 @@ class Test_TC_RH_2_1Suite : public TestCommand class Test_TC_SC_4_2Suite : public TestCommand { public: - Test_TC_SC_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_2", 46, credsIssuerConfig) + Test_TC_SC_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_2", 47, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -26344,8 +27258,12 @@ class Test_TC_SC_4_2Suite : public TestCommand break; case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26358,7 +27276,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26370,7 +27288,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26382,7 +27300,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26390,7 +27308,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26398,7 +27316,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26406,7 +27324,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26414,7 +27332,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26422,7 +27340,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26431,7 +27349,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 34: + case 35: if (IsUnsupported(status.mStatus)) { shouldContinue = true; @@ -26445,7 +27363,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26458,7 +27376,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 36: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26471,7 +27389,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 37: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26480,7 +27398,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 38: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26490,7 +27408,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 39: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26499,7 +27417,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 40: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26508,7 +27426,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 41: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26517,7 +27435,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 42: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26526,7 +27444,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 43: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26535,11 +27453,11 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 44: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 45: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -26586,14 +27504,15 @@ class Test_TC_SC_4_2Suite : public TestCommand } case 3: { LogStep(3, "Check Hostname"); - VerifyOrDo(!ShouldSkip("(WIFI || ETH) && !THREAD"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("( MCORE.SC.WIFI || MCORE.SC.ETH ) && !MCORE.SC.THR"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 4: { LogStep(4, "Check Hostname"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && (!WIFI && !ETH) && THREAD"), + VerifyOrDo(!ShouldSkip("( !MCORE.SC.WIFI && !MCORE.SC.ETH ) && MCORE.SC.THR "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; @@ -26615,7 +27534,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } case 7: { LogStep(7, "Check Vendor ID (_V)"); - VerifyOrDo(!ShouldSkip("VENDOR_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MCORE.SC.VENDOR_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByVendorId::Type value; value.value = mVendorId.HasValue() ? mVendorId.Value() : 65521ULL; @@ -26623,7 +27542,8 @@ class Test_TC_SC_4_2Suite : public TestCommand } case 8: { LogStep(8, "Check Device Type ID (_T)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DEVTYPE_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && MCORE.SC.DEVTYPE_SUBTYPE"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByDeviceType::Type value; value.value = mDeviceType.HasValue() ? mDeviceType.Value() : 5ULL; @@ -26637,28 +27557,28 @@ class Test_TC_SC_4_2Suite : public TestCommand } case 10: { LogStep(10, "TXT key for Vendor ID and Product ID (VP)"); - VerifyOrDo(!ShouldSkip("VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MCORE.SC.VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 11: { LogStep(11, "TXT key for Vendor ID and Product ID (VP)"); - VerifyOrDo(!ShouldSkip("VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MCORE.SC.VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 12: { LogStep(12, "Optional TXT key for MRP Retry Interval Idle (CRI)"); - VerifyOrDo(!ShouldSkip("CRI_COMM_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MCORE.SC.SII_OP_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 13: { LogStep(13, "Optional TXT key for MRP Retry Interval Active (CRA)"); - VerifyOrDo(!ShouldSkip("CRA_COMM_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MCORE.SC.SAI_OP_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); @@ -26671,35 +27591,35 @@ class Test_TC_SC_4_2Suite : public TestCommand } case 15: { LogStep(15, "Optional TXT key for device type (DT)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DT_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && MCORE.SC.DT_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 16: { LogStep(16, "Optional TXT key for device name (DN)"); - VerifyOrDo(!ShouldSkip("DN_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MCORE.SC.DN_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 17: { LogStep(17, "Optional TXT key for rotating device identifier (RI)"); - VerifyOrDo(!ShouldSkip("RI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MCORE.SC.RI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 18: { LogStep(18, "Optional TXT key for pairing hint (PH)"); - VerifyOrDo(!ShouldSkip("PH_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MCORE.SC.PH_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 19: { LogStep(19, "Optional TXT key for pairing instructions (PI)"); - VerifyOrDo(!ShouldSkip("PI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MCORE.SC.PI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); @@ -26712,12 +27632,14 @@ class Test_TC_SC_4_2Suite : public TestCommand } case 21: { LogStep(21, "Stop target device"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::SystemCommands::Commands::Stop::Type value; return Stop(kIdentityAlpha, value); } case 22: { LogStep(22, "Start target device with the provided discriminator for basic commissioning advertisement"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::SystemCommands::Commands::Start::Type value; value.discriminator.Emplace(); @@ -26725,14 +27647,25 @@ class Test_TC_SC_4_2Suite : public TestCommand return Start(kIdentityAlpha, value); } case 23: { - LogStep(23, "Wait for the commissioned device to be retrieved"); + LogStep(23, "TH is rebooted"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Please reboot the TH and enter 'y' after TH startsgarbage: not in length on purpose", 50); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 24: { + LogStep(24, "Wait for the commissioned device to be retrieved"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } - case 24: { - LogStep(24, "Open Commissioning Window"); + case 25: { + LogStep(25, "Open Commissioning Window"); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -26742,140 +27675,142 @@ class Test_TC_SC_4_2Suite : public TestCommand ); } - case 25: { - LogStep(25, "Check Instance Name"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } case 26: { - LogStep(26, "Check Hostname"); - VerifyOrDo(!ShouldSkip("(WIFI || ETH) && !THREAD"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Check Instance Name"); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 27: { LogStep(27, "Check Hostname"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && (!WIFI && !ETH) && THREAD"), + VerifyOrDo(!ShouldSkip("( MCORE.SC.WIFI || MCORE.SC.ETH ) && !MCORE.SC.THR "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 28: { - LogStep(28, "Check Long Discriminator _L"); + LogStep(28, "Check Hostname"); + VerifyOrDo(!ShouldSkip("( !MCORE.SC.WIFI && !MCORE.SC.ETH ) && MCORE.SC.THR"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); + } + case 29: { + LogStep(29, "Check Long Discriminator _L"); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByLongDiscriminator::Type value; value.value = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840ULL; return FindCommissionableByLongDiscriminator(kIdentityAlpha, value); } - case 29: { - LogStep(29, "Check Short Discriminator (_S)"); + case 30: { + LogStep(30, "Check Short Discriminator (_S)"); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByShortDiscriminator::Type value; value.value = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840ULL; return FindCommissionableByShortDiscriminator(kIdentityAlpha, value); } - case 30: { - LogStep(30, "Check Vendor ID (_V)"); - VerifyOrDo(!ShouldSkip("VENDOR_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 31: { + LogStep(31, "Check Vendor ID (_V)"); + VerifyOrDo(!ShouldSkip("MCORE.SC.VENDOR_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByVendorId::Type value; value.value = mVendorId.HasValue() ? mVendorId.Value() : 65521ULL; return FindCommissionableByVendorId(kIdentityAlpha, value); } - case 31: { - LogStep(31, "Check Device Type ID (_T)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DEVTYPE_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 32: { + LogStep(32, "Check Device Type ID (_T)"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && MCORE.SC.DEVTYPE_SUBTYPE"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByDeviceType::Type value; value.value = mDeviceType.HasValue() ? mDeviceType.Value() : 5ULL; return FindCommissionableByDeviceType(kIdentityAlpha, value); } - case 32: { - LogStep(32, "Check Commissioning Mode (_CM)"); + case 33: { + LogStep(33, "Check Commissioning Mode (_CM)"); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByCommissioningMode::Type value; return FindCommissionableByCommissioningMode(kIdentityAlpha, value); } - case 33: { - LogStep(33, "TXT key for Vendor ID and Product ID (VP)"); - VerifyOrDo(!ShouldSkip("VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } case 34: { LogStep(34, "TXT key for Vendor ID and Product ID (VP)"); - VerifyOrDo(!ShouldSkip("VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MCORE.SC.VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 35: { - LogStep(35, "Optional TXT key for MRP Retry Interval Idle (CRI)"); - VerifyOrDo(!ShouldSkip("CRI_COMM_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(35, "TXT key for Vendor ID and Product ID (VP)"); + VerifyOrDo(!ShouldSkip("MCORE.SC.VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 36: { - LogStep(36, "Optional TXT key for MRP Retry Interval Active (CRA)"); - VerifyOrDo(!ShouldSkip("CRA_COMM_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(36, "Optional TXT key for MRP Retry Interval Idle (CRI)"); + VerifyOrDo(!ShouldSkip("MCORE.SC.SII_OP_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 37: { - LogStep(37, "TXT key for commissioning mode (CM)"); + LogStep(37, "Optional TXT key for MRP Retry Interval Active (CRA)"); + VerifyOrDo(!ShouldSkip("MCORE.SC.SAI_OP_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 38: { - LogStep(38, "Optional TXT key for device type (DT)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DT_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(38, "TXT key for commissioning mode (CM)"); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 39: { - LogStep(39, "Optional TXT key for device name (DN)"); - VerifyOrDo(!ShouldSkip("DN_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(39, "Optional TXT key for device type (DT)"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && MCORE.SC.DT_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 40: { - LogStep(40, "Optional TXT key for rotating device identifier (RI)"); - VerifyOrDo(!ShouldSkip("RI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(40, "Optional TXT key for device name (DN)"); + VerifyOrDo(!ShouldSkip("MCORE.SC.DN_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 41: { - LogStep(41, "Optional TXT key for pairing hint (PH)"); - VerifyOrDo(!ShouldSkip("PH_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(41, "Optional TXT key for rotating device identifier (RI)"); + VerifyOrDo(!ShouldSkip("MCORE.SC.RI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 42: { - LogStep(42, "Optional TXT key for pairing instructions (PI)"); - VerifyOrDo(!ShouldSkip("PI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(42, "Optional TXT key for pairing hint (PH)"); + VerifyOrDo(!ShouldSkip("MCORE.SC.PH_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 43: { - LogStep(43, "Check IPs"); + LogStep(43, "Optional TXT key for pairing instructions (PI)"); + VerifyOrDo(!ShouldSkip("MCORE.SC.PI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 44: { - LogStep(44, "TH adds an unknown key/value pair in the advertised data"); + LogStep(44, "Check IPs"); + ListFreer listFreer; + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); + } + case 45: { + LogStep(45, "TH adds an unknown key/value pair in the advertised data"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -26886,8 +27821,261 @@ class Test_TC_SC_4_2Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 45: { - LogStep(45, "Scan for DNS-SD commissioner advertisements from TH"); + case 46: { + LogStep(46, "Scan for DNS-SD commissioner advertisements from TH"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_SWTCH_1_1Suite : public TestCommand +{ +public: + Test_TC_SWTCH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_1_1", 13, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_SWTCH_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + uint32_t FeatureMapValue; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + FeatureMapValue = value; + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, FeatureMapValue)); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read the global attribute: FeatureMap"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, + chip::NullOptional); + } + case 2: { + LogStep(2, "Read the FeatureMap value and verify LS is set to 1; MS, MSR, MSL, MSM are all set to 0"); + VerifyOrDo(!ShouldSkip("SWTCH.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "Check values of flags in this FeatureMap"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 4: { + LogStep(4, "Check values of flags in this FeatureMap"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 5: { + LogStep(5, "Check values of flags in this FeatureMap"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 6: { + LogStep(6, "Check values of flags in this FeatureMap"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 7: { + LogStep(7, "read the global attribute: ClusterRevision"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::ClusterRevision::Id, true, + chip::NullOptional); + } + case 8: { + LogStep(8, "Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 9: { + LogStep(9, "Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 10: { + LogStep(10, "Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AcceptedCommandList::Id, true, + chip::NullOptional); + } + case 11: { + LogStep(11, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::GeneratedCommandList::Id, true, + chip::NullOptional); + } + case 12: { + LogStep(12, + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -26947,7 +28135,7 @@ class Test_TC_SWTCH_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("numberOfPositions", value, 2U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 2U)); } break; @@ -26957,7 +28145,7 @@ class Test_TC_SWTCH_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("currentPosition", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -26968,7 +28156,7 @@ class Test_TC_SWTCH_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("multiPressMax", value, 2U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 2U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -27062,7 +28250,7 @@ class Test_TC_TMP_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 4U)); - VerifyOrReturn(CheckConstraintType("value", "", "unit16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -27071,7 +28259,7 @@ class Test_TC_TMP_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -27079,11 +28267,10 @@ class Test_TC_TMP_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); @@ -27096,15 +28283,8 @@ class Test_TC_TMP_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; case 5: @@ -27112,7 +28292,11 @@ class Test_TC_TMP_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -27124,7 +28308,7 @@ class Test_TC_TMP_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 7: @@ -27165,13 +28349,12 @@ class Test_TC_TMP_1_1Suite : public TestCommand } case 3: { LogStep(3, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("TMP.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, TemperatureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip(" !TMP.S.A0003 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Read the optional attribute(Tolerance) in AttributeList"); + VerifyOrDo(!ShouldSkip("TMP.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, TemperatureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } @@ -27246,7 +28429,7 @@ class Test_TC_TMP_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -27256,7 +28439,7 @@ class Test_TC_TMP_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -27266,7 +28449,7 @@ class Test_TC_TMP_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -27276,7 +28459,7 @@ class Test_TC_TMP_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); } @@ -27304,25 +28487,25 @@ class Test_TC_TMP_2_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "read the mandatory attribute: MeasuredValue"); + LogStep(1, "Read the mandatory attribute: MeasuredValue"); VerifyOrDo(!ShouldSkip("TMP.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "read the mandatory attribute: MinMeasuredValue"); + LogStep(2, "Read the mandatory attribute: MinMeasuredValue"); VerifyOrDo(!ShouldSkip("TMP.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, TemperatureMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "read the mandatory attribute: MaxMeasuredValue"); + LogStep(3, "Read the mandatory attribute: MaxMeasuredValue"); VerifyOrDo(!ShouldSkip("TMP.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, TemperatureMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "read the optional attribute: Tolerance"); + LogStep(4, "Read the optional attribute: Tolerance"); VerifyOrDo(!ShouldSkip("TMP.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, TemperatureMeasurement::Attributes::Tolerance::Id, true, chip::NullOptional); @@ -27378,7 +28561,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -27386,7 +28569,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 63UL)); } @@ -27396,7 +28579,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 27UL)); VerifyOrReturn(CheckConstraintContains("value", value, 28UL)); @@ -27412,7 +28595,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); } break; @@ -27421,7 +28604,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); } break; @@ -27430,7 +28613,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; @@ -27439,7 +28622,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); } break; @@ -27448,7 +28631,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); } break; @@ -27457,7 +28640,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); VerifyOrReturn(CheckConstraintContains("value", value, 25UL)); @@ -27468,7 +28651,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 32UL)); VerifyOrReturn(CheckConstraintContains("value", value, 33UL)); VerifyOrReturn(CheckConstraintContains("value", value, 34UL)); @@ -27479,7 +28662,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 52UL)); VerifyOrReturn(CheckConstraintContains("value", value, 53UL)); VerifyOrReturn(CheckConstraintContains("value", value, 54UL)); @@ -27490,7 +28673,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 55UL)); VerifyOrReturn(CheckConstraintContains("value", value, 56UL)); VerifyOrReturn(CheckConstraintContains("value", value, 57UL)); @@ -27501,7 +28684,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -27513,7 +28696,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; @@ -27522,7 +28705,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; default: @@ -27685,7 +28868,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -27695,7 +28878,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -27705,7 +28888,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); } @@ -27715,7 +28898,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -27725,7 +28908,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -27735,7 +28918,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -27745,7 +28928,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -27755,7 +28938,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } @@ -27765,7 +28948,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } @@ -27775,7 +28958,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 63U)); } @@ -27785,7 +28968,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int8")); + VerifyOrReturn(CheckConstraintType("value", "int8s", "int8s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 25)); VerifyOrReturn(CheckConstraintMaxValue("value", value, -25)); } @@ -27795,7 +28978,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); } @@ -27805,7 +28988,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); } @@ -27815,7 +28998,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); } @@ -27825,7 +29008,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); } @@ -27835,7 +29018,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); } @@ -27845,7 +29028,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -27855,7 +29038,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -27865,7 +29048,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -27875,7 +29058,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { int8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int8")); + VerifyOrReturn(CheckConstraintType("value", "int8s", "int8s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 25)); } @@ -27885,7 +29068,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); } @@ -27895,7 +29078,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { chip::app::Clusters::Thermostat::ThermostatControlSequence value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); } @@ -27905,7 +29088,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); } @@ -27915,7 +29098,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); } @@ -27925,7 +29108,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); } @@ -27935,7 +29118,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -27945,7 +29128,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -27955,7 +29138,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); } @@ -27965,7 +29148,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 1440U)); } @@ -27975,7 +29158,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); } @@ -27985,7 +29168,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map16")); + VerifyOrReturn(CheckConstraintType("value", "bitmap16", "bitmap16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 127U)); } @@ -27995,7 +29178,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); } @@ -28005,7 +29188,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -28015,7 +29198,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "utc")); + VerifyOrReturn(CheckConstraintType("value", "utc", "utc")); } break; case 35: @@ -28023,7 +29206,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -28033,7 +29216,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -28043,7 +29226,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -28053,7 +29236,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -28063,7 +29246,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -28073,7 +29256,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -28083,7 +29266,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -28093,7 +29276,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); } @@ -28103,7 +29286,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -28113,7 +29296,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } @@ -28123,7 +29306,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } @@ -28133,7 +29316,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 47: @@ -28141,7 +29324,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); } @@ -28151,7 +29334,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -28162,7 +29345,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("ACCapacityformat", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); } break; default: @@ -28528,7 +29711,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); } @@ -28564,7 +29747,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); } @@ -28609,7 +29792,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("unoccupiedCoolingSetpoint", value, 2600)); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); } @@ -28643,7 +29826,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("unoccupiedHeatingSetpoint", value, 2000)); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); } @@ -28677,7 +29860,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("minHeatSetpointLimit", value, 700)); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); } @@ -28714,7 +29897,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("maxHeatSetpointLimit", value, 3000)); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); } @@ -28754,7 +29937,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("minCoolSetpointLimit", value, 1600)); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); } @@ -28791,7 +29974,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("maxCoolSetpointLimit", value, 3200)); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); } @@ -28840,7 +30023,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand int8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("minSetpointDeadBand", value, 25)); - VerifyOrReturn(CheckConstraintType("value", "", "temp-s8")); + VerifyOrReturn(CheckConstraintType("value", "int8s", "int8s")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 25)); } @@ -28874,7 +30057,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand chip::app::Clusters::Thermostat::ThermostatControlSequence value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("controlSequenceOfOperation", value, 4U)); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); } @@ -29946,7 +31129,7 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 2U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -29955,7 +31138,7 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -29963,7 +31146,7 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -29983,7 +31166,7 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 5: @@ -29995,7 +31178,7 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -30112,7 +31295,7 @@ class Test_TC_TSUIC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); } @@ -30122,7 +31305,7 @@ class Test_TC_TSUIC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); } @@ -30132,7 +31315,7 @@ class Test_TC_TSUIC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); } @@ -30440,7 +31623,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand } case 2: { LogStep(2, "Verify device temperature displayed in °C"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -30467,7 +31650,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand } case 5: { LogStep(5, "Verify device temperature displayed in °F"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -30511,7 +31694,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand } case 10: { LogStep(10, "Verify all device functionality available to the user"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -30537,7 +31720,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand } case 13: { LogStep(13, "Verify device operates at Level 1 reduced functionality"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -30563,7 +31746,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand } case 16: { LogStep(16, "Verify device operates at Level 2 reduced functionality"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -30589,7 +31772,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand } case 19: { LogStep(19, "Verify device operates at Level 3 reduced functionality"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -30615,7 +31798,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand } case 22: { LogStep(22, "Verify device operates at Level 4 reduced functionality"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -30641,7 +31824,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand } case 25: { LogStep(25, "Verify device operates at least functionality level"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -30673,7 +31856,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand } case 29: { LogStep(29, "Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSUIC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; value = 0U; @@ -30683,7 +31866,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand } case 30: { LogStep(30, "Verify local schedule programming functionality is enabled at the thermostat"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -30710,7 +31893,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand } case 33: { LogStep(33, "Verify local schedule programming functionality is disabled at the thermostat"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -30793,7 +31976,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -30803,7 +31986,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "RoutingRole")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); } @@ -30813,7 +31996,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); } break; case 4: @@ -30825,7 +32008,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -30839,7 +32022,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 8: @@ -30855,7 +32038,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 11: @@ -30875,7 +32058,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); } break; case 15: @@ -30883,7 +32066,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -30893,7 +32076,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -30903,7 +32086,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -30913,7 +32096,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } @@ -30923,7 +32106,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -30933,7 +32116,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -30943,7 +32126,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -30953,7 +32136,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -30963,7 +32146,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -30973,7 +32156,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -30983,7 +32166,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -30993,7 +32176,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -31003,7 +32186,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 28: @@ -31011,7 +32194,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 29: @@ -31019,7 +32202,9 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } break; case 30: @@ -31031,7 +32216,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "octstr")); + VerifyOrReturn(CheckConstraintType("value", "octet_string", "octet_string")); } break; case 32: @@ -31043,7 +32228,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; default: @@ -31368,7 +32553,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31378,7 +32563,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31388,7 +32573,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31398,7 +32583,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31408,7 +32593,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31418,7 +32603,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31428,7 +32613,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31438,7 +32623,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31448,7 +32633,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31458,7 +32643,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31468,7 +32653,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31478,7 +32663,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31488,7 +32673,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31498,7 +32683,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31508,7 +32693,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31518,7 +32703,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31528,7 +32713,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31708,7 +32893,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31718,7 +32903,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31728,7 +32913,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31738,7 +32923,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31748,7 +32933,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31758,7 +32943,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31768,7 +32953,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31778,7 +32963,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31788,7 +32973,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31798,7 +32983,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31808,7 +32993,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31818,7 +33003,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31828,7 +33013,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31842,7 +33027,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31852,7 +33037,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -31862,7 +33047,7 @@ class Test_TC_DGTHREAD_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32141,7 +33326,7 @@ class Test_TC_ULABEL_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: @@ -32150,7 +33335,7 @@ class Test_TC_ULABEL_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: @@ -32158,7 +33343,7 @@ class Test_TC_ULABEL_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); @@ -32176,7 +33361,7 @@ class Test_TC_ULABEL_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 5: @@ -32188,7 +33373,7 @@ class Test_TC_ULABEL_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 6: @@ -32326,7 +33511,7 @@ class Test_TC_ULABEL_2_2Suite : public TestCommand VerifyOrReturn(CheckValueAsString("labelList[3].value", iter_0.GetValue().value, chip::CharSpan("bedroom", 7))); VerifyOrReturn(CheckNoMoreListItems("labelList", iter_0, 4)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintMinLength("value", value, 4)); } break; @@ -32480,7 +33665,7 @@ class Test_TC_ULABEL_2_3Suite : public TestCommand chip::NullOptional, chip::NullOptional); } case 2: { - LogStep(2, "TH reads LabelList attribute of the DUT"); + LogStep(2, "TH writes LabelList attribute of the DUT"); VerifyOrDo(!ShouldSkip("ULABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::DataModel::List value; @@ -32576,7 +33761,10 @@ class Test_TC_ULABEL_2_4Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("labelList", iter_0, 0)); + VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 0)); + VerifyOrReturn(CheckValueAsString("labelList[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValueAsString("labelList[0].value", iter_0.GetValue().value, chip::CharSpan("", 0))); + VerifyOrReturn(CheckNoMoreListItems("labelList", iter_0, 1)); } } break; @@ -32636,7 +33824,16 @@ class Test_TC_ULABEL_2_4Suite : public TestCommand ListFreer listFreer; chip::app::DataModel::List value; - value = chip::app::DataModel::List(); + { + auto * listHolder_0 = new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].label = chip::Span("garbage: not in length on purpose", 0); + listHolder_0->mList[0].value = chip::Span("garbage: not in length on purpose", 0); + + value = + chip::app::DataModel::List(listHolder_0->mList, 1); + } return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, value, chip::NullOptional, chip::NullOptional); } @@ -32694,11 +33891,9 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterfaceType::DecodableType> - value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "octet_string", "octet_string")); } break; case 2: @@ -32706,7 +33901,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); } break; case 3: @@ -32714,7 +33909,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); } @@ -32724,7 +33919,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -32734,7 +33929,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int8")); + VerifyOrReturn(CheckConstraintType("value", "int8s", "int8s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -120)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 0)); } @@ -32744,7 +33939,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32754,7 +33949,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32764,7 +33959,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32774,7 +33969,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32784,7 +33979,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32794,7 +33989,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32804,7 +33999,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 13: @@ -32812,7 +34007,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; default: @@ -32838,10 +34033,10 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Reads NetworkInterface structure attribute from DUT"); + LogStep(1, "TH reads BSSID attribute from DUT"); VerifyOrDo(!ShouldSkip("DGWIFI.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::NetworkInterfaces::Id, true, chip::NullOptional); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::Bssid::Id, true, chip::NullOptional); } case 2: { LogStep(2, "Reads SecurityType attribute constraints"); @@ -32968,7 +34163,7 @@ class Test_TC_DGWIFI_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32978,7 +34173,7 @@ class Test_TC_DGWIFI_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32988,7 +34183,7 @@ class Test_TC_DGWIFI_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -32998,7 +34193,7 @@ class Test_TC_DGWIFI_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -33008,7 +34203,7 @@ class Test_TC_DGWIFI_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -33018,7 +34213,7 @@ class Test_TC_DGWIFI_2_3Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); } @@ -33142,7 +34337,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 5U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 200U)); } @@ -33152,7 +34347,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32768UL)); } @@ -33162,7 +34357,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); @@ -33180,7 +34375,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 26UL)); } break; @@ -33189,7 +34384,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); @@ -33204,7 +34399,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 7: @@ -33329,7 +34524,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::app::Clusters::WindowCovering::Type value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); } @@ -33339,7 +34534,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 63U)); } @@ -33349,7 +34544,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 63U)); } @@ -33359,7 +34554,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::app::Clusters::WindowCovering::EndProductType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 23U)); } @@ -33369,7 +34564,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 15U)); } @@ -33382,7 +34577,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -33392,7 +34587,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -33402,7 +34597,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -33412,7 +34607,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -33422,7 +34617,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -33432,7 +34627,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -33442,7 +34637,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -33452,7 +34647,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -33462,7 +34657,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map16")); + VerifyOrReturn(CheckConstraintType("value", "bitmap16", "bitmap16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 2047U)); } @@ -33472,7 +34667,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -33482,7 +34677,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -33492,7 +34687,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -33502,7 +34697,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -33512,7 +34707,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -33522,7 +34717,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } @@ -33532,7 +34727,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "Percent")); + VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } @@ -33542,7 +34737,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "Percent")); + VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } @@ -34226,7 +35421,7 @@ class Test_TC_WNCV_2_5Suite : public TestCommand { chip::app::Clusters::WindowCovering::EndProductType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 23U)); } @@ -34316,7 +35511,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -34326,7 +35521,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } @@ -34336,7 +35531,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -34346,7 +35541,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } @@ -34356,7 +35551,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); } break; case 8: @@ -34393,7 +35588,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 5U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 21U)); } @@ -34408,7 +35603,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); } @@ -34418,7 +35613,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 99U)); } @@ -34428,7 +35623,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); } @@ -34438,7 +35633,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 99U)); } @@ -34467,7 +35662,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); } @@ -34477,7 +35672,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); } @@ -34722,7 +35917,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); } @@ -34732,7 +35927,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 99U)); } @@ -34742,7 +35937,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); } @@ -34752,7 +35947,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 99U)); } @@ -34762,7 +35957,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); } break; case 8: @@ -34799,7 +35994,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 10U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 42U)); } @@ -34814,7 +36009,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -34824,7 +36019,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } @@ -34834,7 +36029,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -34844,7 +36039,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } @@ -34873,7 +36068,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -34883,7 +36078,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -35138,7 +36333,7 @@ class Test_TC_WNCV_3_3Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); } break; case 6: @@ -37723,7 +38918,7 @@ class TV_ApplicationBasicClusterSuite : public TestCommand case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::VendorId value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("vendorID", value, 1U)); } @@ -50417,7 +51612,7 @@ class TestFabricRemovalWhileSubscribedSuite : public TestCommand chip::Optional mPayload; chip::Optional mTimeout; - chip::FabricIndex ourFabricIndex; + uint8_t ourFabricIndex; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -50441,15 +51636,15 @@ class TestFabricRemovalWhileSubscribedSuite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("commissionedFabrics", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::FabricIndex value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); ourFabricIndex = value; } @@ -50472,7 +51667,7 @@ class TestFabricRemovalWhileSubscribedSuite : public TestCommand chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 7: @@ -50802,7 +51997,7 @@ class TestGeneralCommissioningSuite : public TestCommand { bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; default: @@ -51156,7 +52351,7 @@ class TestOperationalCredentialsClusterSuite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - chip::FabricIndex ourFabricIndex; + uint8_t ourFabricIndex; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -51179,7 +52374,7 @@ class TestOperationalCredentialsClusterSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); } break; @@ -51188,16 +52383,16 @@ class TestOperationalCredentialsClusterSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::FabricIndex value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); ourFabricIndex = value; } @@ -51428,7 +52623,7 @@ class TestModeSelectClusterSuite : public TestCommand } VerifyOrReturn(CheckNoMoreListItems("supportedModes", iter_0, 3)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintMinLength("value", value, 3)); VerifyOrReturn(CheckConstraintMaxLength("value", value, 3)); } @@ -51843,7 +53038,7 @@ class TestSelfFabricRemovalSuite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - chip::FabricIndex ourFabricIndex; + uint8_t ourFabricIndex; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -51867,15 +53062,15 @@ class TestSelfFabricRemovalSuite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("commissionedFabrics", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::FabricIndex value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); ourFabricIndex = value; } @@ -52882,7 +54077,7 @@ class TestArmFailSafeSuite : public TestCommand VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 1)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 3: @@ -54132,10 +55327,10 @@ class TestLevelControlWithOnOffDependencySuite : public TestCommand LogStep(1, "Sends a MoveToLevel command to set current level to min value"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 1U; - value.transitionTime = 0U; - value.optionMask = 1U; - value.optionOverride = 1U; + value.level = 1U; + value.transitionTime = 0U; + value.optionsMask = 1U; + value.optionsOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, chip::NullOptional @@ -54251,10 +55446,10 @@ class TestLevelControlWithOnOffDependencySuite : public TestCommand LogStep(19, "Sends a MoveToLevel command to set current level to a mid value"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 127U; - value.transitionTime = 0U; - value.optionMask = 1U; - value.optionOverride = 1U; + value.level = 127U; + value.transitionTime = 0U; + value.optionsMask = 1U; + value.optionsOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, chip::NullOptional @@ -54699,7 +55894,7 @@ class Test_TC_DGSW_2_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 2: @@ -54707,7 +55902,7 @@ class Test_TC_DGSW_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 3: @@ -54715,7 +55910,7 @@ class Test_TC_DGSW_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 4: @@ -54723,7 +55918,7 @@ class Test_TC_DGSW_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; default: @@ -54847,7 +56042,7 @@ class Test_TC_DGSW_2_2Suite : public TestCommand LogStep(1, "Reads a list of SoftwareFault struct from DUT and data type in each field of the struct must match the value " "listed in spec"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGSW.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); @@ -54909,7 +56104,7 @@ class Test_TC_DGSW_2_3Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 3: @@ -54917,7 +56112,7 @@ class Test_TC_DGSW_2_3Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; case 4: @@ -54925,7 +56120,7 @@ class Test_TC_DGSW_2_3Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); } break; default: @@ -61045,7 +62240,7 @@ class DL_SchedulesSuite : public TestCommand class Test_TC_DRLK_2_2Suite : public TestCommand { public: - Test_TC_DRLK_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_2", 23, credsIssuerConfig) + Test_TC_DRLK_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_2", 28, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -61139,15 +62334,29 @@ class Test_TC_DRLK_2_2Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("requirePINforRemoteOperation", value, false)); + } break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + break; + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -61155,48 +62364,51 @@ class Test_TC_DRLK_2_2Suite : public TestCommand VerifyOrReturn(CheckValue("requirePINforRemoteOperation", value, true)); } break; - case 10: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 12: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 13: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 14: + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + break; + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 15: + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + break; + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 16: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 17: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 18: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 19: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userCodeTemporaryDisableTime", value, 15U)); - } + shouldContinue = true; break; - case 20: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 21: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 22: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; default: @@ -61297,7 +62509,25 @@ class Test_TC_DRLK_2_2Suite : public TestCommand chip::NullOptional); } case 6: { - LogStep(6, "TH sends Lock Door Command to the DUT without PINCode"); + LogStep(6, + "TH writes the RequirePINforRemoteOperation attribute value as False on the DUT and Verify DUT responds with " + "UNSUPPORTED_WRITE"); + VerifyOrDo(!ShouldSkip("!DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + bool value; + value = false; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, + DoorLock::Attributes::RequirePINforRemoteOperation::Id, value, chip::NullOptional, + chip::NullOptional); + } + case 7: { + LogStep(7, "TH reads the RequirePINforRemoteOperation attribute from the DUT"); + VerifyOrDo(!ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, + DoorLock::Attributes::RequirePINforRemoteOperation::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "TH sends Lock Door Command to the DUT without PINCode"); VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; @@ -61306,8 +62536,8 @@ class Test_TC_DRLK_2_2Suite : public TestCommand ); } - case 7: { - LogStep(7, "TH sends Lock Door Command to the DUT with valid PINCode"); + case 9: { + LogStep(9, "TH sends Lock Door Command to the DUT with valid PINCode"); VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; @@ -61318,8 +62548,8 @@ class Test_TC_DRLK_2_2Suite : public TestCommand ); } - case 8: { - LogStep(8, "TH writes the RequirePINforRemoteOperation attribute value as True on the DUT"); + case 10: { + LogStep(10, "TH writes the RequirePINforRemoteOperation attribute value as True on the DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; bool value; @@ -61328,15 +62558,27 @@ class Test_TC_DRLK_2_2Suite : public TestCommand DoorLock::Attributes::RequirePINforRemoteOperation::Id, value, chip::NullOptional, chip::NullOptional); } - case 9: { - LogStep(9, "TH reads the RequirePINforRemoteOperation attribute from the DUT"); + case 11: { + LogStep(11, + "TH writes the RequirePINforRemoteOperation attribute value as True on the DUT and Verify DUT responds with " + "UNSUPPORTED_WRITE"); + VerifyOrDo(!ShouldSkip("!DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + bool value; + value = true; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, + DoorLock::Attributes::RequirePINforRemoteOperation::Id, value, chip::NullOptional, + chip::NullOptional); + } + case 12: { + LogStep(12, "TH reads the RequirePINforRemoteOperation attribute from the DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::RequirePINforRemoteOperation::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "TH sends Lock Door Command to the DUT with valid PINCode"); - VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 13: { + LogStep(13, "TH sends Lock Door Command to the DUT with valid PINCode"); + VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp && DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.pinCode.Emplace(); @@ -61346,9 +62588,9 @@ class Test_TC_DRLK_2_2Suite : public TestCommand ); } - case 11: { - LogStep(11, "TH sends Lock Door Command to the DUT without valid PINCode"); - VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 14: { + LogStep(14, "TH sends Lock Door Command to the DUT without valid PINCode"); + VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp && DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.pinCode.Emplace(); @@ -61358,20 +62600,19 @@ class Test_TC_DRLK_2_2Suite : public TestCommand ); } - case 12: { - LogStep(12, "TH sends Lock Door Command to the DUT without any argument PINCode"); - VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 15: { + LogStep(15, "TH sends Lock Door Command to the DUT without any argument PINCode"); + VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp && DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; - value.pinCode.Emplace(); - value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, chip::Optional(10000), chip::NullOptional ); } - case 13: { - LogStep(13, "TH writes WrongCodeEntryLimit attribute value as 3 on the DUT"); + case 16: { + LogStep(16, + "TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and Verify that the DUT sends Success response"); VerifyOrDo(!ShouldSkip("DRLK.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -61379,8 +62620,20 @@ class Test_TC_DRLK_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::WrongCodeEntryLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 14: { - LogStep(14, "TH writes UserCodeTemporaryDisableTime attribute value as 5 seconds on the DUT"); + case 17: { + LogStep(17, + "TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and verify DUT responds with UNSUPPORTED_WRITE"); + VerifyOrDo(!ShouldSkip("!DRLK.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 3U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::WrongCodeEntryLimit::Id, + value, chip::NullOptional, chip::NullOptional); + } + case 18: { + LogStep(18, + "TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds on the DUT and Verify that the DUT send " + "the Success response"); VerifyOrDo(!ShouldSkip("DRLK.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -61389,74 +62642,92 @@ class Test_TC_DRLK_2_2Suite : public TestCommand DoorLock::Attributes::UserCodeTemporaryDisableTime::Id, value, chip::NullOptional, chip::NullOptional); } - case 15: { - LogStep(15, "TH sends Lock Door Command to the DUT with invalid PINCode"); + case 19: { + LogStep(19, + "TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds on the DUT and Verify DUT responds with " + "UNSUPPORTED_WRITE"); + VerifyOrDo(!ShouldSkip("!DRLK.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 15U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, + DoorLock::Attributes::UserCodeTemporaryDisableTime::Id, value, chip::NullOptional, + chip::NullOptional); + } + case 20: { + LogStep(20, "TH sends Lock Door Command to the DUT with invalid PINCode"); VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.pinCode.Emplace(); - value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("12345garbage: not in length on purpose"), 5); + value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123458garbage: not in length on purpose"), 6); return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, chip::Optional(10000), chip::NullOptional ); } - case 16: { - LogStep(16, "TH sends Lock Door Command to the DUT with invalid PINCode"); + case 21: { + LogStep(21, "TH sends Lock Door Command to the DUT with invalid PINCode"); VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.pinCode.Emplace(); - value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("54321garbage: not in length on purpose"), 5); + value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123458garbage: not in length on purpose"), 6); return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, chip::Optional(10000), chip::NullOptional ); } - case 17: { - LogStep(17, "TH sends Lock Door Command to the DUT with invalid PINCode"); + case 22: { + LogStep(22, "TH sends Lock Door Command to the DUT with invalid PINCode"); VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.pinCode.Emplace(); - value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("987623garbage: not in length on purpose"), 6); + value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123458garbage: not in length on purpose"), 6); return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, chip::Optional(10000), chip::NullOptional ); } - case 18: { - LogStep(18, "TH sends Lock Door Command to the DUT with invalid PINCode"); + case 23: { + LogStep(23, "TH sends Lock Door Command to the DUT with invalid PINCode"); VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.pinCode.Emplace(); - value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("67890garbage: not in length on purpose"), 5); + value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123458garbage: not in length on purpose"), 6); return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, chip::Optional(10000), chip::NullOptional ); } - case 19: { - LogStep(19, "TH reads UserCodeTemporaryDisableTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, - DoorLock::Attributes::UserCodeTemporaryDisableTime::Id, true, chip::NullOptional); + case 24: { + LogStep(24, + "TH reads UserCodeTemporaryDisableTime attribute from DUT and After sending 3 failure responses verify that " + "UserCodeTemporaryDisableTime attribute is triggered"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DRLK.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } - case 20: { - LogStep(20, "TH sends Lock Door Command to the DUT with valid PINCode"); - VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 25: { + LogStep( + 25, + "TH sends Lock Command to the DUT with valid PINCode before UserCodeTemporaryDisableTime attribute time expires"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; - value.pinCode.Emplace(); - value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } - case 21: { - LogStep(21, "Clean the created user"); + case 26: { + LogStep(26, "Clean the created user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; value.userIndex = 1U; @@ -61465,8 +62736,8 @@ class Test_TC_DRLK_2_2Suite : public TestCommand ); } - case 22: { - LogStep(22, "Cleanup the created credential"); + case 27: { + LogStep(27, "Cleanup the created credential"); VerifyOrDo(!ShouldSkip("DRLK.S.C26.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; @@ -62048,27 +63319,19 @@ class Test_TC_DRLK_2_5Suite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value.weekDayIndex", value.weekDayIndex, 1U)); - VerifyOrReturn( - CheckConstraintMaxValue("value.weekDayIndex", value.weekDayIndex, NumberOfWeekDaySchedulesSupportedPerUser)); - VerifyOrReturn(CheckConstraintMinValue("value.userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value.userIndex", value.userIndex, NumberOfTotalUsersSupported)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); + VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckConstraintHasValue("value.daysMask", value.daysMask, true)); - VerifyOrReturn(CheckConstraintMinValue("value.daysMask.Value()", value.daysMask.Value(), 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value.daysMask.Value()", value.daysMask.Value(), 6U)); - VerifyOrReturn(CheckConstraintHasValue("value.startHour", value.startHour, true)); - VerifyOrReturn(CheckConstraintMinValue("value.startHour.Value()", value.startHour.Value(), 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value.startHour.Value()", value.startHour.Value(), 23U)); - VerifyOrReturn(CheckConstraintHasValue("value.startMinute", value.startMinute, true)); - VerifyOrReturn(CheckConstraintMinValue("value.startMinute.Value()", value.startMinute.Value(), 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value.startMinute.Value()", value.startMinute.Value(), 59U)); + VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); + VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 2U)); + VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); + VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 15U)); + VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); + VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 45U)); VerifyOrReturn(CheckConstraintHasValue("value.endHour", value.endHour, true)); - VerifyOrReturn(CheckConstraintMinValue("value.endHour.Value()", value.endHour.Value(), 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value.endHour.Value()", value.endHour.Value(), 23U)); + VerifyOrReturn(CheckConstraintMinValue("value.endHour.Value()", value.endHour.Value(), 16U)); VerifyOrReturn(CheckConstraintHasValue("value.endMinute", value.endMinute, true)); - VerifyOrReturn(CheckConstraintMinValue("value.endMinute.Value()", value.endMinute.Value(), 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value.endMinute.Value()", value.endMinute.Value(), 59U)); + VerifyOrReturn(CheckConstraintMinValue("value.endMinute.Value()", value.endMinute.Value(), 55U)); } break; case 7: @@ -62097,7 +63360,7 @@ class Test_TC_DRLK_2_5Suite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 2U)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); VerifyOrReturn(CheckValue("status", value.status, 139U)); VerifyOrReturn(CheckConstraintHasValue("value.daysMask", value.daysMask, false)); @@ -62164,19 +63427,19 @@ class Test_TC_DRLK_2_5Suite : public TestCommand ); } case 3: { - LogStep(3, "Get Max number of Week Day schedules for user"); + LogStep(3, "TH reads NumberOfWeekDay SchedulesSupportedPerUser attribute"); VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Get number of supported users"); + LogStep(4, "TH reads NumberOfTotalUsers Supported attribute"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::NumberOfTotalUsersSupported::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Send Set Week Day Schedule Command to DUT"); + LogStep(5, "TH send Set Week Day Schedule Command"); VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; @@ -62193,7 +63456,7 @@ class Test_TC_DRLK_2_5Suite : public TestCommand ); } case 6: { - LogStep(6, "send GetWeekDay Schedule Command "); + LogStep(6, "TH send Get Week Day Schedule Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -62206,7 +63469,7 @@ class Test_TC_DRLK_2_5Suite : public TestCommand ); } case 7: { - LogStep(7, "Send Set Week Day Schedule Command to DUT and verify INVALID_COMMAND response"); + LogStep(7, "TH send Set Week Day Schedule Command"); VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; @@ -62223,7 +63486,7 @@ class Test_TC_DRLK_2_5Suite : public TestCommand ); } case 8: { - LogStep(8, "send GetWeekDay Schedule Command to DUT and verify INVALID_COMMAND response"); + LogStep(8, "TH send Get Week Day Schedule Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -62236,7 +63499,7 @@ class Test_TC_DRLK_2_5Suite : public TestCommand ); } case 9: { - LogStep(9, "Clear all week day schedules for the first user"); + LogStep(9, "TH sends Clear Week Day Schedule Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0d.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; @@ -62248,12 +63511,12 @@ class Test_TC_DRLK_2_5Suite : public TestCommand ); } case 10: { - LogStep(10, "send GetWeekDay Schedule Command "); + LogStep(10, "TH sends Get Week Day Schedule Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 2U; + value.weekDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -62278,7 +63541,7 @@ class Test_TC_DRLK_2_5Suite : public TestCommand class Test_TC_DRLK_2_7Suite : public TestCommand { public: - Test_TC_DRLK_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_7", 16, credsIssuerConfig) + Test_TC_DRLK_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_7", 18, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -62373,16 +63636,17 @@ class Test_TC_DRLK_2_7Suite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value.yearDayIndex", value.yearDayIndex, 1U)); - VerifyOrReturn( - CheckConstraintMaxValue("value.yearDayIndex", value.yearDayIndex, NumberOfYearDaySchedulesSupportedPerUser)); - VerifyOrReturn(CheckConstraintMinValue("value.userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value.userIndex", value.userIndex, NumberOfTotalUsersSupported)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); + VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckConstraintHasValue("value.localStartTime", value.localStartTime, true)); - VerifyOrReturn(CheckConstraintType("value.localStartTime.Value()", "", "epoch-s")); - VerifyOrReturn(CheckConstraintHasValue("value.localEndTime", value.localEndTime, true)); - VerifyOrReturn(CheckConstraintType("value.localEndTime.Value()", "", "epoch-s")); + VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); + VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 960UL)); + VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); + VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 1980UL)); + if (value.localEndTime.HasValue()) + { + VerifyOrReturn(CheckConstraintMinValue("value.localEndTime.Value()", value.localEndTime.Value(), 961UL)); + } } break; case 7: @@ -62401,36 +63665,39 @@ class Test_TC_DRLK_2_7Suite : public TestCommand } break; case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 10U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 5U)); - VerifyOrReturn(CheckValue("status", value.status, 1U)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); VerifyOrReturn(CheckConstraintHasValue("value.localStartTime", value.localStartTime, false)); VerifyOrReturn(CheckConstraintHasValue("value.localEndTime", value.localEndTime, false)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 1U)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); VerifyOrReturn(CheckConstraintHasValue("value.localStartTime", value.localStartTime, false)); VerifyOrReturn(CheckConstraintHasValue("value.localEndTime", value.localEndTime, false)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; @@ -62442,12 +63709,19 @@ class Test_TC_DRLK_2_7Suite : public TestCommand VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 1080UL)); VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 2100UL)); + if (value.localEndTime.HasValue()) + { + VerifyOrReturn(CheckConstraintMinValue("value.localEndTime.Value()", value.localEndTime.Value(), 1081UL)); + } } break; - case 14: + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 15: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; default: @@ -62504,19 +63778,19 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } case 3: { - LogStep(3, "Get Max number of year Day schedules for user"); + LogStep(3, "TH reads NumberOfYearDay SchedulesSupportedPerUser attribute"); VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Get number of supported users"); + LogStep(4, "TH reads NumberOfTotalUsers Supported attribute"); VerifyOrDo(!ShouldSkip("DRLK.C.F08 && DRLK.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::NumberOfTotalUsersSupported::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Send Set Year Day Schedule Command to DUT"); + LogStep(5, "TH sends Set Year Day Schedule Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0e.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; @@ -62530,7 +63804,7 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } case 6: { - LogStep(6, "send Get Year Day Schedule Command"); + LogStep(6, "TH sends Get Year Day Schedule Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -62543,7 +63817,7 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } case 7: { - LogStep(7, "Send Set Year Day Schedule Command to DUT and verify INVALID_COMMAND response"); + LogStep(7, "TH send Set Year Day Schedule Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.C0e.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; @@ -62557,7 +63831,7 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } case 8: { - LogStep(8, "send Get Year Day Schedule Command to DUT and Verify INVALID_FIELD response"); + LogStep(8, "TH sends Get Year Day Schedule Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -62570,7 +63844,28 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } case 9: { - LogStep(9, "send Get Year Day Schedule Command to DUT and verify FAILURE response"); + LogStep(9, "Create a user with userIndex as 5"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::SetUser::Type value; + value.operationType = static_cast(0); + value.userIndex = 5U; + value.userName.SetNonNull(); + value.userName.Value() = chip::Span("xxxgarbage: not in length on purpose", 3); + value.userUniqueId.SetNonNull(); + value.userUniqueId.Value() = 6452UL; + value.userStatus.SetNonNull(); + value.userStatus.Value() = static_cast(1); + value.userType.SetNonNull(); + value.userType.Value() = static_cast(0); + value.credentialRule.SetNonNull(); + value.credentialRule.Value() = static_cast(0); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 10: { + LogStep(10, "TH sends Get Year Day Schedule Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -62582,8 +63877,8 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } - case 10: { - LogStep(10, "Clear a year day schedule for the first user"); + case 11: { + LogStep(11, "TH sends Clear Year Day Schedule to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.C10.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; @@ -62594,8 +63889,8 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } - case 11: { - LogStep(11, "send Get Year Day Schedule Command to DUT and verify NOT_FOUND response"); + case 12: { + LogStep(12, "TH sends Get Year Day Schedule Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx && DRLK.S.C10.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -62607,8 +63902,8 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } - case 12: { - LogStep(12, "Send Set Year Day Schedule Command to DUT "); + case 13: { + LogStep(13, "TH sends Set Year Day Schedule Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.C0e.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; @@ -62621,8 +63916,8 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } - case 13: { - LogStep(13, "send Get Year Day Schedule Command"); + case 14: { + LogStep(14, "TH sends Get Year Day Schedule Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -62634,8 +63929,20 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } - case 14: { - LogStep(14, "Clear a year day schedule for the first user"); + case 15: { + LogStep(15, "TH sends Clear Year Day Schedule to DUT"); + VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C10.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; + value.yearDayIndex = 0U; + value.userIndex = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearYearDaySchedule::Id, value, + chip::NullOptional + + ); + } + case 16: { + LogStep(16, "Clear a year day schedule for the first user"); VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C10.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; @@ -62646,8 +63953,8 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } - case 15: { - LogStep(15, "Cleanup the created user"); + case 17: { + LogStep(17, "Cleanup the created user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; value.userIndex = 1U; @@ -62664,7 +63971,7 @@ class Test_TC_DRLK_2_7Suite : public TestCommand class Test_TC_DRLK_2_9Suite : public TestCommand { public: - Test_TC_DRLK_2_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_9", 18, credsIssuerConfig) + Test_TC_DRLK_2_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_9", 24, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -62756,9 +64063,9 @@ class Test_TC_DRLK_2_9Suite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value.credentialExists", "", "boolean")); - VerifyOrReturn(CheckConstraintMinValue("value.userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value.userIndex", value.userIndex, NumberOfTotalUsersSupported)); + VerifyOrReturn(CheckConstraintType("value.credentialExists", "boolean", "boolean")); + VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); + VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); @@ -62800,6 +64107,10 @@ class Test_TC_DRLK_2_9Suite : public TestCommand } break; case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; @@ -62810,10 +64121,29 @@ class Test_TC_DRLK_2_9Suite : public TestCommand VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 4U)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 11: + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 2U)); + VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 4U)); + } + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -62825,10 +64155,10 @@ class Test_TC_DRLK_2_9Suite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 12: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; @@ -62836,16 +64166,20 @@ class Test_TC_DRLK_2_9Suite : public TestCommand VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 4U)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); } break; - case 14: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 15: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; - case 16: + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -62857,9 +64191,12 @@ class Test_TC_DRLK_2_9Suite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 17: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -62958,7 +64295,7 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } case 6: { - LogStep(6, "TH sends Set Credential Command to DUT and verify the INVALID_COMMAND if any of the fields are invalid"); + LogStep(6, "TH sends Set Credential Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -62968,7 +64305,7 @@ class Test_TC_DRLK_2_9Suite : public TestCommand value.credential.credentialType = static_cast(1); value.credential.credentialIndex = 2U; - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("1234garbage: not in length on purpose"), 4); + value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("4321garbage: not in length on purpose"), 4); value.userIndex.SetNonNull(); value.userIndex.Value() = 2U; value.userStatus.SetNonNull(); @@ -62981,7 +64318,7 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } case 7: { - LogStep(7, "TH sends Set Credential Command to DUT and verify response as DUPLICATE if CredentialData is repeated"); + LogStep(7, "TH sends Set Credential Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -63004,7 +64341,7 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } case 8: { - LogStep(8, "TH sends Set Credential Command to DUT and verify response as OCCUPIED if CredentialIndex is repeated"); + LogStep(8, "TH sends Set Credential Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -63028,8 +64365,55 @@ class Test_TC_DRLK_2_9Suite : public TestCommand } case 9: { LogStep(9, - "TH sends Set Credential Command to DUT and verify the DUT response as OCCUPIED if the CredentialIndex is not " - "associated with the UserIndex"); + "TH sends Set Credential Command to DUT and Verify that the DUT sends Set Credential Response command with " + "response as OCCUPIED if the CredentialIndex is repeated"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 10: { + LogStep(10, "TH sends Set Credential Command to DUT"); + VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; + value.operationType = static_cast(0); + + value.credential.credentialType = static_cast(1); + value.credential.credentialIndex = 3U; + + value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); + value.userIndex.SetNonNull(); + value.userIndex.Value() = 3U; + value.userStatus.SetNonNull(); + value.userStatus.Value() = static_cast(0); + value.userType.SetNonNull(); + value.userType.Value() = static_cast(0); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 11: { + LogStep(11, + "TH sends Set Credential Command to DUT and Verify that the DUT sends Set Credential Response command with " + "response as OCCUPIED if the CredentialIndex is repeated"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 12: { + LogStep(12, "TH sends Set Credential Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -63051,8 +64435,21 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 10: { - LogStep(10, "TH sends Clear Credential Command to DUT"); + case 13: { + LogStep(13, + "TH sends Set Credential Command to DUT and Verify that the DUT sends Set Credential Response command with " + "response as OCCUPIED if the CredentialIndex is repeated"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 14: { + LogStep(14, "TH sends Clear Credential Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C26.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; @@ -63066,10 +64463,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 11: { - LogStep(11, - "TH sends Get Credential Status Command and verify that the CredentialType and CredentialIndex for the " - "provided value is cleared"); + case 15: { + LogStep(15, "TH sends Get Credential Status Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -63083,8 +64478,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 12: { - LogStep(12, "TH sends Set User Command to DUT"); + case 16: { + LogStep(16, "TH sends Set User Command to DUT"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetUser::Type value; value.operationType = static_cast(0); @@ -63104,8 +64499,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 13: { - LogStep(13, "TH sends Set Credential Command to DUT"); + case 17: { + LogStep(17, "TH sends Set Credential Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -63113,7 +64508,7 @@ class Test_TC_DRLK_2_9Suite : public TestCommand value.operationType = static_cast(0); value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 3U; + value.credential.credentialIndex = 1U; value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); value.userIndex.SetNonNull(); @@ -63127,8 +64522,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 14: { - LogStep(14, "TH sends Clear Credential Command to DUT"); + case 18: { + LogStep(18, "TH sends Clear Credential Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C26.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; @@ -63142,8 +64537,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 15: { - LogStep(15, "TH sends Get Credential Status Command"); + case 19: { + LogStep(19, "TH sends Get Credential Status Command"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -63157,8 +64552,21 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 16: { - LogStep(16, "TH sends Get Credential Status Command"); + case 20: { + LogStep(20, + "TH sends Get Credential command to DUT and Verify that the CredentialType for the provided value is cleared " + "Verify that the CredentialIndex is cleared"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 21: { + LogStep(21, "TH sends Get Credential Status Command"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -63172,8 +64580,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 17: { - LogStep(17, "TH sends Clear Credential Command to DUT"); + case 22: { + LogStep(22, "TH sends Clear Credential Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C26.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; @@ -63187,6 +64595,16 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } + case 23: { + LogStep(23, "Cleanup the created user"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; + value.userIndex = 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearUser::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } } return CHIP_NO_ERROR; } @@ -74466,125 +75884,11 @@ class Test_TC_CADMIN_1_12Suite : public TestCommand } }; -class Test_TC_CADMIN_1_14Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_14Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_14", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CADMIN_1_14Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_15Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_15Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_15", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CADMIN_1_15Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_16Suite : public TestCommand +class Test_TC_CADMIN_1_14Suite : public TestCommand { public: - Test_TC_CADMIN_1_16Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_16", 0, credsIssuerConfig) + Test_TC_CADMIN_1_14Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_14", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74592,7 +75896,7 @@ class Test_TC_CADMIN_1_16Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CADMIN_1_16Suite() {} + ~Test_TC_CADMIN_1_14Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74637,11 +75941,11 @@ class Test_TC_CADMIN_1_16Suite : public TestCommand } }; -class Test_TC_CADMIN_1_17Suite : public TestCommand +class Test_TC_CADMIN_1_15Suite : public TestCommand { public: - Test_TC_CADMIN_1_17Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_17", 0, credsIssuerConfig) + Test_TC_CADMIN_1_15Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_15", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74649,7 +75953,7 @@ class Test_TC_CADMIN_1_17Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CADMIN_1_17Suite() {} + ~Test_TC_CADMIN_1_15Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74694,11 +75998,11 @@ class Test_TC_CADMIN_1_17Suite : public TestCommand } }; -class Test_TC_CADMIN_1_18Suite : public TestCommand +class Test_TC_CADMIN_1_16Suite : public TestCommand { public: - Test_TC_CADMIN_1_18Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_18", 0, credsIssuerConfig) + Test_TC_CADMIN_1_16Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_16", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74706,7 +76010,7 @@ class Test_TC_CADMIN_1_18Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CADMIN_1_18Suite() {} + ~Test_TC_CADMIN_1_16Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74751,11 +76055,11 @@ class Test_TC_CADMIN_1_18Suite : public TestCommand } }; -class Test_TC_CADMIN_1_19Suite : public TestCommand +class Test_TC_CADMIN_1_17Suite : public TestCommand { public: - Test_TC_CADMIN_1_19Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_19", 0, credsIssuerConfig) + Test_TC_CADMIN_1_17Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_17", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74763,7 +76067,7 @@ class Test_TC_CADMIN_1_19Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CADMIN_1_19Suite() {} + ~Test_TC_CADMIN_1_17Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74808,11 +76112,11 @@ class Test_TC_CADMIN_1_19Suite : public TestCommand } }; -class Test_TC_CADMIN_1_20Suite : public TestCommand +class Test_TC_CADMIN_1_18Suite : public TestCommand { public: - Test_TC_CADMIN_1_20Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_20", 0, credsIssuerConfig) + Test_TC_CADMIN_1_18Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_18", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74820,7 +76124,7 @@ class Test_TC_CADMIN_1_20Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CADMIN_1_20Suite() {} + ~Test_TC_CADMIN_1_18Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74865,11 +76169,11 @@ class Test_TC_CADMIN_1_20Suite : public TestCommand } }; -class Test_TC_CADMIN_1_21Suite : public TestCommand +class Test_TC_CADMIN_1_19Suite : public TestCommand { public: - Test_TC_CADMIN_1_21Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_21", 0, credsIssuerConfig) + Test_TC_CADMIN_1_19Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_19", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74877,7 +76181,7 @@ class Test_TC_CADMIN_1_21Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CADMIN_1_21Suite() {} + ~Test_TC_CADMIN_1_19Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74922,11 +76226,11 @@ class Test_TC_CADMIN_1_21Suite : public TestCommand } }; -class Test_TC_CADMIN_1_22Suite : public TestCommand +class Test_TC_CADMIN_1_20Suite : public TestCommand { public: - Test_TC_CADMIN_1_22Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_22", 0, credsIssuerConfig) + Test_TC_CADMIN_1_20Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_20", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74934,7 +76238,7 @@ class Test_TC_CADMIN_1_22Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CADMIN_1_22Suite() {} + ~Test_TC_CADMIN_1_20Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74979,11 +76283,11 @@ class Test_TC_CADMIN_1_22Suite : public TestCommand } }; -class Test_TC_CADMIN_1_23Suite : public TestCommand +class Test_TC_CADMIN_1_21Suite : public TestCommand { public: - Test_TC_CADMIN_1_23Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_23", 0, credsIssuerConfig) + Test_TC_CADMIN_1_21Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_21", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74991,7 +76295,7 @@ class Test_TC_CADMIN_1_23Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CADMIN_1_23Suite() {} + ~Test_TC_CADMIN_1_21Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75036,11 +76340,11 @@ class Test_TC_CADMIN_1_23Suite : public TestCommand } }; -class Test_TC_CADMIN_1_24Suite : public TestCommand +class Test_TC_CADMIN_1_22Suite : public TestCommand { public: - Test_TC_CADMIN_1_24Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_24", 0, credsIssuerConfig) + Test_TC_CADMIN_1_22Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_22", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75048,7 +76352,7 @@ class Test_TC_CADMIN_1_24Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CADMIN_1_24Suite() {} + ~Test_TC_CADMIN_1_22Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75146,7 +76450,7 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); } break; @@ -75171,7 +76475,7 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 1)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 7: @@ -75189,7 +76493,7 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 8: @@ -75201,7 +76505,7 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest1", 9))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); } break; @@ -75214,7 +76518,7 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest2", 9))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); } break; @@ -75300,7 +76604,8 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand chip::NullOptional); } case 4: { - LogStep(4, "Commission from beta"); + LogStep(4, "TH_CR2 starts a commissioning process with DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; @@ -75308,7 +76613,7 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand return PairWithCode(kIdentityBeta, value); } case 5: { - LogStep(5, "TH_CR2 starts a commissioning process with DUT_CE"); + LogStep(5, "DUT_CE is commissioned by TH_CR2 on Fabric ID2"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -75316,13 +76621,13 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand return WaitForCommissionee(kIdentityBeta, value); } case 6: { - LogStep(6, "Query fabrics list"); + LogStep(6, "TH_CR1 reads the list of Fabrics on DUT_CE"); VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::Fabrics::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Query fabrics list"); + LogStep(7, "TH_CR2 reads the list of Fabrics on DUT_CE"); VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); @@ -75358,7 +76663,7 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand chip::NullOptional); } case 12: { - LogStep(12, "TH_CR2 opens a commissioning window on DUT_CE"); + LogStep(12, "TH_CR2 opens a commissioning window on DUT_CE using ECM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -75392,7 +76697,7 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "TH_CR2 opens a commissioning window on DUT_CE"); + LogStep(15, "TH_CR2 opens a commissioning window on DUT_CE using ECM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -75417,7 +76722,7 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:0000000000I31506010", 22); return PairWithCode(kIdentityAlpha, value); } @@ -75478,7 +76783,7 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); } break; @@ -75503,7 +76808,7 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 1)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 7: @@ -75519,7 +76824,7 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 1)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 8: @@ -75530,7 +76835,8 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); } break; @@ -75542,7 +76848,8 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); } break; @@ -75592,7 +76899,7 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH_CR1 opens a commissioning window on DUT_CE"); + LogStep(1, "TH_CR1 opens a commissioning window on DUT_CE using BCM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; @@ -75619,7 +76926,8 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand chip::NullOptional); } case 4: { - LogStep(4, "Commission from beta"); + LogStep(4, "TH_CR2 starts a commissioning process with DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; @@ -75627,7 +76935,7 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand return PairWithCode(kIdentityBeta, value); } case 5: { - LogStep(5, "TH_CR2 starts a commissioning process with DUT_CE"); + LogStep(5, "DUT_CE is commissioned by TH_CR2 on Fabric ID2 "); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -75635,13 +76943,13 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand return WaitForCommissionee(kIdentityBeta, value); } case 6: { - LogStep(6, "Query fabrics list"); + LogStep(6, "TH_CR1 reads the list of Fabrics on DUT_CE"); VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::Fabrics::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Query fabrics list"); + LogStep(7, "TH_CR2 reads the list of Fabrics on DUT_CE"); VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::Fabrics::Id, true, chip::NullOptional); @@ -75677,7 +76985,7 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand chip::NullOptional); } case 12: { - LogStep(12, "TH_CR2 opens a commissioning window on DUT_CE"); + LogStep(12, "TH_CR2 opens a commissioning window on DUT_CE using BCM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; @@ -75702,7 +77010,7 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "TH_CR2 opens a commissioning window on DUT_CE"); + LogStep(15, "TH_CR2 opens a commissioning window on DUT_CE using BCM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; @@ -75718,7 +77026,7 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityAlpha, value); } @@ -75851,7 +77159,7 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH_CR1 opens a new commissioning window on DUT_CE"); + LogStep(1, "TH_CR1 opens a new commissioning window on DUT_CE using ECM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -75862,7 +77170,7 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), 97); - value.discriminator = 3840U; + value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, @@ -75872,7 +77180,7 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand ); } case 2: { - LogStep(2, "Wait for PIXIT_COMM_WIN(180) + 10 seconds"); + LogStep(2, "Wait for PIXIT.CADMIN.CwDuration + 10 seconds"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 190000UL; @@ -75888,7 +77196,7 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand return PairWithCode(kIdentityBeta, value); } case 4: { - LogStep(4, "TH_CR1 opens a new commissioning window on DUT_CE"); + LogStep(4, "TH_CR1 opens a new commissioning window on DUT_CE using ECM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -75899,7 +77207,7 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), 97); - value.discriminator = 3840U; + value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, @@ -75955,7 +77263,7 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand chip::NullOptional); } case 10: { - LogStep(10, "TH_CR1 opens a new commissioning window on DUT_CE using wrong PakeVerifier value"); + LogStep(10, "TH_CR1 opens a new commissioning window on DUT_CE using wrong PakeVerifier value using ECM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -75966,7 +77274,7 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" "\326\360,D4\362\275\322zgarbage: not in length on purpose"), 89); - value.discriminator = 3840U; + value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, @@ -75976,7 +77284,7 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand ); } case 11: { - LogStep(11, "TH_CR1 opens a new commissioning window on DUT_CE"); + LogStep(11, "TH_CR1 opens a new commissioning window on DUT_CE using ECM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -75987,7 +77295,7 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), 97); - value.discriminator = 3840U; + value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, @@ -75997,7 +77305,7 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand ); } case 12: { - LogStep(12, "TH_CR1 opens a new commissioning window on DUT_CE"); + LogStep(12, "TH_CR1 opens another commissioning window on DUT_CE using ECM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -76008,7 +77316,7 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), 97); - value.discriminator = 3840U; + value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, @@ -76019,7 +77327,7 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand } case 13: { LogStep(13, "TH_CR2 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CADMIN.S && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; @@ -77164,7 +78472,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 10: @@ -77194,7 +78502,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; case 14: @@ -77433,18 +78741,18 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand } }; -class Test_TC_CADMIN_1_25Suite : public TestCommand +class Test_TC_CADMIN_1_23Suite : public TestCommand { public: - Test_TC_CADMIN_1_25Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_25", 8, credsIssuerConfig) + Test_TC_CADMIN_1_23Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_23", 8, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CADMIN_1_25Suite() {} + ~Test_TC_CADMIN_1_23Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(330)); } @@ -77538,6 +78846,7 @@ class Test_TC_CADMIN_1_25Suite : public TestCommand } case 2: { LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; @@ -77545,6 +78854,7 @@ class Test_TC_CADMIN_1_25Suite : public TestCommand } case 3: { LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -77563,11 +78873,13 @@ class Test_TC_CADMIN_1_25Suite : public TestCommand } case 5: { LogStep(5, "TH_CR1 reads the window status to verify the DUT_CE window is closed"); + VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); } case 6: { LogStep(6, "TH_CR1 opens a commissioning window on DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 179U; @@ -77579,6 +78891,7 @@ class Test_TC_CADMIN_1_25Suite : public TestCommand } case 7: { LogStep(7, "TH_CR1 reads the window status to verify the DUT_CE window is closed"); + VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); } @@ -77587,18 +78900,18 @@ class Test_TC_CADMIN_1_25Suite : public TestCommand } }; -class Test_TC_CADMIN_1_26Suite : public TestCommand +class Test_TC_CADMIN_1_24Suite : public TestCommand { public: - Test_TC_CADMIN_1_26Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_26", 8, credsIssuerConfig) + Test_TC_CADMIN_1_24Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_24", 8, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_CADMIN_1_26Suite() {} + ~Test_TC_CADMIN_1_24Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(330)); } @@ -77674,6 +78987,7 @@ class Test_TC_CADMIN_1_26Suite : public TestCommand { case 0: { LogStep(0, "Factory Reset the DUT_CE"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; return FactoryReset(kIdentityAlpha, value); @@ -77691,6 +79005,7 @@ class Test_TC_CADMIN_1_26Suite : public TestCommand } case 2: { LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; @@ -77698,6 +79013,7 @@ class Test_TC_CADMIN_1_26Suite : public TestCommand } case 3: { LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -77725,11 +79041,13 @@ class Test_TC_CADMIN_1_26Suite : public TestCommand } case 5: { LogStep(5, "TH_CR1 reads the window status to verify the DUT_CE window is closed"); + VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); } case 6: { LogStep(6, "TH_CR1 opens a commissioning window on DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 179U; @@ -77750,6 +79068,7 @@ class Test_TC_CADMIN_1_26Suite : public TestCommand } case 7: { LogStep(7, "TH_CR1 reads the window status to verify the DUT_CE window is closed"); + VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); } @@ -80941,7 +82260,7 @@ class Test_TC_FLW_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); ValueBeforeChange = value; @@ -80956,7 +82275,7 @@ class Test_TC_FLW_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); VerifyOrReturn(CheckConstraintNotValue("value", value, ValueBeforeChange)); @@ -81002,7 +82321,7 @@ class Test_TC_FLW_2_2Suite : public TestCommand } case 3: { LogStep(3, "read the mandatory attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("FLW.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("FLW.S.A0000 && FLW.M.FlowChange"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, FlowMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); } @@ -81282,7 +82601,6 @@ class Test_TC_OCC_3_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("occupancy", value, 0U)); OccupancyValue = value; } break; @@ -81338,7 +82656,7 @@ class Test_TC_OCC_3_1Suite : public TestCommand } case 3: { LogStep(3, "Reads back Occupancy attribute from DUT after few seconds"); - VerifyOrDo(!ShouldSkip("OCC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("OCC.S.A0000 && OCC.M.OccupancyChange"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::Occupancy::Id, true, chip::NullOptional); } @@ -82134,12 +83452,16 @@ class Test_TC_CC_9_4Suite : public TestCommand class Test_TC_CC_3_1Suite : public TestCommand { public: - Test_TC_CC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_1", 34, credsIssuerConfig) + Test_TC_CC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_1", 35, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("hueShortestDistance", 0, UINT8_MAX, &mHueShortestDistance); + AddArgument("hueLongestDistance", 0, UINT8_MAX, &mHueLongestDistance); + AddArgument("hueDirectionUp", 0, UINT8_MAX, &mHueDirectionUp); + AddArgument("hueDirectionDown", 0, UINT8_MAX, &mHueDirectionDown); } ~Test_TC_CC_3_1Suite() {} @@ -82151,6 +83473,10 @@ class Test_TC_CC_3_1Suite : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mHueShortestDistance; + chip::Optional mHueLongestDistance; + chip::Optional mHueDirectionUp; + chip::Optional mHueDirectionDown; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -82180,191 +83506,196 @@ class Test_TC_CC_3_1Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, 150U)); + VerifyOrReturn( + CheckValue("currentHue", value, mHueShortestDistance.HasValue() ? mHueShortestDistance.Value() : 150U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, 200U)); + VerifyOrReturn( + CheckValue("currentHue", value, mHueLongestDistance.HasValue() ? mHueLongestDistance.Value() : 200U)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, 250U)); + VerifyOrReturn(CheckValue("currentHue", value, mHueDirectionUp.HasValue() ? mHueDirectionUp.Value() : 250U)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, 200U)); + VerifyOrReturn(CheckValue("currentHue", value, mHueDirectionDown.HasValue() ? mHueDirectionDown.Value() : 170U)); } break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -82407,17 +83738,26 @@ class Test_TC_CC_3_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Reads CurrentHue attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads CurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Move to hue shortest distance command"); + case 5: { + LogStep(5, "TH sends MoveToHue command to DUT another Hue with Direction Shortest distance and TransitionTime 300"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 150U; + value.hue = mHueShortestDistance.HasValue() ? mHueShortestDistance.Value() : 150U; value.direction = static_cast(0); value.transitionTime = 300U; value.optionsMask = 0U; @@ -82427,51 +83767,51 @@ class Test_TC_CC_3_1Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 5000ms"); + case 6: { + LogStep(6, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Wait 5000ms"); + case 8: { + LogStep(8, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Wait 20s"); + case 10: { + LogStep(10, "Wait 20s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 20000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 11: { + LogStep(11, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Move to hue longest distance command"); + case 12: { + LogStep(12, "TH sends MoveToHue command to DUT another Hue with Direction Longest distance and TransitionTime 300"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 200U; + value.hue = mHueLongestDistance.HasValue() ? mHueLongestDistance.Value() : 200U; value.direction = static_cast(1); value.transitionTime = 300U; value.optionsMask = 0U; @@ -82481,51 +83821,51 @@ class Test_TC_CC_3_1Suite : public TestCommand ); } - case 12: { - LogStep(12, "Wait 5000ms"); + case 13: { + LogStep(13, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 14: { + LogStep(14, "Over TransitionTime, TH reads CurrentHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Wait 5000ms"); + case 15: { + LogStep(15, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 15: { - LogStep(15, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 16: { + LogStep(16, "Over TransitionTime, TH reads CurrentHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Wait 20s"); + case 17: { + LogStep(17, "Wait 20s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 20000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 18: { + LogStep(18, "Over TransitionTime, TH reads CurrentHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Move to hue up command"); + case 19: { + LogStep(19, "TH sends MoveToHue command to DUT another Hue with Direction Up and TransitionTime 300"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 250U; + value.hue = mHueDirectionUp.HasValue() ? mHueDirectionUp.Value() : 250U; value.direction = static_cast(2); value.transitionTime = 300U; value.optionsMask = 0U; @@ -82535,51 +83875,51 @@ class Test_TC_CC_3_1Suite : public TestCommand ); } - case 19: { - LogStep(19, "Wait 5000ms"); + case 20: { + LogStep(20, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 20: { - LogStep(20, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 21: { + LogStep(21, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "Wait 5000ms"); + case 22: { + LogStep(22, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 22: { - LogStep(22, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 23: { + LogStep(23, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Wait 20s"); + case 24: { + LogStep(24, "Wait 20s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 20000UL; return WaitForMs(kIdentityAlpha, value); } - case 24: { - LogStep(24, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 25: { + LogStep(25, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Move to hue down command"); + case 26: { + LogStep(26, "TH sends MoveToHue command to DUT another Hue with Direction Down and TransitionTime 300"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 200U; + value.hue = mHueDirectionDown.HasValue() ? mHueDirectionDown.Value() : 170U; value.direction = static_cast(3); value.transitionTime = 300U; value.optionsMask = 0U; @@ -82589,55 +83929,55 @@ class Test_TC_CC_3_1Suite : public TestCommand ); } - case 26: { - LogStep(26, "Wait 5000ms"); + case 27: { + LogStep(27, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 27: { - LogStep(27, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 28: { + LogStep(28, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Wait 5000ms"); + case 29: { + LogStep(29, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 29: { - LogStep(29, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 30: { + LogStep(30, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 30: { - LogStep(30, "Wait 20s"); + case 31: { + LogStep(31, "Wait 20s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 20000UL; return WaitForMs(kIdentityAlpha, value); } - case 31: { - LogStep(31, "Check current hue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 32: { + LogStep(32, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 32: { - LogStep(32, "Turn off light that we turned on"); + case 33: { + LogStep(33, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 33: { - LogStep(33, "Check on/off attribute value is false after off command"); + case 34: { + LogStep(34, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -82648,12 +83988,17 @@ class Test_TC_CC_3_1Suite : public TestCommand class Test_TC_CC_7_1Suite : public TestCommand { public: - Test_TC_CC_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_1", 35, credsIssuerConfig) + Test_TC_CC_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_1", 36, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("EnhancedHueConfigValue", 0, UINT16_MAX, &mEnhancedHueConfigValue); + AddArgument("EnhancedHueShortestDistanceConfigValue", 0, UINT16_MAX, &mEnhancedHueShortestDistanceConfigValue); + AddArgument("EnhancedHueLongestDistanceConfigValue", 0, UINT16_MAX, &mEnhancedHueLongestDistanceConfigValue); + AddArgument("EnhancedHueDirectionUpConfigValue", 0, UINT16_MAX, &mEnhancedHueDirectionUpConfigValue); + AddArgument("EnhancedHueDirectionDownConfigValue", 0, UINT16_MAX, &mEnhancedHueDirectionDownConfigValue); } ~Test_TC_CC_7_1Suite() {} @@ -82665,6 +84010,11 @@ class Test_TC_CC_7_1Suite : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mEnhancedHueConfigValue; + chip::Optional mEnhancedHueShortestDistanceConfigValue; + chip::Optional mEnhancedHueLongestDistanceConfigValue; + chip::Optional mEnhancedHueDirectionUpConfigValue; + chip::Optional mEnhancedHueDirectionDownConfigValue; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -82697,203 +84047,216 @@ class Test_TC_CC_7_1Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue("enhancedCurrentHue", value, + mEnhancedHueConfigValue.HasValue() ? mEnhancedHueConfigValue.Value() : 1025U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 1100U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue( + "enhancedCurrentHue", value, + mEnhancedHueShortestDistanceConfigValue.HasValue() ? mEnhancedHueShortestDistanceConfigValue.Value() : 1050U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 1150U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue( + "enhancedCurrentHue", value, + mEnhancedHueLongestDistanceConfigValue.HasValue() ? mEnhancedHueLongestDistanceConfigValue.Value() : 1200U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 1200U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn( + CheckValue("enhancedCurrentHue", value, + mEnhancedHueDirectionUpConfigValue.HasValue() ? mEnhancedHueDirectionUpConfigValue.Value() : 1300U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 1300U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue( + "enhancedCurrentHue", value, + mEnhancedHueDirectionDownConfigValue.HasValue() ? mEnhancedHueDirectionDownConfigValue.Value() : 1100U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -82936,11 +84299,20 @@ class Test_TC_CC_7_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH sends EnhancedMoveToHue command to DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH sends EnhancedMoveToHue command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 1025U; + value.enhancedHue = mEnhancedHueConfigValue.HasValue() ? mEnhancedHueConfigValue.Value() : 1025U; value.direction = static_cast(0); value.transitionTime = 0U; value.optionsMask = 0U; @@ -82950,18 +84322,19 @@ class Test_TC_CC_7_1Suite : public TestCommand ); } - case 4: { - LogStep(4, "TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 5: { + LogStep(5, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH sends EnhancedMoveToHue command to DUT"); + case 6: { + LogStep(6, "TH sends EnhancedMoveToHue command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 1100U; + value.enhancedHue = + mEnhancedHueShortestDistanceConfigValue.HasValue() ? mEnhancedHueShortestDistanceConfigValue.Value() : 1050U; value.direction = static_cast(0); value.transitionTime = 300U; value.optionsMask = 0U; @@ -82971,51 +84344,52 @@ class Test_TC_CC_7_1Suite : public TestCommand ); } - case 6: { - LogStep(6, "Wait 5500ms"); + case 7: { + LogStep(7, "Wait 5500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5500UL; return WaitForMs(kIdentityAlpha, value); } - case 7: { - LogStep(7, "TH reads EnhancedCurrentHue attribute from DUT periodically"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Wait 5500ms"); + case 9: { + LogStep(9, "Wait 5500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5500UL; return WaitForMs(kIdentityAlpha, value); } - case 9: { - LogStep(9, "TH reads EnhancedCurrentHue attribute from DUT periodically"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 10: { + LogStep(10, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Wait 20s"); + case 11: { + LogStep(11, "Wait 20s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 20000UL; return WaitForMs(kIdentityAlpha, value); } - case 11: { - LogStep(11, "TH reads EnhancedCurrentHue attribute from DUT periodically"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 12: { + LogStep(12, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "TH sends EnhancedMoveToHue command to DUT"); + case 13: { + LogStep(13, "TH sends EnhancedMoveToHue command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 1150U; + value.enhancedHue = + mEnhancedHueLongestDistanceConfigValue.HasValue() ? mEnhancedHueLongestDistanceConfigValue.Value() : 1200U; value.direction = static_cast(1); value.transitionTime = 300U; value.optionsMask = 0U; @@ -83025,52 +84399,52 @@ class Test_TC_CC_7_1Suite : public TestCommand ); } - case 13: { - LogStep(13, "Wait 5500ms"); + case 14: { + LogStep(14, "Wait 5500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5500UL; return WaitForMs(kIdentityAlpha, value); } - case 14: { - LogStep(14, "TH reads EnhancedCurrentHue attribute from DUT periodically"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 15: { + LogStep(15, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Wait 5500ms"); + case 16: { + LogStep(16, "Wait 5500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5500UL; return WaitForMs(kIdentityAlpha, value); } - case 16: { - LogStep(16, "TH reads EnhancedCurrentHue attribute from DUT periodically"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 17: { + LogStep(17, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Wait 20s"); + case 18: { + LogStep(18, "Wait 20s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 20000UL; return WaitForMs(kIdentityAlpha, value); } - case 18: { - LogStep(18, "TH reads EnhancedCurrentHue attribute from DUT periodically"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 19: { + LogStep(19, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "TH sends EnhancedMoveToHue command to DUT"); + case 20: { + LogStep(20, "TH sends EnhancedMoveToHue command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 1200U; - value.direction = static_cast(2); + value.enhancedHue = mEnhancedHueDirectionUpConfigValue.HasValue() ? mEnhancedHueDirectionUpConfigValue.Value() : 1300U; + value.direction = static_cast(2); value.transitionTime = 300U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -83079,51 +84453,52 @@ class Test_TC_CC_7_1Suite : public TestCommand ); } - case 20: { - LogStep(20, "Wait 5500ms"); + case 21: { + LogStep(21, "Wait 5500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5500UL; return WaitForMs(kIdentityAlpha, value); } - case 21: { - LogStep(21, "TH reads EnhancedCurrentHue attribute from DUT periodically"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 22: { + LogStep(22, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "Wait 5500ms"); + case 23: { + LogStep(23, "Wait 5500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5500UL; return WaitForMs(kIdentityAlpha, value); } - case 23: { - LogStep(23, "TH reads EnhancedCurrentHue attribute from DUT periodically"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 24: { + LogStep(24, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Wait 20s"); + case 25: { + LogStep(25, "Wait 20s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 20000UL; return WaitForMs(kIdentityAlpha, value); } - case 25: { - LogStep(25, "TH reads EnhancedCurrentHue attribute from DUT periodically"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "TH sends EnhancedMoveToHue command to DUT "); + case 27: { + LogStep(27, "TH sends EnhancedMoveToHue command to DUT "); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 1300U; + value.enhancedHue = + mEnhancedHueDirectionDownConfigValue.HasValue() ? mEnhancedHueDirectionDownConfigValue.Value() : 1100U; value.direction = static_cast(3); value.transitionTime = 300U; value.optionsMask = 0U; @@ -83133,55 +84508,55 @@ class Test_TC_CC_7_1Suite : public TestCommand ); } - case 27: { - LogStep(27, "Wait 5500ms"); + case 28: { + LogStep(28, "Wait 5500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5500UL; return WaitForMs(kIdentityAlpha, value); } - case 28: { - LogStep(28, "TH reads EnhancedCurrentHue attribute from DUT periodically"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 29: { + LogStep(29, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 29: { - LogStep(29, "Wait 5500ms"); + case 30: { + LogStep(30, "Wait 5500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5500UL; return WaitForMs(kIdentityAlpha, value); } - case 30: { - LogStep(30, "TH reads EnhancedCurrentHue attribute from DUT periodically"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 31: { + LogStep(31, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 31: { - LogStep(31, "Wait 20s"); + case 32: { + LogStep(32, "Wait 20s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 20000UL; return WaitForMs(kIdentityAlpha, value); } - case 32: { - LogStep(32, "TH reads EnhancedCurrentHue attribute from DUT periodically"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 33: { + LogStep(33, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 33: { - LogStep(33, "Turn off light that we turned on"); + case 34: { + LogStep(34, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 34: { - LogStep(34, "Check on/off attribute value is false after off command"); + case 35: { + LogStep(35, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -83192,7 +84567,7 @@ class Test_TC_CC_7_1Suite : public TestCommand class Test_TC_CC_9_1Suite : public TestCommand { public: - Test_TC_CC_9_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_1", 72, credsIssuerConfig) + Test_TC_CC_9_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_1", 73, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -83257,6 +84632,9 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83264,10 +84642,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83275,10 +84653,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83286,10 +84664,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopTime", value, 30U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83297,10 +84675,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83308,7 +84686,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83316,11 +84694,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83328,34 +84706,34 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStartEnhancedHueStep5d = value; } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep5d)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep5d)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83363,7 +84741,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83371,7 +84749,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStoredEnhancedHueStep6c = value; } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83379,10 +84757,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep6c)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83390,10 +84768,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83401,7 +84779,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83409,11 +84787,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83421,34 +84799,34 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStartEnhancedHueStep8d = value; } break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep8d)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep8d)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 36: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83456,7 +84834,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 37: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83464,7 +84842,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStoredEnhancedHueStep9c = value; } break; - case 38: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83472,14 +84850,14 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep9c)); } break; - case 39: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 40: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 41: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83487,10 +84865,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 16384U)); } break; - case 42: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 43: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83498,10 +84876,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } break; - case 44: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 45: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83509,7 +84887,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 46: + case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83517,11 +84895,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 47: + case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 48: + case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83529,34 +84907,34 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStartEnhancedHueStep12d = value; } break; - case 49: + case 50: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep12d)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 50: + case 51: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 51: + case 52: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep12d)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 52: + case 53: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 53: + case 54: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83564,7 +84942,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 54: + case 55: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83572,7 +84950,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStoredEnhancedHueStep13c = value; } break; - case 55: + case 56: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83580,10 +84958,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep13c)); } break; - case 56: + case 57: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 57: + case 58: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83591,10 +84969,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); } break; - case 58: + case 59: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 59: + case 60: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83602,7 +84980,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 60: + case 61: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83610,11 +84988,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 61: + case 62: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 62: + case 63: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83622,34 +85000,34 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStartEnhancedHueStep15d = value; } break; - case 63: + case 64: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep15d)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 64: + case 65: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 65: + case 66: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep15d)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 66: + case 67: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 67: + case 68: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83657,7 +85035,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 68: + case 69: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83665,7 +85043,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStoredEnhancedHueStep16b = value; } break; - case 69: + case 70: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83673,10 +85051,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep16b)); } break; - case 70: + case 71: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 71: + case 72: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -83720,7 +85098,7 @@ class Test_TC_CC_9_1Suite : public TestCommand } case 3: { LogStep(3, "Precondition : Set DUT EnhancedCurrentHue to 0x4000 using EnhancedMoveToHue command"); - VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; value.enhancedHue = 16384U; @@ -83741,8 +85119,17 @@ class Test_TC_CC_9_1Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.A000f && CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 6: { + LogStep(6, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; value.updateFlags = static_cast>(1U); @@ -83757,15 +85144,16 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 6: { - LogStep(6, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; value.updateFlags = static_cast>(2U); @@ -83780,15 +85168,16 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 8: { - LogStep(8, "Read ColorLoopDirection attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "Read ColorLoopDirection attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 10: { + LogStep(10, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; value.updateFlags = static_cast>(4U); @@ -83803,15 +85192,16 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 10: { - LogStep(10, "Read ColorLoopTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 11: { + LogStep(11, "Read ColorLoopTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4004 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 12: { + LogStep(12, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; value.updateFlags = static_cast>(8U); @@ -83826,15 +85216,16 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 12: { - LogStep(12, "Read ColorLoopStartEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 13: { + LogStep(13, "Read ColorLoopStartEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 14: { + LogStep(14, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; value.updateFlags = static_cast>(1U); @@ -83849,53 +85240,58 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 14: { - LogStep(14, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 15: { + LogStep(15, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Read ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 16: { + LogStep(16, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Wait for 30S"); + case 17: { + LogStep(17, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "Read ColorLoopStartEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 18: { + LogStep(18, "Read ColorLoopStartEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 19: { + LogStep(19, "Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "Wait for 30S"); + case 20: { + LogStep(20, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 20: { - LogStep(20, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 21: { + LogStep(21, "Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 22: { + LogStep(22, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; value.updateFlags = static_cast>(1U); @@ -83910,27 +85306,30 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 22: { - LogStep(22, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 23: { + LogStep(23, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 24: { + LogStep(24, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 25: { + LogStep(25, "Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; value.updateFlags = static_cast>(2U); @@ -83945,15 +85344,16 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 26: { - LogStep(26, "Read ColorLoopDirection attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 27: { + LogStep(27, "Read ColorLoopDirection attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 28: { + LogStep(28, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; value.updateFlags = static_cast>(1U); @@ -83968,53 +85368,58 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 28: { - LogStep(28, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 29: { + LogStep(29, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 29: { - LogStep(29, "Read ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 30: { + LogStep(30, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 30: { - LogStep(30, "Wait for 30S"); + case 31: { + LogStep(31, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 31: { - LogStep(31, "Read ColorLoopStartEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 32: { + LogStep(32, "Read ColorLoopStartEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 32: { - LogStep(32, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 33: { + LogStep(33, "Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 33: { - LogStep(33, "Wait for 30S"); + case 34: { + LogStep(34, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 34: { - LogStep(34, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 35: { + LogStep(35, "Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 35: { - LogStep(35, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 36: { + LogStep(36, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; value.updateFlags = static_cast>(1U); @@ -84029,27 +85434,30 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 36: { - LogStep(36, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 37: { + LogStep(37, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 37: { - LogStep(37, "Read ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 38: { + LogStep(38, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 38: { - LogStep(38, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 39: { + LogStep(39, "Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 39: { - LogStep(39, "Enhanced Move To Hue command"); - VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 40: { + LogStep(40, "Enhanced Move To Hue command"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; value.enhancedHue = 16384U; @@ -84062,22 +85470,23 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 40: { - LogStep(40, "Wait 1000ms"); + case 41: { + LogStep(41, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 41: { - LogStep(41, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 42: { + LogStep(42, "Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 42: { - LogStep(42, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 43: { + LogStep(43, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; value.updateFlags = static_cast>(2U); @@ -84092,15 +85501,16 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 43: { - LogStep(43, "Read ColorLoopDirection attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 44: { + LogStep(44, "Read ColorLoopDirection attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 44: { - LogStep(44, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 45: { + LogStep(45, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; value.updateFlags = static_cast>(1U); @@ -84115,53 +85525,58 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 45: { - LogStep(45, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 46: { + LogStep(46, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 46: { - LogStep(46, "Read ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 47: { + LogStep(47, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 47: { - LogStep(47, "Wait for 30S"); + case 48: { + LogStep(48, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 48: { - LogStep(48, "Read ColorLoopStartEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 49: { + LogStep(49, "Read ColorLoopStartEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 49: { - LogStep(49, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 50: { + LogStep(50, "Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 50: { - LogStep(50, "Wait for 30S"); + case 51: { + LogStep(51, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 51: { - LogStep(51, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 52: { + LogStep(52, "Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 52: { - LogStep(52, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 53: { + LogStep(53, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; value.updateFlags = static_cast>(1U); @@ -84176,27 +85591,30 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 53: { - LogStep(53, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 54: { + LogStep(54, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 54: { - LogStep(54, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 55: { + LogStep(55, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 55: { - LogStep(55, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 56: { + LogStep(56, "Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 56: { - LogStep(56, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 57: { + LogStep(57, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; value.updateFlags = static_cast>(2U); @@ -84211,15 +85629,16 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 57: { - LogStep(57, "Read ColorLoopDirection attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 58: { + LogStep(58, "Read ColorLoopDirection attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 58: { - LogStep(58, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 59: { + LogStep(59, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; value.updateFlags = static_cast>(1U); @@ -84234,53 +85653,58 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 59: { - LogStep(59, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 60: { + LogStep(60, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 60: { - LogStep(60, "Read ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 61: { + LogStep(61, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 61: { - LogStep(61, "Wait for 30S"); + case 62: { + LogStep(62, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 62: { - LogStep(62, "Read ColorLoopStartEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 63: { + LogStep(63, "Read ColorLoopStartEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 63: { - LogStep(63, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 64: { + LogStep(64, "Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 64: { - LogStep(64, "Wait for 30S"); + case 65: { + LogStep(65, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 65: { - LogStep(65, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 66: { + LogStep(66, "Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 66: { - LogStep(66, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 67: { + LogStep(67, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; value.updateFlags = static_cast>(1U); @@ -84295,34 +85719,37 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 67: { - LogStep(67, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 68: { + LogStep(68, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 68: { - LogStep(68, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 69: { + LogStep(69, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 69: { - LogStep(69, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 70: { + LogStep(70, "Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 70: { - LogStep(70, "Turn Off light for color control tests"); + case 71: { + LogStep(71, "Turn Off light for color control tests"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 71: { - LogStep(71, "Check on/off attribute value is false after off command"); + case 72: { + LogStep(72, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -84333,7 +85760,7 @@ class Test_TC_CC_9_1Suite : public TestCommand class Test_TC_CC_9_2Suite : public TestCommand { public: - Test_TC_CC_9_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_2", 31, credsIssuerConfig) + Test_TC_CC_9_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_2", 32, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -84393,6 +85820,9 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -84400,7 +85830,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -84408,7 +85838,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84416,7 +85846,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopTime", value, 30U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84424,10 +85854,10 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -84435,7 +85865,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84443,11 +85873,11 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84455,34 +85885,34 @@ class Test_TC_CC_9_2Suite : public TestCommand ColorLoopStartEnhancedHueValue = value; } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -84490,11 +85920,11 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84502,34 +85932,34 @@ class Test_TC_CC_9_2Suite : public TestCommand ColorLoopStartEnhancedHue = value; } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -84537,7 +85967,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84545,7 +85975,7 @@ class Test_TC_CC_9_2Suite : public TestCommand ColorLoopStoredEnhancedHueValue = value; } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84553,10 +85983,10 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue)); } break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -84621,7 +86051,16 @@ class Test_TC_CC_9_2Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "Sends ColorLoopSet Command - Set all Attributes"); + LogStep(5, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.A000f && CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 6: { + LogStep(6, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -84637,32 +86076,36 @@ class Test_TC_CC_9_2Suite : public TestCommand ); } - case 6: { - LogStep(6, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Read ColorLoopDirection attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "Read ColorLoopDirection attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4003 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Read ColorLoopTime attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "Read ColorLoopTime attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4004 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Read ColorLoopStartEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 10: { + LogStep(10, "Read ColorLoopStartEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Color Loop Set Command - Set all Attributes"); + case 11: { + LogStep(11, "Color Loop Set Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -84678,52 +86121,57 @@ class Test_TC_CC_9_2Suite : public TestCommand ); } - case 11: { - LogStep(11, "Read ColorLoopActive attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 12: { + LogStep(12, "Read ColorLoopActive attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 13: { + LogStep(13, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4006 && CC.S.C40.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Wait for 30S"); + case 14: { + LogStep(14, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 14: { - LogStep(14, "Read ColorLoopStartEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 15: { + LogStep(15, "Read ColorLoopStartEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 16: { + LogStep(16, "Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Wait for 30S"); + case 17: { + LogStep(17, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 18: { + LogStep(18, "Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Color Loop Set Command - Start Color Loop"); + case 19: { + LogStep(19, "Color Loop Set Command - Start Color Loop"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -84739,46 +86187,50 @@ class Test_TC_CC_9_2Suite : public TestCommand ); } - case 19: { - LogStep(19, "Read ColorLoopDirection attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 20: { + LogStep(20, "Read ColorLoopDirection attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4003 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "Wait for 30S"); + case 21: { + LogStep(21, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 21: { - LogStep(21, "Read ColorLoopStartEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 22: { + LogStep(22, "Read ColorLoopStartEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 23: { + LogStep(23, "Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Wait for 30S"); + case 24: { + LogStep(24, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 24: { - LogStep(24, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 25: { + LogStep(25, "Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Color Loop Set Command - Start Color Loop"); + case 26: { + LogStep(26, "Color Loop Set Command - Start Color Loop"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -84794,34 +86246,37 @@ class Test_TC_CC_9_2Suite : public TestCommand ); } - case 26: { - LogStep(26, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 27: { + LogStep(27, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 28: { + LogStep(28, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4006 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Read EnhancedCurrentHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 29: { + LogStep(29, "Read EnhancedCurrentHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 29: { - LogStep(29, "Turn off light for color control tests"); + case 30: { + LogStep(30, "Turn off light for color control tests"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 30: { - LogStep(30, "Check on/off attribute value is false after off command"); + case 31: { + LogStep(31, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -84832,7 +86287,7 @@ class Test_TC_CC_9_2Suite : public TestCommand class Test_TC_CC_9_3Suite : public TestCommand { public: - Test_TC_CC_9_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_3", 30, credsIssuerConfig) + Test_TC_CC_9_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_3", 31, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -84891,6 +86346,9 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -84898,7 +86356,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -84906,7 +86364,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84914,7 +86372,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopTime", value, 30U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84922,10 +86380,10 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -84933,7 +86391,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84941,11 +86399,11 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84953,34 +86411,34 @@ class Test_TC_CC_9_3Suite : public TestCommand ColorLoopStartEnhancedHueValue = value; } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84988,38 +86446,38 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopTime", value, 60U)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -85027,7 +86485,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -85035,7 +86493,7 @@ class Test_TC_CC_9_3Suite : public TestCommand ColorLoopStoredEnhancedHueValue = value; } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -85043,10 +86501,10 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue)); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -85111,7 +86569,16 @@ class Test_TC_CC_9_3Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "Sends ColorLoopSet Command - Set all Attributes"); + LogStep(5, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.A000f && CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 6: { + LogStep(6, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -85127,32 +86594,36 @@ class Test_TC_CC_9_3Suite : public TestCommand ); } - case 6: { - LogStep(6, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Read ColorLoopDirection attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "Read ColorLoopDirection attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4003 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Read ColorLoopTime attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "Read ColorLoopTime attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4004 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Read ColorLoopStartEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 10: { + LogStep(10, "Read ColorLoopStartEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Color Loop Set Command - Set all Attributes"); + case 11: { + LogStep(11, "Color Loop Set Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -85168,52 +86639,57 @@ class Test_TC_CC_9_3Suite : public TestCommand ); } - case 11: { - LogStep(11, "Read ColorLoopActive attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 12: { + LogStep(12, "Read ColorLoopActive attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 13: { + LogStep(13, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4006 && CC.S.C40.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Wait for 30S"); + case 14: { + LogStep(14, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 14: { - LogStep(14, "Read ColorLoopStartEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 15: { + LogStep(15, "Read ColorLoopStartEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 16: { + LogStep(16, "Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Wait for 30S"); + case 17: { + LogStep(17, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 18: { + LogStep(18, "Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Color Loop Set Command - Start Color Loop"); + case 19: { + LogStep(19, "Color Loop Set Command - Start Color Loop"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -85229,40 +86705,43 @@ class Test_TC_CC_9_3Suite : public TestCommand ); } - case 19: { - LogStep(19, "Read ColorLoopTime attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 20: { + LogStep(20, "Read ColorLoopTime attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4004 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "Wait for 60S"); + case 21: { + LogStep(21, "Wait for 60S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 60000UL; return WaitForMs(kIdentityAlpha, value); } - case 21: { - LogStep(21, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 22: { + LogStep(22, "Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "Wait for 60S"); + case 23: { + LogStep(23, "Wait for 60S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 60000UL; return WaitForMs(kIdentityAlpha, value); } - case 23: { - LogStep(23, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 24: { + LogStep(24, "Read EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Color Loop Set Command - Start Color Loop"); + case 25: { + LogStep(25, "Color Loop Set Command - Start Color Loop"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -85278,34 +86757,37 @@ class Test_TC_CC_9_3Suite : public TestCommand ); } - case 25: { - LogStep(25, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 27: { + LogStep(27, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4006 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "Read EnhancedCurrentHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 28: { + LogStep(28, "Read EnhancedCurrentHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Turn off light for color control tests"); + case 29: { + LogStep(29, "Turn off light for color control tests"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 29: { - LogStep(29, "Check on/off attribute value is false after off command"); + case 30: { + LogStep(30, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -88091,7 +89573,7 @@ class Test_TC_RH_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); } @@ -88101,7 +89583,7 @@ class Test_TC_RH_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); } @@ -88111,7 +89593,7 @@ class Test_TC_RH_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); ValueBeforeChange = value; @@ -88126,7 +89608,7 @@ class Test_TC_RH_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintNotValue("value", value, ValueBeforeChange)); } break; @@ -88160,7 +89642,7 @@ class Test_TC_RH_2_2Suite : public TestCommand } case 2: { LogStep(2, "Reads constraints of attribute: MaxMeasuredValue"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("RH.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); } @@ -88182,7 +89664,7 @@ class Test_TC_RH_2_2Suite : public TestCommand } case 5: { LogStep(5, "Read the mandatory attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("RH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("RH.S.A0000 && RH.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, RelativeHumidityMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); } @@ -88247,62 +89729,6 @@ class Test_TC_RH_3_1Suite : public TestCommand } }; -class Test_TC_SWTCH_1_1Suite : public TestCommand -{ -public: - Test_TC_SWTCH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_1_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SWTCH_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_SWTCH_2_2Suite : public TestCommand { public: @@ -88518,7 +89944,7 @@ class Test_TC_TMP_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32766)); } @@ -88528,7 +89954,7 @@ class Test_TC_TMP_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } @@ -88538,9 +89964,9 @@ class Test_TC_TMP_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535)); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); valueBeforeChange = value; } break; @@ -88553,9 +89979,9 @@ class Test_TC_TMP_2_2Suite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535)); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); VerifyOrReturn(CheckConstraintNotValue("value", value, valueBeforeChange)); } break; @@ -88582,13 +90008,13 @@ class Test_TC_TMP_2_2Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "read the mandatory attribute: MinMeasuredValue"); + LogStep(1, "Read the mandatory attribute: MinMeasuredValue"); VerifyOrDo(!ShouldSkip("TMP.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, TemperatureMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "read the mandatory attribute: MaxMeasuredValue"); + LogStep(2, "Read the mandatory attribute: MaxMeasuredValue"); VerifyOrDo(!ShouldSkip("TMP.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, TemperatureMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); @@ -88611,7 +90037,7 @@ class Test_TC_TMP_2_2Suite : public TestCommand } case 5: { LogStep(5, "Read the mandatory attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TMP.S.A0000 && TMP.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); } @@ -89904,7 +91330,7 @@ class Test_TC_LUNIT_3_1Suite : public TestCommand { chip::app::Clusters::UnitLocalization::TempUnit value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); } break; case 2: @@ -91542,6 +92968,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -91802,8 +93229,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -91811,8 +93236,8 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -91913,7 +93338,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), 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 938eb20186a6e7..bf587ab668726f 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -4357,8 +4357,8 @@ class LevelControlMoveToLevel : public ClusterCommand { { AddArgument("Level", 0, UINT8_MAX, &mRequest.level); AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); - AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -4375,8 +4375,8 @@ class LevelControlMoveToLevel : public ClusterCommand { = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.level = [NSNumber numberWithUnsignedChar:mRequest.level]; params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionMask = [NSNumber numberWithUnsignedChar:mRequest.optionMask]; - params.optionOverride = [NSNumber numberWithUnsignedChar:mRequest.optionOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -4409,8 +4409,8 @@ class LevelControlMove : public ClusterCommand { { AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); - AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); - AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -4427,8 +4427,8 @@ class LevelControlMove : public ClusterCommand { = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; params.rate = [NSNumber numberWithUnsignedChar:mRequest.rate]; - params.optionMask = [NSNumber numberWithUnsignedChar:mRequest.optionMask]; - params.optionOverride = [NSNumber numberWithUnsignedChar:mRequest.optionOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -4462,8 +4462,8 @@ class LevelControlStep : public ClusterCommand { AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); - AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -4481,8 +4481,8 @@ class LevelControlStep : public ClusterCommand { params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; params.stepSize = [NSNumber numberWithUnsignedChar:mRequest.stepSize]; params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionMask = [NSNumber numberWithUnsignedChar:mRequest.optionMask]; - params.optionOverride = [NSNumber numberWithUnsignedChar:mRequest.optionOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -4513,8 +4513,8 @@ class LevelControlStop : public ClusterCommand { LevelControlStop() : ClusterCommand("stop") { - AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); - AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -4529,8 +4529,8 @@ class LevelControlStop : public ClusterCommand { __auto_type * params = [[MTRLevelControlClusterStopParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.optionMask = [NSNumber numberWithUnsignedChar:mRequest.optionMask]; - params.optionOverride = [NSNumber numberWithUnsignedChar:mRequest.optionOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -4563,6 +4563,8 @@ class LevelControlMoveToLevelWithOnOff : public ClusterCommand { { AddArgument("Level", 0, UINT8_MAX, &mRequest.level); AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -4579,6 +4581,8 @@ class LevelControlMoveToLevelWithOnOff : public ClusterCommand { = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.level = [NSNumber numberWithUnsignedChar:mRequest.level]; params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -4611,6 +4615,8 @@ class LevelControlMoveWithOnOff : public ClusterCommand { { AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -4627,6 +4633,8 @@ class LevelControlMoveWithOnOff : public ClusterCommand { = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; params.rate = [NSNumber numberWithUnsignedChar:mRequest.rate]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -4660,6 +4668,8 @@ class LevelControlStepWithOnOff : public ClusterCommand { AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -4677,6 +4687,8 @@ class LevelControlStepWithOnOff : public ClusterCommand { params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; params.stepSize = [NSNumber numberWithUnsignedChar:mRequest.stepSize]; params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -4707,6 +4719,8 @@ class LevelControlStopWithOnOff : public ClusterCommand { LevelControlStopWithOnOff() : ClusterCommand("stop-with-on-off") { + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } @@ -4721,6 +4735,8 @@ class LevelControlStopWithOnOff : public ClusterCommand { __auto_type * params = [[MTRLevelControlClusterStopWithOnOffParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -4740,6 +4756,7 @@ class LevelControlStopWithOnOff : public ClusterCommand { } private: + chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Type mRequest; }; /* diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 9bb662a107588d..b2de0c17c387ae 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -130,6 +130,7 @@ class TestList : public Command { printf("Test_TC_PSCFG_1_1\n"); printf("Test_TC_RH_1_1\n"); printf("Test_TC_RH_2_1\n"); + printf("Test_TC_SWTCH_1_1\n"); printf("Test_TC_SWTCH_2_1\n"); printf("Test_TC_TMP_1_1\n"); printf("Test_TC_TMP_2_1\n"); @@ -2235,7 +2236,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -2260,7 +2261,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -2280,7 +2281,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); @@ -2312,7 +2313,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -2337,7 +2338,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -2461,7 +2462,7 @@ class Test_TC_BOOL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("stateValue", "", "bool")); + VerifyOrReturn(CheckConstraintType("stateValue", "boolean", "boolean")); NextTest(); }]; @@ -2521,19 +2522,15 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("ACT.S.A0002")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); - if (ShouldSkip(" !ACT.S.A0002 ")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(SetupURL) in AttributeList\n"); + if (ShouldSkip("ACT.S.A0002")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_4(); + err = TestReadTheOptionalAttributeSetupURLInAttributeList_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); @@ -2633,7 +2630,7 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -2658,7 +2655,7 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -2678,10 +2675,9 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); NextTest(); }]; @@ -2689,7 +2685,7 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() + CHIP_ERROR TestReadTheOptionalAttributeSetupURLInAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterBridgedActions * cluster = [[MTRBaseClusterBridgedActions alloc] initWithDevice:device @@ -2698,13 +2694,14 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(SetupURL) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); NextTest(); }]; @@ -2725,12 +2722,8 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintMaxLength("acceptedCommandList", value, 11)); NextTest(); }]; @@ -2755,7 +2748,7 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -2925,7 +2918,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -2945,7 +2938,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 31UL)); @@ -2968,7 +2961,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 16385UL)); @@ -2998,7 +2991,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -3023,7 +3016,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -3751,7 +3744,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 255U)); @@ -3774,7 +3767,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 255U)); @@ -3797,7 +3790,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("remainingTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("remainingTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("remainingTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("remainingTime", [value unsignedShortValue], 65535U)); @@ -3820,7 +3813,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); @@ -3843,7 +3836,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); @@ -3866,7 +3859,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("driftCompensation", "", "enum8")); + VerifyOrReturn(CheckConstraintType("driftCompensation", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("driftCompensation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("driftCompensation", [value unsignedCharValue], 4U)); @@ -3889,7 +3882,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("compensationText", "", "string")); + VerifyOrReturn(CheckConstraintType("compensationText", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("compensationText", value, 254)); NextTest(); }]; @@ -3910,7 +3903,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); @@ -3933,7 +3926,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("colorMode", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 2U)); @@ -3956,7 +3949,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("options", "", "bitmap8")); + VerifyOrReturn(CheckConstraintType("options", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("options", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("options", [value unsignedCharValue], 4U)); @@ -3979,7 +3972,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); @@ -4002,7 +3995,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedColorMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("enhancedColorMode", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("enhancedColorMode", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedColorMode", [value unsignedCharValue], 3U)); @@ -4025,7 +4018,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorLoopActive", "", "uint8")); + VerifyOrReturn(CheckConstraintType("colorLoopActive", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("colorLoopActive", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorLoopActive", [value unsignedCharValue], 255U)); @@ -4048,7 +4041,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorLoopDirection", "", "uint8")); + VerifyOrReturn(CheckConstraintType("colorLoopDirection", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("colorLoopDirection", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorLoopDirection", [value unsignedCharValue], 255U)); @@ -4071,7 +4064,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorLoopTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorLoopTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorLoopTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorLoopTime", [value unsignedShortValue], 65535U)); @@ -4095,7 +4088,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorLoopStartEnhancedHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorLoopStartEnhancedHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorLoopStartEnhancedHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorLoopStartEnhancedHue", [value unsignedShortValue], 65535U)); @@ -4119,7 +4112,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorLoopStoredEnhancedHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorLoopStoredEnhancedHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorLoopStoredEnhancedHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorLoopStoredEnhancedHue", [value unsignedShortValue], 65535U)); @@ -4171,7 +4164,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ColorCapabilities", actualValue, FeatureMapValue)); } - VerifyOrReturn(CheckConstraintType("colorCapabilities", "", "map16")); + VerifyOrReturn(CheckConstraintType("colorCapabilities", "bitmap16", "bitmap16")); VerifyOrReturn(CheckConstraintMinValue("colorCapabilities", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorCapabilities", [value unsignedShortValue], 31U)); @@ -4195,7 +4188,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTempPhysicalMinMireds", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMinMireds", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 65279U)); @@ -4219,7 +4212,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTempPhysicalMaxMireds", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMaxMireds", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 65279U)); @@ -4243,7 +4236,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("coupleColorTempToLevelMinMireds", "", "uint16")); + VerifyOrReturn(CheckConstraintType("coupleColorTempToLevelMinMireds", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("coupleColorTempToLevelMinMireds", [value unsignedShortValue], 0U)); VerifyOrReturn( CheckConstraintMaxValue("coupleColorTempToLevelMinMireds", [value unsignedShortValue], 65279U)); @@ -4268,7 +4261,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("startUpColorTemperatureMireds", "", "uint16")); + VerifyOrReturn(CheckConstraintType("startUpColorTemperatureMireds", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("startUpColorTemperatureMireds", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("startUpColorTemperatureMireds", [value unsignedShortValue], 65279U)); @@ -4293,7 +4286,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("numberOfPrimaries", "", "uint8")); + VerifyOrReturn(CheckConstraintType("numberOfPrimaries", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("numberOfPrimaries", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("numberOfPrimaries", [value unsignedCharValue], 6U)); } @@ -4497,7 +4490,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("whitePointX", "", "uint16")); + VerifyOrReturn(CheckConstraintType("whitePointX", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("whitePointX", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("whitePointX", [value unsignedShortValue], 65279U)); @@ -4520,7 +4513,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("whitePointY", "", "uint16")); + VerifyOrReturn(CheckConstraintType("whitePointY", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("whitePointY", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("whitePointY", [value unsignedShortValue], 65279U)); @@ -4543,7 +4536,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorPointRX", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorPointRX", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorPointRX", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointRX", [value unsignedShortValue], 65279U)); @@ -4566,7 +4559,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorPointRY", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorPointRY", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorPointRY", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointRY", [value unsignedShortValue], 65279U)); @@ -4591,7 +4584,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("colorPointRIntensity", "", "uint8")); + VerifyOrReturn(CheckConstraintType("colorPointRIntensity", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("colorPointRIntensity", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointRIntensity", [value unsignedCharValue], 255U)); } @@ -4615,7 +4608,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorPointGX", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorPointGX", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorPointGX", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointGX", [value unsignedShortValue], 65279U)); @@ -4638,7 +4631,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorPointGY", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorPointGY", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorPointGY", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointGY", [value unsignedShortValue], 65279U)); @@ -4663,7 +4656,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("colorPointGIntensity", "", "uint8")); + VerifyOrReturn(CheckConstraintType("colorPointGIntensity", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("colorPointGIntensity", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointGIntensity", [value unsignedCharValue], 255U)); } @@ -4687,7 +4680,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorPointBX", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorPointBX", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorPointBX", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointBX", [value unsignedShortValue], 65279U)); @@ -4710,7 +4703,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorPointBY", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorPointBY", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorPointBY", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointBY", [value unsignedShortValue], 65279U)); @@ -4735,7 +4728,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("colorPointBIntensity", "", "uint8")); + VerifyOrReturn(CheckConstraintType("colorPointBIntensity", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("colorPointBIntensity", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorPointBIntensity", [value unsignedCharValue], 255U)); } @@ -4757,6 +4750,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateConfigValue", 0, UINT8_MAX, &mRateConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -4798,182 +4792,180 @@ class Test_TC_CC_3_2 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A000f")) { NextTest(); return; } - err = TestReadsCurrentHueAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Move hue up command\n"); - if (ShouldSkip("CC.S.F00 && CC.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { NextTest(); return; } - err = TestMoveHueUpCommand_4(); + err = TestThReadsCurrentHueAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 3000ms\n"); - err = TestWait3000ms_5(); - break; - case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends MoveHue command to DUT with MoveMode Up\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_6(); + err = TestThSendsMoveHueCommandToDutWithMoveModeUp_5(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 2000\n"); - err = TestWait2000_7(); + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 3000ms\n"); + err = TestWait3000ms_6(); break; - case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads CurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_8(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_7(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 3000\n"); - err = TestWait3000_9(); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 2000\n"); + err = TestWait2000_8(); break; - case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_10(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 3000\n"); + err = TestWait3000_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Move hue stop command\n"); - if (ShouldSkip("CC.S.F00 && CC.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestMoveHueStopCommand_11(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 1000ms\n"); - err = TestWait1000ms_12(); - break; - case 13: - ChipLogProgress( - chipTool, " ***** Test Step 13 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends MoveHue command to DUT with MoveMode Stop\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_13(); + err = TestThSendsMoveHueCommandToDutWithMoveModeStop_12(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 1000ms\n"); - err = TestWait1000ms_14(); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 1000ms\n"); + err = TestWait1000ms_13(); break; - case 15: - ChipLogProgress( - chipTool, " ***** Test Step 15 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_15(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 1000ms\n"); + err = TestWait1000ms_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Move hue down command\n"); - if (ShouldSkip("CC.S.F00 && CC.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads CurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestMoveHueDownCommand_16(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 1000ms\n"); - err = TestWait1000ms_17(); - break; - case 18: - ChipLogProgress( - chipTool, " ***** Test Step 18 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : TH sends MoveHue command to DUT with MoveMode Down\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_18(); + err = TestThSendsMoveHueCommandToDutWithMoveModeDown_17(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 1000ms\n"); - err = TestWait1000ms_19(); + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 1000ms\n"); + err = TestWait1000ms_18(); break; - case 20: - ChipLogProgress( - chipTool, " ***** Test Step 20 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads CurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_20(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_19(); break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Wait 1000ms\n"); - err = TestWait1000ms_21(); + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 1000ms\n"); + err = TestWait1000ms_20(); break; - case 22: - ChipLogProgress( - chipTool, " ***** Test Step 22 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads CurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_22(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 1000ms\n"); + err = TestWait1000ms_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Move hue stop command\n"); - if (ShouldSkip("CC.S.F00 && CC.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads CurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestMoveHueStopCommand_23(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Wait 1000ms\n"); - err = TestWait1000ms_24(); - break; - case 25: - ChipLogProgress( - chipTool, " ***** Test Step 25 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 24 : TH sends MoveHue command to DUT with MoveMode Stop\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_25(); + err = TestThSendsMoveHueCommandToDutWithMoveModeStop_24(); break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Wait 1000ms\n"); - err = TestWait1000ms_26(); + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Wait 1000ms\n"); + err = TestWait1000ms_25(); break; - case 27: - ChipLogProgress( - chipTool, " ***** Test Step 27 : Check current hue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : TH reads CurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_27(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Wait 1000ms\n"); + err = TestWait1000ms_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : TH reads CurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_28(); break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_29(); + ChipLogProgress(chipTool, " ***** Test Step 29 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_30(); break; } @@ -5076,6 +5068,9 @@ class Test_TC_CC_3_2 : public TestCommandBridge { case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -5089,11 +5084,12 @@ class Test_TC_CC_3_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 30; + const uint16_t mTestCount = 31; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -5142,7 +5138,29 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsCurrentHueAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5151,11 +5169,11 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentHue attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); @@ -5165,7 +5183,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveHueUpCommand_4() + CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveModeUp_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5175,12 +5193,13 @@ class Test_TC_CC_3_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedChar:50U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveHueWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move hue up command Error: %@", err); + NSLog(@"TH sends MoveHue command to DUT with MoveMode Up Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5190,14 +5209,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait3000ms_5() + CHIP_ERROR TestWait3000ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 3000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_6() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5206,11 +5225,11 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); @@ -5220,14 +5239,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait2000_7() + CHIP_ERROR TestWait2000_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 2000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_8() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5236,11 +5255,11 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); @@ -5250,14 +5269,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait3000_9() + CHIP_ERROR TestWait3000_10() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 3000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_10() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5266,11 +5285,11 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); @@ -5280,7 +5299,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveHueStopCommand_11() + CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveModeStop_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5290,12 +5309,13 @@ class Test_TC_CC_3_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedChar:50U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveHueWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move hue stop command Error: %@", err); + NSLog(@"TH sends MoveHue command to DUT with MoveMode Stop Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5305,7 +5325,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_12() + CHIP_ERROR TestWait1000ms_13() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; @@ -5313,7 +5333,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { } NSNumber * _Nonnull CurrentHueValue; - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_13() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5322,11 +5342,11 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); { @@ -5339,14 +5359,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_14() + CHIP_ERROR TestWait1000ms_15() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_15() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5355,7 +5375,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5370,7 +5390,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveHueDownCommand_16() + CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveModeDown_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5380,12 +5400,13 @@ class Test_TC_CC_3_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:3U]; - params.rate = [NSNumber numberWithUnsignedChar:50U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveHueWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move hue down command Error: %@", err); + NSLog(@"TH sends MoveHue command to DUT with MoveMode Down Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5395,14 +5416,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_17() + CHIP_ERROR TestWait1000ms_18() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_18() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5411,11 +5432,11 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); @@ -5425,14 +5446,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_19() + CHIP_ERROR TestWait1000ms_20() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_20() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5441,11 +5462,11 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); @@ -5455,14 +5476,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_21() + CHIP_ERROR TestWait1000ms_22() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_22() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_23() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5471,11 +5492,11 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); @@ -5485,7 +5506,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveHueStopCommand_23() + CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveModeStop_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5495,12 +5516,13 @@ class Test_TC_CC_3_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedChar:50U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveHueWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move hue stop command Error: %@", err); + NSLog(@"TH sends MoveHue command to DUT with MoveMode Stop Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5510,7 +5532,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_24() + CHIP_ERROR TestWait1000ms_25() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; @@ -5518,7 +5540,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { } NSNumber * _Nonnull CurrentHueValueAfterStopmode; - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_25() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5527,11 +5549,11 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); { @@ -5544,14 +5566,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_26() + CHIP_ERROR TestWait1000ms_27() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_27() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_28() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5560,7 +5582,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current hue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5575,7 +5597,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_28() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_29() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5592,7 +5614,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_29() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_30() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5625,6 +5647,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("StepSizeConfigValue", 0, UINT8_MAX, &mStepSizeConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -5666,60 +5689,68 @@ class Test_TC_CC_3_3 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A000f")) { NextTest(); return; } - err = TestReadsCurrentHueAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step hue up command\n"); - if (ShouldSkip("CC.S.F00 && CC.S.C02.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { NextTest(); return; } - err = TestStepHueUpCommand_4(); + err = TestThReadsCurrentHueAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 1000ms\n"); - err = TestWait1000ms_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Over TransitionTime,Read CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends StepHue command to DUT with StepMode Up\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C02.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeReadCurrentHueAttributeFromDut_6(); + err = TestThSendsStepHueCommandToDutWithStepModeUp_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); + err = TestWait1000ms_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step hue down command\n"); - if (ShouldSkip("CC.S.F00 && CC.S.C02.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Over TransitionTime, TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C02.Rsp")) { NextTest(); return; } - err = TestStepHueDownCommand_7(); + err = TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 1000ms\n"); - err = TestWait1000ms_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Over TransitionTime,Read CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends StepHue command to DUT with StepMode Down\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C02.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeReadCurrentHueAttributeFromDut_9(); + err = TestThSendsStepHueCommandToDutWithStepModeDown_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1000ms\n"); + err = TestWait1000ms_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Over TransitionTime, TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C02.Rsp")) { + NextTest(); + return; + } + err = TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12(); break; } @@ -5768,6 +5799,9 @@ class Test_TC_CC_3_3 : public TestCommandBridge { case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -5781,11 +5815,12 @@ class Test_TC_CC_3_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 13; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mStepSizeConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -5834,7 +5869,29 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsCurrentHueAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5843,11 +5900,11 @@ class Test_TC_CC_3_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentHue attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); @@ -5857,7 +5914,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStepHueUpCommand_4() + CHIP_ERROR TestThSendsStepHueCommandToDutWithStepModeUp_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5867,13 +5924,14 @@ class Test_TC_CC_3_3 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterStepHueParams alloc] init]; params.stepMode = [NSNumber numberWithUnsignedChar:1U]; - params.stepSize = [NSNumber numberWithUnsignedChar:5U]; + params.stepSize = mStepSizeConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mStepSizeConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:5U]; params.transitionTime = [NSNumber numberWithUnsignedChar:5U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepHueWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Step hue up command Error: %@", err); + NSLog(@"TH sends StepHue command to DUT with StepMode Up Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5883,14 +5941,14 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_5() + CHIP_ERROR TestWait1000ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeReadCurrentHueAttributeFromDut_6() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5899,11 +5957,11 @@ class Test_TC_CC_3_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime,Read CurrentHue attribute from DUT Error: %@", err); + NSLog(@"Over TransitionTime, TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 5U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); @@ -5913,7 +5971,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStepHueDownCommand_7() + CHIP_ERROR TestThSendsStepHueCommandToDutWithStepModeDown_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5923,13 +5981,14 @@ class Test_TC_CC_3_3 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterStepHueParams alloc] init]; params.stepMode = [NSNumber numberWithUnsignedChar:3U]; - params.stepSize = [NSNumber numberWithUnsignedChar:5U]; + params.stepSize = mStepSizeConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mStepSizeConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:5U]; params.transitionTime = [NSNumber numberWithUnsignedChar:5U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepHueWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Step hue down command Error: %@", err); + NSLog(@"TH sends StepHue command to DUT with StepMode Down Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5939,14 +5998,14 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_8() + CHIP_ERROR TestWait1000ms_9() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeReadCurrentHueAttributeFromDut_9() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5955,11 +6014,11 @@ class Test_TC_CC_3_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime,Read CurrentHue attribute from DUT Error: %@", err); + NSLog(@"Over TransitionTime, TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 249U)); @@ -5969,7 +6028,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5986,7 +6045,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -6019,6 +6078,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("SaturationConfigValue", 0, UINT8_MAX, &mSaturationConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -6060,67 +6120,48 @@ class Test_TC_CC_4_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Check Saturation attribute value matched before any change\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A000f")) { NextTest(); return; } - err = TestCheckSaturationAttributeValueMatchedBeforeAnyChange_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Move to saturation command\n"); - if (ShouldSkip("CC.S.F00 && CC.S.C03.Rsp")) { - NextTest(); - return; - } - err = TestMoveToSaturationCommand_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 500ms\n"); - err = TestWait500ms_5(); - break; - case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Check current saturation attribute value matched the value sent by the last command\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentSaturation attribute from DUT\n"); if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 500ms\n"); - err = TestWait500ms_7(); + err = TestThReadsCurrentSaturationAttributeFromDut_4(); break; - case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends MoveToSaturation command to DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C03.Rsp")) { NextTest(); return; } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_8(); + err = TestThSendsMoveToSaturationCommandToDut_5(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1000ms\n"); - err = TestWait1000ms_9(); + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1500ms\n"); + err = TestWait1500ms_6(); break; - case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : Check current saturation attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Over TransitionTime, TH reads CurrentSaturation attribute from DUT.\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C03.Rsp")) { NextTest(); return; } - err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_10(); + err = TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_7(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_11(); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_8(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12(); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_9(); break; } @@ -6163,15 +6204,6 @@ class Test_TC_CC_4_1 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -6185,11 +6217,12 @@ class Test_TC_CC_4_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 13; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mSaturationConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -6238,7 +6271,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckSaturationAttributeValueMatchedBeforeAnyChange_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6246,54 +6279,21 @@ class Test_TC_CC_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check Saturation attribute value matched before any change Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestMoveToSaturationCommand_4() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; - params.saturation = [NSNumber numberWithUnsignedChar:90U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:15U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move to saturation command Error: %@", err); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_5() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_6() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6302,11 +6302,11 @@ class Test_TC_CC_4_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); @@ -6316,14 +6316,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_7() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_8() + CHIP_ERROR TestThSendsMoveToSaturationCommandToDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6331,29 +6324,32 @@ class Test_TC_CC_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; + params.saturation = mSaturationConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mSaturationConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:90U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToSaturation command to DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_9() + CHIP_ERROR TestWait1500ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 1500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_10() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6362,22 +6358,27 @@ class Test_TC_CC_4_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check current saturation attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"Over TransitionTime, TH reads CurrentSaturation attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, 90U)); + VerifyOrReturn(CheckValue( + "CurrentSaturation", actualValue, mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 90U)); } + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_11() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -6394,7 +6395,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -6427,6 +6428,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateConfigValue", 0, UINT8_MAX, &mRateConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -6468,232 +6470,240 @@ class Test_TC_CC_4_2 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends MoveSaturation command to DUT with MoveMode Up\n"); - if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestThSendsMoveSaturationCommandToDutWithMoveModeUp_4(); + err = TestThReadsCurrentSaturationAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 1000ms\n"); - err = TestWait1000ms_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads CurrentSaturation attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends MoveSaturation command to DUT with MoveMode Up\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_6(); + err = TestThSendsMoveSaturationCommandToDutWithMoveModeUp_5(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1000ms\n"); - err = TestWait1000ms_7(); + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); + err = TestWait1000ms_6(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads CurrentSaturation attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads CurrentSaturation attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_8(); + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_7(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1000ms\n"); - err = TestWait1000ms_9(); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 1000ms\n"); + err = TestWait1000ms_8(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads CurrentSaturation attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentSaturation attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_10(); + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 1000ms\n"); + err = TestWait1000ms_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends MoveSaturation command to DUT with MoveMode Down\n"); - if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentSaturation attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThSendsMoveSaturationCommandToDutWithMoveModeDown_11(); + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 1000ms\n"); - err = TestWait1000ms_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads CurrentSaturation attribute from DUT several times.\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends MoveSaturation command to DUT with MoveMode Down\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_13(); + err = TestThSendsMoveSaturationCommandToDutWithMoveModeDown_12(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 1000ms\n"); - err = TestWait1000ms_14(); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 1000ms\n"); + err = TestWait1000ms_13(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads CurrentSaturation attribute from DUT several times.\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CurrentSaturation attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_15(); + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 1000ms\n"); + err = TestWait1000ms_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 1000ms\n"); - err = TestWait1000ms_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads CurrentSaturation attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads CurrentSaturation attribute from DUT several times.\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 1000ms\n"); + err = TestWait1000ms_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads CurrentSaturation attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_17(); + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_18(); break; - case 18: + case 19: ChipLogProgress(chipTool, - " ***** Test Step 18 : TH sends MoveSaturation command to DUT with MoveMode Up to the Maximum allowed " + " ***** Test Step 19 : TH sends MoveSaturation command to DUT with MoveMode Up to the Maximum allowed " "Saturation\n"); if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThSendsMoveSaturationCommandToDutWithMoveModeUpToTheMaximumAllowedSaturation_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 1000ms\n"); - err = TestWait1000ms_19(); + err = TestThSendsMoveSaturationCommandToDutWithMoveModeUpToTheMaximumAllowedSaturation_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 1000ms\n"); + err = TestWait1000ms_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_20(); + err = TestThReadsCurrentSaturationAttributeFromDut_21(); break; - case 21: + case 22: ChipLogProgress(chipTool, - " ***** Test Step 21 : TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the " + " ***** Test Step 22 : TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the " "Maximum allowed.\n"); if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThSendsMoveSaturationCommandToDutWithMoveModeStopBeforeSaturationReachesTheMaximumAllowed_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 1000ms\n"); - err = TestWait1000ms_22(); + err = TestThSendsMoveSaturationCommandToDutWithMoveModeStopBeforeSaturationReachesTheMaximumAllowed_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads CurrentSaturation attribute from DUT.\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 23 : Wait 1000ms\n"); + err = TestWait1000ms_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads CurrentSaturation attribute from DUT.\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Wait 1000ms\n"); - err = TestWait1000ms_24(); + err = TestThReadsCurrentSaturationAttributeFromDut_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : CurrentSaturation value Stops incrementing\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 25 : Wait 1000ms\n"); + err = TestWait1000ms_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : CurrentSaturation value Stops incrementing\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestCurrentSaturationValueStopsIncrementing_25(); + err = TestCurrentSaturationValueStopsIncrementing_26(); break; - case 26: + case 27: ChipLogProgress(chipTool, - " ***** Test Step 26 : TH sends MoveSaturation command to DUT with MoveMode Down to the Minimum allowed " + " ***** Test Step 27 : TH sends MoveSaturation command to DUT with MoveMode Down to the Minimum allowed " "Saturation\n"); if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThSendsMoveSaturationCommandToDutWithMoveModeDownToTheMinimumAllowedSaturation_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Wait 1000ms\n"); - err = TestWait1000ms_27(); + err = TestThSendsMoveSaturationCommandToDutWithMoveModeDownToTheMinimumAllowedSaturation_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : TH reads CurrentSaturation attribute from DUT several times.\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 28 : Wait 1000ms\n"); + err = TestWait1000ms_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : TH reads CurrentSaturation attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_28(); - break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Wait 1000ms\n"); - err = TestWait1000ms_29(); + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : TH reads CurrentSaturation attribute from DUT several times.\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 30 : Wait 1000ms\n"); + err = TestWait1000ms_30(); + break; + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : TH reads CurrentSaturation attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_30(); + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_31(); break; - case 31: + case 32: ChipLogProgress(chipTool, - " ***** Test Step 31 : TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the " + " ***** Test Step 32 : TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the " "Minimum allowed\n"); if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThSendsMoveSaturationCommandToDutWithMoveModeStopBeforeSaturationReachesTheMinimumAllowed_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Wait 1000ms\n"); - err = TestWait1000ms_32(); + err = TestThSendsMoveSaturationCommandToDutWithMoveModeStopBeforeSaturationReachesTheMinimumAllowed_32(); break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 33 : Wait 1000ms\n"); + err = TestWait1000ms_33(); + break; + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_33(); - break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Wait 1000ms\n"); - err = TestWait1000ms_34(); + err = TestThReadsCurrentSaturationAttributeFromDut_34(); break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : CurrentSaturation value Stops decrementing\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 35 : Wait 1000ms\n"); + err = TestWait1000ms_35(); + break; + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : CurrentSaturation value Stops decrementing\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestCurrentSaturationValueStopsDecrementing_35(); - break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_36(); + err = TestCurrentSaturationValueStopsDecrementing_36(); break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_37(); + ChipLogProgress(chipTool, " ***** Test Step 37 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_37(); + break; + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_38(); break; } @@ -6820,6 +6830,9 @@ class Test_TC_CC_4_2 : public TestCommandBridge { case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -6833,11 +6846,12 @@ class Test_TC_CC_4_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 38; + const uint16_t mTestCount = 39; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -6886,7 +6900,29 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6899,7 +6935,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); @@ -6909,7 +6945,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeUp_4() + CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeUp_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6919,7 +6955,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedChar:15U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveSaturationWithParams:params @@ -6934,14 +6971,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_5() + CHIP_ERROR TestWait1000ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_6() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6954,7 +6991,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); @@ -6964,14 +7001,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_7() + CHIP_ERROR TestWait1000ms_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_8() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6984,7 +7021,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); @@ -6994,14 +7031,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_9() + CHIP_ERROR TestWait1000ms_10() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_10() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7014,7 +7051,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); @@ -7024,7 +7061,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeDown_11() + CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeDown_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7034,7 +7071,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:3U]; - params.rate = [NSNumber numberWithUnsignedChar:10U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveSaturationWithParams:params @@ -7049,14 +7087,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_12() + CHIP_ERROR TestWait1000ms_13() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_13() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7069,7 +7107,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); @@ -7079,14 +7117,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_14() + CHIP_ERROR TestWait1000ms_15() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_15() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7099,7 +7137,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); @@ -7109,14 +7147,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_16() + CHIP_ERROR TestWait1000ms_17() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_17() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7129,7 +7167,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); @@ -7139,7 +7177,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeUpToTheMaximumAllowedSaturation_18() + CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeUpToTheMaximumAllowedSaturation_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7149,7 +7187,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedChar:100U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster @@ -7166,14 +7205,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_19() + CHIP_ERROR TestWait1000ms_20() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_20() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7186,7 +7225,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); @@ -7196,7 +7235,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeStopBeforeSaturationReachesTheMaximumAllowed_21() + CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeStopBeforeSaturationReachesTheMaximumAllowed_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7206,7 +7245,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedChar:50U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveSaturationWithParams:params @@ -7223,7 +7263,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_22() + CHIP_ERROR TestWait1000ms_23() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; @@ -7231,7 +7271,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { } NSNumber * _Nonnull CurrentSaturationStep4d; - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_23() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7244,7 +7284,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); { @@ -7257,14 +7297,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_24() + CHIP_ERROR TestWait1000ms_25() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCurrentSaturationValueStopsIncrementing_25() + CHIP_ERROR TestCurrentSaturationValueStopsIncrementing_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7288,7 +7328,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeDownToTheMinimumAllowedSaturation_26() + CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeDownToTheMinimumAllowedSaturation_27() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7298,7 +7338,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:3U]; - params.rate = [NSNumber numberWithUnsignedChar:10U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster @@ -7316,7 +7357,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_27() + CHIP_ERROR TestWait1000ms_28() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; @@ -7324,7 +7365,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { } NSNumber * _Nonnull CurrentSaturationStep5b; - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_28() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_29() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7337,7 +7378,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); { @@ -7350,14 +7391,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_29() + CHIP_ERROR TestWait1000ms_30() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_30() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_31() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7370,7 +7411,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn( CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], CurrentSaturationStep5b)); @@ -7381,7 +7422,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeStopBeforeSaturationReachesTheMinimumAllowed_31() + CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeStopBeforeSaturationReachesTheMinimumAllowed_32() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7391,7 +7432,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedChar:10U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveSaturationWithParams:params @@ -7408,7 +7450,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_32() + CHIP_ERROR TestWait1000ms_33() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; @@ -7416,7 +7458,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { } NSNumber * _Nonnull CurrentSaturationStep5d; - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_33() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_34() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7429,7 +7471,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); { @@ -7442,14 +7484,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_34() + CHIP_ERROR TestWait1000ms_35() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCurrentSaturationValueStopsDecrementing_35() + CHIP_ERROR TestCurrentSaturationValueStopsDecrementing_36() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7473,7 +7515,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_36() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_37() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -7490,7 +7532,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_37() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_38() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -7523,6 +7565,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("StepSizeConfigValue", 0, UINT8_MAX, &mStepSizeConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -7564,60 +7607,68 @@ class Test_TC_CC_4_3 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends StepSaturation command to DUT with StepMode Up\n"); - if (ShouldSkip("CC.S.F00 && CC.S.C05.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestThSendsStepSaturationCommandToDutWithStepModeUp_4(); + err = TestThReadsCurrentSaturationAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 1000ms\n"); - err = TestWait1000ms_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Over TransitionTime,TH read CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends StepSaturation command to DUT with StepMode Up\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C05.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeTHReadCurrentSaturationAttributeFromDut_6(); + err = TestThSendsStepSaturationCommandToDutWithStepModeUp_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); + err = TestWait1000ms_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends StepSaturation command to DUT with StepMode Down\n"); - if (ShouldSkip("CC.S.F00 && CC.S.C05.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Over TransitionTime,TH read CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C05.Rsp")) { NextTest(); return; } - err = TestThSendsStepSaturationCommandToDutWithStepModeDown_7(); + err = TestOverTransitionTimeTHReadCurrentSaturationAttributeFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 1000ms\n"); - err = TestWait1000ms_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Over TransitionTime,TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends StepSaturation command to DUT with StepMode Down\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C05.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeTHReadsCurrentSaturationAttributeFromDut_9(); + err = TestThSendsStepSaturationCommandToDutWithStepModeDown_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1000ms\n"); + err = TestWait1000ms_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Over TransitionTime,TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C05.Rsp")) { + NextTest(); + return; + } + err = TestOverTransitionTimeTHReadsCurrentSaturationAttributeFromDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12(); break; } @@ -7666,6 +7717,9 @@ class Test_TC_CC_4_3 : public TestCommandBridge { case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -7679,11 +7733,12 @@ class Test_TC_CC_4_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 13; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mStepSizeConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -7732,7 +7787,29 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7745,7 +7822,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); @@ -7755,7 +7832,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStepSaturationCommandToDutWithStepModeUp_4() + CHIP_ERROR TestThSendsStepSaturationCommandToDutWithStepModeUp_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7765,7 +7842,8 @@ class Test_TC_CC_4_3 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; params.stepMode = [NSNumber numberWithUnsignedChar:1U]; - params.stepSize = [NSNumber numberWithUnsignedChar:15U]; + params.stepSize = mStepSizeConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mStepSizeConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:15U]; params.transitionTime = [NSNumber numberWithUnsignedChar:10U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; @@ -7781,14 +7859,14 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_5() + CHIP_ERROR TestWait1000ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeTHReadCurrentSaturationAttributeFromDut_6() + CHIP_ERROR TestOverTransitionTimeTHReadCurrentSaturationAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7801,7 +7879,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); @@ -7811,7 +7889,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStepSaturationCommandToDutWithStepModeDown_7() + CHIP_ERROR TestThSendsStepSaturationCommandToDutWithStepModeDown_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7821,7 +7899,8 @@ class Test_TC_CC_4_3 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; params.stepMode = [NSNumber numberWithUnsignedChar:3U]; - params.stepSize = [NSNumber numberWithUnsignedChar:20U]; + params.stepSize = mStepSizeConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mStepSizeConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:15U]; params.transitionTime = [NSNumber numberWithUnsignedChar:10U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; @@ -7837,14 +7916,14 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_8() + CHIP_ERROR TestWait1000ms_9() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeTHReadsCurrentSaturationAttributeFromDut_9() + CHIP_ERROR TestOverTransitionTimeTHReadsCurrentSaturationAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7857,7 +7936,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); @@ -7867,7 +7946,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -7884,7 +7963,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -7917,6 +7996,8 @@ class Test_TC_CC_4_4 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("hueConfigValue", 0, UINT8_MAX, &mHueConfigValue); + AddArgument("SaturationConfigValue", 0, UINT8_MAX, &mSaturationConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -7958,56 +8039,64 @@ class Test_TC_CC_4_4 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads CurrentHue attribute from DUT.\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentHue attribute from DUT.\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A0000")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_4(); + err = TestThReadsCurrentHueAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends MoveToHueAndSaturation command to DUT.\n"); - if (ShouldSkip("CC.S.F01 && CC.S.C06.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A0001")) { NextTest(); return; } - err = TestThSendsMoveToHueAndSaturationCommandToDut_5(); + err = TestThReadsCurrentSaturationAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); - err = TestWait1000ms_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Over TransitionTime, TH reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends MoveToHueAndSaturation command to DUT.\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C06.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_7(); + err = TestThSendsMoveToHueAndSaturationCommandToDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1500ms\n"); + err = TestWait1500ms_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Over TransitionTime, TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Over TransitionTime, TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A0000 && CC.S.C06.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_8(); + err = TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Over TransitionTime, TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A0001 && CC.S.C06.Rsp")) { + NextTest(); + return; + } + err = TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11(); break; } @@ -8053,6 +8142,9 @@ class Test_TC_CC_4_4 : public TestCommandBridge { case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -8066,11 +8158,13 @@ class Test_TC_CC_4_4 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mHueConfigValue; + chip::Optional mSaturationConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -8119,7 +8213,29 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8132,7 +8248,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); @@ -8142,7 +8258,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_4() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8155,7 +8271,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); @@ -8165,7 +8281,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveToHueAndSaturationCommandToDut_5() + CHIP_ERROR TestThSendsMoveToHueAndSaturationCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8174,8 +8290,10 @@ class Test_TC_CC_4_4 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; - params.hue = [NSNumber numberWithUnsignedChar:40U]; - params.saturation = [NSNumber numberWithUnsignedChar:160U]; + params.hue = mHueConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mHueConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:40U]; + params.saturation = mSaturationConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mSaturationConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:160U]; params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; @@ -8191,14 +8309,14 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_6() + CHIP_ERROR TestWait1500ms_7() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 1500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_7() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8211,7 +8329,12 @@ class Test_TC_CC_4_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentHue", actualValue, mHueConfigValue.HasValue() ? mHueConfigValue.Value() : 40U)); + } + + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); @@ -8221,7 +8344,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_8() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8234,7 +8357,13 @@ class Test_TC_CC_4_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + { + id actualValue = value; + VerifyOrReturn(CheckValue( + "CurrentSaturation", actualValue, mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 160U)); + } + + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); @@ -8244,7 +8373,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_9() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -8261,7 +8390,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -8294,6 +8423,8 @@ class Test_TC_CC_5_1 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("colorXConfigValue", 0, UINT16_MAX, &mColorXConfigValue); + AddArgument("colorYConfigValue", 0, UINT16_MAX, &mColorYConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -8335,56 +8466,64 @@ class Test_TC_CC_5_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads CurrentX attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsCurrentXAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_4(); + err = TestThReadsCurrentXAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends MoveToColor command to DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.C07.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004")) { NextTest(); return; } - err = TestThSendsMoveToColorCommandToDut_5(); + err = TestThReadsCurrentYAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1500ms\n"); - err = TestWait1500ms_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Over TransitionTime, TH reads CurrentX attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends MoveToColor command to DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentXAttributeFromDut_7(); + err = TestThSendsMoveToColorCommandToDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1500ms\n"); + err = TestWait1500ms_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Over TransitionTime, TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Over TransitionTime, TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentYAttributeFromDut_8(); + err = TestOverTransitionTimeThReadsCurrentXAttributeFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Over TransitionTime, TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp")) { + NextTest(); + return; + } + err = TestOverTransitionTimeThReadsCurrentYAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11(); break; } @@ -8430,6 +8569,9 @@ class Test_TC_CC_5_1 : public TestCommandBridge { case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -8443,11 +8585,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mColorXConfigValue; + chip::Optional mColorYConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -8496,7 +8640,29 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentXAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8509,7 +8675,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); @@ -8519,7 +8685,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_4() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8532,7 +8698,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); @@ -8542,7 +8708,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveToColorCommandToDut_5() + CHIP_ERROR TestThSendsMoveToColorCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8551,8 +8717,10 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; - params.colorX = [NSNumber numberWithUnsignedShort:200U]; - params.colorY = [NSNumber numberWithUnsignedShort:300U]; + params.colorX = mColorXConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mColorXConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:400U]; + params.colorY = mColorYConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mColorYConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:500U]; params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; @@ -8568,14 +8736,14 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1500ms_6() + CHIP_ERROR TestWait1500ms_7() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentXAttributeFromDut_7() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentXAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8590,10 +8758,11 @@ class Test_TC_CC_5_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentX", actualValue, 200U)); + VerifyOrReturn( + CheckValue("CurrentX", actualValue, mColorXConfigValue.HasValue() ? mColorXConfigValue.Value() : 400U)); } - VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); @@ -8603,7 +8772,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentYAttributeFromDut_8() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentYAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8618,10 +8787,11 @@ class Test_TC_CC_5_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentY", actualValue, 300U)); + VerifyOrReturn( + CheckValue("CurrentY", actualValue, mColorYConfigValue.HasValue() ? mColorYConfigValue.Value() : 500U)); } - VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); @@ -8631,7 +8801,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_9() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -8648,7 +8818,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -8681,6 +8851,8 @@ class Test_TC_CC_5_2 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateXValue", INT16_MIN, INT16_MAX, &mRateXValue); + AddArgument("RateYValue", INT16_MIN, INT16_MAX, &mRateYValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -8722,80 +8894,88 @@ class Test_TC_CC_5_2 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads CurrentX attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsCurrentXAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_4(); + err = TestThReadsCurrentXAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends MoveColor command to DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.C08.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004")) { NextTest(); return; } - err = TestThSendsMoveColorCommandToDut_5(); + err = TestThReadsCurrentYAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); - err = TestWait1000ms_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads CurrentX attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends MoveColor command to DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.C08.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentXAttributeFromDut_7(); + err = TestThSendsMoveColorCommandToDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1000ms\n"); + err = TestWait1000ms_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_8(); + err = TestThReadsCurrentXAttributeFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends StopMoveStep command to DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.C47.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp")) { NextTest(); return; } - err = TestThSendsStopMoveStepCommandToDut_9(); + err = TestThReadsCurrentYAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads CurrentX attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends StopMoveStep command to DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.C47.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentXAttributeFromDut_10(); + err = TestThSendsStopMoveStepCommandToDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C47.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_11(); + err = TestThReadsCurrentXAttributeFromDut_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C47.Rsp")) { + NextTest(); + return; + } + err = TestThReadsCurrentYAttributeFromDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_14(); break; } @@ -8850,6 +9030,9 @@ class Test_TC_CC_5_2 : public TestCommandBridge { case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -8863,11 +9046,13 @@ class Test_TC_CC_5_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 14; + const uint16_t mTestCount = 15; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateXValue; + chip::Optional mRateYValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -8916,7 +9101,30 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentXAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull CurrentXValue; + + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8929,17 +9137,21 @@ class Test_TC_CC_5_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); + { + CurrentXValue = value; + } NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull CurrentYValue; - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_4() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8952,9 +9164,12 @@ class Test_TC_CC_5_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + { + CurrentYValue = value; + } NextTest(); }]; @@ -8962,7 +9177,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorCommandToDut_5() + CHIP_ERROR TestThSendsMoveColorCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8971,8 +9186,8 @@ class Test_TC_CC_5_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveColorParams alloc] init]; - params.rateX = [NSNumber numberWithShort:15]; - params.rateY = [NSNumber numberWithShort:20]; + params.rateX = mRateXValue.HasValue() ? [NSNumber numberWithShort:mRateXValue.Value()] : [NSNumber numberWithShort:50]; + params.rateY = mRateYValue.HasValue() ? [NSNumber numberWithShort:mRateYValue.Value()] : [NSNumber numberWithShort:50]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveColorWithParams:params @@ -8987,14 +9202,15 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_6() + CHIP_ERROR TestWait1000ms_7() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } + NSNumber * _Nonnull CurrentXBeforeStopCommand; - CHIP_ERROR TestThReadsCurrentXAttributeFromDut_7() + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9007,17 +9223,21 @@ class Test_TC_CC_5_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], CurrentXValue)); VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); + { + CurrentXBeforeStopCommand = value; + } NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull CurrentYBeforeStopCommand; - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_8() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9030,9 +9250,12 @@ class Test_TC_CC_5_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], CurrentYValue)); VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + { + CurrentYBeforeStopCommand = value; + } NextTest(); }]; @@ -9040,7 +9263,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStopMoveStepCommandToDut_9() + CHIP_ERROR TestThSendsStopMoveStepCommandToDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9063,7 +9286,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentXAttributeFromDut_10() + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9076,8 +9299,8 @@ class Test_TC_CC_5_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], CurrentXBeforeStopCommand)); VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); NextTest(); @@ -9086,7 +9309,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_11() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9099,8 +9322,8 @@ class Test_TC_CC_5_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], CurrentYBeforeStopCommand)); VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); NextTest(); @@ -9109,7 +9332,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_12() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -9126,7 +9349,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_13() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -9159,6 +9382,8 @@ class Test_TC_CC_5_3 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("StepXConfigValue", INT16_MIN, INT16_MAX, &mStepXConfigValue); + AddArgument("StepYConfigValue", INT16_MIN, INT16_MAX, &mStepYConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -9200,56 +9425,64 @@ class Test_TC_CC_5_3 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads CurrentX attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsCurrentXAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_4(); + err = TestThReadsCurrentXAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends StepColor command to DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.C09.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004")) { NextTest(); return; } - err = TestThSendsStepColorCommandToDut_5(); + err = TestThReadsCurrentYAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); - err = TestWait1000ms_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Over TransitionTime, TH reads CurrentX attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends StepColor command to DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.C09.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentXAttributeFromDut_7(); + err = TestThSendsStepColorCommandToDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1500ms\n"); + err = TestWait1500ms_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Over TransitionTime, TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Over TransitionTime, TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C09.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentYAttributeFromDut_8(); + err = TestOverTransitionTimeThReadsCurrentXAttributeFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Over TransitionTime, TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C09.Rsp")) { + NextTest(); + return; + } + err = TestOverTransitionTimeThReadsCurrentYAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11(); break; } @@ -9295,6 +9528,9 @@ class Test_TC_CC_5_3 : public TestCommandBridge { case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -9308,11 +9544,13 @@ class Test_TC_CC_5_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mStepXConfigValue; + chip::Optional mStepYConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -9361,7 +9599,30 @@ class Test_TC_CC_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentXAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull CurrentXValue; + + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9374,17 +9635,21 @@ class Test_TC_CC_5_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); + { + CurrentXValue = value; + } NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull CurrentYValue; - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_4() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9397,9 +9662,12 @@ class Test_TC_CC_5_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + { + CurrentYValue = value; + } NextTest(); }]; @@ -9407,7 +9675,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStepColorCommandToDut_5() + CHIP_ERROR TestThSendsStepColorCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9416,8 +9684,10 @@ class Test_TC_CC_5_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterStepColorParams alloc] init]; - params.stepX = [NSNumber numberWithShort:15]; - params.stepY = [NSNumber numberWithShort:20]; + params.stepX + = mStepXConfigValue.HasValue() ? [NSNumber numberWithShort:mStepXConfigValue.Value()] : [NSNumber numberWithShort:100]; + params.stepY + = mStepYConfigValue.HasValue() ? [NSNumber numberWithShort:mStepYConfigValue.Value()] : [NSNumber numberWithShort:100]; params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; @@ -9433,14 +9703,14 @@ class Test_TC_CC_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_6() + CHIP_ERROR TestWait1500ms_7() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 1500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentXAttributeFromDut_7() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentXAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9453,8 +9723,8 @@ class Test_TC_CC_5_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], CurrentXValue)); VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); NextTest(); @@ -9463,7 +9733,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentYAttributeFromDut_8() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentYAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9476,8 +9746,8 @@ class Test_TC_CC_5_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], CurrentYValue)); VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); NextTest(); @@ -9486,7 +9756,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_9() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -9503,7 +9773,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -9577,56 +9847,64 @@ class Test_TC_CC_6_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads ColorTempPhysicalMinMireds attribute from DUT\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A400c")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads ColorTempPhysicalMinMireds attribute from DUT\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { NextTest(); return; } - err = TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_4(); + err = TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads ColorTemperatureMireds attribute from DUT.\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400c")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDut_5(); + err = TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Move To Color Temperature command\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C0A.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { NextTest(); return; } - err = TestMoveToColorTemperatureCommand_6(); + err = TestThReadsColorTemperatureMiredsAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1500ms\n"); - err = TestWait1500ms_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Move To Color Temperature command\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C0A.Rsp")) { + NextTest(); + return; + } + err = TestMoveToColorTemperatureCommand_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read current color temprature\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 1500ms\n"); + err = TestWait1500ms_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read current color temprature\n"); if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { NextTest(); return; } - err = TestReadCurrentColorTemprature_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_9(); + err = TestReadCurrentColorTemprature_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11(); break; } @@ -9672,6 +9950,9 @@ class Test_TC_CC_6_1 : public TestCommandBridge { case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -9685,7 +9966,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; @@ -9737,9 +10018,31 @@ class Test_TC_CC_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } NSNumber * _Nonnull ColorTempPhysicalMinMiredsValue; - CHIP_ERROR TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_3() + CHIP_ERROR TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9753,7 +10056,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTempPhysicalMinMireds", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMinMireds", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 65279U)); { @@ -9767,7 +10070,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { } NSNumber * _Nonnull ColorTempPhysicalMaxMiredsValue; - CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_4() + CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9781,7 +10084,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTempPhysicalMaxMireds", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMaxMireds", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 65279U)); { @@ -9794,7 +10097,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_5() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9807,7 +10110,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); VerifyOrReturn( @@ -9819,7 +10122,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveToColorTemperatureCommand_6() + CHIP_ERROR TestMoveToColorTemperatureCommand_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9828,7 +10131,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; - params.colorTemperature = [NSNumber numberWithUnsignedShort:100U]; + params.colorTemperature = [ColorTempPhysicalMaxMiredsValue copy]; params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; @@ -9844,14 +10147,14 @@ class Test_TC_CC_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1500ms_7() + CHIP_ERROR TestWait1500ms_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTemprature_8() + CHIP_ERROR TestReadCurrentColorTemprature_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9866,10 +10169,10 @@ class Test_TC_CC_6_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("ColorTemperature", actualValue, 100U)); + VerifyOrReturn(CheckValue("ColorTemperature", actualValue, ColorTempPhysicalMaxMiredsValue)); } - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); VerifyOrReturn( @@ -9881,7 +10184,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_9() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -9898,7 +10201,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -9972,228 +10275,236 @@ class Test_TC_CC_6_2 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads ColorTempPhysicalMinMireds attribute from DUT\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A400c")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads ColorTempPhysicalMinMireds attribute from DUT\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { NextTest(); return; } - err = TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_4(); + err = TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads ColorTemperatureMireds attribute from DUT.\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400c")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDut_5(); + err = TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends MoveColorTemperature command to DUT with MoveMode = Up\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { NextTest(); return; } - err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_6(); + err = TestThReadsColorTemperatureMiredsAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1000ms\n"); - err = TestWait1000ms_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends MoveColorTemperature command to DUT with MoveMode = Up\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_8(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_7(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1000ms\n"); - err = TestWait1000ms_9(); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 1000ms\n"); + err = TestWait1000ms_8(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_10(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_9(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Wait 1000ms\n"); - err = TestWait1000ms_11(); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 1000ms\n"); + err = TestWait1000ms_10(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_12(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 1000ms\n"); + err = TestWait1000ms_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends MoveColorTemperature command to DUT with MoveMode = Down\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_13(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 1000ms\n"); - err = TestWait1000ms_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends MoveColorTemperature command to DUT with MoveMode = Down\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_15(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_14(); break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 1000ms\n"); - err = TestWait1000ms_16(); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 1000ms\n"); + err = TestWait1000ms_15(); break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_17(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_16(); break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 1000ms\n"); - err = TestWait1000ms_18(); + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 1000ms\n"); + err = TestWait1000ms_17(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_19(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 1000ms\n"); + err = TestWait1000ms_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH sends MoveColorTemperature command to DUT with MoveMode = Up\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 20 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_20(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH sends MoveColorTemperature command to DUT with MoveMode = Stop\n"); + ChipLogProgress(chipTool, " ***** Test Step 21 : TH sends MoveColorTemperature command to DUT with MoveMode = Up\n"); if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_21(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 1000ms\n"); - err = TestWait1000ms_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 22 : TH sends MoveColorTemperature command to DUT with MoveMode = Stop\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_23(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_22(); break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Wait 1000ms\n"); - err = TestWait1000ms_24(); + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Wait 1000ms\n"); + err = TestWait1000ms_23(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_25(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_24(); break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Wait 1000ms\n"); - err = TestWait1000ms_26(); + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Wait 1000ms\n"); + err = TestWait1000ms_25(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_27(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Wait 1000ms\n"); + err = TestWait1000ms_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : TH sends MoveColorTemperature command to DUT with MoveMode = Down\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 28 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_28(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_28(); break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : TH sends MoveColorTemperature command to DUT with MoveMode = Stop\n"); + ChipLogProgress(chipTool, " ***** Test Step 29 : TH sends MoveColorTemperature command to DUT with MoveMode = Down\n"); if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_29(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Wait 1000ms\n"); - err = TestWait1000ms_30(); - break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 30 : TH sends MoveColorTemperature command to DUT with MoveMode = Stop\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_31(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_30(); break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Wait 1000ms\n"); - err = TestWait1000ms_32(); + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : Wait 1000ms\n"); + err = TestWait1000ms_31(); break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_33(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_32(); break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Wait 1000ms\n"); - err = TestWait1000ms_34(); + case 33: + ChipLogProgress(chipTool, " ***** Test Step 33 : Wait 1000ms\n"); + err = TestWait1000ms_33(); break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_35(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_34(); + break; + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : Wait 1000ms\n"); + err = TestWait1000ms_35(); break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_36(); + ChipLogProgress(chipTool, " ***** Test Step 36 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { + NextTest(); + return; + } + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_36(); break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_37(); + ChipLogProgress(chipTool, " ***** Test Step 37 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_37(); + break; + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_38(); break; } @@ -10320,6 +10631,9 @@ class Test_TC_CC_6_2 : public TestCommandBridge { case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -10333,7 +10647,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 38; + const uint16_t mTestCount = 39; chip::Optional mNodeId; chip::Optional mCluster; @@ -10385,9 +10699,31 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } NSNumber * _Nonnull ColorTempPhysicalMinMiredsValue; - CHIP_ERROR TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_3() + CHIP_ERROR TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10401,7 +10737,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTempPhysicalMinMireds", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMinMireds", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 65279U)); { @@ -10415,7 +10751,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { } NSNumber * _Nonnull ColorTempPhysicalMaxMiredsValue; - CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_4() + CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10429,7 +10765,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTempPhysicalMaxMireds", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMaxMireds", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 65279U)); { @@ -10442,7 +10778,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_5() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10455,7 +10791,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); VerifyOrReturn( @@ -10467,7 +10803,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_6() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10494,14 +10830,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_7() + CHIP_ERROR TestWait1000ms_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_8() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10514,7 +10850,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); VerifyOrReturn( @@ -10526,14 +10862,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_9() + CHIP_ERROR TestWait1000ms_10() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_10() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10546,7 +10882,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); VerifyOrReturn( @@ -10558,14 +10894,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_11() + CHIP_ERROR TestWait1000ms_12() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_12() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10578,7 +10914,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); VerifyOrReturn( @@ -10590,7 +10926,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_13() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10617,14 +10953,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_14() + CHIP_ERROR TestWait1000ms_15() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_15() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10637,7 +10973,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); VerifyOrReturn( @@ -10649,14 +10985,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_16() + CHIP_ERROR TestWait1000ms_17() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_17() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10669,7 +11005,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); VerifyOrReturn( @@ -10681,14 +11017,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_18() + CHIP_ERROR TestWait1000ms_19() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_19() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10701,7 +11037,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); VerifyOrReturn( @@ -10713,7 +11049,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_20() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10723,7 +11059,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedShort:10U]; + params.rate = [NSNumber numberWithUnsignedShort:20U]; params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; @@ -10740,7 +11076,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_21() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10750,9 +11086,9 @@ class Test_TC_CC_6_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedShort:10U]; - params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:1U]; - params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:255U]; + params.rate = [NSNumber numberWithUnsignedShort:20U]; + params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; + params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveColorTemperatureWithParams:params @@ -10767,7 +11103,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_22() + CHIP_ERROR TestWait1000ms_23() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; @@ -10775,7 +11111,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { } NSNumber * _Nonnull ColorTemperatureValue; - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_23() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10788,7 +11124,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); VerifyOrReturn( @@ -10803,14 +11139,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_24() + CHIP_ERROR TestWait1000ms_25() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_25() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10828,7 +11164,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("ColorTemperature", actualValue, ColorTemperatureValue)); } - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); VerifyOrReturn( @@ -10840,14 +11176,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_26() + CHIP_ERROR TestWait1000ms_27() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_27() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_28() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10865,7 +11201,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("ColorTemperature", actualValue, ColorTemperatureValue)); } - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); VerifyOrReturn( @@ -10877,7 +11213,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_28() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_29() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10904,7 +11240,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_29() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_30() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10914,7 +11250,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedShort:10U]; + params.rate = [NSNumber numberWithUnsignedShort:20U]; params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; @@ -10931,7 +11267,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_30() + CHIP_ERROR TestWait1000ms_31() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; @@ -10939,7 +11275,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { } NSNumber * _Nonnull ColorTemperatureMoveModeStop; - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_31() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_32() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10952,7 +11288,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); VerifyOrReturn( @@ -10967,14 +11303,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_32() + CHIP_ERROR TestWait1000ms_33() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_33() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_34() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10992,7 +11328,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("ColorTemperature", actualValue, ColorTemperatureMoveModeStop)); } - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); VerifyOrReturn( @@ -11004,14 +11340,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_34() + CHIP_ERROR TestWait1000ms_35() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_35() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_36() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11029,7 +11365,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("ColorTemperature", actualValue, ColorTemperatureValue)); } - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); VerifyOrReturn( @@ -11041,7 +11377,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_36() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_37() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -11058,7 +11394,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_37() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_38() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -11132,124 +11468,132 @@ class Test_TC_CC_6_3 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads ColorTempPhysicalMinMireds attribute from DUT\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A400c")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads ColorTempPhysicalMinMireds attribute from DUT\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { NextTest(); return; } - err = TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_4(); + err = TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads ColorTemperatureMireds attribute from DUT.\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400c")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDut_5(); + err = TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends StepColorTemperature command to DUT with MoveMode = Up\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4C.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { NextTest(); return; } - err = TestThSendsStepColorTemperatureCommandToDutWithMoveModeUp_6(); + err = TestThReadsColorTemperatureMiredsAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 500ms\n"); - err = TestWait500ms_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends StepColorTemperature command to DUT with MoveMode = Up\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4C.Rsp")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_8(); + err = TestThSendsStepColorTemperatureCommandToDutWithMoveModeUp_7(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 500ms\n"); - err = TestWait500ms_9(); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 500ms\n"); + err = TestWait500ms_8(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_10(); + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_9(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Wait 500ms\n"); - err = TestWait500ms_11(); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 500ms\n"); + err = TestWait500ms_10(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_12(); + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 700ms\n"); + err = TestWait700ms_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends StepColorTemperature command to DUT with MoveMode = Down\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4C.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { NextTest(); return; } - err = TestThSendsStepColorTemperatureCommandToDutWithMoveModeDown_13(); + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 500ms\n"); - err = TestWait500ms_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends StepColorTemperature command to DUT with MoveMode = Down\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4C.Rsp")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_15(); + err = TestThSendsStepColorTemperatureCommandToDutWithMoveModeDown_14(); break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 500ms\n"); - err = TestWait500ms_16(); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 500ms\n"); + err = TestWait500ms_15(); break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_17(); + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_16(); break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 500ms\n"); - err = TestWait500ms_18(); + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 500ms\n"); + err = TestWait500ms_17(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_19(); + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 500ms\n"); + err = TestWait500ms_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_20(); + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { + NextTest(); + return; + } + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_21(); + ChipLogProgress(chipTool, " ***** Test Step 21 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22(); break; } @@ -11328,6 +11672,9 @@ class Test_TC_CC_6_3 : public TestCommandBridge { case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -11341,7 +11688,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 22; + const uint16_t mTestCount = 23; chip::Optional mNodeId; chip::Optional mCluster; @@ -11393,9 +11740,31 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } NSNumber * _Nonnull ColorTempPhysicalMinMiredsValue; - CHIP_ERROR TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_3() + CHIP_ERROR TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11409,7 +11778,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTempPhysicalMinMireds", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMinMireds", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 65279U)); { @@ -11423,7 +11792,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { } NSNumber * _Nonnull ColorTempPhysicalMaxMiredsValue; - CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_4() + CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11437,7 +11806,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTempPhysicalMaxMireds", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMaxMireds", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 65279U)); { @@ -11450,7 +11819,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_5() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11463,7 +11832,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); VerifyOrReturn( @@ -11475,7 +11844,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStepColorTemperatureCommandToDutWithMoveModeUp_6() + CHIP_ERROR TestThSendsStepColorTemperatureCommandToDutWithMoveModeUp_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11503,14 +11872,14 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_7() + CHIP_ERROR TestWait500ms_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_8() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11523,7 +11892,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); @@ -11533,14 +11902,14 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_9() + CHIP_ERROR TestWait500ms_10() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_10() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11553,7 +11922,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); @@ -11563,14 +11932,14 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_11() + CHIP_ERROR TestWait700ms_12() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 700UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_12() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11583,7 +11952,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); @@ -11593,7 +11962,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStepColorTemperatureCommandToDutWithMoveModeDown_13() + CHIP_ERROR TestThSendsStepColorTemperatureCommandToDutWithMoveModeDown_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11603,8 +11972,8 @@ class Test_TC_CC_6_3 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; params.stepMode = [NSNumber numberWithUnsignedChar:3U]; - params.stepSize = [NSNumber numberWithUnsignedShort:5U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:50U]; + params.stepSize = [NSNumber numberWithUnsignedShort:100U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; @@ -11621,14 +11990,14 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_14() + CHIP_ERROR TestWait500ms_15() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_15() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11641,7 +12010,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); @@ -11651,14 +12020,14 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_16() + CHIP_ERROR TestWait500ms_17() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_17() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11671,7 +12040,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); @@ -11681,14 +12050,14 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_18() + CHIP_ERROR TestWait500ms_19() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_19() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11701,7 +12070,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); @@ -11711,7 +12080,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_20() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -11728,7 +12097,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_21() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -11761,6 +12130,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateConfigValue", 0, UINT16_MAX, &mRateConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -11802,140 +12172,172 @@ class Test_TC_CC_7_2 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends EnhancedMoveHue command to DUT with MoveMode Up\n"); - if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { NextTest(); return; } - err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeUp_4(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 1000ms\n"); - err = TestWait1000ms_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends EnhancedMoveHue command to DUT with MoveMode Up\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_6(); + err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeUp_5(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1000ms\n"); - err = TestWait1000ms_7(); + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); + err = TestWait1000ms_6(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_8(); + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_7(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1000ms\n"); - err = TestWait1000ms_9(); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 1000ms\n"); + err = TestWait1000ms_8(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_10(); + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 1000ms\n"); + err = TestWait1000ms_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends EnhancedMoveHue command to DUT with MoveMode Stop\n"); - if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_11(); + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends EnhancedMoveHue command to DUT with MoveMode Stop\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_12(); + err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends EnhancedMoveHue command to DUT with MoveMode Down\n"); - if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeDown_13(); + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 500ms\n"); - err = TestWait500ms_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 1000ms\n"); + err = TestWait1000ms_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 500ms\n"); - err = TestWait500ms_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends EnhancedMoveHue command to DUT with MoveMode Down\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_17(); + err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeDown_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 500ms\n"); + err = TestWait500ms_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 500ms\n"); - err = TestWait500ms_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { + NextTest(); + return; + } + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 500ms\n"); + err = TestWait500ms_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_19(); + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_20(); break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH sends EnhancedMoveHue command to DUT with MoveMode Stop\n"); + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Wait 500ms\n"); + err = TestWait500ms_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { + NextTest(); + return; + } + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : TH sends EnhancedMoveHue command to DUT with MoveMode Stop\n"); if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_20(); + err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_23(); break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_21(); + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_24(); break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_22(); + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Wait 1000ms\n"); + err = TestWait1000ms_25(); break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_23(); + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { + NextTest(); + return; + } + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_28(); break; } @@ -12020,6 +12422,21 @@ class Test_TC_CC_7_2 : public TestCommandBridge { case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -12033,11 +12450,12 @@ class Test_TC_CC_7_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 24; + const uint16_t mTestCount = 29; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -12086,7 +12504,29 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12099,7 +12539,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); @@ -12109,7 +12549,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeUp_4() + CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeUp_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12119,7 +12559,8 @@ class Test_TC_CC_7_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedShort:50U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster enhancedMoveHueWithParams:params @@ -12134,14 +12575,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_5() + CHIP_ERROR TestWait1000ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_6() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12154,7 +12595,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); @@ -12164,14 +12605,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_7() + CHIP_ERROR TestWait1000ms_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_8() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12184,7 +12625,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); @@ -12194,14 +12635,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_9() + CHIP_ERROR TestWait1000ms_10() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_10() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12214,7 +12655,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); @@ -12224,7 +12665,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_11() + CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12248,8 +12689,9 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull EnhancedCurrentHueStep3b; - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_12() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12262,9 +12704,12 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + { + EnhancedCurrentHueStep3b = value; + } NextTest(); }]; @@ -12272,7 +12717,42 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeDown_13() + CHIP_ERROR TestWait1000ms_14() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_15() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, EnhancedCurrentHueStep3b)); + } + + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeDown_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12282,7 +12762,8 @@ class Test_TC_CC_7_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:3U]; - params.rate = [NSNumber numberWithUnsignedShort:15U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster enhancedMoveHueWithParams:params @@ -12297,14 +12778,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_14() + CHIP_ERROR TestWait500ms_17() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_15() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12317,7 +12798,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); @@ -12327,14 +12808,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_16() + CHIP_ERROR TestWait500ms_19() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_17() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12347,7 +12828,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); @@ -12357,14 +12838,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_18() + CHIP_ERROR TestWait500ms_21() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_19() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12377,7 +12858,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); @@ -12387,7 +12868,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_20() + CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_23() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12411,8 +12892,9 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull EnhancedCurrentHueStep5b; - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_21() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12425,9 +12907,12 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + { + EnhancedCurrentHueStep5b = value; + } NextTest(); }]; @@ -12435,7 +12920,42 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_22() + CHIP_ERROR TestWait1000ms_25() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_26() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, EnhancedCurrentHueStep5b)); + } + + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_27() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -12452,7 +12972,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_23() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_28() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -12485,6 +13005,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("StepSizeConfigValue", 0, UINT16_MAX, &mStepSizeConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -12526,60 +13047,68 @@ class Test_TC_CC_7_3 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends EnhancedStepHue command to DUT with StepMode Up\n"); - if (ShouldSkip("CC.S.F01 && CC.S.C42.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { NextTest(); return; } - err = TestThSendsEnhancedStepHueCommandToDutWithStepModeUp_4(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 1000ms\n"); - err = TestWait1000ms_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Over TransitionTime,Read EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends EnhancedStepHue command to DUT with StepMode Up\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C42.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_6(); + err = TestThSendsEnhancedStepHueCommandToDutWithStepModeUp_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); + err = TestWait1000ms_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends EnhancedStepHue command to DUT with StepMode Down\n"); - if (ShouldSkip("CC.S.F01 && CC.S.C42.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Over TransitionTime,Read EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C42.Rsp")) { NextTest(); return; } - err = TestThSendsEnhancedStepHueCommandToDutWithStepModeDown_7(); + err = TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 1000ms\n"); - err = TestWait1000ms_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Over TransitionTime,Read EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends EnhancedStepHue command to DUT with StepMode Down\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C42.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_9(); + err = TestThSendsEnhancedStepHueCommandToDutWithStepModeDown_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1000ms\n"); + err = TestWait1000ms_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Over TransitionTime,Read EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C42.Rsp")) { + NextTest(); + return; + } + err = TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12(); break; } @@ -12628,6 +13157,9 @@ class Test_TC_CC_7_3 : public TestCommandBridge { case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -12641,11 +13173,12 @@ class Test_TC_CC_7_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 13; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mStepSizeConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -12694,7 +13227,29 @@ class Test_TC_CC_7_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12707,7 +13262,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); @@ -12717,7 +13272,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsEnhancedStepHueCommandToDutWithStepModeUp_4() + CHIP_ERROR TestThSendsEnhancedStepHueCommandToDutWithStepModeUp_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12727,8 +13282,9 @@ class Test_TC_CC_7_3 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; params.stepMode = [NSNumber numberWithUnsignedChar:0U]; - params.stepSize = [NSNumber numberWithUnsignedShort:50U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:1U]; + params.stepSize = mStepSizeConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mStepSizeConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:50U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster enhancedStepHueWithParams:params @@ -12743,14 +13299,14 @@ class Test_TC_CC_7_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_5() + CHIP_ERROR TestWait1000ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_6() + CHIP_ERROR TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12763,7 +13319,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); @@ -12773,7 +13329,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsEnhancedStepHueCommandToDutWithStepModeDown_7() + CHIP_ERROR TestThSendsEnhancedStepHueCommandToDutWithStepModeDown_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12783,8 +13339,9 @@ class Test_TC_CC_7_3 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; params.stepMode = [NSNumber numberWithUnsignedChar:1U]; - params.stepSize = [NSNumber numberWithUnsignedShort:75U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:1U]; + params.stepSize = mStepSizeConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mStepSizeConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:50U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster enhancedStepHueWithParams:params @@ -12799,14 +13356,14 @@ class Test_TC_CC_7_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_8() + CHIP_ERROR TestWait1000ms_9() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_9() + CHIP_ERROR TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12819,7 +13376,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); @@ -12829,7 +13386,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -12846,7 +13403,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -12879,6 +13436,8 @@ class Test_TC_CC_7_4 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("EnhancedHueConfigValue", 0, UINT16_MAX, &mEnhancedHueConfigValue); + AddArgument("SaturationConfigValue", 0, UINT8_MAX, &mSaturationConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -12920,41 +13479,49 @@ class Test_TC_CC_7_4 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends EnhancedMoveToHueAndSaturation command to DUT\n"); - if (ShouldSkip("CC.S.F01 && CC.S.C43.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { NextTest(); return; } - err = TestThSendsEnhancedMoveToHueAndSaturationCommandToDut_4(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 1500ms\n"); - err = TestWait1500ms_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends EnhancedMoveToHueAndSaturation command to DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C43.Rsp")) { + NextTest(); + return; + } + err = TestThSendsEnhancedMoveToHueAndSaturationCommandToDut_5(); break; case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1500ms\n"); + err = TestWait1500ms_6(); + break; + case 7: ChipLogProgress(chipTool, - " ***** Test Step 6 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { + " ***** Test Step 7 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C43.Rsp")) { NextTest(); return; } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_7(); + err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_9(); break; } @@ -12994,6 +13561,9 @@ class Test_TC_CC_7_4 : public TestCommandBridge { case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -13007,11 +13577,13 @@ class Test_TC_CC_7_4 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mEnhancedHueConfigValue; + chip::Optional mSaturationConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -13060,7 +13632,29 @@ class Test_TC_CC_7_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13073,7 +13667,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); @@ -13083,7 +13677,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsEnhancedMoveToHueAndSaturationCommandToDut_4() + CHIP_ERROR TestThSendsEnhancedMoveToHueAndSaturationCommandToDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13092,8 +13686,10 @@ class Test_TC_CC_7_4 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; - params.enhancedHue = [NSNumber numberWithUnsignedShort:1200U]; - params.saturation = [NSNumber numberWithUnsignedChar:90U]; + params.enhancedHue = mEnhancedHueConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mEnhancedHueConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:1200U]; + params.saturation = mSaturationConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mSaturationConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:90U]; params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; @@ -13109,14 +13705,14 @@ class Test_TC_CC_7_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1500ms_5() + CHIP_ERROR TestWait1500ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_6() + CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13131,10 +13727,11 @@ class Test_TC_CC_7_4 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, 1200U)); + VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, + mEnhancedHueConfigValue.HasValue() ? mEnhancedHueConfigValue.Value() : 1200U)); } - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); @@ -13144,7 +13741,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_7() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -13161,7 +13758,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -13194,6 +13791,11 @@ class Test_TC_CC_8_1 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateConfigValue", 0, UINT8_MAX, &mRateConfigValue); + AddArgument("RateXConfigValue", INT16_MIN, INT16_MAX, &mRateXConfigValue); + AddArgument("RateYConfigValue", INT16_MIN, INT16_MAX, &mRateYConfigValue); + AddArgument("ColorTemperatureMinMiredsConfigValue", 0, UINT16_MAX, &mColorTemperatureMinMiredsConfigValue); + AddArgument("ColorTemperatureMaxMiredsConfigValue", 0, UINT16_MAX, &mColorTemperatureMaxMiredsConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -13235,257 +13837,273 @@ class Test_TC_CC_8_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH sends MoveHue command to DUT\n"); - if (ShouldSkip("CC.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.A000f")) { NextTest(); return; } - err = TestThSendsMoveHueCommandToDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends MoveHue command to DUT\n"); + if (ShouldSkip("CC.S.C01.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDut_4(); + err = TestThSendsMoveHueCommandToDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends StopMoveStep command to DUT\n"); - if (ShouldSkip("CC.S.C47.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A0000 && CC.S.C01.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThSendsStopMoveStepCommandToDut_5(); + err = TestThReadsCurrentHueAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends StopMoveStep command to DUT\n"); + if (ShouldSkip("CC.S.C47.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDut_6(); + err = TestThSendsStopMoveStepCommandToDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 100ms\n"); - err = TestWait100ms_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A0000 && CC.S.C47.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDut_8(); + err = TestThReadsCurrentHueAttributeFromDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 100ms\n"); + err = TestWait100ms_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends MoveSaturation command to DUT\n"); - if (ShouldSkip("CC.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A0000 && CC.S.C47.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThSendsMoveSaturationCommandToDut_9(); + err = TestThReadsCurrentHueAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends MoveSaturation command to DUT\n"); + if (ShouldSkip("CC.S.C04.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_10(); + err = TestThSendsMoveSaturationCommandToDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends StopMoveStep command to DUT\n"); - if (ShouldSkip("CC.S.C47.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.A0001 && CC.S.C04.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThSendsStopMoveStepCommandToDut_11(); + err = TestThReadsCurrentSaturationAttributeFromDut_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends StopMoveStep command to DUT\n"); + if (ShouldSkip("CC.S.C47.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_12(); + err = TestThSendsStopMoveStepCommandToDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 100ms\n"); - err = TestWait100ms_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.A0001 && CC.S.C47.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_14(); + err = TestThReadsCurrentSaturationAttributeFromDut_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 100ms\n"); + err = TestWait100ms_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends MoveColor command to DUT\n"); - if (ShouldSkip("CC.S.C08.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.A0001 && CC.S.C47.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThSendsMoveColorCommandToDut_15(); + err = TestThReadsCurrentSaturationAttributeFromDut_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads CurrentX attribute from DUT\n"); - if (ShouldSkip("CC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends MoveColor command to DUT\n"); + if (ShouldSkip("CC.S.C08.Rsp && CC.S.F03")) { NextTest(); return; } - err = TestThReadsCurrentXAttributeFromDut_16(); + err = TestThSendsMoveColorCommandToDut_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.A0004")) { - NextTest(); - return; - } - err = TestThReadsCurrentYAttributeFromDut_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 500ms\n"); + err = TestWait500ms_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH sends StopMoveStep command to DUT\n"); - if (ShouldSkip("CC.S.C47.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.A0003 && CC.S.C08.Rsp && CC.S.F03")) { NextTest(); return; } - err = TestThSendsStopMoveStepCommandToDut_18(); + err = TestThReadsCurrentXAttributeFromDut_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads CurrentX attribute from DUT\n"); - if (ShouldSkip("CC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.A0004 && CC.S.C08.Rsp && CC.S.F03")) { NextTest(); return; } - err = TestThReadsCurrentXAttributeFromDut_19(); + err = TestThReadsCurrentYAttributeFromDut_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 20 : TH sends StopMoveStep command to DUT\n"); + if (ShouldSkip("CC.S.C47.Rsp && CC.S.F03")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_20(); + err = TestThSendsStopMoveStepCommandToDut_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Wait 100ms\n"); - err = TestWait100ms_21(); + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.A0003 && CC.S.C47.Rsp && CC.S.F03")) { + NextTest(); + return; + } + err = TestThReadsCurrentXAttributeFromDut_21(); break; case 22: ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.A0003")) { + if (ShouldSkip("CC.S.A0004 && CC.S.C47.Rsp && CC.S.F03")) { NextTest(); return; } err = TestThReadsCurrentYAttributeFromDut_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.A0004")) { - NextTest(); - return; - } - err = TestThReadsCurrentYAttributeFromDut_23(); + ChipLogProgress(chipTool, " ***** Test Step 23 : Wait 1000ms\n"); + err = TestWait1000ms_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : TH sends MoveColorTemperature command to DUT\n"); - if (ShouldSkip("CC.S.C4B.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.A0003 && CC.S.C47.Rsp && CC.S.F03")) { NextTest(); return; } - err = TestThSendsMoveColorTemperatureCommandToDut_24(); + err = TestThReadsCurrentYAttributeFromDut_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : TH reads ColorTemperatureMireds attribute from DUT\n"); - if (ShouldSkip("CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 25 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.A0004 && CC.S.C47.Rsp && CC.S.F03")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDut_25(); + err = TestThReadsCurrentYAttributeFromDut_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : TH sends StopMoveStep command to DUT\n"); - if (ShouldSkip("CC.S.C47.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 26 : TH sends MoveColorTemperature command to DUT\n"); + if (ShouldSkip("CC.S.C4B.Rsp && CC.S.F04")) { NextTest(); return; } - err = TestThSendsStopMoveStepCommandToDut_26(); + err = TestThSendsMoveColorTemperatureCommandToDut_26(); break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : TH reads ColorTemperatureMireds attribute from DUT\n"); - if (ShouldSkip("CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : Wait 1000ms\n"); + err = TestWait1000ms_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : TH reads ColorTemperatureMireds attribute from DUT\n"); + if (ShouldSkip("CC.S.A0007 && CC.S.C4B.Rsp && CC.S.F04")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDut_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Wait 100ms\n"); - err = TestWait100ms_28(); + err = TestThReadsColorTemperatureMiredsAttributeFromDut_28(); break; case 29: - ChipLogProgress(chipTool, - " ***** Test Step 29 : Reads current color attribute value matched the value sent by the last attribute\n"); - if (ShouldSkip("CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 29 : TH sends StopMoveStep command to DUT\n"); + if (ShouldSkip("CC.S.C47.Rsp && CC.S.F04")) { NextTest(); return; } - err = TestReadsCurrentColorAttributeValueMatchedTheValueSentByTheLastAttribute_29(); + err = TestThSendsStopMoveStepCommandToDut_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : TH sends EnhancedMoveHue command to DUT.\n"); - if (ShouldSkip("CC.S.C41.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 30 : TH reads ColorTemperatureMireds attribute from DUT\n"); + if (ShouldSkip("CC.S.A0007 && CC.S.C47.Rsp && CC.S.F04")) { NextTest(); return; } - err = TestThSendsEnhancedMoveHueCommandToDut_30(); + err = TestThReadsColorTemperatureMiredsAttributeFromDut_30(); break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : TH reads EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A4000")) { - NextTest(); - return; - } - err = TestThReadsEnhancedCurrentHueAttributeFromDut_31(); + ChipLogProgress(chipTool, " ***** Test Step 31 : Wait 500ms\n"); + err = TestWait500ms_31(); break; case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : TH sends StopMoveStep command to DUT\n"); - if (ShouldSkip("CC.S.C47.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 32 : Reads current color attribute value matched the value sent by the last attribute\n"); + if (ShouldSkip("CC.S.A0007 && CC.S.C47.Rsp && CC.S.F04")) { NextTest(); return; } - err = TestThSendsStopMoveStepCommandToDut_32(); + err = TestReadsCurrentColorAttributeValueMatchedTheValueSentByTheLastAttribute_32(); break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : TH reads EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 33 : TH sends EnhancedMoveHue command to DUT.\n"); + if (ShouldSkip("CC.S.C41.Rsp && CC.S.F01")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDut_33(); + err = TestThSendsEnhancedMoveHueCommandToDut_33(); break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Wait 100ms\n"); - err = TestWait100ms_34(); + ChipLogProgress(chipTool, " ***** Test Step 34 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A4000 && CC.S.C41.Rsp && CC.S.F01")) { + NextTest(); + return; + } + err = TestThReadsEnhancedCurrentHueAttributeFromDut_34(); break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : TH reads EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 35 : TH sends StopMoveStep command to DUT\n"); + if (ShouldSkip("CC.S.C47.Rsp && CC.S.F01")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDut_35(); + err = TestThSendsStopMoveStepCommandToDut_35(); break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_36(); + ChipLogProgress(chipTool, " ***** Test Step 36 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A4000 && CC.S.C47.Rsp && CC.S.F01")) { + NextTest(); + return; + } + err = TestThReadsEnhancedCurrentHueAttributeFromDut_36(); break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_37(); + ChipLogProgress(chipTool, " ***** Test Step 37 : Wait 500ms\n"); + err = TestWait500ms_37(); + break; + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A4000 && CC.S.C47.Rsp && CC.S.F01")) { + NextTest(); + return; + } + err = TestThReadsEnhancedCurrentHueAttributeFromDut_38(); + break; + case 39: + ChipLogProgress(chipTool, " ***** Test Step 39 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_39(); + break; + case 40: + ChipLogProgress(chipTool, " ***** Test Step 40 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_40(); break; } @@ -13612,6 +14230,15 @@ class Test_TC_CC_8_1 : public TestCommandBridge { case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 39: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 40: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -13625,11 +14252,16 @@ class Test_TC_CC_8_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 38; + const uint16_t mTestCount = 41; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateConfigValue; + chip::Optional mRateXConfigValue; + chip::Optional mRateYConfigValue; + chip::Optional mColorTemperatureMinMiredsConfigValue; + chip::Optional mColorTemperatureMaxMiredsConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -13678,7 +14310,29 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveHueCommandToDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsMoveHueCommandToDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13688,7 +14342,8 @@ class Test_TC_CC_8_1 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedChar:50U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveHueWithParams:params @@ -13703,7 +14358,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_4() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13716,7 +14371,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); @@ -13726,7 +14381,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStopMoveStepCommandToDut_5() + CHIP_ERROR TestThSendsStopMoveStepCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13750,7 +14405,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { } NSNumber * _Nonnull CurrentHueValue; - CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_6() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13763,7 +14418,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); { @@ -13776,14 +14431,14 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_7() + CHIP_ERROR TestWait100ms_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_8() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13801,7 +14456,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("CurrentHue", actualValue, CurrentHueValue)); } - VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); @@ -13811,7 +14466,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveSaturationCommandToDut_9() + CHIP_ERROR TestThSendsMoveSaturationCommandToDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13821,7 +14476,8 @@ class Test_TC_CC_8_1 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedChar:5U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveSaturationWithParams:params @@ -13836,7 +14492,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_10() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13849,7 +14505,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); @@ -13859,7 +14515,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStopMoveStepCommandToDut_11() + CHIP_ERROR TestThSendsStopMoveStepCommandToDut_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13883,7 +14539,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { } NSNumber * _Nonnull CurrentSaturationValue; - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_12() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13896,7 +14552,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); { @@ -13909,14 +14565,14 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_13() + CHIP_ERROR TestWait100ms_14() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_14() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13934,7 +14590,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, CurrentSaturationValue)); } - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); @@ -13944,7 +14600,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorCommandToDut_15() + CHIP_ERROR TestThSendsMoveColorCommandToDut_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13953,8 +14609,10 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveColorParams alloc] init]; - params.rateX = [NSNumber numberWithShort:15]; - params.rateY = [NSNumber numberWithShort:20]; + params.rateX + = mRateXConfigValue.HasValue() ? [NSNumber numberWithShort:mRateXConfigValue.Value()] : [NSNumber numberWithShort:50]; + params.rateY + = mRateYConfigValue.HasValue() ? [NSNumber numberWithShort:mRateYConfigValue.Value()] : [NSNumber numberWithShort:50]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveColorWithParams:params @@ -13969,7 +14627,14 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentXAttributeFromDut_16() + CHIP_ERROR TestWait500ms_17() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13982,7 +14647,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); @@ -13992,7 +14657,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_17() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14005,7 +14670,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); @@ -14015,7 +14680,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStopMoveStepCommandToDut_18() + CHIP_ERROR TestThSendsStopMoveStepCommandToDut_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14039,7 +14704,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { } NSNumber * _Nonnull CurrentXValue; - CHIP_ERROR TestThReadsCurrentXAttributeFromDut_19() + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14052,7 +14717,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); { @@ -14066,7 +14731,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { } NSNumber * _Nonnull CurrentYValue; - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_20() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14079,7 +14744,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); { @@ -14092,14 +14757,14 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_21() + CHIP_ERROR TestWait1000ms_23() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_22() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14117,7 +14782,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("CurrentX", actualValue, CurrentXValue)); } - VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); @@ -14127,7 +14792,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_23() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_25() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14145,7 +14810,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("CurrentY", actualValue, CurrentYValue)); } - VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); @@ -14155,7 +14820,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDut_24() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDut_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14165,9 +14830,14 @@ class Test_TC_CC_8_1 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedShort:10U]; - params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:1U]; - params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:255U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:50U]; + params.colorTemperatureMinimumMireds = mColorTemperatureMinMiredsConfigValue.HasValue() + ? [NSNumber numberWithUnsignedShort:mColorTemperatureMinMiredsConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:1U]; + params.colorTemperatureMaximumMireds = mColorTemperatureMaxMiredsConfigValue.HasValue() + ? [NSNumber numberWithUnsignedShort:mColorTemperatureMaxMiredsConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:255U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveColorTemperatureWithParams:params @@ -14182,7 +14852,14 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_25() + CHIP_ERROR TestWait1000ms_27() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_28() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14195,7 +14872,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); @@ -14205,7 +14882,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStopMoveStepCommandToDut_26() + CHIP_ERROR TestThSendsStopMoveStepCommandToDut_29() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14229,7 +14906,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { } NSNumber * _Nonnull ColorTemperatureMiredsValue; - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_27() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_30() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14242,7 +14919,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); { @@ -14255,14 +14932,14 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_28() + CHIP_ERROR TestWait500ms_31() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentColorAttributeValueMatchedTheValueSentByTheLastAttribute_29() + CHIP_ERROR TestReadsCurrentColorAttributeValueMatchedTheValueSentByTheLastAttribute_32() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14280,7 +14957,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ColorTemperature", actualValue, ColorTemperatureMiredsValue)); } - VerifyOrReturn(CheckConstraintType("colorTemperature", "", "uint16")); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); @@ -14290,7 +14967,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDut_30() + CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDut_33() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14300,7 +14977,8 @@ class Test_TC_CC_8_1 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedShort:50U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster enhancedMoveHueWithParams:params @@ -14315,7 +14993,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_31() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_34() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14328,7 +15006,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); @@ -14338,7 +15016,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStopMoveStepCommandToDut_32() + CHIP_ERROR TestThSendsStopMoveStepCommandToDut_35() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14362,7 +15040,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { } NSNumber * _Nonnull EnhancedCurrentHueValue; - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_33() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_36() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14375,7 +15053,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); { @@ -14388,14 +15066,14 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_34() + CHIP_ERROR TestWait500ms_37() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_35() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_38() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14413,7 +15091,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, EnhancedCurrentHueValue)); } - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); @@ -14423,7 +15101,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_36() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_39() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -14440,7 +15118,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_37() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_40() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -14612,7 +15290,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -14637,7 +15315,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -14657,7 +15335,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); @@ -14692,7 +15370,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -14717,7 +15395,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -15021,7 +15699,7 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("PHYRate", "", "enum8")); + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); } @@ -15046,7 +15724,7 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("fullDuplex", "", "bool")); + VerifyOrReturn(CheckConstraintType("fullDuplex", "boolean", "boolean")); } NextTest(); @@ -15067,7 +15745,7 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("packetRxCount", "", "uint64")); + VerifyOrReturn(CheckConstraintType("packetRxCount", "int64u", "int64u")); NextTest(); }]; @@ -15095,7 +15773,7 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("packetTxCount", "", "uint64")); + VerifyOrReturn(CheckConstraintType("packetTxCount", "int64u", "int64u")); NextTest(); }]; @@ -15123,7 +15801,7 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("txErrCount", "", "uint64")); + VerifyOrReturn(CheckConstraintType("txErrCount", "int64u", "int64u")); NextTest(); }]; @@ -15152,7 +15830,7 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("collisionCount", "", "uint64")); + VerifyOrReturn(CheckConstraintType("collisionCount", "int64u", "int64u")); NextTest(); }]; @@ -15181,7 +15859,7 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("overrunCount", "", "uint64")); + VerifyOrReturn(CheckConstraintType("overrunCount", "int64u", "int64u")); NextTest(); }]; @@ -15212,7 +15890,7 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("carrierDetect", "", "bool")); + VerifyOrReturn(CheckConstraintType("carrierDetect", "boolean", "boolean")); } NextTest(); @@ -15243,7 +15921,7 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("timeSinceReset", "", "uint64")); + VerifyOrReturn(CheckConstraintType("timeSinceReset", "int64u", "int64u")); NextTest(); }]; @@ -15303,52 +15981,172 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Sends ResetCounts command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } - err = TestSendsResetCountsCommand_1(); + err = TestThReadsPHYRateAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the PacketRxCount attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } - err = TestReadThePacketRxCountAttribute_2(); + err = TestThReadsPHYRateAttributeFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the PacketTxCount attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } - err = TestReadThePacketTxCountAttribute_3(); + err = TestThReadsPHYRateAttributeFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the TxErrCount attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } - err = TestReadTheTxErrCountAttribute_4(); + err = TestThReadsPHYRateAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the CollisionCount attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0005")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } - err = TestReadTheCollisionCountAttribute_5(); + err = TestThReadsPHYRateAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the OverrunCount attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0006")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsPHYRateAttributeFromDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsPHYRateAttributeFromDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsPHYRateAttributeFromDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsPHYRateAttributeFromDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsPHYRateAttributeFromDut_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads PacketRxCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0002")) { + NextTest(); + return; + } + err = TestThReadsPacketRxCountAttributeValueFromDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads PacketTxCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0003")) { + NextTest(); + return; + } + err = TestThReadsPacketTxCountAttributeValueFromDut_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads TxErrCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0004")) { + NextTest(); + return; + } + err = TestThReadsTxErrCountAttributeValueFromDut_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CollisionCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0005")) { + NextTest(); + return; + } + err = TestThReadsCollisionCountAttributeValueFromDut_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads OverrunCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0006")) { + NextTest(); + return; + } + err = TestThReadsOverrunCountAttributeValueFromDut_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Sends ResetCounts command\n"); + if (ShouldSkip("DGETH.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestSendsResetCountsCommand_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads PacketRxCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0002")) { + NextTest(); + return; + } + err = TestThReadsPacketRxCountAttributeValueFromDut_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads PacketTxCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0003")) { + NextTest(); + return; + } + err = TestThReadsPacketTxCountAttributeValueFromDut_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads TxErrCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0004")) { + NextTest(); + return; + } + err = TestThReadsTxErrCountAttributeValueFromDut_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads CollisionCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0005")) { + NextTest(); + return; + } + err = TestThReadsCollisionCountAttributeValueFromDut_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads OverrunCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0006")) { NextTest(); return; } - err = TestReadTheOverrunCountAttribute_6(); + err = TestThReadsOverrunCountAttributeValueFromDut_21(); break; } @@ -15382,6 +16180,51 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -15395,7 +16238,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 22; chip::Optional mNodeId; chip::Optional mCluster; @@ -15409,25 +16252,258 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestSendsResetCountsCommand_1() + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster resetCountsWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends ResetCounts command Error: %@", err); + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_6() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_7() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_8() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_9() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_10() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } + NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull PacketRxCount; - CHIP_ERROR TestReadThePacketRxCountAttribute_2() + CHIP_ERROR TestThReadsPacketRxCountAttributeValueFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterEthernetNetworkDiagnostics * cluster = @@ -15435,13 +16511,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributePacketRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the PacketRxCount attribute Error: %@", err); + NSLog(@"TH reads PacketRxCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = value; - VerifyOrReturn(CheckValue("PacketRxCount", actualValue, 0ULL)); + PacketRxCount = value; } NextTest(); @@ -15449,8 +16524,9 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull PacketTxCount; - CHIP_ERROR TestReadThePacketTxCountAttribute_3() + CHIP_ERROR TestThReadsPacketTxCountAttributeValueFromDut_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterEthernetNetworkDiagnostics * cluster = @@ -15458,13 +16534,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributePacketTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the PacketTxCount attribute Error: %@", err); + NSLog(@"TH reads PacketTxCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = value; - VerifyOrReturn(CheckValue("PacketTxCount", actualValue, 0ULL)); + PacketTxCount = value; } NextTest(); @@ -15472,8 +16547,9 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull TxErrCount; - CHIP_ERROR TestReadTheTxErrCountAttribute_4() + CHIP_ERROR TestThReadsTxErrCountAttributeValueFromDut_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterEthernetNetworkDiagnostics * cluster = @@ -15481,13 +16557,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeTxErrCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the TxErrCount attribute Error: %@", err); + NSLog(@"TH reads TxErrCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = value; - VerifyOrReturn(CheckValue("TxErrCount", actualValue, 0ULL)); + TxErrCount = value; } NextTest(); @@ -15495,8 +16570,9 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull CollisionCount; - CHIP_ERROR TestReadTheCollisionCountAttribute_5() + CHIP_ERROR TestThReadsCollisionCountAttributeValueFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterEthernetNetworkDiagnostics * cluster = @@ -15504,13 +16580,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCollisionCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the CollisionCount attribute Error: %@", err); + NSLog(@"TH reads CollisionCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = value; - VerifyOrReturn(CheckValue("CollisionCount", actualValue, 0ULL)); + CollisionCount = value; } NextTest(); @@ -15518,8 +16593,9 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull OverrunCount; - CHIP_ERROR TestReadTheOverrunCountAttribute_6() + CHIP_ERROR TestThReadsOverrunCountAttributeValueFromDut_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterEthernetNetworkDiagnostics * cluster = @@ -15527,13 +16603,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the OverrunCount attribute Error: %@", err); + NSLog(@"TH reads OverrunCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = value; - VerifyOrReturn(CheckValue("OverrunCount", actualValue, 0ULL)); + OverrunCount = value; } NextTest(); @@ -15541,6 +16616,124 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestSendsResetCountsCommand_16() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster resetCountsWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends ResetCounts command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsPacketRxCountAttributeValueFromDut_17() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePacketRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PacketRxCount attribute value from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMaxValue("packetRxCount", [value unsignedLongLongValue], PacketRxCount)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsPacketTxCountAttributeValueFromDut_18() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePacketTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PacketTxCount attribute value from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMaxValue("packetTxCount", [value unsignedLongLongValue], PacketTxCount)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTxErrCountAttributeValueFromDut_19() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeTxErrCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads TxErrCount attribute value from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMaxValue("txErrCount", [value unsignedLongLongValue], TxErrCount)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCollisionCountAttributeValueFromDut_20() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCollisionCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CollisionCount attribute value from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMaxValue("collisionCount", [value unsignedLongLongValue], CollisionCount)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOverrunCountAttributeValueFromDut_21() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads OverrunCount attribute value from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMaxValue("overrunCount", [value unsignedLongLongValue], OverrunCount)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; class Test_TC_FLW_1_1 : public TestCommandBridge { @@ -15595,19 +16788,15 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip(" !FLW.S.A0003 ")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(Tolerance) in AttributeList\n"); if (ShouldSkip("FLW.S.A0003")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_4(); + err = TestReadTheOptionalAttributeToleranceInAttributeList_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); @@ -15707,7 +16896,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -15732,7 +16921,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -15752,7 +16941,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); @@ -15768,7 +16957,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() + CHIP_ERROR TestReadTheOptionalAttributeToleranceInAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device @@ -15777,20 +16966,12 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -15816,7 +16997,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -15841,7 +17022,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -15925,7 +17106,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { err = TestReadTheMandatoryAttributeMaxMeasuredValue_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : read the optional attribute: Tolerance\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute: Tolerance\n"); if (ShouldSkip("FLW.S.A0003")) { NextTest(); return; @@ -16000,7 +17181,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("measuredValue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value unsignedShortValue], 65535U)); } @@ -16026,7 +17207,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value unsignedShortValue], 65535U)); } @@ -16052,7 +17233,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value unsignedShortValue], 65535U)); } @@ -16072,11 +17253,11 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the optional attribute: Tolerance Error: %@", err); + NSLog(@"Read the optional attribute: Tolerance Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); + VerifyOrReturn(CheckConstraintType("tolerance", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); @@ -16236,7 +17417,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -16261,7 +17442,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -16281,7 +17462,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); @@ -16312,7 +17493,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); @@ -16336,7 +17517,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 3UL)); VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 5UL)); @@ -16533,7 +17714,7 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("breadcrumb", "", "uint64")); + VerifyOrReturn(CheckConstraintType("breadcrumb", "int64u", "int64u")); NextTest(); }]; @@ -16668,7 +17849,7 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("supportsConcurrentConnection", "", "bool")); + VerifyOrReturn(CheckConstraintType("supportsConcurrentConnection", "boolean", "boolean")); NextTest(); }]; @@ -16812,7 +17993,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -16837,7 +18018,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -16857,7 +18038,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); @@ -16885,7 +18066,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); NextTest(); @@ -16912,7 +18093,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -17186,7 +18367,7 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("networkInterfaces", "", "list")); + VerifyOrReturn(CheckConstraintType("networkInterfaces", "list", "list")); NextTest(); }]; @@ -17206,7 +18387,7 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("rebootCount", "", "uint16")); + VerifyOrReturn(CheckConstraintType("rebootCount", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("rebootCount", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("rebootCount", [value unsignedShortValue], 65535U)); @@ -17270,7 +18451,7 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("upTime", "", "uint64")); + VerifyOrReturn(CheckConstraintType("upTime", "int64u", "int64u")); NextTest(); }]; @@ -17290,7 +18471,7 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("totalOperationalHours", "", "uint32")); + VerifyOrReturn(CheckConstraintType("totalOperationalHours", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("totalOperationalHours", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("totalOperationalHours", [value unsignedIntValue], 4294967294UL)); @@ -17441,19 +18622,15 @@ class Test_TC_I_1_1 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("I.C.C40.Tx")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip(" !I.C.C40.Tx ")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional command(TriggerEffect) in AcceptedCommandList\n"); + if (ShouldSkip("I.C.C40.Tx")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAcceptedCommandList_6(); + err = TestReadTheOptionalCommandTriggerEffectInAcceptedCommandList_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional attribute(IdentifyQuery) in AcceptedCommandList\n"); @@ -17465,19 +18642,16 @@ class Test_TC_I_1_1 : public TestCommandBridge { break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("I.S.C00.Tx")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeGeneratedCommandList_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip(" !I.S.C00.Tx ")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Read the optional attribute(IdentifyQueryResponse) in GeneratedCommandList\n"); + if (ShouldSkip("I.S.C00.Tx")) { NextTest(); return; } - err = TestReadTheGlobalAttributeGeneratedCommandList_9(); + err = TestReadTheOptionalAttributeIdentifyQueryResponseInGeneratedCommandList_9(); break; case 10: ChipLogProgress(chipTool, @@ -17576,7 +18750,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -17599,7 +18773,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -17622,7 +18796,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -17640,7 +18814,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); @@ -17666,9 +18840,8 @@ class Test_TC_I_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 64UL)); NextTest(); }]; @@ -17676,19 +18849,19 @@ class Test_TC_I_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_6() + CHIP_ERROR TestReadTheOptionalCommandTriggerEffectInAcceptedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + NSLog(@"Read the optional command(TriggerEffect) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 64UL)); NextTest(); }]; @@ -17707,7 +18880,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); NextTest(); @@ -17729,34 +18902,34 @@ class Test_TC_I_1_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_9() + CHIP_ERROR TestReadTheOptionalAttributeIdentifyQueryResponseInGeneratedCommandList_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"Read the optional attribute(IdentifyQueryResponse) in GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -17881,7 +19054,7 @@ class Test_TC_I_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("identifyTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("identifyTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 65535U)); @@ -17902,7 +19075,7 @@ class Test_TC_I_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("identifyType", "", "enum8")); + VerifyOrReturn(CheckConstraintType("identifyType", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("identifyType", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("identifyType", [value unsignedCharValue], 5U)); @@ -17965,12 +19138,12 @@ class Test_TC_I_2_2 : public TestCommandBridge { err = TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x003c60s_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads immediately IdentifyTime attribute from DUT1\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads immediately IdentifyTime attribute from DUT\n"); if (ShouldSkip("I.S.A0000")) { NextTest(); return; } - err = TestThReadsImmediatelyIdentifyTimeAttributeFromDut1_2(); + err = TestThReadsImmediatelyIdentifyTimeAttributeFromDut_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 10000ms\n"); @@ -17988,7 +19161,7 @@ class Test_TC_I_2_2 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 5 : 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\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && I.S.C01.Rsp && I.S.C00.Tx")) { NextTest(); return; } @@ -18005,16 +19178,16 @@ class Test_TC_I_2_2 : public TestCommandBridge { err = TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x0000StopIdentifying_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads immediately IdentifyTime attribute from DUT2\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads immediately IdentifyTime attribute from DUT\n"); if (ShouldSkip("I.S.A0000")) { NextTest(); return; } - err = TestThReadsImmediatelyIdentifyTimeAttributeFromDut2_7(); + err = TestThReadsImmediatelyIdentifyTimeAttributeFromDut_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends IdentifyQuery command to DUT \n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && I.S.C01.Rsp && I.S.C00.Tx")) { NextTest(); return; } @@ -18134,19 +19307,19 @@ class Test_TC_I_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsImmediatelyIdentifyTimeAttributeFromDut1_2() + CHIP_ERROR TestThReadsImmediatelyIdentifyTimeAttributeFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads immediately IdentifyTime attribute from DUT1 Error: %@", err); + NSLog(@"TH reads immediately IdentifyTime attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 55U)); - VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 65U)); + VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 51U)); + VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 69U)); NextTest(); }]; @@ -18172,8 +19345,8 @@ class Test_TC_I_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 45U)); - VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 55U)); + VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 43U)); + VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 57U)); NextTest(); }]; @@ -18214,14 +19387,14 @@ class Test_TC_I_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsImmediatelyIdentifyTimeAttributeFromDut2_7() + CHIP_ERROR TestThReadsImmediatelyIdentifyTimeAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads immediately IdentifyTime attribute from DUT2 Error: %@", err); + NSLog(@"TH reads immediately IdentifyTime attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19117,7 +20290,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -19141,7 +20314,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -19160,7 +20333,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); @@ -19188,7 +20361,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); NextTest(); @@ -19209,7 +20382,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); NextTest(); @@ -19235,7 +20408,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -19259,7 +20432,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -19428,7 +20601,7 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("measuredValue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value unsignedShortValue], 65534U)); } @@ -19453,7 +20626,7 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value unsignedShortValue], 1U)); VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value unsignedShortValue], 65533U)); } @@ -19478,7 +20651,7 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value unsignedShortValue], 2U)); VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value unsignedShortValue], 65534U)); } @@ -19501,7 +20674,7 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); + VerifyOrReturn(CheckConstraintType("tolerance", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); @@ -19525,7 +20698,7 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("lightSensorType", "", "enum8")); + VerifyOrReturn(CheckConstraintType("lightSensorType", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("lightSensorType", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("lightSensorType", [value unsignedCharValue], 254U)); } @@ -19664,19 +20837,16 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("LVL.S.F02")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAcceptedCommandList_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip(" !LVL.S.F02 ")) { + ChipLogProgress( + chipTool, " ***** Test Step 13 : Read the Feature-dependent(LVL.S.F02) attribute in AcceptedCommandList\n"); + if (ShouldSkip("LVL.S.F02")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAcceptedCommandList_13(); + err = TestReadTheFeatureDependentLVLSF02AttributeInAcceptedCommandList_13(); break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: GeneratedCommandList\n"); @@ -19796,7 +20966,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -19816,7 +20986,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 7UL)); @@ -19839,7 +21009,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); @@ -19863,7 +21033,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 16384UL)); @@ -19886,7 +21056,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); @@ -19910,7 +21080,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); NextTest(); @@ -19932,7 +21102,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); NextTest(); @@ -19954,7 +21124,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); NextTest(); @@ -19976,7 +21146,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); NextTest(); @@ -19998,7 +21168,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); NextTest(); @@ -20020,7 +21190,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); NextTest(); @@ -20042,7 +21212,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); @@ -20051,7 +21221,6 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 5UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 6UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 8UL)); NextTest(); }]; @@ -20059,7 +21228,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_13() + CHIP_ERROR TestReadTheFeatureDependentLVLSF02AttributeInAcceptedCommandList_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -20068,19 +21237,12 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + NSLog(@"Read the Feature-dependent(LVL.S.F02) attribute in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 7UL)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 8UL)); NextTest(); }]; @@ -20106,7 +21268,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -20440,7 +21602,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 255U)); { @@ -20466,7 +21628,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("remainingTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("remainingTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("remainingTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("remainingTime", [value unsignedShortValue], 65535U)); @@ -20495,7 +21657,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("min level", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); { MinLevelValue = value; } @@ -20520,7 +21682,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("minLevel", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 255U)); { @@ -20552,7 +21714,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("max level", actualValue, 254U)); } - VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("maxLevel", [value unsignedCharValue], MinLevelValue)); { MaxLevelValue = value; @@ -20578,7 +21740,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); VerifyOrReturn( CheckConstraintMinValue("maxLevel", [value unsignedCharValue], MinLevelFeatureMapNotSupportedValue)); VerifyOrReturn(CheckConstraintMaxValue("maxLevel", [value unsignedCharValue], 254U)); @@ -20605,7 +21767,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], MinLevelValue)); VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], MaxLevelValue)); @@ -20628,7 +21790,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); VerifyOrReturn( CheckConstraintMinValue("currentLevel", [value unsignedCharValue], MinLevelFeatureMapNotSupportedValue)); VerifyOrReturn( @@ -20653,7 +21815,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentFrequency", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentFrequency", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentFrequency", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentFrequency", [value unsignedShortValue], 65535U)); @@ -20677,7 +21839,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minFrequency", "", "uint16")); + VerifyOrReturn(CheckConstraintType("minFrequency", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("minFrequency", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("minFrequency", [value unsignedShortValue], 65535U)); { @@ -20704,7 +21866,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxFrequency", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxFrequency", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("maxFrequency", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("maxFrequency", [value unsignedShortValue], 65535U)); { @@ -20730,7 +21892,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentFrequency", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentFrequency", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentFrequency", [value unsignedShortValue], MinFrequencyValue)); VerifyOrReturn(CheckConstraintMaxValue("currentFrequency", [value unsignedShortValue], MaxFrequencyValue)); @@ -20753,7 +21915,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("onOffTransitionTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("onOffTransitionTime", [value unsignedShortValue], 65535U)); @@ -20778,7 +21940,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("onLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("onLevel", [value unsignedCharValue], MinLevelValue)); VerifyOrReturn(CheckConstraintMaxValue("onLevel", [value unsignedCharValue], MaxLevelValue)); } @@ -20804,7 +21966,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("onLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); VerifyOrReturn( CheckConstraintMinValue("onLevel", [value unsignedCharValue], MinLevelFeatureMapNotSupportedValue)); VerifyOrReturn( @@ -20832,7 +21994,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("onTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("onTransitionTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("onTransitionTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("onTransitionTime", [value unsignedShortValue], 65535U)); } @@ -20858,7 +22020,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("offTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("offTransitionTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("offTransitionTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("offTransitionTime", [value unsignedShortValue], 65535U)); } @@ -20884,7 +22046,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("defaultMoveRate", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("defaultMoveRate", [value unsignedCharValue], 255U)); } @@ -20913,7 +22075,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("options", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("options", "", "map8")); + VerifyOrReturn(CheckConstraintType("options", "bitmap8", "bitmap8")); NextTest(); }]; @@ -20935,7 +22097,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("startUpCurrentLevel", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("startUpCurrentLevel", [value unsignedCharValue], 255U)); } @@ -21265,7 +22427,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("onOffTransitionTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("onOffTransitionTime", [value unsignedShortValue], 65535U)); { @@ -21321,7 +22483,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { mOnOffTransitionTimeConfigValue.HasValue() ? mOnOffTransitionTimeConfigValue.Value() : 10U)); } - VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintNotValue("onOffTransitionTime", value, OnOffTransitionTimeValue)); NextTest(); @@ -21346,7 +22508,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("onLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("onLevel", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("onLevel", [value unsignedCharValue], 255U)); } @@ -21404,7 +22566,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { } if (value != nil) { - VerifyOrReturn(CheckConstraintType("onLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); } VerifyOrReturn(CheckConstraintNotValue("onLevel", value, OnLevelValue)); @@ -21430,7 +22592,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("onTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("onTransitionTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("onTransitionTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("onTransitionTime", [value unsignedShortValue], 65535U)); } @@ -21489,7 +22651,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { } if (value != nil) { - VerifyOrReturn(CheckConstraintType("onTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("onTransitionTime", "int16u", "int16u")); } VerifyOrReturn(CheckConstraintNotValue("onTransitionTime", value, OnTransitionTimeValue)); @@ -21515,7 +22677,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("offTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("offTransitionTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("offTransitionTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("offTransitionTime", [value unsignedShortValue], 65535U)); } @@ -21574,7 +22736,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { } if (value != nil) { - VerifyOrReturn(CheckConstraintType("offTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("offTransitionTime", "int16u", "int16u")); } VerifyOrReturn(CheckConstraintNotValue("offTransitionTime", value, OffTransitionTimeValue)); @@ -21600,7 +22762,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("defaultMoveRate", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("defaultMoveRate", [value unsignedCharValue], 255U)); } @@ -21659,7 +22821,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { } if (value != nil) { - VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "int8u", "int8u")); } VerifyOrReturn(CheckConstraintNotValue("defaultMoveRate", value, DefaultMoveRatevalue)); @@ -21685,7 +22847,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("startUpCurrentLevel", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("startUpCurrentLevel", [value unsignedCharValue], 255U)); } @@ -21744,7 +22906,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { } if (value != nil) { - VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "int8u", "int8u")); } VerifyOrReturn(CheckConstraintNotValue("startUpCurrentLevel", value, StartUpCurrentLevelValue)); @@ -21836,124 +22998,132 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the MinLevel attribute\n"); - if (ShouldSkip("LVL.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestReadsTheMinLevelAttribute_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the MaxLevel attribute\n"); - if (ShouldSkip("LVL.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the MinLevel attribute\n"); + if (ShouldSkip("LVL.S.A0002")) { NextTest(); return; } - err = TestReadsTheMaxLevelAttribute_4(); + err = TestReadsTheMinLevelAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : sends a MoveToLevelWithOnOff command\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the MaxLevel attribute\n"); + if (ShouldSkip("LVL.S.A0003")) { NextTest(); return; } - err = TestSendsAMoveToLevelWithOnOffCommand_5(); + err = TestReadsTheMaxLevelAttribute_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 100ms\n"); - err = TestWait100ms_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : sends a MoveToLevelWithOnOff command\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestSendsAMoveToLevelWithOnOffCommand_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 100ms\n"); + err = TestWait100ms_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_7(); + err = TestReadsCurrentLevelAttributeFromDut_8(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : sends a Move to level command\n"); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : sends a Move to level command\n"); if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestSendsAMoveToLevelCommand_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 100 ms\n"); - err = TestWait100Ms_9(); + err = TestSendsAMoveToLevelCommand_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 100 ms\n"); + err = TestWait100Ms_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_10(); + err = TestReadsCurrentLevelAttributeFromDut_11(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : sends a Move to level command\n"); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : sends a Move to level command\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestSendsAMoveToLevelCommand_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 11000ms\n"); - err = TestWait11000ms_12(); + err = TestSendsAMoveToLevelCommand_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 11000ms\n"); + err = TestWait11000ms_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_13(); + err = TestReadsCurrentLevelAttributeFromDut_14(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the OnOffTransitionTime attribute from the DUT\n"); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Reads the OnOffTransitionTime attribute from the DUT\n"); if (ShouldSkip("LVL.S.A0010")) { NextTest(); return; } - err = TestReadsTheOnOffTransitionTimeAttributeFromTheDut_14(); + err = TestReadsTheOnOffTransitionTimeAttributeFromTheDut_15(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : sends a Move to level command\n"); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : sends a Move to level command\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0010")) { NextTest(); return; } - err = TestSendsAMoveToLevelCommand_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 1000ms\n"); - err = TestWait1000ms_16(); + err = TestSendsAMoveToLevelCommand_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 1000ms\n"); + err = TestWait1000ms_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0010 && LVL.S.A0000")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_17(); + err = TestReadsCurrentLevelAttributeFromDut_18(); break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Precondition send Off Command\n"); + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Precondition send Off Command\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestPreconditionSendOffCommand_18(); + err = TestPreconditionSendOffCommand_19(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Check on/off attribute value is false after off command\n"); + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_19(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20(); break; } @@ -22026,6 +23196,9 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -22039,7 +23212,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 21; chip::Optional mNodeId; chip::Optional mCluster; @@ -22092,7 +23265,29 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheMinLevelAttribute_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheMinLevelAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22105,7 +23300,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("minLevel", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 255U)); @@ -22115,7 +23310,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheMaxLevelAttribute_4() + CHIP_ERROR TestReadsTheMaxLevelAttribute_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22128,7 +23323,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("maxLevel", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("maxLevel", [value unsignedCharValue], 255U)); @@ -22138,7 +23333,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelWithOnOffCommand_5() + CHIP_ERROR TestSendsAMoveToLevelWithOnOffCommand_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22149,6 +23344,8 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; params.level = [NSNumber numberWithUnsignedChar:64U]; params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithOnOffWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"sends a MoveToLevelWithOnOff command Error: %@", err); @@ -22161,14 +23358,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_6() + CHIP_ERROR TestWait100ms_7() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_7() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22192,7 +23389,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelCommand_8() + CHIP_ERROR TestSendsAMoveToLevelCommand_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22203,8 +23400,8 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; params.level = [NSNumber numberWithUnsignedChar:100U]; params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"sends a Move to level command Error: %@", err); @@ -22217,14 +23414,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100Ms_9() + CHIP_ERROR TestWait100Ms_10() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22248,7 +23445,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelCommand_11() + CHIP_ERROR TestSendsAMoveToLevelCommand_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22259,8 +23456,8 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; params.level = [NSNumber numberWithUnsignedChar:128U]; params.transitionTime = [NSNumber numberWithUnsignedShort:100U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"sends a Move to level command Error: %@", err); @@ -22273,14 +23470,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait11000ms_12() + CHIP_ERROR TestWait11000ms_13() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 11000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_13() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22304,7 +23501,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheOnOffTransitionTimeAttributeFromTheDut_14() + CHIP_ERROR TestReadsTheOnOffTransitionTimeAttributeFromTheDut_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22317,7 +23514,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("onOffTransitionTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("onOffTransitionTime", [value unsignedShortValue], 65535U)); @@ -22327,7 +23524,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelCommand_15() + CHIP_ERROR TestSendsAMoveToLevelCommand_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22338,8 +23535,8 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; params.level = [NSNumber numberWithUnsignedChar:64U]; params.transitionTime = [NSNumber numberWithUnsignedShort:65535U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"sends a Move to level command Error: %@", err); @@ -22352,14 +23549,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_16() + CHIP_ERROR TestWait1000ms_17() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_17() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22383,7 +23580,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionSendOffCommand_18() + CHIP_ERROR TestPreconditionSendOffCommand_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -22400,7 +23597,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_19() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -22482,134 +23679,142 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads Minlevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestReadsMinlevelAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : sends a MoveToLevelWithOnOff command\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads Minlevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0002")) { NextTest(); return; } - err = TestSendsAMoveToLevelWithOnOffCommand_4(); + err = TestReadsMinlevelAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : reads max level attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : sends a MoveToLevelWithOnOff command\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestReadsMaxLevelAttributeFromDut_5(); + err = TestSendsAMoveToLevelWithOnOffCommand_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : sends a Move up command\n"); - if (ShouldSkip("LVL.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : reads max level attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0003")) { NextTest(); return; } - err = TestSendsAMoveUpCommand_6(); + err = TestReadsMaxLevelAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Physically verify that the DUT moves at a rate of 32 units per second or as close as " - "possible to this rate and completes moving to its maximum level\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : sends a Move up command\n"); + if (ShouldSkip("LVL.S.C01.Rsp")) { NextTest(); return; } - err = TestPhysicallyVerifyThatTheDutMovesAtARateOf32UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompletesMovingToItsMaximumLevel_7(); + err = TestSendsAMoveUpCommand_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 9000ms\n"); - err = TestWait9000ms_8(); + ChipLogProgress(chipTool, + " ***** Test Step 8 : Physically verify that the DUT moves at a rate of 32 units per second or as close as " + "possible to this rate and completes moving to its maximum level\n"); + if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestPhysicallyVerifyThatTheDutMovesAtARateOf32UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompletesMovingToItsMaximumLevel_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 9000ms\n"); + err = TestWait9000ms_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000 && LVL.S.A0003")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_9(); + err = TestReadsCurrentLevelAttributeFromDut_10(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : sends a MoveWithOnOff command\n"); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : sends a Move command\n"); if (ShouldSkip("LVL.S.C05.Rsp")) { NextTest(); return; } - err = TestSendsAMoveWithOnOffCommand_10(); + err = TestSendsAMoveCommand_11(); break; - case 11: + case 12: ChipLogProgress(chipTool, - " ***** Test Step 11 : Physically verify that the DUT moves at a rate of 64 units per second or as close as " + " ***** Test Step 12 : Physically verify that the DUT moves at a rate of 64 units per second or as close as " "possible to this rate and complete moving to its minimum level\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C05.Rsp")) { NextTest(); return; } - err = TestPhysicallyVerifyThatTheDutMovesAtARateOf64UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompleteMovingToItsMinimumLevel_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 5000ms\n"); - err = TestWait5000ms_12(); + err = TestPhysicallyVerifyThatTheDutMovesAtARateOf64UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompleteMovingToItsMinimumLevel_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 5000ms\n"); + err = TestWait5000ms_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_13(); + err = TestReadsCurrentLevelAttributeFromDut_14(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : reads default move rate attribute from DUT\n"); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : reads default move rate attribute from DUT\n"); if (ShouldSkip("LVL.S.A0014")) { NextTest(); return; } - err = TestReadsDefaultMoveRateAttributeFromDut_14(); + err = TestReadsDefaultMoveRateAttributeFromDut_15(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : sends a Move up command at default move rate\n"); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : sends a Move up command at default move rate\n"); if (ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0014")) { NextTest(); return; } - err = TestSendsAMoveUpCommandAtDefaultMoveRate_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 100ms\n"); - err = TestWait100ms_16(); + err = TestSendsAMoveUpCommandAtDefaultMoveRate_16(); break; case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 500ms\n"); + err = TestWait500ms_17(); + break; + case 18: ChipLogProgress(chipTool, - " ***** Test Step 17 : Physically verify that the device moves at the rate recorded in step 3a and completes " + " ***** Test Step 18 : Physically verify that the device moves at the rate recorded in step 3a and completes " "moving to its maximum level\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C05.Rsp && LVL.S.A0014")) { NextTest(); return; } - err = TestPhysicallyVerifyThatTheDeviceMovesAtTheRateRecordedInStep3aAndCompletesMovingToItsMaximumLevel_17(); + err = TestPhysicallyVerifyThatTheDeviceMovesAtTheRateRecordedInStep3aAndCompletesMovingToItsMaximumLevel_18(); break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Precondition send Off Command\n"); + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Precondition send Off Command\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestPreconditionSendOffCommand_18(); + err = TestPreconditionSendOffCommand_19(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Check on/off attribute value is false after off command\n"); + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_19(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20(); break; } @@ -22682,6 +23887,9 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -22695,7 +23903,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 21; chip::Optional mNodeId; chip::Optional mCluster; @@ -22747,9 +23955,31 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } NSNumber * _Nonnull MinlevelValue; - CHIP_ERROR TestReadsMinlevelAttributeFromDut_3() + CHIP_ERROR TestReadsMinlevelAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22762,7 +23992,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("minLevel", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 255U)); { @@ -22775,7 +24005,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelWithOnOffCommand_4() + CHIP_ERROR TestSendsAMoveToLevelWithOnOffCommand_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22786,6 +24016,8 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; params.level = [NSNumber numberWithUnsignedChar:1U]; params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveToLevelWithOnOffWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"sends a MoveToLevelWithOnOff command Error: %@", err); @@ -22799,7 +24031,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { } NSNumber * _Nonnull MaxlevelValue; - CHIP_ERROR TestReadsMaxLevelAttributeFromDut_5() + CHIP_ERROR TestReadsMaxLevelAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22812,7 +24044,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("maxLevel", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("maxLevel", [value unsignedCharValue], 255U)); { @@ -22825,7 +24057,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveUpCommand_6() + CHIP_ERROR TestSendsAMoveUpCommand_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22836,8 +24068,8 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; params.rate = [NSNumber numberWithUnsignedChar:32U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"sends a Move up command Error: %@", err); @@ -22851,7 +24083,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { } CHIP_ERROR - TestPhysicallyVerifyThatTheDutMovesAtARateOf32UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompletesMovingToItsMaximumLevel_7() + TestPhysicallyVerifyThatTheDutMovesAtARateOf32UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompletesMovingToItsMaximumLevel_8() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -22860,14 +24092,14 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestWait9000ms_8() + CHIP_ERROR TestWait9000ms_9() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_9() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22891,7 +24123,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveWithOnOffCommand_10() + CHIP_ERROR TestSendsAMoveCommand_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22899,23 +24131,25 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterMoveWithOnOffParams alloc] init]; + __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; params.rate = [NSNumber numberWithUnsignedChar:64U]; - [cluster moveWithOnOffWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"sends a MoveWithOnOff command Error: %@", err); + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; + [cluster moveWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"sends a Move command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR - TestPhysicallyVerifyThatTheDutMovesAtARateOf64UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompleteMovingToItsMinimumLevel_11() + TestPhysicallyVerifyThatTheDutMovesAtARateOf64UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompleteMovingToItsMinimumLevel_12() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -22924,14 +24158,14 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestWait5000ms_12() + CHIP_ERROR TestWait5000ms_13() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_13() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22959,7 +24193,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { } NSNumber * _Nullable DefaultMoveRateValue; - CHIP_ERROR TestReadsDefaultMoveRateAttributeFromDut_14() + CHIP_ERROR TestReadsDefaultMoveRateAttributeFromDut_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22974,7 +24208,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("defaultMoveRate", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("defaultMoveRate", [value unsignedCharValue], 255U)); } @@ -22988,7 +24222,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveUpCommandAtDefaultMoveRate_15() + CHIP_ERROR TestSendsAMoveUpCommandAtDefaultMoveRate_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22999,8 +24233,8 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; params.rate = [NSNumber numberWithUnsignedChar:255U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"sends a Move up command at default move rate Error: %@", err); @@ -23013,14 +24247,14 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_16() + CHIP_ERROR TestWait500ms_17() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestPhysicallyVerifyThatTheDeviceMovesAtTheRateRecordedInStep3aAndCompletesMovingToItsMaximumLevel_17() + CHIP_ERROR TestPhysicallyVerifyThatTheDeviceMovesAtTheRateRecordedInStep3aAndCompletesMovingToItsMaximumLevel_18() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -23029,7 +24263,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestPreconditionSendOffCommand_18() + CHIP_ERROR TestPreconditionSendOffCommand_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -23046,7 +24280,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_19() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -23128,108 +24362,156 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads Minlevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestReadsMinlevelAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Sends MoveToLevelWithOnOff command to DUT\n"); - if (ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads Minlevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0002")) { NextTest(); return; } - err = TestSendsMoveToLevelWithOnOffCommandToDut_4(); + err = TestReadsMinlevelAttributeFromDut_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Sends MoveToLevelWithOnOff command to DUT\n"); - if (ShouldSkip("LVL.S.C04.Rsp && !LVL.S.A0002")) { + if (ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0002")) { NextTest(); return; } err = TestSendsMoveToLevelWithOnOffCommandToDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads current level attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Sends MoveToLevelWithOnOff command to DUT\n"); + if (ShouldSkip("LVL.S.C04.Rsp && !LVL.S.A0002")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_6(); + err = TestSendsMoveToLevelWithOnOffCommandToDut_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Reads current level attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0000 && !LVL.S.A0002")) { + if (ShouldSkip("LVL.S.A0000 && LVL.S.C04.Rsp")) { NextTest(); return; } err = TestReadsCurrentLevelAttributeFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Sends step up command to DUT\n"); - if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.M.VarRate")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads current level attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0000 && !LVL.S.A0002 && LVL.S.C04.Rsp")) { NextTest(); return; } - err = TestSendsStepUpCommandToDut_8(); + err = TestReadsCurrentLevelAttributeFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 4000ms\n"); - err = TestWait4000ms_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Sends step up command to DUT\n"); + if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestSendsStepUpCommandToDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads current level attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0000 && LVL.S.C02.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Sends step up command to DUT\n"); + if (ShouldSkip("LVL.S.C02.Rsp && !LVL.S.M.VarRate")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_10(); + err = TestSendsStepUpCommandToDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Sends a StepWithOnOff command\n"); - if (ShouldSkip("LVL.S.C06.Rsp && LVL.S.M.VarRate")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : Wait 2500ms\n"); + err = TestWait2500ms_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Reads current level attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0000 && LVL.S.C02.Rsp && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestSendsAStepWithOnOffCommand_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 4000ms\n"); - err = TestWait4000ms_12(); + err = TestReadsCurrentLevelAttributeFromDut_12(); break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : Reads current level attribute from DUT\n"); - if (ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000")) { + if (ShouldSkip("LVL.S.A0000 && LVL.S.C02.Rsp && !LVL.S.M.VarRate")) { NextTest(); return; } err = TestReadsCurrentLevelAttributeFromDut_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads current level attribute from DUT\n"); - if (ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000 && !LVL.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : Sends a StepWithOnOff command\n"); + if (ShouldSkip("LVL.S.C06.Rsp && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_14(); + err = TestSendsAStepWithOnOffCommand_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Precondition send Off Command\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : Sends a StepWithOnOff command\n"); + if (ShouldSkip("LVL.S.C06.Rsp && !LVL.S.M.VarRate")) { NextTest(); return; } - err = TestPreconditionSendOffCommand_15(); + err = TestSendsAStepWithOnOffCommand_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Check on/off attribute value is false after off command\n"); + ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 2500ms\n"); + err = TestWait2500ms_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Reads current level attribute from DUT\n"); + if (ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestReadsCurrentLevelAttributeFromDut_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Reads current level attribute from DUT\n"); + if (ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestReadsCurrentLevelAttributeFromDut_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Reads current level attribute from DUT\n"); + if (ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000 && !LVL.S.A0002 && LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestReadsCurrentLevelAttributeFromDut_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Reads current level attribute from DUT\n"); + if (ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000 && !LVL.S.A0002 && !LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestReadsCurrentLevelAttributeFromDut_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Precondition send Off Command\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestPreconditionSendOffCommand_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_16(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22(); break; } @@ -23293,6 +24575,24 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -23306,7 +24606,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 17; + const uint16_t mTestCount = 23; chip::Optional mNodeId; chip::Optional mCluster; @@ -23358,9 +24658,31 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } NSNumber * _Nonnull MinlevelValue; - CHIP_ERROR TestReadsMinlevelAttributeFromDut_3() + CHIP_ERROR TestReadsMinlevelAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23373,9 +24695,9 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("minLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 255U)); + VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 254U)); { MinlevelValue = value; } @@ -23386,7 +24708,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsMoveToLevelWithOnOffCommandToDut_4() + CHIP_ERROR TestSendsMoveToLevelWithOnOffCommandToDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23397,6 +24719,8 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; params.level = [NSNumber numberWithUnsignedChar:[MinlevelValue unsignedCharValue] + 1U]; params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithOnOffWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Sends MoveToLevelWithOnOff command to DUT Error: %@", err); @@ -23409,7 +24733,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsMoveToLevelWithOnOffCommandToDut_5() + CHIP_ERROR TestSendsMoveToLevelWithOnOffCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23420,6 +24744,8 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; params.level = [NSNumber numberWithUnsignedChar:2U]; params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithOnOffWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Sends MoveToLevelWithOnOff command to DUT Error: %@", err); @@ -23433,7 +24759,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { } NSNumber * _Nonnull CurrentlevelValue; - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_6() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23451,9 +24777,9 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("current level", actualValue, [MinlevelValue unsignedCharValue] + 1U)); } - VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 255U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 254U)); { CurrentlevelValue = value; } @@ -23464,7 +24790,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_7() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23482,9 +24808,9 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("current level", actualValue, 2U)); } - VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 255U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -23492,7 +24818,33 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsStepUpCommandToDut_8() + CHIP_ERROR TestSendsStepUpCommandToDut_9() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRLevelControlClusterStepParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:0U]; + params.stepSize = [NSNumber numberWithUnsignedChar:64U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:20U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster stepWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends step up command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendsStepUpCommandToDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23504,8 +24856,8 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { params.stepMode = [NSNumber numberWithUnsignedChar:0U]; params.stepSize = [NSNumber numberWithUnsignedChar:64U]; params.transitionTime = [NSNumber numberWithUnsignedShort:20U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Sends step up command to DUT Error: %@", err); @@ -23518,14 +24870,39 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait4000ms_9() + CHIP_ERROR TestWait2500ms_11() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 4000UL; + value.ms = 2500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_12() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads current level attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, 66U)); + } + + VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23538,17 +24915,19 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 60U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 68U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, 66U)); + } + VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAStepWithOnOffCommand_11() + CHIP_ERROR TestSendsAStepWithOnOffCommand_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23560,6 +24939,8 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { params.stepMode = [NSNumber numberWithUnsignedChar:1U]; params.stepSize = [NSNumber numberWithUnsignedChar:64U]; params.transitionTime = [NSNumber numberWithUnsignedShort:20U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepWithOnOffWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Sends a StepWithOnOff command Error: %@", err); @@ -23572,14 +24953,40 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait4000ms_12() + CHIP_ERROR TestSendsAStepWithOnOffCommand_15() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRLevelControlClusterStepWithOnOffParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:1U]; + params.stepSize = [NSNumber numberWithUnsignedChar:64U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:20U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster stepWithOnOffWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends a StepWithOnOff command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait2500ms_16() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 4000UL; + value.ms = 2500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_13() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23603,7 +25010,55 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_14() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_18() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads current level attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, CurrentlevelValue)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_19() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads current level attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, 2U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23627,7 +25082,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionSendOffCommand_15() + CHIP_ERROR TestPreconditionSendOffCommand_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -23644,7 +25099,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_16() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -23726,112 +25181,124 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads Minlevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestReadsMinlevelAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Sends MoveToLevelWithOnOff command to DUT\n"); - if (ShouldSkip("LVL.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads Minlevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0002")) { NextTest(); return; } - err = TestSendsMoveToLevelWithOnOffCommandToDut_4(); + err = TestReadsMinlevelAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Sends MoveToLevelWithOnOff command to DUT\n"); + if (ShouldSkip("LVL.S.C04.Rsp")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_5(); + err = TestSendsMoveToLevelWithOnOffCommandToDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Sends a move up command to DUT\n"); - if (ShouldSkip("LVL.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0000 && LVL.S.C04.Rsp")) { NextTest(); return; } - err = TestSendsAMoveUpCommandToDut_6(); + err = TestReadsCurrentLevelAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 5000ms\n"); - err = TestWait5000ms_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Sends stop command to DUT\n"); - if (ShouldSkip("LVL.S.C03.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Sends a move up command to DUT\n"); + if (ShouldSkip("LVL.S.C01.Rsp")) { NextTest(); return; } - err = TestSendsStopCommandToDut_8(); + err = TestSendsAMoveUpCommandToDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 5000ms\n"); + err = TestWait5000ms_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Physically verify that the device has stopped transitioning\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Sends stop command to DUT\n"); + if (ShouldSkip("LVL.S.C03.Rsp")) { NextTest(); return; } - err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_9(); + err = TestSendsStopCommandToDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.C03.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Physically verify that the device has stopped transitioning\n"); + if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C03.Rsp")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_10(); + err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Sends a move up command to DUT\n"); - if (ShouldSkip("LVL.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.C03.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestSendsAMoveUpCommandToDut_11(); + err = TestReadsCurrentLevelAttributeFromDut_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 5000ms\n"); - err = TestWait5000ms_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Sends a move up command to DUT\n"); + if (ShouldSkip("LVL.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestSendsAMoveUpCommandToDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Sends stop command to DUT\n"); - err = TestSendsStopCommandToDut_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 5000ms\n"); + err = TestWait5000ms_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Physically verify that the device has stopped transitioning\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : Sends StopWithOnOff command to DUT\n"); + if (ShouldSkip("LVL.S.C07.Rsp")) { NextTest(); return; } - err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_14(); + err = TestSendsStopWithOnOffCommandToDut_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.C07.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : Physically verify that the device has stopped transitioning\n"); + if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C07.Rsp")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_15(); + err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Precondition send Off Command\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.C07.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestPreconditionSendOffCommand_16(); + err = TestReadsCurrentLevelAttributeFromDut_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Check on/off attribute value is false after off command\n"); + ChipLogProgress(chipTool, " ***** Test Step 17 : Precondition send Off Command\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestPreconditionSendOffCommand_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_17(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_18(); break; } @@ -23898,6 +25365,9 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -23911,7 +25381,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 18; + const uint16_t mTestCount = 19; chip::Optional mNodeId; chip::Optional mCluster; @@ -23963,9 +25433,31 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } NSNumber * _Nonnull MinlevelValue; - CHIP_ERROR TestReadsMinlevelAttributeFromDut_3() + CHIP_ERROR TestReadsMinlevelAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23978,7 +25470,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("minLevel", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 255U)); { @@ -23991,7 +25483,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsMoveToLevelWithOnOffCommandToDut_4() + CHIP_ERROR TestSendsMoveToLevelWithOnOffCommandToDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24002,6 +25494,8 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; params.level = [NSNumber numberWithUnsignedChar:1U]; params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveToLevelWithOnOffWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Sends MoveToLevelWithOnOff command to DUT Error: %@", err); @@ -24015,7 +25509,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { } NSNumber * _Nonnull CurrentLevelValue; - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_5() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24040,7 +25534,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveUpCommandToDut_6() + CHIP_ERROR TestSendsAMoveUpCommandToDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24051,8 +25545,8 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; params.rate = [NSNumber numberWithUnsignedChar:5U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Sends a move up command to DUT Error: %@", err); @@ -24065,14 +25559,14 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait5000ms_7() + CHIP_ERROR TestWait5000ms_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestSendsStopCommandToDut_8() + CHIP_ERROR TestSendsStopCommandToDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24081,8 +25575,8 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterStopParams alloc] init]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster stopWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Sends stop command to DUT Error: %@", err); @@ -24095,7 +25589,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_9() + CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_10() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -24104,7 +25598,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24117,8 +25611,8 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 22U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 28U)); + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 21U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 29U)); VerifyOrReturn(CheckConstraintNotValue("currentLevel", value, CurrentLevelValue)); NextTest(); @@ -24127,7 +25621,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveUpCommandToDut_11() + CHIP_ERROR TestSendsAMoveUpCommandToDut_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24138,8 +25632,8 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; params.rate = [NSNumber numberWithUnsignedChar:5U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Sends a move up command to DUT Error: %@", err); @@ -24152,14 +25646,14 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait5000ms_12() + CHIP_ERROR TestWait5000ms_13() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestSendsStopCommandToDut_13() + CHIP_ERROR TestSendsStopWithOnOffCommandToDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24167,22 +25661,22 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterStopParams alloc] init]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; - [cluster stopWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends stop command to DUT Error: %@", err); + __auto_type * params = [[MTRLevelControlClusterStopWithOnOffParams alloc] init]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; + [cluster stopWithOnOffWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends StopWithOnOff command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_14() + CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_15() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -24191,7 +25685,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_15() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24204,8 +25698,8 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 45U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 55U)); + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 43U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 57U)); VerifyOrReturn(CheckConstraintNotValue("currentLevel", value, CurrentLevelValue)); NextTest(); @@ -24214,7 +25708,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionSendOffCommand_16() + CHIP_ERROR TestPreconditionSendOffCommand_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -24231,7 +25725,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_17() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -24401,7 +25895,7 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -24424,7 +25918,7 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -24452,7 +25946,7 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("", actualValue[4], 65533UL)); } - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); NextTest(); }]; @@ -24476,7 +25970,7 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -24499,7 +25993,7 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -24669,7 +26163,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -24689,7 +26183,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 7UL)); @@ -24712,7 +26206,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); @@ -24738,7 +26232,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); NextTest(); @@ -24760,7 +26254,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); NextTest(); @@ -24843,10 +26337,6 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("APPLAUNCHER.S.A0000 && APPLAUNCHER.S.A0001")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAttributeList_4(); break; case 5: @@ -24969,7 +26459,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -24994,7 +26484,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -25019,7 +26509,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -25039,7 +26529,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); @@ -25065,7 +26555,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); NextTest(); @@ -25087,7 +26577,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); NextTest(); @@ -25109,7 +26599,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); @@ -25133,7 +26623,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 3UL)); NextTest(); @@ -25200,18 +26690,10 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("MEDIAINPUT.S.NU")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("MEDIAINPUT.S.A0000 && MEDIAINPUT.S.A0001")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: @@ -25331,7 +26813,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -25351,12 +26833,10 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); - } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 1UL)); - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; @@ -25376,7 +26856,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); @@ -25402,7 +26882,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); NextTest(); @@ -25424,7 +26904,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); NextTest(); @@ -25446,7 +26926,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); @@ -25476,7 +26956,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -25640,7 +27120,7 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -25663,7 +27143,7 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -25681,7 +27161,7 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); @@ -25710,7 +27190,7 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -25733,7 +27213,7 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -25806,10 +27286,6 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("CHANNEL.S.A0000 && CHANNEL.S.A0001 && CHANNEL.S.A0002")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: @@ -25863,21 +27339,29 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("CHANNEL.S.C01.Tx")) { + if (ShouldSkip(" !CHANNEL.S.C01.Tx ")) { NextTest(); return; } err = TestReadTheGlobalAttributeGeneratedCommandList_10(); break; case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Read the global attribute: GeneratedCommandList\n"); + if (ShouldSkip("CHANNEL.S.C01.Tx")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeGeneratedCommandList_11(); + break; + case 12: ChipLogProgress(chipTool, - " ***** Test Step 11 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + " ***** Test Step 12 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_11(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_12(); break; } @@ -25926,6 +27410,9 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -25939,7 +27426,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 13; chip::Optional mNodeId; chip::Optional mCluster; @@ -25969,7 +27456,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -25987,7 +27474,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 3UL)); @@ -26008,7 +27495,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); @@ -26032,7 +27519,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); NextTest(); @@ -26052,7 +27539,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); NextTest(); @@ -26072,7 +27559,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); NextTest(); @@ -26092,7 +27579,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); NextTest(); @@ -26112,7 +27599,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); NextTest(); @@ -26132,7 +27619,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); NextTest(); @@ -26152,7 +27639,30 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_11() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); NextTest(); @@ -26161,7 +27671,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_11() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_12() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -26478,7 +27988,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -26498,7 +28008,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 3UL)); @@ -26521,7 +28031,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); @@ -26548,7 +28058,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); NextTest(); @@ -26570,7 +28080,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); NextTest(); @@ -26592,7 +28102,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); NextTest(); @@ -26614,7 +28124,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); NextTest(); @@ -26636,7 +28146,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); NextTest(); @@ -26658,7 +28168,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); NextTest(); @@ -26680,7 +28190,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); @@ -26704,7 +28214,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); NextTest(); @@ -26726,7 +28236,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); NextTest(); @@ -26748,7 +28258,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 5UL)); NextTest(); @@ -26770,7 +28280,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 6UL)); NextTest(); @@ -26792,7 +28302,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 7UL)); NextTest(); @@ -26814,7 +28324,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 8UL)); NextTest(); @@ -26836,7 +28346,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 9UL)); NextTest(); @@ -26858,7 +28368,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 11UL)); NextTest(); @@ -26880,7 +28390,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 10UL)); NextTest(); @@ -27063,7 +28573,7 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -27083,7 +28593,7 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 3UL)); @@ -27106,7 +28616,7 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); @@ -27134,7 +28644,7 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); NextTest(); @@ -27162,7 +28672,7 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { VerifyOrReturn(CheckValue("", actualValue[0], 1UL)); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -27187,7 +28697,7 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -27256,19 +28766,15 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("TGTNAV.S.A0001")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); - if (ShouldSkip(" !TGTNAV.S.A0001 ")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(CurrentTarget) in AttributeList\n"); + if (ShouldSkip("TGTNAV.S.A0001")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_4(); + err = TestReadTheOptionalAttributeCurrentTargetInAttributeList_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); @@ -27368,7 +28874,7 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -27393,7 +28899,7 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -27413,9 +28919,8 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); @@ -27428,7 +28933,7 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() + CHIP_ERROR TestReadTheOptionalAttributeCurrentTargetInAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device @@ -27437,17 +28942,12 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(CurrentTarget) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); NextTest(); }]; @@ -27468,7 +28968,7 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); NextTest(); @@ -27490,7 +28990,7 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); NextTest(); @@ -27561,29 +29061,49 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("APBSC.S.A0000 && APBSC.S.A0001 && APBSC.S.A0003")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(VendorName) in AttributeList\n"); + if (ShouldSkip("APBSC.S.A0000")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeVendorNameInAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute(VendorID) in AttributeList\n"); + if (ShouldSkip("APBSC.S.A0001")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeVendorIDInAttributeList_5(); break; case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(ProductID) in AttributeList\n"); + if (ShouldSkip("APBSC.S.A0003")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeProductIDInAttributeList_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_8(); + break; + case 9: ChipLogProgress(chipTool, - " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + " ***** Test Step 9 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_9(); break; } @@ -27617,6 +29137,15 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -27630,7 +29159,7 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; @@ -27662,7 +29191,7 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -27687,7 +29216,7 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -27707,7 +29236,7 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); @@ -27725,7 +29254,73 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() + CHIP_ERROR TestReadTheOptionalAttributeVendorNameInAttributeList_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(VendorName) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeVendorIDInAttributeList_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(VendorID) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeProductIDInAttributeList_6() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(ProductID) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device @@ -27743,14 +29338,14 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device @@ -27768,14 +29363,14 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_9() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -27978,7 +29573,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -27998,7 +29593,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 3UL)); @@ -28021,7 +29616,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); @@ -28047,7 +29642,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); NextTest(); @@ -28069,7 +29664,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); NextTest(); @@ -28091,7 +29686,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); NextTest(); @@ -28113,7 +29708,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); NextTest(); @@ -28135,7 +29730,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 2UL)); NextTest(); @@ -28303,7 +29898,7 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -28328,7 +29923,7 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -28348,7 +29943,7 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); @@ -28374,7 +29969,7 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); @@ -28398,7 +29993,7 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); NextTest(); @@ -29911,7 +31506,7 @@ class Test_TC_MEDIAINPUT_3_13 : public TestCommandBridge { case 3: ChipLogProgress( chipTool, " ***** Test Step 3 : TH reads the InputList attribute from the DUT to show list of Inputs available\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAINPUT.S.A0000")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAINPUT.S.A0000 && MEDIAINPUT.S.C0003")) { NextTest(); return; } @@ -30206,7 +31801,7 @@ class Test_TC_CHANNEL_5_2 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Verify that the channel has changed on the device\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && CHANNEL.S.C02.Rsp")) { NextTest(); return; } @@ -30286,7 +31881,7 @@ class Test_TC_CHANNEL_5_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("channelList", "", "list")); + VerifyOrReturn(CheckConstraintType("channelList", "list", "list")); NextTest(); }]; @@ -30430,7 +32025,7 @@ class Test_TC_CHANNEL_5_3 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Verify that the channel has changed on the device\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && CHANNEL.S.C03.Rsp")) { NextTest(); return; } @@ -30537,7 +32132,7 @@ class Test_TC_CHANNEL_5_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("channelList", "", "list")); + VerifyOrReturn(CheckConstraintType("channelList", "list", "list")); NextTest(); }]; @@ -30615,7 +32210,7 @@ class Test_TC_CHANNEL_5_3 : public TestCommandBridge { } if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentChannel", "", "list")); + VerifyOrReturn(CheckConstraintType("currentChannel", "ChannelInfo", "ChannelInfo")); } NextTest(); @@ -30670,7 +32265,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { case 1: ChipLogProgress( chipTool, " ***** Test Step 1 : Precondition: Media content in a paused state at the beginning of the content\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0001")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp")) { NextTest(); return; } @@ -30678,7 +32273,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentState attribute\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp")) { NextTest(); return; } @@ -30686,7 +32281,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Sends a Play command\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0000")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C00.Rsp")) { NextTest(); return; } @@ -30694,7 +32289,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Verify that the media state is playing\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C00.Rsp")) { NextTest(); return; } @@ -30702,7 +32297,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the CurrentState attribute\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C00.Rsp")) { NextTest(); return; } @@ -30710,7 +32305,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : sends a Pause command\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0001")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp")) { NextTest(); return; } @@ -30718,7 +32313,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Verify that the media is paused\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C01.Rsp")) { NextTest(); return; } @@ -30726,11 +32321,15 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the CurrentState attribute\n"); + if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp && MEDIAPLAYBACK.S.A0000")) { + NextTest(); + return; + } err = TestReadsTheCurrentStateAttribute_8(); break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Sends a Stop command\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0002")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C02.Rsp")) { NextTest(); return; } @@ -30738,7 +32337,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Verify that the media is stoped\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C02.Rsp")) { NextTest(); return; } @@ -30746,7 +32345,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the CurrentState attribute\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C02.Rsp")) { NextTest(); return; } @@ -31095,7 +32694,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { case 1: ChipLogProgress( chipTool, " ***** Test Step 1 : Precondition: Media content in a paused state at the beginning of the content\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0001")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp")) { NextTest(); return; } @@ -31103,7 +32702,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentState attribute from the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp")) { NextTest(); return; } @@ -31111,7 +32710,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Sends a Play command to the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0000")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C00.Rsp")) { NextTest(); return; } @@ -31119,7 +32718,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Verify that the media state is playing\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C00.Rsp")) { NextTest(); return; } @@ -31127,7 +32726,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the CurrentState attribute\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C00.Rsp")) { NextTest(); return; } @@ -31143,7 +32742,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Verify that the media is started over\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C03.Rsp")) { NextTest(); return; } @@ -31159,7 +32758,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Verify that the next media item in the queue has been loaded\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C05.Rsp")) { NextTest(); return; } @@ -31175,7 +32774,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Verify that the previous media item in the queue has been loaded\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C04.Rsp")) { NextTest(); return; } @@ -31191,7 +32790,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : Verify that the media has skipped forward 10 seconds\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C08.Rsp")) { NextTest(); return; } @@ -31199,7 +32798,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the SampledPosition attribute from the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0003")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C08.Rsp")) { NextTest(); return; } @@ -31215,7 +32814,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 16: ChipLogProgress(chipTool, " ***** Test Step 16 : Verify that the media has skipped backward 10 seconds\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C09.Rsp")) { NextTest(); return; } @@ -31223,7 +32822,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { break; case 17: ChipLogProgress(chipTool, " ***** Test Step 17 : Reads the SampledPosition attribute from the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0003")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C09.Rsp")) { NextTest(); return; } @@ -31705,7 +33304,7 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { case 1: ChipLogProgress( chipTool, " ***** Test Step 1 : Precondition: Media content in a paused state at the beginning of the content\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0001")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp")) { NextTest(); return; } @@ -31722,7 +33321,7 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { case 3: ChipLogProgress( chipTool, " ***** Test Step 3 : Verify that the media has moved to 10 seconds from the starting point\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C0B.Rsp")) { NextTest(); return; } @@ -31730,7 +33329,7 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the SampledPosition attribute\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0003")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C0B.Rsp")) { NextTest(); return; } @@ -32043,7 +33642,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { case 1: ChipLogProgress( chipTool, " ***** Test Step 1 : Precondition: Media content in a paused state at the beginning of the content\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0001")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp")) { NextTest(); return; } @@ -32051,7 +33650,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentState attribute from the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp")) { NextTest(); return; } @@ -32075,7 +33674,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the CurrentState attribute\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C07.Rsp")) { NextTest(); return; } @@ -32083,7 +33682,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the PlaybackSpeed attribute from the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0004")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C07.Rsp")) { NextTest(); return; } @@ -32099,7 +33698,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the PlaybackSpeed attribute from the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0004")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C07.Rsp")) { NextTest(); return; } @@ -32115,7 +33714,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the CurrentState attribute\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0000")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C06.Rsp")) { NextTest(); return; } @@ -32123,7 +33722,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the PlaybackSpeed attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C07.Rsp")) { + if (ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.A0004")) { NextTest(); return; } @@ -32147,7 +33746,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Sends a Play command\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.C0000")) { + if (ShouldSkip("MEDIAPLAYBACK.S.C00.Rsp")) { NextTest(); return; } @@ -32155,7 +33754,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Reads the PlaybackSpeed attribute from the DUT\n"); - if (ShouldSkip("MEDIAPLAYBACK.S.A0004")) { + if (ShouldSkip("MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C00.Rsp")) { NextTest(); return; } @@ -32517,7 +34116,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message - = chip::Span("Please enter 'y' if PlaybackSpeed value is -2garbage: not in length on purpose", 45); + = chip::Span("Please enter 'y' if PlaybackSpeed value is -1garbage: not in length on purpose", 45); value.expectedValue.Emplace(); value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); @@ -32755,7 +34354,7 @@ class Test_TC_AUDIOOUTPUT_7_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("outputList", "", "OutPutInfo")); + VerifyOrReturn(CheckConstraintType("outputList", "list", "list")); NextTest(); }]; @@ -32941,7 +34540,7 @@ class Test_TC_AUDIOOUTPUT_7_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("outputList", "", "OutPutInfo")); + VerifyOrReturn(CheckConstraintType("outputList", "list", "list")); { audioOutputListValues = value; } @@ -33055,7 +34654,7 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the CurrentTarget attribute\n"); - if (ShouldSkip("TGTNAV.S.A0001")) { + if (ShouldSkip("TGTNAV.S.A0001 && TGTNAV.S.C0000")) { NextTest(); return; } @@ -33129,7 +34728,7 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentTarget", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentTarget", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentTarget", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentTarget", [value unsignedCharValue], 255U)); @@ -33153,7 +34752,7 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("targetList", "", "list")); + VerifyOrReturn(CheckConstraintType("targetList", "list", "list")); { TargetListValues = value; } @@ -33397,7 +34996,7 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("vendorName", "", "string")); + VerifyOrReturn(CheckConstraintType("vendorName", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("vendorName", value, 32)); NextTest(); }]; @@ -33419,7 +35018,7 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("vendorID", "", "vendor-id")); + VerifyOrReturn(CheckConstraintType("vendorID", "vendor_id", "vendor_id")); { vendorID = value; } @@ -33443,7 +35042,7 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("applicationName", "", "string")); + VerifyOrReturn(CheckConstraintType("applicationName", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("applicationName", value, 256)); NextTest(); }]; @@ -33464,7 +35063,7 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("productID", "", "uint16")); + VerifyOrReturn(CheckConstraintType("productID", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("productID", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("productID", [value unsignedShortValue], 65535U)); @@ -33488,7 +35087,7 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("application", "", "struct")); + VerifyOrReturn(CheckConstraintType("application", "ApplicationBasicApplication", "ApplicationBasicApplication")); NextTest(); }]; @@ -33530,7 +35129,7 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("applicationVersion", "", "string")); + VerifyOrReturn(CheckConstraintType("applicationVersion", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("applicationVersion", value, 32)); NextTest(); }]; @@ -33551,7 +35150,7 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("allowedVendorList", "", "list")); + VerifyOrReturn(CheckConstraintType("allowedVendorList", "list", "list")); NextTest(); }]; @@ -33677,7 +35276,7 @@ class Test_TC_CONTENTLAUNCHER_10_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptHeader", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptHeader", "list", "list")); NextTest(); }]; @@ -33698,7 +35297,7 @@ class Test_TC_CONTENTLAUNCHER_10_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("supportedStreamingProtocols", "", "map32")); + VerifyOrReturn(CheckConstraintType("supportedStreamingProtocols", "bitmap32", "bitmap32")); NextTest(); }]; @@ -33894,7 +35493,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -33919,7 +35518,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -33944,7 +35543,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -33964,7 +35563,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); @@ -33994,7 +35593,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); NextTest(); @@ -34016,7 +35615,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); NextTest(); @@ -34038,7 +35637,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); NextTest(); @@ -34065,7 +35664,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -34450,7 +36049,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: @@ -34547,7 +36146,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34556,7 +36155,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -34581,7 +36180,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -34601,7 +36200,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); @@ -34635,7 +36234,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -34660,7 +36259,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -34909,7 +36508,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("occupancy", "", "map8")); + VerifyOrReturn(CheckConstraintType("occupancy", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("occupancy", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("occupancy", [value unsignedCharValue], 1U)); @@ -34932,7 +36531,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("occupancySensorType", "", "enum8")); + VerifyOrReturn(CheckConstraintType("occupancySensorType", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("occupancySensorType", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("occupancySensorType", [value unsignedCharValue], 3U)); @@ -34956,7 +36555,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("occupancySensorTypeBitmap", "", "map8")); + VerifyOrReturn(CheckConstraintType("occupancySensorTypeBitmap", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("occupancySensorTypeBitmap", [value unsignedCharValue], 1U)); VerifyOrReturn(CheckConstraintMaxValue("occupancySensorTypeBitmap", [value unsignedCharValue], 273U)); @@ -34985,7 +36584,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("PIR occupied to unoccupied delay", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("pirOccupiedToUnoccupiedDelay", "", "uint16")); + VerifyOrReturn(CheckConstraintType("pirOccupiedToUnoccupiedDelay", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("pirOccupiedToUnoccupiedDelay", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("pirOccupiedToUnoccupiedDelay", [value unsignedShortValue], 65535U)); @@ -35014,7 +36613,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("PIR unoccupied to occupied delay", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("pirUnoccupiedToOccupiedDelay", "", "uint16")); + VerifyOrReturn(CheckConstraintType("pirUnoccupiedToOccupiedDelay", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("pirUnoccupiedToOccupiedDelay", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("pirUnoccupiedToOccupiedDelay", [value unsignedShortValue], 65535U)); @@ -35043,7 +36642,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("PIR unoccupied to occupied threshold", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("pirUnoccupiedToOccupiedThreshold", "", "uint8")); + VerifyOrReturn(CheckConstraintType("pirUnoccupiedToOccupiedThreshold", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("pirUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1U)); VerifyOrReturn(CheckConstraintMaxValue("pirUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 254U)); @@ -35072,7 +36671,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ultrasonic occupied to unoccupied delay", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("ultrasonicOccupiedToUnoccupiedDelay", "", "uint16")); + VerifyOrReturn(CheckConstraintType("ultrasonicOccupiedToUnoccupiedDelay", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("ultrasonicOccupiedToUnoccupiedDelay", [value unsignedShortValue], 0U)); VerifyOrReturn( @@ -35103,7 +36702,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ultrasonic unoccupied to occupied delay", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("ultrasonicUnoccupiedToOccupiedDelay", "", "uint16")); + VerifyOrReturn(CheckConstraintType("ultrasonicUnoccupiedToOccupiedDelay", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("ultrasonicUnoccupiedToOccupiedDelay", [value unsignedShortValue], 0U)); VerifyOrReturn( @@ -35134,7 +36733,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ultrasonic unoccupied to occupied threshold", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("ultrasonicUnoccupiedToOccupiedThreshold", "", "uint16")); + VerifyOrReturn(CheckConstraintType("ultrasonicUnoccupiedToOccupiedThreshold", "int8u", "int8u")); VerifyOrReturn( CheckConstraintMinValue("ultrasonicUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1U)); VerifyOrReturn( @@ -35165,7 +36764,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("physical contact occupied to unoccupied delay", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("physicalContactOccupiedToUnoccupiedDelay", "", "uint16")); + VerifyOrReturn(CheckConstraintType("physicalContactOccupiedToUnoccupiedDelay", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("physicalContactOccupiedToUnoccupiedDelay", [value unsignedShortValue], 0U)); VerifyOrReturn( @@ -35196,7 +36795,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("physical contact unoccupied to occupied delay", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("physicalContactUnoccupiedToOccupiedDelay", "", "uint16")); + VerifyOrReturn(CheckConstraintType("physicalContactUnoccupiedToOccupiedDelay", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("physicalContactUnoccupiedToOccupiedDelay", [value unsignedShortValue], 0U)); VerifyOrReturn( @@ -35227,7 +36826,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("physical contact unoccupied to occupied threshold", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("physicalContactUnoccupiedToOccupiedThreshold", "", "uint8")); + VerifyOrReturn(CheckConstraintType("physicalContactUnoccupiedToOccupiedThreshold", "int8u", "int8u")); VerifyOrReturn( CheckConstraintMinValue("physicalContactUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1U)); VerifyOrReturn( @@ -35304,35 +36903,28 @@ class Test_TC_OO_1_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("OO.S.F00")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); - if (ShouldSkip(" !OO.S.F00 ")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the feature dependent(OO.S.F00) attribute in AttributeList\n"); + if (ShouldSkip("OO.S.F00")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_5(); + err = TestReadTheFeatureDependentOOSF00AttributeInAttributeList_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("OO.S.F00")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAcceptedCommandList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip(" !OO.S.F00 ")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : Read the feature dependent(OO.S.F00) commands in AcceptedCommandList\n"); + if (ShouldSkip("OO.S.F00")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAcceptedCommandList_7(); + err = TestReadTheFeatureDependentOOSF00CommandsInAcceptedCommandList_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); @@ -35432,7 +37024,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -35455,7 +37047,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -35478,7 +37070,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -35496,12 +37088,8 @@ class Test_TC_OO_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16384UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16385UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16386UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16387UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); @@ -35514,24 +37102,22 @@ class Test_TC_OO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() + CHIP_ERROR TestReadTheFeatureDependentOOSF00AttributeInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + NSLog(@"Read the feature dependent(OO.S.F00) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16384UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16385UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16386UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16387UL)); NextTest(); }]; @@ -35550,13 +37136,10 @@ class Test_TC_OO_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 64UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 65UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 66UL)); NextTest(); }]; @@ -35564,21 +37147,21 @@ class Test_TC_OO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() + CHIP_ERROR TestReadTheFeatureDependentOOSF00CommandsInAcceptedCommandList_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + NSLog(@"Read the feature dependent(OO.S.F00) commands in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 64UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 65UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 66UL)); NextTest(); }]; @@ -35602,7 +37185,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -35662,7 +37245,7 @@ class Test_TC_OO_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: OnOff\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the mandatory attribute: OnOff\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; @@ -35670,7 +37253,7 @@ class Test_TC_OO_2_1 : public TestCommandBridge { err = TestReadTheMandatoryAttributeOnOff_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : read LT attribute: GlobalSceneControl\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read LT attribute: GlobalSceneControl\n"); if (ShouldSkip("OO.S.A4000")) { NextTest(); return; @@ -35678,7 +37261,7 @@ class Test_TC_OO_2_1 : public TestCommandBridge { err = TestReadLtAttributeGlobalSceneControl_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : read LT attribute: OnTime\n"); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read LT attribute: OnTime\n"); if (ShouldSkip("OO.S.A4001")) { NextTest(); return; @@ -35686,7 +37269,7 @@ class Test_TC_OO_2_1 : public TestCommandBridge { err = TestReadLtAttributeOnTime_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : read LT attribute: OffWaitTime\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read LT attribute: OffWaitTime\n"); if (ShouldSkip("OO.S.A4002")) { NextTest(); return; @@ -35694,7 +37277,7 @@ class Test_TC_OO_2_1 : public TestCommandBridge { err = TestReadLtAttributeOffWaitTime_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : read LT attribute: StartUpOnOff\n"); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read LT attribute: StartUpOnOff\n"); if (ShouldSkip("OO.S.A4003")) { NextTest(); return; @@ -35764,11 +37347,11 @@ class Test_TC_OO_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: OnOff Error: %@", err); + NSLog(@"Read the mandatory attribute: OnOff Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("onOff", "", "bool")); + VerifyOrReturn(CheckConstraintType("onOff", "boolean", "boolean")); NextTest(); }]; @@ -35782,11 +37365,11 @@ class Test_TC_OO_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGlobalSceneControlWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read LT attribute: GlobalSceneControl Error: %@", err); + NSLog(@"Read LT attribute: GlobalSceneControl Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("globalSceneControl", "", "bool")); + VerifyOrReturn(CheckConstraintType("globalSceneControl", "boolean", "boolean")); NextTest(); }]; @@ -35800,11 +37383,11 @@ class Test_TC_OO_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeOnTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read LT attribute: OnTime Error: %@", err); + NSLog(@"Read LT attribute: OnTime Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("onTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("onTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("onTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("onTime", [value unsignedShortValue], 65535U)); @@ -35821,11 +37404,11 @@ class Test_TC_OO_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeOffWaitTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read LT attribute: OffWaitTime Error: %@", err); + NSLog(@"Read LT attribute: OffWaitTime Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("offWaitTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("offWaitTime", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("offWaitTime", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("offWaitTime", [value unsignedShortValue], 65535U)); @@ -35842,13 +37425,13 @@ class Test_TC_OO_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeStartUpOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read LT attribute: StartUpOnOff Error: %@", err); + NSLog(@"Read LT attribute: StartUpOnOff Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("startUpOnOff", "", "enum8")); + VerifyOrReturn(CheckConstraintType("startUpOnOff", "enum8", "enum8")); } NextTest(); @@ -36022,7 +37605,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { break; case 17: ChipLogProgress(chipTool, " ***** Test Step 17 : Operate on device to set OnOff attribute manually to on\n"); - if (ShouldSkip("PICS_USER_PROMPT && OO.M.ManuallyControlled")) { + if (ShouldSkip("PICS_USER_PROMPT && OO.M.ManuallyControlled && OO.S.A0000")) { NextTest(); return; } @@ -36030,7 +37613,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { break; case 18: ChipLogProgress(chipTool, " ***** Test Step 18 : Check on/off attribute value is true after on command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && OO.S.A0000")) { + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && OO.S.A0000 && OO.M.ManuallyControlled")) { NextTest(); return; } @@ -36038,7 +37621,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { break; case 19: ChipLogProgress(chipTool, " ***** Test Step 19 : Operate on device to set OnOff attribute manually to off\n"); - if (ShouldSkip("PICS_USER_PROMPT && OO.M.ManuallyControlled")) { + if (ShouldSkip("PICS_USER_PROMPT && OO.M.ManuallyControlled && OO.S.A0000")) { NextTest(); return; } @@ -36046,7 +37629,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { break; case 20: ChipLogProgress(chipTool, " ***** Test Step 20 : Check on/off attribute value is false after off command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && OO.S.A0000")) { + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && OO.S.A0000 && OO.M.ManuallyControlled")) { NextTest(); return; } @@ -37397,36 +38980,39 @@ class Test_TC_PS_1_1 : public TestCommandBridge { err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the Feature related(PS.S.F00-WIRED) attribute in AttributeList\n"); + ChipLogProgress( + chipTool, " ***** Test Step 4 : Read the Feature dependent(PS.S.F00-WIRED) attribute in AttributeList\n"); if (ShouldSkip("PS.S.F00")) { NextTest(); return; } - err = TestReadTheFeatureRelatedPSSF00WiredAttributeInAttributeList_4(); + err = TestReadTheFeatureDependentPSSF00WiredAttributeInAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the Feature related(PS.S.F01-BAT) attribute in AttributeList\n"); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the Feature dependent(PS.S.F01-BAT) attribute in AttributeList\n"); if (ShouldSkip("PS.S.F01")) { NextTest(); return; } - err = TestReadTheFeatureRelatedPSSF01BatAttributeInAttributeList_5(); + err = TestReadTheFeatureDependentPSSF01BatAttributeInAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the Feature related(PS.S.F02-RECHG) attribute in AttributeList\n"); + ChipLogProgress( + chipTool, " ***** Test Step 6 : Read the Feature dependent(PS.S.F02-RECHG) attribute in AttributeList\n"); if (ShouldSkip("PS.S.F02")) { NextTest(); return; } - err = TestReadTheFeatureRelatedPSSF02RechgAttributeInAttributeList_6(); + err = TestReadTheFeatureDependentPSSF02RechgAttributeInAttributeList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the Feature related(PS.S.F03-REPLC) attribute in AttributeList\n"); + ChipLogProgress( + chipTool, " ***** Test Step 7 : Read the Feature dependent(PS.S.F03-REPLC) attribute in AttributeList\n"); if (ShouldSkip("PS.S.F03")) { NextTest(); return; } - err = TestReadTheFeatureRelatedPSSF03ReplcAttributeInAttributeList_7(); + err = TestReadTheFeatureDependentPSSF03ReplcAttributeInAttributeList_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: AcceptedCommandList\n"); @@ -37535,7 +39121,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -37555,9 +39141,9 @@ class Test_TC_PS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 7UL)); + VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 15UL)); NextTest(); }]; @@ -37578,7 +39164,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); @@ -37594,7 +39180,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureRelatedPSSF00WiredAttributeInAttributeList_4() + CHIP_ERROR TestReadTheFeatureDependentPSSF00WiredAttributeInAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -37603,11 +39189,11 @@ class Test_TC_PS_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature related(PS.S.F00-WIRED) attribute in AttributeList Error: %@", err); + NSLog(@"Read the Feature dependent(PS.S.F00-WIRED) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); NextTest(); @@ -37616,7 +39202,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureRelatedPSSF01BatAttributeInAttributeList_5() + CHIP_ERROR TestReadTheFeatureDependentPSSF01BatAttributeInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -37625,11 +39211,11 @@ class Test_TC_PS_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature related(PS.S.F01-BAT) attribute in AttributeList Error: %@", err); + NSLog(@"Read the Feature dependent(PS.S.F01-BAT) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 14UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); @@ -37640,7 +39226,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureRelatedPSSF02RechgAttributeInAttributeList_6() + CHIP_ERROR TestReadTheFeatureDependentPSSF02RechgAttributeInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -37649,11 +39235,11 @@ class Test_TC_PS_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature related(PS.S.F02-RECHG) attribute in AttributeList Error: %@", err); + NSLog(@"Read the Feature dependent(PS.S.F02-RECHG) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 26UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 28UL)); @@ -37663,7 +39249,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureRelatedPSSF03ReplcAttributeInAttributeList_7() + CHIP_ERROR TestReadTheFeatureDependentPSSF03ReplcAttributeInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -37672,11 +39258,11 @@ class Test_TC_PS_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature related(PS.S.F03-REPLC) attribute in AttributeList Error: %@", err); + NSLog(@"Read the Feature dependent(PS.S.F03-REPLC) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 25UL)); @@ -37704,7 +39290,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -37729,7 +39315,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -38189,7 +39775,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("status", "", "enum8")); + VerifyOrReturn(CheckConstraintType("status", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("status", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("status", [value unsignedCharValue], 3U)); @@ -38212,7 +39798,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("order", "", "uint8")); + VerifyOrReturn(CheckConstraintType("order", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("order", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("order", [value unsignedCharValue], 255U)); @@ -38235,7 +39821,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("description", "", "string")); + VerifyOrReturn(CheckConstraintType("description", "char_string", "char_string")); NextTest(); }]; @@ -38258,7 +39844,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("wiredAssessedInputVoltage", "", "uint32")); + VerifyOrReturn(CheckConstraintType("wiredAssessedInputVoltage", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("wiredAssessedInputVoltage", [value unsignedIntValue], 0UL)); VerifyOrReturn( CheckConstraintMaxValue("wiredAssessedInputVoltage", [value unsignedIntValue], 4294967295UL)); @@ -38286,7 +39872,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("wiredAssessedInputFrequency", "", "uint16")); + VerifyOrReturn(CheckConstraintType("wiredAssessedInputFrequency", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("wiredAssessedInputFrequency", [value unsignedShortValue], 0U)); VerifyOrReturn( CheckConstraintMaxValue("wiredAssessedInputFrequency", [value unsignedShortValue], 65535U)); @@ -38311,7 +39897,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("wiredCurrentType", "", "enum8")); + VerifyOrReturn(CheckConstraintType("wiredCurrentType", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("wiredCurrentType", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("wiredCurrentType", [value unsignedCharValue], 1U)); @@ -38336,7 +39922,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("wiredAssessedCurrent", "", "uint32")); + VerifyOrReturn(CheckConstraintType("wiredAssessedCurrent", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("wiredAssessedCurrent", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("wiredAssessedCurrent", [value unsignedIntValue], 4294967295UL)); } @@ -38360,7 +39946,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("wiredNominalVoltage", "", "uint32")); + VerifyOrReturn(CheckConstraintType("wiredNominalVoltage", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("wiredNominalVoltage", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("wiredNominalVoltage", [value unsignedIntValue], 4294967295UL)); @@ -38383,7 +39969,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("wiredMaximumCurrent", "", "uint32")); + VerifyOrReturn(CheckConstraintType("wiredMaximumCurrent", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("wiredMaximumCurrent", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("wiredMaximumCurrent", [value unsignedIntValue], 4294967295UL)); @@ -38406,7 +39992,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("wiredPresent", "", "bool")); + VerifyOrReturn(CheckConstraintType("wiredPresent", "boolean", "boolean")); NextTest(); }]; @@ -38426,7 +40012,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("activeWiredFaults", "", "list")); + VerifyOrReturn(CheckConstraintType("activeWiredFaults", "list", "list")); VerifyOrReturn(CheckConstraintMaxLength("activeWiredFaults", value, 8)); NextTest(); }]; @@ -38449,7 +40035,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("batVoltage", "", "uint32")); + VerifyOrReturn(CheckConstraintType("batVoltage", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("batVoltage", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("batVoltage", [value unsignedIntValue], 4294967295UL)); } @@ -38475,7 +40061,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("batPercentRemaining", "", "uint8")); + VerifyOrReturn(CheckConstraintType("batPercentRemaining", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("batPercentRemaining", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("batPercentRemaining", [value unsignedCharValue], 200U)); } @@ -38501,7 +40087,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("batTimeRemaining", "", "uint32")); + VerifyOrReturn(CheckConstraintType("batTimeRemaining", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("batTimeRemaining", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("batTimeRemaining", [value unsignedIntValue], 4294967295UL)); } @@ -38525,7 +40111,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batChargeLevel", "", "enum8")); + VerifyOrReturn(CheckConstraintType("batChargeLevel", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("batChargeLevel", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("batChargeLevel", [value unsignedCharValue], 2U)); @@ -38548,7 +40134,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batReplacementNeeded", "", "bool")); + VerifyOrReturn(CheckConstraintType("batReplacementNeeded", "boolean", "boolean")); NextTest(); }]; @@ -38568,7 +40154,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batReplaceability", "", "enum8")); + VerifyOrReturn(CheckConstraintType("batReplaceability", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("batReplaceability", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("batReplaceability", [value unsignedCharValue], 3U)); @@ -38591,7 +40177,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batPresent", "", "bool")); + VerifyOrReturn(CheckConstraintType("batPresent", "boolean", "boolean")); NextTest(); }]; @@ -38611,7 +40197,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("activeBatFaults", "", "list")); + VerifyOrReturn(CheckConstraintType("activeBatFaults", "list", "list")); VerifyOrReturn(CheckConstraintMaxLength("activeBatFaults", value, 8)); NextTest(); }]; @@ -38633,7 +40219,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batReplacementDescription", "", "string")); + VerifyOrReturn(CheckConstraintType("batReplacementDescription", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("batReplacementDescription", value, 60)); NextTest(); }]; @@ -38654,7 +40240,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batCommonDesignation", "", "uint32")); + VerifyOrReturn(CheckConstraintType("batCommonDesignation", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("batCommonDesignation", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("batCommonDesignation", [value unsignedIntValue], 80UL)); @@ -38677,7 +40263,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batANSIDesignation", "", "string")); + VerifyOrReturn(CheckConstraintType("batANSIDesignation", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("batANSIDesignation", value, 20)); NextTest(); }]; @@ -38698,7 +40284,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batIECDesignation", "", "string")); + VerifyOrReturn(CheckConstraintType("batIECDesignation", "char_string", "char_string")); VerifyOrReturn(CheckConstraintMaxLength("batIECDesignation", value, 20)); NextTest(); }]; @@ -38719,7 +40305,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batApprovedChemistry", "", "uint32")); + VerifyOrReturn(CheckConstraintType("batApprovedChemistry", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("batApprovedChemistry", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("batApprovedChemistry", [value unsignedIntValue], 32UL)); @@ -38742,7 +40328,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batCapacity", "", "uint32")); + VerifyOrReturn(CheckConstraintType("batCapacity", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("batCapacity", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("batCapacity", [value unsignedIntValue], 4294967295UL)); @@ -38765,7 +40351,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batQuantity", "", "uint8")); + VerifyOrReturn(CheckConstraintType("batQuantity", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("batQuantity", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("batQuantity", [value unsignedCharValue], 255U)); @@ -38788,7 +40374,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batChargeState", "", "enum8")); + VerifyOrReturn(CheckConstraintType("batChargeState", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("batChargeState", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("batChargeState", [value unsignedCharValue], 3U)); @@ -38813,7 +40399,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("batTimeToFullCharge", "", "uint32")); + VerifyOrReturn(CheckConstraintType("batTimeToFullCharge", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("batTimeToFullCharge", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("batTimeToFullCharge", [value unsignedIntValue], 4294967295UL)); } @@ -38838,7 +40424,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batFunctionalWhileCharging", "", "bool")); + VerifyOrReturn(CheckConstraintType("batFunctionalWhileCharging", "boolean", "boolean")); NextTest(); }]; @@ -38860,7 +40446,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("batChargingCurrent", "", "uint32")); + VerifyOrReturn(CheckConstraintType("batChargingCurrent", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("batChargingCurrent", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("batChargingCurrent", [value unsignedIntValue], 4294967295UL)); } @@ -38884,7 +40470,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("activeBatChargeFaults", "", "list")); + VerifyOrReturn(CheckConstraintType("activeBatChargeFaults", "list", "list")); NextTest(); }]; @@ -39122,7 +40708,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -39147,7 +40733,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -39172,7 +40758,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -39192,7 +40778,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); @@ -39221,7 +40807,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); NextTest(); @@ -39243,7 +40829,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); NextTest(); @@ -39265,7 +40851,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); NextTest(); @@ -39287,7 +40873,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); NextTest(); @@ -39309,7 +40895,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); NextTest(); @@ -39331,7 +40917,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); NextTest(); @@ -39358,7 +40944,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -39383,7 +40969,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -39597,7 +41183,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("measuredValue", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value shortValue], 32767)); } @@ -39623,7 +41209,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value shortValue], 32767)); } @@ -39649,7 +41235,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value shortValue], 32767)); } @@ -39673,7 +41259,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("tolerance", "", "int16")); + VerifyOrReturn(CheckConstraintType("tolerance", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); @@ -39698,7 +41284,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("scaledValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("scaledValue", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("scaledValue", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("scaledValue", [value shortValue], 32767)); } @@ -39724,7 +41310,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("minScaledValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("minScaledValue", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("minScaledValue", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("minScaledValue", [value shortValue], 32767)); } @@ -39750,7 +41336,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxScaledValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxScaledValue", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("maxScaledValue", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("maxScaledValue", [value shortValue], 32767)); } @@ -39774,7 +41360,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("scaledTolerance", "", "int16")); + VerifyOrReturn(CheckConstraintType("scaledTolerance", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("scaledTolerance", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("scaledTolerance", [value unsignedShortValue], 2048U)); @@ -39797,7 +41383,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("scale", "", "int8")); + VerifyOrReturn(CheckConstraintType("scale", "int8s", "int8s")); VerifyOrReturn(CheckConstraintMinValue("scale", [value charValue], -127)); VerifyOrReturn(CheckConstraintMaxValue("scale", [value charValue], 127)); @@ -39863,20 +41449,166 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { err = TestThReadsTheAttributeListAttributeFromTheDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads the AcceptedCommandList attribute from the DUT\n"); - err = TestThReadsTheAcceptedCommandListAttributeFromTheDut_4(); + ChipLogProgress(chipTool, + " ***** Test Step 4 : TH reads optional attribute(MinConstPressure) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0003")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinConstPressureAttributeInAttributeListFromTheDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads the GeneratedCommandList attribute from the DUT\n"); - err = TestThReadsTheGeneratedCommandListAttributeFromTheDut_5(); + ChipLogProgress(chipTool, + " ***** Test Step 5 : TH reads optional attribute(MaxConstPressure) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0004")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxConstPressureAttributeInAttributeListFromTheDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads the EventList attribute from the DUT\n"); + ChipLogProgress(chipTool, + " ***** Test Step 6 : TH reads optional attribute(MinCompPressure) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0005")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinCompPressureAttributeInAttributeListFromTheDut_6(); + break; + case 7: + ChipLogProgress(chipTool, + " ***** Test Step 7 : TH reads optional attribute(MaxCompPressure) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0006")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxCompPressureAttributeInAttributeListFromTheDut_7(); + break; + case 8: + ChipLogProgress(chipTool, + " ***** Test Step 8 : TH reads optional attribute(MinConstSpeed) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0007")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinConstSpeedAttributeInAttributeListFromTheDut_8(); + break; + case 9: + ChipLogProgress(chipTool, + " ***** Test Step 9 : TH reads optional attribute(MaxConstSpeed) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0008")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxConstSpeedAttributeInAttributeListFromTheDut_9(); + break; + case 10: + ChipLogProgress(chipTool, + " ***** Test Step 10 : TH reads optional attribute(MinConstFlow) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0009")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinConstFlowAttributeInAttributeListFromTheDut_10(); + break; + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : TH reads optional attribute(MaxConstFlow) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A000a")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxConstFlowAttributeInAttributeListFromTheDut_11(); + break; + case 12: + ChipLogProgress(chipTool, + " ***** Test Step 12 : TH reads optional attribute(MinConstTemp) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A000b")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinConstTempAttributeInAttributeListFromTheDut_12(); + break; + case 13: + ChipLogProgress(chipTool, + " ***** Test Step 13 : TH reads optional attribute(MaxConstTemp) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A000c")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxConstTempAttributeInAttributeListFromTheDut_13(); + break; + case 14: + ChipLogProgress(chipTool, + " ***** Test Step 14 : TH reads optional attribute(PumpStatus) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0010")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributePumpStatusAttributeInAttributeListFromTheDut_14(); + break; + case 15: + ChipLogProgress( + chipTool, " ***** Test Step 15 : TH reads optional attribute(Speed) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0014")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeSpeedAttributeInAttributeListFromTheDut_15(); + break; + case 16: + ChipLogProgress(chipTool, + " ***** Test Step 16 : TH reads optional attribute(LifetimeRunningHours) attribute in AttributeList from the " + "DUT\n"); + if (ShouldSkip("PCC.S.A0015")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeLifetimeRunningHoursAttributeInAttributeListFromTheDut_16(); + break; + case 17: + ChipLogProgress( + chipTool, " ***** Test Step 17 : TH reads optional attribute(Power) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0016")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributePowerAttributeInAttributeListFromTheDut_17(); + break; + case 18: + ChipLogProgress(chipTool, + " ***** Test Step 18 : TH reads optional attribute(LifetimeEnergyConsumed) attribute in AttributeList from the " + "DUT\n"); + if (ShouldSkip("PCC.S.A0017")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeLifetimeEnergyConsumedAttributeInAttributeListFromTheDut_18(); + break; + case 19: + ChipLogProgress(chipTool, + " ***** Test Step 19 : TH reads optional attribute(ControlMode) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0021")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeControlModeAttributeInAttributeListFromTheDut_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads the AcceptedCommandList attribute from the DUT\n"); + err = TestThReadsTheAcceptedCommandListAttributeFromTheDut_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads the GeneratedCommandList attribute from the DUT\n"); + err = TestThReadsTheGeneratedCommandListAttributeFromTheDut_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads the EventList attribute from the DUT\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsTheEventListAttributeFromTheDut_6(); + err = TestThReadsTheEventListAttributeFromTheDut_22(); break; } @@ -39910,6 +41642,54 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -39923,7 +41703,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 23; chip::Optional mNodeId; chip::Optional mCluster; @@ -39954,7 +41734,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -39978,7 +41758,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -39997,7 +41777,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); @@ -40017,7 +41797,343 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheAcceptedCommandListAttributeFromTheDut_4() + CHIP_ERROR TestThReadsOptionalAttributeMinConstPressureAttributeInAttributeListFromTheDut_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MinConstPressure) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeMaxConstPressureAttributeInAttributeListFromTheDut_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MaxConstPressure) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeMinCompPressureAttributeInAttributeListFromTheDut_6() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MinCompPressure) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeMaxCompPressureAttributeInAttributeListFromTheDut_7() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MaxCompPressure) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeMinConstSpeedAttributeInAttributeListFromTheDut_8() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MinConstSpeed) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeMaxConstSpeedAttributeInAttributeListFromTheDut_9() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MaxConstSpeed) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeMinConstFlowAttributeInAttributeListFromTheDut_10() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MinConstFlow) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeMaxConstFlowAttributeInAttributeListFromTheDut_11() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MaxConstFlow) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeMinConstTempAttributeInAttributeListFromTheDut_12() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MinConstTemp) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 11UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeMaxConstTempAttributeInAttributeListFromTheDut_13() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(MaxConstTemp) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 12UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributePumpStatusAttributeInAttributeListFromTheDut_14() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(PumpStatus) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeSpeedAttributeInAttributeListFromTheDut_15() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(Speed) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeLifetimeRunningHoursAttributeInAttributeListFromTheDut_16() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(LifetimeRunningHours) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 21UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributePowerAttributeInAttributeListFromTheDut_17() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(Power) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 22UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeLifetimeEnergyConsumedAttributeInAttributeListFromTheDut_18() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(LifetimeEnergyConsumed) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 23UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeControlModeAttributeInAttributeListFromTheDut_19() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute(ControlMode) attribute in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 33UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTheAcceptedCommandListAttributeFromTheDut_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPumpConfigurationAndControl * cluster = @@ -40034,14 +42150,14 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheGeneratedCommandListAttributeFromTheDut_5() + CHIP_ERROR TestThReadsTheGeneratedCommandListAttributeFromTheDut_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPumpConfigurationAndControl * cluster = @@ -40058,14 +42174,14 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheEventListAttributeFromTheDut_6() + CHIP_ERROR TestThReadsTheEventListAttributeFromTheDut_22() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -40425,7 +42541,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxPressure", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxPressure", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("maxPressure", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("maxPressure", [value shortValue], 32767)); } @@ -40450,7 +42566,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxSpeed", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxSpeed", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("maxSpeed", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("maxSpeed", [value unsignedShortValue], 65535U)); } @@ -40475,7 +42591,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxFlow", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxFlow", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("maxFlow", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("maxFlow", [value unsignedShortValue], 65535U)); } @@ -40496,16 +42612,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeMinConstPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MinConstPressure Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("minConstPressure", "", "int16")); + VerifyOrReturn(CheckConstraintType("minConstPressure", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("minConstPressure", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("minConstPressure", [value shortValue], 32767)); } @@ -40526,16 +42637,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeMaxConstPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MaxConstPressure Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxConstPressure", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxConstPressure", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("maxConstPressure", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("maxConstPressure", [value shortValue], 32767)); } @@ -40556,16 +42662,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeMinCompPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MinCompPressure Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("minCompPressure", "", "int16")); + VerifyOrReturn(CheckConstraintType("minCompPressure", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("minCompPressure", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("minCompPressure", [value shortValue], 32767)); } @@ -40586,16 +42687,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeMaxCompPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MaxCompPressure Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxCompPressure", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxCompPressure", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("maxCompPressure", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("maxCompPressure", [value shortValue], 32767)); } @@ -40616,16 +42712,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeMinConstSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MinConstSpeed Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("minConstSpeed", "", "uint16")); + VerifyOrReturn(CheckConstraintType("minConstSpeed", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("minConstSpeed", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("minConstSpeed", [value unsignedShortValue], 65535U)); } @@ -40646,16 +42737,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeMaxConstSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MaxConstSpeed Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxConstSpeed", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxConstSpeed", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("maxConstSpeed", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("maxConstSpeed", [value unsignedShortValue], 65535U)); } @@ -40676,16 +42762,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeMinConstFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MinConstFlow Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("minConstFlow", "", "uint16")); + VerifyOrReturn(CheckConstraintType("minConstFlow", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("minConstFlow", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("minConstFlow", [value unsignedShortValue], 65535U)); } @@ -40706,16 +42787,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeMaxConstFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MaxConstFlow Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxConstFlow", "", "uint16")); + VerifyOrReturn(CheckConstraintType("maxConstFlow", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("maxConstFlow", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("maxConstFlow", [value unsignedShortValue], 65535U)); } @@ -40736,16 +42812,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeMinConstTempWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MinConstTemp Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("minConstTemp", "", "int16")); + VerifyOrReturn(CheckConstraintType("minConstTemp", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("minConstTemp", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("minConstTemp", [value shortValue], 32767)); } @@ -40766,16 +42837,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeMaxConstTempWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MaxConstTemp Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxConstTemp", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxConstTemp", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("maxConstTemp", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("maxConstTemp", [value shortValue], 32767)); } @@ -40796,14 +42862,9 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributePumpStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: PumpStatus Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("pumpStatus", "", "map16")); + VerifyOrReturn(CheckConstraintType("pumpStatus", "bitmap16", "bitmap16")); VerifyOrReturn(CheckConstraintMinValue("pumpStatus", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("pumpStatus", [value unsignedShortValue], 8U)); @@ -40825,7 +42886,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("effectiveOperationMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("effectiveOperationMode", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("effectiveOperationMode", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("effectiveOperationMode", [value unsignedCharValue], 3U)); @@ -40847,7 +42908,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("effectiveControlMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("effectiveControlMode", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("effectiveControlMode", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("effectiveControlMode", [value unsignedCharValue], 7U)); @@ -40871,7 +42932,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("capacity", "", "int16")); + VerifyOrReturn(CheckConstraintType("capacity", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("capacity", [value shortValue], -32768)); VerifyOrReturn(CheckConstraintMaxValue("capacity", [value shortValue], 32767)); } @@ -40892,16 +42953,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: Speed Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("speed", "", "uint16")); + VerifyOrReturn(CheckConstraintType("speed", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("speed", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("speed", [value unsignedShortValue], 65535U)); } @@ -40922,16 +42978,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeLifetimeRunningHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: LifetimeRunningHours Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("lifetimeRunningHours", "", "uint24")); + VerifyOrReturn(CheckConstraintType("lifetimeRunningHours", "int24u", "int24u")); VerifyOrReturn(CheckConstraintMinValue("lifetimeRunningHours", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("lifetimeRunningHours", [value unsignedIntValue], 16777215UL)); } @@ -40952,16 +43003,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributePowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: Power Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("power", "", "uint24")); + VerifyOrReturn(CheckConstraintType("power", "int24u", "int24u")); VerifyOrReturn(CheckConstraintMinValue("power", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("power", [value unsignedIntValue], 16777215UL)); } @@ -40982,16 +43028,11 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeLifetimeEnergyConsumedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: LifetimeEnergyConsumed Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("lifetimeEnergyConsumed", "", "uint32")); + VerifyOrReturn(CheckConstraintType("lifetimeEnergyConsumed", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("lifetimeEnergyConsumed", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("lifetimeEnergyConsumed", [value unsignedIntValue], 4294967295UL)); } @@ -41014,7 +43055,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("operationMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("operationMode", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("operationMode", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("operationMode", [value unsignedCharValue], 3U)); @@ -41034,14 +43075,9 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [cluster readAttributeControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read optional attribute: ControlMode Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("controlMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("controlMode", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("controlMode", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("controlMode", [value unsignedCharValue], 7U)); @@ -41095,52 +43131,69 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Write 1 to the OperationMode attribute to DUT: OperationMode\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH write 0 (Normal) to the OperationMode attribute to DUT\n"); if (ShouldSkip("PCC.S.A0020")) { NextTest(); return; } - err = TestWrite1ToTheOperationModeAttributeToDutOperationMode_1(); + err = TestThWrite0NormalToTheOperationModeAttributeToDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the attribute: EffectiveOperationMode\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the EffectiveOperationMode attribute\n"); if (ShouldSkip("PCC.S.A0011")) { NextTest(); return; } - err = TestReadsTheAttributeEffectiveOperationMode_2(); + err = TestThReadsFromTheDutTheEffectiveOperationModeAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Write 2 to the OperationMode attribute to DUT: OperationMode\n"); - if (ShouldSkip("PCC.S.A0020")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH write 1 (Minimum) to the OperationMode attribute to DUT\n"); + if (ShouldSkip("PCC.S.A0020 && PCC.M.ControlModeConstSpeed")) { NextTest(); return; } - err = TestWrite2ToTheOperationModeAttributeToDutOperationMode_3(); + err = TestThWrite1MinimumToTheOperationModeAttributeToDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the attribute: EffectiveOperationMode\n"); - if (ShouldSkip("PCC.S.A0011")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the EffectiveOperationMode attribute\n"); + if (ShouldSkip("PCC.S.A0011 && PCC.M.ControlModeConstSpeed")) { NextTest(); return; } - err = TestReadsTheAttributeEffectiveOperationMode_4(); + err = TestThReadsFromTheDutTheEffectiveOperationModeAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Write 3 to the OperationMode attribute to DUT: OperationMode\n"); - if (ShouldSkip("PCC.S.A0020")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : TH write 2 (Maximum) to the OperationMode attribute to DUT one at a time.\n"); + if (ShouldSkip("PCC.S.A0020 && PCC.M.ControlModeConstSpeed")) { NextTest(); return; } - err = TestWrite3ToTheOperationModeAttributeToDutOperationMode_5(); + err = TestThWrite2MaximumToTheOperationModeAttributeToDutOneAtATime_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the attribute: EffectiveOperationMode\n"); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads from the DUT the EffectiveOperationMode attribute\n"); + if (ShouldSkip("PCC.S.A0011 && PCC.M.ControlModeConstSpeed")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheEffectiveOperationModeAttribute_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH write 3 (Local) to the OperationMode attribute to DUT\n"); + if (ShouldSkip("PCC.S.A0020")) { + NextTest(); + return; + } + err = TestThWrite3LocalToTheOperationModeAttributeToDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads from the DUT the EffectiveOperationMode attribute\n"); if (ShouldSkip("PCC.S.A0011")) { NextTest(); return; } - err = TestReadsTheAttributeEffectiveOperationMode_6(); + err = TestThReadsFromTheDutTheEffectiveOperationModeAttribute_8(); break; } @@ -41174,6 +43227,12 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -41187,7 +43246,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -41201,7 +43260,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestWrite1ToTheOperationModeAttributeToDutOperationMode_1() + CHIP_ERROR TestThWrite0NormalToTheOperationModeAttributeToDut_1() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPumpConfigurationAndControl * cluster = @@ -41209,10 +43268,10 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id operationModeArgument; - operationModeArgument = [NSNumber numberWithUnsignedChar:1U]; + operationModeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOperationModeWithValue:operationModeArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write 1 to the OperationMode attribute to DUT: OperationMode Error: %@", err); + NSLog(@"TH write 0 (Normal) to the OperationMode attribute to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41222,7 +43281,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheAttributeEffectiveOperationMode_2() + CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPumpConfigurationAndControl * cluster = @@ -41230,13 +43289,13 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the attribute: EffectiveOperationMode Error: %@", err); + NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 1U)); + VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 0U)); } NextTest(); @@ -41245,7 +43304,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWrite2ToTheOperationModeAttributeToDutOperationMode_3() + CHIP_ERROR TestThWrite1MinimumToTheOperationModeAttributeToDut_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPumpConfigurationAndControl * cluster = @@ -41253,10 +43312,10 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id operationModeArgument; - operationModeArgument = [NSNumber numberWithUnsignedChar:2U]; + operationModeArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeOperationModeWithValue:operationModeArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write 2 to the OperationMode attribute to DUT: OperationMode Error: %@", err); + NSLog(@"TH write 1 (Minimum) to the OperationMode attribute to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41266,7 +43325,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheAttributeEffectiveOperationMode_4() + CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPumpConfigurationAndControl * cluster = @@ -41274,7 +43333,53 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the attribute: EffectiveOperationMode Error: %@", err); + NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWrite2MaximumToTheOperationModeAttributeToDutOneAtATime_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id operationModeArgument; + operationModeArgument = [NSNumber numberWithUnsignedChar:2U]; + [cluster + writeAttributeOperationModeWithValue:operationModeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog( + @"TH write 2 (Maximum) to the OperationMode attribute to DUT one at a time. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_6() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41289,7 +43394,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWrite3ToTheOperationModeAttributeToDutOperationMode_5() + CHIP_ERROR TestThWrite3LocalToTheOperationModeAttributeToDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPumpConfigurationAndControl * cluster = @@ -41300,7 +43405,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { operationModeArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeOperationModeWithValue:operationModeArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write 3 to the OperationMode attribute to DUT: OperationMode Error: %@", err); + NSLog(@"TH write 3 (Local) to the OperationMode attribute to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41310,7 +43415,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheAttributeEffectiveOperationMode_6() + CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPumpConfigurationAndControl * cluster = @@ -41318,7 +43423,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the attribute: EffectiveOperationMode Error: %@", err); + NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42514,7 +44619,7 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -42538,7 +44643,7 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -42557,7 +44662,7 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); @@ -42588,7 +44693,7 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -42612,7 +44717,7 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -42777,7 +44882,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "list")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -42801,7 +44906,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -42820,7 +44925,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); @@ -42853,7 +44958,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -42877,7 +44982,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -42954,6 +45059,10 @@ class Test_TC_RH_2_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Reads constraints of attribute: MaxMeasuredValue\n"); + if (ShouldSkip("RH.S.A0002")) { + NextTest(); + return; + } err = TestReadsConstraintsOfAttributeMaxMeasuredValue_3(); break; case 4: @@ -43031,7 +45140,7 @@ class Test_TC_RH_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("measuredValue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value unsignedShortValue], 10000U)); } @@ -43056,7 +45165,7 @@ class Test_TC_RH_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value unsignedShortValue], 9999U)); } @@ -43081,7 +45190,7 @@ class Test_TC_RH_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value unsignedShortValue], 1U)); VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value unsignedShortValue], 10000U)); } @@ -43104,7 +45213,7 @@ class Test_TC_RH_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); + VerifyOrReturn(CheckConstraintType("tolerance", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); @@ -43115,6 +45224,414 @@ class Test_TC_RH_2_1 : public TestCommandBridge { } }; +class Test_TC_SWTCH_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_SWTCH_1_1() + : TestCommandBridge("Test_TC_SWTCH_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_SWTCH_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SWTCH_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SWTCH_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: FeatureMap\n"); + err = TestReadTheGlobalAttributeFeatureMap_1(); + break; + case 2: + ChipLogProgress(chipTool, + " ***** Test Step 2 : Read the FeatureMap value and verify LS is set to 1; MS, MSR, MSL, MSM are all set to 0\n"); + if (ShouldSkip("SWTCH.S.F00")) { + NextTest(); + return; + } + err = TestReadTheFeatureMapValueAndVerifyLsIsSetTo1MsMsrMslMsmAreAllSetTo0_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Check values of flags in this FeatureMap\n"); + if (ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F01")) { + NextTest(); + return; + } + err = TestCheckValuesOfFlagsInThisFeatureMap_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Check values of flags in this FeatureMap\n"); + if (ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F02")) { + NextTest(); + return; + } + err = TestCheckValuesOfFlagsInThisFeatureMap_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Check values of flags in this FeatureMap\n"); + if (ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F03")) { + NextTest(); + return; + } + err = TestCheckValuesOfFlagsInThisFeatureMap_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Check values of flags in this FeatureMap\n"); + if (ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F04")) { + NextTest(); + return; + } + err = TestCheckValuesOfFlagsInThisFeatureMap_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("SWTCH.S.F04")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeAttributeList_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("!SWTCH.S.F04")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeAttributeList_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_11(); + break; + case 12: + ChipLogProgress(chipTool, + " ***** Test Step 12 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + "supported events.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_12(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 13; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + NSNumber * _Nonnull FeatureMapValue; + + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + FeatureMapValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheFeatureMapValueAndVerifyLsIsSetTo1MsMsrMslMsmAreAllSetTo0_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the FeatureMap value and verify LS is set to 1; MS, MSR, MSL, MSM are all set to 0 Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, FeatureMapValue)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCheckValuesOfFlagsInThisFeatureMap_3() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestCheckValuesOfFlagsInThisFeatureMap_4() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestCheckValuesOfFlagsInThisFeatureMap_5() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestCheckValuesOfFlagsInThisFeatureMap_6() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_7() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_8() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_9() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_10() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_11() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_12() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } +}; + class Test_TC_SWTCH_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -43239,7 +45756,7 @@ class Test_TC_SWTCH_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("number of positions", actualValue, 2U)); } - VerifyOrReturn(CheckConstraintType("numberOfPositions", "", "uint8")); + VerifyOrReturn(CheckConstraintType("numberOfPositions", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("numberOfPositions", [value unsignedCharValue], 2U)); NextTest(); @@ -43264,7 +45781,7 @@ class Test_TC_SWTCH_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("current position", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("currentPosition", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentPosition", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentPosition", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentPosition", [value unsignedCharValue], 255U)); @@ -43290,7 +45807,7 @@ class Test_TC_SWTCH_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("multi press max", actualValue, 2U)); } - VerifyOrReturn(CheckConstraintType("multiPressMax", "", "uint8")); + VerifyOrReturn(CheckConstraintType("multiPressMax", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("multiPressMax", [value unsignedCharValue], 2U)); VerifyOrReturn(CheckConstraintMaxValue("multiPressMax", [value unsignedCharValue], 255U)); @@ -43353,19 +45870,15 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("TMP.S.A0003")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); - if (ShouldSkip(" !TMP.S.A0003 ")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(Tolerance) in AttributeList\n"); + if (ShouldSkip("TMP.S.A0003")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_4(); + err = TestReadTheOptionalAttributeToleranceInAttributeList_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Read AcceptedCommandList attribute from the DUT\n"); @@ -43464,7 +45977,7 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "unit16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -43488,7 +46001,7 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -43507,11 +46020,10 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); @@ -43524,7 +46036,7 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() + CHIP_ERROR TestReadTheOptionalAttributeToleranceInAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterTemperatureMeasurement * cluster = @@ -43532,19 +46044,12 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); NextTest(); }]; @@ -43564,7 +46069,12 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -43588,7 +46098,7 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -43648,7 +46158,7 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: MeasuredValue\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the mandatory attribute: MeasuredValue\n"); if (ShouldSkip("TMP.S.A0000")) { NextTest(); return; @@ -43656,7 +46166,7 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { err = TestReadTheMandatoryAttributeMeasuredValue_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : read the mandatory attribute: MinMeasuredValue\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: MinMeasuredValue\n"); if (ShouldSkip("TMP.S.A0001")) { NextTest(); return; @@ -43664,7 +46174,7 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { err = TestReadTheMandatoryAttributeMinMeasuredValue_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : read the mandatory attribute: MaxMeasuredValue\n"); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the mandatory attribute: MaxMeasuredValue\n"); if (ShouldSkip("TMP.S.A0002")) { NextTest(); return; @@ -43672,7 +46182,7 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { err = TestReadTheMandatoryAttributeMaxMeasuredValue_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : read the optional attribute: Tolerance\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute: Tolerance\n"); if (ShouldSkip("TMP.S.A0003")) { NextTest(); return; @@ -43740,13 +46250,13 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: MeasuredValue Error: %@", err); + NSLog(@"Read the mandatory attribute: MeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("measuredValue", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value shortValue], -27315)); VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value shortValue], 32767)); } @@ -43765,13 +46275,13 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: MinMeasuredValue Error: %@", err); + NSLog(@"Read the mandatory attribute: MinMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value shortValue], -27315)); VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value shortValue], 32767)); } @@ -43790,13 +46300,13 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: MaxMeasuredValue Error: %@", err); + NSLog(@"Read the mandatory attribute: MaxMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value shortValue], -27314)); VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value shortValue], 32767)); } @@ -43815,11 +46325,11 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the optional attribute: Tolerance Error: %@", err); + NSLog(@"Read the optional attribute: Tolerance Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); + VerifyOrReturn(CheckConstraintType("tolerance", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); @@ -44096,7 +46606,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -44116,7 +46626,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 1UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 63UL)); @@ -44139,7 +46649,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 27UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 28UL)); @@ -44168,7 +46678,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); NextTest(); @@ -44190,7 +46700,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); NextTest(); @@ -44212,7 +46722,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); NextTest(); @@ -44234,7 +46744,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); NextTest(); @@ -44256,7 +46766,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); NextTest(); @@ -44278,7 +46788,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 25UL)); @@ -44302,7 +46812,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 32UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 33UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 34UL)); @@ -44326,7 +46836,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 52UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 53UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 54UL)); @@ -44350,7 +46860,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 55UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 56UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 57UL)); @@ -44374,7 +46884,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); @@ -44399,7 +46909,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); NextTest(); @@ -44421,7 +46931,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -45054,7 +47564,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("localTemperature", "", "int16")); + VerifyOrReturn(CheckConstraintType("localTemperature", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("localTemperature", [value shortValue], -27315)); VerifyOrReturn(CheckConstraintMaxValue("localTemperature", [value shortValue], 32767)); } @@ -45080,7 +47590,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("outdoorTemperature", "", "int16")); + VerifyOrReturn(CheckConstraintType("outdoorTemperature", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("outdoorTemperature", [value shortValue], -27315)); VerifyOrReturn(CheckConstraintMaxValue("outdoorTemperature", [value shortValue], 32767)); } @@ -45104,7 +47614,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("occupancy", "", "int16")); + VerifyOrReturn(CheckConstraintType("occupancy", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("occupancy", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("occupancy", [value unsignedCharValue], 1U)); @@ -45127,7 +47637,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("absMinHeatSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintType("absMinHeatSetpointLimit", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("absMinHeatSetpointLimit", [value shortValue], -27315)); VerifyOrReturn(CheckConstraintMaxValue("absMinHeatSetpointLimit", [value shortValue], 32767)); @@ -45150,7 +47660,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("absMaxHeatSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintType("absMaxHeatSetpointLimit", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("absMaxHeatSetpointLimit", [value shortValue], -27315)); VerifyOrReturn(CheckConstraintMaxValue("absMaxHeatSetpointLimit", [value shortValue], 32767)); @@ -45173,7 +47683,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("absMinCoolSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintType("absMinCoolSetpointLimit", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("absMinCoolSetpointLimit", [value shortValue], -27315)); VerifyOrReturn(CheckConstraintMaxValue("absMinCoolSetpointLimit", [value shortValue], 32767)); @@ -45196,7 +47706,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("absMaxCoolSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintType("absMaxCoolSetpointLimit", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("absMaxCoolSetpointLimit", [value shortValue], -27315)); VerifyOrReturn(CheckConstraintMaxValue("absMaxCoolSetpointLimit", [value shortValue], 32767)); @@ -45219,7 +47729,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("PICoolingDemand", "", "uint8")); + VerifyOrReturn(CheckConstraintType("PICoolingDemand", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("PICoolingDemand", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("PICoolingDemand", [value unsignedCharValue], 100U)); @@ -45242,7 +47752,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("PIHeatingDemand", "", "uint8")); + VerifyOrReturn(CheckConstraintType("PIHeatingDemand", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("PIHeatingDemand", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("PIHeatingDemand", [value unsignedCharValue], 100U)); @@ -45266,7 +47776,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("HVACSystemTypeConfiguration", "", "map8")); + VerifyOrReturn(CheckConstraintType("HVACSystemTypeConfiguration", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("HVACSystemTypeConfiguration", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("HVACSystemTypeConfiguration", [value unsignedCharValue], 63U)); @@ -45290,7 +47800,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("localTemperatureCalibration", "", "int8")); + VerifyOrReturn(CheckConstraintType("localTemperatureCalibration", "int8s", "int8s")); VerifyOrReturn(CheckConstraintMinValue("localTemperatureCalibration", [value charValue], 25)); VerifyOrReturn(CheckConstraintMaxValue("localTemperatureCalibration", [value charValue], -25)); @@ -45313,7 +47823,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("occupiedCoolingSetpoint", "", "int16")); + VerifyOrReturn(CheckConstraintType("occupiedCoolingSetpoint", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("occupiedCoolingSetpoint", [value shortValue], 1600)); VerifyOrReturn(CheckConstraintMaxValue("occupiedCoolingSetpoint", [value shortValue], 3200)); @@ -45336,7 +47846,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("occupiedHeatingSetpoint", "", "int16")); + VerifyOrReturn(CheckConstraintType("occupiedHeatingSetpoint", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("occupiedHeatingSetpoint", [value shortValue], 700)); VerifyOrReturn(CheckConstraintMaxValue("occupiedHeatingSetpoint", [value shortValue], 3000)); @@ -45360,7 +47870,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("unoccupiedCoolingSetpoint", "", "int16")); + VerifyOrReturn(CheckConstraintType("unoccupiedCoolingSetpoint", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("unoccupiedCoolingSetpoint", [value shortValue], 1600)); VerifyOrReturn(CheckConstraintMaxValue("unoccupiedCoolingSetpoint", [value shortValue], 3200)); @@ -45384,7 +47894,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("unoccupiedHeatingSetpoint", "", "int16")); + VerifyOrReturn(CheckConstraintType("unoccupiedHeatingSetpoint", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("unoccupiedHeatingSetpoint", [value shortValue], 700)); VerifyOrReturn(CheckConstraintMaxValue("unoccupiedHeatingSetpoint", [value shortValue], 3000)); @@ -45407,7 +47917,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minHeatSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintType("minHeatSetpointLimit", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("minHeatSetpointLimit", [value shortValue], 700)); VerifyOrReturn(CheckConstraintMaxValue("minHeatSetpointLimit", [value shortValue], 3000)); @@ -45430,7 +47940,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxHeatSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxHeatSetpointLimit", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("maxHeatSetpointLimit", [value shortValue], -27315)); VerifyOrReturn(CheckConstraintMaxValue("maxHeatSetpointLimit", [value shortValue], 32767)); @@ -45453,7 +47963,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minCoolSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintType("minCoolSetpointLimit", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("minCoolSetpointLimit", [value shortValue], -27315)); VerifyOrReturn(CheckConstraintMaxValue("minCoolSetpointLimit", [value shortValue], 32767)); @@ -45476,7 +47986,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxCoolSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxCoolSetpointLimit", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("maxCoolSetpointLimit", [value shortValue], -27315)); VerifyOrReturn(CheckConstraintMaxValue("maxCoolSetpointLimit", [value shortValue], 32767)); @@ -45499,7 +48009,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minSetpointDeadBand", "", "int8")); + VerifyOrReturn(CheckConstraintType("minSetpointDeadBand", "int8s", "int8s")); VerifyOrReturn(CheckConstraintMinValue("minSetpointDeadBand", [value charValue], 0)); VerifyOrReturn(CheckConstraintMaxValue("minSetpointDeadBand", [value charValue], 25)); @@ -45522,7 +48032,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("remoteSensing", "", "map8")); + VerifyOrReturn(CheckConstraintType("remoteSensing", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("remoteSensing", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("remoteSensing", [value unsignedCharValue], 7U)); @@ -45546,7 +48056,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("controlSequenceOfOperation", "", "enum8")); + VerifyOrReturn(CheckConstraintType("controlSequenceOfOperation", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("controlSequenceOfOperation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("controlSequenceOfOperation", [value unsignedCharValue], 5U)); @@ -45569,7 +48079,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("systemMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("systemMode", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("systemMode", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("systemMode", [value unsignedCharValue], 9U)); @@ -45592,7 +48102,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("thermostatRunningMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("thermostatRunningMode", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("thermostatRunningMode", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("thermostatRunningMode", [value unsignedCharValue], 9U)); @@ -45615,7 +48125,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("startOfWeek", "", "enum8")); + VerifyOrReturn(CheckConstraintType("startOfWeek", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("startOfWeek", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("startOfWeek", [value unsignedCharValue], 6U)); @@ -45639,7 +48149,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("numberOfWeeklyTransitions", "", "uint8")); + VerifyOrReturn(CheckConstraintType("numberOfWeeklyTransitions", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("numberOfWeeklyTransitions", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("numberOfWeeklyTransitions", [value unsignedCharValue], 255U)); @@ -45662,7 +48172,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("numberOfDailyTransitions", "", "uint8")); + VerifyOrReturn(CheckConstraintType("numberOfDailyTransitions", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("numberOfDailyTransitions", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("numberOfDailyTransitions", [value unsignedCharValue], 255U)); @@ -45685,7 +48195,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("temperatureSetpointHold", "", "enum8")); + VerifyOrReturn(CheckConstraintType("temperatureSetpointHold", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("temperatureSetpointHold", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("temperatureSetpointHold", [value unsignedCharValue], 1U)); @@ -45711,7 +48221,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("temperatureSetpointHoldDuration", "", "uint16")); + VerifyOrReturn(CheckConstraintType("temperatureSetpointHoldDuration", "int16u", "int16u")); VerifyOrReturn( CheckConstraintMinValue("temperatureSetpointHoldDuration", [value unsignedShortValue], 0U)); VerifyOrReturn( @@ -45738,7 +48248,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("thermostatProgrammingOperationMode", "", "map8")); + VerifyOrReturn(CheckConstraintType("thermostatProgrammingOperationMode", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("thermostatProgrammingOperationMode", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("thermostatProgrammingOperationMode", [value unsignedCharValue], 7U)); @@ -45761,7 +48271,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("thermostatRunningState", "", "map16")); + VerifyOrReturn(CheckConstraintType("thermostatRunningState", "bitmap16", "bitmap16")); VerifyOrReturn(CheckConstraintMinValue("thermostatRunningState", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("thermostatRunningState", [value unsignedShortValue], 127U)); @@ -45784,7 +48294,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("setpointChangeSource", "", "enum8")); + VerifyOrReturn(CheckConstraintType("setpointChangeSource", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("setpointChangeSource", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("setpointChangeSource", [value unsignedCharValue], 2U)); @@ -45809,7 +48319,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("setpointChangeAmount", "", "int16")); + VerifyOrReturn(CheckConstraintType("setpointChangeAmount", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("setpointChangeAmount", [value shortValue], -27315)); VerifyOrReturn(CheckConstraintMaxValue("setpointChangeAmount", [value shortValue], 32767)); } @@ -45834,7 +48344,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("setpointChangeSourceTimestamp", "", "utc")); + VerifyOrReturn(CheckConstraintType("setpointChangeSourceTimestamp", "utc", "utc")); NextTest(); }]; @@ -45856,7 +48366,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("occupiedSetback", "", "uint8")); + VerifyOrReturn(CheckConstraintType("occupiedSetback", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("occupiedSetback", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("occupiedSetback", [value unsignedCharValue], 255U)); } @@ -45882,7 +48392,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("occupiedSetbackMin", "", "uint8")); + VerifyOrReturn(CheckConstraintType("occupiedSetbackMin", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("occupiedSetbackMin", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("occupiedSetbackMin", [value unsignedCharValue], 255U)); } @@ -45908,7 +48418,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("occupiedSetbackMax", "", "uint8")); + VerifyOrReturn(CheckConstraintType("occupiedSetbackMax", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("occupiedSetbackMax", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("occupiedSetbackMax", [value unsignedCharValue], 255U)); } @@ -45934,7 +48444,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("unoccupiedSetback", "", "uint8")); + VerifyOrReturn(CheckConstraintType("unoccupiedSetback", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("unoccupiedSetback", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("unoccupiedSetback", [value unsignedCharValue], 255U)); } @@ -45960,7 +48470,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("unoccupiedSetbackMin", "", "uint8")); + VerifyOrReturn(CheckConstraintType("unoccupiedSetbackMin", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("unoccupiedSetbackMin", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("unoccupiedSetbackMin", [value unsignedCharValue], 255U)); } @@ -45986,7 +48496,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("unoccupiedSetbackMax", "", "uint8")); + VerifyOrReturn(CheckConstraintType("unoccupiedSetbackMax", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("unoccupiedSetbackMax", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("unoccupiedSetbackMax", [value unsignedCharValue], 255U)); } @@ -46010,7 +48520,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("emergencyHeatDelta", "", "uint8")); + VerifyOrReturn(CheckConstraintType("emergencyHeatDelta", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("emergencyHeatDelta", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("emergencyHeatDelta", [value unsignedCharValue], 255U)); @@ -46033,7 +48543,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("ACType", "", "enum8")); + VerifyOrReturn(CheckConstraintType("ACType", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("ACType", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("ACType", [value unsignedCharValue], 4U)); @@ -46056,7 +48566,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("ACCapacity", "", "uint16")); + VerifyOrReturn(CheckConstraintType("ACCapacity", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("ACCapacity", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("ACCapacity", [value unsignedShortValue], 65535U)); @@ -46079,7 +48589,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("ACRefrigerantType", "", "enum8")); + VerifyOrReturn(CheckConstraintType("ACRefrigerantType", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("ACRefrigerantType", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("ACRefrigerantType", [value unsignedCharValue], 3U)); @@ -46102,7 +48612,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("ACCompressorType", "", "enum8")); + VerifyOrReturn(CheckConstraintType("ACCompressorType", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("ACCompressorType", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("ACCompressorType", [value unsignedCharValue], 3U)); @@ -46125,7 +48635,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("ACErrorCode", "", "map32")); + VerifyOrReturn(CheckConstraintType("ACErrorCode", "bitmap32", "bitmap32")); NextTest(); }]; @@ -46145,7 +48655,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("ACLouverPosition", "", "enum8")); + VerifyOrReturn(CheckConstraintType("ACLouverPosition", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("ACLouverPosition", [value unsignedCharValue], 1U)); VerifyOrReturn(CheckConstraintMaxValue("ACLouverPosition", [value unsignedCharValue], 5U)); @@ -46170,7 +48680,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("ACCoilTemperature", "", "int16")); + VerifyOrReturn(CheckConstraintType("ACCoilTemperature", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("ACCoilTemperature", [value shortValue], -27315)); VerifyOrReturn(CheckConstraintMaxValue("ACCoilTemperature", [value shortValue], 32767)); } @@ -46199,7 +48709,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ACCapacityformat", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("ACCapacityformat", "", "enum8")); + VerifyOrReturn(CheckConstraintType("ACCapacityformat", "enum8", "enum8")); NextTest(); }]; @@ -47503,7 +50013,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("occupiedCoolingSetpoint", "", "int16")); + VerifyOrReturn(CheckConstraintType("occupiedCoolingSetpoint", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("occupiedCoolingSetpoint", [value shortValue], 1600)); VerifyOrReturn(CheckConstraintMaxValue("occupiedCoolingSetpoint", [value shortValue], 3200)); @@ -47707,7 +50217,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("occupiedHeatingSetpoint", "", "int16")); + VerifyOrReturn(CheckConstraintType("occupiedHeatingSetpoint", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("occupiedHeatingSetpoint", [value shortValue], 700)); VerifyOrReturn(CheckConstraintMaxValue("occupiedHeatingSetpoint", [value shortValue], 3000)); @@ -47942,7 +50452,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("UnoccupiedCoolingSetpoint", actualValue, 2600)); } - VerifyOrReturn(CheckConstraintType("unoccupiedCoolingSetpoint", "", "int16")); + VerifyOrReturn(CheckConstraintType("unoccupiedCoolingSetpoint", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("unoccupiedCoolingSetpoint", [value shortValue], 1600)); VerifyOrReturn(CheckConstraintMaxValue("unoccupiedCoolingSetpoint", [value shortValue], 3200)); @@ -48126,7 +50636,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("UnoccupiedHeatingSetpoint", actualValue, 2000)); } - VerifyOrReturn(CheckConstraintType("unoccupiedHeatingSetpoint", "", "int16")); + VerifyOrReturn(CheckConstraintType("unoccupiedHeatingSetpoint", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("unoccupiedHeatingSetpoint", [value shortValue], 700)); VerifyOrReturn(CheckConstraintMaxValue("unoccupiedHeatingSetpoint", [value shortValue], 3000)); @@ -48308,7 +50818,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("MinHeatSetpointLimit", actualValue, 700)); } - VerifyOrReturn(CheckConstraintType("minHeatSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintType("minHeatSetpointLimit", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("minHeatSetpointLimit", [value shortValue], 700)); VerifyOrReturn(CheckConstraintMaxValue("minHeatSetpointLimit", [value shortValue], 3000)); @@ -48518,7 +51028,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("MaxHeatSetpointLimit", actualValue, 3000)); } - VerifyOrReturn(CheckConstraintType("maxHeatSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxHeatSetpointLimit", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("maxHeatSetpointLimit", [value shortValue], 700)); VerifyOrReturn(CheckConstraintMaxValue("maxHeatSetpointLimit", [value shortValue], 3000)); @@ -48753,7 +51263,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("MinCoolSetpointLimit", actualValue, 1600)); } - VerifyOrReturn(CheckConstraintType("minCoolSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintType("minCoolSetpointLimit", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("minCoolSetpointLimit", [value shortValue], 1600)); VerifyOrReturn(CheckConstraintMaxValue("minCoolSetpointLimit", [value shortValue], 3200)); @@ -48959,7 +51469,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("MaxCoolSetpointLimit", actualValue, 3200)); } - VerifyOrReturn(CheckConstraintType("maxCoolSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintType("maxCoolSetpointLimit", "int16s", "int16s")); VerifyOrReturn(CheckConstraintMinValue("maxCoolSetpointLimit", [value shortValue], 1600)); VerifyOrReturn(CheckConstraintMaxValue("maxCoolSetpointLimit", [value shortValue], 3200)); @@ -49251,7 +51761,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("MinSetpointDeadBand", actualValue, 25)); } - VerifyOrReturn(CheckConstraintType("minSetpointDeadBand", "", "temp-s8")); + VerifyOrReturn(CheckConstraintType("minSetpointDeadBand", "int8s", "int8s")); VerifyOrReturn(CheckConstraintMinValue("minSetpointDeadBand", [value charValue], 0)); VerifyOrReturn(CheckConstraintMaxValue("minSetpointDeadBand", [value charValue], 25)); @@ -49424,7 +51934,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("ControlSequenceOfOperation", actualValue, 4U)); } - VerifyOrReturn(CheckConstraintType("controlSequenceOfOperation", "", "enum8")); + VerifyOrReturn(CheckConstraintType("controlSequenceOfOperation", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("controlSequenceOfOperation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("controlSequenceOfOperation", [value unsignedCharValue], 5U)); @@ -50162,7 +52672,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 2U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -50186,7 +52696,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -50205,7 +52715,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); @@ -50238,7 +52748,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -50262,7 +52772,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -50407,7 +52917,7 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("temperatureDisplayMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("temperatureDisplayMode", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("temperatureDisplayMode", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("temperatureDisplayMode", [value unsignedCharValue], 1U)); @@ -50429,7 +52939,7 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("keypadLockout", "", "enum8")); + VerifyOrReturn(CheckConstraintType("keypadLockout", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("keypadLockout", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("keypadLockout", [value unsignedCharValue], 5U)); @@ -50452,7 +52962,7 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("scheduleProgrammingVisibility", "", "enum8")); + VerifyOrReturn(CheckConstraintType("scheduleProgrammingVisibility", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("scheduleProgrammingVisibility", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("scheduleProgrammingVisibility", [value unsignedCharValue], 1U)); @@ -50515,7 +53025,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Verify device temperature displayed in °C\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0000")) { NextTest(); return; } @@ -50539,7 +53049,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Verify device temperature displayed in °F\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0000")) { NextTest(); return; } @@ -50580,7 +53090,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Verify all device functionality available to the user\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { NextTest(); return; } @@ -50604,7 +53114,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : Verify device operates at Level 1 reduced functionality\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { NextTest(); return; } @@ -50628,7 +53138,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { break; case 16: ChipLogProgress(chipTool, " ***** Test Step 16 : Verify device operates at Level 2 reduced functionality\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { NextTest(); return; } @@ -50652,7 +53162,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { break; case 19: ChipLogProgress(chipTool, " ***** Test Step 19 : Verify device operates at Level 3 reduced functionality\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { NextTest(); return; } @@ -50676,7 +53186,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { break; case 22: ChipLogProgress(chipTool, " ***** Test Step 22 : Verify device operates at Level 4 reduced functionality\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { NextTest(); return; } @@ -50700,7 +53210,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { break; case 25: ChipLogProgress(chipTool, " ***** Test Step 25 : Verify device operates at least functionality level\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001")) { NextTest(); return; } @@ -50733,7 +53243,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { case 29: ChipLogProgress( chipTool, " ***** Test Step 29 : Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT\n"); - if (ShouldSkip("TSUIC.S.A0001")) { + if (ShouldSkip("TSUIC.S.A0002")) { NextTest(); return; } @@ -50742,7 +53252,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { case 30: ChipLogProgress( chipTool, " ***** Test Step 30 : Verify local schedule programming functionality is enabled at the thermostat\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0002")) { NextTest(); return; } @@ -50768,7 +53278,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { case 33: ChipLogProgress( chipTool, " ***** Test Step 33 : Verify local schedule programming functionality is disabled at the thermostat\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0002")) { NextTest(); return; } @@ -51778,7 +54288,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; @@ -51801,7 +54311,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -51819,7 +54329,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); @@ -51849,7 +54359,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -51872,7 +54382,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -52059,7 +54569,7 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[3]).value, @"bedroom")); } - VerifyOrReturn(CheckConstraintType("labelList", "", "list")); + VerifyOrReturn(CheckConstraintType("labelList", "list", "list")); VerifyOrReturn(CheckConstraintMinLength("labelList", value, 4)); NextTest(); }]; @@ -52119,12 +54629,12 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { err = TestThWritesLabelListAttributeOfTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads LabelList attribute of the DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH writes LabelList attribute of the DUT\n"); if (ShouldSkip("ULABEL.S.A0000")) { NextTest(); return; } - err = TestThReadsLabelListAttributeOfTheDut_2(); + err = TestThWritesLabelListAttributeOfTheDut_2(); break; } @@ -52203,7 +54713,7 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsLabelListAttributeOfTheDut_2() + CHIP_ERROR TestThWritesLabelListAttributeOfTheDut_2() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -52220,7 +54730,7 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { } [cluster writeAttributeLabelListWithValue:labelListArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH reads LabelList attribute of the DUT Error: %@", err); + NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code @@ -52429,6 +54939,10 @@ class Test_TC_ULABEL_2_4 : public TestCommandBridge { id labelListArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).label = @""; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).value = @""; + labelListArgument = temp_0; } [cluster writeAttributeLabelListWithValue:labelListArgument @@ -52456,7 +54970,9 @@ class Test_TC_ULABEL_2_4 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("label list", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("label list", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).label, @"")); + VerifyOrReturn(CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).value, @"")); } NextTest(); @@ -52509,12 +55025,12 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads NetworkInterface structure attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads BSSID attribute from DUT\n"); if (ShouldSkip("DGWIFI.S.A0000")) { NextTest(); return; } - err = TestReadsNetworkInterfaceStructureAttributeFromDut_1(); + err = TestThReadsBssidAttributeFromDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads SecurityType attribute constraints\n"); @@ -52692,20 +55208,23 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadsNetworkInterfaceStructureAttributeFromDut_1() + CHIP_ERROR TestThReadsBssidAttributeFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNetworkInterfacesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads NetworkInterface structure attribute from DUT Error: %@", err); + [cluster readAttributeBssidWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads BSSID attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("networkInterfaces", "", "list")); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("bssid", "octet_string", "octet_string")); + } + NextTest(); }]; @@ -52726,7 +55245,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("securityType", "", "enum")); + VerifyOrReturn(CheckConstraintType("securityType", "enum8", "enum8")); } NextTest(); @@ -52749,7 +55268,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("wiFiVersion", "", "enum")); + VerifyOrReturn(CheckConstraintType("wiFiVersion", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("wiFiVersion", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("wiFiVersion", [value unsignedCharValue], 5U)); } @@ -52774,7 +55293,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("channelNumber", "", "uint16")); + VerifyOrReturn(CheckConstraintType("channelNumber", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("channelNumber", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("channelNumber", [value unsignedShortValue], 65535U)); } @@ -52799,7 +55318,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("rssi", "", "int8")); + VerifyOrReturn(CheckConstraintType("rssi", "int8s", "int8s")); VerifyOrReturn(CheckConstraintMinValue("rssi", [value charValue], -120)); VerifyOrReturn(CheckConstraintMaxValue("rssi", [value charValue], 0)); } @@ -52822,7 +55341,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("beaconLostCount", "", "uint32")); + VerifyOrReturn(CheckConstraintType("beaconLostCount", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("beaconLostCount", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("beaconLostCount", [value unsignedIntValue], 4294967295UL)); @@ -52844,7 +55363,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("beaconRxCount", "", "uint32")); + VerifyOrReturn(CheckConstraintType("beaconRxCount", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("beaconRxCount", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("beaconRxCount", [value unsignedIntValue], 4294967295UL)); @@ -52866,7 +55385,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("packetMulticastRxCount", "", "uint32")); + VerifyOrReturn(CheckConstraintType("packetMulticastRxCount", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("packetMulticastRxCount", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("packetMulticastRxCount", [value unsignedIntValue], 4294967295UL)); @@ -52888,7 +55407,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("packetMulticastTxCount", "", "uint32")); + VerifyOrReturn(CheckConstraintType("packetMulticastTxCount", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("packetMulticastTxCount", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("packetMulticastTxCount", [value unsignedIntValue], 4294967295UL)); @@ -52910,7 +55429,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("packetUnicastRxCount", "", "uint32")); + VerifyOrReturn(CheckConstraintType("packetUnicastRxCount", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("packetUnicastRxCount", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("packetUnicastRxCount", [value unsignedIntValue], 4294967295UL)); @@ -52932,7 +55451,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("packetUnicastTxCount", "", "uint32")); + VerifyOrReturn(CheckConstraintType("packetUnicastTxCount", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("packetUnicastTxCount", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("packetUnicastTxCount", [value unsignedIntValue], 4294967295UL)); @@ -52954,7 +55473,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentMaxRate", "", "uint64")); + VerifyOrReturn(CheckConstraintType("currentMaxRate", "int64u", "int64u")); NextTest(); }]; @@ -52973,7 +55492,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("overrunCount", "", "uint64")); + VerifyOrReturn(CheckConstraintType("overrunCount", "int64u", "int64u")); NextTest(); }]; @@ -53171,7 +55690,7 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("beaconLostCount", "", "uint32")); + VerifyOrReturn(CheckConstraintType("beaconLostCount", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("beaconLostCount", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("beaconLostCount", [value unsignedIntValue], 4294967295UL)); @@ -53193,7 +55712,7 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("beaconRxCount", "", "uint32")); + VerifyOrReturn(CheckConstraintType("beaconRxCount", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("beaconRxCount", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("beaconRxCount", [value unsignedIntValue], 4294967295UL)); @@ -53215,7 +55734,7 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("packetMulticastRxCount", "", "uint32")); + VerifyOrReturn(CheckConstraintType("packetMulticastRxCount", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("packetMulticastRxCount", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("packetMulticastRxCount", [value unsignedIntValue], 4294967295UL)); @@ -53237,7 +55756,7 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("packetMulticastTxCount", "", "uint32")); + VerifyOrReturn(CheckConstraintType("packetMulticastTxCount", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("packetMulticastTxCount", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("packetMulticastTxCount", [value unsignedIntValue], 4294967295UL)); @@ -53259,7 +55778,7 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("packetUnicastRxCount", "", "uint32")); + VerifyOrReturn(CheckConstraintType("packetUnicastRxCount", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("packetUnicastRxCount", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("packetUnicastRxCount", [value unsignedIntValue], 4294967295UL)); @@ -53281,7 +55800,7 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("packetUnicastTxCount", "", "uint32")); + VerifyOrReturn(CheckConstraintType("packetUnicastTxCount", "int32u", "int32u")); VerifyOrReturn(CheckConstraintMinValue("packetUnicastTxCount", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("packetUnicastTxCount", [value unsignedIntValue], 4294967295UL)); @@ -53470,7 +55989,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("clusterRevision", [value unsignedShortValue], 5U)); VerifyOrReturn(CheckConstraintMaxValue("clusterRevision", [value unsignedShortValue], 200U)); @@ -53493,7 +56012,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "", "uint32")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 32768UL)); @@ -53516,7 +56035,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); @@ -53547,7 +56066,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 26UL)); NextTest(); @@ -53569,7 +56088,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); @@ -53598,7 +56117,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -53974,7 +56493,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("type", "", "enum8")); + VerifyOrReturn(CheckConstraintType("type", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("type", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("type", [value unsignedCharValue], 9U)); @@ -53997,7 +56516,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("configStatus", "", "map8")); + VerifyOrReturn(CheckConstraintType("configStatus", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 63U)); @@ -54020,7 +56539,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("operationalStatus", "", "map8")); + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("operationalStatus", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("operationalStatus", [value unsignedCharValue], 63U)); @@ -54043,7 +56562,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("endProductType", "", "enum8")); + VerifyOrReturn(CheckConstraintType("endProductType", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("endProductType", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("endProductType", [value unsignedCharValue], 23U)); @@ -54066,7 +56585,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("mode", "", "map8")); + VerifyOrReturn(CheckConstraintType("mode", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("mode", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("mode", [value unsignedCharValue], 15U)); @@ -54114,7 +56633,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "targetPositionLiftPercent100ths", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -54143,7 +56662,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "targetPositionTiltPercent100ths", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -54172,7 +56691,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -54201,7 +56720,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "", "Percent100ths")); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -54227,7 +56746,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("installedOpenLimitLift", "", "uint16")); + VerifyOrReturn(CheckConstraintType("installedOpenLimitLift", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitLift", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitLift", [value unsignedShortValue], 65535U)); @@ -54250,7 +56769,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("installedClosedLimitLift", "", "uint16")); + VerifyOrReturn(CheckConstraintType("installedClosedLimitLift", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitLift", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitLift", [value unsignedShortValue], 65535U)); @@ -54273,7 +56792,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("installedOpenLimitTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintType("installedOpenLimitTilt", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitTilt", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitTilt", [value unsignedShortValue], 65535U)); @@ -54296,7 +56815,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("installedClosedLimitTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintType("installedClosedLimitTilt", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitTilt", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitTilt", [value unsignedShortValue], 65535U)); @@ -54319,7 +56838,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("safetyStatus", "", "map16")); + VerifyOrReturn(CheckConstraintType("safetyStatus", "bitmap16", "bitmap16")); VerifyOrReturn(CheckConstraintMinValue("safetyStatus", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("safetyStatus", [value unsignedShortValue], 2047U)); @@ -54342,7 +56861,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("physicalClosedLimitLift", "", "uint16")); + VerifyOrReturn(CheckConstraintType("physicalClosedLimitLift", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("physicalClosedLimitLift", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("physicalClosedLimitLift", [value unsignedShortValue], 65535U)); @@ -54365,7 +56884,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("physicalClosedLimitTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintType("physicalClosedLimitTilt", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("physicalClosedLimitTilt", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("physicalClosedLimitTilt", [value unsignedShortValue], 65535U)); @@ -54390,7 +56909,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLift", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentPositionLift", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentPositionLift", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentPositionLift", [value unsignedShortValue], 65535U)); } @@ -54416,7 +56935,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentPositionTilt", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("currentPositionTilt", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentPositionTilt", [value unsignedShortValue], 65535U)); } @@ -54440,7 +56959,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("numberOfActuationsLift", "", "uint16")); + VerifyOrReturn(CheckConstraintType("numberOfActuationsLift", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("numberOfActuationsLift", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("numberOfActuationsLift", [value unsignedShortValue], 65535U)); @@ -54463,7 +56982,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("numberOfActuationsTilt", "", "uint16")); + VerifyOrReturn(CheckConstraintType("numberOfActuationsTilt", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("numberOfActuationsTilt", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("numberOfActuationsTilt", [value unsignedShortValue], 65535U)); @@ -54489,7 +57008,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "Percent")); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); VerifyOrReturn( CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); VerifyOrReturn( @@ -54518,7 +57037,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "Percent")); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); VerifyOrReturn( CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); VerifyOrReturn( @@ -55493,7 +58012,7 @@ class Test_TC_WNCV_2_5 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("endProductType", "", "enum8")); + VerifyOrReturn(CheckConstraintType("endProductType", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("endProductType", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("endProductType", [value unsignedCharValue], 23U)); @@ -55888,7 +58407,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "currentPositionLiftPercent100ths", [value unsignedShortValue], 1U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -55917,7 +58436,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); VerifyOrReturn( CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 1U)); VerifyOrReturn( @@ -55946,7 +58465,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "currentPositionTiltPercent100ths", [value unsignedShortValue], 1U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -55975,7 +58494,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); VerifyOrReturn( CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 1U)); VerifyOrReturn( @@ -56003,7 +58522,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("operationalStatus", "", "map8")); + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); testSendClusterTest_TC_WNCV_3_1_7_WaitForReport_Fulfilled = true; }; @@ -56142,7 +58661,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("operationalStatus", "", "map8")); + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("operationalStatus", [value unsignedCharValue], 5U)); VerifyOrReturn(CheckConstraintMaxValue("operationalStatus", [value unsignedCharValue], 21U)); @@ -56175,7 +58694,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -56204,7 +58723,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); VerifyOrReturn( CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); VerifyOrReturn( @@ -56233,7 +58752,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -56262,7 +58781,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); VerifyOrReturn( CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); VerifyOrReturn( @@ -56348,7 +58867,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "targetPositionLiftPercent100ths", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -56377,7 +58896,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "targetPositionTiltPercent100ths", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -56775,7 +59294,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -56804,7 +59323,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); VerifyOrReturn( CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); VerifyOrReturn( @@ -56833,7 +59352,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -56862,7 +59381,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); VerifyOrReturn( CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); VerifyOrReturn( @@ -56890,7 +59409,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("operationalStatus", "", "map8")); + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); testSendClusterTest_TC_WNCV_3_2_7_WaitForReport_Fulfilled = true; }; @@ -57029,7 +59548,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("operationalStatus", "", "map8")); + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("operationalStatus", [value unsignedCharValue], 10U)); VerifyOrReturn(CheckConstraintMaxValue("operationalStatus", [value unsignedCharValue], 42U)); @@ -57062,7 +59581,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "currentPositionLiftPercent100ths", [value unsignedShortValue], 1U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -57091,7 +59610,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); VerifyOrReturn( CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 1U)); VerifyOrReturn( @@ -57120,7 +59639,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "currentPositionTiltPercent100ths", [value unsignedShortValue], 1U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -57149,7 +59668,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "uint8")); + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); VerifyOrReturn( CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 1U)); VerifyOrReturn( @@ -57235,7 +59754,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("targetPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "targetPositionLiftPercent100ths", [value unsignedShortValue], 1U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -57264,7 +59783,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "", "uint16")); + VerifyOrReturn(CheckConstraintType("targetPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); VerifyOrReturn(CheckConstraintMinValue( "targetPositionTiltPercent100ths", [value unsignedShortValue], 1U)); VerifyOrReturn(CheckConstraintMaxValue( @@ -57579,7 +60098,7 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("operationalStatus", "", "map8")); + VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); testSendClusterTest_TC_WNCV_3_3_5_WaitForReport_Fulfilled = true; }; @@ -86488,7 +89007,7 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { VerifyOrReturn(CheckValue("CommissionedFabrics", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("commissionedFabrics", "", "uint8")); + VerifyOrReturn(CheckConstraintType("commissionedFabrics", "int8u", "int8u")); NextTest(); }]; @@ -86508,8 +89027,8 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentFabricIndex", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentFabricIndex", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintType("currentFabricIndex", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentFabricIndex", [value unsignedCharValue], 1U)); { ourFabricIndex = value; } @@ -86570,7 +89089,7 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("fabrics", "", "list")); + VerifyOrReturn(CheckConstraintType("fabrics", "list", "list")); testSendClusterTestFabricRemovalWhileSubscribed_6_WaitForReport_Fulfilled = true; }; @@ -87592,7 +90111,7 @@ class TestGeneralCommissioning : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("supportsConcurrentConnection", "", "bool")); + VerifyOrReturn(CheckConstraintType("supportsConcurrentConnection", "boolean", "boolean")); NextTest(); }]; @@ -87855,7 +90374,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("supportedFabrics", "", "uint8")); + VerifyOrReturn(CheckConstraintType("supportedFabrics", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("supportedFabrics", [value unsignedCharValue], 4U)); NextTest(); @@ -87876,7 +90395,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("commissionedFabrics", "", "uint8")); + VerifyOrReturn(CheckConstraintType("commissionedFabrics", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("commissionedFabrics", [value unsignedCharValue], 1U)); NextTest(); @@ -87898,8 +90417,8 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentFabricIndex", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentFabricIndex", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintType("currentFabricIndex", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentFabricIndex", [value unsignedCharValue], 1U)); { ourFabricIndex = value; } @@ -88415,7 +90934,7 @@ class TestModeSelectCluster : public TestCommandBridge { [((MTRModeSelectClusterModeOptionStruct *) actualValue[2]).semanticTags count], static_cast(1))); } - VerifyOrReturn(CheckConstraintType("supportedModes", "", "list")); + VerifyOrReturn(CheckConstraintType("supportedModes", "list", "list")); VerifyOrReturn(CheckConstraintMinLength("supportedModes", value, 3)); VerifyOrReturn(CheckConstraintMaxLength("supportedModes", value, 3)); NextTest(); @@ -89117,7 +91636,7 @@ class TestSelfFabricRemoval : public TestCommandBridge { VerifyOrReturn(CheckValue("CommissionedFabrics", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("commissionedFabrics", "", "uint8")); + VerifyOrReturn(CheckConstraintType("commissionedFabrics", "int8u", "int8u")); NextTest(); }]; @@ -89137,8 +91656,8 @@ class TestSelfFabricRemoval : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentFabricIndex", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentFabricIndex", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintType("currentFabricIndex", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentFabricIndex", [value unsignedCharValue], 1U)); { ourFabricIndex = value; } @@ -90563,7 +93082,7 @@ class TestArmFailSafe : public TestCommandBridge { ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); } - VerifyOrReturn(CheckConstraintType("fabrics", "", "list")); + VerifyOrReturn(CheckConstraintType("fabrics", "list", "list")); NextTest(); }]; @@ -92518,8 +95037,8 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; params.level = [NSNumber numberWithUnsignedChar:1U]; params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveToLevelWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Sends a MoveToLevel command to set current level to min value Error: %@", err); @@ -92845,8 +95364,8 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; params.level = [NSNumber numberWithUnsignedChar:127U]; params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveToLevelWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Sends a MoveToLevel command to set current level to a mid value Error: %@", err); @@ -93690,7 +96209,7 @@ class Test_TC_DGSW_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("threadMetrics", "", "list")); + VerifyOrReturn(CheckConstraintType("threadMetrics", "list", "list")); NextTest(); }]; @@ -93710,7 +96229,7 @@ class Test_TC_DGSW_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHeapFree", "", "uint64")); + VerifyOrReturn(CheckConstraintType("currentHeapFree", "int64u", "int64u")); NextTest(); }]; @@ -93730,7 +96249,7 @@ class Test_TC_DGSW_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHeapUsed", "", "uint64")); + VerifyOrReturn(CheckConstraintType("currentHeapUsed", "int64u", "int64u")); NextTest(); }]; @@ -93750,7 +96269,7 @@ class Test_TC_DGSW_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHeapHighWatermark", "", "uint64")); + VerifyOrReturn(CheckConstraintType("currentHeapHighWatermark", "int64u", "int64u")); NextTest(); }]; @@ -93804,7 +96323,7 @@ class Test_TC_DGSW_2_2 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 1 : Reads a list of SoftwareFault struct from DUT and data type in each field of the struct must " "match the value listed in spec\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && DGSW.S.E00")) { NextTest(); return; } @@ -94023,7 +96542,7 @@ class Test_TC_DGSW_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("threadMetrics", "", "list")); + VerifyOrReturn(CheckConstraintType("threadMetrics", "list", "list")); NextTest(); }]; @@ -94043,7 +96562,7 @@ class Test_TC_DGSW_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHeapUsed", "", "uint64")); + VerifyOrReturn(CheckConstraintType("currentHeapUsed", "int64u", "int64u")); NextTest(); }]; @@ -94063,7 +96582,7 @@ class Test_TC_DGSW_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHeapHighWatermark", "", "uint64")); + VerifyOrReturn(CheckConstraintType("currentHeapHighWatermark", "int64u", "int64u")); NextTest(); }]; @@ -106503,138 +109022,193 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { err = TestThWritesTheRequirePINforRemoteOperationAttributeValueAsFalseOnTheDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends Lock Door Command to the DUT without PINCode\n"); - if (ShouldSkip("DRLK.S.C00.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : TH writes the RequirePINforRemoteOperation attribute value as False on the DUT and Verify " + "DUT responds with UNSUPPORTED_WRITE\n"); + if (ShouldSkip("!DRLK.S.A0033")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithoutPINCode_6(); + err = TestThWritesTheRequirePINforRemoteOperationAttributeValueAsFalseOnTheDutAndVerifyDutRespondsWithUnsupportedWrite_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends Lock Door Command to the DUT with valid PINCode\n"); - if (ShouldSkip("DRLK.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads the RequirePINforRemoteOperation attribute from the DUT\n"); + if (ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithValidPINCode_7(); + err = TestThReadsTheRequirePINforRemoteOperationAttributeFromTheDut_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : TH writes the RequirePINforRemoteOperation attribute value as True on the DUT\n"); - if (ShouldSkip("DRLK.S.A0033")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends Lock Door Command to the DUT without PINCode\n"); + if (ShouldSkip("DRLK.S.C00.Rsp")) { NextTest(); return; } - err = TestThWritesTheRequirePINforRemoteOperationAttributeValueAsTrueOnTheDut_8(); + err = TestThSendsLockDoorCommandToTheDutWithoutPINCode_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads the RequirePINforRemoteOperation attribute from the DUT\n"); - if (ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends Lock Door Command to the DUT with valid PINCode\n"); + if (ShouldSkip("DRLK.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsTheRequirePINforRemoteOperationAttributeFromTheDut_9(); + err = TestThSendsLockDoorCommandToTheDutWithValidPINCode_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends Lock Door Command to the DUT with valid PINCode\n"); - if (ShouldSkip("DRLK.S.C00.Rsp")) { + ChipLogProgress( + chipTool, " ***** Test Step 10 : TH writes the RequirePINforRemoteOperation attribute value as True on the DUT\n"); + if (ShouldSkip("DRLK.S.A0033")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithValidPINCode_10(); + err = TestThWritesTheRequirePINforRemoteOperationAttributeValueAsTrueOnTheDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends Lock Door Command to the DUT without valid PINCode\n"); - if (ShouldSkip("DRLK.S.C00.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 11 : TH writes the RequirePINforRemoteOperation attribute value as True on the DUT and Verify " + "DUT responds with UNSUPPORTED_WRITE\n"); + if (ShouldSkip("!DRLK.S.A0033")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithoutValidPINCode_11(); + err = TestThWritesTheRequirePINforRemoteOperationAttributeValueAsTrueOnTheDutAndVerifyDutRespondsWithUnsupportedWrite_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends Lock Door Command to the DUT without any argument PINCode\n"); - if (ShouldSkip("DRLK.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads the RequirePINforRemoteOperation attribute from the DUT\n"); + if (ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithoutAnyArgumentPINCode_12(); + err = TestThReadsTheRequirePINforRemoteOperationAttributeFromTheDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH writes WrongCodeEntryLimit attribute value as 3 on the DUT\n"); - if (ShouldSkip("DRLK.S.A0030")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends Lock Door Command to the DUT with valid PINCode\n"); + if (ShouldSkip("DRLK.S.C00.Rsp && DRLK.S.A0033")) { NextTest(); return; } - err = TestThWritesWrongCodeEntryLimitAttributeValueAs3OnTheDut_13(); + err = TestThSendsLockDoorCommandToTheDutWithValidPINCode_13(); break; case 14: - ChipLogProgress( - chipTool, " ***** Test Step 14 : TH writes UserCodeTemporaryDisableTime attribute value as 5 seconds on the DUT\n"); - if (ShouldSkip("DRLK.S.A0031")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends Lock Door Command to the DUT without valid PINCode\n"); + if (ShouldSkip("DRLK.S.C00.Rsp && DRLK.S.A0033")) { NextTest(); return; } - err = TestThWritesUserCodeTemporaryDisableTimeAttributeValueAs5SecondsOnTheDut_14(); + err = TestThSendsLockDoorCommandToTheDutWithoutValidPINCode_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends Lock Door Command to the DUT with invalid PINCode\n"); - if (ShouldSkip("DRLK.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends Lock Door Command to the DUT without any argument PINCode\n"); + if (ShouldSkip("DRLK.S.C00.Rsp && DRLK.S.A0033")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_15(); + err = TestThSendsLockDoorCommandToTheDutWithoutAnyArgumentPINCode_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends Lock Door Command to the DUT with invalid PINCode\n"); - if (ShouldSkip("DRLK.S.C00.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 16 : TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and Verify that the DUT sends " + "Success response\n"); + if (ShouldSkip("DRLK.S.A0030")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_16(); + err = TestThWritesWrongCodeEntryLimitAttributeValueAs3OnTheDutAndVerifyThatTheDutSendsSuccessResponse_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH sends Lock Door Command to the DUT with invalid PINCode\n"); - if (ShouldSkip("DRLK.S.C00.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 17 : TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and verify DUT responds with " + "UNSUPPORTED_WRITE\n"); + if (ShouldSkip("!DRLK.S.A0030")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_17(); + err = TestThWritesWrongCodeEntryLimitAttributeValueAs3OnTheDutAndVerifyDutRespondsWithUnsupportedWrite_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH sends Lock Door Command to the DUT with invalid PINCode\n"); - if (ShouldSkip("DRLK.S.C00.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 18 : TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds on the DUT and Verify " + "that the DUT send the Success response\n"); + if (ShouldSkip("DRLK.S.A0031")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_18(); + err = TestThWritesUserCodeTemporaryDisableTimeAttributeValueAs15SecondsOnTheDutAndVerifyThatTheDutSendTheSuccessResponse_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads UserCodeTemporaryDisableTime attribute from DUT\n"); - if (ShouldSkip("DRLK.S.A0031")) { + ChipLogProgress(chipTool, + " ***** Test Step 19 : TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds on the DUT and Verify " + "DUT responds with UNSUPPORTED_WRITE\n"); + if (ShouldSkip("!DRLK.S.A0031")) { NextTest(); return; } - err = TestThReadsUserCodeTemporaryDisableTimeAttributeFromDut_19(); + err = TestThWritesUserCodeTemporaryDisableTimeAttributeValueAs15SecondsOnTheDutAndVerifyDutRespondsWithUnsupportedWrite_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH sends Lock Door Command to the DUT with valid PINCode\n"); + ChipLogProgress(chipTool, " ***** Test Step 20 : TH sends Lock Door Command to the DUT with invalid PINCode\n"); if (ShouldSkip("DRLK.S.C00.Rsp")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithValidPINCode_20(); + err = TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Clean the created user\n"); - err = TestCleanTheCreatedUser_21(); + ChipLogProgress(chipTool, " ***** Test Step 21 : TH sends Lock Door Command to the DUT with invalid PINCode\n"); + if (ShouldSkip("DRLK.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Cleanup the created credential\n"); + ChipLogProgress(chipTool, " ***** Test Step 22 : TH sends Lock Door Command to the DUT with invalid PINCode\n"); + if (ShouldSkip("DRLK.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : TH sends Lock Door Command to the DUT with invalid PINCode\n"); + if (ShouldSkip("DRLK.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_23(); + break; + case 24: + ChipLogProgress(chipTool, + " ***** Test Step 24 : TH reads UserCodeTemporaryDisableTime attribute from DUT and After sending 3 failure " + "responses verify that UserCodeTemporaryDisableTime attribute is triggered\n"); + if (ShouldSkip("PICS_USER_PROMPT && DRLK.S.A0031")) { + NextTest(); + return; + } + err = TestThReadsUserCodeTemporaryDisableTimeAttributeFromDutAndAfterSending3FailureResponsesVerifyThatUserCodeTemporaryDisableTimeAttributeIsTriggered_24(); + break; + case 25: + ChipLogProgress(chipTool, + " ***** Test Step 25 : TH sends Lock Command to the DUT with valid PINCode before UserCodeTemporaryDisableTime " + "attribute time expires\n"); + if (ShouldSkip("PICS_USER_PROMPT && DRLK.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsLockCommandToTheDutWithValidPINCodeBeforeUserCodeTemporaryDisableTimeAttributeTimeExpires_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Clean the created user\n"); + err = TestCleanTheCreatedUser_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Cleanup the created credential\n"); if (ShouldSkip("DRLK.S.C26.Rsp")) { NextTest(); return; } - err = TestCleanupTheCreatedCredential_22(); + err = TestCleanupTheCreatedCredential_27(); break; } @@ -106666,7 +109240,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -106681,39 +109255,54 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; } @@ -106729,7 +109318,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 23; + const uint16_t mTestCount = 28; chip::Optional mNodeId; chip::Optional mCluster; @@ -106965,7 +109554,56 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithoutPINCode_6() + CHIP_ERROR TestThWritesTheRequirePINforRemoteOperationAttributeValueAsFalseOnTheDutAndVerifyDutRespondsWithUnsupportedWrite_6() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id requirePINforRemoteOperationArgument; + requirePINforRemoteOperationArgument = [NSNumber numberWithBool:false]; + [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes the RequirePINforRemoteOperation attribute value as False " + @"on the DUT and Verify DUT responds with UNSUPPORTED_WRITE Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTheRequirePINforRemoteOperationAttributeFromTheDut_7() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster + readAttributeRequirePINforRemoteOperationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the RequirePINforRemoteOperation attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("RequirePINforRemoteOperation", actualValue, false)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithoutPINCode_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -106984,7 +109622,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithValidPINCode_7() + CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithValidPINCode_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -107004,7 +109642,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWritesTheRequirePINforRemoteOperationAttributeValueAsTrueOnTheDut_8() + CHIP_ERROR TestThWritesTheRequirePINforRemoteOperationAttributeValueAsTrueOnTheDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -107026,7 +109664,33 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheRequirePINforRemoteOperationAttributeFromTheDut_9() + CHIP_ERROR TestThWritesTheRequirePINforRemoteOperationAttributeValueAsTrueOnTheDutAndVerifyDutRespondsWithUnsupportedWrite_11() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id requirePINforRemoteOperationArgument; + requirePINforRemoteOperationArgument = [NSNumber numberWithBool:true]; + [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes the RequirePINforRemoteOperation attribute value as True " + @"on the DUT and Verify DUT responds with UNSUPPORTED_WRITE Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTheRequirePINforRemoteOperationAttributeFromTheDut_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -107049,7 +109713,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithValidPINCode_10() + CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithValidPINCode_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -107069,7 +109733,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithoutValidPINCode_11() + CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithoutValidPINCode_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -107090,14 +109754,13 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithoutAnyArgumentPINCode_12() + CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithoutAnyArgumentPINCode_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"" length:0]; [cluster lockDoorWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends Lock Door Command to the DUT without any argument PINCode Error: %@", err); @@ -107111,7 +109774,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWritesWrongCodeEntryLimitAttributeValueAs3OnTheDut_13() + CHIP_ERROR TestThWritesWrongCodeEntryLimitAttributeValueAs3OnTheDutAndVerifyThatTheDutSendsSuccessResponse_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -107119,20 +109782,48 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { id wrongCodeEntryLimitArgument; wrongCodeEntryLimitArgument = [NSNumber numberWithUnsignedChar:3U]; - [cluster - writeAttributeWrongCodeEntryLimitWithValue:wrongCodeEntryLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes WrongCodeEntryLimit attribute value as 3 on the DUT Error: %@", err); + [cluster writeAttributeWrongCodeEntryLimitWithValue:wrongCodeEntryLimitArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and Verify " + @"that the DUT sends Success response Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWritesUserCodeTemporaryDisableTimeAttributeValueAs5SecondsOnTheDut_14() + CHIP_ERROR TestThWritesWrongCodeEntryLimitAttributeValueAs3OnTheDutAndVerifyDutRespondsWithUnsupportedWrite_17() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id wrongCodeEntryLimitArgument; + wrongCodeEntryLimitArgument = [NSNumber numberWithUnsignedChar:3U]; + [cluster writeAttributeWrongCodeEntryLimitWithValue:wrongCodeEntryLimitArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and verify DUT " + @"responds with UNSUPPORTED_WRITE Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestThWritesUserCodeTemporaryDisableTimeAttributeValueAs15SecondsOnTheDutAndVerifyThatTheDutSendTheSuccessResponse_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -107140,49 +109831,57 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { id userCodeTemporaryDisableTimeArgument; userCodeTemporaryDisableTimeArgument = [NSNumber numberWithUnsignedChar:15U]; - [cluster writeAttributeUserCodeTemporaryDisableTimeWithValue:userCodeTemporaryDisableTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes UserCodeTemporaryDisableTime attribute value as 5 seconds " - @"on the DUT Error: %@", - err); + [cluster + writeAttributeUserCodeTemporaryDisableTimeWithValue:userCodeTemporaryDisableTimeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds on " + @"the DUT and Verify that the DUT send the Success response Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_15() + CHIP_ERROR + TestThWritesUserCodeTemporaryDisableTimeAttributeValueAs15SecondsOnTheDutAndVerifyDutRespondsWithUnsupportedWrite_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"12345" length:5]; - [cluster lockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Lock Door Command to the DUT with invalid PINCode Error: %@", err); + id userCodeTemporaryDisableTimeArgument; + userCodeTemporaryDisableTimeArgument = [NSNumber numberWithUnsignedChar:15U]; + [cluster + writeAttributeUserCodeTemporaryDisableTimeWithValue:userCodeTemporaryDisableTimeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds on " + @"the DUT and Verify DUT responds with UNSUPPORTED_WRITE Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_16() + CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"54321" length:5]; + params.pinCode = [[NSData alloc] initWithBytes:"123458" length:6]; [cluster lockDoorWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends Lock Door Command to the DUT with invalid PINCode Error: %@", err); @@ -107196,14 +109895,14 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_17() + CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"987623" length:6]; + params.pinCode = [[NSData alloc] initWithBytes:"123458" length:6]; [cluster lockDoorWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends Lock Door Command to the DUT with invalid PINCode Error: %@", err); @@ -107217,14 +109916,14 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_18() + CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"67890" length:5]; + params.pinCode = [[NSData alloc] initWithBytes:"123458" length:6]; [cluster lockDoorWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"TH sends Lock Door Command to the DUT with invalid PINCode Error: %@", err); @@ -107238,50 +109937,47 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsUserCodeTemporaryDisableTimeAttributeFromDut_19() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads UserCodeTemporaryDisableTime attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("UserCodeTemporaryDisableTime", actualValue, 15U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithValidPINCode_20() + CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_23() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; + params.pinCode = [[NSData alloc] initWithBytes:"123458" length:6]; [cluster lockDoorWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Lock Door Command to the DUT with valid PINCode Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + NSLog(@"TH sends Lock Door Command to the DUT with invalid PINCode Error: %@", err); + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, + EMBER_ZCL_STATUS_FAILURE)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCleanTheCreatedUser_21() + CHIP_ERROR + TestThReadsUserCodeTemporaryDisableTimeAttributeFromDutAndAfterSending3FailureResponsesVerifyThatUserCodeTemporaryDisableTimeAttributeIsTriggered_24() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThSendsLockCommandToTheDutWithValidPINCodeBeforeUserCodeTemporaryDisableTimeAttributeTimeExpires_25() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestCleanTheCreatedUser_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -107301,7 +109997,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCleanupTheCreatedCredential_22() + CHIP_ERROR TestCleanupTheCreatedCredential_27() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -108206,70 +110902,68 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { err = TestReadTheUserBackAndVerifyItsFields_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Get Max number of Week Day schedules for user\n"); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads NumberOfWeekDay SchedulesSupportedPerUser attribute\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.A0014")) { NextTest(); return; } - err = TestGetMaxNumberOfWeekDaySchedulesForUser_3(); + err = TestThReadsNumberOfWeekDaySchedulesSupportedPerUserAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Get number of supported users\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads NumberOfTotalUsers Supported attribute\n"); if (ShouldSkip("DRLK.S.F08 && DRLK.S.A0011")) { NextTest(); return; } - err = TestGetNumberOfSupportedUsers_4(); + err = TestThReadsNumberOfTotalUsersSupportedAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Send Set Week Day Schedule Command to DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH send Set Week Day Schedule Command\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0b.Rsp")) { NextTest(); return; } - err = TestSendSetWeekDayScheduleCommandToDut_5(); + err = TestThSendSetWeekDayScheduleCommand_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : send GetWeekDay Schedule Command \n"); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH send Get Week Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx")) { NextTest(); return; } - err = TestSendGetWeekDayScheduleCommand_6(); + err = TestThSendGetWeekDayScheduleCommandToDut_6(); break; case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : Send Set Week Day Schedule Command to DUT and verify INVALID_COMMAND response\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : TH send Set Week Day Schedule Command\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0b.Rsp")) { NextTest(); return; } - err = TestSendSetWeekDayScheduleCommandToDutAndVerifyInvalidCommandResponse_7(); + err = TestThSendSetWeekDayScheduleCommand_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : send GetWeekDay Schedule Command to DUT and verify INVALID_COMMAND response\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : TH send Get Week Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx")) { NextTest(); return; } - err = TestSendGetWeekDayScheduleCommandToDutAndVerifyInvalidCommandResponse_8(); + err = TestThSendGetWeekDayScheduleCommandToDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Clear all week day schedules for the first user\n"); + ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends Clear Week Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0d.Rsp")) { NextTest(); return; } - err = TestClearAllWeekDaySchedulesForTheFirstUser_9(); + err = TestThSendsClearWeekDayScheduleCommandToDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : send GetWeekDay Schedule Command \n"); + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends Get Week Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx")) { NextTest(); return; } - err = TestSendGetWeekDayScheduleCommand_10(); + err = TestThSendsGetWeekDayScheduleCommandToDut_10(); break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Cleanup the created user\n"); @@ -108453,7 +111147,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { } NSNumber * _Nonnull NumberOfWeekDaySchedulesSupportedPerUser; - CHIP_ERROR TestGetMaxNumberOfWeekDaySchedulesForUser_3() + CHIP_ERROR TestThReadsNumberOfWeekDaySchedulesSupportedPerUserAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -108461,7 +111155,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Get Max number of Week Day schedules for user Error: %@", err); + NSLog(@"TH reads NumberOfWeekDay SchedulesSupportedPerUser attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -108480,7 +111174,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { } NSNumber * _Nonnull NumberOfTotalUsersSupported; - CHIP_ERROR TestGetNumberOfSupportedUsers_4() + CHIP_ERROR TestThReadsNumberOfTotalUsersSupportedAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -108488,7 +111182,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { [cluster readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Get number of supported users Error: %@", err); + NSLog(@"TH reads NumberOfTotalUsers Supported attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -108504,7 +111198,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendSetWeekDayScheduleCommandToDut_5() + CHIP_ERROR TestThSendSetWeekDayScheduleCommand_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -108520,7 +111214,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { params.endMinute = [NSNumber numberWithUnsignedChar:55U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Send Set Week Day Schedule Command to DUT Error: %@", err); + NSLog(@"TH send Set Week Day Schedule Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -108530,7 +111224,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendGetWeekDayScheduleCommand_6() + CHIP_ERROR TestThSendGetWeekDayScheduleCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -108543,66 +111237,51 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { getWeekDayScheduleWithParams:params completionHandler:^( MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"send GetWeekDay Schedule Command Error: %@", err); + NSLog(@"TH send Get Week Day Schedule Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn( - CheckConstraintMinValue("weekDayIndex", [values.weekDayIndex unsignedCharValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue( - "weekDayIndex", [values.weekDayIndex unsignedCharValue], NumberOfWeekDaySchedulesSupportedPerUser)); + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); + } - VerifyOrReturn( - CheckConstraintMinValue("userIndex", [values.userIndex unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue( - "userIndex", [values.userIndex unsignedShortValue], NumberOfTotalUsersSupported)); + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } { id actualValue = values.status; VerifyOrReturn(CheckValue("status", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintHasValue("daysMask", values.daysMask, true)); - if (values.daysMask != nil) { - - VerifyOrReturn( - CheckConstraintMinValue("daysMask", [values.daysMask unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("daysMask", [values.daysMask unsignedCharValue], 6U)); + { + id actualValue = values.daysMask; + VerifyOrReturn(CheckValue("daysMask", actualValue, 2U)); } - VerifyOrReturn(CheckConstraintHasValue("startHour", values.startHour, true)); - if (values.startHour != nil) { - - VerifyOrReturn( - CheckConstraintMinValue("startHour", [values.startHour unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("startHour", [values.startHour unsignedCharValue], 23U)); + { + id actualValue = values.startHour; + VerifyOrReturn(CheckValue("startHour", actualValue, 15U)); } - VerifyOrReturn(CheckConstraintHasValue("startMinute", values.startMinute, true)); - if (values.startMinute != nil) { - - VerifyOrReturn( - CheckConstraintMinValue("startMinute", [values.startMinute unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("startMinute", [values.startMinute unsignedCharValue], 59U)); + { + id actualValue = values.startMinute; + VerifyOrReturn(CheckValue("startMinute", actualValue, 45U)); } VerifyOrReturn(CheckConstraintHasValue("endHour", values.endHour, true)); if (values.endHour != nil) { - VerifyOrReturn(CheckConstraintMinValue("endHour", [values.endHour unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("endHour", [values.endHour unsignedCharValue], 23U)); + VerifyOrReturn(CheckConstraintMinValue("endHour", [values.endHour unsignedCharValue], 16U)); } VerifyOrReturn(CheckConstraintHasValue("endMinute", values.endMinute, true)); if (values.endMinute != nil) { VerifyOrReturn( - CheckConstraintMinValue("endMinute", [values.endMinute unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("endMinute", [values.endMinute unsignedCharValue], 59U)); + CheckConstraintMinValue("endMinute", [values.endMinute unsignedCharValue], 55U)); } NextTest(); @@ -108611,7 +111290,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendSetWeekDayScheduleCommandToDutAndVerifyInvalidCommandResponse_7() + CHIP_ERROR TestThSendSetWeekDayScheduleCommand_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -108628,7 +111307,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Send Set Week Day Schedule Command to DUT and verify INVALID_COMMAND response Error: %@", err); + NSLog(@"TH send Set Week Day Schedule Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) @@ -108640,7 +111319,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendGetWeekDayScheduleCommandToDutAndVerifyInvalidCommandResponse_8() + CHIP_ERROR TestThSendGetWeekDayScheduleCommandToDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -108649,56 +111328,55 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster - getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"send GetWeekDay Schedule Command to DUT and verify INVALID_COMMAND response Error: %@", err); + [cluster getWeekDayScheduleWithParams:params + completionHandler:^( + MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH send Get Week Day Schedule Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 0U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - VerifyOrReturn(CheckConstraintHasValue("daysMask", values.daysMask, false)); - if (values.daysMask != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("daysMask", values.daysMask, false)); + if (values.daysMask != nil) { + } - VerifyOrReturn(CheckConstraintHasValue("startHour", values.startHour, false)); - if (values.startHour != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("startHour", values.startHour, false)); + if (values.startHour != nil) { + } - VerifyOrReturn(CheckConstraintHasValue("startMinute", values.startMinute, false)); - if (values.startMinute != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("startMinute", values.startMinute, false)); + if (values.startMinute != nil) { + } - VerifyOrReturn(CheckConstraintHasValue("endHour", values.endHour, false)); - if (values.endHour != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("endHour", values.endHour, false)); + if (values.endHour != nil) { + } - VerifyOrReturn(CheckConstraintHasValue("endMinute", values.endMinute, false)); - if (values.endMinute != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("endMinute", values.endMinute, false)); + if (values.endMinute != nil) { + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestClearAllWeekDaySchedulesForTheFirstUser_9() + CHIP_ERROR TestThSendsClearWeekDayScheduleCommandToDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -108709,7 +111387,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear all week day schedules for the first user Error: %@", err); + NSLog(@"TH sends Clear Week Day Schedule Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -108719,25 +111397,25 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendGetWeekDayScheduleCommand_10() + CHIP_ERROR TestThSendsGetWeekDayScheduleCommandToDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:2U]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"send GetWeekDay Schedule Command Error: %@", err); + NSLog(@"TH sends Get Week Day Schedule Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 2U)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); } { @@ -108848,108 +111526,116 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { err = TestReadTheUserBackAndVerifyItsFields_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Get Max number of year Day schedules for user\n"); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads NumberOfYearDay SchedulesSupportedPerUser attribute\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.A0015")) { NextTest(); return; } - err = TestGetMaxNumberOfYearDaySchedulesForUser_3(); + err = TestThReadsNumberOfYearDaySchedulesSupportedPerUserAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Get number of supported users\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads NumberOfTotalUsers Supported attribute\n"); if (ShouldSkip("DRLK.C.F08 && DRLK.S.A0011")) { NextTest(); return; } - err = TestGetNumberOfSupportedUsers_4(); + err = TestThReadsNumberOfTotalUsersSupportedAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Send Set Year Day Schedule Command to DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends Set Year Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0e.Rsp")) { NextTest(); return; } - err = TestSendSetYearDayScheduleCommandToDut_5(); + err = TestThSendsSetYearDayScheduleCommandToDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : send Get Year Day Schedule Command\n"); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends Get Year Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx")) { NextTest(); return; } - err = TestSendGetYearDayScheduleCommand_6(); + err = TestThSendsGetYearDayScheduleCommandToDut_6(); break; case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : Send Set Year Day Schedule Command to DUT and verify INVALID_COMMAND response\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : TH send Set Year Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.C0e.Rsp")) { NextTest(); return; } - err = TestSendSetYearDayScheduleCommandToDutAndVerifyInvalidCommandResponse_7(); + err = TestThSendSetYearDayScheduleCommandToDut_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : send Get Year Day Schedule Command to DUT and Verify INVALID_FIELD response\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends Get Year Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx")) { NextTest(); return; } - err = TestSendGetYearDayScheduleCommandToDutAndVerifyInvalidFieldResponse_8(); + err = TestThSendsGetYearDayScheduleCommandToDut_8(); break; case 9: - ChipLogProgress( - chipTool, " ***** Test Step 9 : send Get Year Day Schedule Command to DUT and verify FAILURE response\n"); + ChipLogProgress(chipTool, " ***** Test Step 9 : Create a user with userIndex as 5\n"); + err = TestCreateAUserWithUserIndexAs5_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends Get Year Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx")) { NextTest(); return; } - err = TestSendGetYearDayScheduleCommandToDutAndVerifyFailureResponse_9(); + err = TestThSendsGetYearDayScheduleCommandToDut_10(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Clear a year day schedule for the first user\n"); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends Clear Year Day Schedule to DUT\n"); if (ShouldSkip("DRLK.S.C10.Rsp")) { NextTest(); return; } - err = TestClearAYearDayScheduleForTheFirstUser_10(); + err = TestThSendsClearYearDayScheduleToDut_11(); break; - case 11: - ChipLogProgress( - chipTool, " ***** Test Step 11 : send Get Year Day Schedule Command to DUT and verify NOT_FOUND response\n"); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends Get Year Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx && DRLK.S.C10.Rsp")) { NextTest(); return; } - err = TestSendGetYearDayScheduleCommandToDutAndVerifyNotFoundResponse_11(); + err = TestThSendsGetYearDayScheduleCommandToDut_12(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Send Set Year Day Schedule Command to DUT \n"); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends Set Year Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.C0e.Rsp")) { NextTest(); return; } - err = TestSendSetYearDayScheduleCommandToDut_12(); + err = TestThSendsSetYearDayScheduleCommandToDut_13(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : send Get Year Day Schedule Command\n"); + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends Get Year Day Schedule Command to DUT\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx")) { NextTest(); return; } - err = TestSendGetYearDayScheduleCommand_13(); + err = TestThSendsGetYearDayScheduleCommandToDut_14(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Clear a year day schedule for the first user\n"); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends Clear Year Day Schedule to DUT\n"); if (ShouldSkip("DRLK.S.F04 && DRLK.S.C10.Rsp")) { NextTest(); return; } - err = TestClearAYearDayScheduleForTheFirstUser_14(); + err = TestThSendsClearYearDayScheduleToDut_15(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Cleanup the created user\n"); - err = TestCleanupTheCreatedUser_15(); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Clear a year day schedule for the first user\n"); + if (ShouldSkip("DRLK.S.F04 && DRLK.S.C10.Rsp")) { + NextTest(); + return; + } + err = TestClearAYearDayScheduleForTheFirstUser_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Cleanup the created user\n"); + err = TestCleanupTheCreatedUser_17(); break; } @@ -109008,6 +111694,12 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; } @@ -109023,7 +111715,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 16; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mCluster; @@ -109141,7 +111833,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { } NSNumber * _Nonnull NumberOfYearDaySchedulesSupportedPerUser; - CHIP_ERROR TestGetMaxNumberOfYearDaySchedulesForUser_3() + CHIP_ERROR TestThReadsNumberOfYearDaySchedulesSupportedPerUserAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -109149,7 +111841,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Get Max number of year Day schedules for user Error: %@", err); + NSLog(@"TH reads NumberOfYearDay SchedulesSupportedPerUser attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -109168,7 +111860,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { } NSNumber * _Nonnull NumberOfTotalUsersSupported; - CHIP_ERROR TestGetNumberOfSupportedUsers_4() + CHIP_ERROR TestThReadsNumberOfTotalUsersSupportedAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -109176,7 +111868,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { [cluster readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Get number of supported users Error: %@", err); + NSLog(@"TH reads NumberOfTotalUsers Supported attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -109192,7 +111884,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendSetYearDayScheduleCommandToDut_5() + CHIP_ERROR TestThSendsSetYearDayScheduleCommandToDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -109205,7 +111897,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { params.localEndTime = [NSNumber numberWithUnsignedInt:1980UL]; [cluster setYearDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Send Set Year Day Schedule Command to DUT Error: %@", err); + NSLog(@"TH sends Set Year Day Schedule Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -109215,7 +111907,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendGetYearDayScheduleCommand_6() + CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -109227,35 +111919,39 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { [cluster getYearDayScheduleWithParams:params completionHandler:^( MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"send Get Year Day Schedule Command Error: %@", err); + NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn( - CheckConstraintMinValue("yearDayIndex", [values.yearDayIndex unsignedCharValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue("yearDayIndex", - [values.yearDayIndex unsignedCharValue], NumberOfYearDaySchedulesSupportedPerUser)); + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); + } - VerifyOrReturn( - CheckConstraintMinValue("userIndex", [values.userIndex unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue( - "userIndex", [values.userIndex unsignedShortValue], NumberOfTotalUsersSupported)); + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } { id actualValue = values.status; VerifyOrReturn(CheckValue("status", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, true)); - if (values.localStartTime != nil) { + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 960UL)); + } - VerifyOrReturn(CheckConstraintType("localStartTime", "", "epoch-s")); + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 1980UL)); } - VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, true)); if (values.localEndTime != nil) { - VerifyOrReturn(CheckConstraintType("localEndTime", "", "epoch-s")); + VerifyOrReturn(CheckConstraintMinValue( + "localEndTime", [values.localEndTime unsignedIntValue], 961UL)); } NextTest(); @@ -109264,7 +111960,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendSetYearDayScheduleCommandToDutAndVerifyInvalidCommandResponse_7() + CHIP_ERROR TestThSendSetYearDayScheduleCommandToDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -109278,7 +111974,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { [cluster setYearDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Send Set Year Day Schedule Command to DUT and verify INVALID_COMMAND response Error: %@", err); + NSLog(@"TH send Set Year Day Schedule Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) @@ -109290,7 +111986,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendGetYearDayScheduleCommandToDutAndVerifyInvalidFieldResponse_8() + CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -109299,44 +111995,69 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:21U]; - [cluster - getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"send Get Year Day Schedule Command to DUT and Verify INVALID_FIELD response Error: %@", err); + [cluster getYearDayScheduleWithParams:params + completionHandler:^( + MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 21U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 21U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); - if (values.localStartTime != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); + if (values.localStartTime != nil) { + } - VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, false)); - if (values.localEndTime != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, false)); + if (values.localEndTime != nil) { + } - NextTest(); - }]; + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCreateAUserWithUserIndexAs5_9() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; + params.userIndex = [NSNumber numberWithUnsignedShort:5U]; + params.userName = @"xxx"; + params.userUniqueId = [NSNumber numberWithUnsignedInt:6452UL]; + params.userStatus = [NSNumber numberWithUnsignedChar:1U]; + params.userType = [NSNumber numberWithUnsignedChar:0U]; + params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; + [cluster setUserWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Create a user with userIndex as 5 Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendGetYearDayScheduleCommandToDutAndVerifyFailureResponse_9() + CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -109348,7 +112069,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { [cluster getYearDayScheduleWithParams:params completionHandler:^( MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"send Get Year Day Schedule Command to DUT and verify FAILURE response Error: %@", err); + NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -109364,7 +112085,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 1U)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); @@ -109381,7 +112102,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearAYearDayScheduleForTheFirstUser_10() + CHIP_ERROR TestThSendsClearYearDayScheduleToDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -109392,7 +112113,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearYearDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear a year day schedule for the first user Error: %@", err); + NSLog(@"TH sends Clear Year Day Schedule to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -109402,7 +112123,75 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendGetYearDayScheduleCommandToDutAndVerifyNotFoundResponse_11() + CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_12() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster getYearDayScheduleWithParams:params + completionHandler:^( + MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } + + VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); + if (values.localStartTime != nil) { + } + + VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, false)); + if (values.localEndTime != nil) { + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsSetYearDayScheduleCommandToDut_13() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.localStartTime = [NSNumber numberWithUnsignedInt:1080UL]; + params.localEndTime = [NSNumber numberWithUnsignedInt:2100UL]; + [cluster setYearDayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends Set Year Day Schedule Command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsGetYearDayScheduleCommandToDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -109414,7 +112203,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { [cluster getYearDayScheduleWithParams:params completionHandler:^( MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"send Get Year Day Schedule Command to DUT and verify NOT_FOUND response Error: %@", err); + NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -109430,39 +112219,24 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 1U)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); - if (values.localStartTime != nil) { + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 1080UL)); } - VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, false)); - if (values.localEndTime != nil) { + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 2100UL)); } - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendSetYearDayScheduleCommandToDut_12() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.localStartTime = [NSNumber numberWithUnsignedInt:1080UL]; - params.localEndTime = [NSNumber numberWithUnsignedInt:2100UL]; - [cluster setYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Send Set Year Day Schedule Command to DUT Error: %@", err); + if (values.localEndTime != nil) { - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintMinValue( + "localEndTime", [values.localEndTime unsignedIntValue], 1081UL)); + } NextTest(); }]; @@ -109470,54 +112244,31 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendGetYearDayScheduleCommand_13() + CHIP_ERROR TestThSendsClearYearDayScheduleToDut_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"send Get Year Day Schedule Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); - } - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } - - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 1080UL)); - } - - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 2100UL)); - } + __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:0U]; + params.userIndex = [NSNumber numberWithUnsignedShort:0U]; + [cluster clearYearDayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends Clear Year Day Schedule to DUT Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestClearAYearDayScheduleForTheFirstUser_14() + CHIP_ERROR TestClearAYearDayScheduleForTheFirstUser_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -109538,7 +112289,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCleanupTheCreatedUser_15() + CHIP_ERROR TestCleanupTheCreatedUser_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -109635,74 +112386,74 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { err = TestThSendsGetCredentialStatusCommand_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : TH sends Set Credential Command to DUT and verify the INVALID_COMMAND if any of the fields " - "are invalid\n"); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends Set Credential Command to DUT\n"); if (ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDutAndVerifyTheInvalidCommandIfAnyOfTheFieldsAreInvalid_6(); + err = TestThSendsSetCredentialCommandToDut_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : TH sends Set Credential Command to DUT and verify response as DUPLICATE if CredentialData is " - "repeated\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends Set Credential Command to DUT\n"); if (ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDutAndVerifyResponseAsDuplicateIfCredentialDataIsRepeated_7(); + err = TestThSendsSetCredentialCommandToDut_7(); break; case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : TH sends Set Credential Command to DUT and verify response as OCCUPIED if CredentialIndex is " - "repeated\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends Set Credential Command to DUT\n"); if (ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDutAndVerifyResponseAsOccupiedIfCredentialIndexIsRepeated_8(); + err = TestThSendsSetCredentialCommandToDut_8(); break; case 9: ChipLogProgress(chipTool, - " ***** Test Step 9 : TH sends Set Credential Command to DUT and verify the DUT response as OCCUPIED if the " - "CredentialIndex is not associated with the UserIndex\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { + " ***** Test Step 9 : TH sends Set Credential Command to DUT and Verify that the DUT sends Set Credential Response " + "command with response as OCCUPIED if the CredentialIndex is repeated\n"); + if (ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDutAndVerifyTheDutResponseAsOccupiedIfTheCredentialIndexIsNotAssociatedWithTheUserIndex_9(); + err = TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends Clear Credential Command to DUT\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C26.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends Set Credential Command to DUT\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestThSendsClearCredentialCommandToDut_10(); + err = TestThSendsSetCredentialCommandToDut_10(); break; case 11: ChipLogProgress(chipTool, - " ***** Test Step 11 : TH sends Get Credential Status Command and verify that the CredentialType and " - "CredentialIndex for the provided value is cleared\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + " ***** Test Step 11 : TH sends Set Credential Command to DUT and Verify that the DUT sends Set Credential " + "Response command with response as OCCUPIED if the CredentialIndex is repeated\n"); + if (ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandAndVerifyThatTheCredentialTypeAndCredentialIndexForTheProvidedValueIsCleared_11(); + err = TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends Set User Command to DUT\n"); - err = TestThSendsSetUserCommandToDut_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends Set Credential Command to DUT\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { + NextTest(); + return; + } + err = TestThSendsSetCredentialCommandToDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends Set Credential Command to DUT\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { + ChipLogProgress(chipTool, + " ***** Test Step 13 : TH sends Set Credential Command to DUT and Verify that the DUT sends Set Credential " + "Response command with response as OCCUPIED if the CredentialIndex is repeated\n"); + if (ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDut_13(); + err = TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_13(); break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends Clear Credential Command to DUT\n"); @@ -109713,28 +112464,70 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { err = TestThSendsClearCredentialCommandToDut_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends Get Credential Status Command\n"); + ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends Get Credential Status Command to DUT\n"); if (ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommand_15(); + err = TestThSendsGetCredentialStatusCommandToDut_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends Get Credential Status Command\n"); + ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends Set User Command to DUT\n"); + err = TestThSendsSetUserCommandToDut_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH sends Set Credential Command to DUT\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { + NextTest(); + return; + } + err = TestThSendsSetCredentialCommandToDut_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH sends Clear Credential Command to DUT\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C26.Rsp")) { + NextTest(); + return; + } + err = TestThSendsClearCredentialCommandToDut_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH sends Get Credential Status Command\n"); if (ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommand_16(); + err = TestThSendsGetCredentialStatusCommand_19(); break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH sends Clear Credential Command to DUT\n"); + case 20: + ChipLogProgress(chipTool, + " ***** Test Step 20 : TH sends Get Credential command to DUT and Verify that the CredentialType for the provided " + "value is cleared Verify that the CredentialIndex is cleared\n"); + if (ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + NextTest(); + return; + } + err = TestThSendsGetCredentialCommandToDutAndVerifyThatTheCredentialTypeForTheProvidedValueIsClearedVerifyThatTheCredentialIndexIsCleared_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH sends Get Credential Status Command\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + NextTest(); + return; + } + err = TestThSendsGetCredentialStatusCommand_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : TH sends Clear Credential Command to DUT\n"); if (ShouldSkip("DRLK.S.F08 && DRLK.S.C26.Rsp")) { NextTest(); return; } - err = TestThSendsClearCredentialCommandToDut_17(); + err = TestThSendsClearCredentialCommandToDut_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Cleanup the created user\n"); + err = TestCleanupTheCreatedUser_23(); break; } @@ -109793,14 +112586,32 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -109814,7 +112625,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 18; + const uint16_t mTestCount = 24; chip::Optional mNodeId; chip::Optional mCluster; @@ -110019,13 +112830,11 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("credentialExists", "", "boolean")); - if (values.userIndex != nil) { - - VerifyOrReturn( - CheckConstraintMinValue("userIndex", [values.userIndex unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue( - "userIndex", [values.userIndex unsignedShortValue], NumberOfTotalUsersSupported)); + VerifyOrReturn(CheckConstraintType("credentialExists", "boolean", "boolean")); + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); } { @@ -110051,7 +112860,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSetCredentialCommandToDutAndVerifyTheInvalidCommandIfAnyOfTheFieldsAreInvalid_6() + CHIP_ERROR TestThSendsSetCredentialCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -110063,16 +112872,14 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:2U]; - params.credentialData = [[NSData alloc] initWithBytes:"1234" length:4]; + params.credentialData = [[NSData alloc] initWithBytes:"4321" length:4]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; params.userStatus = [NSNumber numberWithUnsignedChar:5U]; params.userType = [NSNumber numberWithUnsignedChar:10U]; [cluster setCredentialWithParams:params completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Set Credential Command to DUT and verify the INVALID_COMMAND if any of the fields are " - @"invalid Error: %@", - err); + NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -110098,7 +112905,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSetCredentialCommandToDutAndVerifyResponseAsDuplicateIfCredentialDataIsRepeated_7() + CHIP_ERROR TestThSendsSetCredentialCommandToDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -110117,9 +112924,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { [cluster setCredentialWithParams:params completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Set Credential Command to DUT and verify response as DUPLICATE if CredentialData is " - @"repeated Error: %@", - err); + NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -110145,7 +112950,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSetCredentialCommandToDutAndVerifyResponseAsOccupiedIfCredentialIndexIsRepeated_8() + CHIP_ERROR TestThSendsSetCredentialCommandToDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -110164,9 +112969,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { [cluster setCredentialWithParams:params completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Set Credential Command to DUT and verify response as OCCUPIED if CredentialIndex is " - @"repeated Error: %@", - err); + NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -110193,7 +112996,71 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { } CHIP_ERROR - TestThSendsSetCredentialCommandToDutAndVerifyTheDutResponseAsOccupiedIfTheCredentialIndexIsNotAssociatedWithTheUserIndex_9() + TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_9() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThSendsSetCredentialCommandToDut_10() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; + params.credential = [[MTRDoorLockClusterDlCredential alloc] init]; + ((MTRDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; + ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; + + params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; + params.userIndex = [NSNumber numberWithUnsignedShort:3U]; + params.userStatus = [NSNumber numberWithUnsignedChar:0U]; + params.userType = [NSNumber numberWithUnsignedChar:0U]; + [cluster + setCredentialWithParams:params + completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 2U)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } + + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_11() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThSendsSetCredentialCommandToDut_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -110212,9 +113079,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { [cluster setCredentialWithParams:params completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Set Credential Command to DUT and verify the DUT response as OCCUPIED if the " - @"CredentialIndex is not associated with the UserIndex Error: %@", - err); + NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -110240,7 +113105,17 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsClearCredentialCommandToDut_10() + CHIP_ERROR + TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_13() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThSendsClearCredentialCommandToDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -110263,8 +113138,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestThSendsGetCredentialStatusCommandAndVerifyThatTheCredentialTypeAndCredentialIndexForTheProvidedValueIsCleared_11() + CHIP_ERROR TestThSendsGetCredentialStatusCommandToDut_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -110278,9 +113152,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { [cluster getCredentialStatusWithParams:params completionHandler:^( MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Get Credential Status Command and verify that the CredentialType and " - @"CredentialIndex for the provided value is cleared Error: %@", - err); + NSLog(@"TH sends Get Credential Status Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -110315,7 +113187,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSetUserCommandToDut_12() + CHIP_ERROR TestThSendsSetUserCommandToDut_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -110341,7 +113213,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSetCredentialCommandToDut_13() + CHIP_ERROR TestThSendsSetCredentialCommandToDut_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -110351,7 +113223,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[MTRDoorLockClusterDlCredential alloc] init]; ((MTRDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; - ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; + ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; @@ -110377,7 +113249,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { { id actualValue = values.nextCredentialIndex; VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); } NextTest(); @@ -110386,7 +113258,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsClearCredentialCommandToDut_14() + CHIP_ERROR TestThSendsClearCredentialCommandToDut_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -110409,7 +113281,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommand_15() + CHIP_ERROR TestThSendsGetCredentialStatusCommand_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -110436,7 +113308,17 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommand_16() + CHIP_ERROR + TestThSendsGetCredentialCommandToDutAndVerifyThatTheCredentialTypeForTheProvidedValueIsClearedVerifyThatTheCredentialIndexIsCleared_20() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThSendsGetCredentialStatusCommand_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -110485,7 +113367,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsClearCredentialCommandToDut_17() + CHIP_ERROR TestThSendsClearCredentialCommandToDut_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -110510,6 +113392,26 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestCleanupTheCreatedUser_23() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster clearUserWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Cleanup the created user Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; class TestGroupsCluster : public TestCommandBridge { @@ -112585,6 +115487,7 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), diff --git a/zzz_generated/light-switch-app/zap-generated/access.h b/zzz_generated/light-switch-app/zap-generated/access.h index 712b9fbcf17a37..0386dfe564b3f7 100644 --- a/zzz_generated/light-switch-app/zap-generated/access.h +++ b/zzz_generated/light-switch-app/zap-generated/access.h @@ -153,6 +153,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -187,6 +188,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -221,6 +223,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/light-switch-app/zap-generated/endpoint_config.h b/zzz_generated/light-switch-app/zap-generated/endpoint_config.h index a27405e1065c73..2408c85c1bbf97 100644 --- a/zzz_generated/light-switch-app/zap-generated/endpoint_config.h +++ b/zzz_generated/light-switch-app/zap-generated/endpoint_config.h @@ -398,7 +398,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ diff --git a/zzz_generated/lighting-app/zap-generated/access.h b/zzz_generated/lighting-app/zap-generated/access.h index e91fbd2651251c..46ba904a0c4459 100644 --- a/zzz_generated/lighting-app/zap-generated/access.h +++ b/zzz_generated/lighting-app/zap-generated/access.h @@ -171,6 +171,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -205,6 +206,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -239,6 +241,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/lighting-app/zap-generated/endpoint_config.h b/zzz_generated/lighting-app/zap-generated/endpoint_config.h index ef1921fdfec952..d85c3859c69fa8 100644 --- a/zzz_generated/lighting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lighting-app/zap-generated/endpoint_config.h @@ -421,7 +421,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ diff --git a/zzz_generated/lock-app/zap-generated/access.h b/zzz_generated/lock-app/zap-generated/access.h index 54fc17be7f5ec2..46ef8d9aed90b6 100644 --- a/zzz_generated/lock-app/zap-generated/access.h +++ b/zzz_generated/lock-app/zap-generated/access.h @@ -212,6 +212,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -260,6 +261,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -308,6 +310,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/lock-app/zap-generated/endpoint_config.h b/zzz_generated/lock-app/zap-generated/endpoint_config.h index 89adcf20069a3b..2d158b3e3bbeae 100644 --- a/zzz_generated/lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lock-app/zap-generated/endpoint_config.h @@ -455,7 +455,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ diff --git a/zzz_generated/ota-provider-app/zap-generated/access.h b/zzz_generated/ota-provider-app/zap-generated/access.h index 9c0ec040c2e21e..f4bed206b84fdc 100644 --- a/zzz_generated/ota-provider-app/zap-generated/access.h +++ b/zzz_generated/ota-provider-app/zap-generated/access.h @@ -147,6 +147,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -175,6 +176,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -203,6 +205,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h index 44f5fb68233cdc..3faf0a9c5e9b87 100644 --- a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h @@ -232,7 +232,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ diff --git a/zzz_generated/ota-requestor-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/ota-requestor-app/zap-generated/PluginApplicationCallbacks.h index 301509a2bc2374..70f863f3eccac5 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/ota-requestor-app/zap-generated/PluginApplicationCallbacks.h @@ -22,6 +22,7 @@ #include #define MATTER_PLUGINS_INIT \ + MatterDescriptorPluginServerInitCallback(); \ MatterAccessControlPluginServerInitCallback(); \ MatterBasicPluginServerInitCallback(); \ MatterOtaSoftwareUpdateProviderPluginClientInitCallback(); \ diff --git a/zzz_generated/ota-requestor-app/zap-generated/access.h b/zzz_generated/ota-requestor-app/zap-generated/access.h index 9c0ec040c2e21e..f4bed206b84fdc 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/access.h +++ b/zzz_generated/ota-requestor-app/zap-generated/access.h @@ -147,6 +147,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -175,6 +176,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -203,6 +205,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp b/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp index b6c48d90d88d71..01b5df38040ce8 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp @@ -38,6 +38,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_BASIC_CLUSTER_ID: emberAfBasicClusterInitCallback(endpoint); break; + case ZCL_DESCRIPTOR_CLUSTER_ID: + emberAfDescriptorClusterInitCallback(endpoint); + break; case ZCL_FIXED_LABEL_CLUSTER_ID: emberAfFixedLabelClusterInitCallback(endpoint); break; @@ -92,6 +95,11 @@ void __attribute__((weak)) emberAfBasicClusterInitCallback(EndpointId endpoint) // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfDescriptorClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfFixedLabelClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h index 994afafedf90bc..38f6c3c4da182c 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h @@ -90,13 +90,21 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 107 +#define GENERATED_ATTRIBUTE_COUNT 119 #define GENERATED_ATTRIBUTES \ { \ \ - /* Endpoint: 0, Cluster: Access Control (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* ACL */ \ + /* Endpoint: 0, Cluster: Descriptor (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Access Control (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* ACL */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* Extension */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ @@ -237,7 +245,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ @@ -264,6 +272,14 @@ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ + /* Endpoint: 65534, Cluster: Descriptor (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ + \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Networks */ \ @@ -390,14 +406,25 @@ // clang-format on #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 15 +#define GENERATED_CLUSTER_COUNT 17 // clang-format off #define GENERATED_CLUSTERS { \ + { \ + /* Endpoint: 0, Cluster: Descriptor (server) */ \ + .clusterId = 0x0000001D, \ + .attributes = ZAP_ATTRIBUTE_INDEX(0), \ + .attributeCount = 6, \ + .clusterSize = 4, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ + },\ { \ /* Endpoint: 0, Cluster: Access Control (server) */ \ .clusterId = 0x0000001F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(0), \ + .attributes = ZAP_ATTRIBUTE_INDEX(6), \ .attributeCount = 7, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -408,7 +435,7 @@ { \ /* Endpoint: 0, Cluster: Basic (server) */ \ .clusterId = 0x00000028, \ - .attributes = ZAP_ATTRIBUTE_INDEX(7), \ + .attributes = ZAP_ATTRIBUTE_INDEX(13), \ .attributeCount = 22, \ .clusterSize = 41, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -419,7 +446,7 @@ { \ /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ .clusterId = 0x00000029, \ - .attributes = ZAP_ATTRIBUTE_INDEX(29), \ + .attributes = ZAP_ATTRIBUTE_INDEX(35), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -430,7 +457,7 @@ { \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ .clusterId = 0x0000002A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(29), \ + .attributes = ZAP_ATTRIBUTE_INDEX(35), \ .attributeCount = 6, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -441,7 +468,7 @@ { \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ .clusterId = 0x0000002B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(35), \ + .attributes = ZAP_ATTRIBUTE_INDEX(41), \ .attributeCount = 4, \ .clusterSize = 42, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -452,7 +479,7 @@ { \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ .clusterId = 0x0000002C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(39), \ + .attributes = ZAP_ATTRIBUTE_INDEX(45), \ .attributeCount = 5, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -463,7 +490,7 @@ { \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ .clusterId = 0x00000030, \ - .attributes = ZAP_ATTRIBUTE_INDEX(44), \ + .attributes = ZAP_ATTRIBUTE_INDEX(50), \ .attributeCount = 7, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -474,7 +501,7 @@ { \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(51), \ + .attributes = ZAP_ATTRIBUTE_INDEX(57), \ .attributeCount = 10, \ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -485,7 +512,7 @@ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ .clusterId = 0x00000033, \ - .attributes = ZAP_ATTRIBUTE_INDEX(61), \ + .attributes = ZAP_ATTRIBUTE_INDEX(67), \ .attributeCount = 11, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -496,7 +523,7 @@ { \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ .clusterId = 0x0000003C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(72), \ + .attributes = ZAP_ATTRIBUTE_INDEX(78), \ .attributeCount = 5, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -507,7 +534,7 @@ { \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ .clusterId = 0x0000003E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(77), \ + .attributes = ZAP_ATTRIBUTE_INDEX(83), \ .attributeCount = 8, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -518,7 +545,7 @@ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ .clusterId = 0x0000003F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(85), \ + .attributes = ZAP_ATTRIBUTE_INDEX(91), \ .attributeCount = 6, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -529,7 +556,7 @@ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(91), \ + .attributes = ZAP_ATTRIBUTE_INDEX(97), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -540,7 +567,7 @@ { \ /* Endpoint: 0, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(94), \ + .attributes = ZAP_ATTRIBUTE_INDEX(100), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -548,10 +575,21 @@ .acceptedCommandList = nullptr ,\ .generatedCommandList = nullptr ,\ },\ + { \ + /* Endpoint: 65534, Cluster: Descriptor (server) */ \ + .clusterId = 0x0000001D, \ + .attributes = ZAP_ATTRIBUTE_INDEX(103), \ + .attributeCount = 6, \ + .clusterSize = 4, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ + },\ { \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(97), \ + .attributes = ZAP_ATTRIBUTE_INDEX(109), \ .attributeCount = 10, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -565,12 +603,12 @@ #define ZAP_CLUSTER_INDEX(index) (&generatedClusters[index]) -#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 14 +#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 16 // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 14, 204 }, { ZAP_CLUSTER_INDEX(14), 1, 0 }, \ + { ZAP_CLUSTER_INDEX(0), 15, 208 }, { ZAP_CLUSTER_INDEX(15), 2, 4 }, \ } // Largest attribute size is needed for various buffers @@ -582,7 +620,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (37) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (204) +#define ATTRIBUTE_MAX_SIZE (212) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/ota-requestor-app/zap-generated/gen_config.h b/zzz_generated/ota-requestor-app/zap-generated/gen_config.h index 65bf0bbf4e8eea..d7c7ff1bd769cd 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/gen_config.h +++ b/zzz_generated/ota-requestor-app/zap-generated/gen_config.h @@ -29,6 +29,7 @@ #define EMBER_APS_UNICAST_MESSAGE_COUNT 10 /**** Cluster endpoint counts ****/ +#define EMBER_AF_DESCRIPTOR_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_ACCESS_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OTA_PROVIDER_CLUSTER_CLIENT_ENDPOINT_COUNT (1) @@ -46,6 +47,11 @@ /**** Cluster Plugins ****/ +// Use this macro to check if the server side of the Descriptor cluster is included +#define ZCL_USING_DESCRIPTOR_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_DESCRIPTOR_SERVER +#define EMBER_AF_PLUGIN_DESCRIPTOR + // Use this macro to check if the server side of the Access Control cluster is included #define ZCL_USING_ACCESS_CONTROL_CLUSTER_SERVER #define EMBER_AF_PLUGIN_ACCESS_CONTROL_SERVER diff --git a/zzz_generated/placeholder/app1/zap-generated/access.h b/zzz_generated/placeholder/app1/zap-generated/access.h index 7a0fd667d6e169..353b58b92b47b0 100644 --- a/zzz_generated/placeholder/app1/zap-generated/access.h +++ b/zzz_generated/placeholder/app1/zap-generated/access.h @@ -216,6 +216,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -249,6 +250,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -282,6 +284,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h index 05b8a96a61ccc6..a330207c12c11e 100644 --- a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h @@ -339,7 +339,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ @@ -531,7 +531,7 @@ \ /* Endpoint: 0, Cluster: Application Basic (server) */ \ { 0x00000000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* VendorID */ \ + { 0x00000001, ZAP_TYPE(VENDOR_ID), 2, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* VendorID */ \ { 0x00000002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* ApplicationName */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* ProductID */ \ { 0x00000004, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Application */ \ diff --git a/zzz_generated/placeholder/app2/zap-generated/access.h b/zzz_generated/placeholder/app2/zap-generated/access.h index 7a0fd667d6e169..353b58b92b47b0 100644 --- a/zzz_generated/placeholder/app2/zap-generated/access.h +++ b/zzz_generated/placeholder/app2/zap-generated/access.h @@ -216,6 +216,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -249,6 +250,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -282,6 +284,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h index 05b8a96a61ccc6..a330207c12c11e 100644 --- a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h @@ -339,7 +339,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ @@ -531,7 +531,7 @@ \ /* Endpoint: 0, Cluster: Application Basic (server) */ \ { 0x00000000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* VendorID */ \ + { 0x00000001, ZAP_TYPE(VENDOR_ID), 2, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* VendorID */ \ { 0x00000002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* ApplicationName */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* ProductID */ \ { 0x00000004, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Application */ \ diff --git a/zzz_generated/pump-app/zap-generated/access.h b/zzz_generated/pump-app/zap-generated/access.h index cb00d42d2991bd..b331312d7ffcee 100644 --- a/zzz_generated/pump-app/zap-generated/access.h +++ b/zzz_generated/pump-app/zap-generated/access.h @@ -159,6 +159,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -187,6 +188,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -215,6 +217,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/pump-app/zap-generated/endpoint_config.h b/zzz_generated/pump-app/zap-generated/endpoint_config.h index ff0d1d536a494e..c9df90c80df386 100644 --- a/zzz_generated/pump-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-app/zap-generated/endpoint_config.h @@ -242,7 +242,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ diff --git a/zzz_generated/pump-controller-app/zap-generated/access.h b/zzz_generated/pump-controller-app/zap-generated/access.h index 0e7132f5f2e050..83ef672d96b0ef 100644 --- a/zzz_generated/pump-controller-app/zap-generated/access.h +++ b/zzz_generated/pump-controller-app/zap-generated/access.h @@ -135,6 +135,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -163,6 +164,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -191,6 +193,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h index a4a1c7adea4635..90231ad7e23d4a 100644 --- a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h @@ -233,7 +233,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ diff --git a/zzz_generated/temperature-measurement-app/zap-generated/access.h b/zzz_generated/temperature-measurement-app/zap-generated/access.h index 7352d0fabcfd6b..36a6ccca0a66b7 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/access.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/access.h @@ -146,6 +146,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -173,6 +174,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -200,6 +202,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h index c4d0febde581c8..59f75101b8ceb3 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h @@ -298,7 +298,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ diff --git a/zzz_generated/thermostat/zap-generated/CHIPClusters.h b/zzz_generated/thermostat/zap-generated/CHIPClusters.h index e91d09cd512a65..508098f8d0ddbb 100644 --- a/zzz_generated/thermostat/zap-generated/CHIPClusters.h +++ b/zzz_generated/thermostat/zap-generated/CHIPClusters.h @@ -39,5 +39,15 @@ class DLL_EXPORT IdentifyCluster : public ClusterBase ~IdentifyCluster() {} }; +class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase +{ +public: + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} + ~OtaSoftwareUpdateProviderCluster() {} +}; + } // namespace Controller } // namespace chip diff --git a/zzz_generated/thermostat/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/thermostat/zap-generated/IMClusterCommandHandler.cpp index 3e268d6de55364..b78b0406165309 100644 --- a/zzz_generated/thermostat/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/thermostat/zap-generated/IMClusterCommandHandler.cpp @@ -432,7 +432,7 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace NetworkCommissioning -namespace OtaSoftwareUpdateProvider { +namespace OtaSoftwareUpdateRequestor { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) { @@ -441,32 +441,13 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP { switch (aCommandPath.mCommandId) { - case Commands::QueryImage::Id: { - Commands::QueryImage::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfOtaSoftwareUpdateProviderClusterQueryImageCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::ApplyUpdateRequest::Id: { - Commands::ApplyUpdateRequest::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = - emberAfOtaSoftwareUpdateProviderClusterApplyUpdateRequestCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::NotifyUpdateApplied::Id: { - Commands::NotifyUpdateApplied::DecodableType commandData; + case Commands::AnnounceOtaProvider::Id: { + Commands::AnnounceOtaProvider::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { wasHandled = - emberAfOtaSoftwareUpdateProviderClusterNotifyUpdateAppliedCallback(apCommandObj, aCommandPath, commandData); + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); } break; } @@ -487,7 +468,7 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } } -} // namespace OtaSoftwareUpdateProvider +} // namespace OtaSoftwareUpdateRequestor namespace OperationalCredentials { @@ -776,8 +757,8 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::NetworkCommissioning::Id: Clusters::NetworkCommissioning::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; - case Clusters::OtaSoftwareUpdateProvider::Id: - Clusters::OtaSoftwareUpdateProvider::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + case Clusters::OtaSoftwareUpdateRequestor::Id: + Clusters::OtaSoftwareUpdateRequestor::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; case Clusters::OperationalCredentials::Id: Clusters::OperationalCredentials::DispatchServerCommand(apCommandObj, aCommandPath, aReader); diff --git a/zzz_generated/thermostat/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/thermostat/zap-generated/PluginApplicationCallbacks.h index 2b513eb1c033c0..fc1f15a7696df2 100644 --- a/zzz_generated/thermostat/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/thermostat/zap-generated/PluginApplicationCallbacks.h @@ -30,7 +30,8 @@ MatterBindingPluginServerInitCallback(); \ MatterAccessControlPluginServerInitCallback(); \ MatterBasicPluginServerInitCallback(); \ - MatterOtaSoftwareUpdateProviderPluginServerInitCallback(); \ + MatterOtaSoftwareUpdateProviderPluginClientInitCallback(); \ + MatterOtaSoftwareUpdateRequestorPluginServerInitCallback(); \ MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterTimeFormatLocalizationPluginServerInitCallback(); \ MatterUnitLocalizationPluginServerInitCallback(); \ diff --git a/zzz_generated/thermostat/zap-generated/access.h b/zzz_generated/thermostat/zap-generated/access.h index c9c4bde0a670c5..f9476998d89adc 100644 --- a/zzz_generated/thermostat/zap-generated/access.h +++ b/zzz_generated/thermostat/zap-generated/access.h @@ -198,6 +198,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -233,6 +234,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -268,6 +270,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/thermostat/zap-generated/callback-stub.cpp b/zzz_generated/thermostat/zap-generated/callback-stub.cpp index bbce02b0dbd3a7..46ed91ffbe0fef 100644 --- a/zzz_generated/thermostat/zap-generated/callback-stub.cpp +++ b/zzz_generated/thermostat/zap-generated/callback-stub.cpp @@ -77,6 +77,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_OTA_PROVIDER_CLUSTER_ID: emberAfOtaSoftwareUpdateProviderClusterInitCallback(endpoint); break; + case ZCL_OTA_REQUESTOR_CLUSTER_ID: + emberAfOtaSoftwareUpdateRequestorClusterInitCallback(endpoint); + break; case ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID: emberAfOperationalCredentialsClusterInitCallback(endpoint); break; @@ -190,6 +193,11 @@ void __attribute__((weak)) emberAfOtaSoftwareUpdateProviderClusterInitCallback(E // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfOtaSoftwareUpdateRequestorClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfOperationalCredentialsClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/thermostat/zap-generated/endpoint_config.h b/zzz_generated/thermostat/zap-generated/endpoint_config.h index 9a7871ad6eaeb8..91d39ce61dd167 100644 --- a/zzz_generated/thermostat/zap-generated/endpoint_config.h +++ b/zzz_generated/thermostat/zap-generated/endpoint_config.h @@ -104,7 +104,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 260 +#define GENERATED_ATTRIBUTE_COUNT 264 #define GENERATED_ATTRIBUTES \ { \ \ @@ -186,9 +186,14 @@ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ - /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { 0x00000000, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -430,7 +435,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ @@ -588,29 +593,23 @@ /* AcceptedCommandList (index=0) */ \ 0x00000000 /* Identify */, \ chip::kInvalidCommandId /* end of list */, \ - /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */\ + /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* AcceptedCommandList (index=2) */ \ - 0x00000000 /* QueryImage */, \ - 0x00000002 /* ApplyUpdateRequest */, \ - 0x00000004 /* NotifyUpdateApplied */, \ - chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=6)*/ \ - 0x00000001 /* QueryImageResponse */, \ - 0x00000003 /* ApplyUpdateResponse */, \ + 0x00000000 /* AnnounceOtaProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ - /* AcceptedCommandList (index=9) */ \ + /* AcceptedCommandList (index=4) */ \ 0x00000000 /* ArmFailSafe */, \ 0x00000002 /* SetRegulatoryConfig */, \ 0x00000004 /* CommissioningComplete */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=13)*/ \ + /* GeneratedCommandList (index=8)*/ \ 0x00000001 /* ArmFailSafeResponse */, \ 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000005 /* CommissioningCompleteResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Network Commissioning (server) */\ - /* AcceptedCommandList (index=17) */ \ + /* AcceptedCommandList (index=12) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -618,30 +617,30 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=24)*/ \ + /* GeneratedCommandList (index=19)*/ \ 0x00000001 /* ScanNetworksResponse */, \ 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */\ - /* AcceptedCommandList (index=28) */ \ + /* AcceptedCommandList (index=23) */ \ 0x00000000 /* RetrieveLogsRequest */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=30)*/ \ + /* GeneratedCommandList (index=25)*/ \ 0x00000001 /* RetrieveLogsResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Diagnostics (server) */\ - /* AcceptedCommandList (index=32) */ \ + /* AcceptedCommandList (index=27) */ \ 0x00000000 /* TestEventTrigger */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */\ - /* AcceptedCommandList (index=34) */ \ + /* AcceptedCommandList (index=29) */ \ 0x00000000 /* OpenCommissioningWindow */, \ 0x00000001 /* OpenBasicCommissioningWindow */, \ 0x00000002 /* RevokeCommissioning */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* AcceptedCommandList (index=38) */ \ + /* AcceptedCommandList (index=33) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -651,18 +650,18 @@ 0x0000000A /* RemoveFabric */, \ 0x0000000B /* AddTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=47)*/ \ + /* GeneratedCommandList (index=42)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ 0x00000008 /* NOCResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Identify (server) */\ - /* AcceptedCommandList (index=52) */ \ + /* AcceptedCommandList (index=47) */ \ 0x00000000 /* Identify */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Groups (server) */\ - /* AcceptedCommandList (index=54) */ \ + /* AcceptedCommandList (index=49) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -670,14 +669,14 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=61)*/ \ + /* GeneratedCommandList (index=56)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Scenes (server) */\ - /* AcceptedCommandList (index=66) */ \ + /* AcceptedCommandList (index=61) */ \ 0x00000000 /* AddScene */, \ 0x00000001 /* ViewScene */, \ 0x00000002 /* RemoveScene */, \ @@ -686,7 +685,7 @@ 0x00000005 /* RecallScene */, \ 0x00000006 /* GetSceneMembership */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=74)*/ \ + /* GeneratedCommandList (index=69)*/ \ 0x00000000 /* AddSceneResponse */, \ 0x00000001 /* ViewSceneResponse */, \ 0x00000002 /* RemoveSceneResponse */, \ @@ -695,13 +694,13 @@ 0x00000006 /* GetSceneMembershipResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Thermostat (server) */\ - /* AcceptedCommandList (index=81) */ \ + /* AcceptedCommandList (index=76) */ \ 0x00000000 /* SetpointRaiseLower */, \ 0x00000001 /* SetWeeklySchedule */, \ 0x00000002 /* GetWeeklySchedule */, \ 0x00000003 /* ClearWeeklySchedule */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=86)*/ \ + /* GeneratedCommandList (index=81)*/ \ 0x00000000 /* GetWeeklyScheduleResponse */, \ chip::kInvalidCommandId /* end of list */, \ } @@ -709,7 +708,7 @@ // clang-format on #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 28 +#define GENERATED_CLUSTER_COUNT 29 // clang-format off #define GENERATED_CLUSTERS { \ @@ -769,20 +768,31 @@ .generatedCommandList = nullptr ,\ },\ { \ - /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ + /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ .clusterId = 0x00000029, \ .attributes = ZAP_ATTRIBUTE_INDEX(41), \ - .attributeCount = 2, \ - .clusterSize = 6, \ + .attributeCount = 0, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(CLIENT), \ + .functions = NULL, \ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ + },\ + { \ + /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ + .clusterId = 0x0000002A, \ + .attributes = ZAP_ATTRIBUTE_INDEX(41), \ + .attributeCount = 6, \ + .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 2 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 6 ) ,\ + .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ .clusterId = 0x0000002B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(43), \ + .attributes = ZAP_ATTRIBUTE_INDEX(47), \ .attributeCount = 4, \ .clusterSize = 42, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -793,7 +803,7 @@ { \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ .clusterId = 0x0000002C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(47), \ + .attributes = ZAP_ATTRIBUTE_INDEX(51), \ .attributeCount = 5, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -804,7 +814,7 @@ { \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ .clusterId = 0x0000002D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(52), \ + .attributes = ZAP_ATTRIBUTE_INDEX(56), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -815,51 +825,51 @@ { \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ .clusterId = 0x00000030, \ - .attributes = ZAP_ATTRIBUTE_INDEX(55), \ + .attributes = ZAP_ATTRIBUTE_INDEX(59), \ .attributeCount = 7, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 9 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 13 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 4 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 8 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(62), \ + .attributes = ZAP_ATTRIBUTE_INDEX(66), \ .attributeCount = 10, \ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 17 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 24 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 12 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 19 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ .clusterId = 0x00000032, \ - .attributes = ZAP_ATTRIBUTE_INDEX(72), \ + .attributes = ZAP_ATTRIBUTE_INDEX(76), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 28 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 30 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 23 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 25 ) ,\ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ .clusterId = 0x00000033, \ - .attributes = ZAP_ATTRIBUTE_INDEX(74), \ + .attributes = ZAP_ATTRIBUTE_INDEX(78), \ .attributeCount = 11, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 32 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 27 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ .clusterId = 0x00000034, \ - .attributes = ZAP_ATTRIBUTE_INDEX(85), \ + .attributes = ZAP_ATTRIBUTE_INDEX(89), \ .attributeCount = 6, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -870,7 +880,7 @@ { \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ .clusterId = 0x00000035, \ - .attributes = ZAP_ATTRIBUTE_INDEX(91), \ + .attributes = ZAP_ATTRIBUTE_INDEX(95), \ .attributeCount = 65, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -881,7 +891,7 @@ { \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ .clusterId = 0x00000036, \ - .attributes = ZAP_ATTRIBUTE_INDEX(156), \ + .attributes = ZAP_ATTRIBUTE_INDEX(160), \ .attributeCount = 15, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -892,7 +902,7 @@ { \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ .clusterId = 0x00000037, \ - .attributes = ZAP_ATTRIBUTE_INDEX(171), \ + .attributes = ZAP_ATTRIBUTE_INDEX(175), \ .attributeCount = 11, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -903,29 +913,29 @@ { \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ .clusterId = 0x0000003C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(182), \ + .attributes = ZAP_ATTRIBUTE_INDEX(186), \ .attributeCount = 5, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 34 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 29 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ .clusterId = 0x0000003E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(187), \ + .attributes = ZAP_ATTRIBUTE_INDEX(191), \ .attributeCount = 8, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 38 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 47 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 33 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 42 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ .clusterId = 0x0000003F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(195), \ + .attributes = ZAP_ATTRIBUTE_INDEX(199), \ .attributeCount = 4, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -936,7 +946,7 @@ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(199), \ + .attributes = ZAP_ATTRIBUTE_INDEX(203), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -947,7 +957,7 @@ { \ /* Endpoint: 0, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(202), \ + .attributes = ZAP_ATTRIBUTE_INDEX(206), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -958,7 +968,7 @@ { \ /* Endpoint: 1, Cluster: Identify (client) */ \ .clusterId = 0x00000003, \ - .attributes = ZAP_ATTRIBUTE_INDEX(205), \ + .attributes = ZAP_ATTRIBUTE_INDEX(209), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -969,40 +979,40 @@ { \ /* Endpoint: 1, Cluster: Identify (server) */ \ .clusterId = 0x00000003, \ - .attributes = ZAP_ATTRIBUTE_INDEX(205), \ + .attributes = ZAP_ATTRIBUTE_INDEX(209), \ .attributeCount = 4, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 52 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 47 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(209), \ + .attributes = ZAP_ATTRIBUTE_INDEX(213), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 54 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 61 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 49 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 56 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Scenes (server) */ \ .clusterId = 0x00000005, \ - .attributes = ZAP_ATTRIBUTE_INDEX(212), \ + .attributes = ZAP_ATTRIBUTE_INDEX(216), \ .attributeCount = 7, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayScenesServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 66 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 74 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 61 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 69 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Basic (server) */ \ .clusterId = 0x00000028, \ - .attributes = ZAP_ATTRIBUTE_INDEX(219), \ + .attributes = ZAP_ATTRIBUTE_INDEX(223), \ .attributeCount = 22, \ .clusterSize = 41, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1013,13 +1023,13 @@ { \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ .clusterId = 0x00000201, \ - .attributes = ZAP_ATTRIBUTE_INDEX(241), \ + .attributes = ZAP_ATTRIBUTE_INDEX(245), \ .attributeCount = 19, \ .clusterSize = 34, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayThermostatServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 81 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 86 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 76 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 81 ) ,\ },\ } @@ -1032,7 +1042,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 22, 256 }, { ZAP_CLUSTER_INDEX(22), 6, 103 }, \ + { ZAP_CLUSTER_INDEX(0), 23, 259 }, { ZAP_CLUSTER_INDEX(23), 6, 103 }, \ } // Largest attribute size is needed for various buffers @@ -1044,7 +1054,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (74) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (359) +#define ATTRIBUTE_MAX_SIZE (362) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/thermostat/zap-generated/gen_config.h b/zzz_generated/thermostat/zap-generated/gen_config.h index 7313ea3a5b143b..35f4e7dd8ef7de 100644 --- a/zzz_generated/thermostat/zap-generated/gen_config.h +++ b/zzz_generated/thermostat/zap-generated/gen_config.h @@ -37,7 +37,8 @@ #define EMBER_AF_BINDING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_ACCESS_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (2) -#define EMBER_AF_OTA_PROVIDER_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_OTA_PROVIDER_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_OTA_REQUESTOR_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_TIME_FORMAT_LOCALIZATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_UNIT_LOCALIZATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -109,10 +110,14 @@ #define EMBER_AF_PLUGIN_BASIC_SERVER #define EMBER_AF_PLUGIN_BASIC -// Use this macro to check if the server side of the OTA Software Update Provider cluster is included -#define ZCL_USING_OTA_PROVIDER_CLUSTER_SERVER -#define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_PROVIDER_SERVER -#define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_PROVIDER +// Use this macro to check if the client side of the OTA Software Update Provider cluster is included +#define ZCL_USING_OTA_PROVIDER_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_PROVIDER_CLIENT + +// Use this macro to check if the server side of the OTA Software Update Requestor cluster is included +#define ZCL_USING_OTA_REQUESTOR_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_REQUESTOR_SERVER +#define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_REQUESTOR // Use this macro to check if the server side of the Localization Configuration cluster is included #define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER diff --git a/zzz_generated/tv-app/zap-generated/access.h b/zzz_generated/tv-app/zap-generated/access.h index c1e184f84b7d29..d788c99f8e9e41 100644 --- a/zzz_generated/tv-app/zap-generated/access.h +++ b/zzz_generated/tv-app/zap-generated/access.h @@ -153,6 +153,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -181,6 +182,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -209,6 +211,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/tv-app/zap-generated/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index c1abffc5229436..5462e18f473393 100644 --- a/zzz_generated/tv-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-app/zap-generated/endpoint_config.h @@ -470,7 +470,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ @@ -669,7 +669,7 @@ \ /* Endpoint: 3, Cluster: Application Basic (server) */ \ { 0x00000000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000001, ZAP_TYPE(VENDOR_ID), 2, 0, ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ { 0x00000002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* ApplicationName */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* ProductID */ \ { 0x00000004, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Application */ \ diff --git a/zzz_generated/tv-casting-app/zap-generated/access.h b/zzz_generated/tv-casting-app/zap-generated/access.h index 7400a0c2b814f7..5dc37fc3b8884f 100644 --- a/zzz_generated/tv-casting-app/zap-generated/access.h +++ b/zzz_generated/tv-casting-app/zap-generated/access.h @@ -168,6 +168,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -205,6 +206,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -242,6 +244,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index 39b8327c8f5b6b..a759b637dcc58c 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -423,7 +423,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ diff --git a/zzz_generated/window-app/zap-generated/access.h b/zzz_generated/window-app/zap-generated/access.h index c3b402fab457a8..39fc7d6cd53948 100644 --- a/zzz_generated/window-app/zap-generated/access.h +++ b/zzz_generated/window-app/zap-generated/access.h @@ -163,6 +163,7 @@ 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -201,6 +202,7 @@ 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -239,6 +241,7 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ diff --git a/zzz_generated/window-app/zap-generated/endpoint_config.h b/zzz_generated/window-app/zap-generated/endpoint_config.h index cb93f93990c34b..a8c2c986a64f1a 100644 --- a/zzz_generated/window-app/zap-generated/endpoint_config.h +++ b/zzz_generated/window-app/zap-generated/endpoint_config.h @@ -419,7 +419,7 @@ ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x00000005, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \