From db0b93ec817e31f4c1bf8ac02b99b34677293271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kr=C3=B3lik?= <66667989+Damian-Nordic@users.noreply.github.com> Date: Thu, 17 Aug 2023 00:55:53 +0200 Subject: [PATCH 01/15] [nrf fromtree][zephyr] Run shell commands in Matter thread (#28623) 1. Run Matter shell commands in Matter thread instead of Zephyr's shell thread. Make the shell thread wait for the condition variable signalled when the command ends in the Matter thread. This is done to avoid data races when accessing Matter's data structures, and avoid stack overflow when executing Matter functions in the shell thread that uses a relatively small stack. 2. Print either: - "Done" or - "Error: " after each shell command. This is to align with other platforms and be able to remove unnecessary logging from existing shell command implementations. Signed-off-by: Damian Krolik --- src/lib/shell/MainLoopZephyr.cpp | 87 +++++++++++++++++++++++++++----- 1 file changed, 75 insertions(+), 12 deletions(-) diff --git a/src/lib/shell/MainLoopZephyr.cpp b/src/lib/shell/MainLoopZephyr.cpp index d106bfa89f..84fca4ef9d 100644 --- a/src/lib/shell/MainLoopZephyr.cpp +++ b/src/lib/shell/MainLoopZephyr.cpp @@ -14,37 +14,100 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include -#include - #include #include +#include #include +#include + +#include +#include +#include + +using namespace chip; +using namespace chip::DeviceLayer; + +namespace { + +K_MUTEX_DEFINE(sShellMutex); +K_CONDVAR_DEFINE(sCommandResultCondVar); +CHIP_ERROR sCommandResult; + +// RAII helper for synchronizing access to resources shared between the Zephyr's shell thread, +// which reads and parses the user input, and the the Matter thread, which executes a Matter +// shell command and reports the result back to the shell thread. +class ShellGuard +{ +public: + ShellGuard() { k_mutex_lock(&sShellMutex, K_FOREVER); } + ~ShellGuard() { k_mutex_unlock(&sShellMutex); } -using chip::Shell::Engine; + CHIP_ERROR WaitForCommandResult() + { + k_condvar_wait(&sCommandResultCondVar, &sShellMutex, K_FOREVER); + return sCommandResult; + } -static int cmd_matter(const struct shell * shell, size_t argc, char ** argv) + void PutCommandResult(CHIP_ERROR error) + { + sCommandResult = error; + k_condvar_signal(&sCommandResultCondVar); + } +}; + +void ExecCommandInMatterThread(intptr_t argvAsInt) { - chip::Shell::streamer_set_shell(shell); - return (Engine::Root().ExecCommand(argc - 1, argv + 1) == CHIP_NO_ERROR) ? 0 : -ENOEXEC; + char ** argv = reinterpret_cast(argvAsInt); + int argc = 0; + + while (argv[argc] != nullptr) + { + argc++; + } + + ShellGuard shellGuard; + shellGuard.PutCommandResult(Shell::Engine::Root().ExecCommand(argc, argv)); } -static int RegisterCommands() +int ExecCommandInShellThread(const struct shell * shell, size_t argc, char ** argv) { - Engine::Root().RegisterDefaultCommands(); + const CHIP_ERROR error = [shell, argv]() -> CHIP_ERROR { + ShellGuard shellGuard; + Shell::streamer_set_shell(shell); + ReturnErrorOnFailure(PlatformMgr().ScheduleWork(ExecCommandInMatterThread, reinterpret_cast(argv + 1))); + + return shellGuard.WaitForCommandResult(); + }(); + + if (error != CHIP_NO_ERROR) + { + Shell::streamer_printf(Shell::streamer_get(), "Error: %" CHIP_ERROR_FORMAT "\r\n", error.Format()); + } + else + { + Shell::streamer_printf(Shell::streamer_get(), "Done\r\n"); + } + + return error == CHIP_NO_ERROR ? 0 : -ENOEXEC; +} + +int RegisterCommands() +{ + Shell::Engine::Root().RegisterDefaultCommands(); return 0; } -SYS_INIT(RegisterCommands, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); +} // namespace -SHELL_CMD_ARG_REGISTER(matter, NULL, "Matter commands", cmd_matter, 1, 10); +SYS_INIT(RegisterCommands, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); +SHELL_CMD_ARG_REGISTER(matter, NULL, "Matter commands", ExecCommandInShellThread, 1, CHIP_SHELL_MAX_TOKENS); namespace chip { namespace Shell { void Engine::RunMainLoop() { - // Intentionally empty as Zephyr has own thread handling shell + // Intentionally empty as Zephyr has its own thread handling shell. } } // namespace Shell From d184b78d583bbca08946428f6376944286b894ea Mon Sep 17 00:00:00 2001 From: Marcin Kajor Date: Wed, 4 Oct 2023 09:16:23 +0200 Subject: [PATCH 02/15] [nrf fromtree] Optimize compilation time (#27228) * Optimize compilation time 1. Do not to include cluster-objects.h if not needed as parsing such a large header significantly impacts the build time and in most cases it is enough to include ClusterEnums.h. 2. Do not build the controller library for embedded targets, by default. If needed, this can be overriden using the chip_build_controller argument from lib.gni. * Fix build --- .../nxp/k32w/k32w0/main/ZclCallbacks.cpp | 1 + examples/platform/silabs/efr32/BUILD.gn | 1 + .../App/app/src/main/jni/cpp/MatterCallbackHandler-JNI.h | 2 ++ .../tv-casting-common/include/ApplicationBasic.h | 2 ++ .../tv-casting-common/include/ApplicationLauncher.h | 2 ++ .../tv-casting-app/tv-casting-common/include/Channel.h | 2 ++ .../tv-casting-common/include/ContentLauncher.h | 2 ++ .../tv-casting-app/tv-casting-common/include/KeypadInput.h | 2 ++ .../tv-casting-common/include/LevelControl.h | 2 ++ .../tv-casting-common/include/MediaPlayback.h | 2 ++ examples/tv-casting-app/tv-casting-common/include/OnOff.h | 2 ++ .../tv-casting-common/include/TargetNavigator.h | 2 ++ .../tv-casting-common/include/TargetVideoPlayerInfo.h | 2 ++ src/app/chip_data_model.cmake | 6 ++++-- src/app/server/CommissioningWindowManager.h | 2 +- src/app/util/generic-callbacks.h | 1 - src/controller/CommissioningDelegate.h | 1 + src/credentials/GroupDataProvider.h | 2 +- src/include/platform/AttributeList.h | 2 +- src/include/platform/ConfigurationManager.h | 2 +- src/include/platform/ConnectivityManager.h | 1 - src/include/platform/ThreadStackManager.h | 1 - src/lib/BUILD.gn | 7 ++++++- src/lib/lib.gni | 6 ++++++ src/platform/Linux/ThreadStackManagerImpl.cpp | 2 ++ src/platform/webos/ThreadStackManagerImpl.cpp | 2 ++ src/protocols/secure_channel/CASEDestinationId.cpp | 1 + 27 files changed, 50 insertions(+), 10 deletions(-) diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/main/ZclCallbacks.cpp b/examples/contact-sensor-app/nxp/k32w/k32w0/main/ZclCallbacks.cpp index 4664a02404..fafcb37290 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/main/ZclCallbacks.cpp +++ b/examples/contact-sensor-app/nxp/k32w/k32w0/main/ZclCallbacks.cpp @@ -21,6 +21,7 @@ #include "AppTask.h" #include "ContactSensorManager.h" +#include #include #include #include diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn index d74792a1cb..4a144ae2f0 100644 --- a/examples/platform/silabs/efr32/BUILD.gn +++ b/examples/platform/silabs/efr32/BUILD.gn @@ -360,6 +360,7 @@ source_set("efr32-common") { public_deps += [ "${chip_root}/examples/providers:device_info_provider", + "${chip_root}/src/app/server", "${chip_root}/src/lib", "${chip_root}/src/setup_payload", ] diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/MatterCallbackHandler-JNI.h b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/MatterCallbackHandler-JNI.h index b37b9ec12e..9674f2a440 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/MatterCallbackHandler-JNI.h +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/MatterCallbackHandler-JNI.h @@ -28,6 +28,8 @@ #include #include +#include + class CallbackBaseJNI { public: diff --git a/examples/tv-casting-app/tv-casting-common/include/ApplicationBasic.h b/examples/tv-casting-app/tv-casting-common/include/ApplicationBasic.h index ec009de429..d1801350fe 100644 --- a/examples/tv-casting-app/tv-casting-common/include/ApplicationBasic.h +++ b/examples/tv-casting-app/tv-casting-common/include/ApplicationBasic.h @@ -21,6 +21,8 @@ #include +#include + // SUBSCRIBER CLASSES class VendorNameSubscriber : public MediaSubscriptionBase { diff --git a/examples/tv-casting-app/tv-casting-common/include/ApplicationLauncher.h b/examples/tv-casting-app/tv-casting-common/include/ApplicationLauncher.h index a6c95c0c69..51035a4a74 100644 --- a/examples/tv-casting-app/tv-casting-common/include/ApplicationLauncher.h +++ b/examples/tv-casting-app/tv-casting-common/include/ApplicationLauncher.h @@ -22,6 +22,8 @@ #include #include +#include + // COMMAND CLASSES class LaunchAppCommand : public MediaCommandBase #include +#include + // COMMAND CLASSES class ChangeChannelCommand : public MediaCommandBase diff --git a/examples/tv-casting-app/tv-casting-common/include/ContentLauncher.h b/examples/tv-casting-app/tv-casting-common/include/ContentLauncher.h index 72f331d88f..884a8d9ef6 100644 --- a/examples/tv-casting-app/tv-casting-common/include/ContentLauncher.h +++ b/examples/tv-casting-app/tv-casting-common/include/ContentLauncher.h @@ -22,6 +22,8 @@ #include #include +#include + // COMMAND CLASSES class LaunchURLCommand : public MediaCommandBase diff --git a/examples/tv-casting-app/tv-casting-common/include/KeypadInput.h b/examples/tv-casting-app/tv-casting-common/include/KeypadInput.h index 432413c012..599f0ca1f3 100644 --- a/examples/tv-casting-app/tv-casting-common/include/KeypadInput.h +++ b/examples/tv-casting-app/tv-casting-common/include/KeypadInput.h @@ -21,6 +21,8 @@ #include #include +#include + class SendKeyCommand : public MediaCommandBase { diff --git a/examples/tv-casting-app/tv-casting-common/include/LevelControl.h b/examples/tv-casting-app/tv-casting-common/include/LevelControl.h index 01c07f2ca0..855909adc5 100644 --- a/examples/tv-casting-app/tv-casting-common/include/LevelControl.h +++ b/examples/tv-casting-app/tv-casting-common/include/LevelControl.h @@ -22,6 +22,8 @@ #include #include +#include + // COMMAND CLASSES class StepCommand : public MediaCommandBase diff --git a/examples/tv-casting-app/tv-casting-common/include/MediaPlayback.h b/examples/tv-casting-app/tv-casting-common/include/MediaPlayback.h index 149ed2e6af..a6769431d9 100644 --- a/examples/tv-casting-app/tv-casting-common/include/MediaPlayback.h +++ b/examples/tv-casting-app/tv-casting-common/include/MediaPlayback.h @@ -22,6 +22,8 @@ #include #include +#include + // COMMAND CLASSES class PlayCommand : public MediaCommandBase diff --git a/examples/tv-casting-app/tv-casting-common/include/OnOff.h b/examples/tv-casting-app/tv-casting-common/include/OnOff.h index f368add09d..2b32a08bf4 100644 --- a/examples/tv-casting-app/tv-casting-common/include/OnOff.h +++ b/examples/tv-casting-app/tv-casting-common/include/OnOff.h @@ -22,6 +22,8 @@ #include #include +#include + // COMMAND CLASSES class OnCommand : public MediaCommandBase { diff --git a/examples/tv-casting-app/tv-casting-common/include/TargetNavigator.h b/examples/tv-casting-app/tv-casting-common/include/TargetNavigator.h index b42d1685b1..3a30605a16 100644 --- a/examples/tv-casting-app/tv-casting-common/include/TargetNavigator.h +++ b/examples/tv-casting-app/tv-casting-common/include/TargetNavigator.h @@ -22,6 +22,8 @@ #include #include +#include + // COMMAND CLASSES class NavigateTargetCommand : public MediaCommandBase #include +#include + constexpr size_t kMaxNumberOfEndpoints = 5; class TargetVideoPlayerInfo; diff --git a/src/app/chip_data_model.cmake b/src/app/chip_data_model.cmake index 589871610b..5121229695 100644 --- a/src/app/chip_data_model.cmake +++ b/src/app/chip_data_model.cmake @@ -73,11 +73,13 @@ function(chip_configure_data_model APP_TARGET) if (ARG_INCLUDE_SERVER) target_sources(${APP_TARGET} ${SCOPE} - ${CHIP_APP_BASE_DIR}/server/EchoHandler.cpp + ${CHIP_APP_BASE_DIR}/server/AclStorage.cpp + ${CHIP_APP_BASE_DIR}/server/DefaultAclStorage.cpp + ${CHIP_APP_BASE_DIR}/server/CommissioningWindowManager.cpp ${CHIP_APP_BASE_DIR}/server/Dnssd.cpp + ${CHIP_APP_BASE_DIR}/server/EchoHandler.cpp ${CHIP_APP_BASE_DIR}/server/OnboardingCodesUtil.cpp ${CHIP_APP_BASE_DIR}/server/Server.cpp - ${CHIP_APP_BASE_DIR}/server/CommissioningWindowManager.cpp ) target_compile_options(${APP_TARGET} ${SCOPE} diff --git a/src/app/server/CommissioningWindowManager.h b/src/app/server/CommissioningWindowManager.h index 070a86a668..1fabd26bd6 100644 --- a/src/app/server/CommissioningWindowManager.h +++ b/src/app/server/CommissioningWindowManager.h @@ -17,11 +17,11 @@ #pragma once -#include #include #include #include #include +#include #include #include #include diff --git a/src/app/util/generic-callbacks.h b/src/app/util/generic-callbacks.h index 036241acfa..4b46c64511 100644 --- a/src/app/util/generic-callbacks.h +++ b/src/app/util/generic-callbacks.h @@ -17,7 +17,6 @@ #pragma once -#include #include #include #include diff --git a/src/controller/CommissioningDelegate.h b/src/controller/CommissioningDelegate.h index d34f8fff23..9050779528 100644 --- a/src/controller/CommissioningDelegate.h +++ b/src/controller/CommissioningDelegate.h @@ -17,6 +17,7 @@ */ #pragma once +#include #include #include #include diff --git a/src/credentials/GroupDataProvider.h b/src/credentials/GroupDataProvider.h index ca599296f6..7d0665ce2f 100644 --- a/src/credentials/GroupDataProvider.h +++ b/src/credentials/GroupDataProvider.h @@ -20,10 +20,10 @@ #include #include -#include #include #include #include +#include #include #include diff --git a/src/include/platform/AttributeList.h b/src/include/platform/AttributeList.h index 07f9550c8a..f974887d2b 100644 --- a/src/include/platform/AttributeList.h +++ b/src/include/platform/AttributeList.h @@ -22,8 +22,8 @@ #pragma once -#include #include +#include namespace chip { namespace DeviceLayer { diff --git a/src/include/platform/ConfigurationManager.h b/src/include/platform/ConfigurationManager.h index 8da89c2223..63f886f802 100644 --- a/src/include/platform/ConfigurationManager.h +++ b/src/include/platform/ConfigurationManager.h @@ -31,7 +31,7 @@ #include #endif -#include +#include #include #include #include diff --git a/src/include/platform/ConnectivityManager.h b/src/include/platform/ConnectivityManager.h index a59217a69a..fa104a68e0 100755 --- a/src/include/platform/ConnectivityManager.h +++ b/src/include/platform/ConnectivityManager.h @@ -31,7 +31,6 @@ #include #include -#include #include #if INET_CONFIG_ENABLE_TCP_ENDPOINT diff --git a/src/include/platform/ThreadStackManager.h b/src/include/platform/ThreadStackManager.h index 137ac5d0d5..b3fc19dc54 100755 --- a/src/include/platform/ThreadStackManager.h +++ b/src/include/platform/ThreadStackManager.h @@ -23,7 +23,6 @@ #pragma once -#include #include #include #include diff --git a/src/lib/BUILD.gn b/src/lib/BUILD.gn index e7fdd0a071..1e04c83774 100644 --- a/src/lib/BUILD.gn +++ b/src/lib/BUILD.gn @@ -19,7 +19,6 @@ static_library("lib") { public_deps = [ "${chip_root}/src/app", "${chip_root}/src/ble", - "${chip_root}/src/controller", "${chip_root}/src/crypto", "${chip_root}/src/inet", "${chip_root}/src/lib/asn1", @@ -28,11 +27,17 @@ static_library("lib") { "${chip_root}/src/lib/support", "${chip_root}/src/messaging", "${chip_root}/src/platform", + "${chip_root}/src/protocols", "${chip_root}/src/setup_payload", "${chip_root}/src/system", "${chip_root}/src/transport", ] + # See src/lib/lib.gni for declaration of this build arg. + if (chip_build_controller) { + public_deps += [ "${chip_root}/src/controller" ] + } + # Only include the shell if it is being used. The shell is # a debug feature mostly useful for embedded examples. # See src/lib/lib.gni for declaration of this build arg. diff --git a/src/lib/lib.gni b/src/lib/lib.gni index 213592c274..bad9c37245 100644 --- a/src/lib/lib.gni +++ b/src/lib/lib.gni @@ -12,7 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. +import("//build_overrides/chip.gni") +import("${chip_root}/src/lib/core/core.gni") + declare_args() { + # Build controller library. + chip_build_controller = chip_target_style != "embedded" + # Enable libshell support. chip_build_libshell = false diff --git a/src/platform/Linux/ThreadStackManagerImpl.cpp b/src/platform/Linux/ThreadStackManagerImpl.cpp index 9b27f7d6c6..8994111e46 100755 --- a/src/platform/Linux/ThreadStackManagerImpl.cpp +++ b/src/platform/Linux/ThreadStackManagerImpl.cpp @@ -25,6 +25,8 @@ #include #include +#include + #include #include #include diff --git a/src/platform/webos/ThreadStackManagerImpl.cpp b/src/platform/webos/ThreadStackManagerImpl.cpp index eba2d0d903..3e5e2c6e8e 100644 --- a/src/platform/webos/ThreadStackManagerImpl.cpp +++ b/src/platform/webos/ThreadStackManagerImpl.cpp @@ -25,6 +25,8 @@ #include #include +#include + #include #include #include diff --git a/src/protocols/secure_channel/CASEDestinationId.cpp b/src/protocols/secure_channel/CASEDestinationId.cpp index 17eac22b14..538bda9cb0 100644 --- a/src/protocols/secure_channel/CASEDestinationId.cpp +++ b/src/protocols/secure_channel/CASEDestinationId.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include "CASEDestinationId.h" From c7855b40d9c1b81b557a0b865842a7da5fe2ea73 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 11 May 2023 19:57:17 -0400 Subject: [PATCH 03/15] [nrf fromtree] Move the "ignore certificate validity dates" policy out of Server.h. (#26519) This makes it easier to use for clients that don't have reliable wall-clock time. --- examples/platform/nxp/se05x/linux/AppMain.cpp | 2 +- src/app/server/Server.cpp | 2 +- src/app/server/Server.h | 38 +------------------ src/credentials/CertificateValidityPolicy.h | 34 +++++++++++++++++ 4 files changed, 37 insertions(+), 39 deletions(-) diff --git a/examples/platform/nxp/se05x/linux/AppMain.cpp b/examples/platform/nxp/se05x/linux/AppMain.cpp index 2f38e784dd..1ecf805210 100644 --- a/examples/platform/nxp/se05x/linux/AppMain.cpp +++ b/examples/platform/nxp/se05x/linux/AppMain.cpp @@ -299,7 +299,7 @@ struct CommonCaseDeviceServerInitParams_Se05x : public CommonCaseDeviceServerIni static chip::PersistentStorageOperationalKeystoreHSM sPersistentStorageOperationalKeystore; static chip::Credentials::PersistentStorageOpCertStore sPersistentStorageOpCertStore; static chip::Credentials::GroupDataProviderImpl sGroupDataProvider; - static IgnoreCertificateValidityPolicy sDefaultCertValidityPolicy; + static Credentials::IgnoreCertificateValidityPeriodPolicy sDefaultCertValidityPolicy; static chip::Crypto::DefaultSessionKeystore sSessionKeystore; #if CHIP_CONFIG_ENABLE_SESSION_RESUMPTION diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index a9dd0cc35a..d7265ba314 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -535,7 +535,7 @@ KvsPersistentStorageDelegate CommonCaseDeviceServerInitParams::sKvsPersistenStor PersistentStorageOperationalKeystore CommonCaseDeviceServerInitParams::sPersistentStorageOperationalKeystore; Credentials::PersistentStorageOpCertStore CommonCaseDeviceServerInitParams::sPersistentStorageOpCertStore; Credentials::GroupDataProviderImpl CommonCaseDeviceServerInitParams::sGroupDataProvider; -IgnoreCertificateValidityPolicy CommonCaseDeviceServerInitParams::sDefaultCertValidityPolicy; +Credentials::IgnoreCertificateValidityPeriodPolicy CommonCaseDeviceServerInitParams::sDefaultCertValidityPolicy; #if CHIP_CONFIG_ENABLE_SESSION_RESUMPTION SimpleSessionResumptionStorage CommonCaseDeviceServerInitParams::sSessionResumptionStorage; #endif diff --git a/src/app/server/Server.h b/src/app/server/Server.h index 380e8240ab..0a6bc5c548 100644 --- a/src/app/server/Server.h +++ b/src/app/server/Server.h @@ -137,42 +137,6 @@ struct ServerInitParams Credentials::OperationalCertificateStore * opCertStore = nullptr; }; -class IgnoreCertificateValidityPolicy : public Credentials::CertificateValidityPolicy -{ -public: - IgnoreCertificateValidityPolicy() {} - - /** - * @brief - * - * This certificate validity policy does not validate NotBefore or - * NotAfter to accommodate platforms that may have wall clock time, but - * where it is unreliable. - * - * Last Known Good Time is also not considered in this policy. - * - * @param cert CHIP Certificate for which we are evaluating validity - * @param depth the depth of the certificate in the chain, where the leaf is at depth 0 - * @return CHIP_NO_ERROR if CHIPCert should accept the certificate; an appropriate CHIP_ERROR if it should be rejected - */ - CHIP_ERROR ApplyCertificateValidityPolicy(const Credentials::ChipCertificateData * cert, uint8_t depth, - Credentials::CertificateValidityResult result) override - { - switch (result) - { - case Credentials::CertificateValidityResult::kValid: - case Credentials::CertificateValidityResult::kNotYetValid: - case Credentials::CertificateValidityResult::kExpired: - case Credentials::CertificateValidityResult::kNotExpiredAtLastKnownGoodTime: - case Credentials::CertificateValidityResult::kExpiredAtLastKnownGoodTime: - case Credentials::CertificateValidityResult::kTimeUnknown: - return CHIP_NO_ERROR; - default: - return CHIP_ERROR_INVALID_ARGUMENT; - } - } -}; - /** * Transitional version of ServerInitParams to assist SDK integrators in * transitioning to injecting product/platform-owned resources. This version @@ -289,7 +253,7 @@ struct CommonCaseDeviceServerInitParams : public ServerInitParams static PersistentStorageOperationalKeystore sPersistentStorageOperationalKeystore; static Credentials::PersistentStorageOpCertStore sPersistentStorageOpCertStore; static Credentials::GroupDataProviderImpl sGroupDataProvider; - static IgnoreCertificateValidityPolicy sDefaultCertValidityPolicy; + static Credentials::IgnoreCertificateValidityPeriodPolicy sDefaultCertValidityPolicy; #if CHIP_CONFIG_ENABLE_SESSION_RESUMPTION static SimpleSessionResumptionStorage sSessionResumptionStorage; #endif diff --git a/src/credentials/CertificateValidityPolicy.h b/src/credentials/CertificateValidityPolicy.h index 121647d1b9..58552af728 100644 --- a/src/credentials/CertificateValidityPolicy.h +++ b/src/credentials/CertificateValidityPolicy.h @@ -60,5 +60,39 @@ class CertificateValidityPolicy static CHIP_ERROR ApplyDefaultPolicy(const ChipCertificateData * cert, uint8_t depth, CertificateValidityResult result); }; +class IgnoreCertificateValidityPeriodPolicy : public CertificateValidityPolicy +{ +public: + IgnoreCertificateValidityPeriodPolicy() {} + + /** + * This certificate validity policy does not validate NotBefore or + * NotAfter to accommodate platforms that may have wall clock time, but + * where it is unreliable. + * + * Last Known Good Time is also not considered in this policy. + * + * @param cert CHIP Certificate for which we are evaluating validity + * @param depth the depth of the certificate in the chain, where the leaf is at depth 0 + * @return CHIP_NO_ERROR if CHIPCert should accept the certificate; an appropriate CHIP_ERROR if it should be rejected + */ + CHIP_ERROR ApplyCertificateValidityPolicy(const Credentials::ChipCertificateData * cert, uint8_t depth, + Credentials::CertificateValidityResult result) override + { + switch (result) + { + case Credentials::CertificateValidityResult::kValid: + case Credentials::CertificateValidityResult::kNotYetValid: + case Credentials::CertificateValidityResult::kExpired: + case Credentials::CertificateValidityResult::kNotExpiredAtLastKnownGoodTime: + case Credentials::CertificateValidityResult::kExpiredAtLastKnownGoodTime: + case Credentials::CertificateValidityResult::kTimeUnknown: + return CHIP_NO_ERROR; + default: + return CHIP_ERROR_INVALID_ARGUMENT; + } + } +}; + } // namespace Credentials } // namespace chip From bb4190fced5a3e690678eea6dcf499beaf85eb4a Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 15 May 2023 21:44:56 -0400 Subject: [PATCH 04/15] [nrf fromtree] Change Server to not validate certificate expiration by default. (#26530) If an explicit validity policy is injected that validates notBefore/notAfter, we will do that, but if the app author just doesn't think about time-based validation default to not validating, because there's a good chance it will just lead to unexpected failures due to bad clocks and whatnot. --- src/app/server/Server.cpp | 12 ++++++++++-- src/app/server/Server.h | 9 ++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index d7265ba314..ce355c0883 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -128,7 +128,14 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) mOperationalKeystore = initParams.operationalKeystore; mOpCertStore = initParams.opCertStore; - mCertificateValidityPolicy.Init(initParams.certificateValidityPolicy); + if (initParams.certificateValidityPolicy) + { + mCertificateValidityPolicy.Init(initParams.certificateValidityPolicy); + } + else + { + mCertificateValidityPolicy.Init(&sDefaultCertValidityPolicy); + } #if defined(CHIP_SUPPORT_ENABLE_STORAGE_API_AUDIT) VerifyOrDie(chip::audit::ExecutePersistentStorageApiAudit(*mDeviceStorage)); @@ -531,11 +538,12 @@ void Server::ResumeSubscriptions() } #endif +Credentials::IgnoreCertificateValidityPeriodPolicy Server::sDefaultCertValidityPolicy; + KvsPersistentStorageDelegate CommonCaseDeviceServerInitParams::sKvsPersistenStorageDelegate; PersistentStorageOperationalKeystore CommonCaseDeviceServerInitParams::sPersistentStorageOperationalKeystore; Credentials::PersistentStorageOpCertStore CommonCaseDeviceServerInitParams::sPersistentStorageOpCertStore; Credentials::GroupDataProviderImpl CommonCaseDeviceServerInitParams::sGroupDataProvider; -Credentials::IgnoreCertificateValidityPeriodPolicy CommonCaseDeviceServerInitParams::sDefaultCertValidityPolicy; #if CHIP_CONFIG_ENABLE_SESSION_RESUMPTION SimpleSessionResumptionStorage CommonCaseDeviceServerInitParams::sSessionResumptionStorage; #endif diff --git a/src/app/server/Server.h b/src/app/server/Server.h index 0a6bc5c548..eee11b0bc6 100644 --- a/src/app/server/Server.h +++ b/src/app/server/Server.h @@ -233,10 +233,6 @@ struct CommonCaseDeviceServerInitParams : public ServerInitParams // Inject ACL storage. (Don't initialize it.) this->aclStorage = &sAclStorage; - // Inject certificate validation policy compatible with non-wall-clock-time-synced - // embedded systems. - this->certificateValidityPolicy = &sDefaultCertValidityPolicy; - #if CHIP_CONFIG_PERSIST_SUBSCRIPTIONS ChipLogProgress(AppServer, "Initializing subscription resumption storage..."); ReturnErrorOnFailure(sSubscriptionResumptionStorage.Init(this->persistentStorageDelegate)); @@ -253,7 +249,6 @@ struct CommonCaseDeviceServerInitParams : public ServerInitParams static PersistentStorageOperationalKeystore sPersistentStorageOperationalKeystore; static Credentials::PersistentStorageOpCertStore sPersistentStorageOpCertStore; static Credentials::GroupDataProviderImpl sGroupDataProvider; - static Credentials::IgnoreCertificateValidityPeriodPolicy sDefaultCertValidityPolicy; #if CHIP_CONFIG_ENABLE_SESSION_RESUMPTION static SimpleSessionResumptionStorage sSessionResumptionStorage; #endif @@ -554,6 +549,10 @@ class Server Ble::BleLayer * mBleLayer = nullptr; #endif + // By default, use a certificate validation policy compatible with non-wall-clock-time-synced + // embedded systems. + static Credentials::IgnoreCertificateValidityPeriodPolicy sDefaultCertValidityPolicy; + ServerTransportMgr mTransports; SessionManager mSessions; CASEServer mCASEServer; From fbc2d632e4b156f44352513ec05ed51a769026d5 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 4 Aug 2023 20:38:35 -0400 Subject: [PATCH 05/15] [nrf fromtree] Reduce the size of FabricInfo by reordering some members. (#28278) * Reduce the size of FabricInfo by reordering some members. On 32-bit systems this changes the size from 152 bytes to 144 bytes. On 64-bit systems this changes the size from 168 bytes to 152 bytes. * Address review comment. * Remove static asserts, because offsetof is not happy on FabricInfo. --- src/credentials/FabricTable.h | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/credentials/FabricTable.h b/src/credentials/FabricTable.h index 1b01e1f4fd..d5577e8b74 100644 --- a/src/credentials/FabricTable.h +++ b/src/credentials/FabricTable.h @@ -220,18 +220,27 @@ class DLL_EXPORT FabricInfo return TLV::EstimateStructOverhead(sizeof(uint16_t), Crypto::P256SerializedKeypair::Capacity()); } - NodeId mNodeId = kUndefinedNodeId; - FabricId mFabricId = kUndefinedFabricId; - FabricIndex mFabricIndex = kUndefinedFabricIndex; + NodeId mNodeId = kUndefinedNodeId; + FabricId mFabricId = kUndefinedFabricId; // We cache the compressed fabric id since it's used so often and costly to get. CompressedFabricId mCompressedFabricId = kUndefinedCompressedFabricId; // We cache the root public key since it's used so often and costly to get. Crypto::P256PublicKey mRootPublicKey; - VendorId mVendorId = VendorId::NotSpecified; + // mFabricLabel is 33 bytes, so ends on a 1 mod 4 byte boundary. char mFabricLabel[kFabricLabelMaxLengthInBytes + 1] = { '\0' }; - mutable Crypto::P256Keypair * mOperationalKey = nullptr; - bool mHasExternallyOwnedOperationalKey = false; + + // mFabricIndex, mVendorId, mHasExternallyOwnedOperationalKey are 4 bytes + // and do not end up with any padding if they come after the 33-byte + // mFabricLabel, so end on a 1 mod 4 byte boundary. + FabricIndex mFabricIndex = kUndefinedFabricIndex; + VendorId mVendorId = VendorId::NotSpecified; + bool mHasExternallyOwnedOperationalKey = false; + + // 3 bytes of padding here, since mOperationalKey needs to be void*-aligned, + // so has to be at a 0 mod 4 byte location. + + mutable Crypto::P256Keypair * mOperationalKey = nullptr; CHIP_ERROR CommitToStorage(PersistentStorageDelegate * storage) const; CHIP_ERROR LoadFromStorage(PersistentStorageDelegate * storage, FabricIndex newFabricIndex, const ByteSpan & rcac, From 9f3bba38fa30d3631b39b89f3ead311110e525ad Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 21 Jul 2023 11:54:37 -0400 Subject: [PATCH 06/15] [nrf fromtree] Add a way to update ReadPrepareParams based on CASE session. (#28078) If the ReadClient is doing the CASE establishment itself, it should give the client a way to modify the ReadPrepareParams based on the session information. --- src/app/BufferedReadCallback.h | 5 +++++ src/app/ClusterStateCache.h | 5 +++++ src/app/ReadClient.cpp | 2 ++ src/app/ReadClient.h | 10 ++++++++++ 4 files changed, 22 insertions(+) diff --git a/src/app/BufferedReadCallback.h b/src/app/BufferedReadCallback.h index 747855be1d..7779446f5a 100644 --- a/src/app/BufferedReadCallback.h +++ b/src/app/BufferedReadCallback.h @@ -113,6 +113,11 @@ class BufferedReadCallback : public ReadClient::Callback return mCallback.OnUnsolicitedMessageFromPublisher(apReadClient); } + void OnCASESessionEstablished(const SessionHandle & aSession, ReadPrepareParams & aSubscriptionParams) override + { + return mCallback.OnCASESessionEstablished(aSession, aSubscriptionParams); + } + /* * Given a reader positioned at a list element, allocate a packet buffer, copy the list item where * the reader is positioned into that buffer and add it to our buffered list for tracking. diff --git a/src/app/ClusterStateCache.h b/src/app/ClusterStateCache.h index b6fb2029c8..663df51446 100644 --- a/src/app/ClusterStateCache.h +++ b/src/app/ClusterStateCache.h @@ -620,6 +620,11 @@ class ClusterStateCache : protected ReadClient::Callback return mCallback.OnUnsolicitedMessageFromPublisher(apReadClient); } + void OnCASESessionEstablished(const SessionHandle & aSession, ReadPrepareParams & aSubscriptionParams) override + { + return mCallback.OnCASESessionEstablished(aSession, aSubscriptionParams); + } + // Commit the pending cluster data version, if there is one. void CommitPendingDataVersion(); diff --git a/src/app/ReadClient.cpp b/src/app/ReadClient.cpp index e430c0ea5d..bc977451cf 100644 --- a/src/app/ReadClient.cpp +++ b/src/app/ReadClient.cpp @@ -1082,6 +1082,8 @@ void ReadClient::HandleDeviceConnected(void * context, Messaging::ExchangeManage ChipLogProgress(DataManagement, "HandleDeviceConnected"); _this->mReadPrepareParams.mSessionHolder.Grab(sessionHandle); + _this->mpCallback.OnCASESessionEstablished(sessionHandle, _this->mReadPrepareParams); + auto err = _this->SendSubscribeRequest(_this->mReadPrepareParams); if (err != CHIP_NO_ERROR) { diff --git a/src/app/ReadClient.h b/src/app/ReadClient.h index 0fa98b02b6..fef7fc02ea 100644 --- a/src/app/ReadClient.h +++ b/src/app/ReadClient.h @@ -249,6 +249,16 @@ class ReadClient : public Messaging::ExchangeDelegate * @param[in] apReadClient the ReadClient for the subscription. */ virtual void OnUnsolicitedMessageFromPublisher(ReadClient * apReadClient) {} + + /** + * OnCASESessionEstablished will be called for a subscription ReadClient when + * it finishes setting up a CASE session, as part of either automatic + * re-subscription or doing an initial subscribe based on ScopedNodeId. + * + * The callee is allowed to modify the ReadPrepareParams (e.g. to change + * things like min/max intervals based on the session parameters). + */ + virtual void OnCASESessionEstablished(const SessionHandle & aSession, ReadPrepareParams & aSubscriptionParams) {} }; enum class InteractionType : uint8_t From fc52954db51cf5c079110916bf1890ac8718bc6d Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 7 Aug 2023 09:17:31 -0400 Subject: [PATCH 07/15] [nrf fromtree] Improve encoding of lists where first item can't fit in packet. (#28346) * Improve encoding of lists where first item can't fit in packet. When the first item of a list can't fit in the current packet, it's better to just send the packet without the list at all, then encode as many items as we can in the packet that follows before we start doing IB-per-item. Otherwise (before this change) we encode an empty list IB, then end up doing IB-per-item for the whole list. * Improve unit tests. --- src/app/AttributeAccessInterface.cpp | 13 ++ src/app/AttributeAccessInterface.h | 3 + src/app/tests/TestReadInteraction.cpp | 20 ++- src/controller/tests/TestReadChunking.cpp | 190 ++++++++++++++++++++-- 4 files changed, 199 insertions(+), 27 deletions(-) diff --git a/src/app/AttributeAccessInterface.cpp b/src/app/AttributeAccessInterface.cpp index 0c5a85c2fe..f72c8b8779 100644 --- a/src/app/AttributeAccessInterface.cpp +++ b/src/app/AttributeAccessInterface.cpp @@ -130,6 +130,19 @@ void AttributeValueEncoder::EnsureListEnded() AttributeReportBuilder builder; VerifyOrDie(builder.FinishAttribute(mAttributeReportIBsBuilder) == CHIP_NO_ERROR); + + if (!mEncodedAtLeastOneListItem) + { + // If we have not managed to encode any list items, we don't actually + // want to output the single "empty list" IB that will then be followed + // by one-IB-per-item in the next packet. Just have the reporting + // engine roll back our entire attribute and put us in the next packet. + // + // If we succeeded at encoding the whole list (i.e. the list is in fact + // empty and we fit in the packet), mAllowPartialData will be ignored, + // so it's safe to set it to false even if encoding succeeded. + mEncodeState.mAllowPartialData = false; + } } } // namespace app diff --git a/src/app/AttributeAccessInterface.h b/src/app/AttributeAccessInterface.h index 2b16392e10..63b5c143e0 100644 --- a/src/app/AttributeAccessInterface.h +++ b/src/app/AttributeAccessInterface.h @@ -292,6 +292,7 @@ class AttributeValueEncoder mCurrentEncodingListIndex++; mEncodeState.mCurrentEncodingListIndex++; + mEncodedAtLeastOneListItem = true; return CHIP_NO_ERROR; } @@ -340,6 +341,8 @@ class AttributeValueEncoder // started chunking it yet, so we're encoding a single attribute report IB // for the whole list, not one per item. bool mEncodingInitialList = false; + // mEncodedAtLeastOneListItem becomes true once we successfully encode a list item. + bool mEncodedAtLeastOneListItem = false; AttributeEncodeState mEncodeState; ListIndex mCurrentEncodingListIndex = kInvalidListIndex; }; diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index d49a4fa61a..f8d99245bb 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -1286,8 +1286,8 @@ void TestReadInteraction::TestSetDirtyBetweenChunks(nlTestSuite * apSuite, void !aPath.IsListItemOperation()) { mGotStartOfSecondReport = true; - // Wait for an actual data chunk. - return; + // We always have data chunks, so go ahead to mark things + // dirty as needed. } if (!mGotStartOfSecondReport) @@ -1897,14 +1897,16 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap NL_TEST_ASSERT(apSuite, delegate.mGotReport); - // We have 29 attributes in our mock attribute storage. And we subscribed twice. - // And attribute 3/2/4 is a list with 6 elements and list chunking is - // applied to it, but the way the packet boundaries fall we get two of - // its items as a single list, followed by 4 more single items for one - // of our subscriptions, but every item as a separate IB for the other. - // // Thus we should receive 29*2 + 4 + 6 = 68 attribute data in total. - NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 68); + + // When EventList is not enabled, the packet boundaries shift and for the first + // report for the list attribute we receive two of its items in the initial list, + // then 4 additional items. For the second report we receive 3 items in + // the initial list followed by 3 additional items. + // + // Thus we should receive 29*2 + 4 + 3 = 65 attribute data when the eventlist + // attribute is not available. + NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 65); NL_TEST_ASSERT(apSuite, delegate.mNumArrayItems == 12); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers(ReadHandler::InteractionType::Subscribe) == 1); NL_TEST_ASSERT(apSuite, engine->ActiveHandlerAt(0) != nullptr); diff --git a/src/controller/tests/TestReadChunking.cpp b/src/controller/tests/TestReadChunking.cpp index 03a6c85a6f..d98d058618 100644 --- a/src/controller/tests/TestReadChunking.cpp +++ b/src/controller/tests/TestReadChunking.cpp @@ -70,6 +70,8 @@ constexpr AttributeId kTestListAttribute = 6; constexpr AttributeId kTestBadAttribute = 7; // Reading this attribute will return CHIP_ERROR_NO_MEMORY but nothing is actually encoded. +constexpr int kListAttributeItems = 5; + class TestReadChunking { public: @@ -125,6 +127,116 @@ DECLARE_DYNAMIC_ENDPOINT(testEndpoint5, testEndpoint5Clusters); uint8_t sAnStringThatCanNeverFitIntoTheMTU[4096] = { 0 }; +// Buffered callback class that lets us count the number of attribute data IBs +// we receive. BufferedReadCallback has all its ReadClient::Callback bits +// private, so we can't just inherit from it and call our super-class functions. +class TestBufferedReadCallback : public ReadClient::Callback +{ +public: + TestBufferedReadCallback(ReadClient::Callback & aNextCallback) : mBufferedCallback(aNextCallback) {} + + // Workaround for all the methods on BufferedReadCallback being private. + ReadClient::Callback & NextCallback() { return *static_cast(&mBufferedCallback); } + + void OnReportBegin() override { NextCallback().OnReportBegin(); } + void OnReportEnd() override { NextCallback().OnReportEnd(); } + + void OnAttributeData(const ConcreteDataAttributePath & aPath, TLV::TLVReader * apData, const StatusIB & aStatus) override + { + if (apData) + { + ++mAttributeDataIBCount; + + TLV::TLVReader reader(*apData); + do + { + if (reader.GetType() != TLV::TLVType::kTLVType_Array) + { + // Not a list. + break; + } + + TLV::TLVType containerType; + CHIP_ERROR err = reader.EnterContainer(containerType); + if (err != CHIP_NO_ERROR) + { + mDecodingFailed = true; + break; + } + + err = reader.Next(); + if (err == CHIP_END_OF_TLV) + { + mSawEmptyList = true; + } + else if (err != CHIP_NO_ERROR) + { + mDecodingFailed = true; + break; + } + } while (false); + } + else + { + ++mAttributeStatusIBCount; + } + + NextCallback().OnAttributeData(aPath, apData, aStatus); + } + + void OnError(CHIP_ERROR aError) override { NextCallback().OnError(aError); } + + void OnEventData(const EventHeader & aEventHeader, TLV::TLVReader * apData, const StatusIB * apStatus) override + { + NextCallback().OnEventData(aEventHeader, apData, apStatus); + } + + void OnDone(ReadClient * apReadClient) override { NextCallback().OnDone(apReadClient); } + + void OnSubscriptionEstablished(SubscriptionId aSubscriptionId) override + { + NextCallback().OnSubscriptionEstablished(aSubscriptionId); + } + + CHIP_ERROR OnResubscriptionNeeded(ReadClient * apReadClient, CHIP_ERROR aTerminationCause) override + { + return NextCallback().OnResubscriptionNeeded(apReadClient, aTerminationCause); + } + + void OnDeallocatePaths(ReadPrepareParams && aReadPrepareParams) override + { + NextCallback().OnDeallocatePaths(std::move(aReadPrepareParams)); + } + + CHIP_ERROR OnUpdateDataVersionFilterList(DataVersionFilterIBs::Builder & aDataVersionFilterIBsBuilder, + const Span & aAttributePaths, + bool & aEncodedDataVersionList) override + { + return NextCallback().OnUpdateDataVersionFilterList(aDataVersionFilterIBsBuilder, aAttributePaths, aEncodedDataVersionList); + } + + CHIP_ERROR GetHighestReceivedEventNumber(Optional & aEventNumber) override + { + return NextCallback().GetHighestReceivedEventNumber(aEventNumber); + } + + void OnUnsolicitedMessageFromPublisher(ReadClient * apReadClient) override + { + NextCallback().OnUnsolicitedMessageFromPublisher(apReadClient); + } + + void OnCASESessionEstablished(const SessionHandle & aSession, ReadPrepareParams & aSubscriptionParams) override + { + NextCallback().OnCASESessionEstablished(aSession, aSubscriptionParams); + } + + BufferedReadCallback mBufferedCallback; + bool mSawEmptyList = false; + bool mDecodingFailed = false; + uint32_t mAttributeDataIBCount = 0; + uint32_t mAttributeStatusIBCount = 0; +}; + class TestReadCallback : public app::ReadClient::Callback { public: @@ -138,10 +250,13 @@ class TestReadCallback : public app::ReadClient::Callback void OnSubscriptionEstablished(SubscriptionId aSubscriptionId) override { mOnSubscriptionEstablished = true; } + void OnError(CHIP_ERROR aError) override { mReadError = aError; } + uint32_t mAttributeCount = 0; bool mOnReportEnd = false; bool mOnSubscriptionEstablished = false; - app::BufferedReadCallback mBufferedCallback; + CHIP_ERROR mReadError = CHIP_NO_ERROR; + TestBufferedReadCallback mBufferedCallback; }; void TestReadCallback::OnAttributeData(const app::ConcreteDataAttributePath & aPath, TLV::TLVReader * apData, @@ -276,7 +391,7 @@ CHIP_ERROR TestAttrAccess::Read(const app::ConcreteReadAttributePath & aPath, ap { case kTestListAttribute: return aEncoder.EncodeList([](const auto & encoder) { - for (int i = 0; i < 5; i++) + for (int i = 0; i < kListAttributeItems; i++) { ReturnErrorOnFailure(encoder.Encode((uint8_t) gIterationCount)); } @@ -446,23 +561,36 @@ void TestReadChunking::TestListChunking(nlTestSuite * apSuite, void * apContext) app::AttributePathParams attributePath(kTestEndpointId3, app::Clusters::UnitTesting::Id, kTestListAttribute); app::ReadPrepareParams readParams(sessionHandle); - readParams.mpAttributePathParamsList = &attributePath; - readParams.mAttributePathParamsListSize = 1; + // Read the path twice, so we get two lists. This make it easier to check + // for what happens when one of the lists starts near the end of a packet + // boundary. + + AttributePathParams pathList[] = { attributePath, attributePath }; + + readParams.mpAttributePathParamsList = pathList; + readParams.mAttributePathParamsListSize = ArraySize(pathList); + + constexpr size_t maxPacketSize = kMaxSecureSduLengthBytes; + bool gotSuccessfulEncode = false; + bool gotFailureResponse = false; // - // We've empirically determined that by reserving 950 bytes in the packet buffer, we can fit 2 - // AttributeDataIBs into the packet. ~30-40 bytes covers a single AttributeDataIB, but let's 2-3x that - // to ensure we'll sweep from fitting 2 IBs to 3-4 IBs. + // Make sure we start off the packet size large enough that we can fit a + // single status response in it. Verify that we get at least one status + // response. Then sweep up over packet sizes until we're big enough to hold + // something like 7 IBs (at 30-40 bytes each, so call it 200 bytes) and check + // the behavior for all those cases. // - for (int i = 100; i > 0; i--) + for (uint32_t packetSize = 30; packetSize < 200; packetSize++) { TestReadCallback readCallback; - ChipLogDetail(DataManagement, "Running iteration %d\n", i); + ChipLogDetail(DataManagement, "Running iteration %d\n", packetSize); - gIterationCount = (uint32_t) i; + gIterationCount = packetSize; - app::InteractionModelEngine::GetInstance()->GetReportingEngine().SetWriterReserved(static_cast(850 + i)); + app::InteractionModelEngine::GetInstance()->GetReportingEngine().SetWriterReserved( + static_cast(maxPacketSize - packetSize)); app::ReadClient readClient(engine, &ctx.GetExchangeManager(), readCallback.mBufferedCallback, app::ReadClient::InteractionType::Read); @@ -470,14 +598,37 @@ void TestReadChunking::TestListChunking(nlTestSuite * apSuite, void * apContext) NL_TEST_ASSERT(apSuite, readClient.SendRequest(readParams) == CHIP_NO_ERROR); ctx.DrainAndServiceIO(); - NL_TEST_ASSERT(apSuite, readCallback.mOnReportEnd); - // - // Always returns the same number of attributes read (merged by buffered read callback). The content is checked in - // TestReadCallback::OnAttributeData - // - NL_TEST_ASSERT(apSuite, readCallback.mAttributeCount == 1); - readCallback.mAttributeCount = 0; + // Up until our packets are big enough, we might just keep getting + // errors due to the inability to encode even a single IB in a packet. + // But once we manage a successful encode, we should not have any more failures. + if (!gotSuccessfulEncode && readCallback.mReadError != CHIP_NO_ERROR) + { + gotFailureResponse = true; + // Check for the right error type. + NL_TEST_ASSERT(apSuite, + StatusIB(readCallback.mReadError).mStatus == Protocols::InteractionModel::Status::ResourceExhausted); + } + else + { + gotSuccessfulEncode = true; + + NL_TEST_ASSERT(apSuite, readCallback.mOnReportEnd); + + // + // Always returns the same number of attributes read (merged by buffered read callback). The content is checked in + // TestReadCallback::OnAttributeData. The attribute count is 1 + // because the buffered callback treats the second read's path as being + // just a replace of the first read's path and buffers it all up as a + // single value. + // + NL_TEST_ASSERT(apSuite, readCallback.mAttributeCount == 1); + readCallback.mAttributeCount = 0; + + // Check that we never saw an empty-list data IB. + NL_TEST_ASSERT(apSuite, !readCallback.mBufferedCallback.mDecodingFailed); + NL_TEST_ASSERT(apSuite, !readCallback.mBufferedCallback.mSawEmptyList); + } NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); @@ -490,6 +641,9 @@ void TestReadChunking::TestListChunking(nlTestSuite * apSuite, void * apContext) } } + // If this fails, our smallest packet size was not small enough. + NL_TEST_ASSERT(apSuite, gotFailureResponse); + emberAfClearDynamicEndpoint(0); } From 5d759e7487792b892995bd85c072f9f8d005d649 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 8 Aug 2023 11:33:21 -0400 Subject: [PATCH 08/15] [nrf fromtree] Improve size calculation for our packets. (#28563) * Improve size calculation for our packets. We were hardcoding kMaxAppMessageLen and kMaxSecureSduLengthBytes, but those defines were not even consistent with each other, and both were overly conservative. Specific changes: 1. Fix computation of CHIP_SYSTEM_HEADER_RESERVE_SIZE: we don't have any "crypto headers". 2. Fix computation of kMaxAppMessageLen to use our actual packet buffer sizes and defined header sizes. 3. Fix kMaxSecureSduLengthBytes to be consistent with kMaxAppMessageLen. * Simplify the size computation logic. --- src/app/StatusResponse.h | 3 +- src/app/tests/TestReadInteraction.cpp | 84 +++++++++++++++----- src/app/tests/TestWriteInteraction.cpp | 6 +- src/controller/tests/TestWriteChunking.cpp | 38 +++++---- src/controller/tests/data_model/TestRead.cpp | 22 +++-- src/system/SystemConfig.h | 54 +++++++------ src/transport/raw/MessageHeader.h | 29 ++++++- 7 files changed, 162 insertions(+), 74 deletions(-) diff --git a/src/app/StatusResponse.h b/src/app/StatusResponse.h index 7021e3868b..93f2557b67 100644 --- a/src/app/StatusResponse.h +++ b/src/app/StatusResponse.h @@ -22,10 +22,11 @@ #include #include #include +#include namespace chip { namespace app { -static constexpr size_t kMaxSecureSduLengthBytes = 1024; +static constexpr size_t kMaxSecureSduLengthBytes = kMaxAppMessageLen + kMaxTagLen; class StatusResponse { diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index f8d99245bb..d8d0a135ee 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -64,6 +64,12 @@ chip::EndpointId kInvalidTestEndpointId = 3; chip::DataVersion kTestDataVersion1 = 3; chip::DataVersion kTestDataVersion2 = 5; +// Number of items in the list for MockAttributeId(4). +constexpr int kMockAttribute4ListLength = 6; + +static chip::System::Clock::Internal::MockClock gMockClock; +static chip::System::Clock::ClockBase * gRealClock; + class TestContext : public chip::Test::AppContext { public: @@ -1191,7 +1197,8 @@ void TestReadInteraction::TestReadChunking(nlTestSuite * apSuite, void * apConte NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); chip::app::AttributePathParams attributePathParams[1]; - // Mock Attribute 4 is a big attribute, with 6 large OCTET_STRING + // Mock Attribute 4 is a big attribute, with kMockAttribute4ListLength large + // OCTET_STRING elements. attributePathParams[0].mEndpointId = Test::kMockEndpoint3; attributePathParams[0].mClusterId = Test::MockClusterId(2); attributePathParams[0].mAttributeId = Test::MockAttributeId(4); @@ -1211,8 +1218,10 @@ void TestReadInteraction::TestReadChunking(nlTestSuite * apSuite, void * apConte ctx.DrainAndServiceIO(); - // We get one chunk with 3 array elements, and then one chunk per element. - NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 4); + // We get one chunk with 4 array elements, and then one chunk per + // element, and the total size of the array is + // kMockAttribute4ListLength. + NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 1 + (kMockAttribute4ListLength - 4)); NL_TEST_ASSERT(apSuite, delegate.mNumArrayItems == 6); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, !delegate.mReadError); @@ -1357,13 +1366,16 @@ void TestReadInteraction::TestSetDirtyBetweenChunks(nlTestSuite * apSuite, void ctx.DrainAndServiceIO(); - // We should receive another (3 + 1) = 4 attribute reports represeting 6 - // array items, since the underlying path iterator should be reset to - // the beginning of the cluster it is currently iterating. + // Our list has length kMockAttribute4ListLength. Since the underlying + // path iterator should be reset to the beginning of the cluster it is + // currently iterating, we expect to get another value for our + // attribute. The way the packet boundaries happen to fall, that value + // will encode 4 items in the first IB and then one IB per item. + const int expectedIBs = 1 + (kMockAttribute4ListLength - 4); ChipLogError(DataManagement, "OLD: %d\n", currentAttributeResponsesWhenSetDirty); ChipLogError(DataManagement, "NEW: %d\n", delegate.mNumAttributeResponse); - NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == currentAttributeResponsesWhenSetDirty + 4); - NL_TEST_ASSERT(apSuite, delegate.mNumArrayItems == currentArrayItemsWhenSetDirty + 6); + NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == currentAttributeResponsesWhenSetDirty + expectedIBs); + NL_TEST_ASSERT(apSuite, delegate.mNumArrayItems == currentArrayItemsWhenSetDirty + kMockAttribute4ListLength); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, !delegate.mReadError); // By now we should have closed all exchanges and sent all pending acks, so @@ -1897,16 +1909,47 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap NL_TEST_ASSERT(apSuite, delegate.mGotReport); - // Thus we should receive 29*2 + 4 + 6 = 68 attribute data in total. - - // When EventList is not enabled, the packet boundaries shift and for the first - // report for the list attribute we receive two of its items in the initial list, - // then 4 additional items. For the second report we receive 3 items in - // the initial list followed by 3 additional items. +#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE + // Mock attribute storage in src/app/util/mock/attribute-storage.cpp + // has the following items + // - Endpoint 0xFFFE + // - cluster 0xFFF1'FC01 (2 attributes) + // - cluster 0xFFF1'FC02 (3 attributes) + // - Endpoint 0xFFFD + // - cluster 0xFFF1'FC01 (2 attributes) + // - cluster 0xFFF1'FC02 (4 attributes) + // - cluster 0xFFF1'FC03 (5 attributes) + // - Endpoint 0xFFFC + // - cluster 0xFFF1'FC01 (3 attributes) + // - cluster 0xFFF1'FC02 (6 attributes) + // - cluster 0xFFF1'FC03 (2 attributes) + // - cluster 0xFFF1'FC04 (2 attributes) // - // Thus we should receive 29*2 + 4 + 3 = 65 attribute data when the eventlist - // attribute is not available. - NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 65); + // For at total of 29 attributes. There are two wildcard subscription + // paths, for a total of 58 attributes. + // + // Attribute 0xFFFC::0xFFF1'FC02::0xFFF1'0004 (kMockEndpoint3::MockClusterId(2)::MockAttributeId(4)) + // is a list of kMockAttribute4ListLength elements of size 256 bytes each, which cannot fit in a single + // packet, so gets list chunking applied to it. + // + // Because delegate.mNumAttributeResponse counts AttributeDataIB instances, not attributes, + // the count will depend on exactly how the list for attribute + // 0xFFFC::0xFFF1'FC02::0xFFF1'0004 is chunked. For each of the two instances of that attribute + // in the response, there will be one AttributeDataIB for the start of the list (which will include + // some number of 256-byte elements), then one AttributeDataIB for each of the remaining elements. + // + // When EventList is enabled, for the first report for the list attribute we receive three + // of its items in the initial list, then the remaining items. For the second report we + // receive 2 items in the initial list followed by the remaining items. + constexpr size_t kExpectedAttributeResponse = 29 * 2 + (kMockAttribute4ListLength - 3) + (kMockAttribute4ListLength - 2); +#else + // When EventList is not enabled, the packet boundaries shift and for the first + // report for the list attribute we receive four of its items in the initial list, + // then additional items. For the second report we receive 4 items in + // the initial list followed by additional items. + constexpr size_t kExpectedAttributeResponse = 29 * 2 + (kMockAttribute4ListLength - 4) + (kMockAttribute4ListLength - 4); +#endif + NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == kExpectedAttributeResponse); NL_TEST_ASSERT(apSuite, delegate.mNumArrayItems == 12); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers(ReadHandler::InteractionType::Subscribe) == 1); NL_TEST_ASSERT(apSuite, engine->ActiveHandlerAt(0) != nullptr); @@ -2994,9 +3037,10 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReport(nlTestSuite * ap } ctx.DrainAndServiceIO(); } - // Two chunked reports carry 4 attributeDataIB: 1 with a list of 3 items, - // and then one per remaining item. - NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 4); + // We get one chunk with 4 array elements, and then one chunk per + // element, and the total size of the array is + // kMockAttribute4ListLength. + NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 1 + (kMockAttribute4ListLength - 4)); NL_TEST_ASSERT(apSuite, delegate.mNumArrayItems == 6); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadClients() == 0); diff --git a/src/app/tests/TestWriteInteraction.cpp b/src/app/tests/TestWriteInteraction.cpp index 98765789e3..1707f3c2ca 100644 --- a/src/app/tests/TestWriteInteraction.cpp +++ b/src/app/tests/TestWriteInteraction.cpp @@ -580,8 +580,9 @@ void TestWriteInteraction::TestWriteHandlerReceiveInvalidMessage(nlTestSuite * a err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + // Reserve all except the last 128 bytes, so that we make sure to chunk. app::WriteClient writeClient(&ctx.GetExchangeManager(), &writeCallback, Optional::Missing(), - static_cast(900) /* reserved buffer size */); + static_cast(kMaxSecureSduLengthBytes - 128) /* reserved buffer size */); ByteSpan list[5]; @@ -648,8 +649,9 @@ void TestWriteInteraction::TestWriteHandlerInvalidateFabric(nlTestSuite * apSuit err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + // Reserve all except the last 128 bytes, so that we make sure to chunk. app::WriteClient writeClient(&ctx.GetExchangeManager(), &writeCallback, Optional::Missing(), - static_cast(900) /* reserved buffer size */); + static_cast(kMaxSecureSduLengthBytes - 128) /* reserved buffer size */); ByteSpan list[5]; diff --git a/src/controller/tests/TestWriteChunking.cpp b/src/controller/tests/TestWriteChunking.cpp index 100ec13b01..8f9fa06336 100644 --- a/src/controller/tests/TestWriteChunking.cpp +++ b/src/controller/tests/TestWriteChunking.cpp @@ -203,21 +203,22 @@ void TestWriteChunking::TestListChunking(nlTestSuite * apSuite, void * apContext app::AttributePathParams attributePath(kTestEndpointId, app::Clusters::UnitTesting::Id, kTestListAttribute); // - // We've empirically determined that by reserving 950 bytes in the packet buffer, we can fit 2 + // We've empirically determined that by reserving all but 75 bytes in the packet buffer, we can fit 2 // AttributeDataIBs into the packet. ~30-40 bytes covers a single write chunk, but let's 2-3x that // to ensure we'll sweep from fitting 2 chunks to 3-4 chunks. // - for (int i = 100; i > 0; i--) + constexpr size_t minReservationSize = kMaxSecureSduLengthBytes - 75 - 100; + for (uint32_t i = 100; i > 0; i--) { CHIP_ERROR err = CHIP_NO_ERROR; TestWriteCallback writeCallback; ChipLogDetail(DataManagement, "Running iteration %d\n", i); - gIterationCount = (uint32_t) i; + gIterationCount = i; app::WriteClient writeClient(&ctx.GetExchangeManager(), &writeCallback, Optional::Missing(), - static_cast(850 + i) /* reserved buffer size */); + static_cast(minReservationSize + i) /* reserved buffer size */); ByteSpan list[kTestListLength]; @@ -358,15 +359,16 @@ void TestWriteChunking::TestConflictWrite(nlTestSuite * apSuite, void * apContex app::AttributePathParams attributePath(kTestEndpointId, app::Clusters::UnitTesting::Id, kTestListAttribute); + /* use a smaller chunk (128 bytes) so we only need a few attributes in the write request. */ + constexpr size_t kReserveSize = kMaxSecureSduLengthBytes - 128; + TestWriteCallback writeCallback1; - app::WriteClient writeClient1( - &ctx.GetExchangeManager(), &writeCallback1, Optional::Missing(), - static_cast(900) /* use a smaller chunk so we only need a few attributes in the write request. */); + app::WriteClient writeClient1(&ctx.GetExchangeManager(), &writeCallback1, Optional::Missing(), + static_cast(kReserveSize)); TestWriteCallback writeCallback2; - app::WriteClient writeClient2( - &ctx.GetExchangeManager(), &writeCallback2, Optional::Missing(), - static_cast(900) /* use a smaller chunk so we only need a few attributes in the write request. */); + app::WriteClient writeClient2(&ctx.GetExchangeManager(), &writeCallback2, Optional::Missing(), + static_cast(kReserveSize)); ByteSpan list[kTestListLength]; @@ -435,15 +437,16 @@ void TestWriteChunking::TestNonConflictWrite(nlTestSuite * apSuite, void * apCon app::AttributePathParams attributePath1(kTestEndpointId, app::Clusters::UnitTesting::Id, kTestListAttribute); app::AttributePathParams attributePath2(kTestEndpointId, app::Clusters::UnitTesting::Id, kTestListAttribute2); + /* use a smaller chunk (128 bytes) so we only need a few attributes in the write request. */ + constexpr size_t kReserveSize = kMaxSecureSduLengthBytes - 128; + TestWriteCallback writeCallback1; - app::WriteClient writeClient1( - &ctx.GetExchangeManager(), &writeCallback1, Optional::Missing(), - static_cast(900) /* use a smaller chunk so we only need a few attributes in the write request. */); + app::WriteClient writeClient1(&ctx.GetExchangeManager(), &writeCallback1, Optional::Missing(), + static_cast(kReserveSize)); TestWriteCallback writeCallback2; - app::WriteClient writeClient2( - &ctx.GetExchangeManager(), &writeCallback2, Optional::Missing(), - static_cast(900) /* use a smaller chunk so we only need a few attributes in the write request. */); + app::WriteClient writeClient2(&ctx.GetExchangeManager(), &writeCallback2, Optional::Missing(), + static_cast(kReserveSize)); ByteSpan list[kTestListLength]; @@ -514,7 +517,8 @@ void RunTest(nlTestSuite * apSuite, TestContext & ctx, Instructions instructions TestWriteCallback writeCallback; std::unique_ptr writeClient = std::make_unique( &ctx.GetExchangeManager(), &writeCallback, Optional::Missing(), - static_cast(900) /* use a smaller chunk so we only need a few attributes in the write request. */); + static_cast(kMaxSecureSduLengthBytes - + 128) /* use a smaller chunk so we only need a few attributes in the write request. */); ConcreteAttributePath onGoingPath = ConcreteAttributePath(); std::vector status; diff --git a/src/controller/tests/data_model/TestRead.cpp b/src/controller/tests/data_model/TestRead.cpp index aa9dd0218e..86832270ce 100644 --- a/src/controller/tests/data_model/TestRead.cpp +++ b/src/controller/tests/data_model/TestRead.cpp @@ -1056,7 +1056,7 @@ void TestReadInteraction::TestReadSubscribeAttributeResponseWithCache(nlTestSuit } // Read of E2C3A* and E3C2A2, and inject a large amount of event path list, then it would try to apply previous cache - // latest data version and construct data version list but no enough memory, finally fully rollback data version filter. Expect + // latest data version and construct data version list but run out of memory, finally fully rollback data version filter. Expect // E2C3A* attributes in report, and E3C2A2 attribute in report { testId++; @@ -1074,8 +1074,12 @@ void TestReadInteraction::TestReadSubscribeAttributeResponseWithCache(nlTestSuit readPrepareParams.mpAttributePathParamsList = attributePathParams2; readPrepareParams.mAttributePathParamsListSize = 2; - readPrepareParams.mpEventPathParamsList = eventPathParams; - readPrepareParams.mEventPathParamsListSize = 64; + readPrepareParams.mpEventPathParamsList = eventPathParams; + // This size needs to be big enough that we can't fit our + // DataVersionFilterIBs in the same packet. Max size is + // ArraySize(eventPathParams); + static_assert(75 <= ArraySize(eventPathParams), "Invalid eventPathParams size"); + readPrepareParams.mEventPathParamsListSize = 75; err = readClient.SendRequest(readPrepareParams); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -1245,8 +1249,8 @@ void TestReadInteraction::TestReadSubscribeAttributeResponseWithCache(nlTestSuit // Read of E1C2A*(3 attributes) and E2C3A*(5 attributes) and E2C2A*(4 attributes), and inject a large amount of event path // list, then it would try to apply previous cache latest data version and construct data version list with the ordering from - // largest cluster size to smallest cluster size(C2, C3, C1) but no enough memory, finally partially rollback data version - // filter with only C2. Expect E1C2A*, E2C2A* attributes(7 attributes) in report, + // largest cluster size to smallest cluster size(C3, C2, C1) but run out of memory, finally partially rollback data version + // filter with only C3. Expect E1C2A*, E2C2A* attributes(7 attributes) in report, { testId++; ChipLogProgress(DataManagement, "\t -- Running Read with ClusterStateCache Test ID %d", testId); @@ -1268,8 +1272,12 @@ void TestReadInteraction::TestReadSubscribeAttributeResponseWithCache(nlTestSuit readPrepareParams.mpAttributePathParamsList = attributePathParams3; readPrepareParams.mAttributePathParamsListSize = 3; readPrepareParams.mpEventPathParamsList = eventPathParams; - readPrepareParams.mEventPathParamsListSize = 62; - err = readClient.SendRequest(readPrepareParams); + + // This size needs to be big enough that we can only fit our first + // DataVersionFilterIB. Max size is ArraySize(eventPathParams); + static_assert(73 <= ArraySize(eventPathParams), "Invalid size of eventPathParams"); + readPrepareParams.mEventPathParamsListSize = 73; + err = readClient.SendRequest(readPrepareParams); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ctx.DrainAndServiceIO(); diff --git a/src/system/SystemConfig.h b/src/system/SystemConfig.h index 7315374e21..a246f38b28 100644 --- a/src/system/SystemConfig.h +++ b/src/system/SystemConfig.h @@ -293,23 +293,17 @@ #endif // CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING && CHIP_SYSTEM_CONFIG_NO_LOCKING /** - * @def CHIP_SYSTEM_HEADER_RESERVE_SIZE + * @def CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE * * @brief * The number of bytes to reserve in a network packet buffer to contain - * the CHIP message and exchange headers. - * - * This number was calculated as follows: + * the Matter crypto headers. * - * CHIP Crypto Header: - * - * 4 -- Length of encrypted block - * 4 -- Reserve - * 8 -- Initialization Vector - * 8 -- Encryption Tag + * This is 0, because Matter does not have any crypto headers. This define + * is still here only for backwards compatibility. */ #ifndef CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE -#define CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE 24 +#define CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE 0 #endif /** @@ -317,31 +311,39 @@ * * @brief * The number of bytes to reserve in a network packet buffer to contain - * the CHIP message and exchange headers. + * the CHIP message and payload headers. * * This number was calculated as follows: * - * CHIP Message Header: + * Matter Message Header: * * 2 -- Frame Length - * 2 -- Message Header - * 4 -- Message Id - * 8 -- Source Node Id - * 8 -- Destination Node Id - * 2 -- Key Id + * 1 -- Message Flags + * 2 -- Session ID + * 1 -- Security Flags + * 4 -- Message Counter + * 8 -- Source Node ID + * 8 -- Destination Node ID + * + * Total: 26 bytes. + * + * Matter Payload Header: * - * CHIP Exchange Header: + * 1 -- Exhange Flags + * 1 -- Protocol Opcode + * 2 -- Exchange ID + * 2 -- Protocol Vendor ID + * 2 -- Protocol ID + * 4 -- Acknowledged MEssage Counter * - * 1 -- Application Version - * 1 -- Message Type - * 2 -- Exchange Id - * 4 -- Profile Id - * 4 -- Acknowledged Message Id + * Total: 12 bytes. * - * @note A number of these fields are optional or not presently used. So most headers will be considerably smaller than this. + * @note A number of these fields are optional or not presently used. So most + * headers will be considerably smaller than this. + * @note This calculation assumes ther are no Message Extensions or Secured Extensions. */ #ifndef CHIP_SYSTEM_HEADER_RESERVE_SIZE -#define CHIP_SYSTEM_HEADER_RESERVE_SIZE (38 + CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE) +#define CHIP_SYSTEM_HEADER_RESERVE_SIZE (26 + 12 + CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE) #endif /* CHIP_SYSTEM_HEADER_RESERVE_SIZE */ /** diff --git a/src/transport/raw/MessageHeader.h b/src/transport/raw/MessageHeader.h index 4f78562321..a626a0bd00 100644 --- a/src/transport/raw/MessageHeader.h +++ b/src/transport/raw/MessageHeader.h @@ -35,15 +35,42 @@ #include #include #include +#include #include #include #include namespace chip { +namespace detail { +// Figure out the max size of a packet we can allocate, including all headers. +static constexpr size_t kMaxIPPacketSizeBytes = 1280; +static constexpr size_t kMaxUDPAndIPHeaderSizeBytes = 48; + +static_assert(kMaxIPPacketSizeBytes >= kMaxUDPAndIPHeaderSizeBytes + CHIP_SYSTEM_HEADER_RESERVE_SIZE, + "Matter headers and IP headers must fit in an MTU."); + +// Max space we have for our Application Payload and MIC, per spec. +static constexpr size_t kMaxPerSpecApplicationPayloadAndMICSizeBytes = + kMaxIPPacketSizeBytes - kMaxUDPAndIPHeaderSizeBytes - CHIP_SYSTEM_HEADER_RESERVE_SIZE; + +// Max space we have for our Application Payload and MIC in our actual packet +// buffers. This is the size _excluding_ the header reserve. +static constexpr size_t kMaxPacketBufferApplicationPayloadAndMICSizeBytes = System::PacketBuffer::kMaxSize; + +static constexpr size_t kMaxApplicationPayloadAndMICSizeBytes = + min(kMaxPerSpecApplicationPayloadAndMICSizeBytes, kMaxPacketBufferApplicationPayloadAndMICSizeBytes); + +} // namespace detail + static constexpr size_t kMaxTagLen = 16; -static constexpr size_t kMaxAppMessageLen = 1200; +static_assert(detail::kMaxApplicationPayloadAndMICSizeBytes > kMaxTagLen, "Need to be able to fit our tag in a message"); + +// This is somewhat of an under-estimate, because in practice any time we have a +// tag we will not have source/destination node IDs, but above we are including +// those in the header sizes. +static constexpr size_t kMaxAppMessageLen = detail::kMaxApplicationPayloadAndMICSizeBytes - kMaxTagLen; static constexpr uint16_t kMsgUnicastSessionIdUnsecured = 0x0000; From 32c7ccce71fd809bf1ca5aadb882deddf95c47b9 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 8 Aug 2023 16:29:32 -0400 Subject: [PATCH 09/15] [nrf fromtree] Fix cancellation of subscriptions to work correctly. (#28569) * Fix cancellation of subscriptions to work correctly. When a subscription came in with KeepSubscriptions set to false, we would just directly delete the ReadHandlers for the subscriptions not being kept, instead of calling Close(). That meant we skipped deleting subscription persistence data, and also failed to correcly update the reporting engine's round-robin reporting state, which could lead to subscriptions not being serviced fairly. The fix is to just call Close() just like we do for out-of-resource eviction, instead of manually deleting the object. * Fix build issue. --- src/app/InteractionModelEngine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index 2a5dd2f321..f25512422f 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -453,14 +453,14 @@ Protocols::InteractionModel::Status InteractionModelEngine::OnReadInitialRequest // Walk through all existing subscriptions and shut down those whose subscriber matches // that which just came in. // - mReadHandlers.ForEachActiveObject([this, apExchangeContext](ReadHandler * handler) { + mReadHandlers.ForEachActiveObject([apExchangeContext](ReadHandler * handler) { if (handler->IsFromSubscriber(*apExchangeContext)) { ChipLogProgress(InteractionModel, "Deleting previous subscription from NodeId: " ChipLogFormatX64 ", FabricIndex: %u", ChipLogValueX64(apExchangeContext->GetSessionHandle()->AsSecureSession()->GetPeerNodeId()), apExchangeContext->GetSessionHandle()->GetFabricIndex()); - mReadHandlers.ReleaseObject(handler); + handler->Close(); } return Loop::Continue; From 4e071a48d90c8667d16fcc28415aad22127e2b40 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 7 Aug 2023 09:22:15 -0400 Subject: [PATCH 10/15] [nrf fromtree] Fix reservation logic in reporting engine. (#28542) In BuildSingleReportDataAttributeReportIBs if we failed to successfully call ReserveBuffer(kReservedSizeEndOfReportIBs) (because there was not enough space in the packet), we would end up trying to EndOfAttributeReportIBs() after unreserving (which would not match our never-happened reserve) and then VerifyOrDie that we succeeded. The fix is to keep track of whether we actually successfully reserved things, and not override out-of-space-errors if we have not. --- src/app/reporting/Engine.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/reporting/Engine.cpp b/src/app/reporting/Engine.cpp index 3e88405ef7..04b5746fdd 100644 --- a/src/app/reporting/Engine.cpp +++ b/src/app/reporting/Engine.cpp @@ -98,6 +98,7 @@ CHIP_ERROR Engine::BuildSingleReportDataAttributeReportIBs(ReportDataMessage::Bu bool hasMoreChunks = true; TLV::TLVWriter backup; const uint32_t kReservedSizeEndOfReportIBs = 1; + bool reservedEndOfReportIBs = false; aReportDataBuilder.Checkpoint(backup); @@ -110,7 +111,8 @@ CHIP_ERROR Engine::BuildSingleReportDataAttributeReportIBs(ReportDataMessage::Bu // // Reserve enough space for closing out the Report IB list // - attributeReportIBs.GetWriter()->ReserveBuffer(kReservedSizeEndOfReportIBs); + SuccessOrExit(err = attributeReportIBs.GetWriter()->ReserveBuffer(kReservedSizeEndOfReportIBs)); + reservedEndOfReportIBs = true; { // TODO: Figure out how AttributePathExpandIterator should handle read @@ -251,7 +253,7 @@ CHIP_ERROR Engine::BuildSingleReportDataAttributeReportIBs(ReportDataMessage::Bu // These are are guaranteed to not fail since we've already reserved memory for the remaining 'close out' TLV operations in this // function and its callers. // - if (IsOutOfWriterSpaceError(err)) + if (IsOutOfWriterSpaceError(err) && reservedEndOfReportIBs) { ChipLogDetail(DataManagement, " We cannot put more chunks into this report. Enable chunking."); err = CHIP_NO_ERROR; From 8273b38541f3cea496994c52e50b1117cb17df90 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 14 Jun 2023 12:15:18 -0400 Subject: [PATCH 11/15] [nrf fromtree] Do proper ACL checks on event reads/subscriptions. (#26761) * Do proper ACL checks on event reads/subscriptions. This adds the following functionality: 1. We now correctly detect subsciptions that don't have any access to anything, even if they have an event path in the subscribe request. For paths with a wildcard event id, this check assumes read privileges are needed when event lists are disabled, and uses the actual event-specific privileges when event lists are enabled. 2. When doing reads of an unsupported event, correctly return an errors instead of an empty event list. 3. Fix various unit test mocks to provide the information needed for the new checks. 4. Update expectation in existing YAML test that was checking an "unimplemented event" case. * Address review comments. * Fix darwin build. * Fix Darwin tests, now that we get errors for unsupported events. * Move function declarations to a non-codegen-dependent header. * Handle ACL checks for event wildcards even if we have no EventList. * Update to spec change for unsupported event errors. * Address review comments. --- src/app/InteractionModelEngine.cpp | 176 ++++++++++++++++-- src/app/InteractionModelEngine.h | 21 ++- src/app/reporting/Engine.cpp | 20 +- src/app/tests/TestAclAttribute.cpp | 12 ++ src/app/tests/TestReadInteraction.cpp | 81 ++++---- .../tests/integration/chip_im_initiator.cpp | 6 + .../tests/integration/chip_im_responder.cpp | 7 + src/app/tests/suites/TestEvents.yaml | 3 +- src/app/util/af.h | 16 +- src/app/util/attribute-storage.h | 8 +- .../util/ember-compatibility-functions.cpp | 38 +++- src/app/util/endpoint-config-api.h | 67 +++++++ src/app/util/mock/attribute-storage.cpp | 75 ++++++++ src/app/util/util.h | 5 +- src/controller/tests/data_model/TestRead.cpp | 7 + src/darwin/Framework/CHIP/MTRIMDispatch.mm | 45 +++++ .../Framework/CHIPTests/MTRDeviceTests.m | 79 ++++---- .../chip-tool/zap-generated/test/Commands.h | 6 +- 18 files changed, 547 insertions(+), 125 deletions(-) create mode 100644 src/app/util/endpoint-config-api.h diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index f25512422f..2d25fd02f1 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -30,11 +30,11 @@ #include "access/RequestPath.h" #include "access/SubjectDescriptor.h" #include +#include +#include #include #include -extern bool emberAfContainsAttribute(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId); - namespace chip { namespace app { @@ -351,10 +351,8 @@ CHIP_ERROR InteractionModelEngine::ParseAttributePaths(const Access::SubjectDesc aHasValidAttributePath = false; aRequestedAttributePathCount = 0; - while (CHIP_NO_ERROR == (err = pathReader.Next())) + while (CHIP_NO_ERROR == (err = pathReader.Next(TLV::AnonymousTag()))) { - VerifyOrReturnError(TLV::AnonymousTag() == pathReader.GetTag(), CHIP_ERROR_INVALID_TLV_TAG); - AttributePathIB::Parser path; // // We create an iterator to point to a single item object list that tracks the path we just parsed. @@ -413,6 +411,152 @@ CHIP_ERROR InteractionModelEngine::ParseAttributePaths(const Access::SubjectDesc return err; } +static bool CanAccess(const Access::SubjectDescriptor & aSubjectDescriptor, const ConcreteClusterPath & aPath, + Access::Privilege aNeededPrivilege) +{ + Access::RequestPath requestPath{ .cluster = aPath.mClusterId, .endpoint = aPath.mEndpointId }; + CHIP_ERROR err = Access::GetAccessControl().Check(aSubjectDescriptor, requestPath, aNeededPrivilege); + return (err == CHIP_NO_ERROR); +} + +static bool CanAccess(const Access::SubjectDescriptor & aSubjectDescriptor, const ConcreteEventPath & aPath) +{ + return CanAccess(aSubjectDescriptor, aPath, RequiredPrivilege::ForReadEvent(aPath)); +} + +/** + * Helper to handle wildcard events in the event path. + */ +static bool HasValidEventPathForEndpointAndCluster(EndpointId aEndpoint, const EmberAfCluster * aCluster, + const EventPathParams & aEventPath, + const Access::SubjectDescriptor & aSubjectDescriptor) +{ + if (aEventPath.HasWildcardEventId()) + { +#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE + for (decltype(aCluster->eventCount) idx = 0; idx > aCluster->eventCount; ++idx) + { + ConcreteEventPath path(aEndpoint, aCluster->clusterId, aCluster->eventList[idx]); + // If we get here, the path exists. We just have to do an ACL check for it. + bool isValid = CanAccess(aSubjectDescriptor, path); + if (isValid) + { + return true; + } + } + + return false; +#else + // We have no way to expand wildcards. Just assume that we would need + // View permissions for whatever events are involved. + ConcreteClusterPath clusterPath(aEndpoint, aCluster->clusterId); + return CanAccess(aSubjectDescriptor, clusterPath, Access::Privilege::kView); +#endif + } + + ConcreteEventPath path(aEndpoint, aCluster->clusterId, aEventPath.mEventId); + if (CheckEventSupportStatus(path) != Status::Success) + { + // Not an existing event path. + return false; + } + return CanAccess(aSubjectDescriptor, path); +} + +/** + * Helper to handle wildcard clusters in the event path. + */ +static bool HasValidEventPathForEndpoint(EndpointId aEndpoint, const EventPathParams & aEventPath, + const Access::SubjectDescriptor & aSubjectDescriptor) +{ + if (aEventPath.HasWildcardClusterId()) + { + auto * endpointType = emberAfFindEndpointType(aEndpoint); + if (endpointType == nullptr) + { + // Not going to have any valid paths in here. + return false; + } + + for (decltype(endpointType->clusterCount) idx = 0; idx < endpointType->clusterCount; ++idx) + { + bool hasValidPath = + HasValidEventPathForEndpointAndCluster(aEndpoint, &endpointType->cluster[idx], aEventPath, aSubjectDescriptor); + if (hasValidPath) + { + return true; + } + } + + return false; + } + + auto * cluster = emberAfFindServerCluster(aEndpoint, aEventPath.mClusterId); + if (cluster == nullptr) + { + // Nothing valid here. + return false; + } + return HasValidEventPathForEndpointAndCluster(aEndpoint, cluster, aEventPath, aSubjectDescriptor); +} + +CHIP_ERROR InteractionModelEngine::ParseEventPaths(const Access::SubjectDescriptor & aSubjectDescriptor, + EventPathIBs::Parser & aEventPathListParser, bool & aHasValidEventPath, + size_t & aRequestedEventPathCount) +{ + TLV::TLVReader pathReader; + aEventPathListParser.GetReader(&pathReader); + CHIP_ERROR err = CHIP_NO_ERROR; + + aHasValidEventPath = false; + aRequestedEventPathCount = 0; + + while (CHIP_NO_ERROR == (err = pathReader.Next(TLV::AnonymousTag()))) + { + EventPathIB::Parser path; + ReturnErrorOnFailure(path.Init(pathReader)); + + EventPathParams eventPath; + ReturnErrorOnFailure(path.ParsePath(eventPath)); + + ++aRequestedEventPathCount; + + if (aHasValidEventPath) + { + // Can skip all the rest of the checking. + continue; + } + + // The definition of "valid path" is "path exists and ACL allows + // access". We need to do some expansion of wildcards to handle that. + if (eventPath.HasWildcardEndpointId()) + { + for (uint16_t endpointIndex = 0; !aHasValidEventPath && endpointIndex < emberAfEndpointCount(); ++endpointIndex) + { + if (!emberAfEndpointIndexIsEnabled(endpointIndex)) + { + continue; + } + aHasValidEventPath = + HasValidEventPathForEndpoint(emberAfEndpointFromIndex(endpointIndex), eventPath, aSubjectDescriptor); + } + } + else + { + // No need to check whether the endpoint is enabled, because + // emberAfFindEndpointType returns null for disabled endpoints. + aHasValidEventPath = HasValidEventPathForEndpoint(eventPath.mEndpointId, eventPath, aSubjectDescriptor); + } + } + + if (err == CHIP_ERROR_END_OF_TLV) + { + err = CHIP_NO_ERROR; + } + + return err; +} + Protocols::InteractionModel::Status InteractionModelEngine::OnReadInitialRequest(Messaging::ExchangeContext * apExchangeContext, const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload, @@ -472,6 +616,7 @@ Protocols::InteractionModel::Status InteractionModelEngine::OnReadInitialRequest size_t requestedEventPathCount = 0; AttributePathIBs::Parser attributePathListParser; bool hasValidAttributePath = false; + bool hasValidEventPath = false; CHIP_ERROR err = subscribeRequestParser.GetAttributeRequests(&attributePathListParser); if (err == CHIP_NO_ERROR) @@ -489,14 +634,16 @@ Protocols::InteractionModel::Status InteractionModelEngine::OnReadInitialRequest return Status::InvalidAction; } - EventPathIBs::Parser eventpathListParser; - err = subscribeRequestParser.GetEventRequests(&eventpathListParser); + EventPathIBs::Parser eventPathListParser; + err = subscribeRequestParser.GetEventRequests(&eventPathListParser); if (err == CHIP_NO_ERROR) { - TLV::TLVReader pathReader; - eventpathListParser.GetReader(&pathReader); - ReturnErrorCodeIf(TLV::Utilities::Count(pathReader, requestedEventPathCount, false) != CHIP_NO_ERROR, - Status::InvalidAction); + auto subjectDescriptor = apExchangeContext->GetSessionHandle()->AsSecureSession()->GetSubjectDescriptor(); + err = ParseEventPaths(subjectDescriptor, eventPathListParser, hasValidEventPath, requestedEventPathCount); + if (err != CHIP_NO_ERROR) + { + return Status::InvalidAction; + } } else if (err != CHIP_ERROR_END_OF_TLV) { @@ -512,12 +659,7 @@ Protocols::InteractionModel::Status InteractionModelEngine::OnReadInitialRequest return Status::InvalidAction; } - // - // TODO: We don't have an easy way to do a similar 'path expansion' for events to deduce - // access so for now, assume that the presence of any path in the event list means they - // might have some access to those events. - // - if (!hasValidAttributePath && requestedEventPathCount == 0) + if (!hasValidAttributePath && !hasValidEventPath) { ChipLogError(InteractionModel, "Subscription from [%u:" ChipLogFormatX64 "] has no access at all. Rejecting request.", diff --git a/src/app/InteractionModelEngine.h b/src/app/InteractionModelEngine.h index 5401511899..b7de62e16f 100644 --- a/src/app/InteractionModelEngine.h +++ b/src/app/InteractionModelEngine.h @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -398,6 +399,19 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, AttributePathIBs::Parser & aAttributePathListParser, bool & aHasValidAttributePath, size_t & aRequestedAttributePathCount); + /** + * This parses the event path list to ensure it is well formed. If so, for each path in the list, it will expand to a list + * of concrete paths and walk each path to check if it has privileges to read that event. + * + * If there is AT LEAST one "existent path" (as the spec calls it) that has sufficient privilege, aHasValidEventPath + * will be set to true. Otherwise, it will be set to false. + * + * aRequestedEventPathCount will be updated to reflect the number of event paths in the request. + */ + static CHIP_ERROR ParseEventPaths(const Access::SubjectDescriptor & aSubjectDescriptor, + EventPathIBs::Parser & aEventPathListParser, bool & aHasValidEventPath, + size_t & aRequestedEventPathCount); + /** * Called when Interaction Model receives a Read Request message. Errors processing * the Read Request are handled entirely within this function. If the @@ -677,7 +691,12 @@ bool IsDeviceTypeOnEndpoint(DeviceTypeId deviceType, EndpointId endpoint); * * @retval The metadata of the attribute, will return null if the given attribute does not exists. */ -const EmberAfAttributeMetadata * GetAttributeMetadata(const ConcreteAttributePath & aConcreteClusterPath); +const EmberAfAttributeMetadata * GetAttributeMetadata(const ConcreteAttributePath & aPath); + +/** + * Returns the event support status for the given event, as an interaction model status. + */ +Protocols::InteractionModel::Status CheckEventSupportStatus(const ConcreteEventPath & aPath); } // namespace app } // namespace chip diff --git a/src/app/reporting/Engine.cpp b/src/app/reporting/Engine.cpp index 04b5746fdd..c4fa15e97b 100644 --- a/src/app/reporting/Engine.cpp +++ b/src/app/reporting/Engine.cpp @@ -298,6 +298,8 @@ CHIP_ERROR Engine::BuildSingleReportDataAttributeReportIBs(ReportDataMessage::Bu CHIP_ERROR Engine::CheckAccessDeniedEventPaths(TLV::TLVWriter & aWriter, bool & aHasEncodedData, ReadHandler * apReadHandler) { + using Protocols::InteractionModel::Status; + CHIP_ERROR err = CHIP_NO_ERROR; for (auto current = apReadHandler->mpEventPathList; current != nullptr;) { @@ -307,8 +309,21 @@ CHIP_ERROR Engine::CheckAccessDeniedEventPaths(TLV::TLVWriter & aWriter, bool & continue; } - Access::RequestPath requestPath{ .cluster = current->mValue.mClusterId, .endpoint = current->mValue.mEndpointId }; ConcreteEventPath path(current->mValue.mEndpointId, current->mValue.mClusterId, current->mValue.mEventId); + Status status = CheckEventSupportStatus(path); + if (status != Status::Success) + { + TLV::TLVWriter checkpoint = aWriter; + err = EventReportIB::ConstructEventStatusIB(aWriter, path, StatusIB(status)); + if (err != CHIP_NO_ERROR) + { + aWriter = checkpoint; + break; + } + aHasEncodedData = true; + } + + Access::RequestPath requestPath{ .cluster = current->mValue.mClusterId, .endpoint = current->mValue.mEndpointId }; Access::Privilege requestPrivilege = RequiredPrivilege::ForReadEvent(path); err = Access::GetAccessControl().Check(apReadHandler->GetSubjectDescriptor(), requestPath, requestPrivilege); @@ -319,8 +334,7 @@ CHIP_ERROR Engine::CheckAccessDeniedEventPaths(TLV::TLVWriter & aWriter, bool & else { TLV::TLVWriter checkpoint = aWriter; - err = EventReportIB::ConstructEventStatusIB(aWriter, path, - StatusIB(Protocols::InteractionModel::Status::UnsupportedAccess)); + err = EventReportIB::ConstructEventStatusIB(aWriter, path, StatusIB(Status::UnsupportedAccess)); if (err != CHIP_NO_ERROR) { aWriter = checkpoint; diff --git a/src/app/tests/TestAclAttribute.cpp b/src/app/tests/TestAclAttribute.cpp index 8d17a94ccc..cd7d774ef3 100644 --- a/src/app/tests/TestAclAttribute.cpp +++ b/src/app/tests/TestAclAttribute.cpp @@ -19,6 +19,8 @@ #include "lib/support/CHIPMem.h" #include #include +#include +#include #include #include #include @@ -140,6 +142,16 @@ bool ConcreteAttributePathExists(const ConcreteAttributePath & aPath) return aPath.mClusterId != kTestDeniedClusterId1; } +Protocols::InteractionModel::Status CheckEventSupportStatus(const ConcreteEventPath & aPath) +{ + if (aPath.mClusterId == kTestDeniedClusterId1) + { + return Protocols::InteractionModel::Status::UnsupportedCluster; + } + + return Protocols::InteractionModel::Status::Success; +} + class TestAclAttribute { public: diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index d8d0a135ee..973aff8732 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -54,10 +54,12 @@ uint8_t gInfoEventBuffer[128]; uint8_t gCritEventBuffer[128]; chip::app::CircularEventBuffer gCircularEventBuffer[3]; chip::ClusterId kTestClusterId = 6; +chip::ClusterId kTestEventClusterId = chip::Test::MockClusterId(1); chip::ClusterId kInvalidTestClusterId = 7; chip::EndpointId kTestEndpointId = 1; -chip::EventId kTestEventIdDebug = 1; -chip::EventId kTestEventIdCritical = 2; +chip::EndpointId kTestEventEndpointId = chip::Test::kMockEndpoint1; +chip::EventId kTestEventIdDebug = chip::Test::MockEventId(1); +chip::EventId kTestEventIdCritical = chip::Test::MockEventId(2); uint8_t kTestFieldValue1 = 1; chip::TLV::Tag kTestEventTag = chip::TLV::ContextTag(1); chip::EndpointId kInvalidTestEndpointId = 3; @@ -67,9 +69,6 @@ chip::DataVersion kTestDataVersion2 = 5; // Number of items in the list for MockAttributeId(4). constexpr int kMockAttribute4ListLength = 6; -static chip::System::Clock::Internal::MockClock gMockClock; -static chip::System::Clock::ClockBase * gRealClock; - class TestContext : public chip::Test::AppContext { public: @@ -134,11 +133,11 @@ void GenerateEvents(nlTestSuite * apSuite, void * apContext) CHIP_ERROR err = CHIP_NO_ERROR; chip::EventNumber eid1, eid2; chip::app::EventOptions options1; - options1.mPath = { kTestEndpointId, kTestClusterId, kTestEventIdDebug }; + options1.mPath = { kTestEventEndpointId, kTestEventClusterId, kTestEventIdDebug }; options1.mPriority = chip::app::PriorityLevel::Info; chip::app::EventOptions options2; - options2.mPath = { kTestEndpointId, kTestClusterId, kTestEventIdCritical }; + options2.mPath = { kTestEventEndpointId, kTestEventClusterId, kTestEventIdCritical }; options2.mPriority = chip::app::PriorityLevel::Critical; TestEventGenerator testEventGenerator; chip::app::EventManagement & logMgmt = chip::app::EventManagement::GetInstance(); @@ -827,8 +826,8 @@ void TestReadInteraction::TestReadRoundtrip(nlTestSuite * apSuite, void * apCont NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); chip::app::EventPathParams eventPathParams[1]; - eventPathParams[0].mEndpointId = kTestEndpointId; - eventPathParams[0].mClusterId = kTestClusterId; + eventPathParams[0].mEndpointId = kTestEventEndpointId; + eventPathParams[0].mClusterId = kTestEventClusterId; chip::app::AttributePathParams attributePathParams[2]; attributePathParams[0].mEndpointId = kTestEndpointId; @@ -1511,12 +1510,12 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); chip::app::EventPathParams eventPathParams[2]; readPrepareParams.mpEventPathParamsList = eventPathParams; - readPrepareParams.mpEventPathParamsList[0].mEndpointId = kTestEndpointId; - readPrepareParams.mpEventPathParamsList[0].mClusterId = kTestClusterId; + readPrepareParams.mpEventPathParamsList[0].mEndpointId = kTestEventEndpointId; + readPrepareParams.mpEventPathParamsList[0].mClusterId = kTestEventClusterId; readPrepareParams.mpEventPathParamsList[0].mEventId = kTestEventIdDebug; - readPrepareParams.mpEventPathParamsList[1].mEndpointId = kTestEndpointId; - readPrepareParams.mpEventPathParamsList[1].mClusterId = kTestClusterId; + readPrepareParams.mpEventPathParamsList[1].mEndpointId = kTestEventEndpointId; + readPrepareParams.mpEventPathParamsList[1].mClusterId = kTestEventClusterId; readPrepareParams.mpEventPathParamsList[1].mEventId = kTestEventIdCritical; readPrepareParams.mEventPathParamsListSize = 2; @@ -1703,11 +1702,11 @@ void TestReadInteraction::TestSubscribeUrgentWildcardEvent(nlTestSuite * apSuite ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); chip::app::EventPathParams eventPathParams[2]; readPrepareParams.mpEventPathParamsList = eventPathParams; - readPrepareParams.mpEventPathParamsList[0].mEndpointId = kTestEndpointId; - readPrepareParams.mpEventPathParamsList[0].mClusterId = kTestClusterId; + readPrepareParams.mpEventPathParamsList[0].mEndpointId = kTestEventEndpointId; + readPrepareParams.mpEventPathParamsList[0].mClusterId = kTestEventClusterId; - readPrepareParams.mpEventPathParamsList[1].mEndpointId = kTestEndpointId; - readPrepareParams.mpEventPathParamsList[1].mClusterId = kTestClusterId; + readPrepareParams.mpEventPathParamsList[1].mEndpointId = kTestEventEndpointId; + readPrepareParams.mpEventPathParamsList[1].mClusterId = kTestEventClusterId; readPrepareParams.mpEventPathParamsList[1].mEventId = kTestEventIdCritical; readPrepareParams.mEventPathParamsListSize = 2; @@ -2385,12 +2384,12 @@ void TestReadInteraction::TestPostSubscribeRoundtripStatusReportTimeout(nlTestSu ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); chip::app::EventPathParams eventPathParams[2]; readPrepareParams.mpEventPathParamsList = eventPathParams; - readPrepareParams.mpEventPathParamsList[0].mEndpointId = kTestEndpointId; - readPrepareParams.mpEventPathParamsList[0].mClusterId = kTestClusterId; + readPrepareParams.mpEventPathParamsList[0].mEndpointId = kTestEventEndpointId; + readPrepareParams.mpEventPathParamsList[0].mClusterId = kTestEventClusterId; readPrepareParams.mpEventPathParamsList[0].mEventId = kTestEventIdDebug; - readPrepareParams.mpEventPathParamsList[1].mEndpointId = kTestEndpointId; - readPrepareParams.mpEventPathParamsList[1].mClusterId = kTestClusterId; + readPrepareParams.mpEventPathParamsList[1].mEndpointId = kTestEventEndpointId; + readPrepareParams.mpEventPathParamsList[1].mClusterId = kTestEventClusterId; readPrepareParams.mpEventPathParamsList[1].mEventId = kTestEventIdCritical; readPrepareParams.mEventPathParamsListSize = 2; @@ -2506,12 +2505,12 @@ void TestReadInteraction::TestSubscribeRoundtripStatusReportTimeout(nlTestSuite ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); chip::app::EventPathParams eventPathParams[2]; readPrepareParams.mpEventPathParamsList = eventPathParams; - readPrepareParams.mpEventPathParamsList[0].mEndpointId = kTestEndpointId; - readPrepareParams.mpEventPathParamsList[0].mClusterId = kTestClusterId; + readPrepareParams.mpEventPathParamsList[0].mEndpointId = kTestEventEndpointId; + readPrepareParams.mpEventPathParamsList[0].mClusterId = kTestEventClusterId; readPrepareParams.mpEventPathParamsList[0].mEventId = kTestEventIdDebug; - readPrepareParams.mpEventPathParamsList[1].mEndpointId = kTestEndpointId; - readPrepareParams.mpEventPathParamsList[1].mClusterId = kTestClusterId; + readPrepareParams.mpEventPathParamsList[1].mEndpointId = kTestEventEndpointId; + readPrepareParams.mpEventPathParamsList[1].mClusterId = kTestEventClusterId; readPrepareParams.mpEventPathParamsList[1].mEventId = kTestEventIdCritical; readPrepareParams.mEventPathParamsListSize = 2; @@ -2686,12 +2685,12 @@ void TestReadInteraction::TestSubscribeRoundtripChunkStatusReportTimeout(nlTestS ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); chip::app::EventPathParams eventPathParams[2]; readPrepareParams.mpEventPathParamsList = eventPathParams; - readPrepareParams.mpEventPathParamsList[0].mEndpointId = kTestEndpointId; - readPrepareParams.mpEventPathParamsList[0].mClusterId = kTestClusterId; + readPrepareParams.mpEventPathParamsList[0].mEndpointId = kTestEventEndpointId; + readPrepareParams.mpEventPathParamsList[0].mClusterId = kTestEventClusterId; readPrepareParams.mpEventPathParamsList[0].mEventId = kTestEventIdDebug; - readPrepareParams.mpEventPathParamsList[1].mEndpointId = kTestEndpointId; - readPrepareParams.mpEventPathParamsList[1].mClusterId = kTestClusterId; + readPrepareParams.mpEventPathParamsList[1].mEndpointId = kTestEventEndpointId; + readPrepareParams.mpEventPathParamsList[1].mClusterId = kTestEventClusterId; readPrepareParams.mpEventPathParamsList[1].mEventId = kTestEventIdCritical; readPrepareParams.mEventPathParamsListSize = 2; @@ -2757,12 +2756,12 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkStatusReportTimeout(nlT ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); chip::app::EventPathParams eventPathParams[2]; readPrepareParams.mpEventPathParamsList = eventPathParams; - readPrepareParams.mpEventPathParamsList[0].mEndpointId = kTestEndpointId; - readPrepareParams.mpEventPathParamsList[0].mClusterId = kTestClusterId; + readPrepareParams.mpEventPathParamsList[0].mEndpointId = kTestEventEndpointId; + readPrepareParams.mpEventPathParamsList[0].mClusterId = kTestEventClusterId; readPrepareParams.mpEventPathParamsList[0].mEventId = kTestEventIdDebug; - readPrepareParams.mpEventPathParamsList[1].mEndpointId = kTestEndpointId; - readPrepareParams.mpEventPathParamsList[1].mClusterId = kTestClusterId; + readPrepareParams.mpEventPathParamsList[1].mEndpointId = kTestEventEndpointId; + readPrepareParams.mpEventPathParamsList[1].mClusterId = kTestEventClusterId; readPrepareParams.mpEventPathParamsList[1].mEventId = kTestEventIdCritical; readPrepareParams.mEventPathParamsListSize = 2; @@ -2859,12 +2858,12 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReportTimeout(nlTestSui ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); chip::app::EventPathParams eventPathParams[2]; readPrepareParams.mpEventPathParamsList = eventPathParams; - readPrepareParams.mpEventPathParamsList[0].mEndpointId = kTestEndpointId; - readPrepareParams.mpEventPathParamsList[0].mClusterId = kTestClusterId; + readPrepareParams.mpEventPathParamsList[0].mEndpointId = kTestEventEndpointId; + readPrepareParams.mpEventPathParamsList[0].mClusterId = kTestEventClusterId; readPrepareParams.mpEventPathParamsList[0].mEventId = kTestEventIdDebug; - readPrepareParams.mpEventPathParamsList[1].mEndpointId = kTestEndpointId; - readPrepareParams.mpEventPathParamsList[1].mClusterId = kTestClusterId; + readPrepareParams.mpEventPathParamsList[1].mEndpointId = kTestEventEndpointId; + readPrepareParams.mpEventPathParamsList[1].mClusterId = kTestEventClusterId; readPrepareParams.mpEventPathParamsList[1].mEventId = kTestEventIdCritical; readPrepareParams.mEventPathParamsListSize = 2; @@ -2960,12 +2959,12 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReport(nlTestSuite * ap ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); chip::app::EventPathParams eventPathParams[2]; readPrepareParams.mpEventPathParamsList = eventPathParams; - readPrepareParams.mpEventPathParamsList[0].mEndpointId = kTestEndpointId; - readPrepareParams.mpEventPathParamsList[0].mClusterId = kTestClusterId; + readPrepareParams.mpEventPathParamsList[0].mEndpointId = kTestEventEndpointId; + readPrepareParams.mpEventPathParamsList[0].mClusterId = kTestEventClusterId; readPrepareParams.mpEventPathParamsList[0].mEventId = kTestEventIdDebug; - readPrepareParams.mpEventPathParamsList[1].mEndpointId = kTestEndpointId; - readPrepareParams.mpEventPathParamsList[1].mClusterId = kTestClusterId; + readPrepareParams.mpEventPathParamsList[1].mEndpointId = kTestEventEndpointId; + readPrepareParams.mpEventPathParamsList[1].mClusterId = kTestEventClusterId; readPrepareParams.mpEventPathParamsList[1].mEventId = kTestEventIdCritical; readPrepareParams.mEventPathParamsListSize = 2; diff --git a/src/app/tests/integration/chip_im_initiator.cpp b/src/app/tests/integration/chip_im_initiator.cpp index bbc65055c9..c9a6a323f9 100644 --- a/src/app/tests/integration/chip_im_initiator.cpp +++ b/src/app/tests/integration/chip_im_initiator.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -659,6 +660,11 @@ bool ConcreteAttributePathExists(const ConcreteAttributePath & aPath) return true; } +Protocols::InteractionModel::Status CheckEventSupportStatus(const ConcreteEventPath & aPath) +{ + return Protocols::InteractionModel::Status::Success; +} + CHIP_ERROR WriteSingleClusterData(const Access::SubjectDescriptor & aSubjectDescriptor, const ConcreteDataAttributePath & aPath, TLV::TLVReader & aReader, WriteHandler *) { diff --git a/src/app/tests/integration/chip_im_responder.cpp b/src/app/tests/integration/chip_im_responder.cpp index 96f49f8d1b..f7b003754d 100644 --- a/src/app/tests/integration/chip_im_responder.cpp +++ b/src/app/tests/integration/chip_im_responder.cpp @@ -28,6 +28,8 @@ #include #include #include +#include +#include #include #include #include @@ -128,6 +130,11 @@ bool ConcreteAttributePathExists(const ConcreteAttributePath & aPath) return true; } +Protocols::InteractionModel::Status CheckEventSupportStatus(const ConcreteEventPath & aPath) +{ + return Protocols::InteractionModel::Status::Success; +} + const EmberAfAttributeMetadata * GetAttributeMetadata(const ConcreteAttributePath & aConcreteClusterPath) { // Note: This test does not make use of the real attribute metadata. diff --git a/src/app/tests/suites/TestEvents.yaml b/src/app/tests/suites/TestEvents.yaml index 03f314fea3..637268ecdc 100644 --- a/src/app/tests/suites/TestEvents.yaml +++ b/src/app/tests/suites/TestEvents.yaml @@ -37,7 +37,8 @@ tests: command: "readEvent" event: "TestEvent" endpoint: 0 - response: [] + response: + error: UNSUPPORTED_CLUSTER - label: "Generate an event on the accessory" command: "TestEmitTestEventRequest" diff --git a/src/app/util/af.h b/src/app/util/af.h index 2acece42a9..6354c4ae53 100644 --- a/src/app/util/af.h +++ b/src/app/util/af.h @@ -37,6 +37,7 @@ #include #include +#include #include #include @@ -130,11 +131,6 @@ EmberAfStatus emberAfReadAttribute(chip::EndpointId endpoint, chip::ClusterId cl extern EmberAfDefinedEndpoint emAfEndpoints[]; #endif -/** - * @brief Macro that takes index of endpoint, and returns Zigbee endpoint - */ -chip::EndpointId emberAfEndpointFromIndex(uint16_t index); - /** * @brief Returns root endpoint of a composed bridged device */ @@ -184,11 +180,6 @@ uint16_t emberAfIndexFromEndpointIncludingDisabledEndpoints(chip::EndpointId end */ uint16_t emberAfFindClusterServerEndpointIndex(chip::EndpointId endpoint, chip::ClusterId clusterId); -/** - * @brief Returns the total number of endpoints (dynamic and pre-compiled). - */ -uint16_t emberAfEndpointCount(void); - /** * @brief Returns the number of pre-compiled endpoints. */ @@ -255,11 +246,6 @@ bool emberAfIsDeviceIdentifying(chip::EndpointId endpoint); */ bool emberAfEndpointEnableDisable(chip::EndpointId endpoint, bool enable); -/** - * @brief Determine if an endpoint at the specified index is enabled or disabled - */ -bool emberAfEndpointIndexIsEnabled(uint16_t index); - /** @brief Returns true if a given ZCL data type is a list type. */ bool emberAfIsThisDataTypeAListType(EmberAfAttributeType dataType); diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index 110a74c39e..b1cb688c8c 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -100,10 +101,6 @@ bool emAfMatchCluster(const EmberAfCluster * cluster, EmberAfAttributeSearchReco bool emAfMatchAttribute(const EmberAfCluster * cluster, const EmberAfAttributeMetadata * am, EmberAfAttributeSearchRecord * attRecord); -// Returns endpoint type for the given endpoint id if there is an enabled -// endpoint with that endpoint id. Otherwise returns null. -const EmberAfEndpointType * emberAfFindEndpointType(chip::EndpointId endpointId); - // Check if a cluster is implemented or not. If yes, the cluster is returned. // // mask = 0 -> find either client or server @@ -148,9 +145,6 @@ chip::Optional emberAfGetNthClusterId(chip::EndpointId endpoint // for the given endpoint and client/server polarity uint8_t emberAfGetClustersFromEndpoint(chip::EndpointId endpoint, chip::ClusterId * clusterList, uint8_t listLen, bool server); -// Returns server cluster within the endpoint, or NULL if it isn't there -const EmberAfCluster * emberAfFindServerCluster(chip::EndpointId endpoint, chip::ClusterId clusterId); - // Returns cluster within the endpoint; Does not ignore disabled endpoints const EmberAfCluster * emberAfFindClusterIncludingDisabledEndpoints(chip::EndpointId endpoint, chip::ClusterId clusterId, EmberAfClusterMask mask); diff --git a/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp index 2a18548ad0..daff2e354c 100644 --- a/src/app/util/ember-compatibility-functions.cpp +++ b/src/app/util/ember-compatibility-functions.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -950,10 +951,9 @@ CHIP_ERROR prepareWriteData(const EmberAfAttributeMetadata * attributeMetadata, } } // namespace -const EmberAfAttributeMetadata * GetAttributeMetadata(const ConcreteAttributePath & aConcreteClusterPath) +const EmberAfAttributeMetadata * GetAttributeMetadata(const ConcreteAttributePath & aPath) { - return emberAfLocateAttributeMetadata(aConcreteClusterPath.mEndpointId, aConcreteClusterPath.mClusterId, - aConcreteClusterPath.mAttributeId); + return emberAfLocateAttributeMetadata(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); } CHIP_ERROR WriteSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, const ConcreteDataAttributePath & aPath, @@ -1064,6 +1064,38 @@ bool IsDeviceTypeOnEndpoint(DeviceTypeId deviceType, EndpointId endpoint) return false; } +Protocols::InteractionModel::Status CheckEventSupportStatus(const ConcreteEventPath & aPath) +{ + using Protocols::InteractionModel::Status; + + const EmberAfEndpointType * type = emberAfFindEndpointType(aPath.mEndpointId); + if (type == nullptr) + { + return Status::UnsupportedEndpoint; + } + + const EmberAfCluster * cluster = emberAfFindClusterInType(type, aPath.mClusterId, CLUSTER_MASK_SERVER); + if (cluster == nullptr) + { + return Status::UnsupportedCluster; + } + +#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE + for (size_t i = 0; i < cluster->eventCount; ++i) + { + if (cluster->eventList[i] == aPath.mEventId) + { + return Status::Success; + } + } + + return Status::UnsupportedEvent; +#else + // No way to tell. Just claim supported. + return Status::Success; +#endif // CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE +} + } // namespace app } // namespace chip diff --git a/src/app/util/endpoint-config-api.h b/src/app/util/endpoint-config-api.h new file mode 100644 index 0000000000..3358d8453c --- /dev/null +++ b/src/app/util/endpoint-config-api.h @@ -0,0 +1,67 @@ +/** + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +/** + * Declarations of function that can be used to query the endpoint configuration + * for the device. + */ + +#include + +/** + * Returns the total number of possible endpoints (dynamic and pre-compiled). + * Not all those endpoints might be enabled, and the dynamic ones might not even + * have an EmberAfEndpointType defined. + * + * Typically only used for endpoint index iteration. + */ +uint16_t emberAfEndpointCount(void); + +/** + * Returns whether the endpoint at the specified index (which must be less than + * emberAfEndpointCount() is enabled. If an endpoint is disabled, it is not + * guaranteed to have an EmberAfEndpointType. + */ +bool emberAfEndpointIndexIsEnabled(uint16_t index); + +/** + * Returns the endpoint id of the endpoint at the given index. Will return + * kInvalidEndpointId for endpoints that are not actually configured. + */ +chip::EndpointId emberAfEndpointFromIndex(uint16_t index); + +/** + * Returns the endpoint descriptor for the given endpoint id if there is an + * enabled endpoint with that endpoint id. Otherwise returns null. + */ +const EmberAfEndpointType * emberAfFindEndpointType(chip::EndpointId endpointId); + +/** + * Returns the cluster descriptor for the given cluster on the given endpoint. + * + * If the given endpoint does not exist or is disabled, returns null. + * + * If the given endpoint does not have the given cluster, returns null. + */ +const EmberAfCluster * emberAfFindServerCluster(chip::EndpointId endpoint, chip::ClusterId clusterId); + +/** + * Returns true if the given endpoint exists, is enabled, has the given cluster, + * and that cluster has the given attribute. + */ +bool emberAfContainsAttribute(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId); diff --git a/src/app/util/mock/attribute-storage.cpp b/src/app/util/mock/attribute-storage.cpp index 3c206ffcbd..585c8894e4 100644 --- a/src/app/util/mock/attribute-storage.cpp +++ b/src/app/util/mock/attribute-storage.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -47,6 +48,7 @@ #include #include +#include #include typedef uint8_t EmberAfClusterMask; @@ -64,6 +66,8 @@ ClusterId clusters[] = { MockClusterId(1), MockClusterId(2), MockClusterId( MockClusterId(1), MockClusterId(2), MockClusterId(3), MockClusterId(4) }; uint16_t attributeIndex[] = { 0, 2, 5, 7, 11, 16, 19, 25, 27 }; uint16_t attributeCount[] = { 2, 3, 2, 4, 5, 3, 6, 2, 2 }; +uint16_t eventIndex[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2 }; +uint16_t eventCount[] = { 2, 0, 0, 0, 0, 0, 0, 0, 0 }; AttributeId attributes[] = { // clang-format off Clusters::Globals::Attributes::ClusterRevision::Id, Clusters::Globals::Attributes::FeatureMap::Id, @@ -77,6 +81,10 @@ AttributeId attributes[] = { Clusters::Globals::Attributes::ClusterRevision::Id, Clusters::Globals::Attributes::FeatureMap::Id // clang-format on }; +EventId events[] = { + MockEventId(1), + MockEventId(2), +}; uint16_t mockClusterRevision = 1; uint32_t mockFeatureMap = 0x1234; @@ -94,6 +102,32 @@ uint8_t mockAttribute4[256] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, }; +#define MOCK_CLUSTER_DECL(idx) \ + { \ + .clusterId = clusters[idx], .attributes = nullptr, /* Not used for now. */ \ + .attributeCount = attributeCount[idx], .clusterSize = 0, /* Not used for now. */ \ + .mask = CLUSTER_MASK_SERVER, .functions = nullptr, .acceptedCommandList = nullptr, /* Not used for now */ \ + .generatedCommandList = nullptr, /* Not used for now */ \ + .eventList = &events[eventIndex[idx]], .eventCount = eventCount[idx], \ + } + +EmberAfCluster clusterStructs[] = { + MOCK_CLUSTER_DECL(0), MOCK_CLUSTER_DECL(1), MOCK_CLUSTER_DECL(2), MOCK_CLUSTER_DECL(3), MOCK_CLUSTER_DECL(4), + MOCK_CLUSTER_DECL(5), MOCK_CLUSTER_DECL(6), MOCK_CLUSTER_DECL(7), MOCK_CLUSTER_DECL(8), +}; + +#define MOCK_ENDPOINT_DECL(idx) \ + { \ + .cluster = &clusterStructs[clusterIndex[idx]], .clusterCount = clusterCount[idx], \ + .endpointSize = 0, /* Not used for now */ \ + } + +EmberAfEndpointType endpointStructs[] = { + MOCK_ENDPOINT_DECL(0), + MOCK_ENDPOINT_DECL(1), + MOCK_ENDPOINT_DECL(2), +}; + } // namespace uint16_t emberAfEndpointCount() @@ -270,6 +304,47 @@ uint16_t emberAfLongStringLength(const uint8_t * buffer) return (length == 0xFFFF ? 0 : length); } +// This will find the first server that has the clusterId given from the index of endpoint. +bool emberAfContainsServerFromIndex(uint16_t index, ClusterId clusterId) +{ + if (index == kEmberInvalidEndpointIndex) + { + return false; + } + + return clusterId; // Mock version return true as long as the endpoint is + // valid +} + +const EmberAfEndpointType * emberAfFindEndpointType(EndpointId endpointId) +{ + uint16_t ep = emberAfIndexFromEndpoint(endpointId); + if (ep == UINT16_MAX) + { + return nullptr; + } + return &endpointStructs[ep]; +} + +const EmberAfCluster * emberAfFindServerCluster(EndpointId endpoint, ClusterId clusterId) +{ + auto * endpointType = emberAfFindEndpointType(endpoint); + if (endpointType == nullptr) + { + return nullptr; + } + + for (decltype(endpointType->clusterCount) idx = 0; idx < endpointType->clusterCount; ++idx) + { + auto * cluster = &endpointType->cluster[idx]; + if (cluster->clusterId == clusterId && (cluster->mask & CLUSTER_MASK_SERVER)) + { + return cluster; + } + } + return nullptr; +} + namespace chip { namespace app { AttributeAccessInterface * GetAttributeAccessOverride(EndpointId aEndpointId, ClusterId aClusterId) diff --git a/src/app/util/util.h b/src/app/util/util.h index b3f1a880f2..d535405c93 100644 --- a/src/app/util/util.h +++ b/src/app/util/util.h @@ -19,6 +19,9 @@ #include +#include +#include + // Cluster name structure typedef struct { @@ -64,8 +67,6 @@ uint8_t * emberAfPutBlockInResp(const uint8_t * data, uint16_t length); uint8_t * emberAfPutStringInResp(const uint8_t * buffer); void emberAfPutInt16sInResp(int16_t value); -bool emberAfContainsAttribute(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId); - /* @brief returns true if the attribute is known to be volatile (i.e. RAM * storage). */ diff --git a/src/controller/tests/data_model/TestRead.cpp b/src/controller/tests/data_model/TestRead.cpp index 86832270ce..a2f473e7ec 100644 --- a/src/controller/tests/data_model/TestRead.cpp +++ b/src/controller/tests/data_model/TestRead.cpp @@ -20,6 +20,8 @@ #include "transport/SecureSession.h" #include #include +#include +#include #include #include #include @@ -239,6 +241,11 @@ bool ConcreteAttributePathExists(const ConcreteAttributePath & aPath) return true; } +Protocols::InteractionModel::Status CheckEventSupportStatus(const ConcreteEventPath & aPath) +{ + return Protocols::InteractionModel::Status::Success; +} + } // namespace app } // namespace chip diff --git a/src/darwin/Framework/CHIP/MTRIMDispatch.mm b/src/darwin/Framework/CHIP/MTRIMDispatch.mm index 3884d02369..e155843bfa 100644 --- a/src/darwin/Framework/CHIP/MTRIMDispatch.mm +++ b/src/darwin/Framework/CHIP/MTRIMDispatch.mm @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -223,6 +224,11 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aPath, TLV::TLVRea } } + Protocols::InteractionModel::Status CheckEventSupportStatus(const ConcreteEventPath & aPath) + { + return Protocols::InteractionModel::Status::UnsupportedEvent; + } + } // namespace app } // namespace chip @@ -305,3 +311,42 @@ uint8_t emberAfClusterIndex(EndpointId endpoint, ClusterId clusterId, EmberAfClu } bool emberAfEndpointIndexIsEnabled(uint16_t index) { return index == 0; } + +namespace { +const CommandId acceptedCommands[] = { Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Id, + Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Id, + Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Id, kInvalidCommandId }; +const CommandId generatedCommands[] = { Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::Id, + Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::Id, kInvalidCommandId }; +const EmberAfCluster otaProviderCluster { + .clusterId = Clusters::OtaSoftwareUpdateProvider::Id, + .attributes = nullptr, + .attributeCount = 0, + .clusterSize = 0, + .mask = CLUSTER_MASK_SERVER, + .functions = nullptr, + .acceptedCommandList = acceptedCommands, + .generatedCommandList = generatedCommands, + .eventList = nullptr, + .eventCount = 0, +}; +const EmberAfEndpointType otaProviderEndpoint { .cluster = &otaProviderCluster, .clusterCount = 1, .endpointSize = 0 }; +} + +const EmberAfEndpointType * emberAfFindEndpointType(EndpointId endpoint) +{ + if (endpoint == kSupportedEndpoint) { + return &otaProviderEndpoint; + } + + return nullptr; +} + +const EmberAfCluster * emberAfFindServerCluster(EndpointId endpoint, ClusterId cluster) +{ + if (endpoint == kSupportedEndpoint && cluster == Clusters::OtaSoftwareUpdateProvider::Id) { + return &otaProviderCluster; + } + + return nullptr; +} diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m index 2a444a85ce..024c168dc3 100644 --- a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m +++ b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m @@ -1871,9 +1871,7 @@ - (void)test023_SubscribeMultipleAttributes XCTestExpectation * onOffReportExpectation = [self expectationWithDescription:@"report OnOff attribute"]; XCTestExpectation * attributeErrorReportExpectation = [self expectationWithDescription:@"report nonexistent attribute"]; - // TODO: Right now the server does not seem to actually produce an error - // when trying to subscribe to events on a non-existent endpoint. - // XCTestExpectation * eventErrorReportExpectation = [self expectationWithDescription:@"report nonexistent event"]; + XCTestExpectation * eventErrorReportExpectation = [self expectationWithDescription:@"report nonexistent event"]; globalReportHandler = ^(id _Nullable values, NSError * _Nullable error) { XCTAssertNil(error); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); @@ -1903,18 +1901,14 @@ - (void)test023_SubscribeMultipleAttributes } } else if (result[@"eventPath"] != nil) { MTREventPath * path = result[@"eventPath"]; - XCTAssertEqualObjects(path.endpoint, @1); - XCTAssertEqualObjects(path.cluster, failClusterId); + XCTAssertEqualObjects(path.endpoint, failEndpointId); + XCTAssertEqualObjects(path.cluster, @40); XCTAssertEqualObjects(path.event, @0); XCTAssertNil(result[@"data"]); XCTAssertNotNil(result[@"error"]); XCTAssertEqual( [MTRErrorTestUtils errorToZCLErrorCode:result[@"error"]], MTRInteractionErrorCodeUnsupportedEndpoint); - // TODO: Right now the server does not seem to actually produce an error - // when trying to subscribe to events on a non-existent - // endpoint. Catch it if it starts doing that. - XCTFail("Need to re-enable the eventErrorReportExpectation bits"); - // [eventErrorReportExpectation fulfill]; + [eventErrorReportExpectation fulfill]; } else { XCTFail("Unexpected result dictionary"); } @@ -1940,9 +1934,7 @@ - (void)test023_SubscribeMultipleAttributes resubscriptionScheduled:nil]; // Wait till establishment - [self waitForExpectations:@[ - onOffReportExpectation, attributeErrorReportExpectation, /* eventErrorReportExpectation, */ expectation - ] + [self waitForExpectations:@[ onOffReportExpectation, attributeErrorReportExpectation, eventErrorReportExpectation, expectation ] timeout:kTimeoutInSeconds]; // Set up expectation for report @@ -1951,19 +1943,28 @@ - (void)test023_SubscribeMultipleAttributes XCTAssertNil(error); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); XCTAssertTrue([values isKindOfClass:[NSArray class]]); - NSDictionary * result = values[0]; - MTRAttributePath * path = result[@"attributePath"]; - // We will only be getting incremental reports for the OnOff attribute. - XCTAssertEqualObjects(path.endpoint, @1); - XCTAssertEqualObjects(path.cluster, @6); - XCTAssertEqualObjects(path.attribute, @0); + for (NSDictionary * result in values) { + // Note: we will get updates for our event subscription too, each time + // with errors. + if (result[@"eventPath"] != nil) { + continue; + } - XCTAssertTrue([result[@"data"] isKindOfClass:[NSDictionary class]]); - XCTAssertTrue([result[@"data"][@"type"] isEqualToString:@"Boolean"]); - if ([result[@"data"][@"value"] boolValue] == YES) { - [reportExpectation fulfill]; - globalReportHandler = nil; + MTRAttributePath * path = result[@"attributePath"]; + XCTAssertNotNil(path); + + // We will only be getting incremental attribute reports for the OnOff attribute. + XCTAssertEqualObjects(path.endpoint, @1); + XCTAssertEqualObjects(path.cluster, @6); + XCTAssertEqualObjects(path.attribute, @0); + + XCTAssertTrue([result[@"data"] isKindOfClass:[NSDictionary class]]); + XCTAssertTrue([result[@"data"][@"type"] isEqualToString:@"Boolean"]); + if ([result[@"data"][@"value"] boolValue] == YES) { + [reportExpectation fulfill]; + globalReportHandler = nil; + } } }; @@ -2008,16 +2009,26 @@ - (void)test023_SubscribeMultipleAttributes XCTAssertNil(error); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); XCTAssertTrue([values isKindOfClass:[NSArray class]]); - NSDictionary * result = values[0]; - MTRAttributePath * path = result[@"attributePath"]; - XCTAssertEqualObjects(path.endpoint, @1); - XCTAssertEqualObjects(path.cluster, @6); - XCTAssertEqualObjects(path.attribute, @0); - XCTAssertTrue([result[@"data"] isKindOfClass:[NSDictionary class]]); - XCTAssertTrue([result[@"data"][@"type"] isEqualToString:@"Boolean"]); - if ([result[@"data"][@"value"] boolValue] == NO) { - [reportExpectation fulfill]; - globalReportHandler = nil; + + for (NSDictionary * result in values) { + // Note: we will get updates for our event subscription too, each time + // with errors. + if (result[@"eventPath"] != nil) { + continue; + } + + MTRAttributePath * path = result[@"attributePath"]; + XCTAssertNotNil(path); + + XCTAssertEqualObjects(path.endpoint, @1); + XCTAssertEqualObjects(path.cluster, @6); + XCTAssertEqualObjects(path.attribute, @0); + XCTAssertTrue([result[@"data"] isKindOfClass:[NSDictionary class]]); + XCTAssertTrue([result[@"data"][@"type"] isEqualToString:@"Boolean"]); + if ([result[@"data"][@"value"] boolValue] == NO) { + [reportExpectation fulfill]; + globalReportHandler = nil; + } } }; diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index a0ab20c57b..9719352722 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -66105,6 +66105,10 @@ class TestEventsSuite : public TestCommand case 2: switch (mTestSubStepIndex) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER)); + mTestSubStepIndex++; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); break; @@ -66290,7 +66294,7 @@ class TestEventsSuite : public TestCommand } case 2: { LogStep(2, "Check reading events from an invalid endpoint"); - mTestSubStepCount = 0; + mTestSubStepCount = 1; return ReadEvent(kIdentityAlpha, GetEndpoint(0), UnitTesting::Id, UnitTesting::Events::TestEvent::Id, false, chip::NullOptional); } From ad4e3e387bdb9c03927b62ee73161e9fba53fa85 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 25 May 2023 14:01:41 -0400 Subject: [PATCH 12/15] [nrf fromtree] Update Groups cluster XML to match spec. (#26819) * Update Groups cluster XML to match spec. Spec changes happened in https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/6429 Fixes https://github.com/project-chip/connectedhomeip/issues/26209 * Auto-update ZAP files. * Regenerate generated code. --- .../all-clusters-app.matter | 6 +- .../all-clusters-common/all-clusters-app.zap | 6 +- .../all-clusters-minimal-app.matter | 6 +- .../all-clusters-minimal-app.zap | 6 +- .../bridge-app/bridge-common/bridge-app.zap | 2 +- ...p_rootnode_dimmablelight_bCwGYSDpoe.matter | 6 +- ...noip_rootnode_dimmablelight_bCwGYSDpoe.zap | 4 +- ...de_colortemperaturelight_hbUnzYVeyn.matter | 6 +- ...tnode_colortemperaturelight_hbUnzYVeyn.zap | 4 +- .../rootnode_contactsensor_lFAGG1bfRO.matter | 6 +- .../rootnode_contactsensor_lFAGG1bfRO.zap | 4 +- .../rootnode_dimmablelight_bCwGYSDpoe.matter | 6 +- .../rootnode_dimmablelight_bCwGYSDpoe.zap | 4 +- .../rootnode_doorlock_aNKYAreMXE.matter | 6 +- .../devices/rootnode_doorlock_aNKYAreMXE.zap | 4 +- ...tnode_extendedcolorlight_8lcaaYJVAa.matter | 6 +- ...rootnode_extendedcolorlight_8lcaaYJVAa.zap | 4 +- .../devices/rootnode_fan_7N2TobIlOX.matter | 6 +- .../chef/devices/rootnode_fan_7N2TobIlOX.zap | 4 +- .../rootnode_flowsensor_1zVxHedlaV.matter | 12 +- .../rootnode_flowsensor_1zVxHedlaV.zap | 4 +- ...tnode_heatingcoolingunit_ncdGai1E5a.matter | 6 +- ...rootnode_heatingcoolingunit_ncdGai1E5a.zap | 4 +- .../rootnode_humiditysensor_Xyj4gda6Hb.matter | 12 +- .../rootnode_humiditysensor_Xyj4gda6Hb.zap | 4 +- .../rootnode_lightsensor_lZQycTFcJK.matter | 12 +- .../rootnode_lightsensor_lZQycTFcJK.zap | 4 +- ...rootnode_occupancysensor_iHyVgifZuo.matter | 12 +- .../rootnode_occupancysensor_iHyVgifZuo.zap | 4 +- .../rootnode_onofflight_bbs1b7IaOV.matter | 6 +- .../rootnode_onofflight_bbs1b7IaOV.zap | 4 +- ...ootnode_onofflightswitch_FsPlMr090Q.matter | 6 +- .../rootnode_onofflightswitch_FsPlMr090Q.zap | 4 +- ...rootnode_onoffpluginunit_Wtf8ss5EBY.matter | 6 +- .../rootnode_onoffpluginunit_Wtf8ss5EBY.zap | 4 +- .../rootnode_pressuresensor_s0qC9wLH4k.matter | 12 +- .../rootnode_pressuresensor_s0qC9wLH4k.zap | 4 +- .../rootnode_speaker_RpzeXdimqA.matter | 6 +- .../devices/rootnode_speaker_RpzeXdimqA.zap | 2 +- ...otnode_temperaturesensor_Qy1zkNW7c3.matter | 12 +- .../rootnode_temperaturesensor_Qy1zkNW7c3.zap | 4 +- .../rootnode_thermostat_bm3fb8dhYi.matter | 6 +- .../rootnode_thermostat_bm3fb8dhYi.zap | 4 +- .../rootnode_windowcovering_RLCxaGi9Yx.matter | 6 +- .../rootnode_windowcovering_RLCxaGi9Yx.zap | 4 +- .../contact-sensor-app.matter | 6 +- .../contact-sensor-app.zap | 4 +- .../bridge-common/bridge-app.zap | 2 +- .../light-switch-app.matter | 6 +- .../light-switch-common/light-switch-app.zap | 6 +- .../data_model/lighting-app-thread.matter | 6 +- .../data_model/lighting-app-thread.zap | 4 +- .../data_model/lighting-app-wifi.matter | 6 +- .../data_model/lighting-app-wifi.zap | 4 +- .../lighting-common/lighting-app.matter | 6 +- .../lighting-common/lighting-app.zap | 4 +- .../nxp/zap/lighting-on-off.matter | 6 +- .../lighting-app/nxp/zap/lighting-on-off.zap | 4 +- examples/lighting-app/qpg/zap/light.matter | 6 +- examples/lighting-app/qpg/zap/light.zap | 4 +- .../data_model/lighting-wifi-app.matter | 6 +- .../SiWx917/data_model/lighting-wifi-app.zap | 4 +- .../data_model/lighting-thread-app.matter | 6 +- .../efr32/data_model/lighting-thread-app.zap | 11 +- .../efr32/data_model/lighting-wifi-app.zap | 4 +- examples/lock-app/lock-common/lock-app.zap | 4 +- examples/lock-app/nxp/zap/lock-app.zap | 2 +- examples/lock-app/qpg/zap/lock.matter | 6 +- examples/lock-app/qpg/zap/lock.zap | 4 +- .../log-source-common/log-source-app.zap | 2 +- .../ota-provider-common/ota-provider-app.zap | 2 +- .../ota-requestor-app.matter | 6 +- .../ota-requestor-app.zap | 4 +- .../placeholder/linux/apps/app1/config.matter | 6 +- .../placeholder/linux/apps/app1/config.zap | 4976 +++++++++++++++++ .../placeholder/linux/apps/app2/config.matter | 6 +- .../placeholder/linux/apps/app2/config.zap | 2 +- examples/pump-app/pump-common/pump-app.zap | 2 +- .../pump-controller-app.zap | 2 +- .../temperature-measurement.zap | 4 +- .../thermostat-common/thermostat.matter | 6 +- .../thermostat-common/thermostat.zap | 4 +- examples/tv-app/tv-common/tv-app.zap | 2 +- .../tv-casting-common/tv-casting-app.matter | 6 +- .../tv-casting-common/tv-casting-app.zap | 4 +- examples/window-app/common/window-app.matter | 6 +- examples/window-app/common/window-app.zap | 6 +- .../zap/tests/inputs/all-clusters-app.zap | 6 +- .../tools/zap/tests/inputs/lighting-app.zap | 4 +- .../clusters/groups-server/groups-server.cpp | 8 +- .../zcl/data-model/chip/groups-cluster.xml | 7 +- .../data_model/controller-clusters.matter | 6 +- .../data_model/controller-clusters.zap | 2 +- .../CHIPAttributeTLVValueDecoder.cpp | 2 +- .../python/chip/clusters/Objects.py | 3 + .../CHIP/templates/availability.yaml | 5 +- .../CHIP/zap-generated/MTRBaseClusters.h | 8 + .../CHIP/zap-generated/MTRBaseClusters.mm | 8 +- .../CHIP/zap-generated/MTRCallbackBridge.h | 30 + .../CHIP/zap-generated/MTRCallbackBridge.mm | 23 + .../zap-generated/attributes/Accessors.cpp | 8 +- .../zap-generated/attributes/Accessors.h | 5 +- .../app-common/zap-generated/cluster-enums.h | 6 + .../zap-generated/cluster-objects.h | 9 +- .../zap-generated/cluster/Commands.h | 6 +- .../cluster/logging/DataModelLogger.cpp | 2 +- .../chip-tool/zap-generated/test/Commands.h | 1009 ++-- 107 files changed, 6044 insertions(+), 540 deletions(-) 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 0cf14341ac..a3cd5c367c 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 @@ -63,7 +63,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 8c645de17c..3e8e2ec872 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -279,7 +279,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -9199,7 +9199,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -21749,7 +21749,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, 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 c5a85c03ab..f98191e52a 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 @@ -57,7 +57,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index 8ccacaf941..ed8e7364aa 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -279,7 +279,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -8736,7 +8736,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -21187,7 +21187,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 87aff9c887..7b89400450 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -5957,7 +5957,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 6a4d8ddd2f..72fa7ec115 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -57,7 +57,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap index bb927e9cdc..f64b2ce50c 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5735,7 +5735,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index d3e2e4f1d7..b058072487 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -63,7 +63,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap index 1b151c0c6d..be52b0fe6e 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5720,7 +5720,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index 67a9957cc7..467afb2174 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -57,7 +57,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap index b60155192a..5fc3ddbb58 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5584,7 +5584,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index b02fd871ec..a7e2fd745c 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -57,7 +57,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap index 67b075fe34..35860c9c10 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5760,7 +5760,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index 4a65b6ec23..799c01b72f 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -57,7 +57,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap index d3f8b5cefa..7d0ce847ec 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5584,7 +5584,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index b930a77109..76ac338181 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -57,7 +57,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap index ee043c1975..f52a8941d7 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5584,7 +5584,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index 0184f55ea7..db93f82dfb 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -63,7 +63,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap index 56a127c501..e74e920ee9 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5768,7 +5768,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 5a6ce98fdf..49ac4a10c2 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -57,7 +57,11 @@ client cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -128,7 +132,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap index be73608565..50746e28d2 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5584,7 +5584,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 5645faafec..f1df78af91 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -57,7 +57,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap index 8c71d1a954..9d55b52567 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5584,7 +5584,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 85c29d39db..a8b2228d6c 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -57,7 +57,11 @@ client cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -128,7 +132,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap index 2a41f49fd5..60d08e542b 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5584,7 +5584,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 914ff39853..0ac450d1aa 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -57,7 +57,11 @@ client cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -128,7 +132,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap index 0404fe4a4b..993c59a904 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5584,7 +5584,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 7fb1b7d3fe..3dda6d8b63 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -57,7 +57,11 @@ client cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -128,7 +132,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap index 6f86fdbb29..a223695adf 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5584,7 +5584,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index 6d224d2d25..480185c602 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -57,7 +57,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap index 4deb87b2cc..4341e3ef41 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5584,7 +5584,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index 55bf7b8a64..075fa75bf4 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -57,7 +57,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap index 95855e2279..682f3ab072 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5584,7 +5584,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 50878d3fd8..e0bc0f193b 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -57,7 +57,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap index 075d425549..1f5ab5c41f 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5584,7 +5584,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index 21db6a5ffb..2d97b5c656 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -57,7 +57,11 @@ client cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -128,7 +132,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap index 6062728ccf..b90d65fcf9 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5584,7 +5584,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index 35e6efc6ff..aa7db5d166 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -57,7 +57,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap index 2e6d8405d6..e96a40b3b1 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index d1ed28a745..a5ed1a6a37 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -57,7 +57,11 @@ client cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -128,7 +132,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap index ffe39cbd28..94bdd1e1fa 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5584,7 +5584,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 322bfa30fe..1101f0d305 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -57,7 +57,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap index 7d40c50e40..9dbc3a50b9 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5632,7 +5632,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index df34979e9d..0104e885d3 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -57,7 +57,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap index c7e89df17b..ad220dbf9a 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5584,7 +5584,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter index 041ffa8bb9..629cca9dee 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter @@ -63,7 +63,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap index d93ae8c356..581b26090a 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5711,7 +5711,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/dynamic-bridge-app/bridge-common/bridge-app.zap b/examples/dynamic-bridge-app/bridge-common/bridge-app.zap index 570bfd85a4..8923af5dc4 100644 --- a/examples/dynamic-bridge-app/bridge-common/bridge-app.zap +++ b/examples/dynamic-bridge-app/bridge-common/bridge-app.zap @@ -5946,7 +5946,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, 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 c807d33312..6c94bedf85 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 @@ -111,7 +111,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.zap b/examples/light-switch-app/light-switch-common/light-switch-app.zap index e38ff2637a..e834d15068 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.zap +++ b/examples/light-switch-app/light-switch-common/light-switch-app.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5883,7 +5883,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -8563,7 +8563,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter index 10d41625f7..093cab8407 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -63,7 +63,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap index 3678fd1646..6a6e85a1ae 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5684,7 +5684,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter index cd4d0833e0..7bfc04d444 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -63,7 +63,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap index cb6676170a..2a2caf3cc4 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5684,7 +5684,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index ac3941ed0d..d3c01b5a36 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -63,7 +63,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 755f82a37b..0a91b489ff 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5684,7 +5684,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index b3228bd4b1..416062cb72 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -63,7 +63,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.zap b/examples/lighting-app/nxp/zap/lighting-on-off.zap index 42c0aa1a90..1f900f22ef 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.zap +++ b/examples/lighting-app/nxp/zap/lighting-on-off.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5812,7 +5812,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index 690c1ef00c..98ad19a1a1 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -63,7 +63,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/lighting-app/qpg/zap/light.zap b/examples/lighting-app/qpg/zap/light.zap index ccd32d3549..3cc8da8e74 100644 --- a/examples/lighting-app/qpg/zap/light.zap +++ b/examples/lighting-app/qpg/zap/light.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6732,7 +6732,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.matter index 10f515bf77..d90f8bd556 100644 --- a/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.matter @@ -63,7 +63,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.zap b/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.zap index 9131b9a381..011769908f 100644 --- a/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.zap +++ b/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5537,7 +5537,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.matter index 4ed2862926..9db4b6a230 100644 --- a/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.matter @@ -63,7 +63,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.zap b/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.zap index 05a948eec9..bbe998c646 100644 --- a/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -2149,7 +2149,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "RegulatoryLocationType", + "type": "RegulatoryLocationTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -2165,7 +2165,7 @@ "code": 3, "mfgCode": null, "side": "server", - "type": "RegulatoryLocationType", + "type": "RegulatoryLocationTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -5652,6 +5652,8 @@ "mfgCode": null, "side": "client", "type": "int16u", + "side": "server", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7796,6 +7798,5 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.zap b/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.zap index 9131b9a381..a47fe59932 100644 --- a/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.zap +++ b/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5753,7 +5753,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index 3f4335a182..9b922925f9 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5647,7 +5647,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/lock-app/nxp/zap/lock-app.zap b/examples/lock-app/nxp/zap/lock-app.zap index 5e68c03464..939ca3bb99 100644 --- a/examples/lock-app/nxp/zap/lock-app.zap +++ b/examples/lock-app/nxp/zap/lock-app.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index 4466f92a12..7344c231ef 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -63,7 +63,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/lock-app/qpg/zap/lock.zap b/examples/lock-app/qpg/zap/lock.zap index 9e480a2bbb..d369ddcbc2 100644 --- a/examples/lock-app/qpg/zap/lock.zap +++ b/examples/lock-app/qpg/zap/lock.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6655,7 +6655,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/log-source-app/log-source-common/log-source-app.zap b/examples/log-source-app/log-source-common/log-source-app.zap index c5836ae746..230802deba 100644 --- a/examples/log-source-app/log-source-common/log-source-app.zap +++ b/examples/log-source-app/log-source-common/log-source-app.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap index 485543b869..19ff897e24 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, 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 1d69db27f6..cda194bf13 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 @@ -63,7 +63,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; 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 2e385b38a0..d614c913bf 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 @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5384,7 +5384,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 368ed130bf..05ea4fd7f8 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -63,7 +63,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index 7bd6786e0d..4a1a216032 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -8431,6 +8431,4414 @@ } ] }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AlarmMask", + "code": 29, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ThermostatRunningMode", + "code": 30, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StartOfWeek", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NumberOfWeeklyTransitions", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "7", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NumberOfDailyTransitions", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TemperatureSetpointHold", + "code": 35, + "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": "TemperatureSetpointHoldDuration", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ThermostatProgrammingOperationMode", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ThermostatRunningState", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SetpointChangeSource", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SetpointChangeAmount", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SetpointChangeSourceTimestamp", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "utc", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupiedSetback", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupiedSetbackMin", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupiedSetbackMax", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UnoccupiedSetback", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UnoccupiedSetbackMin", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UnoccupiedSetbackMax", + "code": 57, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "EmergencyHeatDelta", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x009F6", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ACType", + "code": 64, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ACCapacity", + "code": 65, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ACRefrigerantType", + "code": 66, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ACCompressorType", + "code": 67, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ACErrorCode", + "code": 68, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 0, + "storageOption": "External", + "singleton": 1, + "bounded": 1, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ACLouverPosition", + "code": 69, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ACCoilTemperature", + "code": 70, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ACCapacityFormat", + "code": 71, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x000b", + "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": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thermostat User Interface Configuration", + "code": 516, + "mfgCode": null, + "define": "THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 1, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Thermostat User Interface Configuration", + "code": 516, + "mfgCode": null, + "define": "THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "TemperatureDisplayMode", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "KeypadLockout", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScheduleProgrammingVisibility", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Illuminance Measurement", + "code": 1024, + "mfgCode": null, + "define": "ILLUMINANCE_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Illuminance Measurement", + "code": 1024, + "mfgCode": null, + "define": "ILLUMINANCE_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFFFE", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LightSensorType", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 1, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Pressure Measurement", + "code": 1027, + "mfgCode": null, + "define": "PRESSURE_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Pressure Measurement", + "code": 1027, + "mfgCode": null, + "define": "PRESSURE_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ScaledValue", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MinScaledValue", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MaxScaledValue", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ScaledTolerance", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Scale", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Flow Measurement", + "code": 1028, + "mfgCode": null, + "define": "FLOW_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Flow Measurement", + "code": 1028, + "mfgCode": null, + "define": "FLOW_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Relative Humidity Measurement", + "code": 1029, + "mfgCode": null, + "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 1, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Relative Humidity Measurement", + "code": 1029, + "mfgCode": null, + "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x2710", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Target Navigator", + "code": 1285, + "mfgCode": null, + "define": "TARGET_NAVIGATOR_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "NavigateTarget", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "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": "Target Navigator", + "code": 1285, + "mfgCode": null, + "define": "TARGET_NAVIGATOR_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "NavigateTargetResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "TargetList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentTarget", + "code": 1, + "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": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Keypad Input", + "code": 1289, + "mfgCode": null, + "define": "KEYPAD_INPUT_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "SendKey", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "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": "Keypad Input", + "code": 1289, + "mfgCode": null, + "define": "KEYPAD_INPUT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "SendKeyResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Content Launcher", + "code": 1290, + "mfgCode": null, + "define": "CONTENT_LAUNCHER_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "LaunchContent", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "LaunchURL", + "code": 1, + "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Content Launcher", + "code": 1290, + "mfgCode": null, + "define": "CONTENT_LAUNCHER_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "LauncherResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "AcceptHeader", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedStreamingProtocols", + "code": 1, + "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": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Application Basic", + "code": 1293, + "mfgCode": null, + "define": "APPLICATION_BASIC_CLUSTER", + "side": "client", + "enabled": 1, + "attributes": [ + { + "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": "Application Basic", + "code": 1293, + "mfgCode": null, + "define": "APPLICATION_BASIC_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "VendorName", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ApplicationName", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Application", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "ApplicationStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Status", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "ApplicationStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ApplicationVersion", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AllowedVendorList", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Account Login", + "code": 1294, + "mfgCode": null, + "define": "ACCOUNT_LOGIN_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "GetSetupPIN", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Login", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Logout", + "code": 3, + "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": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Account Login", + "code": 1294, + "mfgCode": null, + "define": "ACCOUNT_LOGIN_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "GetSetupPINResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Application Launcher", + "code": 1292, + "mfgCode": null, + "define": "APPLICATION_LAUNCHER_CLUSTER", + "side": "client", + "enabled": 1, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "commands": [ + { + "name": "LaunchApp", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "StopApp", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "HideApp", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ] + }, + { + "name": "Application Launcher", + "code": 1292, + "mfgCode": null, + "define": "APPLICATION_LAUNCHER_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "CatalogList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentApp", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "ApplicationEP", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "commands": [ + { + "name": "LauncherResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ] + }, + { + "name": "Audio Output", + "code": 1291, + "mfgCode": null, + "define": "AUDIO_OUTPUT_CLUSTER", + "side": "client", + "enabled": 1, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "commands": [ + { + "name": "SelectOutput", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RenameOutput", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ] + }, + { + "name": "Audio Output", + "code": 1291, + "mfgCode": null, + "define": "AUDIO_OUTPUT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "OutputList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentOutput", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Channel", + "code": 1284, + "mfgCode": null, + "define": "CHANNEL_CLUSTER", + "side": "client", + "enabled": 1, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "commands": [ + { + "name": "ChangeChannel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ChangeChannelByNumber", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "SkipChannel", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ] + }, + { + "name": "Channel", + "code": 1284, + "mfgCode": null, + "define": "CHANNEL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ChannelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Lineup", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "LineupInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentChannel", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "ChannelInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": 65344, + "reportableChange": 0 + } + ], + "commands": [ + { + "name": "ChangeChannelResponse", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ] + }, + { + "name": "Low Power", + "code": 1288, + "mfgCode": null, + "define": "LOW_POWER_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "Sleep", + "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Low Power", + "code": 1288, + "mfgCode": null, + "define": "LOW_POWER_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "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": "Media Playback", + "code": 1286, + "mfgCode": null, + "define": "MEDIA_PLAYBACK_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "Play", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Pause", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Stop", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StartOver", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Previous", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Next", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Rewind", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "FastForward", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SkipForward", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SkipBackward", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Seek", + "code": 11, + "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": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Media Playback", + "code": 1286, + "mfgCode": null, + "define": "MEDIA_PLAYBACK_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "PlaybackResponse", + "code": 10, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "CurrentState", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PlaybackStateType", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartTime", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "epoch_us", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Duration", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SampledPosition", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "PlaybackPositionType", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PlaybackSpeed", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "SingleType", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SeekRangeEnd", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SeekRangeStart", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "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": "Media Input", + "code": 1287, + "mfgCode": null, + "define": "MEDIA_INPUT_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "SelectInput", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ShowInputStatus", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "HideInputStatus", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RenameInput", + "code": 3, + "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Media Input", + "code": 1287, + "mfgCode": null, + "define": "MEDIA_INPUT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "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": "InputList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "InputInfoStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentInput", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "name": "Anonymous Endpoint Type", + "deviceTypeName": "MA-dimmablelight", + "deviceTypeCode": 257, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "TriggerEffect", + "code": 64, + "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": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "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": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetSceneMembership", + "code": 6, + "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": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConfiguredBy", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "node_id", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OffWithEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OnWithRecallGlobalScene", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OnWithTimedOff", + "code": 66, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GlobalSceneControl", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTime", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffWaitTime", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpOnOff", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "OnOffStartUpOnOff", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "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": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Level Control", "code": 8, @@ -8477,6 +12885,574 @@ "mfgCode": null, "side": "server", "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxLevel", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFE", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentFrequency", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinFrequency", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxFrequency", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Options", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "LevelControlOptions", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnOffTransitionTime", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnLevel", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTransitionTime", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffTransitionTime", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultMoveRate", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpCurrentLevel", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "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": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", "included": 0, "storageOption": "RAM", "singleton": 0, diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 71f3160070..97c6597ce8 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -63,7 +63,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index e0b0a83f65..ba2fdc1c65 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -6362,7 +6362,7 @@ "code": 16, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/pump-app/pump-common/pump-app.zap b/examples/pump-app/pump-common/pump-app.zap index e4d2ea5488..64b4ae5e73 100644 --- a/examples/pump-app/pump-common/pump-app.zap +++ b/examples/pump-app/pump-common/pump-app.zap @@ -291,7 +291,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap index 2b88845ed5..770283ef06 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap @@ -279,7 +279,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap index f389822f27..fc48a7d4b8 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -3520,7 +3520,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 9779243ed3..f740a6aa02 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -111,7 +111,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 81ca71a259..d89741d6cd 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -255,7 +255,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7875,7 +7875,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index f93946ca6f..0d2c8621fe 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, 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 abb8e9f1ed..e7b046486e 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 @@ -57,7 +57,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index 134634cc5e..9630354a36 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7298,7 +7298,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 20956c32c6..4846954174 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -63,7 +63,11 @@ server cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index 72c2db91f2..efa858885c 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -327,7 +327,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6521,7 +6521,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -8057,7 +8057,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap index 9eced6973e..5916c42154 100644 --- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap +++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap @@ -279,7 +279,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -8969,7 +8969,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -21154,7 +21154,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/scripts/tools/zap/tests/inputs/lighting-app.zap b/scripts/tools/zap/tests/inputs/lighting-app.zap index 111412a752..32a0973c1c 100644 --- a/scripts/tools/zap/tests/inputs/lighting-app.zap +++ b/scripts/tools/zap/tests/inputs/lighting-app.zap @@ -239,7 +239,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5652,7 +5652,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/src/app/clusters/groups-server/groups-server.cpp b/src/app/clusters/groups-server/groups-server.cpp index 9a5604dd3b..a56c4f64bb 100644 --- a/src/app/clusters/groups-server/groups-server.cpp +++ b/src/app/clusters/groups-server/groups-server.cpp @@ -118,12 +118,8 @@ static EmberAfStatus GroupRemove(FabricIndex fabricIndex, EndpointId endpointId, void emberAfGroupsClusterServerInitCallback(EndpointId endpointId) { - // The most significant bit of the NameSupport attribute indicates whether or not group names are supported - // - // According to spec, highest bit (Group Names supported) MUST match feature bit 0 (Group Names supported) - static constexpr uint8_t kNameSuppportFlagGroupNamesSupported = 0x80; - - EmberAfStatus status = Attributes::NameSupport::Set(endpointId, kNameSuppportFlagGroupNamesSupported); + // According to spec, highest bit (Group Names) MUST match feature bit 0 (Group Names) + EmberAfStatus status = Attributes::NameSupport::Set(endpointId, NameSupportBitmap::kGroupNames); if (status != EMBER_ZCL_STATUS_SUCCESS) { ChipLogDetail(Zcl, "ERR: writing NameSupport %x", status); diff --git a/src/app/zap-templates/zcl/data-model/chip/groups-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/groups-cluster.xml index 1e9b215d6e..507804b438 100644 --- a/src/app/zap-templates/zcl/data-model/chip/groups-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/groups-cluster.xml @@ -22,6 +22,11 @@ limitations under the License. + + + + + Groups General @@ -34,7 +39,7 @@ limitations under the License. - NameSupport + NameSupport diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index cf47d784ff..a01590671a 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -65,7 +65,11 @@ client cluster Groups = 4 { kGroupNames = 0x1; } - readonly attribute bitmap8 nameSupport = 0; + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 841e857929..abcf9683af 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -343,7 +343,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index e4586c7b7a..ff667deae0 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -219,7 +219,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); + cppValue.Raw(), value); return value; } case Attributes::GeneratedCommandList::Id: { diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 224ef39d75..4ab97409da 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -293,6 +293,9 @@ class Bitmaps: class GroupsFeature(IntFlag): kGroupNames = 0x1 + class NameSupportBitmap(IntFlag): + kGroupNames = 0x80 + class Commands: @dataclass class AddGroup(ClusterCommand): diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 33e51e15d8..a8abf7c4a9 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -7113,7 +7113,8 @@ - Other bitmaps: Groups: - - GroupsFeature + - Feature + - NameSupportBitmap PressureMeasurement: - PressureMeasurementFeature PumpConfigurationAndControl: @@ -7124,6 +7125,8 @@ Groups: GroupsFeature: - GroupNames + NameSupportBitmap: + - GroupNames PressureMeasurement: PressureMeasurementFeature: - Extended diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index f55d723105..7898ba38bf 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -18859,6 +18859,14 @@ typedef NS_OPTIONS(uint32_t, MTRGroupsGroupClusterFeature) { = 0x1, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) MTR_NEWLY_DEPRECATED("Please use MTRGroupsFeature"); +typedef NS_OPTIONS(uint8_t, MTRGroupsNameSupportBitmap) { + MTRGroupsNameSupportBitmapGroupNames MTR_NEWLY_AVAILABLE = 0x80, +} MTR_NEWLY_AVAILABLE; + +typedef NS_OPTIONS(uint32_t, MTRScenesFeature) { + MTRScenesFeatureSceneNames MTR_NEWLY_AVAILABLE = 0x1, +} MTR_NEWLY_AVAILABLE; + typedef NS_OPTIONS(uint8_t, MTRScenesCopyMode) { MTRScenesCopyModeCopyAllScenes API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 9feecb955c..b7a0a41a27 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -1065,7 +1065,7 @@ - (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable va { MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; - return MTRReadAttribute( + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -1074,7 +1074,7 @@ - (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; - MTRSubscribeAttribute(params, + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -1084,9 +1084,9 @@ + (void)readAttributeNameSupportWithClusterStateCache:(MTRClusterStateCacheConta queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRGroupsNameSupportAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(GroupsNameSupportAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h index ac61e7fc8f..41bb6f6029 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h @@ -570,6 +570,7 @@ typedef void (*IdentifyAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*IdentifyAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*GroupsNameSupportAttributeCallback)(void *, chip::BitMask); typedef void (*GroupsGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*GroupsAcceptedCommandListListAttributeCallback)(void * context, @@ -2087,6 +2088,35 @@ class MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge : public M MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRGroupsNameSupportAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRGroupsNameSupportAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRGroupsNameSupportAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, chip::BitMask value); +}; + +class MTRGroupsNameSupportAttributeCallbackSubscriptionBridge : public MTRGroupsNameSupportAttributeCallbackBridge +{ +public: + MTRGroupsNameSupportAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRGroupsNameSupportAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRGroupsNameSupportAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGroupsNameSupportAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRGroupsGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index 0fecca0312..54e254619c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -817,6 +817,29 @@ } } +void MTRGroupsNameSupportAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void MTRGroupsNameSupportAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + void MTRGroupsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { 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 6dd1d09dfa..0f640b6736 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 @@ -170,9 +170,9 @@ namespace Attributes { namespace NameSupport { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Groups::Id, Id, readable, sizeof(temp)); @@ -184,9 +184,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; 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 2d919d595c..040b76fd90 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 @@ -63,8 +63,9 @@ namespace Groups { namespace Attributes { namespace NameSupport { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value); // NameSupportBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace NameSupport namespace FeatureMap { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index 9b423e822a..a21b2c2fcc 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -103,6 +103,12 @@ enum class GroupsFeature : uint32_t { kGroupNames = 0x1, }; + +// Bitmap for NameSupportBitmap +enum class NameSupportBitmap : uint8_t +{ + kGroupNames = 0x80, +}; } // namespace Groups namespace Scenes { 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 68ee013cd1..b606023499 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 @@ -741,9 +741,9 @@ namespace Attributes { namespace NameSupport { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::NameSupport::Id; } @@ -795,7 +795,8 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::NameSupport::TypeInfo::DecodableType nameSupport = static_cast(0); + Attributes::NameSupport::TypeInfo::DecodableType nameSupport = + static_cast>(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 8a0226fa4c..b57527b19e 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -8598,8 +8598,8 @@ void registerClusterScenes(Commands & commands, CredentialIssuerCommands * creds WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "scene-valid", 0, 1, Attributes::SceneValid::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "name-support", 0, UINT8_MAX, Attributes::NameSupport::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "name-support", 0, UINT8_MAX, Attributes::NameSupport::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "last-configured-by", 0, UINT64_MAX, Attributes::LastConfiguredBy::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -16196,4 +16196,4 @@ void registerClusters(Commands & commands, CredentialIssuerCommands * credsIssue registerClusterUnitTesting(commands, credsIssuerConfig); registerClusterFaultInjection(commands, credsIssuerConfig); registerClusterSubscriptions(commands, credsIssuerConfig); -} +} \ No newline at end of file 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 210e152050..a4d4ef0648 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -4413,7 +4413,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP switch (path.mAttributeId) { case Groups::Attributes::NameSupport::Id: { - uint8_t value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("NameSupport", 1, value); } diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 9719352722..f84ae4b309 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -2806,13 +2806,13 @@ class Test_TC_ACL_2_3Suite : public TestCommand new ListHolder(1); listFreer.add(listHolder_0); - listHolder_0->mList[0].data = mDOkSingle.HasValue() - ? mDOkSingle.Value() - : chip::ByteSpan( + listHolder_0->mList[0].data = mDOkSingle.HasValue() + ? mDOkSingle.Value() + : chip::ByteSpan( chip::Uint8::from_const_char( "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69" - "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" - "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), + "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" + "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), 71); listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; @@ -2844,16 +2844,16 @@ class Test_TC_ACL_2_3Suite : public TestCommand new ListHolder(1); listFreer.add(listHolder_0); - listHolder_0->mList[0].data = mDOkFull.HasValue() - ? mDOkFull.Value() - : chip::ByteSpan(chip::Uint8::from_const_char( + listHolder_0->mList[0].data = mDOkFull.HasValue() + ? mDOkFull.Value() + : chip::ByteSpan(chip::Uint8::from_const_char( "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20" - "\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65" - "\x6E\x74\x20\x6C\x69\x76\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72" - "\x69\x6E\x67\x00\xD0\x00\x00\xF1\xFF\x02\x00\x31\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C" - "\x64\x2E\x20\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C" - "\x65\x6D\x65\x6E\x74\x20\x61\x67\x61\x69\x6E\x2E\x2E\x2E\x2E\x2E\x00\x18"), - 128); + "\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65" + "\x6E\x74\x20\x6C\x69\x76\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72" + "\x69\x6E\x67\x00\xD0\x00\x00\xF1\xFF\x02\x00\x31\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C" + "\x64\x2E\x20\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C" + "\x65\x6D\x65\x6E\x74\x20\x61\x67\x61\x69\x6E\x2E\x2E\x2E\x2E\x2E\x00\x18"), + 128); listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; value = chip::app::DataModel::List( @@ -2884,16 +2884,16 @@ class Test_TC_ACL_2_3Suite : public TestCommand new ListHolder(1); listFreer.add(listHolder_0); - listHolder_0->mList[0].data = mDBadLength.HasValue() - ? mDBadLength.Value() - : chip::ByteSpan(chip::Uint8::from_const_char( + listHolder_0->mList[0].data = mDBadLength.HasValue() + ? mDBadLength.Value() + : chip::ByteSpan(chip::Uint8::from_const_char( "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20" - "\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65" - "\x6E\x74\x20\x6C\x69\x76\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72" - "\x69\x6E\x67\x00\xD0\x00\x00\xF1\xFF\x02\x00\x32\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C" - "\x64\x2E\x20\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C" - "\x65\x6D\x65\x6E\x74\x20\x61\x67\x61\x69\x6E\x2E\x2E\x2E\x2E\x2E\x2E\x00\x18"), - 129); + "\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65" + "\x6E\x74\x20\x6C\x69\x76\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72" + "\x69\x6E\x67\x00\xD0\x00\x00\xF1\xFF\x02\x00\x32\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C" + "\x64\x2E\x20\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C" + "\x65\x6D\x65\x6E\x74\x20\x61\x67\x61\x69\x6E\x2E\x2E\x2E\x2E\x2E\x2E\x00\x18"), + 129); listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; value = chip::app::DataModel::List( @@ -2940,13 +2940,13 @@ class Test_TC_ACL_2_3Suite : public TestCommand new ListHolder(1); listFreer.add(listHolder_0); - listHolder_0->mList[0].data = mDBadList.HasValue() - ? mDBadList.Value() - : chip::ByteSpan( + listHolder_0->mList[0].data = mDBadList.HasValue() + ? mDBadList.Value() + : chip::ByteSpan( chip::Uint8::from_const_char( "\x37\x01\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68" - "\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69" - "\x76\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), + "\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69" + "\x76\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), 72); listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; @@ -2971,13 +2971,13 @@ class Test_TC_ACL_2_3Suite : public TestCommand new ListHolder(1); listFreer.add(listHolder_0); - listHolder_0->mList[0].data = mDBadElem.HasValue() - ? mDBadElem.Value() - : chip::ByteSpan(chip::Uint8::from_const_char( + listHolder_0->mList[0].data = mDBadElem.HasValue() + ? mDBadElem.Value() + : chip::ByteSpan(chip::Uint8::from_const_char( "\x17\x10\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69\x73\x20\x69" - "\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" - "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), - 65); + "\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" + "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), + 65); listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; value = chip::app::DataModel::List( @@ -3001,13 +3001,13 @@ class Test_TC_ACL_2_3Suite : public TestCommand new ListHolder(1); listFreer.add(listHolder_0); - listHolder_0->mList[0].data = mDBadOverflow.HasValue() - ? mDBadOverflow.Value() - : chip::ByteSpan( + listHolder_0->mList[0].data = mDBadOverflow.HasValue() + ? mDBadOverflow.Value() + : chip::ByteSpan( chip::Uint8::from_const_char( "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69" - "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" - "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18\xFF"), + "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" + "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18\xFF"), 72); listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; @@ -3032,13 +3032,13 @@ class Test_TC_ACL_2_3Suite : public TestCommand new ListHolder(1); listFreer.add(listHolder_0); - listHolder_0->mList[0].data = mDBadUnderflow.HasValue() - ? mDBadUnderflow.Value() - : chip::ByteSpan( + listHolder_0->mList[0].data = mDBadUnderflow.HasValue() + ? mDBadUnderflow.Value() + : chip::ByteSpan( chip::Uint8::from_const_char( "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69" - "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" - "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00"), + "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" + "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00"), 70); listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; @@ -3092,13 +3092,13 @@ class Test_TC_ACL_2_3Suite : public TestCommand mDOkEmpty.HasValue() ? mDOkEmpty.Value() : chip::ByteSpan(chip::Uint8::from_const_char("\x17\x18"), 2); listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - listHolder_0->mList[1].data = mDOkSingle.HasValue() - ? mDOkSingle.Value() - : chip::ByteSpan( + listHolder_0->mList[1].data = mDOkSingle.HasValue() + ? mDOkSingle.Value() + : chip::ByteSpan( chip::Uint8::from_const_char( "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69" - "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" - "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), + "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" + "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), 71); listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; @@ -5881,8 +5881,8 @@ class Test_TC_ACL_2_7Suite : public TestCommand "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; + 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, AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, @@ -5972,13 +5972,13 @@ class Test_TC_ACL_2_7Suite : public TestCommand new ListHolder(1); listFreer.add(listHolder_0); - listHolder_0->mList[0].data = mDOkSingle.HasValue() - ? mDOkSingle.Value() - : chip::ByteSpan( + listHolder_0->mList[0].data = mDOkSingle.HasValue() + ? mDOkSingle.Value() + : chip::ByteSpan( chip::Uint8::from_const_char( "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69" - "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" - "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), + "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" + "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), 71); listHolder_0->mList[0].fabricIndex = TH2FabricIndex; @@ -6495,8 +6495,8 @@ class Test_TC_ACL_2_8Suite : public TestCommand "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; + 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, AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, @@ -7280,8 +7280,8 @@ class Test_TC_ACL_2_10Suite : public TestCommand "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; + 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, AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, @@ -7467,13 +7467,13 @@ class Test_TC_ACL_2_10Suite : public TestCommand new ListHolder(1); listFreer.add(listHolder_0); - listHolder_0->mList[0].data = mDOkSingle.HasValue() - ? mDOkSingle.Value() - : chip::ByteSpan( + listHolder_0->mList[0].data = mDOkSingle.HasValue() + ? mDOkSingle.Value() + : chip::ByteSpan( chip::Uint8::from_const_char( "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69" - "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" - "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), + "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" + "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), 71); listHolder_0->mList[0].fabricIndex = TH2FabricIndex; @@ -7590,13 +7590,13 @@ class Test_TC_ACL_2_10Suite : public TestCommand new ListHolder(1); listFreer.add(listHolder_0); - listHolder_0->mList[0].data = mDOkSingle.HasValue() - ? mDOkSingle.Value() - : chip::ByteSpan( + listHolder_0->mList[0].data = mDOkSingle.HasValue() + ? mDOkSingle.Value() + : chip::ByteSpan( chip::Uint8::from_const_char( "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69" - "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" - "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), + "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" + "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), 71); listHolder_0->mList[0].fabricIndex = TH2FabricIndex; @@ -8720,8 +8720,8 @@ class Test_TC_ACE_1_5Suite : public TestCommand "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; + 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, AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, @@ -31840,7 +31840,8 @@ class Test_TC_TGTNAV_8_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -66105,10 +66106,6 @@ class TestEventsSuite : public TestCommand case 2: switch (mTestSubStepIndex) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER)); - mTestSubStepIndex++; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); break; @@ -66294,7 +66291,7 @@ class TestEventsSuite : public TestCommand } case 2: { LogStep(2, "Check reading events from an invalid endpoint"); - mTestSubStepCount = 1; + mTestSubStepCount = 0; return ReadEvent(kIdentityAlpha, GetEndpoint(0), UnitTesting::Id, UnitTesting::Events::TestEvent::Id, false, chip::NullOptional); } @@ -89746,8 +89743,8 @@ class Test_TC_G_2_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - uint8_t NameSupportFeatureSupportedValue; - uint8_t NameSupportValue; + chip::BitMask NameSupportFeatureSupportedValue; + chip::BitMask NameSupportValue; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -89768,7 +89765,7 @@ class Test_TC_G_2_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("nameSupport", value, 128U)); NameSupportFeatureSupportedValue = value; @@ -89777,7 +89774,7 @@ class Test_TC_G_2_1Suite : public TestCommand case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("nameSupport", value, 0U)); NameSupportValue = value; @@ -89789,7 +89786,7 @@ class Test_TC_G_2_1Suite : public TestCommand case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("nameSupport", value, NameSupportFeatureSupportedValue)); } @@ -89797,7 +89794,7 @@ class Test_TC_G_2_1Suite : public TestCommand case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("nameSupport", value, NameSupportValue)); } @@ -89840,8 +89837,8 @@ class Test_TC_G_2_1Suite : public TestCommand LogStep(3, "TH writes NameSupport attribute as 0x80 EXOR the value as read in step 1"); VerifyOrDo(!ShouldSkip("G.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - uint8_t value; - value = 128U; + chip::BitMask value; + value = static_cast>(128U); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, value, chip::NullOptional, chip::NullOptional); } @@ -89912,7 +89909,8 @@ class Test_TC_DD_1_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -89967,7 +89965,8 @@ class Test_TC_DD_1_6Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -90022,7 +90021,8 @@ class Test_TC_DD_1_7Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -90077,7 +90077,8 @@ class Test_TC_DD_1_8Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -90132,7 +90133,8 @@ class Test_TC_DD_1_9Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -90187,7 +90189,8 @@ class Test_TC_DD_1_10Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -90242,7 +90245,8 @@ class Test_TC_DD_1_11Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -90297,7 +90301,8 @@ class Test_TC_DD_1_12Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -90352,7 +90357,8 @@ class Test_TC_DD_1_13Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -90407,7 +90413,8 @@ class Test_TC_DD_1_14Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -90462,7 +90469,8 @@ class Test_TC_DD_1_15Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -90517,7 +90525,8 @@ class Test_TC_DD_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -90572,7 +90581,8 @@ class Test_TC_DD_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -90627,7 +90637,8 @@ class Test_TC_DD_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -90682,7 +90693,8 @@ class Test_TC_DD_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -90737,7 +90749,8 @@ class Test_TC_DD_3_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -90792,7 +90805,8 @@ class Test_TC_DD_3_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -90847,7 +90861,8 @@ class Test_TC_DD_3_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -90902,7 +90917,8 @@ class Test_TC_DD_3_6Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -90957,7 +90973,8 @@ class Test_TC_DD_3_7Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -91012,7 +91029,8 @@ class Test_TC_DD_3_8Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -91067,7 +91085,8 @@ class Test_TC_DD_3_9Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -91122,7 +91141,8 @@ class Test_TC_DD_3_10Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -91177,7 +91197,8 @@ class Test_TC_DD_3_11Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -91232,7 +91253,8 @@ class Test_TC_DD_3_12Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -91287,7 +91309,8 @@ class Test_TC_DD_3_13Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -91342,7 +91365,8 @@ class Test_TC_DD_3_14Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -91397,7 +91421,8 @@ class Test_TC_DD_3_15Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -91452,7 +91477,8 @@ class Test_TC_DD_3_16Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -91507,7 +91533,8 @@ class Test_TC_DD_3_17Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -91562,7 +91589,8 @@ class Test_TC_DD_3_18Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -91617,7 +91645,8 @@ class Test_TC_DD_3_19Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -91672,7 +91701,8 @@ class Test_TC_DD_3_20Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -91727,7 +91757,8 @@ class Test_TC_DD_3_21Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -92239,7 +92270,8 @@ class Test_TC_G_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -92294,7 +92326,8 @@ class Test_TC_G_2_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -92349,7 +92382,8 @@ class Test_TC_G_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -92404,7 +92438,8 @@ class Test_TC_BDX_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -92459,7 +92494,8 @@ class Test_TC_BDX_1_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -92514,7 +92550,8 @@ class Test_TC_BDX_1_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -92569,7 +92606,8 @@ class Test_TC_BDX_1_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -92624,7 +92662,8 @@ class Test_TC_BDX_1_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -92679,7 +92718,8 @@ class Test_TC_BDX_1_6Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -92734,7 +92774,8 @@ class Test_TC_BDX_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -92789,7 +92830,8 @@ class Test_TC_BDX_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -92844,7 +92886,8 @@ class Test_TC_BDX_2_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -92899,7 +92942,8 @@ class Test_TC_BDX_2_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -92954,7 +92998,8 @@ class Test_TC_BDX_2_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -93009,7 +93054,8 @@ class Test_TC_BR_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -93064,7 +93110,8 @@ class Test_TC_BR_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -93119,7 +93166,8 @@ class Test_TC_BR_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -93174,7 +93222,8 @@ class Test_TC_BR_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -93229,7 +93278,8 @@ class Test_TC_DA_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -93284,7 +93334,8 @@ class Test_TC_DA_1_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -93339,7 +93390,8 @@ class Test_TC_DA_1_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -93394,7 +93446,8 @@ class Test_TC_DA_1_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -93449,7 +93502,8 @@ class Test_TC_DA_1_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -93504,7 +93558,8 @@ class Test_TC_DA_1_6Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -93559,7 +93614,8 @@ class Test_TC_BINFO_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -93614,7 +93670,8 @@ class Test_TC_BINFO_2_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -93670,7 +93727,8 @@ class Test_TC_OPCREDS_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -93726,7 +93784,8 @@ class Test_TC_OPCREDS_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -93782,7 +93841,8 @@ class Test_TC_OPCREDS_3_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -93838,7 +93898,8 @@ class Test_TC_OPCREDS_3_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -93894,7 +93955,8 @@ class Test_TC_OPCREDS_3_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -93950,7 +94012,8 @@ class Test_TC_OPCREDS_3_6Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -94005,7 +94068,8 @@ class Test_TC_CNET_4_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -94060,7 +94124,8 @@ class Test_TC_CNET_4_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -94115,7 +94180,8 @@ class Test_TC_CNET_4_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -94170,7 +94236,8 @@ class Test_TC_CNET_4_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -94225,7 +94292,8 @@ class Test_TC_CNET_4_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -94280,7 +94348,8 @@ class Test_TC_CNET_4_6Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -94335,7 +94404,8 @@ class Test_TC_CNET_4_9Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -94390,7 +94460,8 @@ class Test_TC_CNET_4_10Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -94445,7 +94516,8 @@ class Test_TC_CNET_4_11Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -94500,7 +94572,8 @@ class Test_TC_CNET_4_12Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -94555,7 +94628,8 @@ class Test_TC_CNET_4_13Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -94610,7 +94684,8 @@ class Test_TC_CNET_4_14Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -94665,7 +94740,8 @@ class Test_TC_CNET_4_15Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -94720,7 +94796,8 @@ class Test_TC_CNET_4_16Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -94775,7 +94852,8 @@ class Test_TC_CNET_4_17Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -94830,7 +94908,8 @@ class Test_TC_CNET_4_18Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -94885,7 +94964,8 @@ class Test_TC_CNET_4_19Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -94940,7 +95020,8 @@ class Test_TC_CNET_4_20Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -94995,7 +95076,8 @@ class Test_TC_CNET_4_21Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -95050,7 +95132,8 @@ class Test_TC_CNET_4_22Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -95105,7 +95188,8 @@ class Test_TC_DLOG_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -95160,7 +95244,8 @@ class Test_TC_DLOG_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -95215,7 +95300,8 @@ class Test_TC_DLOG_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -95270,7 +95356,8 @@ class Test_TC_DESC_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -95325,7 +95412,8 @@ class Test_TC_DGETH_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -95380,7 +95468,8 @@ class Test_TC_CGEN_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -95435,7 +95524,8 @@ class Test_TC_DGGEN_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -95490,7 +95580,8 @@ class Test_TC_DGGEN_2_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -95545,7 +95636,8 @@ class Test_TC_DGGEN_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -95600,7 +95692,8 @@ class Test_TC_I_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -95655,7 +95748,8 @@ class Test_TC_I_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -95710,7 +95804,8 @@ class Test_TC_ILL_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -95765,7 +95860,8 @@ class Test_TC_IDM_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -95820,7 +95916,8 @@ class Test_TC_IDM_1_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -95875,7 +95972,8 @@ class Test_TC_IDM_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -95930,7 +96028,8 @@ class Test_TC_IDM_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -95985,7 +96084,8 @@ class Test_TC_IDM_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -96040,7 +96140,8 @@ class Test_TC_IDM_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -96095,7 +96196,8 @@ class Test_TC_IDM_4_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -96150,7 +96252,8 @@ class Test_TC_IDM_4_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -96205,7 +96308,8 @@ class Test_TC_IDM_4_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -96260,7 +96364,8 @@ class Test_TC_IDM_4_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -96315,7 +96420,8 @@ class Test_TC_IDM_5_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -96370,7 +96476,8 @@ class Test_TC_IDM_5_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -96425,7 +96532,8 @@ class Test_TC_IDM_6_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -96480,7 +96588,8 @@ class Test_TC_IDM_6_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -96535,7 +96644,8 @@ class Test_TC_IDM_6_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -96590,7 +96700,8 @@ class Test_TC_IDM_6_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -96645,7 +96756,8 @@ class Test_TC_IDM_7_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -96700,7 +96812,8 @@ class Test_TC_IDM_8_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -96756,7 +96869,8 @@ class Test_TC_LOWPOWER_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -96812,7 +96926,8 @@ class Test_TC_APPLAUNCHER_3_7_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -96868,7 +96983,8 @@ class Test_TC_APPLAUNCHER_3_8_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -96924,7 +97040,8 @@ class Test_TC_APPLAUNCHER_3_9_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -96980,7 +97097,8 @@ class Test_TC_MEDIAINPUT_3_14Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -97036,7 +97154,8 @@ class Test_TC_MEDIAINPUT_3_15Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -97092,7 +97211,8 @@ class Test_TC_MEDIAINPUT_3_16Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -97148,7 +97268,8 @@ class Test_TC_MEDIAINPUT_3_17Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -97204,7 +97325,8 @@ class Test_TC_CHANNEL_5_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -97260,7 +97382,8 @@ class Test_TC_CHANNEL_5_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -97316,7 +97439,8 @@ class Test_TC_CHANNEL_5_6Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -97372,7 +97496,8 @@ class Test_TC_KEYPADINPUT_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -97428,7 +97553,8 @@ class Test_TC_MEDIAPLAYBACK_6_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -97484,7 +97610,8 @@ class Test_TC_MEDIAPLAYBACK_6_7Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -97540,7 +97667,8 @@ class Test_TC_AUDIOOUTPUT_7_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -97596,7 +97724,8 @@ class Test_TC_AUDIOOUTPUT_7_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -97652,7 +97781,8 @@ class Test_TC_CONTENTLAUNCHER_10_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -97708,7 +97838,8 @@ class Test_TC_CONTENTLAUNCHER_10_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -97764,7 +97895,8 @@ class Test_TC_CONTENTLAUNCHER_10_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -97820,7 +97952,8 @@ class Test_TC_CONTENTLAUNCHER_10_7Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -97875,7 +98008,8 @@ class Test_TC_MC_11_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -97930,7 +98064,8 @@ class Test_TC_MC_11_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -97986,7 +98121,8 @@ class Test_TC_ALOGIN_12_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -98042,7 +98178,8 @@ class Test_TC_WAKEONLAN_4_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -98098,7 +98235,8 @@ class Test_TC_ALOGIN_12_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -98153,7 +98291,8 @@ class Test_TC_CADMIN_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -98208,7 +98347,8 @@ class Test_TC_CADMIN_1_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -98263,7 +98403,8 @@ class Test_TC_CADMIN_1_7Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -98318,7 +98459,8 @@ class Test_TC_CADMIN_1_8Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -98374,7 +98516,8 @@ class Test_TC_CADMIN_1_11Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -98430,7 +98573,8 @@ class Test_TC_CADMIN_1_12Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -98486,7 +98630,8 @@ class Test_TC_CADMIN_1_14Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -98542,7 +98687,8 @@ class Test_TC_CADMIN_1_15Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -99066,7 +99212,8 @@ class Test_TC_CADMIN_1_17Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -99122,7 +99269,8 @@ class Test_TC_CADMIN_1_18Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -99178,7 +99326,8 @@ class Test_TC_CADMIN_1_19Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -99234,7 +99383,8 @@ class Test_TC_CADMIN_1_20Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -99548,8 +99698,8 @@ class Test_TC_CADMIN_1_22Suite : public TestCommand "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; + 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, AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, @@ -99595,8 +99745,8 @@ class Test_TC_CADMIN_1_22Suite : public TestCommand "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; + 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, AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, @@ -99665,7 +99815,8 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -100182,7 +100333,8 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -100613,7 +100765,8 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -101160,7 +101313,8 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -101474,8 +101628,8 @@ class Test_TC_CADMIN_1_24Suite : public TestCommand "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; + 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, AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, @@ -101521,8 +101675,8 @@ class Test_TC_CADMIN_1_24Suite : public TestCommand "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; + 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, AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, @@ -101591,7 +101745,8 @@ class Test_TC_MOD_1_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -101646,7 +101801,8 @@ class Test_TC_MOD_1_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -101701,7 +101857,8 @@ class Test_TC_MOD_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -101756,7 +101913,8 @@ class Test_TC_MOD_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -101811,7 +101969,8 @@ class Test_TC_MOD_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -101866,7 +102025,8 @@ class Test_TC_MOD_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -101921,7 +102081,8 @@ class Test_TC_MOD_3_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -101976,7 +102137,8 @@ class Test_TC_MOD_3_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -102031,7 +102193,8 @@ class Test_TC_SU_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -102086,7 +102249,8 @@ class Test_TC_SU_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -102141,7 +102305,8 @@ class Test_TC_SU_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -102196,7 +102361,8 @@ class Test_TC_SU_2_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -102251,7 +102417,8 @@ class Test_TC_SU_2_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -102306,7 +102473,8 @@ class Test_TC_SU_2_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -102361,7 +102529,8 @@ class Test_TC_SU_2_6Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -102416,7 +102585,8 @@ class Test_TC_SU_2_7Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -102471,7 +102641,8 @@ class Test_TC_SU_2_8Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -102526,7 +102697,8 @@ class Test_TC_SU_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -102581,7 +102753,8 @@ class Test_TC_SU_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -102636,7 +102809,8 @@ class Test_TC_SU_3_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -102691,7 +102865,8 @@ class Test_TC_SU_3_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -102746,7 +102921,8 @@ class Test_TC_SU_4_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -102801,7 +102977,8 @@ class Test_TC_SU_4_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -102856,7 +103033,8 @@ class Test_TC_PSCFG_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -102911,7 +103089,8 @@ class Test_TC_PSCFG_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -102966,7 +103145,8 @@ class Test_TC_PRS_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -103021,7 +103201,8 @@ class Test_TC_SC_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -103076,7 +103257,8 @@ class Test_TC_SC_1_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -103131,7 +103313,8 @@ class Test_TC_SC_1_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -103186,7 +103369,8 @@ class Test_TC_SC_1_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -103241,7 +103425,8 @@ class Test_TC_SC_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -103296,7 +103481,8 @@ class Test_TC_SC_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -103351,7 +103537,8 @@ class Test_TC_SC_2_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -103406,7 +103593,8 @@ class Test_TC_SC_2_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -103461,7 +103649,8 @@ class Test_TC_SC_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -103516,7 +103705,8 @@ class Test_TC_SC_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -103571,7 +103761,8 @@ class Test_TC_SC_3_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -103626,7 +103817,8 @@ class Test_TC_SC_3_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -103681,7 +103873,8 @@ class Test_TC_SC_4_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -103736,7 +103929,8 @@ class Test_TC_SC_4_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -103791,7 +103985,8 @@ class Test_TC_SC_4_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -103846,7 +104041,8 @@ class Test_TC_SC_4_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -103901,7 +104097,8 @@ class Test_TC_SC_4_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -103956,7 +104153,8 @@ class Test_TC_SC_4_6Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -104011,7 +104209,8 @@ class Test_TC_SC_4_7Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -104066,7 +104265,8 @@ class Test_TC_SC_4_8Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -104121,7 +104321,8 @@ class Test_TC_SC_4_9Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -104176,7 +104377,8 @@ class Test_TC_SC_4_10Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -104231,7 +104433,8 @@ class Test_TC_SC_5_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -104286,7 +104489,8 @@ class Test_TC_SC_6_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -104341,7 +104545,8 @@ class Test_TC_DGSW_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -104396,7 +104601,8 @@ class Test_TC_DGSW_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -104451,7 +104657,8 @@ class Test_TC_DGSW_2_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -104506,7 +104713,8 @@ class Test_TC_DGSW_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -104561,7 +104769,8 @@ class Test_TC_DGWIFI_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -104616,7 +104825,8 @@ class Test_TC_DGWIFI_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -104671,7 +104881,8 @@ class Test_TC_WNCV_6_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -104726,7 +104937,8 @@ class Test_TC_WNCV_7_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -104898,7 +105110,8 @@ class Test_TC_FLW_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -105064,7 +105277,8 @@ class Test_TC_PS_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -105119,7 +105333,8 @@ class Test_TC_PS_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -105174,7 +105389,8 @@ class Test_TC_BOOL_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -105229,7 +105445,8 @@ class Test_TC_BOOL_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -105284,7 +105501,8 @@ class Test_TC_CC_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -105339,7 +105557,8 @@ class Test_TC_CC_3_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -105394,7 +105613,8 @@ class Test_TC_CC_4_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -105449,7 +105669,8 @@ class Test_TC_CC_5_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -105504,7 +105725,8 @@ class Test_TC_CC_6_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -105559,7 +105781,8 @@ class Test_TC_CC_7_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -105614,7 +105837,8 @@ class Test_TC_CC_9_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -109511,7 +109735,8 @@ class Test_TC_DRLK_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -109566,7 +109791,8 @@ class Test_TC_DRLK_2_8Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -109621,7 +109847,8 @@ class Test_TC_DRLK_2_10Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -109676,7 +109903,8 @@ class Test_TC_DRLK_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -109731,7 +109959,8 @@ class Test_TC_DRLK_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -109786,7 +110015,8 @@ class Test_TC_DRLK_3_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -109841,7 +110071,8 @@ class Test_TC_LCFG_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -109896,7 +110127,8 @@ class Test_TC_LVL_2_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -109951,7 +110183,8 @@ class Test_TC_LVL_7_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -110006,7 +110239,8 @@ class Test_TC_LVL_8_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -111892,7 +112126,8 @@ class Test_TC_OO_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -111947,7 +112182,8 @@ class Test_TC_OO_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -112149,7 +112385,8 @@ class Test_TC_SWTCH_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -112204,7 +112441,8 @@ class Test_TC_SWTCH_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -112259,7 +112497,8 @@ class Test_TC_SWTCH_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -112463,7 +112702,8 @@ class Test_TC_TMP_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -112518,7 +112758,8 @@ class Test_TC_TSTAT_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -112573,7 +112814,8 @@ class Test_TC_TSTAT_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -112628,7 +112870,8 @@ class Test_TC_TSUIC_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -112684,7 +112927,8 @@ class Test_TC_DGTHREAD_2_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -112740,7 +112984,8 @@ class Test_TC_DGTHREAD_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -112796,7 +113041,8 @@ class Test_TC_DGTHREAD_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -112852,7 +113098,8 @@ class Test_TC_DGTHREAD_3_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -112908,7 +113155,8 @@ class Test_TC_DGTHREAD_3_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -112964,7 +113212,8 @@ class Test_TC_DGTHREAD_3_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -113019,7 +113268,8 @@ class Test_TC_ACT_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -113074,7 +113324,8 @@ class Test_TC_ACT_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -113129,7 +113380,8 @@ class Test_TC_ACT_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -113184,7 +113436,8 @@ class Test_TC_ACT_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -113239,7 +113492,8 @@ class Test_TC_LTIME_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -113294,7 +113548,8 @@ class Test_TC_LTIME_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -113349,7 +113604,8 @@ class Test_TC_BIND_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -113404,7 +113660,8 @@ class Test_TC_BIND_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -113459,7 +113716,8 @@ class Test_TC_BIND_2_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -113514,7 +113772,8 @@ class Test_TC_S_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -113569,7 +113828,8 @@ class Test_TC_S_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -113624,7 +113884,8 @@ class Test_TC_S_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -113679,7 +113940,8 @@ class Test_TC_S_2_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -113734,7 +113996,8 @@ class Test_TC_S_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -113789,7 +114052,8 @@ class Test_TC_PCC_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -113844,7 +114108,8 @@ class Test_TC_ACL_2_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -113899,7 +114164,8 @@ class Test_TC_ACL_2_6Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -113955,7 +114221,8 @@ class Test_TC_BRBINFO_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -114011,7 +114278,8 @@ class Test_TC_BRBINFO_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -114067,7 +114335,8 @@ class Test_TC_BRBINFO_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -114123,7 +114392,8 @@ class Test_TC_BRBINFO_2_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -114178,7 +114448,8 @@ class Test_TC_ACE_1_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - {} + { + } return CHIP_NO_ERROR; } }; @@ -114725,4 +114996,4 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds }; commands.Register(clusterName, clusterCommands); -} +} \ No newline at end of file From cb06c1072005767d6a0380ce7dcbb92b507a9ed5 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 23 May 2023 12:04:24 -0400 Subject: [PATCH 13/15] [nrf fromtree] Fix KeySetWrite command payload validation. (#26726) There are three fixes here: 1. Move the epoch key validity checks up front, since per spec those should happen before any internal state verification checks. 2. Add a check that the GroupKeySecurityPolicy in the keyset has a valid value for GroupKeySecurityPolicyEnum. 3. If we don't support MCSP, we should be failing out if the GroupKeySecurityPolicy is set to CacheAndSync. Fixes https://github.com/project-chip/connectedhomeip/issues/26692 --- .../group-key-mgmt-server.cpp | 63 ++- .../suites/TestGroupKeyManagementCluster.yaml | 91 +++- src/app/tests/suites/certification/PICS.yaml | 8 + .../tests/suites/certification/ci-pics-values | 7 +- .../chip-tool/zap-generated/test/Commands.h | 359 +++++++++---- .../zap-generated/test/Commands.h | 473 +++++++++++++----- 6 files changed, 754 insertions(+), 247 deletions(-) diff --git a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp index 3591768762..135ab0d956 100644 --- a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp +++ b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp @@ -109,6 +109,9 @@ class GroupKeyManagementAttributeAccess : public AttributeAccessInterface // Register for the GroupKeyManagement cluster on all endpoints. GroupKeyManagementAttributeAccess() : AttributeAccessInterface(Optional(0), GroupKeyManagement::Id) {} + // TODO: Once there is MCSP support, this may need to change. + static constexpr bool IsMCSPSupported() { return false; } + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override { VerifyOrDie(aPath.mClusterId == GroupKeyManagement::Id); @@ -117,8 +120,15 @@ class GroupKeyManagementAttributeAccess : public AttributeAccessInterface { case GroupKeyManagement::Attributes::ClusterRevision::Id: return ReadClusterRevision(aPath.mEndpointId, aEncoder); - case Attributes::FeatureMap::Id: - return aEncoder.Encode(static_cast(0)); + case Attributes::FeatureMap::Id: { + uint32_t features = 0; + if (IsMCSPSupported()) + { + // TODO: Once there is MCSP support, this will need to add the + // right feature bit. + } + return aEncoder.Encode(features); + } case GroupKeyManagement::Attributes::GroupKeyMap::Id: return ReadGroupKeyMap(aPath.mEndpointId, aEncoder); case GroupKeyManagement::Attributes::GroupTable::Id: @@ -296,29 +306,32 @@ bool emberAfGroupKeyManagementClusterKeySetWriteCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::DecodableType & commandData) { - auto provider = GetGroupDataProvider(); - auto fabric = Server::GetInstance().GetFabricTable().FindFabricWithIndex(commandObj->GetAccessingFabricIndex()); - - if (nullptr == provider || nullptr == fabric) + if (commandData.groupKeySet.epochKey0.IsNull() || commandData.groupKeySet.epochStartTime0.IsNull() || + commandData.groupKeySet.epochKey0.Value().empty() || (0 == commandData.groupKeySet.epochStartTime0.Value())) { - commandObj->AddStatus(commandPath, Status::Failure); + // If the EpochKey0 field is null or its associated EpochStartTime0 field is null, + // then this command SHALL fail with an INVALID_COMMAND + commandObj->AddStatus(commandPath, Status::InvalidCommand); return true; } - uint8_t compressed_fabric_id_buffer[sizeof(uint64_t)]; - MutableByteSpan compressed_fabric_id(compressed_fabric_id_buffer); - CHIP_ERROR err = fabric->GetCompressedFabricIdBytes(compressed_fabric_id); - if (CHIP_NO_ERROR != err) + if (commandData.groupKeySet.groupKeySecurityPolicy == GroupKeySecurityPolicyEnum::kUnknownEnumValue) { - commandObj->AddStatus(commandPath, Status::Failure); + // If a client indicates an enumeration value to the server, that is not + // supported by the server, because it is ... a new value unrecognized + // by a legacy server, then the server SHALL generate a general + // constraint error + commandObj->AddStatus(commandPath, Status::ConstraintError); return true; } - if (commandData.groupKeySet.epochKey0.IsNull() || commandData.groupKeySet.epochStartTime0.IsNull() || - commandData.groupKeySet.epochKey0.Value().empty() || (0 == commandData.groupKeySet.epochStartTime0.Value())) + if (!GroupKeyManagementAttributeAccess::IsMCSPSupported() && + commandData.groupKeySet.groupKeySecurityPolicy == GroupKeySecurityPolicyEnum::kCacheAndSync) { - // If the EpochKey0 field is null or its associated EpochStartTime0 field is null, - // then this command SHALL fail with an INVALID_COMMAND + // When CacheAndSync is not supported in the FeatureMap of this cluster, + // any action attempting to set CacheAndSync in the + // GroupKeySecurityPolicy field SHALL fail with an INVALID_COMMAND + // error. commandObj->AddStatus(commandPath, Status::InvalidCommand); return true; } @@ -366,6 +379,24 @@ bool emberAfGroupKeyManagementClusterKeySetWriteCallback( keyset.num_keys_used++; } + auto provider = GetGroupDataProvider(); + auto fabric = Server::GetInstance().GetFabricTable().FindFabricWithIndex(commandObj->GetAccessingFabricIndex()); + + if (nullptr == provider || nullptr == fabric) + { + commandObj->AddStatus(commandPath, Status::Failure); + return true; + } + + uint8_t compressed_fabric_id_buffer[sizeof(uint64_t)]; + MutableByteSpan compressed_fabric_id(compressed_fabric_id_buffer); + CHIP_ERROR err = fabric->GetCompressedFabricIdBytes(compressed_fabric_id); + if (CHIP_NO_ERROR != err) + { + commandObj->AddStatus(commandPath, Status::Failure); + return true; + } + // Set KeySet err = provider->SetKeySet(fabric->GetFabricIndex(), compressed_fabric_id, keyset); if (CHIP_NO_ERROR == err) diff --git a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml index 9474d98c22..4aedb61d7e 100644 --- a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml +++ b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml @@ -91,8 +91,9 @@ tests: EpochStartTime2: 1110002, } - - label: "KeySet Write 2" + - label: "KeySet Write 2 CacheAndSync" command: "KeySetWrite" + PICS: GRPKEY.S.F00 arguments: values: - name: "GroupKeySet" @@ -108,9 +109,28 @@ tests: EpochStartTime2: 2110002, } - - label: "KeySet Write 3" + - label: "KeySet Write 2 TrustFirst" + command: "KeySetWrite" + PICS: "!GRPKEY.S.F00" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a2, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf", + EpochStartTime0: 2110000, + EpochKey1: "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef", + EpochStartTime1: 2110001, + EpochKey2: "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", + EpochStartTime2: 2110002, + } + + - label: "KeySet Write 3 CacheAndSync" identity: "beta" command: "KeySetWrite" + PICS: GRPKEY.S.F00 arguments: values: - name: "GroupKeySet" @@ -128,6 +148,27 @@ tests: EpochStartTime2: 2110002, } + - label: "KeySet Write 3 TrustFirst" + identity: "beta" + command: "KeySetWrite" + PICS: "!GRPKEY.S.F00" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a3, + GroupKeySecurityPolicy: 0, + EpochKey0: + "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", + EpochStartTime0: 2110000, + EpochKey1: "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f", + EpochStartTime1: 2110001, + EpochKey2: + "\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f", + EpochStartTime2: 2110002, + } + - label: "KeySet Read" command: "KeySetRead" arguments: @@ -502,8 +543,9 @@ tests: response: error: NOT_FOUND - - label: "KeySet Read (not removed)" + - label: "KeySet Read (not removed) CacheAndSync" command: "KeySetRead" + PICS: GRPKEY.S.F00 arguments: values: - name: "GroupKeySetID" @@ -523,6 +565,28 @@ tests: EpochStartTime2: 2110002, } + - label: "KeySet Read (not removed) TrustFirst" + command: "KeySetRead" + PICS: GRPKEY.S.F00 + arguments: + values: + - name: "GroupKeySetID" + value: 0x01a2 + response: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a2, + GroupKeySecurityPolicy: 0, + EpochKey0: null, + EpochStartTime0: 2110000, + EpochKey1: null, + EpochStartTime1: 2110001, + EpochKey2: null, + EpochStartTime2: 2110002, + } + - label: "Remove Group 1" cluster: "Groups" endpoint: 1 @@ -608,8 +672,9 @@ tests: EpochStartTime2: 1110002, } - - label: "KeySet Write 2" + - label: "KeySet Write 2 CacheAndSync" command: "KeySetWrite" + PICS: GRPKEY.S.F00 arguments: values: - name: "GroupKeySet" @@ -625,6 +690,24 @@ tests: EpochStartTime2: 2110002, } + - label: "KeySet Write 2 TrustFirst" + command: "KeySetWrite" + PICS: "!GRPKEY.S.F00" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a2, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf", + EpochStartTime0: 2110000, + EpochKey1: "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef", + EpochStartTime1: 2110001, + EpochKey2: "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", + EpochStartTime2: 2110002, + } + - label: "Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2" command: "writeAttribute" attribute: "GroupKeyMap" diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index 6c08289dbc..386b3435b7 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -3386,6 +3386,14 @@ PICS: client?" id: GRPKEY.C + # + # server / features + # + - label: + "Does the DUT(Server) support Group Key Management CacheAndSync + feature?" + id: GRPKEY.S.F00 + # # client / attributes # diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index c2aeee0e6a..dab60bab0a 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -566,9 +566,12 @@ G.C.C03.Tx=0 G.C.C04.Tx=0 G.C.C05.Tx=0 -GRPKEY.C=1 -GRPKEY.S.A0001=0 GRPKEY.S=1 +# No support for the CacheAndSync feature so far +GRPKEY.S.F00=0 +GRPKEY.S.A0001=0 + +GRPKEY.C=1 GRPKEY.C.A0000=1 GRPKEY.C.A0001=0 GRPKEY.C.C00.Tx=1 diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index f84ae4b309..8792017f5d 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -88208,7 +88208,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand { public: TestGroupKeyManagementClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestGroupKeyManagementCluster", 43, credsIssuerConfig) + TestCommand("TestGroupKeyManagementCluster", 47, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -88284,6 +88284,12 @@ class TestGroupKeyManagementClusterSuite : public TestCommand 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)); { chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; @@ -88304,19 +88310,19 @@ class TestGroupKeyManagementClusterSuite : public TestCommand CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 1110002ULL)); } break; - case 10: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; - case 11: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 12: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 14: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -88345,7 +88351,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 15: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -88390,7 +88396,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 16: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -88419,7 +88425,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 17: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -88464,7 +88470,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 18: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -88473,7 +88479,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); } break; - case 19: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -88482,7 +88488,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); } break; - case 20: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -88491,7 +88497,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 259U)); } break; - case 21: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -88500,7 +88506,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 260U)); } break; - case 22: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -88509,7 +88515,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 261U)); } break; - case 23: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -88578,7 +88584,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 24: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -88661,7 +88667,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 25: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -88688,7 +88694,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 26: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -88771,13 +88777,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 27: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 28: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; - case 29: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; @@ -88798,7 +88804,28 @@ class TestGroupKeyManagementClusterSuite : public TestCommand CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 2110002ULL)); } break; - case 30: + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("groupKeySet.groupKeySetID", value.groupKeySet.groupKeySetID, 418U)); + VerifyOrReturn(CheckValue("groupKeySet.groupKeySecurityPolicy", value.groupKeySet.groupKeySecurityPolicy, 0U)); + VerifyOrReturn(CheckValueNull("groupKeySet.epochKey0", value.groupKeySet.epochKey0)); + VerifyOrReturn(CheckValueNonNull("groupKeySet.epochStartTime0", value.groupKeySet.epochStartTime0)); + VerifyOrReturn( + CheckValue("groupKeySet.epochStartTime0.Value()", value.groupKeySet.epochStartTime0.Value(), 2110000ULL)); + VerifyOrReturn(CheckValueNull("groupKeySet.epochKey1", value.groupKeySet.epochKey1)); + VerifyOrReturn(CheckValueNonNull("groupKeySet.epochStartTime1", value.groupKeySet.epochStartTime1)); + VerifyOrReturn( + CheckValue("groupKeySet.epochStartTime1.Value()", value.groupKeySet.epochStartTime1.Value(), 2110001ULL)); + VerifyOrReturn(CheckValueNull("groupKeySet.epochKey2", value.groupKeySet.epochKey2)); + VerifyOrReturn(CheckValueNonNull("groupKeySet.epochStartTime2", value.groupKeySet.epochStartTime2)); + VerifyOrReturn( + CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 2110002ULL)); + } + break; + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType value; @@ -88807,7 +88834,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); } break; - case 31: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -88862,10 +88889,10 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } 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)); { chip::app::DataModel::DecodableList< @@ -88878,25 +88905,28 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 34: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 35: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); 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)); break; - case 38: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 39: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 40: + case 43: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -88913,10 +88943,10 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 41: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 42: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -89023,7 +89053,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } case 7: { - LogStep(7, "KeySet Write 2"); + LogStep(7, "KeySet Write 2 CacheAndSync"); + VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -89058,7 +89089,44 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } case 8: { - LogStep(8, "KeySet Write 3"); + LogStep(8, "KeySet Write 2 TrustFirst"); + VerifyOrDo(!ShouldSkip("!GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 418U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 2110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 2110001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 2110002ULL; + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 9: { + LogStep(9, "KeySet Write 3 CacheAndSync"); + VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -89090,8 +89158,42 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 9: { - LogStep(9, "KeySet Read"); + case 10: { + LogStep(10, "KeySet Write 3 TrustFirst"); + VerifyOrDo(!ShouldSkip("!GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 419U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 2110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 2110001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = + chip::ByteSpan(chip::Uint8::from_const_char(" !\042#$%&'()*+,-./garbage: not in length on purpose"), 16); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 2110002ULL; + + return SendCommand(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Commands::KeySetWrite::Id, + value, chip::NullOptional + + ); + } + case 11: { + LogStep(11, "KeySet Read"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; value.groupKeySetID = 417U; @@ -89100,8 +89202,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 10: { - LogStep(10, "Write Group Keys (invalid)"); + case 12: { + LogStep(12, "Write Group Keys (invalid)"); ListFreer listFreer; chip::app::DataModel::List value; @@ -89119,8 +89221,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 11: { - LogStep(11, "Write Group Keys (too many)"); + case 13: { + LogStep(13, "Write Group Keys (too many)"); ListFreer listFreer; chip::app::DataModel::List value; @@ -89190,8 +89292,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 12: { - LogStep(12, "Write Group Keys on alpha"); + case 14: { + LogStep(14, "Write Group Keys on alpha"); ListFreer listFreer; chip::app::DataModel::List value; @@ -89221,8 +89323,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 13: { - LogStep(13, "Write Group Keys on beta"); + case 15: { + LogStep(15, "Write Group Keys on beta"); ListFreer listFreer; chip::app::DataModel::List value; @@ -89252,28 +89354,28 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 14: { - LogStep(14, "Read Group Keys on alpha"); + case 16: { + LogStep(16, "Read Group Keys on alpha"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Read Group Keys on alpha without fabric filtering"); + case 17: { + LogStep(17, "Read Group Keys on alpha without fabric filtering"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, false, chip::NullOptional); } - case 16: { - LogStep(16, "Read Group Keys on beta"); + case 18: { + LogStep(18, "Read Group Keys on beta"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Read Group Keys on beta without fabric filtering"); + case 19: { + LogStep(19, "Read Group Keys on beta without fabric filtering"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, false, chip::NullOptional); } - case 18: { - LogStep(18, "Add Group 1"); + case 20: { + LogStep(20, "Add Group 1"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 257U; @@ -89282,8 +89384,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 19: { - LogStep(19, "Add Group 2"); + case 21: { + LogStep(21, "Add Group 2"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 258U; @@ -89292,8 +89394,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 20: { - LogStep(20, "Add Group 3"); + case 22: { + LogStep(22, "Add Group 3"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 259U; @@ -89302,8 +89404,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 21: { - LogStep(21, "Add Group 4"); + case 23: { + LogStep(23, "Add Group 4"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 260U; @@ -89312,8 +89414,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 22: { - LogStep(22, "Add Group 5"); + case 24: { + LogStep(24, "Add Group 5"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 261U; @@ -89322,28 +89424,28 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 23: { - LogStep(23, "Read GroupTable from alpha"); + case 25: { + LogStep(25, "Read GroupTable from alpha"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Read GroupTable from alpha without fabric filtering"); + case 26: { + LogStep(26, "Read GroupTable from alpha without fabric filtering"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, false, chip::NullOptional); } - case 25: { - LogStep(25, "Read GroupTable from beta"); + case 27: { + LogStep(27, "Read GroupTable from beta"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Read GroupTable from beta without fabric filtering"); + case 28: { + LogStep(28, "Read GroupTable from beta without fabric filtering"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, false, chip::NullOptional); } - case 27: { - LogStep(27, "KeySet Remove 1"); + case 29: { + LogStep(29, "KeySet Remove 1"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 417U; @@ -89352,8 +89454,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 28: { - LogStep(28, "KeySet Read (removed)"); + case 30: { + LogStep(30, "KeySet Read (removed)"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; value.groupKeySetID = 417U; @@ -89362,8 +89464,9 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 29: { - LogStep(29, "KeySet Read (not removed)"); + case 31: { + LogStep(31, "KeySet Read (not removed) CacheAndSync"); + VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; value.groupKeySetID = 418U; @@ -89372,8 +89475,19 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 30: { - LogStep(30, "Remove Group 1"); + case 32: { + LogStep(32, "KeySet Read (not removed) TrustFirst"); + VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; + value.groupKeySetID = 418U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Commands::KeySetRead::Id, + value, chip::NullOptional + + ); + } + case 33: { + LogStep(33, "Remove Group 1"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::RemoveGroup::Type value; value.groupID = 257U; @@ -89382,13 +89496,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 31: { - LogStep(31, "Read GroupTable 2"); + case 34: { + LogStep(34, "Read GroupTable 2"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 32: { - LogStep(32, "Remove All"); + case 35: { + LogStep(35, "Remove All"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveAllGroups::Id, value, @@ -89396,13 +89510,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 33: { - LogStep(33, "Read GroupTable 3"); + case 36: { + LogStep(36, "Read GroupTable 3"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 34: { - LogStep(34, "KeySet Remove 2"); + case 37: { + LogStep(37, "KeySet Remove 2"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 418U; @@ -89411,8 +89525,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 35: { - LogStep(35, "KeySet Read (also removed)"); + case 38: { + LogStep(38, "KeySet Read (also removed)"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; value.groupKeySetID = 418U; @@ -89421,8 +89535,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 36: { - LogStep(36, "KeySet Write 1"); + case 39: { + LogStep(39, "KeySet Write 1"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -89456,8 +89570,9 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 37: { - LogStep(37, "KeySet Write 2"); + case 40: { + LogStep(40, "KeySet Write 2 CacheAndSync"); + VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -89491,8 +89606,44 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 38: { - LogStep(38, "Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2"); + case 41: { + LogStep(41, "KeySet Write 2 TrustFirst"); + VerifyOrDo(!ShouldSkip("!GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 418U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 2110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 2110001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 2110002ULL; + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 42: { + LogStep(42, "Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2"); ListFreer listFreer; chip::app::DataModel::List value; @@ -89518,8 +89669,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 39: { - LogStep(39, "Remove keyset 1"); + case 43: { + LogStep(43, "Remove keyset 1"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 417U; @@ -89528,13 +89679,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 40: { - LogStep(40, "TH verifies GroupKeyMap entries for KeySet 1 have been removed"); + case 44: { + LogStep(44, "TH verifies GroupKeyMap entries for KeySet 1 have been removed"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } - case 41: { - LogStep(41, "Remove keyset 2"); + case 45: { + LogStep(45, "Remove keyset 2"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 418U; @@ -89543,8 +89694,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 42: { - LogStep(42, "TH verifies GroupKeyMap entries for KeySet 2 have been removed"); + case 46: { + LogStep(46, "TH verifies GroupKeyMap entries for KeySet 2 have been removed"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } 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 2ac0dea95d..87c813e0cc 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -134726,148 +134726,196 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { err = TestKeySetWrite1_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : KeySet Write 2\n"); - err = TestKeySetWrite2_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : KeySet Write 2 CacheAndSync\n"); + if (ShouldSkip("GRPKEY.S.F00")) { + NextTest(); + return; + } + err = TestKeySetWrite2CacheAndSync_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : KeySet Write 3\n"); - err = TestKeySetWrite3_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : KeySet Write 2 TrustFirst\n"); + if (ShouldSkip("!GRPKEY.S.F00")) { + NextTest(); + return; + } + err = TestKeySetWrite2TrustFirst_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : KeySet Read\n"); - err = TestKeySetRead_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : KeySet Write 3 CacheAndSync\n"); + if (ShouldSkip("GRPKEY.S.F00")) { + NextTest(); + return; + } + err = TestKeySetWrite3CacheAndSync_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Write Group Keys (invalid)\n"); - err = TestWriteGroupKeysInvalid_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : KeySet Write 3 TrustFirst\n"); + if (ShouldSkip("!GRPKEY.S.F00")) { + NextTest(); + return; + } + err = TestKeySetWrite3TrustFirst_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Write Group Keys (too many)\n"); - err = TestWriteGroupKeysTooMany_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : KeySet Read\n"); + err = TestKeySetRead_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Write Group Keys on alpha\n"); - err = TestWriteGroupKeysOnAlpha_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Write Group Keys (invalid)\n"); + err = TestWriteGroupKeysInvalid_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Write Group Keys on beta\n"); - err = TestWriteGroupKeysOnBeta_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Write Group Keys (too many)\n"); + err = TestWriteGroupKeysTooMany_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read Group Keys on alpha\n"); - err = TestReadGroupKeysOnAlpha_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Write Group Keys on alpha\n"); + err = TestWriteGroupKeysOnAlpha_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read Group Keys on alpha without fabric filtering\n"); - err = TestReadGroupKeysOnAlphaWithoutFabricFiltering_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Write Group Keys on beta\n"); + err = TestWriteGroupKeysOnBeta_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Read Group Keys on beta\n"); - err = TestReadGroupKeysOnBeta_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : Read Group Keys on alpha\n"); + err = TestReadGroupKeysOnAlpha_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read Group Keys on beta without fabric filtering\n"); - err = TestReadGroupKeysOnBetaWithoutFabricFiltering_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Read Group Keys on alpha without fabric filtering\n"); + err = TestReadGroupKeysOnAlphaWithoutFabricFiltering_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Add Group 1\n"); - err = TestAddGroup1_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : Read Group Keys on beta\n"); + err = TestReadGroupKeysOnBeta_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Add Group 2\n"); - err = TestAddGroup2_19(); + ChipLogProgress(chipTool, " ***** Test Step 19 : Read Group Keys on beta without fabric filtering\n"); + err = TestReadGroupKeysOnBetaWithoutFabricFiltering_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Add Group 3\n"); - err = TestAddGroup3_20(); + ChipLogProgress(chipTool, " ***** Test Step 20 : Add Group 1\n"); + err = TestAddGroup1_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Add Group 4\n"); - err = TestAddGroup4_21(); + ChipLogProgress(chipTool, " ***** Test Step 21 : Add Group 2\n"); + err = TestAddGroup2_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Add Group 5\n"); - err = TestAddGroup5_22(); + ChipLogProgress(chipTool, " ***** Test Step 22 : Add Group 3\n"); + err = TestAddGroup3_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Read GroupTable from alpha\n"); - err = TestReadGroupTableFromAlpha_23(); + ChipLogProgress(chipTool, " ***** Test Step 23 : Add Group 4\n"); + err = TestAddGroup4_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Read GroupTable from alpha without fabric filtering\n"); - err = TestReadGroupTableFromAlphaWithoutFabricFiltering_24(); + ChipLogProgress(chipTool, " ***** Test Step 24 : Add Group 5\n"); + err = TestAddGroup5_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read GroupTable from beta\n"); - err = TestReadGroupTableFromBeta_25(); + ChipLogProgress(chipTool, " ***** Test Step 25 : Read GroupTable from alpha\n"); + err = TestReadGroupTableFromAlpha_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Read GroupTable from beta without fabric filtering\n"); - err = TestReadGroupTableFromBetaWithoutFabricFiltering_26(); + ChipLogProgress(chipTool, " ***** Test Step 26 : Read GroupTable from alpha without fabric filtering\n"); + err = TestReadGroupTableFromAlphaWithoutFabricFiltering_26(); break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : KeySet Remove 1\n"); - err = TestKeySetRemove1_27(); + ChipLogProgress(chipTool, " ***** Test Step 27 : Read GroupTable from beta\n"); + err = TestReadGroupTableFromBeta_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : KeySet Read (removed)\n"); - err = TestKeySetReadRemoved_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Read GroupTable from beta without fabric filtering\n"); + err = TestReadGroupTableFromBetaWithoutFabricFiltering_28(); break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : KeySet Read (not removed)\n"); - err = TestKeySetReadNotRemoved_29(); + ChipLogProgress(chipTool, " ***** Test Step 29 : KeySet Remove 1\n"); + err = TestKeySetRemove1_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Remove Group 1\n"); - err = TestRemoveGroup1_30(); + ChipLogProgress(chipTool, " ***** Test Step 30 : KeySet Read (removed)\n"); + err = TestKeySetReadRemoved_30(); break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Read GroupTable 2\n"); - err = TestReadGroupTable2_31(); + ChipLogProgress(chipTool, " ***** Test Step 31 : KeySet Read (not removed) CacheAndSync\n"); + if (ShouldSkip("GRPKEY.S.F00")) { + NextTest(); + return; + } + err = TestKeySetReadNotRemovedCacheAndSync_31(); break; case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Remove All\n"); - err = TestRemoveAll_32(); + ChipLogProgress(chipTool, " ***** Test Step 32 : KeySet Read (not removed) TrustFirst\n"); + if (ShouldSkip("GRPKEY.S.F00")) { + NextTest(); + return; + } + err = TestKeySetReadNotRemovedTrustFirst_32(); break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Read GroupTable 3\n"); - err = TestReadGroupTable3_33(); + ChipLogProgress(chipTool, " ***** Test Step 33 : Remove Group 1\n"); + err = TestRemoveGroup1_33(); break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : KeySet Remove 2\n"); - err = TestKeySetRemove2_34(); + ChipLogProgress(chipTool, " ***** Test Step 34 : Read GroupTable 2\n"); + err = TestReadGroupTable2_34(); break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : KeySet Read (also removed)\n"); - err = TestKeySetReadAlsoRemoved_35(); + ChipLogProgress(chipTool, " ***** Test Step 35 : Remove All\n"); + err = TestRemoveAll_35(); break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : KeySet Write 1\n"); - err = TestKeySetWrite1_36(); + ChipLogProgress(chipTool, " ***** Test Step 36 : Read GroupTable 3\n"); + err = TestReadGroupTable3_36(); break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : KeySet Write 2\n"); - err = TestKeySetWrite2_37(); + ChipLogProgress(chipTool, " ***** Test Step 37 : KeySet Remove 2\n"); + err = TestKeySetRemove2_37(); break; case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2\n"); - err = TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_38(); + ChipLogProgress(chipTool, " ***** Test Step 38 : KeySet Read (also removed)\n"); + err = TestKeySetReadAlsoRemoved_38(); break; case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Remove keyset 1\n"); - err = TestRemoveKeyset1_39(); + ChipLogProgress(chipTool, " ***** Test Step 39 : KeySet Write 1\n"); + err = TestKeySetWrite1_39(); break; case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : TH verifies GroupKeyMap entries for KeySet 1 have been removed\n"); - err = TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_40(); + ChipLogProgress(chipTool, " ***** Test Step 40 : KeySet Write 2 CacheAndSync\n"); + if (ShouldSkip("GRPKEY.S.F00")) { + NextTest(); + return; + } + err = TestKeySetWrite2CacheAndSync_40(); break; case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Remove keyset 2\n"); - err = TestRemoveKeyset2_41(); + ChipLogProgress(chipTool, " ***** Test Step 41 : KeySet Write 2 TrustFirst\n"); + if (ShouldSkip("!GRPKEY.S.F00")) { + NextTest(); + return; + } + err = TestKeySetWrite2TrustFirst_41(); break; case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : TH verifies GroupKeyMap entries for KeySet 2 have been removed\n"); - err = TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_42(); + ChipLogProgress(chipTool, " ***** Test Step 42 : Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2\n"); + err = TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_42(); + break; + case 43: + ChipLogProgress(chipTool, " ***** Test Step 43 : Remove keyset 1\n"); + err = TestRemoveKeyset1_43(); + break; + case 44: + ChipLogProgress(chipTool, " ***** Test Step 44 : TH verifies GroupKeyMap entries for KeySet 1 have been removed\n"); + err = TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_44(); + break; + case 45: + ChipLogProgress(chipTool, " ***** Test Step 45 : Remove keyset 2\n"); + err = TestRemoveKeyset2_45(); + break; + case 46: + ChipLogProgress(chipTool, " ***** Test Step 46 : TH verifies GroupKeyMap entries for KeySet 2 have been removed\n"); + err = TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_46(); break; } @@ -134911,16 +134959,16 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + 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), 0)); break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -134965,13 +135013,13 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + 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)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -134986,7 +135034,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -134995,7 +135043,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -135009,6 +135057,18 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 43: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 44: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 45: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 46: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -135022,7 +135082,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 43; + const uint16_t mTestCount = 47; chip::Optional mNodeId; chip::Optional mCluster; @@ -135162,7 +135222,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite2_7() + CHIP_ERROR TestKeySetWrite2CacheAndSync_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135192,7 +135252,47 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { [cluster keySetWriteWithParams:params completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Write 2 Error: %@", err); + NSLog(@"KeySet Write 2 CacheAndSync Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWrite2TrustFirst_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:418U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:2110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:2110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:2110002ULL]; + + [cluster keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySet Write 2 TrustFirst Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -135202,7 +135302,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite3_8() + CHIP_ERROR TestKeySetWrite3CacheAndSync_9() { MTRBaseDevice * device = GetDevice("beta"); @@ -135232,7 +135332,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { [cluster keySetWriteWithParams:params completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Write 3 Error: %@", err); + NSLog(@"KeySet Write 3 CacheAndSync Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -135242,7 +135342,47 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetRead_9() + CHIP_ERROR TestKeySetWrite3TrustFirst_10() + { + + MTRBaseDevice * device = GetDevice("beta"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:419U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:2110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:2110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:" !\042#$%&'()*+,-./" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:2110002ULL]; + + [cluster keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySet Write 3 TrustFirst Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetRead_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135293,7 +135433,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysInvalid_10() + CHIP_ERROR TestWriteGroupKeysInvalid_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135328,7 +135468,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysTooMany_11() + CHIP_ERROR TestWriteGroupKeysTooMany_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135428,7 +135568,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysOnAlpha_12() + CHIP_ERROR TestWriteGroupKeysOnAlpha_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135474,7 +135614,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysOnBeta_13() + CHIP_ERROR TestWriteGroupKeysOnBeta_15() { MTRBaseDevice * device = GetDevice("beta"); @@ -135520,7 +135660,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnAlpha_14() + CHIP_ERROR TestReadGroupKeysOnAlpha_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135582,7 +135722,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnAlphaWithoutFabricFiltering_15() + CHIP_ERROR TestReadGroupKeysOnAlphaWithoutFabricFiltering_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135676,7 +135816,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnBeta_16() + CHIP_ERROR TestReadGroupKeysOnBeta_18() { MTRBaseDevice * device = GetDevice("beta"); @@ -135738,7 +135878,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnBetaWithoutFabricFiltering_17() + CHIP_ERROR TestReadGroupKeysOnBetaWithoutFabricFiltering_19() { MTRBaseDevice * device = GetDevice("beta"); @@ -135832,7 +135972,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup1_18() + CHIP_ERROR TestAddGroup1_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135864,7 +136004,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup2_19() + CHIP_ERROR TestAddGroup2_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135896,7 +136036,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup3_20() + CHIP_ERROR TestAddGroup3_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135928,7 +136068,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup4_21() + CHIP_ERROR TestAddGroup4_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -135960,7 +136100,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup5_22() + CHIP_ERROR TestAddGroup5_24() { MTRBaseDevice * device = GetDevice("beta"); @@ -135992,7 +136132,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromAlpha_23() + CHIP_ERROR TestReadGroupTableFromAlpha_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136081,7 +136221,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromAlphaWithoutFabricFiltering_24() + CHIP_ERROR TestReadGroupTableFromAlphaWithoutFabricFiltering_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136185,7 +136325,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromBeta_25() + CHIP_ERROR TestReadGroupTableFromBeta_27() { MTRBaseDevice * device = GetDevice("beta"); @@ -136229,7 +136369,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromBetaWithoutFabricFiltering_26() + CHIP_ERROR TestReadGroupTableFromBetaWithoutFabricFiltering_28() { MTRBaseDevice * device = GetDevice("beta"); @@ -136333,7 +136473,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetRemove1_27() + CHIP_ERROR TestKeySetRemove1_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136356,7 +136496,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadRemoved_28() + CHIP_ERROR TestKeySetReadRemoved_30() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136383,7 +136523,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadNotRemoved_29() + CHIP_ERROR TestKeySetReadNotRemovedCacheAndSync_31() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136398,7 +136538,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { keySetReadWithParams:params completion:^( MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"KeySet Read (not removed) Error: %@", err); + NSLog(@"KeySet Read (not removed) CacheAndSync Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -136434,7 +136574,58 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveGroup1_30() + CHIP_ERROR TestKeySetReadNotRemovedTrustFirst_32() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; + [cluster + keySetReadWithParams:params + completion:^( + MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"KeySet Read (not removed) TrustFirst Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.groupKeySet; + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySetID, 418U)); + VerifyOrReturn(CheckValue("GroupKeySecurityPolicy", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 0U)); + VerifyOrReturn(CheckValueNull( + "EpochKey0", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey0)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime0", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0)); + VerifyOrReturn(CheckValue("EpochStartTime0", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0, 2110000ULL)); + VerifyOrReturn(CheckValueNull( + "EpochKey1", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey1)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime1", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1)); + VerifyOrReturn(CheckValue("EpochStartTime1", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1, 2110001ULL)); + VerifyOrReturn(CheckValueNull( + "EpochKey2", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey2)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime2", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2)); + VerifyOrReturn(CheckValue("EpochStartTime2", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2, 2110002ULL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestRemoveGroup1_33() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136465,7 +136656,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTable2_31() + CHIP_ERROR TestReadGroupTable2_34() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136539,7 +136730,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveAll_32() + CHIP_ERROR TestRemoveAll_35() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136557,7 +136748,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTable3_33() + CHIP_ERROR TestReadGroupTable3_36() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136586,7 +136777,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetRemove2_34() + CHIP_ERROR TestKeySetRemove2_37() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136609,7 +136800,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadAlsoRemoved_35() + CHIP_ERROR TestKeySetReadAlsoRemoved_38() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136636,7 +136827,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite1_36() + CHIP_ERROR TestKeySetWrite1_39() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136676,7 +136867,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite2_37() + CHIP_ERROR TestKeySetWrite2CacheAndSync_40() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136706,7 +136897,47 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { [cluster keySetWriteWithParams:params completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Write 2 Error: %@", err); + NSLog(@"KeySet Write 2 CacheAndSync Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWrite2TrustFirst_41() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:418U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:2110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:2110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:2110002ULL]; + + [cluster keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySet Write 2 TrustFirst Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -136716,7 +136947,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_38() + CHIP_ERROR TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_42() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136757,7 +136988,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveKeyset1_39() + CHIP_ERROR TestRemoveKeyset1_43() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136780,7 +137011,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_40() + CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_44() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136818,7 +137049,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveKeyset2_41() + CHIP_ERROR TestRemoveKeyset2_45() { MTRBaseDevice * device = GetDevice("alpha"); @@ -136841,7 +137072,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_42() + CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_46() { MTRBaseDevice * device = GetDevice("alpha"); From 3bdf3bf412548923c7225897b0c0740ca6b6b1f4 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 7 Jul 2023 12:14:28 -0400 Subject: [PATCH 14/15] [nrf fromtree] Make sure we don't use CHIP_CONFIG_MAX_FABRICS before it's defined. (#27679) The definition of CHIP_CONFIG_SECURE_SESSION_POOL_SIZE uses CHIP_CONFIG_MAX_FABRICS but came before we ensures CHIP_CONFIG_MAX_FABRICS is defined. This change just moves it to right after the definition of CHIP_CONFIG_MAX_FABRICS. --- src/lib/core/CHIPConfig.h | 44 +++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/lib/core/CHIPConfig.h b/src/lib/core/CHIPConfig.h index 961db5250e..e13f5d0fc6 100644 --- a/src/lib/core/CHIPConfig.h +++ b/src/lib/core/CHIPConfig.h @@ -667,28 +667,6 @@ #define CHIP_CONFIG_UNAUTHENTICATED_CONNECTION_POOL_SIZE 4 #endif // CHIP_CONFIG_UNAUTHENTICATED_CONNECTION_POOL_SIZE -/** - * @def CHIP_CONFIG_SECURE_SESSION_POOL_SIZE - * - * @brief Defines the size of the pool used for tracking the state of - * secure sessions. This controls the maximum number of concurrent - * established secure sessions across all supported transports. - * - * This is sized by default to cover the sum of the following: - * - At least 3 CASE sessions / fabric (Spec Ref: 4.13.2.8) - * - 1 reserved slot for CASEServer as a responder. - * - 1 reserved slot for PASE. - * - * NOTE: On heap-based platforms, there is no pre-allocation of the pool. - * Due to the use of an LRU-scheme to manage sessions, the actual active - * size of the pool will grow up to the value of this define, - * after which, it will remain at or around this size indefinitely. - * - */ -#ifndef CHIP_CONFIG_SECURE_SESSION_POOL_SIZE -#define CHIP_CONFIG_SECURE_SESSION_POOL_SIZE (CHIP_CONFIG_MAX_FABRICS * 3 + 2) -#endif // CHIP_CONFIG_SECURE_SESSION_POOL_SIZE - /** * @def CHIP_CONFIG_SECURE_SESSION_REFCOUNT_LOGGING * @@ -712,6 +690,28 @@ #define CHIP_CONFIG_MAX_FABRICS 16 #endif // CHIP_CONFIG_MAX_FABRICS +/** + * @def CHIP_CONFIG_SECURE_SESSION_POOL_SIZE + * + * @brief Defines the size of the pool used for tracking the state of + * secure sessions. This controls the maximum number of concurrent + * established secure sessions across all supported transports. + * + * This is sized by default to cover the sum of the following: + * - At least 3 CASE sessions / fabric (Spec Ref: 4.13.2.8) + * - 1 reserved slot for CASEServer as a responder. + * - 1 reserved slot for PASE. + * + * NOTE: On heap-based platforms, there is no pre-allocation of the pool. + * Due to the use of an LRU-scheme to manage sessions, the actual active + * size of the pool will grow up to the value of this define, + * after which, it will remain at or around this size indefinitely. + * + */ +#ifndef CHIP_CONFIG_SECURE_SESSION_POOL_SIZE +#define CHIP_CONFIG_SECURE_SESSION_POOL_SIZE (CHIP_CONFIG_MAX_FABRICS * 3 + 2) +#endif // CHIP_CONFIG_SECURE_SESSION_POOL_SIZE + /** * @def CHIP_CONFIG_MAX_GROUP_DATA_PEERS * From bab41881e0de746a44e485a6a93b2a9bee0b3a98 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 17 Jul 2023 20:20:00 -0400 Subject: [PATCH 15/15] [nrf fromtree] Enforce length constraint for CountryCode in SetRegulatoryConfig. (#27949) We were not checking the length (which must be 2), so would allow 1-char or 0-char values. Also aligns the exact logic with the Location attribute write code and adds some error logging. --- .../basic-information/basic-information.cpp | 6 +++++- .../general-commissioning-server.cpp | 19 ++++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/app/clusters/basic-information/basic-information.cpp b/src/app/clusters/basic-information/basic-information.cpp index 57f297f1e1..4b427abe48 100644 --- a/src/app/clusters/basic-information/basic-information.cpp +++ b/src/app/clusters/basic-information/basic-information.cpp @@ -344,7 +344,11 @@ CHIP_ERROR BasicAttrAccess::WriteLocation(AttributeValueDecoder & aDecoder) ReturnErrorOnFailure(aDecoder.Decode(location)); bool isValidLength = location.size() == DeviceLayer::ConfigurationManager::kMaxLocationLength; - VerifyOrReturnError(isValidLength, StatusIB(Protocols::InteractionModel::Status::InvalidValue).ToChipError()); + if (!isValidLength) + { + ChipLogError(Zcl, "Invalid country code: '%.*s'", static_cast(location.size()), location.data()); + return CHIP_IM_GLOBAL_STATUS(ConstraintError); + } return DeviceLayer::ConfigurationMgr().StoreCountryCode(location.data(), location.size()); } diff --git a/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp b/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp index 8e31c4ec72..c4f748a1f8 100644 --- a/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp +++ b/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp @@ -287,10 +287,21 @@ bool emberAfGeneralCommissioningClusterSetRegulatoryConfigCallback(app::CommandH DeviceControlServer * server = &DeviceLayer::DeviceControlServer::DeviceControlSvr(); Commands::SetRegulatoryConfigResponse::Type response; + auto & countryCode = commandData.countryCode; + bool isValidLength = countryCode.size() == DeviceLayer::ConfigurationManager::kMaxLocationLength; + if (!isValidLength) + { + ChipLogError(Zcl, "Invalid country code: '%.*s'", static_cast(countryCode.size()), countryCode.data()); + commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::ConstraintError); + return true; + } + if (commandData.newRegulatoryConfig > RegulatoryLocationType::kIndoorOutdoor) { response.errorCode = CommissioningError::kValueOutsideRange; - response.debugText = commandData.countryCode; + // TODO: How does using the country code in debug text make sense, if + // the real issue is the newRegulatoryConfig value? + response.debugText = countryCode; } else { @@ -304,11 +315,13 @@ bool emberAfGeneralCommissioningClusterSetRegulatoryConfigCallback(app::CommandH if ((locationCapability != to_underlying(RegulatoryLocationType::kIndoorOutdoor)) && (location != locationCapability)) { response.errorCode = CommissioningError::kValueOutsideRange; - response.debugText = commandData.countryCode; + // TODO: How does using the country code in debug text make sense, if + // the real issue is the newRegulatoryConfig value? + response.debugText = countryCode; } else { - CheckSuccess(server->SetRegulatoryConfig(location, commandData.countryCode), Failure); + CheckSuccess(server->SetRegulatoryConfig(location, countryCode), Failure); Breadcrumb::Set(commandPath.mEndpointId, commandData.breadcrumb); response.errorCode = CommissioningError::kOk; }