From ca0dd9bb5c095b5c57ac4d53c8f764954fcec7eb Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Thu, 22 Sep 2022 18:51:29 +0200 Subject: [PATCH 01/19] [darwin-framework-tool] Just send a message to read the MTRErrorHolder value instead of duplicating the class interface (#22811) --- .../commands/common/MTRError.mm | 28 +++++-------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/examples/darwin-framework-tool/commands/common/MTRError.mm b/examples/darwin-framework-tool/commands/common/MTRError.mm index 7ad3138802da6f..c393682a7a84e0 100644 --- a/examples/darwin-framework-tool/commands/common/MTRError.mm +++ b/examples/darwin-framework-tool/commands/common/MTRError.mm @@ -25,25 +25,6 @@ #import #import -// Stolen for now from the framework, need to export this properly. -@interface DFTErrorHolder : NSObject -@property (nonatomic, readonly) CHIP_ERROR error; -@end - -@implementation DFTErrorHolder - -- (instancetype)initWithError:(CHIP_ERROR)error -{ - if (!(self = [super init])) { - return nil; - } - - _error = error; - return self; -} - -@end - CHIP_ERROR MTRErrorToCHIPErrorCode(NSError * error) { if (error == nil) { @@ -64,8 +45,13 @@ CHIP_ERROR MTRErrorToCHIPErrorCode(NSError * error) if (error.userInfo != nil) { id underlyingError = error.userInfo[@"underlyingError"]; - if (underlyingError != nil && [underlyingError isKindOfClass:[DFTErrorHolder class]]) { - return ((DFTErrorHolder *) underlyingError).error; + if (underlyingError != nil) { + NSValue * chipErrorValue = [underlyingError valueForKey:@"error"]; + if (chipErrorValue != nil) { + CHIP_ERROR chipError; + [chipErrorValue getValue:&chipError]; + return chipError; + } } } From 15ac91713ad51bee8fed30f956388eeec3f5f55a Mon Sep 17 00:00:00 2001 From: Evgeny Margolis Date: Thu, 22 Sep 2022 11:41:42 -0700 Subject: [PATCH 02/19] Use CopyString() Instead strncpy() (#22708) --- examples/bridge-app/linux/Device.cpp | 8 ++--- .../commands/clusters/ComplexArgument.h | 3 +- examples/ota-provider-app/linux/main.cpp | 7 ++-- .../platform/bouffalolab/bl602/Service.cpp | 4 +-- src/app/clusters/basic/basic.cpp | 4 +-- .../suites/commands/system/SystemCommands.cpp | 8 ++--- .../CommissionerDiscoveryController.cpp | 4 +-- .../TestCommissionableNodeController.cpp | 8 ++--- src/credentials/GroupDataProvider.h | 11 +++--- src/inet/InetInterface.cpp | 13 ++++--- src/lib/dnssd/Discovery_ImplPlatform.cpp | 10 +++--- src/platform/Ameba/AmebaConfig.cpp | 2 +- .../Ameba/DiagnosticDataProviderImpl.cpp | 7 ++-- .../Beken/ConnectivityManagerImpl.cpp | 5 +-- .../Beken/DiagnosticDataProviderImpl.cpp | 8 ++--- .../Beken/NetworkCommissioningWiFiDriver.cpp | 4 +-- .../EFR32/KeyValueStoreManagerImpl.cpp | 5 +-- .../ESP32/DiagnosticDataProviderImpl.cpp | 12 +++---- src/platform/ESP32/DnssdImpl.cpp | 18 ++++------ src/platform/ESP32/DnssdImpl.h | 34 ++++++++----------- src/platform/ESP32/ESP32Config.cpp | 2 +- .../Infineon/CYW30739/BLEManagerImpl.cpp | 8 ++--- .../CYW30739/KeyValueStoreManagerImpl.cpp | 12 ++++--- .../Infineon/PSOC6/BLEManagerImpl.cpp | 8 ++--- .../PSOC6/DiagnosticDataProviderImpl.cpp | 6 ++-- .../Linux/ConnectivityManagerImpl.cpp | 6 ++-- src/platform/Linux/ConnectivityUtils.cpp | 25 +++++++------- .../Linux/DiagnosticDataProviderImpl.cpp | 9 +++-- ...nericThreadStackManagerImpl_OpenThread.cpp | 14 +++----- src/platform/Tizen/ConnectivityUtils.cpp | 8 +++-- src/platform/Zephyr/BLEManagerImpl.cpp | 7 ++-- src/platform/android/AndroidConfig.cpp | 3 +- .../bouffalolab/BL602/BL602Config.cpp | 6 ++-- .../bouffalolab/BL602/BLEManagerImpl.cpp | 8 ++--- .../BL602/DiagnosticDataProviderImpl.cpp | 12 +++---- .../bouffalolab/BL702/BLEManagerImpl.cpp | 7 ++-- src/platform/cc13x2_26x2/BLEManagerImpl.cpp | 6 ++-- .../DiagnosticDataProviderImpl.cpp | 5 ++- src/platform/cc32xx/CC32XXConfig.cpp | 13 ++----- src/platform/mbed/OTAImageProcessorImpl.cpp | 5 +-- .../webos/ConnectivityManagerImpl.cpp | 3 +- src/platform/webos/ConnectivityUtils.cpp | 25 +++++++------- .../webos/DiagnosticDataProviderImpl.cpp | 8 ++--- .../UDCClientState.h | 6 ++-- .../tests/TestUdcMessages.cpp | 7 ++-- .../tests/TestAdditionalDataPayload.cpp | 6 ++-- 46 files changed, 182 insertions(+), 218 deletions(-) diff --git a/examples/bridge-app/linux/Device.cpp b/examples/bridge-app/linux/Device.cpp index eae3eff40de3c2..53959cc5f919c0 100644 --- a/examples/bridge-app/linux/Device.cpp +++ b/examples/bridge-app/linux/Device.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-2022 Project CHIP Authors * Copyright (c) 2019 Google LLC. * All rights reserved. * @@ -24,11 +24,9 @@ using namespace chip::app::Clusters::Actions; -// LightingManager LightingManager::sLight; - Device::Device(const char * szDeviceName, std::string szLocation) { - strncpy(mName, szDeviceName, sizeof(mName)); + chip::Platform::CopyString(mName, szDeviceName); mLocation = szLocation; mReachable = false; mEndpointId = 0; @@ -66,7 +64,7 @@ void Device::SetName(const char * szName) ChipLogProgress(DeviceLayer, "Device[%s]: New Name=\"%s\"", mName, szName); - strncpy(mName, szName, sizeof(mName)); + chip::Platform::CopyString(mName, szName); if (changed) { diff --git a/examples/chip-tool/commands/clusters/ComplexArgument.h b/examples/chip-tool/commands/clusters/ComplexArgument.h index 4a033870e6c4b3..c3937581d76653 100644 --- a/examples/chip-tool/commands/clusters/ComplexArgument.h +++ b/examples/chip-tool/commands/clusters/ComplexArgument.h @@ -24,6 +24,7 @@ #include #include #include +#include #include #include "JsonParser.h" @@ -195,7 +196,7 @@ class ComplexArgumentParser size_t size = strlen(value.asCString()); auto buffer = static_cast(chip::Platform::MemoryCalloc(size, sizeof(char))); - strncpy(buffer, value.asCString(), size); + chip::Platform::CopyString(buffer, size, value.asCString()); request = chip::CharSpan(buffer, size); return CHIP_NO_ERROR; diff --git a/examples/ota-provider-app/linux/main.cpp b/examples/ota-provider-app/linux/main.cpp index aefd9e39224fc7..71b8630cdb2e48 100644 --- a/examples/ota-provider-app/linux/main.cpp +++ b/examples/ota-provider-app/linux/main.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020-2022 Project CHIP Authors * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -111,14 +111,13 @@ static bool ParseJsonFileAndPopulateCandidates(const char * filepath, candidate.vendorId = static_cast(iter.get("vendorId", 1).asUInt()); candidate.productId = static_cast(iter.get("productId", 1).asUInt()); candidate.softwareVersion = static_cast(iter.get("softwareVersion", 10).asUInt64()); - strncpy(candidate.softwareVersionString, iter.get("softwareVersionString", "1.0.0").asCString(), - OTAProviderExample::SW_VER_STR_MAX_LEN); + chip::Platform::CopyString(candidate.softwareVersionString, iter.get("softwareVersionString", "1.0.0").asCString()); candidate.cDVersionNumber = static_cast(iter.get("cDVersionNumber", 0).asUInt()); candidate.softwareVersionValid = iter.get("softwareVersionValid", true).asBool() ? true : false; candidate.minApplicableSoftwareVersion = static_cast(iter.get("minApplicableSoftwareVersion", 0).asUInt64()); candidate.maxApplicableSoftwareVersion = static_cast(iter.get("maxApplicableSoftwareVersion", 1000).asUInt64()); - strncpy(candidate.otaURL, iter.get("otaURL", "https://test.com").asCString(), OTAProviderExample::OTA_URL_MAX_LEN); + chip::Platform::CopyString(candidate.otaURL, iter.get("otaURL", "https://test.com").asCString()); candidates.push_back(candidate); ret = true; } diff --git a/examples/platform/bouffalolab/bl602/Service.cpp b/examples/platform/bouffalolab/bl602/Service.cpp index 521550c9b44335..bba52c66e18f3f 100644 --- a/examples/platform/bouffalolab/bl602/Service.cpp +++ b/examples/platform/bouffalolab/bl602/Service.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020-2022 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,7 +52,7 @@ constexpr uint16_t kUDPBroadcastPort = 23367; void SetDeviceName(const char * newDeviceName) { - strncpy(sDeviceName, newDeviceName, sizeof(sDeviceName) - 1); + chip::Platform::CopyString(sDeviceName, newDeviceName); } void PublishService() diff --git a/src/app/clusters/basic/basic.cpp b/src/app/clusters/basic/basic.cpp index 7ee7d3890d306e..01b7a7ab6f983e 100644 --- a/src/app/clusters/basic/basic.cpp +++ b/src/app/clusters/basic/basic.cpp @@ -1,6 +1,6 @@ /** * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020-2022 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -304,7 +304,7 @@ CHIP_ERROR BasicAttrAccess::ReadLocation(AttributeValueEncoder & aEncoder) CHIP_ERROR err = ConfigurationMgr().GetCountryCode(location, sizeof(location), codeLen); if ((err != CHIP_NO_ERROR) || (codeLen == 0)) { - strncpy(&location[0], "XX", kMaxLen + 1); + Platform::CopyString(location, "XX"); codeLen = strnlen(location, kMaxLen); err = CHIP_NO_ERROR; } diff --git a/src/app/tests/suites/commands/system/SystemCommands.cpp b/src/app/tests/suites/commands/system/SystemCommands.cpp index c7f089065b1932..d586bd1f951385 100644 --- a/src/app/tests/suites/commands/system/SystemCommands.cpp +++ b/src/app/tests/suites/commands/system/SystemCommands.cpp @@ -18,6 +18,8 @@ #include "SystemCommands.h" +#include + namespace { const char basePath[] = "./src/app/tests/suites/commands/system/scripts/"; const char * getScriptsFolder() @@ -45,8 +47,7 @@ CHIP_ERROR SystemCommands::Start(const char * identity, const chip::app::Cluster { VerifyOrReturnError(value.registerKey.Value().size() < 128, CHIP_ERROR_INVALID_ARGUMENT); char registerKey[128]; - memset(registerKey, '\0', sizeof(registerKey)); - strncpy(registerKey, value.registerKey.Value().data(), value.registerKey.Value().size()); + chip::Platform::CopyString(registerKey, value.registerKey.Value()); builder.Add(registerKey); } else @@ -179,8 +180,7 @@ CHIP_ERROR SystemCommands::AddSystemCommandArgument(chip::StringBuilderBase & bu builder.Add(" "); char arg[kArgumentMaxLen]; - memset(arg, 0, sizeof(arg)); - strncpy(arg, argValue.data(), argValue.size()); + chip::Platform::CopyString(arg, argValue); builder.Add(arg); return CHIP_NO_ERROR; diff --git a/src/controller/CommissionerDiscoveryController.cpp b/src/controller/CommissionerDiscoveryController.cpp index 0177e8adecb8c1..7a831a068dc88d 100644 --- a/src/controller/CommissionerDiscoveryController.cpp +++ b/src/controller/CommissionerDiscoveryController.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020-2021 Project CHIP Authors + * Copyright (c) 2020-2022 Project CHIP Authors * Copyright (c) 2013-2017 Nest Labs, Inc. * All rights reserved. * @@ -51,7 +51,7 @@ void CommissionerDiscoveryController::OnUserDirectedCommissioningRequest(UDCClie return; } mReady = false; - strncpy(mCurrentInstance, state.GetInstanceName(), sizeof(mCurrentInstance)); + Platform::CopyString(mCurrentInstance, state.GetInstanceName()); mPendingConsent = true; char rotatingDeviceIdHexBuffer[RotatingDeviceId::kHexMaxLength]; Encoding::BytesToUppercaseHexString(state.GetRotatingId(), state.GetRotatingIdLength(), rotatingDeviceIdHexBuffer, diff --git a/src/controller/tests/TestCommissionableNodeController.cpp b/src/controller/tests/TestCommissionableNodeController.cpp index 10d2a6d9ab8edc..258be7225469c4 100644 --- a/src/controller/tests/TestCommissionableNodeController.cpp +++ b/src/controller/tests/TestCommissionableNodeController.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020-2022 Project CHIP Authors * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,6 +17,7 @@ */ #include +#include #include #include @@ -59,7 +60,7 @@ void TestGetDiscoveredCommissioner_HappyCase(nlTestSuite * inSuite, void * inCon MockResolver resolver; CommissionableNodeController controller(&resolver); chip::Dnssd::DiscoveredNodeData inNodeData; - strncpy(inNodeData.resolutionData.hostName, "mockHostName", sizeof(inNodeData.resolutionData.hostName)); + Platform::CopyString(inNodeData.resolutionData.hostName, "mockHostName"); Inet::IPAddress::FromString("192.168.1.10", inNodeData.resolutionData.ipAddress[0]); inNodeData.resolutionData.numIPs++; inNodeData.resolutionData.port = 5540; @@ -97,12 +98,11 @@ void TestGetDiscoveredCommissioner_HappyCase_OneValidOneInvalidNode(nlTestSuite MockResolver resolver; CommissionableNodeController controller(&resolver); chip::Dnssd::DiscoveredNodeData invalidNodeData, validNodeData; - // strncpy(inNodeData1.hostName, "mockHostName1", sizeof inNodeData1.hostName); Inet::IPAddress::FromString("192.168.1.10", invalidNodeData.resolutionData.ipAddress[0]); invalidNodeData.resolutionData.numIPs++; invalidNodeData.resolutionData.port = 5540; - strncpy(validNodeData.resolutionData.hostName, "mockHostName2", sizeof validNodeData.resolutionData.hostName); + Platform::CopyString(validNodeData.resolutionData.hostName, "mockHostName2"); Inet::IPAddress::FromString("192.168.1.11", validNodeData.resolutionData.ipAddress[0]); validNodeData.resolutionData.numIPs++; validNodeData.resolutionData.port = 5540; diff --git a/src/credentials/GroupDataProvider.h b/src/credentials/GroupDataProvider.h index 3c95f955b23edd..a782805af4d5d3 100644 --- a/src/credentials/GroupDataProvider.h +++ b/src/credentials/GroupDataProvider.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-2022 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,7 @@ #include #include #include +#include namespace chip { namespace Credentials { @@ -56,9 +57,7 @@ class GroupDataProvider } else { - size_t size = strnlen(groupName, kGroupNameMax); - strncpy(name, groupName, size); - name[size] = 0; + Platform::CopyString(name, groupName); } } void SetName(const CharSpan & groupName) @@ -69,9 +68,7 @@ class GroupDataProvider } else { - size_t size = std::min(groupName.size(), kGroupNameMax); - strncpy(name, groupName.data(), size); - name[size] = 0; + Platform::CopyString(name, groupName); } } bool operator==(const GroupInfo & other) diff --git a/src/inet/InetInterface.cpp b/src/inet/InetInterface.cpp index a13ff4e01e5ddb..e3773321e79da1 100644 --- a/src/inet/InetInterface.cpp +++ b/src/inet/InetInterface.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020-2021 Project CHIP Authors + * Copyright (c) 2020-2022 Project CHIP Authors * Copyright (c) 2019 Google LLC. * Copyright (c) 2013-2017 Nest Labs, Inc. * @@ -423,7 +423,7 @@ CHIP_ERROR InterfaceId::GetInterfaceName(char * nameBuf, size_t nameBufSize) con { return CHIP_ERROR_BUFFER_TOO_SMALL; } - strncpy(nameBuf, intfName, nameLength + 1); + Platform::CopyString(nameBuf, nameBufSize, intfName); return CHIP_NO_ERROR; } if (nameBufSize < 1) @@ -698,7 +698,7 @@ CHIP_ERROR InterfaceIterator::GetInterfaceName(char * nameBuf, size_t nameBufSiz { VerifyOrReturnError(HasCurrent(), CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(strlen(mIntfArray[mCurIntf].if_name) < nameBufSize, CHIP_ERROR_BUFFER_TOO_SMALL); - strncpy(nameBuf, mIntfArray[mCurIntf].if_name, nameBufSize); + Platform::CopyString(nameBuf, nameBufSize, mIntfArray[mCurIntf].if_name); return CHIP_NO_ERROR; } @@ -723,8 +723,7 @@ short InterfaceIterator::GetFlags() if (!mIntfFlagsCached && HasCurrent()) { - strncpy(intfData.ifr_name, mIntfArray[mCurIntf].if_name, IFNAMSIZ); - intfData.ifr_name[IFNAMSIZ - 1] = '\0'; + Platform::CopyString(intfData.ifr_name, mIntfArray[mCurIntf].if_name); int res = ioctl(GetIOCTLSocket(), SIOCGIFFLAGS, &intfData); if (res == 0) @@ -843,7 +842,7 @@ CHIP_ERROR InterfaceAddressIterator::GetInterfaceName(char * nameBuf, size_t nam { VerifyOrReturnError(HasCurrent(), CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(strlen(mCurAddr->ifa_name) < nameBufSize, CHIP_ERROR_BUFFER_TOO_SMALL); - strncpy(nameBuf, mCurAddr->ifa_name, nameBufSize); + Platform::CopyString(nameBuf, nameBufSize, mCurAddr->ifa_name); return CHIP_NO_ERROR; } @@ -916,7 +915,7 @@ CHIP_ERROR InterfaceId::GetInterfaceName(char * nameBuf, size_t nameBufSize) con { return CHIP_ERROR_BUFFER_TOO_SMALL; } - strncpy(nameBuf, name, nameLength + 1); + Platform::CopyString(nameBuf, nameBufSize, name); return CHIP_NO_ERROR; } if (nameBufSize < 1) diff --git a/src/lib/dnssd/Discovery_ImplPlatform.cpp b/src/lib/dnssd/Discovery_ImplPlatform.cpp index becd80f05e04db..a7347122f6f20f 100644 --- a/src/lib/dnssd/Discovery_ImplPlatform.cpp +++ b/src/lib/dnssd/Discovery_ImplPlatform.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020-2022 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -483,7 +483,7 @@ CHIP_ERROR DiscoveryImplPlatform::PublishService(const char * serviceType, TextE ReturnErrorOnFailure(protocol == DnssdServiceProtocol::kDnssdProtocolTcp ? MakeInstanceName(service.mName, sizeof(service.mName), peerId) : GetCommissionableInstanceName(service.mName, sizeof(service.mName))); - strncpy(service.mType, serviceType, sizeof(service.mType)); + Platform::CopyString(service.mType, serviceType); service.mAddressType = Inet::IPAddressType::kAny; service.mInterface = interfaceId; service.mProtocol = protocol; @@ -643,7 +643,7 @@ CHIP_ERROR ResolverProxy::ResolveNodeId(const PeerId & peerId, Inet::IPAddressTy DnssdService service; ReturnErrorOnFailure(MakeInstanceName(service.mName, sizeof(service.mName), peerId)); - strncpy(service.mType, kOperationalServiceName, sizeof(service.mType)); + Platform::CopyString(service.mType, kOperationalServiceName); service.mProtocol = DnssdServiceProtocol::kDnssdProtocolTcp; service.mAddressType = type; return ChipDnssdResolve(&service, Inet::InterfaceId::Null(), HandleNodeIdResolve, mDelegate); @@ -665,7 +665,7 @@ CHIP_ERROR ResolverProxy::DiscoverCommissionableNodes(DiscoveryFilter filter) DnssdService service; ReturnErrorOnFailure(MakeServiceSubtype(service.mName, sizeof(service.mName), filter)); - strncpy(service.mType, kCommissionableServiceName, sizeof(service.mType)); + Platform::CopyString(service.mType, kCommissionableServiceName); service.mProtocol = DnssdServiceProtocol::kDnssdProtocolUdp; service.mAddressType = Inet::IPAddressType::kAny; return ChipDnssdResolve(&service, Inet::InterfaceId::Null(), HandleNodeResolve, mDelegate); @@ -689,7 +689,7 @@ CHIP_ERROR ResolverProxy::DiscoverCommissioners(DiscoveryFilter filter) DnssdService service; ReturnErrorOnFailure(MakeServiceSubtype(service.mName, sizeof(service.mName), filter)); - strncpy(service.mType, kCommissionerServiceName, sizeof(service.mType)); + Platform::CopyString(service.mType, kCommissionerServiceName); service.mProtocol = DnssdServiceProtocol::kDnssdProtocolUdp; service.mAddressType = Inet::IPAddressType::kAny; return ChipDnssdResolve(&service, Inet::InterfaceId::Null(), HandleNodeResolve, mDelegate); diff --git a/src/platform/Ameba/AmebaConfig.cpp b/src/platform/Ameba/AmebaConfig.cpp index b9ac5d05b789f2..5c22877c603b87 100644 --- a/src/platform/Ameba/AmebaConfig.cpp +++ b/src/platform/Ameba/AmebaConfig.cpp @@ -245,7 +245,7 @@ CHIP_ERROR AmebaConfig::WriteConfigValueStr(Key key, const char * str, size_t st { strCopy.Calloc(strLen + 1); VerifyOrExit(strCopy, err = CHIP_ERROR_NO_MEMORY); - strncpy(strCopy.Get(), str, strLen); + Platform::CopyString(strCopy.Get(), strLen + 1, str); } err = AmebaConfig::WriteConfigValueStr(key, strCopy.Get()); exit: diff --git a/src/platform/Ameba/DiagnosticDataProviderImpl.cpp b/src/platform/Ameba/DiagnosticDataProviderImpl.cpp index 0acf14fbb87490..4f3b9a7e4fbb23 100644 --- a/src/platform/Ameba/DiagnosticDataProviderImpl.cpp +++ b/src/platform/Ameba/DiagnosticDataProviderImpl.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include @@ -87,8 +88,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetThreadMetrics(ThreadMetrics ** threadM { ThreadMetrics * thread = (ThreadMetrics *) pvPortMalloc(sizeof(ThreadMetrics)); - strncpy(thread->NameBuf, taskStatusArray[x].pcTaskName, kMaxThreadNameLength - 1); - thread->NameBuf[kMaxThreadNameLength] = '\0'; + Platform::CopyString(thread->NameBuf, taskStatusArray[x].pcTaskName); thread->name.Emplace(CharSpan::fromCharString(thread->NameBuf)); thread->id = taskStatusArray[x].xTaskNumber; @@ -196,8 +196,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** { NetworkInterface * ifp = new NetworkInterface(); - strncpy(ifp->Name, ifa->name, Inet::InterfaceId::kMaxIfNameLength); - ifp->Name[Inet::InterfaceId::kMaxIfNameLength - 1] = '\0'; + Platform::CopyString(ifp->Name, ifa->name); ifp->name = CharSpan::fromCharString(ifp->Name); ifp->isOperational = true; diff --git a/src/platform/Beken/ConnectivityManagerImpl.cpp b/src/platform/Beken/ConnectivityManagerImpl.cpp index eb6635936d14b9..3065b1fec3f99d 100644 --- a/src/platform/Beken/ConnectivityManagerImpl.cpp +++ b/src/platform/Beken/ConnectivityManagerImpl.cpp @@ -39,6 +39,7 @@ #endif #include +#include #include #include @@ -389,8 +390,8 @@ void ConnectivityManagerImpl::DriveStationState() memset(&sta_config, 0x0, sizeof(sta_config)); sta_config.security = WIFI_SECURITY_AUTO; // can't use WIFI_DEFAULT_STA_CONFIG because of C99 designator error - strncpy(sta_config.ssid, mWifiNetconf.ssid, mWifiNetconf.ssidLen); - strncpy(sta_config.password, mWifiNetconf.credentials, mWifiNetconf.credentialsLen); + Platform::CopyString(sta_config.ssid, mWifiNetconf.ssidLen, mWifiNetconf.ssid); + Platform::CopyString(sta_config.password, mWifiNetconf.credentialsLen, mWifiNetconf.credentials); BK_LOG_ON_ERR(bk_wifi_sta_set_config(&sta_config)); BK_LOG_ON_ERR(bk_wifi_sta_start()); BK_LOG_ON_ERR(bk_event_register_cb(EVENT_MOD_WIFI, EVENT_ID_ALL, ConnectivityManagerImpl().wlan_event_cb, NULL)); diff --git a/src/platform/Beken/DiagnosticDataProviderImpl.cpp b/src/platform/Beken/DiagnosticDataProviderImpl.cpp index b3f7a98bd54687..b6445fb1a09eaa 100644 --- a/src/platform/Beken/DiagnosticDataProviderImpl.cpp +++ b/src/platform/Beken/DiagnosticDataProviderImpl.cpp @@ -21,6 +21,7 @@ * for Beken platform. */ +#include #include #include @@ -131,10 +132,9 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** return CHIP_ERROR_INTERNAL; } - strncpy(ifp->Name, netif->hostname, Inet::InterfaceId::kMaxIfNameLength); - ifp->Name[Inet::InterfaceId::kMaxIfNameLength - 1] = '\0'; - ifp->name = CharSpan::fromCharString(ifp->Name); - ifp->type = EMBER_ZCL_INTERFACE_TYPE_WI_FI; + Platform::CopyString(ifp->Name, netif->hostname); + ifp->name = CharSpan::fromCharString(ifp->Name); + ifp->type = EMBER_ZCL_INTERFACE_TYPE_WI_FI; ifp->offPremiseServicesReachableIPv4.SetNonNull(false); ifp->offPremiseServicesReachableIPv6.SetNonNull(false); memcpy(ifp->MacAddress, netif->hwaddr, sizeof(netif->hwaddr)); diff --git a/src/platform/Beken/NetworkCommissioningWiFiDriver.cpp b/src/platform/Beken/NetworkCommissioningWiFiDriver.cpp index d556faeb2e02b2..03378b55e67da1 100644 --- a/src/platform/Beken/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/Beken/NetworkCommissioningWiFiDriver.cpp @@ -153,8 +153,8 @@ CHIP_ERROR BekenWiFiDriver::ConnectWiFiNetwork(const char * ssid, uint8_t ssidLe wifi_sta_config_t sta_config; memset(&sta_config, 0x0, sizeof(sta_config)); sta_config.security = WIFI_SECURITY_AUTO; // can't use WIFI_DEFAULT_STA_CONFIG because of C99 designator error - strncpy(sta_config.ssid, ssid, ssidLen); - strncpy(sta_config.password, key, keyLen); + Platform::CopyString(sta_config.ssid, ssidLen, ssid); + Platform::CopyString(sta_config.password, keyLen, key); BK_LOG_ON_ERR(bk_wifi_sta_set_config(&sta_config)); BK_LOG_ON_ERR(bk_wifi_sta_start()); diff --git a/src/platform/EFR32/KeyValueStoreManagerImpl.cpp b/src/platform/EFR32/KeyValueStoreManagerImpl.cpp index 31a5648f5f99b9..febb618aee41de 100644 --- a/src/platform/EFR32/KeyValueStoreManagerImpl.cpp +++ b/src/platform/EFR32/KeyValueStoreManagerImpl.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-2022 Project CHIP Authors * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,6 +21,7 @@ * Platform-specific key value storage implementation for EFR32 */ +#include #include #include #include @@ -158,7 +159,7 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Put(const char * key, const void * value, if (err == CHIP_NO_ERROR) { uint32_t keyIndex = nvm3Key - EFR32Config::kConfigKey_KvsFirstKeySlot; - strncpy(mKvsStoredKeyString[keyIndex], key, sizeof(mKvsStoredKeyString[keyIndex]) - 1); + Platform::CopyString(mKvsStoredKeyString[keyIndex], key); ScheduleKeyMapSave(); } diff --git a/src/platform/ESP32/DiagnosticDataProviderImpl.cpp b/src/platform/ESP32/DiagnosticDataProviderImpl.cpp index fde6aacd96be6a..a80999f5f03ad1 100644 --- a/src/platform/ESP32/DiagnosticDataProviderImpl.cpp +++ b/src/platform/ESP32/DiagnosticDataProviderImpl.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-2022 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -210,11 +211,10 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** { NetworkInterface * ifp = new NetworkInterface(); esp_netif_ip_info_t ipv4_info; - strncpy(ifp->Name, esp_netif_get_ifkey(ifa), Inet::InterfaceId::kMaxIfNameLength); - ifp->Name[Inet::InterfaceId::kMaxIfNameLength - 1] = '\0'; - ifp->name = CharSpan::fromCharString(ifp->Name); - ifp->isOperational = true; - ifp->type = GetInterfaceType(esp_netif_get_desc(ifa)); + Platform::CopyString(ifp->Name, esp_netif_get_ifkey(ifa)); + ifp->name = CharSpan::fromCharString(ifp->Name); + ifp->isOperational = true; + ifp->type = GetInterfaceType(esp_netif_get_desc(ifa)); ifp->offPremiseServicesReachableIPv4.SetNull(); ifp->offPremiseServicesReachableIPv6.SetNull(); if (esp_netif_get_mac(ifa, ifp->MacAddress) != ESP_OK) diff --git a/src/platform/ESP32/DnssdImpl.cpp b/src/platform/ESP32/DnssdImpl.cpp index c3bf509f076ef2..9dab2999bca927 100644 --- a/src/platform/ESP32/DnssdImpl.cpp +++ b/src/platform/ESP32/DnssdImpl.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020-2022 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -285,12 +285,9 @@ CHIP_ERROR OnBrowseDone(BrowseContext * ctx) servicesIndex = 0; while (currentResult) { - strncpy(ctx->mServices[servicesIndex].mName, currentResult->instance_name, - strnlen(currentResult->instance_name, Common::kInstanceNameMaxLength)); - strncpy(ctx->mServices[servicesIndex].mHostName, currentResult->hostname, - strnlen(currentResult->hostname, kHostNameMaxLength)); - strncpy(ctx->mServices[servicesIndex].mType, currentResult->service_type, - strnlen(currentResult->service_type, kDnssdTypeMaxSize)); + Platform::CopyString(ctx->mServices[servicesIndex].mName, currentResult->instance_name); + Platform::CopyString(ctx->mServices[servicesIndex].mHostName, currentResult->hostname); + Platform::CopyString(ctx->mServices[servicesIndex].mType, currentResult->service_type); ctx->mServices[servicesIndex].mProtocol = ctx->mProtocol; ctx->mServices[servicesIndex].mAddressType = MapAddressType(currentResult->ip_protocol); ctx->mServices[servicesIndex].mTransportType = ctx->mAddressType; @@ -341,10 +338,9 @@ CHIP_ERROR OnResolveQuerySrvDone(ResolveContext * ctx) { ctx->mService = static_cast(chip::Platform::MemoryAlloc(sizeof(DnssdService))); VerifyOrExit(ctx->mService != nullptr, error = CHIP_ERROR_NO_MEMORY); - strncpy(ctx->mService->mName, ctx->mResult->instance_name, - strnlen(ctx->mResult->instance_name, Common::kInstanceNameMaxLength)); - strncpy(ctx->mService->mHostName, ctx->mResult->hostname, strnlen(ctx->mResult->hostname, kHostNameMaxLength)); - strncpy(ctx->mService->mType, ctx->mResult->service_type, strnlen(ctx->mResult->service_type, kDnssdTypeMaxSize)); + Platform::CopyString(ctx->mService->mName, ctx->mResult->instance_name); + Platform::CopyString(ctx->mService->mHostName, ctx->mResult->hostname); + Platform::CopyString(ctx->mService->mType, ctx->mResult->service_type); ctx->mService->mProtocol = ctx->mProtocol; ctx->mService->mAddressType = MapAddressType(ctx->mResult->ip_protocol); ctx->mService->mTransportType = ctx->mService->mAddressType; diff --git a/src/platform/ESP32/DnssdImpl.h b/src/platform/ESP32/DnssdImpl.h index 302e1ea8e4e19c..2c3ac69e42b5d6 100644 --- a/src/platform/ESP32/DnssdImpl.h +++ b/src/platform/ESP32/DnssdImpl.h @@ -16,6 +16,7 @@ #pragma once #include +#include #include #include @@ -49,8 +50,7 @@ struct BrowseContext : public GenericContext Inet::IPAddressType addrType, DnssdBrowseCallback cb, void * cbCtx) { - memset(mType, 0, sizeof(mType)); - strncpy(mType, type, strnlen(type, kDnssdTypeMaxSize)); + Platform::CopyString(mType, type); mContextType = ContextType::Browse; mAddressType = addrType; mProtocol = protocol; @@ -104,23 +104,19 @@ struct ResolveContext : public GenericContext ResolveContext(DnssdService * service, Inet::InterfaceId ifId, mdns_search_once_t * searchHandle, DnssdResolveCallback cb, void * cbCtx) { - memset(mType, 0, sizeof(mType)); - memset(mInstanceName, 0, sizeof(mInstanceName)); - strncpy(mType, service->mType, strnlen(service->mType, kDnssdTypeMaxSize)); - mType[kDnssdTypeMaxSize] = 0; - strncpy(mInstanceName, service->mName, strnlen(service->mName, Common::kInstanceNameMaxLength)); - mInstanceName[Common::kInstanceNameMaxLength] = 0; - mContextType = ContextType::Resolve; - mProtocol = service->mProtocol; - mResolveCb = cb; - mCbContext = cbCtx; - mInterfaceId = ifId; - mSearchHandle = searchHandle; - mResolveState = ResolveState::QuerySrv; - mResult = nullptr; - mService = nullptr; - mAddresses = nullptr; - mAddressCount = 0; + Platform::CopyString(mType, type); + Platform::CopyString(mInstanceName, service->mName); + mContextType = ContextType::Resolve; + mProtocol = service->mProtocol; + mResolveCb = cb; + mCbContext = cbCtx; + mInterfaceId = ifId; + mSearchHandle = searchHandle; + mResolveState = ResolveState::QuerySrv; + mResult = nullptr; + mService = nullptr; + mAddresses = nullptr; + mAddressCount = 0; } ~ResolveContext() diff --git a/src/platform/ESP32/ESP32Config.cpp b/src/platform/ESP32/ESP32Config.cpp index 361cd7b9c370c2..92c8946b75fc75 100644 --- a/src/platform/ESP32/ESP32Config.cpp +++ b/src/platform/ESP32/ESP32Config.cpp @@ -309,7 +309,7 @@ CHIP_ERROR ESP32Config::WriteConfigValueStr(Key key, const char * str, size_t st { strCopy.Calloc(strLen + 1); VerifyOrReturnError(strCopy, CHIP_ERROR_NO_MEMORY); - strncpy(strCopy.Get(), str, strLen); + Platform::CopyString(strCopy.Get(), strLen + 1, str); } return ESP32Config::WriteConfigValueStr(key, strCopy.Get()); } diff --git a/src/platform/Infineon/CYW30739/BLEManagerImpl.cpp b/src/platform/Infineon/CYW30739/BLEManagerImpl.cpp index 57734f4e0ec2ac..40428c16ba2853 100644 --- a/src/platform/Infineon/CYW30739/BLEManagerImpl.cpp +++ b/src/platform/Infineon/CYW30739/BLEManagerImpl.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020-2022 Project CHIP Authors * Copyright (c) 2020 Nest Labs, Inc. * All rights reserved. * @@ -174,8 +174,7 @@ CHIP_ERROR BLEManagerImpl::_SetDeviceName(const char * deviceName) { return CHIP_ERROR_INVALID_ARGUMENT; } - memset(mDeviceName, 0, kMaxDeviceNameLength); - strncpy(mDeviceName, deviceName, strlen(deviceName)); + Platform::CopyString(mDeviceName, deviceName); mFlags.Set(Flags::kFlag_DeviceNameSet, true); ChipLogProgress(DeviceLayer, "Setting device name to : \"%s\"", deviceName); } @@ -764,8 +763,7 @@ void BLEManagerImpl::SetAdvertisingData(void) deviceDiscriminator); localDeviceNameLen = strlen(sInstance.mDeviceName); - memset((void *) app_gap_device_name, 0, sizeof(app_gap_device_name)); - strncpy((char *) app_gap_device_name, sInstance.mDeviceName, sizeof(app_gap_device_name) - 1); + Platform::CopyString((char *) app_gap_device_name, sizeof(app_gap_device_name), sInstance.mDeviceName); app_gatt_db_ext_attr_tbl[0].cur_len = app_gatt_db_ext_attr_tbl[0].max_len < strlen(sInstance.mDeviceName) ? app_gatt_db_ext_attr_tbl[0].max_len : strlen(sInstance.mDeviceName); diff --git a/src/platform/Infineon/CYW30739/KeyValueStoreManagerImpl.cpp b/src/platform/Infineon/CYW30739/KeyValueStoreManagerImpl.cpp index 31c01f097095dc..f139f6bb9c62d3 100644 --- a/src/platform/Infineon/CYW30739/KeyValueStoreManagerImpl.cpp +++ b/src/platform/Infineon/CYW30739/KeyValueStoreManagerImpl.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-2022 Project CHIP Authors * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -176,10 +176,14 @@ CHIP_ERROR KeyValueStoreManagerImpl::EraseAll(void) KeyValueStoreManagerImpl::KeyStorage::KeyStorage(const char * key) : mValueSize(0) { - memset(mKey, 0, sizeof(mKey)); - if (key != NULL) - strncpy(mKey, key, sizeof(mKey)); + { + Platform::CopyString(mKey, key); + } + else + { + mKey[0] = 0; + } } bool KeyValueStoreManagerImpl::KeyStorage::IsMatchKey(const char * key) const diff --git a/src/platform/Infineon/PSOC6/BLEManagerImpl.cpp b/src/platform/Infineon/PSOC6/BLEManagerImpl.cpp index f786895eb052d2..9d380a7124ae8a 100644 --- a/src/platform/Infineon/PSOC6/BLEManagerImpl.cpp +++ b/src/platform/Infineon/PSOC6/BLEManagerImpl.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-2022 Project CHIP Authors * Copyright (c) 2020 Nest Labs, Inc. * All rights reserved. * @@ -29,6 +29,7 @@ #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include +#include #include #include #include @@ -209,8 +210,7 @@ CHIP_ERROR BLEManagerImpl::_SetDeviceName(const char * deviceName) { return CHIP_ERROR_INVALID_ARGUMENT; } - memset(mDeviceName, 0, kMaxDeviceNameLength); - strncpy(mDeviceName, deviceName, strlen(deviceName)); + Platform::CopyString(mDeviceName, deviceName); mFlags.Set(Flags::kFlag_DeviceNameSet, true); ChipLogProgress(DeviceLayer, "Setting device name to : \"%s\"", deviceName); } @@ -896,7 +896,7 @@ void BLEManagerImpl::SetAdvertisingData(void) deviceDiscriminator); localDeviceNameLen = strlen(sInstance.mDeviceName); - strncpy((char *) app_gap_device_name, sInstance.mDeviceName, sizeof(app_gap_device_name)); + Platform::CopyString((char *) app_gap_device_name, sizeof(app_gap_device_name), sInstance.mDeviceName); app_gatt_db_ext_attr_tbl[0].cur_len = app_gatt_db_ext_attr_tbl[0].max_len < strlen(sInstance.mDeviceName) ? app_gatt_db_ext_attr_tbl[0].max_len : strlen(sInstance.mDeviceName); diff --git a/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.cpp b/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.cpp index 8b5ca454035373..b91ae117dec22d 100644 --- a/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.cpp +++ b/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-2022 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ #include "cyhal_system.h" #include +#include #include #include #include @@ -565,8 +566,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetThreadMetrics(ThreadMetrics ** threadM { ThreadMetrics * thread = (ThreadMetrics *) pvPortMalloc(sizeof(ThreadMetrics)); - strncpy(thread->NameBuf, taskStatusArray[x].pcTaskName, kMaxThreadNameLength - 1); - thread->NameBuf[kMaxThreadNameLength] = '\0'; + Platform::CopyString(thread->NameBuf, taskStatusArray[x].pcTaskName); thread->name.Emplace(CharSpan::fromCharString(thread->NameBuf)); thread->id = taskStatusArray[x].xTaskNumber; diff --git a/src/platform/Linux/ConnectivityManagerImpl.cpp b/src/platform/Linux/ConnectivityManagerImpl.cpp index 968240c582ad12..ee522b39c795a7 100644 --- a/src/platform/Linux/ConnectivityManagerImpl.cpp +++ b/src/platform/Linux/ConnectivityManagerImpl.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020-2021 Project CHIP Authors + * Copyright (c) 2020-2022 Project CHIP Authors * Copyright (c) 2019 Nest Labs, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -39,6 +39,7 @@ #include #include +#include #include #include @@ -596,8 +597,7 @@ void ConnectivityManagerImpl::_OnWpaInterfaceReady(GObject * source_object, GAsy mWpaSupplicant.state = GDBusWpaSupplicant::WPA_GOT_INTERFACE_PATH; ChipLogProgress(DeviceLayer, "wpa_supplicant: WiFi interface: %s", mWpaSupplicant.interfacePath); - strncpy(sWiFiIfName, CHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME, IFNAMSIZ); - sWiFiIfName[IFNAMSIZ - 1] = '\0'; + Platform::CopyString(sWiFiIfName, CHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME); wpa_fi_w1_wpa_supplicant1_interface_proxy_new_for_bus(G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, kWpaSupplicantServiceName, mWpaSupplicant.interfacePath, nullptr, diff --git a/src/platform/Linux/ConnectivityUtils.cpp b/src/platform/Linux/ConnectivityUtils.cpp index 3862972c1fbdd3..14cfdd47a75f78 100644 --- a/src/platform/Linux/ConnectivityUtils.cpp +++ b/src/platform/Linux/ConnectivityUtils.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-2022 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,6 +41,7 @@ #include #include +#include #include using namespace ::chip::app::Clusters::GeneralDiagnostics; @@ -255,7 +256,7 @@ InterfaceType ConnectivityUtils::GetInterfaceConnectionType(const char * ifname) // Test wireless extensions for CONNECTION_WIFI struct iwreq pwrq = {}; - strncpy(pwrq.ifr_name, ifname, IFNAMSIZ - 1); + Platform::CopyString(pwrq.ifr_name, ifname); if (ioctl(sock, SIOCGIWNAME, &pwrq) != -1) { @@ -267,7 +268,7 @@ InterfaceType ConnectivityUtils::GetInterfaceConnectionType(const char * ifname) ecmd.cmd = ETHTOOL_GSET; struct ifreq ifr = {}; ifr.ifr_data = reinterpret_cast(&ecmd); - strncpy(ifr.ifr_name, ifname, IFNAMSIZ - 1); + Platform::CopyString(ifr.ifr_name, ifname); if (ioctl(sock, SIOCETHTOOL, &ifr) != -1) ret = InterfaceType::EMBER_ZCL_INTERFACE_TYPE_ETHERNET; @@ -421,9 +422,8 @@ CHIP_ERROR ConnectivityUtils::GetWiFiInterfaceName(char * ifname, size_t bufSize { if (GetInterfaceConnectionType(ifa->ifa_name) == InterfaceType::EMBER_ZCL_INTERFACE_TYPE_WI_FI) { - strncpy(ifname, ifa->ifa_name, bufSize); - ifname[bufSize - 1] = '\0'; - err = CHIP_NO_ERROR; + Platform::CopyString(ifname, bufSize, ifa->ifa_name); + err = CHIP_NO_ERROR; break; } } @@ -440,7 +440,7 @@ CHIP_ERROR ConnectivityUtils::GetWiFiParameter(int skfd, /* Socket to struct iwreq * pwrq) /* Fixed part of the request */ { /* Set device name */ - strncpy(pwrq->ifr_name, ifname, IFNAMSIZ); + Platform::CopyString(pwrq->ifr_name, ifname); /* Do the request */ if (ioctl(skfd, request, pwrq) < 0) @@ -458,7 +458,7 @@ CHIP_ERROR ConnectivityUtils::GetWiFiStats(int skfd, const char * ifname, struct wrq.u.data.pointer = (caddr_t) stats; wrq.u.data.length = sizeof(struct iw_statistics); wrq.u.data.flags = 1; /*Clear updated flag */ - strncpy(wrq.ifr_name, ifname, IFNAMSIZ); + Platform::CopyString(wrq.ifr_name, ifname); return GetWiFiParameter(skfd, ifname, SIOCGIWSTATS, &wrq); } @@ -616,9 +616,8 @@ CHIP_ERROR ConnectivityUtils::GetEthInterfaceName(char * ifname, size_t bufSize) { if (GetInterfaceConnectionType(ifa->ifa_name) == InterfaceType::EMBER_ZCL_INTERFACE_TYPE_ETHERNET) { - strncpy(ifname, ifa->ifa_name, bufSize); - ifname[bufSize - 1] = '\0'; - err = CHIP_NO_ERROR; + Platform::CopyString(ifname, bufSize, ifa->ifa_name); + err = CHIP_NO_ERROR; break; } } @@ -640,7 +639,7 @@ CHIP_ERROR ConnectivityUtils::GetEthPHYRate(const char * ifname, app::Clusters:: struct ifreq ifr = {}; ifr.ifr_data = reinterpret_cast(&ecmd); - strncpy(ifr.ifr_name, ifname, IFNAMSIZ - 1); + Platform::CopyString(ifr.ifr_name, ifname); if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { @@ -709,7 +708,7 @@ CHIP_ERROR ConnectivityUtils::GetEthFullDuplex(const char * ifname, bool & fullD struct ifreq ifr = {}; ifr.ifr_data = reinterpret_cast(&ecmd); - strncpy(ifr.ifr_name, ifname, IFNAMSIZ - 1); + Platform::CopyString(ifr.ifr_name, ifname); if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { diff --git a/src/platform/Linux/DiagnosticDataProviderImpl.cpp b/src/platform/Linux/DiagnosticDataProviderImpl.cpp index 78d6cfe42bb612..9f039bd4ab3434 100644 --- a/src/platform/Linux/DiagnosticDataProviderImpl.cpp +++ b/src/platform/Linux/DiagnosticDataProviderImpl.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-2022 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -301,8 +302,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetThreadMetrics(ThreadMetrics ** threadM ThreadMetrics * thread = new ThreadMetrics(); - strncpy(thread->NameBuf, entry->d_name, kMaxThreadNameLength); - thread->NameBuf[kMaxThreadNameLength] = '\0'; + Platform::CopyString(thread->NameBuf, entry->d_name); thread->name.Emplace(CharSpan::fromCharString(thread->NameBuf)); thread->id = atoi(entry->d_name); @@ -453,8 +453,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** uint8_t size = 0; NetworkInterface * ifp = new NetworkInterface(); - strncpy(ifp->Name, ifa->ifa_name, Inet::InterfaceId::kMaxIfNameLength); - ifp->Name[Inet::InterfaceId::kMaxIfNameLength - 1] = '\0'; + Platform::CopyString(ifp->Name, ifa->ifa_name); ifp->name = CharSpan::fromCharString(ifp->Name); ifp->isOperational = ifa->ifa_flags & IFF_RUNNING; diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp index 322b7e57582454..4979e7249873b5 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020-2022 Project CHIP Authors * Copyright (c) 2019 Nest Labs, Inc. * All rights reserved. * @@ -2427,9 +2427,7 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::FromOtDnsRespons { return CHIP_ERROR_INVALID_ARGUMENT; } - strncpy(mdnsService.mHostName, serviceInfo.mHostNameBuffer, substringSize); - // Append string terminating character. - mdnsService.mHostName[substringSize] = '\0'; + Platform::CopyString(mdnsService.mHostName, serviceInfo.mHostNameBuffer); if (strchr(serviceType, '.') == nullptr) return CHIP_ERROR_INVALID_ARGUMENT; @@ -2440,9 +2438,7 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::FromOtDnsRespons { return CHIP_ERROR_INVALID_ARGUMENT; } - strncpy(mdnsService.mType, serviceType, substringSize); - // Append string terminating character. - mdnsService.mType[substringSize] = '\0'; + Platform::CopyString(mdnsService.mType, serviceType); // Extract from the ... the part. const char * protocolSubstringStart = serviceType + substringSize + 1; @@ -2455,9 +2451,7 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::FromOtDnsRespons { return CHIP_ERROR_INVALID_ARGUMENT; } - strncpy(protocol, protocolSubstringStart, substringSize); - // Append string terminating character. - protocol[substringSize] = '\0'; + Platform::CopyString(protocol, protocolSubstringStart); if (strncmp(protocol, "_udp", chip::Dnssd::kDnssdProtocolTextMaxSize) == 0) { diff --git a/src/platform/Tizen/ConnectivityUtils.cpp b/src/platform/Tizen/ConnectivityUtils.cpp index e86e2349318f76..42106db7411cb4 100644 --- a/src/platform/Tizen/ConnectivityUtils.cpp +++ b/src/platform/Tizen/ConnectivityUtils.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-2022 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,6 +34,8 @@ #include #include +#include + using namespace ::chip::app::Clusters::GeneralDiagnostics; namespace chip { @@ -53,7 +55,7 @@ InterfaceType ConnectivityUtils::GetInterfaceConnectionType(const char * ifname) // Test wireless extensions for CONNECTION_WIFI struct iwreq pwrq = {}; - strncpy(pwrq.ifr_name, ifname, IFNAMSIZ - 1); + Platform::CopyString(pwrq.ifr_name, ifname); if (ioctl(sock, SIOCGIWNAME, &pwrq) != -1) { @@ -65,7 +67,7 @@ InterfaceType ConnectivityUtils::GetInterfaceConnectionType(const char * ifname) ecmd.cmd = ETHTOOL_GSET; struct ifreq ifr = {}; ifr.ifr_data = reinterpret_cast(&ecmd); - strncpy(ifr.ifr_name, ifname, IFNAMSIZ - 1); + Platform::CopyString(ifr.ifr_name, ifname); if (ioctl(sock, SIOCETHTOOL, &ifr) != -1) ret = InterfaceType::EMBER_ZCL_INTERFACE_TYPE_ETHERNET; diff --git a/src/platform/Zephyr/BLEManagerImpl.cpp b/src/platform/Zephyr/BLEManagerImpl.cpp index 6039d2ae011c11..aeb0bfaadb7630 100644 --- a/src/platform/Zephyr/BLEManagerImpl.cpp +++ b/src/platform/Zephyr/BLEManagerImpl.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020-2021 Project CHIP Authors + * Copyright (c) 2020-2022 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -378,10 +378,7 @@ CHIP_ERROR BLEManagerImpl::_SetAdvertisingMode(BLEAdvertisingMode mode) CHIP_ERROR BLEManagerImpl::_GetDeviceName(char * buf, size_t bufSize) { - size_t len = bufSize - 1; - - strncpy(buf, bt_get_name(), len); - buf[len] = 0; + Platform::CopyString(buf, bufSize, bt_get_name()); return CHIP_NO_ERROR; } diff --git a/src/platform/android/AndroidConfig.cpp b/src/platform/android/AndroidConfig.cpp index 5750ae9c59fbb3..f88abf1ab5e54a 100644 --- a/src/platform/android/AndroidConfig.cpp +++ b/src/platform/android/AndroidConfig.cpp @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -239,7 +240,7 @@ CHIP_ERROR AndroidConfig::ReadConfigValueStr(Key key, char * buf, size_t bufSize chip::JniUtfString utfValue(env, (jstring) javaValue); outLen = strlen(utfValue.c_str()); - strncpy(buf, utfValue.c_str(), bufSize); + Platform::CopyString(buf, bufSize, utfValue.c_str()); return CHIP_NO_ERROR; } diff --git a/src/platform/bouffalolab/BL602/BL602Config.cpp b/src/platform/bouffalolab/BL602/BL602Config.cpp index 1827f6e1622e43..38b0ada102bdb5 100644 --- a/src/platform/bouffalolab/BL602/BL602Config.cpp +++ b/src/platform/bouffalolab/BL602/BL602Config.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-2022 Project CHIP Authors * Copyright (c) 2019-2020 Google LLC. * Copyright (c) 2019 Nest Labs, Inc. * All rights reserved. @@ -154,7 +154,7 @@ CHIP_ERROR BL602Config::ReadConfigValueStr(Key key, char * buf, size_t bufSize, SuccessOrExit(err); outLen = ret; - strncpy(buf, tmpVal, outLen); + Platform::CopyString(buf, outLen, tmpVal); exit: return err; @@ -266,7 +266,7 @@ CHIP_ERROR BL602Config::WriteConfigValueStr(Key key, const char * str, size_t st { strCopy.Calloc(strLen + 1); VerifyOrExit(strCopy, err = CHIP_ERROR_NO_MEMORY); - strncpy(strCopy.Get(), str, strLen); + Platform::CopyString(strCopy.Get(), strLen + 1, str); } err = BL602Config::WriteConfigValueStr(key, strCopy.Get()); diff --git a/src/platform/bouffalolab/BL602/BLEManagerImpl.cpp b/src/platform/bouffalolab/BL602/BLEManagerImpl.cpp index 7d2bd2ad6e869f..cf00d6a00095ce 100644 --- a/src/platform/bouffalolab/BL602/BLEManagerImpl.cpp +++ b/src/platform/bouffalolab/BL602/BLEManagerImpl.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020-2021 Project CHIP Authors + * Copyright (c) 2020-2022 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,6 +30,7 @@ #include "BLEManagerImpl.h" #include +#include #include #include #include @@ -391,10 +392,7 @@ CHIP_ERROR BLEManagerImpl::_SetAdvertisingMode(BLEAdvertisingMode mode) CHIP_ERROR BLEManagerImpl::_GetDeviceName(char * buf, size_t bufSize) { - size_t len = bufSize - 1; - - strncpy(buf, bt_get_name(), len); - buf[len] = 0; + Platform::CopyString(buf, bufSize, bt_get_name()); return CHIP_NO_ERROR; } diff --git a/src/platform/bouffalolab/BL602/DiagnosticDataProviderImpl.cpp b/src/platform/bouffalolab/BL602/DiagnosticDataProviderImpl.cpp index f116522a12b0c2..e260e750a51493 100644 --- a/src/platform/bouffalolab/BL602/DiagnosticDataProviderImpl.cpp +++ b/src/platform/bouffalolab/BL602/DiagnosticDataProviderImpl.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-2022 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ #include #include +#include #include @@ -190,11 +191,10 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** netif = wifi_mgmr_sta_netif_get(); if (netif) { - strncpy(ifp->Name, netif->name, Inet::InterfaceId::kMaxIfNameLength); - ifp->Name[Inet::InterfaceId::kMaxIfNameLength - 1] = '\0'; - ifp->name = CharSpan::fromCharString(ifp->Name); - ifp->isOperational = true; - ifp->type = EMBER_ZCL_INTERFACE_TYPE_WI_FI; + Platform::CopyString(ifp->Name, netif->name); + ifp->name = CharSpan::fromCharString(ifp->Name); + ifp->isOperational = true; + ifp->type = EMBER_ZCL_INTERFACE_TYPE_WI_FI; ifp->offPremiseServicesReachableIPv4.SetNull(); ifp->offPremiseServicesReachableIPv6.SetNull(); bl_efuse_read_mac(ifp->MacAddress); diff --git a/src/platform/bouffalolab/BL702/BLEManagerImpl.cpp b/src/platform/bouffalolab/BL702/BLEManagerImpl.cpp index 852c344c80b125..72be562a444a7c 100644 --- a/src/platform/bouffalolab/BL702/BLEManagerImpl.cpp +++ b/src/platform/bouffalolab/BL702/BLEManagerImpl.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020-2021 Project CHIP Authors + * Copyright (c) 2020-2022 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -362,10 +362,7 @@ CHIP_ERROR BLEManagerImpl::_SetAdvertisingMode(BLEAdvertisingMode mode) CHIP_ERROR BLEManagerImpl::_GetDeviceName(char * buf, size_t bufSize) { - size_t len = bufSize - 1; - - strncpy(buf, bt_get_name(), len); - buf[len] = 0; + Platform::CopyString(buf, bufSize, bt_get_name()); return CHIP_NO_ERROR; } diff --git a/src/platform/cc13x2_26x2/BLEManagerImpl.cpp b/src/platform/cc13x2_26x2/BLEManagerImpl.cpp index be0bb76603ca6e..1aa871a977b855 100644 --- a/src/platform/cc13x2_26x2/BLEManagerImpl.cpp +++ b/src/platform/cc13x2_26x2/BLEManagerImpl.cpp @@ -1,7 +1,7 @@ /* * - * Copyright (c) 2020-2021 Project CHIP Authors + * Copyright (c) 2020-2022 Project CHIP Authors * Copyright (c) 2019 Nest Labs, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -170,7 +170,7 @@ CHIP_ERROR BLEManagerImpl::_GetDeviceName(char * buf, size_t bufSize) if (bufSize <= GAP_DEVICE_NAME_LEN) { - strncpy(buf, mDeviceName, bufSize); + Platform::CopyString(buf, bufSize, mDeviceName); } else { @@ -186,7 +186,7 @@ CHIP_ERROR BLEManagerImpl::_SetDeviceName(const char * deviceName) if (strlen(deviceName) <= GAP_DEVICE_NAME_LEN) { - strncpy(mDeviceName, deviceName, strlen(deviceName)); + Platform::CopyString(mDeviceName, deviceName); mFlags.Set(Flags::kBLEStackGATTNameUpdate); mFlags.Set(Flags::kAdvertisingRefreshNeeded); diff --git a/src/platform/cc13x2_26x2/DiagnosticDataProviderImpl.cpp b/src/platform/cc13x2_26x2/DiagnosticDataProviderImpl.cpp index f2126f30533b3f..b8733d456ff31a 100644 --- a/src/platform/cc13x2_26x2/DiagnosticDataProviderImpl.cpp +++ b/src/platform/cc13x2_26x2/DiagnosticDataProviderImpl.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-2022 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -87,8 +87,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetThreadMetrics(ThreadMetrics ** threadM { ThreadMetrics * thread = (ThreadMetrics *) pvPortMalloc(sizeof(ThreadMetrics)); - strncpy(thread->NameBuf, taskStatusArray[x].pcTaskName, kMaxThreadNameLength - 1); - thread->NameBuf[kMaxThreadNameLength] = '\0'; + Platform::CopyString(thread->NameBuf, taskStatusArray[x].pcTaskName); thread->name.Emplace(CharSpan::fromCharString(thread->NameBuf)); thread->id = taskStatusArray[x].xTaskNumber; diff --git a/src/platform/cc32xx/CC32XXConfig.cpp b/src/platform/cc32xx/CC32XXConfig.cpp index c5d2370997a054..e6f30325cb3a80 100644 --- a/src/platform/cc32xx/CC32XXConfig.cpp +++ b/src/platform/cc32xx/CC32XXConfig.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-2022 Project CHIP Authors * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -73,16 +73,7 @@ class CC32XXKVSEntry CC32XXKVSEntry(char * key, const uint8_t * pBuf, uint16_t len) { - uint32_t mKLen = strlen(key); - if (mKLen > 40) - { - strncpy(mKey, key, 39); - mKey[39] = '\0'; - } - else - { - strncpy(mKey, key, mKLen); - } + Platform::CopyString(mKey, key); mValueLen = len; mValue = new uint8_t[len]; diff --git a/src/platform/mbed/OTAImageProcessorImpl.cpp b/src/platform/mbed/OTAImageProcessorImpl.cpp index 714601f6c0336d..d83f2e101fb3e7 100644 --- a/src/platform/mbed/OTAImageProcessorImpl.cpp +++ b/src/platform/mbed/OTAImageProcessorImpl.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-2022 Project CHIP Authors * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,6 +17,7 @@ */ #include "OTAImageProcessorImpl.h" +#include #include #include @@ -154,7 +155,7 @@ int OTAImageProcessorImpl::MemoryTest() // Clear the buffer so we don't get old data memset(buffer, 0x0, buffer_size); // Update buffer with our string we want to store - strncpy(buffer, "Hello Storage!", buffer_size); + Platform::CopyString(buffer, buffer_size, "Hello Storage!"); ret = mBlockDevice->program(buffer, 0, buffer_size); if (ret) diff --git a/src/platform/webos/ConnectivityManagerImpl.cpp b/src/platform/webos/ConnectivityManagerImpl.cpp index bcac878229e4b6..ed43cd38f7d710 100644 --- a/src/platform/webos/ConnectivityManagerImpl.cpp +++ b/src/platform/webos/ConnectivityManagerImpl.cpp @@ -570,8 +570,7 @@ void ConnectivityManagerImpl::_OnWpaInterfaceReady(GObject * source_object, GAsy mWpaSupplicant.state = GDBusWpaSupplicant::WPA_GOT_INTERFACE_PATH; ChipLogProgress(DeviceLayer, "wpa_supplicant: WiFi interface: %s", mWpaSupplicant.interfacePath); - strncpy(sWiFiIfName, CHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME, IFNAMSIZ); - sWiFiIfName[IFNAMSIZ - 1] = '\0'; + Platform::CopyString(sWiFiIfName, CHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME); wpa_fi_w1_wpa_supplicant1_interface_proxy_new_for_bus(G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, kWpaSupplicantServiceName, mWpaSupplicant.interfacePath, nullptr, diff --git a/src/platform/webos/ConnectivityUtils.cpp b/src/platform/webos/ConnectivityUtils.cpp index cae0a9e2108ed9..542ec94c2af06d 100644 --- a/src/platform/webos/ConnectivityUtils.cpp +++ b/src/platform/webos/ConnectivityUtils.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-2022 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,6 +41,7 @@ #include #include +#include #include using namespace ::chip::app::Clusters::GeneralDiagnostics; @@ -255,7 +256,7 @@ InterfaceType ConnectivityUtils::GetInterfaceConnectionType(const char * ifname) // Test wireless extensions for CONNECTION_WIFI struct iwreq pwrq = {}; - strncpy(pwrq.ifr_name, ifname, IFNAMSIZ - 1); + Platform::CopyString(pwrq.ifr_name, ifname); if (ioctl(sock, SIOCGIWNAME, &pwrq) != -1) { @@ -267,7 +268,7 @@ InterfaceType ConnectivityUtils::GetInterfaceConnectionType(const char * ifname) ecmd.cmd = ETHTOOL_GSET; struct ifreq ifr = {}; ifr.ifr_data = reinterpret_cast(&ecmd); - strncpy(ifr.ifr_name, ifname, IFNAMSIZ - 1); + Platform::CopyString(ifr.ifr_name, ifname); if (ioctl(sock, SIOCETHTOOL, &ifr) != -1) ret = InterfaceType::EMBER_ZCL_INTERFACE_TYPE_ETHERNET; @@ -329,9 +330,8 @@ CHIP_ERROR ConnectivityUtils::GetWiFiInterfaceName(char * ifname, size_t bufSize { if (GetInterfaceConnectionType(ifa->ifa_name) == InterfaceType::EMBER_ZCL_INTERFACE_TYPE_WI_FI) { - strncpy(ifname, ifa->ifa_name, bufSize); - ifname[bufSize - 1] = '\0'; - err = CHIP_NO_ERROR; + Platform::CopyString(ifname, bufSize, ifa->ifa_name); + err = CHIP_NO_ERROR; break; } } @@ -348,7 +348,7 @@ CHIP_ERROR ConnectivityUtils::GetWiFiParameter(int skfd, /* Socket to struct iwreq * pwrq) /* Fixed part of the request */ { /* Set device name */ - strncpy(pwrq->ifr_name, ifname, IFNAMSIZ); + Platform::CopyString(pwrq->ifr_name, ifname); /* Do the request */ if (ioctl(skfd, request, pwrq) < 0) @@ -366,7 +366,7 @@ CHIP_ERROR ConnectivityUtils::GetWiFiStats(int skfd, const char * ifname, struct wrq.u.data.pointer = (caddr_t) stats; wrq.u.data.length = sizeof(struct iw_statistics); wrq.u.data.flags = 1; /*Clear updated flag */ - strncpy(wrq.ifr_name, ifname, IFNAMSIZ); + Platform::CopyString(wrq.ifr_name, ifname); return GetWiFiParameter(skfd, ifname, SIOCGIWSTATS, &wrq); } @@ -524,9 +524,8 @@ CHIP_ERROR ConnectivityUtils::GetEthInterfaceName(char * ifname, size_t bufSize) { if (GetInterfaceConnectionType(ifa->ifa_name) == InterfaceType::EMBER_ZCL_INTERFACE_TYPE_ETHERNET) { - strncpy(ifname, ifa->ifa_name, bufSize); - ifname[bufSize - 1] = '\0'; - err = CHIP_NO_ERROR; + Platform::CopyString(ifname, bufSize, ifa->ifa_name); + err = CHIP_NO_ERROR; break; } } @@ -548,7 +547,7 @@ CHIP_ERROR ConnectivityUtils::GetEthPHYRate(const char * ifname, app::Clusters:: struct ifreq ifr = {}; ifr.ifr_data = reinterpret_cast(&ecmd); - strncpy(ifr.ifr_name, ifname, IFNAMSIZ - 1); + Platform::CopyString(ifr.ifr_name, ifname); if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { @@ -617,7 +616,7 @@ CHIP_ERROR ConnectivityUtils::GetEthFullDuplex(const char * ifname, bool & fullD struct ifreq ifr = {}; ifr.ifr_data = reinterpret_cast(&ecmd); - strncpy(ifr.ifr_name, ifname, IFNAMSIZ - 1); + Platform::CopyString(ifr.ifr_name, ifname); if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { diff --git a/src/platform/webos/DiagnosticDataProviderImpl.cpp b/src/platform/webos/DiagnosticDataProviderImpl.cpp index b70bdf9a6fe2f3..990bd5226f875d 100644 --- a/src/platform/webos/DiagnosticDataProviderImpl.cpp +++ b/src/platform/webos/DiagnosticDataProviderImpl.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-2022 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -288,8 +288,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetThreadMetrics(ThreadMetrics ** threadM ThreadMetrics * thread = new ThreadMetrics(); - strncpy(thread->NameBuf, entry->d_name, kMaxThreadNameLength); - thread->NameBuf[kMaxThreadNameLength] = '\0'; + Platform::CopyString(thread->NameBuf, entry->d_name); thread->name.Emplace(CharSpan::fromCharString(thread->NameBuf)); thread->id = atoi(entry->d_name); @@ -439,8 +438,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** { NetworkInterface * ifp = new NetworkInterface(); - strncpy(ifp->Name, ifa->ifa_name, Inet::InterfaceId::kMaxIfNameLength); - ifp->Name[Inet::InterfaceId::kMaxIfNameLength - 1] = '\0'; + Platform::CopyString(ifp->Name, ifa->ifa_name); ifp->name = CharSpan::fromCharString(ifp->Name); ifp->isOperational = ifa->ifa_flags & IFF_RUNNING; diff --git a/src/protocols/user_directed_commissioning/UDCClientState.h b/src/protocols/user_directed_commissioning/UDCClientState.h index 0c5736d89b479e..36e14b0798ee84 100644 --- a/src/protocols/user_directed_commissioning/UDCClientState.h +++ b/src/protocols/user_directed_commissioning/UDCClientState.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-2022 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -67,10 +67,10 @@ class UDCClientState void SetPeerAddress(const PeerAddress & address) { mPeerAddress = address; } const char * GetInstanceName() const { return mInstanceName; } - void SetInstanceName(const char * instanceName) { strncpy(mInstanceName, instanceName, sizeof(mInstanceName)); } + void SetInstanceName(const char * instanceName) { Platform::CopyString(mInstanceName, instanceName); } const char * GetDeviceName() const { return mDeviceName; } - void SetDeviceName(const char * deviceName) { strncpy(mDeviceName, deviceName, sizeof(mDeviceName)); } + void SetDeviceName(const char * deviceName) { Platform::CopyString(mDeviceName, deviceName); } uint16_t GetLongDiscriminator() const { return mLongDiscriminator; } void SetLongDiscriminator(uint16_t value) { mLongDiscriminator = value; } diff --git a/src/protocols/user_directed_commissioning/tests/TestUdcMessages.cpp b/src/protocols/user_directed_commissioning/tests/TestUdcMessages.cpp index a23d86d967b094..c7941ba027aa5e 100644 --- a/src/protocols/user_directed_commissioning/tests/TestUdcMessages.cpp +++ b/src/protocols/user_directed_commissioning/tests/TestUdcMessages.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -84,15 +85,15 @@ void TestUDCServerUserConfirmationProvider(nlTestSuite * inSuite, void * inConte nodeData1.resolutionData.port = 5540; nodeData1.resolutionData.ipAddress[0] = address; nodeData1.resolutionData.numIPs = 1; - strncpy((char *) nodeData1.commissionData.instanceName, instanceName1, sizeof(nodeData1.commissionData.instanceName)); + Platform::CopyString(nodeData1.commissionData.instanceName, instanceName1); Dnssd::DiscoveredNodeData nodeData2; nodeData2.resolutionData.port = 5540; nodeData2.resolutionData.ipAddress[0] = address; nodeData2.resolutionData.numIPs = 1; nodeData2.commissionData.longDiscriminator = disc2; - strncpy((char *) nodeData2.commissionData.instanceName, instanceName2, sizeof(nodeData2.commissionData.instanceName)); - strncpy((char *) nodeData2.commissionData.deviceName, deviceName2, sizeof(nodeData2.commissionData.deviceName)); + Platform::CopyString(nodeData2.commissionData.instanceName, instanceName2); + Platform::CopyString(nodeData2.commissionData.deviceName, deviceName2); // test empty UserConfirmationProvider udcServer.OnCommissionableNodeFound(nodeData2); diff --git a/src/setup_payload/tests/TestAdditionalDataPayload.cpp b/src/setup_payload/tests/TestAdditionalDataPayload.cpp index a745eef36ab87d..ef7c9b5a005cdc 100644 --- a/src/setup_payload/tests/TestAdditionalDataPayload.cpp +++ b/src/setup_payload/tests/TestAdditionalDataPayload.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-2022 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -169,8 +170,7 @@ void TestGeneratingRotatingDeviceIdAsString(nlTestSuite * inSuite, void * inCont // Parsing out the lifetime counter value long lifetimeCounter; char lifetimeCounterStr[3]; - strncpy(lifetimeCounterStr, rotatingDeviceIdHexBuffer, 2); - lifetimeCounterStr[2] = 0; + Platform::CopyString(lifetimeCounterStr, rotatingDeviceIdHexBuffer); char * parseEnd; lifetimeCounter = strtol(lifetimeCounterStr, &parseEnd, 16); From f5112064b9962678d9456e7aafddc1fb7e8db0a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20BOU=C3=89?= Date: Thu, 22 Sep 2022 20:42:55 +0200 Subject: [PATCH 03/19] iOS & iPadOS 16.1 Release Notes (#22773) --- docs/guides/darwin.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/guides/darwin.md b/docs/guides/darwin.md index b28a9925d53cd0..b580bfd82fe774 100644 --- a/docs/guides/darwin.md +++ b/docs/guides/darwin.md @@ -230,7 +230,10 @@ requirements [Release Notes](https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-15_6-release-notes) for currently known issues. - Please refer to the iOS/iPadOS 16.0 - [Release Notes](https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-16-release-notes) + [Release Notes](https://developer.apple.com/documentation/ios-ipados-release-notes/ios-16-release-notes) + for currently known issues. +- Please refer to the iOS/iPadOS 16.1 + [Release Notes](https://developer.apple.com/documentation/ios-ipados-release-notes/ios-16_1-release-notes) for currently known issues. - Further issues should be reported [here](https://github.com/project-chip/connectedhomeip/issues) From fd9357fdc4f29018576739a51ed77183def99945 Mon Sep 17 00:00:00 2001 From: kowsisoundhar12 <57476670+kowsisoundhar12@users.noreply.github.com> Date: Fri, 23 Sep 2022 00:13:45 +0530 Subject: [PATCH 04/19] Test added sep19 (#22766) * Added Updated Scripts * Added Auto generated scripts * Restyled by whitespace * Restyled by clang-format * Restyled by prettier-json * Added updated scripts * Added Auto generated files * Restyled by clang-format * Modified automation scripts TC-APPLAUNCHER-3.9 TC-CC-3.1 TC-CC-3.2 TC-CC-3.3 TC-CC-4.1 TC-CC-4.2 TC-CC-4.3 TC-CC-4.4 TC-CC-5.1 TC-CC-5.3 TC-CC-6.1 TC-CC-6.2 TC-CC-7.1 TC-CC-7.3 TC-CC-7.4 TC-CC-8.1 TC-DGTHREAD-1.1 Manual scripts update: TC-DGSW-2.2 TC-DGTHREAD-3.1 * Added auto generated files * Restyled by whitespace Co-authored-by: Restyled.io Co-authored-by: manjunath-grl Co-authored-by: Andrei Litvin --- .../suites/certification/Test_TC_ACL_2_4.yaml | 13 + .../Test_TC_APPLAUNCHER_3_9.yaml | 26 +- .../suites/certification/Test_TC_CC_2_2.yaml | 2 +- .../suites/certification/Test_TC_CC_3_1.yaml | 20 +- .../suites/certification/Test_TC_CC_3_2.yaml | 14 +- .../suites/certification/Test_TC_CC_3_3.yaml | 12 +- .../suites/certification/Test_TC_CC_4_1.yaml | 4 +- .../suites/certification/Test_TC_CC_4_2.yaml | 15 +- .../suites/certification/Test_TC_CC_4_3.yaml | 16 +- .../suites/certification/Test_TC_CC_4_4.yaml | 16 +- .../suites/certification/Test_TC_CC_5_1.yaml | 56 +- .../suites/certification/Test_TC_CC_5_3.yaml | 8 +- .../suites/certification/Test_TC_CC_6_1.yaml | 4 +- .../suites/certification/Test_TC_CC_6_2.yaml | 5 +- .../suites/certification/Test_TC_CC_6_4.yaml | 8 +- .../suites/certification/Test_TC_CC_7_1.yaml | 16 +- .../suites/certification/Test_TC_CC_7_3.yaml | 8 +- .../suites/certification/Test_TC_CC_7_4.yaml | 8 +- .../suites/certification/Test_TC_CC_8_1.yaml | 15 +- .../Test_TC_CONTENTLAUNCHER_1_11.yaml | 4 +- .../certification/Test_TC_DGETH_2_1.yaml | 33 +- .../certification/Test_TC_DGSW_2_1.yaml | 109 +- .../certification/Test_TC_DGSW_2_2.yaml | 30 +- .../certification/Test_TC_DGSW_2_3.yaml | 144 +- .../certification/Test_TC_DGTHREAD_1_1.yaml | 403 ++- .../certification/Test_TC_DGTHREAD_2_2.yaml | 2 +- .../certification/Test_TC_DGTHREAD_2_3.yaml | 15 +- .../certification/Test_TC_DGTHREAD_3_1.yaml | 2 +- .../certification/Test_TC_DRLK_1_1.yaml | 12 +- .../certification/Test_TC_DRLK_2_7.yaml | 8 +- .../certification/Test_TC_DRLK_2_9.yaml | 95 +- .../suites/certification/Test_TC_G_2_2.yaml | 149 +- .../suites/certification/Test_TC_G_2_3.yaml | 162 +- .../certification/Test_TC_LUNIT_1_1.yaml | 116 +- .../Test_TC_MEDIAINPUT_3_13.yaml | 5 +- .../certification/Test_TC_OPCREDS_3_3.yaml | 5 + src/app/tests/suites/ciTests.json | 7 +- src/app/tests/suites/manualTests.json | 8 +- .../chip-tool/zap-generated/test/Commands.h | 2253 +++++++------ .../zap-generated/test/Commands.h | 2819 ++++++++++------- 40 files changed, 4192 insertions(+), 2455 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml index 417801e174809b..1d7aad81dd0635 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml @@ -24,6 +24,19 @@ config: endpoint: 0 tests: + - label: "Pre-conditions" + verification: | + 1.N1 is the node ID of TH1 + + 2 .CAT1 is a valid CAT with arbitrary ID and arbitrary version + + 3.CAT2 is a valid CAT with arbitrary ID and arbitrary version + + 4.CAT3 is a valid CAT with arbitrary ID and arbitrary version + + 5.CAT4 is a valid CAT with arbitrary ID and arbitrary version + disabled: true + - label: "TH1 commissions DUT using admin node ID N1" verification: | DUT diff --git a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9.yaml b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9.yaml index ce5528519b7899..74ba8f3be5ee82 100644 --- a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9.yaml @@ -49,10 +49,24 @@ tests: applicationId: applicationId, } + #Expected status attribute response ACTIVE_HIDDEN or STOPPED 'OR' condition is not supported in YAML - label: "Reads the Status attribute" - cluster: "Application Basic" - endpoint: 3 - command: "readAttribute" - attribute: "Status" - response: - value: 0 + verification: | + The TH commands for this test step can be invoked using chip-tool (when DUT is a commissionee) or tv-casting-app (when DUT is a commissioner): + ./chip-tool applicationbasic read status 1 3 + ./chip-tool applicationbasic read status 1 3 + + On TH verify that the Status attribute value as 0 + [1658209002.942766][2442:2447] CHIP:DMG: } + [1658209002.942976][2442:2447] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_050D Attribute 0x0000_0005 DataVersion: 3850684771 + [1658209002.943067][2442:2447] CHIP:TOO: Status: 0 + [1658209002.943177][2442:2447] CHIP:EM: Sending Standalone Ack for MessageCounter:54939405 on exchange 63408i" + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_CC_2_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_2_2.yaml index f39cdea4238875..17ba93d3ad91eb 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_2_2.yaml @@ -275,7 +275,7 @@ tests: "DUT reads from the TH the (0x0007) ColorTemperatureMireds attribute" PICS: CC.C.A0007 verification: | - ./chip-tool colorcontrol read color-temperature 1 1 + ./chip-tool colorcontrol read color-temperature-mireds 1 1 Verify response contains an uint16 in TH(all-clusters-app) Logs: diff --git a/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml index 4fd29a27fefcc2..d4b0ace7db9465 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml @@ -152,7 +152,9 @@ tests: command: "readAttribute" attribute: "CurrentHue" response: - value: 120 + constraints: + minValue: 102 + maxValue: 138 - label: "TH sends MoveToHue command to DUT with Hue=60, Direction=0x00 @@ -272,7 +274,9 @@ tests: command: "readAttribute" attribute: "CurrentHue" response: - value: 135 + constraints: + minValue: 115 + maxValue: 155 - label: "TH sends MoveToHue command to DUT with Hue=60, Direction=0x00 @@ -382,7 +386,9 @@ tests: command: "readAttribute" attribute: "CurrentHue" response: - value: 120 + constraints: + minValue: 102 + maxValue: 138 - label: "TH sends MoveToHue command to DUT with Hue=120, Direction=0x00 @@ -476,8 +482,8 @@ tests: attribute: "CurrentHue" response: constraints: - minValue: 48 - maxValue: 72 + minValue: 51 + maxValue: 69 - label: "Wait 5s" cluster: "DelayCommands" @@ -492,7 +498,9 @@ tests: command: "readAttribute" attribute: "CurrentHue" response: - value: 60 + constraints: + minValue: 51 + maxValue: 69 - label: "TH reads ColorMode attribute from DUT" PICS: CC.S.F00 && CC.S.A0008 diff --git a/src/app/tests/suites/certification/Test_TC_CC_3_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_3_2.yaml index c9fb35fb24cf44..f9770b2d93da1c 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_3_2.yaml @@ -148,7 +148,6 @@ tests: command: "readAttribute" attribute: "CurrentHue" response: - saveAs: CurrentHueValueStep2f constraints: minValue: 80 maxValue: 110 @@ -166,7 +165,9 @@ tests: command: "readAttribute" attribute: "CurrentHue" response: - value: CurrentHueValueStep2f + constraints: + minValue: 80 + maxValue: 110 - label: "TH sends MoveToHue command to DUT with Hue=60, Direction=0x00 @@ -224,8 +225,8 @@ tests: attribute: "CurrentHue" response: constraints: - minValue: 0 - maxValue: 20 + minValue: 8 + maxValue: 12 - label: "Wait 10s" cluster: "DelayCommands" @@ -273,7 +274,6 @@ tests: command: "readAttribute" attribute: "CurrentHue" response: - saveAs: CurrentHueValueStep3f constraints: minValue: 140 maxValue: 190 @@ -291,7 +291,9 @@ tests: command: "readAttribute" attribute: "CurrentHue" response: - value: CurrentHueValueStep3f + constraints: + minValue: 140 + maxValue: 190 - label: "TH reads ColorMode attribute from DUT" PICS: CC.S.F00 && CC.S.A0008 diff --git a/src/app/tests/suites/certification/Test_TC_CC_3_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_3_3.yaml index a629f3cd548063..a406e6fc231500 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_3_3.yaml @@ -118,8 +118,8 @@ tests: attribute: "CurrentHue" response: constraints: - minValue: 0 - maxValue: 10 + minValue: 4 + maxValue: 6 - label: "Wait 5s" cluster: "DelayCommands" @@ -134,7 +134,9 @@ tests: command: "readAttribute" attribute: "CurrentHue" response: - value: 5 + constraints: + minValue: 4 + maxValue: 6 - label: "TH sends MoveToHue command to DUT with Hue=50, Direction=0x00 @@ -227,7 +229,9 @@ tests: command: "readAttribute" attribute: "CurrentHue" response: - value: 245 + constraints: + minValue: 208 + maxValue: 255 - label: "TH reads ColorMode attribute from DUT" PICS: CC.S.F00 && CC.S.A0008 diff --git a/src/app/tests/suites/certification/Test_TC_CC_4_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_1.yaml index a1b9b8447ab27e..3bd4fbd9edc288 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_1.yaml @@ -150,7 +150,9 @@ tests: command: "readAttribute" attribute: "CurrentSaturation" response: - value: 120 + constraints: + minValue: 102 + maxValue: 138 - label: "TH reads ColorMode attribute from DUT" PICS: CC.S.F00 && CC.S.A0008 diff --git a/src/app/tests/suites/certification/Test_TC_CC_4_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_2.yaml index 3046f0c291afb8..3cf08bac2e3e73 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_2.yaml @@ -114,7 +114,7 @@ tests: attribute: "CurrentSaturation" response: constraints: - minValue: 212 + minValue: 216 maxValue: 254 - label: "Wait 5s" @@ -130,7 +130,9 @@ tests: command: "readAttribute" attribute: "CurrentSaturation" response: - value: 254 + constraints: + minValue: 216 + maxValue: 254 - label: "TH sends MoveToSaturation command to DUT with Saturation=120 and @@ -203,8 +205,8 @@ tests: attribute: "CurrentSaturation" response: constraints: - minValue: 5 - maxValue: 35 + minValue: 17 + maxValue: 23 - label: "Wait 10s" cluster: "DelayCommands" @@ -301,7 +303,6 @@ tests: command: "readAttribute" attribute: "CurrentSaturation" response: - saveAs: CurrentSaturationValueStep4e constraints: minValue: 170 maxValue: 230 @@ -319,7 +320,9 @@ tests: command: "readAttribute" attribute: "CurrentSaturation" response: - value: CurrentSaturationValueStep4e + constraints: + minValue: 170 + maxValue: 230 - label: "TH reads ColorMode attribute from DUT" PICS: CC.S.F00 && CC.S.A0008 diff --git a/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml index 3d9c2a1db5555d..19de6cf64e5b97 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml @@ -132,7 +132,9 @@ tests: command: "readAttribute" attribute: "CurrentSaturation" response: - value: 240 + constraints: + minValue: 204 + maxValue: 254 - label: "TH sends StepSaturation command to DUT with StepMode=0x01 (up), @@ -165,7 +167,9 @@ tests: command: "readAttribute" attribute: "CurrentSaturation" response: - value: 254 + constraints: + minValue: 216 + maxValue: 254 - label: "TH sends MoveToSaturation command to DUT with Saturation=50 and @@ -240,8 +244,8 @@ tests: attribute: "CurrentSaturation" response: constraints: - minValue: 5 - maxValue: 15 + minValue: 8 + maxValue: 12 - label: "Wait 5s" cluster: "DelayCommands" @@ -256,7 +260,9 @@ tests: command: "readAttribute" attribute: "CurrentSaturation" response: - value: 10 + constraints: + minValue: 8 + maxValue: 12 - label: "TH sends StepSaturation command to DUT with StepMode=0x03 (down), diff --git a/src/app/tests/suites/certification/Test_TC_CC_4_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_4.yaml index 2dea359fe06579..914fa9bac08d2a 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_4.yaml @@ -75,14 +75,18 @@ tests: command: "readAttribute" attribute: "CurrentHue" response: - value: 200 + constraints: + minValue: 170 + maxValue: 230 - label: "TH reads CurrentSaturation attribute from DUT" PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" response: - value: 50 + constraints: + minValue: 42 + maxValue: 58 - label: "TH sends MoveToHueAndSaturation command to DUT with Hue=160, @@ -168,14 +172,18 @@ tests: command: "readAttribute" attribute: "CurrentHue" response: - value: 160 + constraints: + minValue: 135 + maxValue: 185 - label: "TH reads CurrentSaturation attribute from DUT" PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" response: - value: 80 + constraints: + minValue: 68 + maxValue: 92 - label: "TH reads ColorMode attribute from DUT" PICS: CC.S.F00 && CC.S.A0008 diff --git a/src/app/tests/suites/certification/Test_TC_CC_5_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_5_1.yaml index 5b2104adfbe3c4..6eedce3cf67666 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_5_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_5_1.yaml @@ -74,14 +74,18 @@ tests: command: "readAttribute" attribute: "CurrentX" response: - value: 32768 + constraints: + minValue: 27853 + maxValue: 37683 - label: "TH reads CurrentY attribute from DUT" PICS: CC.S.F03 && CC.S.A0004 command: "readAttribute" attribute: "CurrentY" response: - value: 19660 + constraints: + minValue: 16711 + maxValue: 22609 - label: "TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 @@ -166,14 +170,18 @@ tests: command: "readAttribute" attribute: "CurrentX" response: - value: 13107 + constraints: + minValue: 11141 + maxValue: 15073 - label: "TH reads CurrentY attribute from DUT" PICS: CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentY" response: - value: 13107 + constraints: + minValue: 11141 + maxValue: 15073 - label: "TH writes 0 to the Options attribute" PICS: CC.S.A000f @@ -226,14 +234,18 @@ tests: command: "readAttribute" attribute: "CurrentX" response: - value: 32768 + constraints: + minValue: 27853 + maxValue: 37683 - label: "TH reads CurrentY attribute from DUT" PICS: CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentY" response: - value: 19660 + constraints: + minValue: 16711 + maxValue: 22609 - label: "TH sends Off command to DUT" PICS: OO.S.C00.Rsp @@ -351,14 +363,18 @@ tests: command: "readAttribute" attribute: "CurrentX" response: - value: 26214 + constraints: + minValue: 22282 + maxValue: 30146 - label: "TH reads CurrentY attribute from DUT" PICS: CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentY" response: - value: 32768 + constraints: + minValue: 27853 + maxValue: 37683 - label: "TH writes 1 to the Options attribute" PICS: CC.S.A000f @@ -410,14 +426,18 @@ tests: command: "readAttribute" attribute: "CurrentX" response: - value: 32768 + constraints: + minValue: 27853 + maxValue: 37683 - label: "TH reads CurrentY attribute from DUT" PICS: CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentY" response: - value: 19660 + constraints: + minValue: 16711 + maxValue: 22609 - label: "TH sends Off command to DUT" PICS: OO.S.C00.Rsp @@ -455,14 +475,18 @@ tests: command: "readAttribute" attribute: "CurrentX" response: - value: 13107 + constraints: + minValue: 11141 + maxValue: 15073 - label: "TH reads CurrentY attribute from DUT" PICS: CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentY" response: - value: 13107 + constraints: + minValue: 11141 + maxValue: 15073 - label: "TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 @@ -535,14 +559,18 @@ tests: command: "readAttribute" attribute: "CurrentX" response: - value: 26214 + constraints: + minValue: 22282 + maxValue: 30146 - label: "TH reads CurrentY attribute from DUT" PICS: CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentY" response: - value: 32768 + constraints: + minValue: 27853 + maxValue: 37683 - label: "TH reads ColorMode attribute from DUT" PICS: CC.S.F03 && CC.S.A0008 diff --git a/src/app/tests/suites/certification/Test_TC_CC_5_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_5_3.yaml index 2d7666ae2c1302..24689e34e6b867 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_5_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_5_3.yaml @@ -152,14 +152,18 @@ tests: PICS: CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp attribute: "CurrentX" response: - value: 13000 + constraints: + minValue: 11050 + maxValue: 14950 - label: "TH reads CurrentY attribute from DUT" command: "readAttribute" PICS: CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp attribute: "CurrentY" response: - value: 14000 + constraints: + minValue: 11900 + maxValue: 16100 - label: "TH reads ColorMode attribute from DUT" PICS: CC.S.F03 && CC.S.A0008 diff --git a/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml index 48673511375a74..88cc331670d47e 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml @@ -181,7 +181,9 @@ tests: command: "readAttribute" attribute: "ColorTemperatureMireds" response: - value: 250 + constraints: + minValue: 212 + maxValue: 288 - label: "TH reads ColorMode attribute from DUT" PICS: CC.S.F04 && CC.S.A0008 diff --git a/src/app/tests/suites/certification/Test_TC_CC_6_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_2.yaml index 47494e62171c2b..eb83f80c070824 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_2.yaml @@ -312,7 +312,6 @@ tests: command: "readAttribute" attribute: "ColorTemperatureMireds" response: - saveAs: ColorTemperatureMiredsStep4c constraints: minValue: ColorTempPhysicalMinMiredsValue maxValue: ColorTempPhysicalMaxMiredsValue @@ -330,7 +329,9 @@ tests: command: "readAttribute" attribute: "ColorTemperatureMireds" response: - value: ColorTemperatureMiredsStep4c + constraints: + minValue: ColorTempPhysicalMinMiredsValue + maxValue: ColorTempPhysicalMaxMiredsValue - label: "TH reads ColorMode attribute from DUT" PICS: CC.S.F04 && CC.S.A0008 diff --git a/src/app/tests/suites/certification/Test_TC_CC_6_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_4.yaml index b3053808dc4c51..beeb124203607c 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_4.yaml @@ -149,7 +149,7 @@ tests: multiple times)" PICS: CC.C.C0a.Tx && CC.C.A0007 verification: | - ./chip-tool colorcontrol read color-temperature 1 1 + ./chip-tool colorcontrol read color-temperature-mireds 1 1 Verify response contains an ColorTemperatureMireds in TH(all-clusters-app) Logs: @@ -231,7 +231,7 @@ tests: multiple times)" PICS: CC.C.C4b.Tx && CC.C.A0007 verification: | - ./chip-tool colorcontrol read color-temperature 1 1 + ./chip-tool colorcontrol read color-temperature-mireds 1 1 @@ -315,7 +315,7 @@ tests: multiple times)" PICS: CC.C.C4c.Tx & CC.C.A0007 verification: | - ./chip-tool colorcontrol read color-temperature 1 1 + ./chip-tool colorcontrol read color-temperature-mireds 1 1 Verify response contains an ColorTemperatureMireds in TH(all-clusters-app) Logs: [1659955633.975562][2718:2718] CHIP:DMG: ReadRequestMessage = [1659955633.975617][2718:2718] CHIP:DMG: { @@ -390,7 +390,7 @@ tests: multiple times)" PICS: CC.C.C47.Tx && CC.C.A0007 verification: | - ./chip-tool colorcontrol read color-temperature 1 1 + ./chip-tool colorcontrol read color-temperature-mireds 1 1 Verify response contains an ColorTemperatureMireds in TH(all-clusters-app) Logs: [1659955633.975562][2718:2718] CHIP:DMG: ReadRequestMessage = diff --git a/src/app/tests/suites/certification/Test_TC_CC_7_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_7_1.yaml index cd1d77fe118493..5be25acbd94948 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_7_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_7_1.yaml @@ -152,7 +152,9 @@ tests: command: "readAttribute" attribute: "EnhancedCurrentHue" response: - value: 12000 + constraints: + minValue: 10200 + maxValue: 13800 - label: "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=6000, @@ -262,7 +264,9 @@ tests: command: "readAttribute" attribute: "EnhancedCurrentHue" response: - value: 54000 + constraints: + minValue: 50700 + maxValue: 62100 - label: "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=6000, @@ -372,7 +376,9 @@ tests: command: "readAttribute" attribute: "EnhancedCurrentHue" response: - value: 12000 + constraints: + minValue: 10200 + maxValue: 13800 - label: "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=12000, @@ -482,7 +488,9 @@ tests: command: "readAttribute" attribute: "EnhancedCurrentHue" response: - value: 6000 + constraints: + minValue: 5100 + maxValue: 6900 - label: "TH reads ColorMode attribute from DUT" PICS: CC.S.F01 && CC.S.A0008 diff --git a/src/app/tests/suites/certification/Test_TC_CC_7_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_7_3.yaml index ea5d91a7ec3b97..067ccc5d7845b3 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_7_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_7_3.yaml @@ -151,7 +151,9 @@ tests: PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp attribute: "EnhancedCurrentHue" response: - value: 12000 + constraints: + minValue: 10200 + maxValue: 13800 - label: "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=12000, @@ -261,7 +263,9 @@ tests: PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp attribute: "EnhancedCurrentHue" response: - value: 6000 + constraints: + minValue: 5100 + maxValue: 6900 - label: "TH reads ColorMode attribute from DUT" PICS: CC.S.F01 && CC.S.A0008 diff --git a/src/app/tests/suites/certification/Test_TC_CC_7_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_7_4.yaml index 8a0496c3b5e520..8d1f0a7d4b261c 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_7_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_7_4.yaml @@ -76,14 +76,18 @@ tests: command: "readAttribute" attribute: "EnhancedCurrentHue" response: - value: 20000 + constraints: + minValue: 17000 + maxValue: 23000 - label: "TH reads CurrentSaturation attribute from DUT" PICS: CC.S.F01 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" response: - value: 50 + constraints: + minValue: 42 + maxValue: 58 - label: "TH sends EnhancedMoveToHueAndSaturation command to DUT with diff --git a/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml index e46ff7bd26cba8..0b01f73d50320a 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml @@ -192,7 +192,6 @@ tests: command: "readAttribute" attribute: "CurrentSaturation" response: - saveAs: CurrentSaturationValue constraints: minValue: 170 maxValue: 230 @@ -210,7 +209,9 @@ tests: command: "readAttribute" attribute: "CurrentSaturation" response: - value: CurrentSaturationValue + constraints: + minValue: 170 + maxValue: 230 - label: "TH reads ColorTempPhysicalMinMireds attribute from DUT" PICS: CC.S.A400b @@ -307,7 +308,6 @@ tests: command: "readAttribute" attribute: "ColorTemperatureMireds" response: - saveAs: ColorTemperatureMiredsStep4f constraints: minValue: ColorTempPhysicalMinMireds maxValue: ColorTempPhysicalMaxMireds @@ -325,7 +325,9 @@ tests: command: "readAttribute" attribute: "ColorTemperatureMireds" response: - value: ColorTemperatureMiredsStep4f + constraints: + minValue: ColorTempPhysicalMinMireds + maxValue: ColorTempPhysicalMaxMireds - label: "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=20000, @@ -392,7 +394,6 @@ tests: PICS: CC.S.A4000 && CC.S.C47.Rsp attribute: "EnhancedCurrentHue" response: - saveAs: EnhancedCurrentHueValue constraints: minValue: 21250 maxValue: 28750 @@ -410,7 +411,9 @@ tests: PICS: CC.S.A4000 && CC.S.C47.Rsp attribute: "EnhancedCurrentHue" response: - value: EnhancedCurrentHueValue + constraints: + minValue: 21250 + maxValue: 28750 - label: "Turn Off light that we turned on" PICS: OO.S.C00.Rsp diff --git a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml index 01db6b7c90cbb2..5de7f13e19c1e7 100644 --- a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml @@ -101,7 +101,7 @@ tests: - label: "Read the optional command(LaunchContent) in AcceptedCommandList attribute" - PICS: CONTENTLAUNCHER.C.C0000 + PICS: CONTENTLAUNCHER.C.C00.Tx command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -111,7 +111,7 @@ tests: - label: "Read the optional command(LaunchURL) in AcceptedCommandList attribute" - PICS: CONTENTLAUNCHER.C.C0001 + PICS: CONTENTLAUNCHER.C.C01.Tx command: "readAttribute" attribute: "AcceptedCommandList" response: diff --git a/src/app/tests/suites/certification/Test_TC_DGETH_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DGETH_2_1.yaml index e452da39418fc0..5f4791b0fa5b23 100644 --- a/src/app/tests/suites/certification/Test_TC_DGETH_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGETH_2_1.yaml @@ -64,7 +64,8 @@ tests: received on ethernet network interface" verification: | ./chip-tool ethernetnetworkdiagnostics read packet-rx-count 1 0 - Verify the value of PacketRxCount is in range uint64 + + Verify the value of PacketRxCount is in range uint64 in TH(chip-tool) log CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0037 Attribute 0x0000_0002 DataVersion: 3872576452 [1649663623.009973][8103:8108] CHIP:TOO: PacketRxCount: 3322 @@ -91,7 +92,8 @@ tests: received on ethernet network interface" verification: | ./chip-tool ethernetnetworkdiagnostics read packet-tx-count 1 0 - Verify the value of PacketTxCount is in range uint64 + + Verify the value of PacketTxCount is in range uint64 in TH(chip-tool) Log CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0037 Attribute 0x0000_0003 DataVersion: 3872576452 [1649663793.192934][8117:8122] CHIP:TOO: PacketTxCount: 3220 @@ -117,8 +119,9 @@ tests: "Read TxErrCount value from DUT and verify value indicates the number of failed packet transmission on ethernet network interface" verification: | - ./chip-tool ethernetnetworkdiagnostics read tx-err-count 1 1 - Verify the value of TxErrCount is in range uint64 + ./chip-tool ethernetnetworkdiagnostics read tx-err-count 1 0 + + Verify the value of TxErrCount is in range uint64 in TH(chip-tool) Log CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0037 Attribute 0x0000_0004 DataVersion: 3872576452 [1649663843.295395][8123:8128] CHIP:TOO: TxErrCount: 0 @@ -145,8 +148,9 @@ tests: number of collision occurred while transmitting packets on ethernet network interface" verification: | - ./chip-tool ethernetnetworkdiagnostics read collision-count 1 1 - Verify the value of CollisionCount is in range uint64 + ./chip-tool ethernetnetworkdiagnostics read collision-count 1 0 + + Verify the value of CollisionCount is in range uint64 in TH(chip-tool) Log CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0037 Attribute 0x0000_0005 DataVersion: 3872576452 [1649663870.221742][8133:8138] CHIP:TOO: CollisionCount: 0 @@ -173,9 +177,11 @@ tests: number of packets dropped due to lack of buffer memory on ethernet network interface" verification: | - ./chip-tool ethernetnetworkdiagnostics read overrun-count 1 1 + ./chip-tool ethernetnetworkdiagnostics read overrun-count 1 0 - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0037 Attribute 0x0000_0006 DataVersion: 3872576452 + Verify that the attribute data value is present. If the value is 0, no packet loss was recorded or it was just reset from a node reboot in TH(chip-tool) Log + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0037 Attribute 0x0000_0006 DataVersion: 3872576452 [1649663948.738274][8142:8147] CHIP:TOO: OverrunCount: 0 cluster: "LogCommands" command: "UserPrompt" @@ -200,8 +206,9 @@ tests: presence of carrier detect control signal on ethernet network interface" verification: | - ./chip-tool ethernetnetworkdiagnostics read carrier-detect 1 1 - Verify the value of CarrierDetect is either bool or null + ./chip-tool ethernetnetworkdiagnostics read carrier-detect 1 0 + + Verify the value of CarrierDetect is either bool or null in TH(chip-tool) Log: CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0037 Attribute 0x0000_0007 DataVersion: 3872576452 [1649663972.829304][8149:8154] CHIP:TOO: CarrierDetect: null @@ -227,8 +234,10 @@ tests: "Read TimeSinceReset value from DUT and verify the value indicates the duration of time, in minutes" verification: | - ./chip-tool ethernetnetworkdiagnostics read time-since-reset 1 1 - Verify the value of TimeSinceReset is in range uint64 + ./chip-tool ethernetnetworkdiagnostics read time-since-reset 1 0 + + Verify the value of TimeSinceReset is in range uint64 in TH(chip-tool) log: + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0037 Attribute 0x0000_0008 DataVersion: 3872576452 [1649664046.010810][8158:8163] CHIP:TOO: TimeSinceReset: 5219 diff --git a/src/app/tests/suites/certification/Test_TC_DGSW_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DGSW_2_1.yaml index 19aedf7c6a95c8..733aa658228680 100644 --- a/src/app/tests/suites/certification/Test_TC_DGSW_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGSW_2_1.yaml @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 43.2.1. [TC-DGSW-2.1] Attributes with server as DUT @@ -20,49 +21,83 @@ PICS: config: nodeId: 0x12344321 - cluster: "Software Diagnostics" + cluster: "Basic" endpoint: 0 tests: - - label: "Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - #issue 873 - - label: - "Reads a list of ThreadMetrics struct non-global attribute from DUT." - command: "readAttribute" - attribute: "ThreadMetrics" + - label: "Commission DUT to TH" + verification: | + + disabled: true + + - label: "TH reads a list of ThreadMetrics struct attribute from DUT." PICS: DGSW.S.A0000 - response: - constraints: - type: list + verification: | + ./chip-tool softwarediagnostics read thread-metrics 1 0 + + Verify the thread-metrics attribute has entries with ThreadMetrics Struct. + Verify in TH(chip-tool) Log - - label: "Reads CurrentHeapFree non-global attribute value from DUT" - command: "readAttribute" - attribute: "CurrentHeapFree" + [1654697032.107109][7037:7042] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Attribute 0x0000_0000 DataVersion: 1044289564 + [1654697032.107255][7037:7042] CHIP:TOO: ThreadMetrics: 6 entries + [1654697032.107333][7037:7042] CHIP:TOO: [1]: { + [1654697032.107376][7037:7042] CHIP:TOO: Id: 8972 + [1654697032.107413][7037:7042] CHIP:TOO: Name: 8972 + [1654697032.107449][7037:7042] CHIP:TOO: } + [1654697032.107492][7037:7042] CHIP:TOO: [2]: { + [1654697032.107526][7037:7042] CHIP:TOO: Id: 8971 + [1654697032.107559][7037:7042] CHIP:TOO: Name: 8971 + [1654697032.107591][7037:7042] CHIP:TOO: } + [1654697032.107632][7037:7042] CHIP:TOO: [3]: { + [1654697032.107667][7037:7042] CHIP:TOO: Id: 8970 + [1654697032.107700][7037:7042] CHIP:TOO: Name: 8970 + [1654697032.107733][7037:7042] CHIP:TOO: } + [1654697032.107774][7037:7042] CHIP:TOO: [4]: { + [1654697032.107808][7037:7042] CHIP:TOO: Id: 8969 + [1654697032.107842][7037:7042] CHIP:TOO: Name: 8969 + [1654697032.107875][7037:7042] CHIP:TOO: } + [1654697032.107915][7037:7042] CHIP:TOO: [5]: { + [1654697032.107950][7037:7042] CHIP:TOO: Id: 8968 + [1654697032.107982][7037:7042] CHIP:TOO: Name: 8968 + [1654697032.108015][7037:7042] CHIP:TOO: } + [1654697032.108056][7037:7042] CHIP:TOO: [6]: { + [1654697032.108090][7037:7042] CHIP:TOO: Id: 8967 + [1654697032.108122][7037:7042] CHIP:TOO: Name: 8967 + [1654697032.108154][7037:7042] CHIP:TOO: } + disabled: true + + - label: "TH reads an attribute value from DUT." PICS: DGSW.S.A0001 - response: - constraints: - type: int64u + verification: | + ./chip-tool softwarediagnostics read current-heap-free 1 0 + + Verify the value of CurrentHeapFree is in range uint64 + Verify in TH(chip-tool) Log + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Attribute 0x0000_0001 DataVersion: 3412237516 + [1649662648.863327][8004:8009] CHIP:TOO: CurrentHeapFree: 590864 + disabled: true - - label: "Reads CurrentHeapUsed non-global attribute value from DUT" - command: "readAttribute" - attribute: "CurrentHeapUsed" + - label: "TH reads an attribute value from DUT." PICS: DGSW.S.A0002 - response: - constraints: - type: int64u - - - label: - "Reads CurrentHeapHighWaterMark non-global attribute value from DUT" - command: "readAttribute" - attribute: "CurrentHeapHighWatermark" + verification: | + ./chip-tool softwarediagnostics read current-heap-used 1 0 + + Verify the value of CurrentHeapUsed is in range uint64 + Verify in TH(chip-tool) Log + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Attribute 0x0000_0002 DataVersion: 3412237516 + [1649662811.289909][8018:8023] CHIP:TOO: CurrentHeapUsed: 1098368 + disabled: true + + - label: "TH reads an attribute value from DUT." PICS: DGSW.S.A0003 - response: - constraints: - type: int64u + verification: | + ./chip-tool softwarediagnostics read current-heap-high-watermark 1 0 + + Verify the value of CurrentHeapHighWatermark is in range uint64 + Verify in TH(chip-tool) Log + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Attribute 0x0000_0003 DataVersion: 3412237516 + [1649662865.831203][8025:8030] CHIP:TOO: CurrentHeapHighWatermark: 1099312 + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DGSW_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DGSW_2_2.yaml index 65c69c5a7a461a..d3b65e48c52435 100644 --- a/src/app/tests/suites/certification/Test_TC_DGSW_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGSW_2_2.yaml @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 43.2.2. [TC-DGSW-2.2] Event functionality with server as DUT +name: 3.2.2. [TC-DGSW-2.2] Event Functionality [{DUT_Sever}] PICS: - DGSW.S.E @@ -21,21 +21,19 @@ PICS: config: nodeId: 0x12344321 - cluster: "Software Diagnostics" + cluster: "Basic" endpoint: 0 tests: - - label: "Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId + - label: "Commission DUT to TH" + verification: | + + disabled: true - label: - "Reads a list of SoftwareFault struct from DUT and data type in each - field of the struct must match the value listed in spec" + "DUT sends an event report to TH. TH reads a list of SoftwareFault + struct from DUT." + PICS: DGSW.S.E00 verification: | Provision DUT and TH. @@ -64,12 +62,4 @@ tests: [1655375196.292341][35133:35138] CHIP:TOO: FaultRecording: 546875204A756E2031362031303A32363A313420323032320A [1655375196.292391][35133:35138] CHIP:TOO: } [1655375196.292438][35133:35138] CHIP:TOO: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DGSW.S.E00 - arguments: - values: - - name: "message" - value: "Please enter '0' for success" - - name: "expectedValue" - value: 0 + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DGSW_2_3.yaml b/src/app/tests/suites/certification/Test_TC_DGSW_2_3.yaml index 752cdf72c55be9..00e8b1a12df60b 100644 --- a/src/app/tests/suites/certification/Test_TC_DGSW_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGSW_2_3.yaml @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 43.2.3. [TC-DGSW-2.3] Command received functionality with server as DUT @@ -20,44 +21,115 @@ PICS: config: nodeId: 0x12344321 - cluster: "Software Diagnostics" + cluster: "Basic" endpoint: 0 tests: - - label: "Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Sends ResetWatermarks to DUT" - command: "ResetWatermarks" + - label: "Commission DUT to TH" + verification: | + + disabled: true + + - label: "TH sends ResetWatermarks to DUT." PICS: DGSW.S.C00.Rsp + verification: | + ./chip-tool softwarediagnostics reset-watermarks 1 0 + + Verify the success response in TH(chip-tool) Log + + [1657022305.316864][7266:7271] CHIP:DMG: InvokeResponseMessage = + [1657022305.316900][7266:7271] CHIP:DMG: { + [1657022305.316935][7266:7271] CHIP:DMG: suppressResponse = false, + [1657022305.316972][7266:7271] CHIP:DMG: InvokeResponseIBs = + [1657022305.317018][7266:7271] CHIP:DMG: [ + [1657022305.317055][7266:7271] CHIP:DMG: InvokeResponseIB = + [1657022305.317109][7266:7271] CHIP:DMG: { + [1657022305.317151][7266:7271] CHIP:DMG: CommandStatusIB = + [1657022305.317200][7266:7271] CHIP:DMG: { + [1657022305.317244][7266:7271] CHIP:DMG: CommandPathIB = + [1657022305.317294][7266:7271] CHIP:DMG: { + [1657022305.317344][7266:7271] CHIP:DMG: EndpointId = 0x0, + [1657022305.317397][7266:7271] CHIP:DMG: ClusterId = 0x34, + [1657022305.317447][7266:7271] CHIP:DMG: CommandId = 0x0, + [1657022305.317496][7266:7271] CHIP:DMG: }, + [1657022305.317551][7266:7271] CHIP:DMG: + [1657022305.317596][7266:7271] CHIP:DMG: StatusIB = + [1657022305.317645][7266:7271] CHIP:DMG: { + [1657022305.317694][7266:7271] CHIP:DMG: status = 0x00 (SUCCESS), + [1657022305.317743][7266:7271] CHIP:DMG: }, + [1657022305.317797][7266:7271] CHIP:DMG: + [1657022305.317928][7266:7271] CHIP:DMG: }, + [1657022305.317980][7266:7271] CHIP:DMG: + [1657022305.318021][7266:7271] CHIP:DMG: }, + [1657022305.318067][7266:7271] CHIP:DMG: + [1657022305.318103][7266:7271] CHIP:DMG: ], + [1657022305.318146][7266:7271] CHIP:DMG: + [1657022305.318182][7266:7271] CHIP:DMG: InteractionModelRevision = 1 + [1657022305.318217][7266:7271] CHIP:DMG: }, + [1657022305.318300][7266:7271] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_0034 Command=0x0000_0000 Status=0x0 + [1657022305.318359][7266:7271] CHIP:DMG: ICR moving to [AwaitingDe] + disabled: true + + - label: "TH reads a list of ThreadMetrics struct attributes from DUT." + PICS: DGSW.S.A0000 + verification: | + ./chip-tool softwarediagnostics read thread-metrics 1 0 + + Verify the thread-metrics attribute has entries with ThreadMetrics Struct in TH(chip-tool) Log + + + [1654697032.107109][7037:7042] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Attribute 0x0000_0000 DataVersion: 1044289564 + [1654697032.107255][7037:7042] CHIP:TOO: ThreadMetrics: 6 entries + [1654697032.107333][7037:7042] CHIP:TOO: [1]: { + [1654697032.107376][7037:7042] CHIP:TOO: Id: 8972 + [1654697032.107413][7037:7042] CHIP:TOO: Name: 8972 + [1654697032.107449][7037:7042] CHIP:TOO: } + [1654697032.107492][7037:7042] CHIP:TOO: [2]: { + [1654697032.107526][7037:7042] CHIP:TOO: Id: 8971 + [1654697032.107559][7037:7042] CHIP:TOO: Name: 8971 + [1654697032.107591][7037:7042] CHIP:TOO: } + [1654697032.107632][7037:7042] CHIP:TOO: [3]: { + [1654697032.107667][7037:7042] CHIP:TOO: Id: 8970 + [1654697032.107700][7037:7042] CHIP:TOO: Name: 8970 + [1654697032.107733][7037:7042] CHIP:TOO: } + [1654697032.107774][7037:7042] CHIP:TOO: [4]: { + [1654697032.107808][7037:7042] CHIP:TOO: Id: 8969 + [1654697032.107842][7037:7042] CHIP:TOO: Name: 8969 + [1654697032.107875][7037:7042] CHIP:TOO: } + [1654697032.107915][7037:7042] CHIP:TOO: [5]: { + [1654697032.107950][7037:7042] CHIP:TOO: Id: 8968 + [1654697032.107982][7037:7042] CHIP:TOO: Name: 8968 + [1654697032.108015][7037:7042] CHIP:TOO: } + [1654697032.108056][7037:7042] CHIP:TOO: [6]: { + [1654697032.108090][7037:7042] CHIP:TOO: Id: 8967 + [1654697032.108122][7037:7042] CHIP:TOO: Name: 8967 + [1654697032.108154][7037:7042] CHIP:TOO: } + disabled: true + + - label: "TH reads CurrentHeapHighWatermark attribute from DUT." + PICS: DGSW.S.A0003 + verification: | + ./chip-tool softwarediagnostics read current-heap-used 1 0 + + [1663066847.710531][4064:4069] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Attribute 0x0000_0002 DataVersion: 2808275719 + [1663066847.714122][4064:4069] CHIP:TOO: CurrentHeapUsed: 1389168 + + + ./chip-tool softwarediagnostics read current-heap-high-watermark 1 0 + + Verify the value of CurrentHeapHighWatermark is in range uint64 and the CurrentHeapUsed is less than or equal to the CurrentHeapHighWatermark in TH(chip-tool) Log + + [1663066925.496916][4072:4077] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Attribute 0x0000_0003 DataVersion: 2808275719 + [1663066925.496999][4072:4077] CHIP:TOO: CurrentHeapHighWatermark: 1389328 + disabled: true + + - label: "TH reads a CurrentHeapUsed attribute value from DUT." + PICS: DGSW.S.A0002 + verification: | + ./chip-tool softwarediagnostics read current-heap-used 1 0 + + Verify the value of CurrentHeapUsed is in range uint64 in TH(chip-tool) Log - - label: "Reads a list of ThreadMetrics struct attribute from DUT." - command: "readAttribute" - attribute: "ThreadMetrics" - PICS: DGSW.S.A0000 && DGSW.S.C00.Rsp - response: - constraints: - type: list - - #issue #830 - - label: "Reads CurrentHeapUsed attribute value from DUT" - command: "readAttribute" - attribute: "CurrentHeapUsed" - PICS: DGSW.S.A0002 && DGSW.S.C00.Rsp - response: - constraints: - type: int64u - - #issue #830 - - label: "Reads CurrentHeapHighWaterMark attribute value from DUT" - command: "readAttribute" - attribute: "CurrentHeapHighWatermark" - PICS: DGSW.S.A0003 && DGSW.S.C00.Rsp - response: - constraints: - type: int64u + [1663066954.656376][4079:4084] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Attribute 0x0000_0002 DataVersion: 2808275719 + [1663066954.656505][4079:4084] CHIP:TOO: CurrentHeapUsed: 1389360 + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DGTHREAD_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DGTHREAD_1_1.yaml index ba6f97ae5c98de..8f86d07f252121 100644 --- a/src/app/tests/suites/certification/Test_TC_DGTHREAD_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGTHREAD_1_1.yaml @@ -138,7 +138,404 @@ tests: type: list contains: [6] - - label: "Read the optional attribute(ActiveTimestamp) in AttributeList" + - label: "TH reads optional attribute (DetachedRoleCount) in AttributeList" + PICS: DGTHREAD.S.A000e + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [14] + + - label: "TH reads optional attribute (ChildRoleCount) AttributeList" + PICS: DGTHREAD.S.A001f + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [15] + + - label: "TH reads optional attribute (RouterRoleCount) in AttributeList" + PICS: DGTHREAD.S.A0010 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [16] + + - label: "TH reads optional attribute (LeaderRoleCount) in AttributeList" + PICS: DGTHREAD.S.A0011 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [17] + + - label: "TH reads optional attribute (AttachAttemptCount) in AttributeList" + PICS: DGTHREAD.S.A0012 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [18] + + - label: + "TH reads optional attribute (PartitionIdChangeCount) in AttributeList" + PICS: DGTHREAD.S.A0013 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [19] + + - label: + "TH reads optional attribute (BetterPartitionAttachAttemptCount) in + AttributeList" + PICS: DGTHREAD.S.A0014 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [20] + + - label: "TH reads optional attribute (ParentChangeCount) in AttributeList" + PICS: DGTHREAD.S.A0015 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [21] + + - label: "TH reads optional attribute (TxTotalCount) in AttributeList" + PICS: DGTHREAD.S.A0016 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [22] + + - label: "TH reads optional attribute (TxUnicastCount) in AttributeList" + PICS: DGTHREAD.S.A0017 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [23] + + - label: "TH reads optional attribute (TxBroadcastCount) in AttributeList" + PICS: DGTHREAD.S.A0018 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [24] + + - label: + "TH reads optional attribute (TxAckRequestedCount) in AttributeList" + PICS: DGTHREAD.S.A0019 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [25] + + - label: "TH reads optional attribute (TxAckedCount) in AttributeList" + PICS: DGTHREAD.S.A001a + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [26] + + - label: + "TH reads optional attribute (TxNoAckRequestedCount) in AttributeList" + PICS: DGTHREAD.S.A001b + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [27] + + - label: "TH reads optional attributes (TxDataCount) in AttributeList" + PICS: DGTHREAD.S.A001c + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [28] + + - label: "TH reads optional attribute (TxDataPollCount) in AttributeList" + PICS: DGTHREAD.S.A001d + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [29] + + - label: "TH reads optional attribute (TxBeaconCount) in AttributeList" + PICS: DGTHREAD.S.A001e + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [30] + + - label: + "TH reads optional attribute (TxBeaconRequestCount) in AttributeList" + PICS: DGTHREAD.S.A001f + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [31] + + - label: "TH reads optional attribute (TxOtherCount) in AttributeList" + PICS: DGTHREAD.S.A0020 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [32] + + - label: "TH reads optional attribute (TxRetryCount) in AttributeList" + PICS: DGTHREAD.S.A0021 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [33] + + - label: + "TH reads optional attribute (TxDirectMaxRetryExpiryCount) in + AttributeList" + PICS: DGTHREAD.S.A0022 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [34] + + - label: + "TH reads optional attribute (TxIndirectMaxRetryExpiryCount) in + AttributeList" + PICS: DGTHREAD.S.A0023 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [35] + + - label: "TH reads optional attribute (TxErrCcaCount) in AttributeList" + PICS: DGTHREAD.S.A0024 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [36] + + - label: "TH reads optional attribute (TxErrAbortCount) in AttributeList" + PICS: DGTHREAD.S.A0025 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [37] + + - label: + "TH reads optional attribute (TxErrBusyChannelCount) in AttributeList" + PICS: DGTHREAD.S.A0026 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [38] + + - label: "TH reads optional attribute (RxTotalCount) in AttributeList" + PICS: DGTHREAD.S.A0027 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [39] + + - label: "TH reads optional attribute (RxUnicastCount) in AttributeList" + PICS: DGTHREAD.S.A0028 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [40] + + - label: "TH reads optional attribute (RxBroadcastCount) in AttributeList" + PICS: DGTHREAD.S.A0029 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [41] + + - label: "TH reads optional attribute (RxDataCount) in AttributeList" + PICS: DGTHREAD.S.A002a + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [42] + + - label: "TH reads optional attribute (RxDataPollCount) in AttributeList" + PICS: DGTHREAD.S.A002b + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [43] + + - label: "TH reads optional attribute (RxBeaconCount) in AttributeList" + PICS: DGTHREAD.S.A002c + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [44] + + - label: + "TH reads optional attribute (RxBeaconRequestCount) in AttributeList" + PICS: DGTHREAD.S.A002d + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [45] + + - label: "TH reads optional attribute (RxOtherCount) in AttributeList" + PICS: DGTHREAD.S.A002e + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [46] + + - label: + "TH reads optional attribute (RxAddressFilteredCount) in AttributeList" + PICS: DGTHREAD.S.A002f + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [47] + + - label: + "TH reads optional attribute (RxDestAddrFilteredCount) in + AttributeList" + PICS: DGTHREAD.S.A0030 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [48] + + - label: "TH reads optional attribute (RxDuplicatedCount) in AttributeList" + PICS: DGTHREAD.S.A0031 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [49] + + - label: "TH reads optional attribute (RxErrNoFrameCount) in AttributeList" + PICS: DGTHREAD.S.A0032 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [50] + + - label: + "TH reads optional attribute (RxErrUnknownNeighborCount) in + AttributeList" + PICS: DGTHREAD.S.A0033 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [51] + + - label: + "TH reads optional attribute (RxErrInvalidScrAddrCount) in + AttributeList" + PICS: DGTHREAD.S.A0034 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [52] + + - label: "TH reads optional attribute (RxErrSecCount) in AttributeList" + PICS: DGTHREAD.S.A0035 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [53] + + - label: "TH reads optional attribute (RxErrFcsCount) in AttributeList" + PICS: DGTHREAD.S.A0036 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [54] + + - label: "TH reads optional attribute (RxErrOtherCount) in AttributeList" + PICS: DGTHREAD.S.A0037 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [55] + + - label: "Read the optional attribute (ActiveTimestamp) in AttributeList" PICS: DGTHREAD.S.A0039 command: "readAttribute" attribute: "AttributeList" @@ -147,7 +544,7 @@ tests: type: list contains: [56] - - label: "Read the optional attribute(PendingTimestamp) in AttributeList" + - label: "Read the optional attribute (PendingTimestamp) in AttributeList" PICS: DGTHREAD.S.A003A command: "readAttribute" attribute: "AttributeList" @@ -156,7 +553,7 @@ tests: type: list contains: [57] - - label: "Read the optional attribute(Delay) in AttributeList" + - label: "Read the optional attribute (Delay) in AttributeList" PICS: DGTHREAD.S.A003B command: "readAttribute" attribute: "AttributeList" diff --git a/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_2.yaml index 22017c2135d29f..962a4b287a13e1 100644 --- a/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_2.yaml @@ -122,7 +122,7 @@ tests: maxValue: 0xFFFFFFFF - label: "TH reads TxBeaconRequestCount attribute value from DUT" - PICS: DGTHREAD.S.A002f + PICS: DGTHREAD.S.A001f command: "readAttribute" attribute: "TxBeaconRequestCount" response: diff --git a/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_3.yaml b/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_3.yaml index 4611a6be68be62..848905e8c87951 100644 --- a/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_3.yaml @@ -166,13 +166,14 @@ tests: "TH reads RxErrInvalidScrAddrCount attribute value from DUT and verify data type" verification: | - ./chip-tool threadnetworkdiagnostics read rx-err-invalid-src-addr-count 476 0 - - [1649826953.827775][3727:3732] CHIP:DMG: SuppressResponse = true, - [1649826953.827837][3727:3732] CHIP:DMG: InteractionModelRevision = 1 - [1649826953.827894][3727:3732] CHIP:DMG: } - [1649826953.828197][3727:3732] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0035 Attribute 0x0000_0034 DataVersion: 2758196590 - [1649826953.828346][3727:3732] CHIP:TOO: RxErrInvalidSrcAddrCount: 0 + ./chip-tool threadnetworkdiagnostics read rx-err-invalid-src-addr-count 54 0 + Verify "RxErrInvalidSrcAddrCount response" on the TH(Chip-tool) Log: + + [1649826953.827775][3727:3732] CHIP:DMG: SuppressResponse = true, + [1649826953.827837][3727:3732] CHIP:DMG: InteractionModelRevision = 1 + [1649826953.827894][3727:3732] CHIP:DMG: } + [1649826953.828197][3727:3732] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0035 Attribute 0x0000_0034 DataVersion: 2758196590 + [1649826953.828346][3727:3732] CHIP:TOO: RxErrInvalidSrcAddrCount: 0 cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT && DGTHREAD.S.A0034 diff --git a/src/app/tests/suites/certification/Test_TC_DGTHREAD_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DGTHREAD_3_1.yaml index 6fc939806ac694..3ac28719f68bbb 100644 --- a/src/app/tests/suites/certification/Test_TC_DGTHREAD_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGTHREAD_3_1.yaml @@ -509,7 +509,7 @@ tests: verification: | ./chip-tool threadnetworkdiagnostics read channel-page0mask 54 0 - Verify "ChannelMask response" on the TH(All-cluster-app) Log: + Verify ""channel-page0mask"" on the TH(All-cluster-app) Log: I: 2464057 [IN]Sending unauthenticated msg 0x2000489c with MessageCounter:53367840 to 0x0000000000000000c I: 2464071 [EM]Received message of type 0x2 with protocolId (0, 1) and MessageCounter:147354356 on exchar diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_1_1.yaml index 95cb2e287e8fc3..f511e3e07b82d2 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_1_1.yaml @@ -150,6 +150,16 @@ tests: type: list contains: [0, 1, 2, 37, 38, 65528, 65529, 65531, 65532, 65533] + - label: + "TH reads Feature dependent(DRLK.S.F05) attributes in AttributeList" + PICS: DRLK.S.F05 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [3] + - label: "TH reads Feature dependent(DRLK.S.F08) attributes in AttributeList" PICS: DRLK.S.F08 @@ -430,7 +440,7 @@ tests: response: constraints: type: list - contains: [28, 35] + contains: [28, 35, 37] #Commenting out the step EventList attribute which is out of scope for matter V1.0 #- label: # "Read EventList attribute from the DUT and Verify that the DUT diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml index 4f962e0de17a46..827250803f92b4 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml @@ -164,15 +164,15 @@ tests: arguments: values: - name: "YearDayIndex" - value: 2 + value: 0 - name: "userIndex" - value: 21 + value: 15 response: values: - name: "YearDayIndex" - value: 2 + value: 0 - name: "userIndex" - value: 21 + value: 15 - name: "status" value: 0x85 - name: "LocalStartTime" diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml index 7a26ee17ad8ab8..9a39dfa75404c7 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml @@ -197,45 +197,15 @@ tests: - name: "nextCredentialIndex" value: 3 - #Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed. - - label: "TH sends Set Credential Command to DUT" - PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx - command: "SetCredential" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "operationType" - value: 0 - - name: "credential" - value: { CredentialType: 1, CredentialIndex: 1 } - - name: "credentialData" - value: "123456" - - name: "userIndex" - value: 1 - - name: "userStatus" - value: null - - name: "userType" - value: null - response: - values: - - name: "status" - value: 0x02 - - name: "userIndex" - value: null - - name: "nextCredentialIndex" - value: 2 - - #Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed. - label: "TH sends Set Credential Command to DUT and Verify that the DUT sends - Set Credential Response command with response as OCCUPIED if the - CredentialIndex is repeated" + Set Credential Response command with status as DUPLICATE or OCCUPIED" verification: | ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1, "credentialIndex" : 1 }' 123456 1 null null 1 1 --timedInteractionTimeoutMs 1000 Verify "DUT sends Set Credential Response command with response as DUPLICATE or OCCUPIED" on the TH(Chip-tool) Log: - [1656506733.767451][27276:27281] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0023 + [[1656506733.767451][27276:27281] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0023 [1656506733.767542][27276:27281] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_0023 [1656506733.767663][27276:27281] CHIP:TOO: SetCredentialResponse: { [1656506733.767731][27276:27281] CHIP:TOO: status: 2 @@ -252,41 +222,12 @@ tests: - name: "expectedValue" value: "y" - #Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed. - - label: "TH sends Set Credential Command to DUT" - PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx - command: "SetCredential" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "operationType" - value: 0 - - name: "credential" - value: { CredentialType: 1, CredentialIndex: 1 } - - name: "credentialData" - value: "123456" - - name: "userIndex" - value: 1 - - name: "userStatus" - value: null - - name: "userType" - value: null - response: - values: - - name: "status" - value: 0x02 - - name: "userIndex" - value: null - - name: "nextCredentialIndex" - value: 2 - - #Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed. - label: "TH sends Set Credential Command to DUT and Verify that the DUT sends Set Credential Response command with response as OCCUPIED if the CredentialIndex is repeated" verification: | - ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1, "credentialIndex" : 1 }' 123457 1 null null 1 1 --timedInteractionTimeoutMs 1000 + ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1, "credentialIndex" : 1 }' 12345 1 null null 1 1 --timedInteractionTimeoutMs 1000 Verify "DUT sends Set Credential Response command with response as DUPLICATE or OCCUPIED" on the TH(Chip-tool) Log: @@ -307,34 +248,6 @@ tests: - name: "expectedValue" value: "y" - #Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed. - - label: "TH sends Set Credential Command to DUT" - PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx - command: "SetCredential" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "operationType" - value: 2 - - name: "credential" - value: { CredentialType: 1, CredentialIndex: 3 } - - name: "credentialData" - value: "123456" - - name: "userIndex" - value: 1 - - name: "userStatus" - value: null - - name: "userType" - value: null - response: - values: - - name: "status" - value: 0x02 - - name: "userIndex" - value: null - - name: "nextCredentialIndex" - value: 4 - #Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed. - label: "TH sends Set Credential Command to DUT and Verify that the DUT sends @@ -343,7 +256,7 @@ tests: verification: | Mark as not applicable and proceed to next step - ./chip-tool doorlock set-credential 2 '{ "credentialType" : 1, "credentialIndex" : 3 }' 123456 1 null null 1 1 --timedInteractionTimeoutMs 1000 + ./chip-tool doorlock set-credential 2 '{ "credentialType" : 1, "credentialIndex" : 3 }' 1234567 1 null null 1 1 --timedInteractionTimeoutMs 1000 Verify "DUT sends Set Credential Response command with response as OCCUPIED" on the TH(Chip-tool) Log: diff --git a/src/app/tests/suites/certification/Test_TC_G_2_2.yaml b/src/app/tests/suites/certification/Test_TC_G_2_2.yaml index 6e5e1bfdf969ba..60870da484c069 100644 --- a/src/app/tests/suites/certification/Test_TC_G_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_G_2_2.yaml @@ -53,60 +53,109 @@ tests: [1658316948.574597][4039:4044] CHIP:DMG: status = 0x00 (SUCCESS), [1658316948.574632][4039:4044] CHIP:DMG: }, - Before adding the Groups (0x0001,0x0002,0x0003) execute this command + Before adding the Groups (0x0001,0x0002) execute this command - ./chip-tool groupkeymanagement write group-key-map "[{"groupId": 1, "groupKeySetID": 1, "fabricIndex": 1},{"groupId":2, "groupKeySetID": 1, "fabricIndex": 1},{"groupId": 3, "groupKeySetID": 1,"fabricIndex": 1} ]" 1 0 + ./chip-tool groupkeymanagement write group-key-map "[{"groupId": 1, "groupKeySetID": 1, "fabricIndex": 1},{"groupId":2, "groupKeySetID": 1, "fabricIndex": 1} ]" 1 0 Verify the "status is success" on the TH(Chip-tool) Log: - [1662654848.010405][228914:228919] CHIP:DMG: AttributeStatusIB = - [1662654848.010410][228914:228919] CHIP:DMG: { - [1662654848.010416][228914:228919] CHIP:DMG: AttributePathIB = - [1662654848.010421][228914:228919] CHIP:DMG: { - [1662654848.010427][228914:228919] CHIP:DMG: Endpoint = 0x0, - [1662654848.010433][228914:228919] CHIP:DMG: Cluster = 0x3f, - [1662654848.010439][228914:228919] CHIP:DMG: Attribute = 0x0000_0000, - [1662654848.010444][228914:228919] CHIP:DMG: ListIndex = Null, - [1662654848.010450][228914:228919] CHIP:DMG: } - [1662654848.010458][228914:228919] CHIP:DMG: - [1662654848.010464][228914:228919] CHIP:DMG: StatusIB = - [1662654848.010469][228914:228919] CHIP:DMG: { - [1662654848.010475][228914:228919] CHIP:DMG: status = 0x00 (SUCCESS), - [1662654848.010480][228914:228919] CHIP:DMG: }, - [1662654848.010485][228914:228919] CHIP:DMG: - [1662654848.010490][228914:228919] CHIP:DMG: }, - [1662654848.010501][228914:228919] CHIP:DMG: - [1662654848.010505][228914:228919] CHIP:DMG: AttributeStatusIB = - [1662654848.010510][228914:228919] CHIP:DMG: { - [1662654848.010514][228914:228919] CHIP:DMG: AttributePathIB = - [1662654848.010519][228914:228919] CHIP:DMG: { - [1662654848.010523][228914:228919] CHIP:DMG: Endpoint = 0x0, - [1662654848.010527][228914:228919] CHIP:DMG: Cluster = 0x3f, - [1662654848.010531][228914:228919] CHIP:DMG: Attribute = 0x0000_0000, - [1662654848.010535][228914:228919] CHIP:DMG: ListIndex = Null, - [1662654848.010538][228914:228919] CHIP:DMG: } - [1662654848.010543][228914:228919] CHIP:DMG: - [1662654848.010547][228914:228919] CHIP:DMG: StatusIB = - [1662654848.010550][228914:228919] CHIP:DMG: { - [1662654848.010554][228914:228919] CHIP:DMG: status = 0x00 (SUCCESS), - [1662654848.010557][228914:228919] CHIP:DMG: }, - [1662654848.010561][228914:228919] CHIP:DMG: - [1662654848.010565][228914:228919] CHIP:DMG: }, - [1662654848.010571][228914:228919] CHIP:DMG: - [1662654848.010574][228914:228919] CHIP:DMG: AttributeStatusIB = - [1662654848.010578][228914:228919] CHIP:DMG: { - [1662654848.010581][228914:228919] CHIP:DMG: AttributePathIB = - [1662654848.010585][228914:228919] CHIP:DMG: { - [1662654848.010589][228914:228919] CHIP:DMG: Endpoint = 0x0, - [1662654848.010593][228914:228919] CHIP:DMG: Cluster = 0x3f, - [1662654848.010597][228914:228919] CHIP:DMG: Attribute = 0x0000_0000, - [1662654848.010601][228914:228919] CHIP:DMG: ListIndex = Null, - [1662654848.010605][228914:228919] CHIP:DMG: } - [1662654848.010610][228914:228919] CHIP:DMG: - [1662654848.010614][228914:228919] CHIP:DMG: StatusIB = - [1662654848.010618][228914:228919] CHIP:DMG: { - [1662654848.010621][228914:228919] CHIP:DMG: status = 0x00 (SUCCESS), - [1662654848.010625][228914:228919] CHIP:DMG: }, + [1663071507.364542][23693:23698] CHIP:DMG: WriteClient moving to [ResponseRe] + [1663071507.364603][23693:23698] CHIP:DMG: WriteResponseMessage = + [1663071507.364635][23693:23698] CHIP:DMG: { + [1663071507.364661][23693:23698] CHIP:DMG: AttributeStatusIBs = + [1663071507.364699][23693:23698] CHIP:DMG: [ + [1663071507.364728][23693:23698] CHIP:DMG: AttributeStatusIB = + [1663071507.364768][23693:23698] CHIP:DMG: { + [1663071507.364799][23693:23698] CHIP:DMG: AttributePathIB = + [1663071507.364838][23693:23698] CHIP:DMG: { + [1663071507.364876][23693:23698] CHIP:DMG: Endpoint = 0x0, + [1663071507.364921][23693:23698] CHIP:DMG: Cluster = 0x3f, + [1663071507.364961][23693:23698] CHIP:DMG: Attribute = 0x0000_0000, + [1663071507.365002][23693:23698] CHIP:DMG: } + [1663071507.365044][23693:23698] CHIP:DMG: + [1663071507.365079][23693:23698] CHIP:DMG: StatusIB = + [1663071507.365121][23693:23698] CHIP:DMG: { + [1663071507.365164][23693:23698] CHIP:DMG: status = 0x00 (SUCCESS), + [1663071507.365201][23693:23698] CHIP:DMG: }, + [1663071507.365243][23693:23698] CHIP:DMG: + [1663071507.365275][23693:23698] CHIP:DMG: }, + [1663071507.365320][23693:23698] CHIP:DMG: + [1663071507.365351][23693:23698] CHIP:DMG: AttributeStatusIB = + [1663071507.365385][23693:23698] CHIP:DMG: { + [1663071507.365417][23693:23698] CHIP:DMG: AttributePathIB = + [1663071507.365453][23693:23698] CHIP:DMG: { + [1663071507.365489][23693:23698] CHIP:DMG: Endpoint = 0x0, + [1663071507.365532][23693:23698] CHIP:DMG: Cluster = 0x3f, + [1663071507.365574][23693:23698] CHIP:DMG: Attribute = 0x0000_0000, + [1663071507.365612][23693:23698] CHIP:DMG: ListIndex = Null, + [1663071507.365652][23693:23698] CHIP:DMG: } + [1663071507.365696][23693:23698] CHIP:DMG: + [1663071507.365735][23693:23698] CHIP:DMG: StatusIB = + [1663071507.365773][23693:23698] CHIP:DMG: { + [1663071507.365810][23693:23698] CHIP:DMG: status = 0x00 (SUCCESS), + [1663071507.365846][23693:23698] CHIP:DMG: }, + [1663071507.365883][23693:23698] CHIP:DMG: + [1663071507.365915][23693:23698] CHIP:DMG: }, + [1663071507.365958][23693:23698] CHIP:DMG: + [1663071507.365987][23693:23698] CHIP:DMG: AttributeStatusIB = + [1663071507.366017][23693:23698] CHIP:DMG: { + [1663071507.366047][23693:23698] CHIP:DMG: AttributePathIB = + [1663071507.366082][23693:23698] CHIP:DMG: { + [1663071507.366121][23693:23698] CHIP:DMG: Endpoint = 0x0, + [1663071507.366164][23693:23698] CHIP:DMG: Cluster = 0x3f, + [1663071507.366204][23693:23698] CHIP:DMG: Attribute = 0x0000_0000, + [1663071507.366243][23693:23698] CHIP:DMG: ListIndex = Null, + [1663071507.366280][23693:23698] CHIP:DMG: } + [1663071507.366319][23693:23698] CHIP:DMG: + [1663071507.366355][23693:23698] CHIP:DMG: StatusIB = + [1663071507.366390][23693:23698] CHIP:DMG: { + [1663071507.366428][23693:23698] CHIP:DMG: status = 0x00 (SUCCESS), + [1663071507.366466][23693:23698] CHIP:DMG: }, + + + Before adding the Groups (0x0003) execute this command + + ./chip-tool groupkeymanagement write group-key-map "[{"groupId": 3, "groupKeySetID": 1, "fabricIndex": 1}]" 1 0 + + + Verify the "status is success" on the TH(Chip-tool) Log: + + [1663071565.926340][23704:23709] CHIP:DMG: WriteClient moving to [ResponseRe] + [1663071565.926399][23704:23709] CHIP:DMG: WriteResponseMessage = + [1663071565.926427][23704:23709] CHIP:DMG: { + [1663071565.926464][23704:23709] CHIP:DMG: AttributeStatusIBs = + [1663071565.926498][23704:23709] CHIP:DMG: [ + [1663071565.926535][23704:23709] CHIP:DMG: AttributeStatusIB = + [1663071565.926568][23704:23709] CHIP:DMG: { + [1663071565.926609][23704:23709] CHIP:DMG: AttributePathIB = + [1663071565.926689][23704:23709] CHIP:DMG: { + [1663071565.926730][23704:23709] CHIP:DMG: Endpoint = 0x0, + [1663071565.926775][23704:23709] CHIP:DMG: Cluster = 0x3f, + [1663071565.926814][23704:23709] CHIP:DMG: Attribute = 0x0000_0000, + [1663071565.926909][23704:23709] CHIP:DMG: } + [1663071565.926961][23704:23709] CHIP:DMG: + [1663071565.926993][23704:23709] CHIP:DMG: StatusIB = + [1663071565.927037][23704:23709] CHIP:DMG: { + [1663071565.927074][23704:23709] CHIP:DMG: status = 0x00 (SUCCESS), + [1663071565.927116][23704:23709] CHIP:DMG: }, + [1663071565.927153][23704:23709] CHIP:DMG: + [1663071565.927191][23704:23709] CHIP:DMG: }, + [1663071565.927230][23704:23709] CHIP:DMG: + [1663071565.927265][23704:23709] CHIP:DMG: AttributeStatusIB = + [1663071565.927295][23704:23709] CHIP:DMG: { + [1663071565.927332][23704:23709] CHIP:DMG: AttributePathIB = + [1663071565.927365][23704:23709] CHIP:DMG: { + [1663071565.927406][23704:23709] CHIP:DMG: Endpoint = 0x0, + [1663071565.927442][23704:23709] CHIP:DMG: Cluster = 0x3f, + [1663071565.927487][23704:23709] CHIP:DMG: Attribute = 0x0000_0000, + [1663071565.927524][23704:23709] CHIP:DMG: ListIndex = Null, + [1663071565.927570][23704:23709] CHIP:DMG: } + [1663071565.927607][23704:23709] CHIP:DMG: + [1663071565.927651][23704:23709] CHIP:DMG: StatusIB = + [1663071565.927686][23704:23709] CHIP:DMG: { + [1663071565.927728][23704:23709] CHIP:DMG: status = 0x00 (SUCCESS), + [1663071565.927760][23704:23709] CHIP:DMG: }, + After executing all commands related to the above three groups, execute the below command before adding the Group 0x0004 to check the Resource_Exhausted Condition diff --git a/src/app/tests/suites/certification/Test_TC_G_2_3.yaml b/src/app/tests/suites/certification/Test_TC_G_2_3.yaml index c0befbc4347c3f..f25cd52f401232 100644 --- a/src/app/tests/suites/certification/Test_TC_G_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_G_2_3.yaml @@ -99,61 +99,108 @@ tests: [1662655615.539910][229172:229177] CHIP:DMG: }, - Before adding the Groups (0x0006,0x0007,0x0008) execute this command + Before adding the Groups (0x0006,0x0007) execute this command - ./chip-tool groupkeymanagement write group-key-map "[{"groupId":6, "groupKeySetID": 1, "fabricIndex": 1},{"groupId": 7, "groupKeySetID": 1,"fabricIndex": 1},{"groupId":8, "groupKeySetID": 1, "fabricIndex": 1} ]" 1 0 + ./chip-tool groupkeymanagement write group-key-map "[{"groupId":6, "groupKeySetID": 1, "fabricIndex": 1},{"groupId": 7, "groupKeySetID": 1,"fabricIndex": 1}]" 1 0 Verify the "status is success" on the TH(Chip-tool) Log: - [1662655813.516351][229227:229232] CHIP:DMG: AttributeStatusIB = - [1662655813.516355][229227:229232] CHIP:DMG: { - [1662655813.516358][229227:229232] CHIP:DMG: AttributePathIB = - [1662655813.516362][229227:229232] CHIP:DMG: { - [1662655813.516366][229227:229232] CHIP:DMG: Endpoint = 0x0, - [1662655813.516371][229227:229232] CHIP:DMG: Cluster = 0x3f, - [1662655813.516375][229227:229232] CHIP:DMG: Attribute = 0x0000_0000, - [1662655813.516378][229227:229232] CHIP:DMG: ListIndex = Null, - [1662655813.516382][229227:229232] CHIP:DMG: } - [1662655813.516386][229227:229232] CHIP:DMG: - [1662655813.516390][229227:229232] CHIP:DMG: StatusIB = - [1662655813.516394][229227:229232] CHIP:DMG: { - [1662655813.516401][229227:229232] CHIP:DMG: status = 0x00 (SUCCESS), - [1662655813.516407][229227:229232] CHIP:DMG: }, - [1662655813.516413][229227:229232] CHIP:DMG: - [1662655813.516417][229227:229232] CHIP:DMG: }, - [1662655813.516423][229227:229232] CHIP:DMG: - [1662655813.516426][229227:229232] CHIP:DMG: AttributeStatusIB = - [1662655813.516431][229227:229232] CHIP:DMG: { - [1662655813.516436][229227:229232] CHIP:DMG: AttributePathIB = - [1662655813.516441][229227:229232] CHIP:DMG: { - [1662655813.516446][229227:229232] CHIP:DMG: Endpoint = 0x0, - [1662655813.516452][229227:229232] CHIP:DMG: Cluster = 0x3f, - [1662655813.516459][229227:229232] CHIP:DMG: Attribute = 0x0000_0000, - [1662655813.516464][229227:229232] CHIP:DMG: ListIndex = Null, - [1662655813.516468][229227:229232] CHIP:DMG: } - [1662655813.516474][229227:229232] CHIP:DMG: - [1662655813.516477][229227:229232] CHIP:DMG: StatusIB = - [1662655813.516482][229227:229232] CHIP:DMG: { - [1662655813.516487][229227:229232] CHIP:DMG: status = 0x00 (SUCCESS), - [1662655813.516491][229227:229232] CHIP:DMG: }, - [1662655813.516497][229227:229232] CHIP:DMG: - [1662655813.516500][229227:229232] CHIP:DMG: }, - [1662655813.516509][229227:229232] CHIP:DMG: - [1662655813.516514][229227:229232] CHIP:DMG: AttributeStatusIB = - [1662655813.516519][229227:229232] CHIP:DMG: { - [1662655813.516523][229227:229232] CHIP:DMG: AttributePathIB = - [1662655813.516528][229227:229232] CHIP:DMG: { - [1662655813.516532][229227:229232] CHIP:DMG: Endpoint = 0x0, - [1662655813.516537][229227:229232] CHIP:DMG: Cluster = 0x3f, - [1662655813.516543][229227:229232] CHIP:DMG: Attribute = 0x0000_0000, - [1662655813.516548][229227:229232] CHIP:DMG: ListIndex = Null, - [1662655813.516553][229227:229232] CHIP:DMG: } - [1662655813.516561][229227:229232] CHIP:DMG: - [1662655813.516566][229227:229232] CHIP:DMG: StatusIB = - [1662655813.516572][229227:229232] CHIP:DMG: { - [1662655813.516577][229227:229232] CHIP:DMG: status = 0x00 (SUCCESS), - [1662655813.516582][229227:229232] CHIP:DMG: }, + [1663071815.843582][23720:23725] CHIP:DMG: WriteClient moving to [ResponseRe] + [1663071815.843667][23720:23725] CHIP:DMG: WriteResponseMessage = + [1663071815.843695][23720:23725] CHIP:DMG: { + [1663071815.843718][23720:23725] CHIP:DMG: AttributeStatusIBs = + [1663071815.843750][23720:23725] CHIP:DMG: [ + [1663071815.843775][23720:23725] CHIP:DMG: AttributeStatusIB = + [1663071815.843809][23720:23725] CHIP:DMG: { + [1663071815.843838][23720:23725] CHIP:DMG: AttributePathIB = + [1663071815.843874][23720:23725] CHIP:DMG: { + [1663071815.843909][23720:23725] CHIP:DMG: Endpoint = 0x0, + [1663071815.843947][23720:23725] CHIP:DMG: Cluster = 0x3f, + [1663071815.843985][23720:23725] CHIP:DMG: Attribute = 0x0000_0000, + [1663071815.844018][23720:23725] CHIP:DMG: } + [1663071815.844058][23720:23725] CHIP:DMG: + [1663071815.844089][23720:23725] CHIP:DMG: StatusIB = + [1663071815.844125][23720:23725] CHIP:DMG: { + [1663071815.844159][23720:23725] CHIP:DMG: status = 0x00 (SUCCESS), + [1663071815.844192][23720:23725] CHIP:DMG: }, + [1663071815.844227][23720:23725] CHIP:DMG: + [1663071815.844257][23720:23725] CHIP:DMG: }, + [1663071815.844295][23720:23725] CHIP:DMG: + [1663071815.844322][23720:23725] CHIP:DMG: AttributeStatusIB = + [1663071815.844352][23720:23725] CHIP:DMG: { + [1663071815.844380][23720:23725] CHIP:DMG: AttributePathIB = + [1663071815.844412][23720:23725] CHIP:DMG: { + [1663071815.844445][23720:23725] CHIP:DMG: Endpoint = 0x0, + [1663071815.844482][23720:23725] CHIP:DMG: Cluster = 0x3f, + [1663071815.844518][23720:23725] CHIP:DMG: Attribute = 0x0000_0000, + [1663071815.844555][23720:23725] CHIP:DMG: ListIndex = Null, + [1663071815.844587][23720:23725] CHIP:DMG: } + [1663071815.844623][23720:23725] CHIP:DMG: + [1663071815.844657][23720:23725] CHIP:DMG: StatusIB = + [1663071815.844691][23720:23725] CHIP:DMG: { + [1663071815.844724][23720:23725] CHIP:DMG: status = 0x00 (SUCCESS), + [1663071815.844760][23720:23725] CHIP:DMG: }, + [1663071815.844793][23720:23725] CHIP:DMG: + [1663071815.844824][23720:23725] CHIP:DMG: }, + [1663071815.844866][23720:23725] CHIP:DMG: + [1663071815.844893][23720:23725] CHIP:DMG: AttributeStatusIB = + [1663071815.844922][23720:23725] CHIP:DMG: { + [1663071815.844952][23720:23725] CHIP:DMG: AttributePathIB = + [1663071815.844986][23720:23725] CHIP:DMG: { + [1663071815.845021][23720:23725] CHIP:DMG: Endpoint = 0x0, + [1663071815.845058][23720:23725] CHIP:DMG: Cluster = 0x3f, + [1663071815.845097][23720:23725] CHIP:DMG: Attribute = 0x0000_0000, + [1663071815.845131][23720:23725] CHIP:DMG: ListIndex = Null, + [1663071815.845165][23720:23725] CHIP:DMG: } + [1663071815.845202][23720:23725] CHIP:DMG: + [1663071815.845236][23720:23725] CHIP:DMG: StatusIB = + [1663071815.845269][23720:23725] CHIP:DMG: { + [1663071815.845304][23720:23725] CHIP:DMG: status = 0x00 (SUCCESS), + [1663071815.845337][23720:23725] CHIP:DMG: }, + + + Before adding the Groups (0x0008) execute this command + + ./chip-tool groupkeymanagement write group-key-map "[{"groupId": 8, "groupKeySetID": 1, "fabricIndex": 1}]" 1 0 + + Verify the "status is success" on the TH(Chip-tool) Log: + + [1663071878.472457][23730:23735] CHIP:DMG: WriteClient moving to [ResponseRe] + [1663071878.472525][23730:23735] CHIP:DMG: WriteResponseMessage = + [1663071878.472560][23730:23735] CHIP:DMG: { + [1663071878.472607][23730:23735] CHIP:DMG: AttributeStatusIBs = + [1663071878.472649][23730:23735] CHIP:DMG: [ + [1663071878.472702][23730:23735] CHIP:DMG: AttributeStatusIB = + [1663071878.472743][23730:23735] CHIP:DMG: { + [1663071878.472779][23730:23735] CHIP:DMG: AttributePathIB = + [1663071878.472838][23730:23735] CHIP:DMG: { + [1663071878.472893][23730:23735] CHIP:DMG: Endpoint = 0x0, + [1663071878.472939][23730:23735] CHIP:DMG: Cluster = 0x3f, + [1663071878.473002][23730:23735] CHIP:DMG: Attribute = 0x0000_0000, + [1663071878.473044][23730:23735] CHIP:DMG: } + [1663071878.473104][23730:23735] CHIP:DMG: + [1663071878.473154][23730:23735] CHIP:DMG: StatusIB = + [1663071878.473200][23730:23735] CHIP:DMG: { + [1663071878.473257][23730:23735] CHIP:DMG: status = 0x00 (SUCCESS), + [1663071878.473297][23730:23735] CHIP:DMG: }, + [1663071878.473349][23730:23735] CHIP:DMG: + [1663071878.473384][23730:23735] CHIP:DMG: }, + [1663071878.473442][23730:23735] CHIP:DMG: + [1663071878.473476][23730:23735] CHIP:DMG: AttributeStatusIB = + [1663071878.473524][23730:23735] CHIP:DMG: { + [1663071878.473559][23730:23735] CHIP:DMG: AttributePathIB = + [1663071878.473613][23730:23735] CHIP:DMG: { + [1663071878.473656][23730:23735] CHIP:DMG: Endpoint = 0x0, + [1663071878.473714][23730:23735] CHIP:DMG: Cluster = 0x3f, + [1663071878.473759][23730:23735] CHIP:DMG: Attribute = 0x0000_0000, + [1663071878.473814][23730:23735] CHIP:DMG: ListIndex = Null, + [1663071878.473855][23730:23735] CHIP:DMG: } + [1663071878.473913][23730:23735] CHIP:DMG: + [1663071878.473953][23730:23735] CHIP:DMG: StatusIB = + [1663071878.474006][23730:23735] CHIP:DMG: { + [1663071878.474048][23730:23735] CHIP:DMG: status = 0x00 (SUCCESS), + [1663071878.474104][23730:23735] CHIP:DMG: }, Before adding the Group0x0009 execute this command which is used to check the Resource_Exhausted Condition @@ -170,21 +217,6 @@ tests: [1658319969.849739][4777:4782] CHIP:DMG: { [1658319969.849774][4777:4782] CHIP:DMG: status = 0x00 (SUCCESS), [1658319969.849814][4777:4782] CHIP:DMG: }, - - Before adding the Group0x0002 execute this command - - ./chip-tool groupkeymanagement write group-key-map "[{"groupId": 2, "groupKeySetID": 1, "fabricIndex": 1}]" 1 0 - - Verify the status is success on the TH Log: - - [1658323452.116449][4965:4970] CHIP:DMG: StatusIB = - [1658323452.116487][4965:4970] CHIP:DMG: { - [1658323452.116524][4965:4970] CHIP:DMG: status = 0x00 (SUCCESS), - [1658323452.116563][4965:4970] CHIP:DMG: }, - [1658323452.115827][4965:4970] CHIP:DMG: StatusIB = - [1658323452.115863][4965:4970] CHIP:DMG: { - [1658323452.115899][4965:4970] CHIP:DMG: status = 0x00 (SUCCESS), - [1658323452.115935][4965:4970] CHIP:DMG: }, disabled: true - label: "DUT supports Identify cluster" diff --git a/src/app/tests/suites/certification/Test_TC_LUNIT_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LUNIT_1_1.yaml index 13ceed67edec8e..ee79e7e6fac1da 100644 --- a/src/app/tests/suites/certification/Test_TC_LUNIT_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LUNIT_1_1.yaml @@ -46,19 +46,19 @@ tests: [1659785279.519548][4122:4122] CHIP:IM: Received Read request [1659785279.519625][4122:4122] CHIP:DMG: ReadRequestMessage = [1659785279.519652][4122:4122] CHIP:DMG: { - [1659785279.519679][4122:4122] CHIP:DMG: AttributePathIBs = - [1659785279.519705][4122:4122] CHIP:DMG: [ - [1659785279.519729][4122:4122] CHIP:DMG: AttributePathIB = - [1659785279.519759][4122:4122] CHIP:DMG: { - [1659785279.519790][4122:4122] CHIP:DMG: Endpoint = 0x0, - [1659785279.519822][4122:4122] CHIP:DMG: Cluster = 0x2d, - [1659785279.519853][4122:4122] CHIP:DMG: Attribute = 0x0000_FFFD, - [1659785279.519877][4122:4122] CHIP:DMG: } + [1659785279.519679][4122:4122] CHIP:DMG: AttributePathIBs = + [1659785279.519705][4122:4122] CHIP:DMG: [ + [1659785279.519729][4122:4122] CHIP:DMG: AttributePathIB = + [1659785279.519759][4122:4122] CHIP:DMG: { + [1659785279.519790][4122:4122] CHIP:DMG: Endpoint = 0x0, + [1659785279.519822][4122:4122] CHIP:DMG: Cluster = 0x2d, + [1659785279.519853][4122:4122] CHIP:DMG: Attribute = 0x0000_FFFD, + [1659785279.519877][4122:4122] CHIP:DMG: } [1659785279.519904][4122:4122] CHIP:DMG: - [1659785279.519932][4122:4122] CHIP:DMG: ], + [1659785279.519932][4122:4122] CHIP:DMG: ], [1659785279.519960][4122:4122] CHIP:DMG: - [1659785279.519986][4122:4122] CHIP:DMG: isFabricFiltered = true, - [1659785279.520011][4122:4122] CHIP:DMG: InteractionModelRevision = 1 + [1659785279.519986][4122:4122] CHIP:DMG: isFabricFiltered = true, + [1659785279.520011][4122:4122] CHIP:DMG: InteractionModelRevision = 1 [1659785279.520034][4122:4122] CHIP:DMG: }, [1659785279.520108][4122:4122] CHIP:DMG: IM RH moving to [GeneratingReports] [1659785279.520189][4122:4122] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 @@ -102,14 +102,29 @@ tests: ./chip-tool unitlocalization read attribute-list 1 0 Verify DUT receives attribute-list attribute response on the TH(all-clusters-app) Log: - [1652335691.917681][3124:3129] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_FFFB DataVersion: 3157629909 - [1652335691.917762][3124:3129] CHIP:TOO: AttributeList: 6 entries - [1652335691.917802][3124:3129] CHIP:TOO: [1]: 0 - [1652335691.917834][3124:3129] CHIP:TOO: [2]: 65528 - [1652335691.917865][3124:3129] CHIP:TOO: [3]: 65529 - [1652335691.917895][3124:3129] CHIP:TOO: [4]: 65531 - [1652335691.917924][3124:3129] CHIP:TOO: [5]: 65532 - [1652335691.917957][3124:3129] CHIP:TOO: [6]: 65533 + [1661843250.245339][2719:2719] CHIP:IM: Received Read request + [1661843176.295960][2719:2719] CHIP:DMG: ReadRequestMessage = + [1661843176.295989][2719:2719] CHIP:DMG: { + [1661843176.296011][2719:2719] CHIP:DMG: AttributePathIBs = + [1661843176.296036][2719:2719] CHIP:DMG: [ + [1661843176.296059][2719:2719] CHIP:DMG: AttributePathIB = + [1661843176.296089][2719:2719] CHIP:DMG: { + [1661843176.296118][2719:2719] CHIP:DMG: Endpoint = 0x0, + [1661843176.296153][2719:2719] CHIP:DMG: Cluster = 0x2d, + [1661843176.296186][2719:2719] CHIP:DMG: Attribute = 0x0000_FFFB, + [1661843176.296218][2719:2719] CHIP:DMG: } + [1661843176.296247][2719:2719] CHIP:DMG: + [1661843176.296273][2719:2719] CHIP:DMG: ], + [1661843176.296300][2719:2719] CHIP:DMG: + [1661843176.296325][2719:2719] CHIP:DMG: isFabricFiltered = true, + [1661843176.296349][2719:2719] CHIP:DMG: InteractionModelRevision = 1 + [1661843176.296371][2719:2719] CHIP:DMG: }, + [1661843176.296442][2719:2719] CHIP:DMG: IM RH moving to [GeneratingReports] + [1661843176.296539][2719:2719] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1661843176.296567][2719:2719] CHIP:DMG: Cluster 2d, Attribute fffb is dirty + [1661843176.296588][2719:2719] CHIP:DMG: Reading attribute: Cluster=0x0000_002D Endpoint=0 AttributeId=0x0000_FFFB (expanded=0) + [1661843176.296613][2719:2719] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_002D e=0 p=v + [1661843176.296646][2719:2719] CHIP:DMG: AccessControl: allowed disabled: true - label: "{DUTread} (0xFFFA) EventList attribute" @@ -126,24 +141,29 @@ tests: ./chip-tool unitlocalization read accepted-command-list 1 0 Verify DUT receives AcceptedCommandList attribute response on the TH(all-clusters-app) Log: [1659785385.381041][4122:4122] CHIP:EM: Handling via exchange: 60781r, Delegate: 0xaaaaeaa68fa0 - [1659785385.381113][4122:4122] CHIP:IM: Received Read request - [1659785385.381253][4122:4122] CHIP:DMG: ReadRequestMessage = - [1659785385.381309][4122:4122] CHIP:DMG: { - [1659785385.381354][4122:4122] CHIP:DMG: AttributePathIBs = - [1659785385.381415][4122:4122] CHIP:DMG: [ - [1659785385.381466][4122:4122] CHIP:DMG: AttributePathIB = - [1659785385.381523][4122:4122] CHIP:DMG: { - [1659785385.381583][4122:4122] CHIP:DMG: Endpoint = 0x0, - [1659785385.381650][4122:4122] CHIP:DMG: Cluster = 0x2d, - [1659785385.381717][4122:4122] CHIP:DMG: Attribute = 0x0000_FFFB, - [1659785385.381780][4122:4122] CHIP:DMG: } - [1659785385.381842][4122:4122] CHIP:DMG: - [1659785385.381900][4122:4122] CHIP:DMG: ], - [1659785385.381959][4122:4122] CHIP:DMG: - [1659785385.382019][4122:4122] CHIP:DMG: isFabricFiltered = true, - [1659785385.382072][4122:4122] CHIP:DMG: InteractionModelRevision = 1 - [1659785385.382121][4122:4122] CHIP:DMG: }, - [1659785385.382261][4122:4122] CHIP:DMG: IM RH moving to [GeneratingReports] + [1661843250.245339][2719:2719] CHIP:IM: Received Read request + [1661843250.245414][2719:2719] CHIP:DMG: ReadRequestMessage = + [1661843250.245438][2719:2719] CHIP:DMG: { + [1661843250.245455][2719:2719] CHIP:DMG: AttributePathIBs = + [1661843250.245478][2719:2719] CHIP:DMG: [ + [1661843250.245499][2719:2719] CHIP:DMG: AttributePathIB = + [1661843250.245531][2719:2719] CHIP:DMG: { + [1661843250.245557][2719:2719] CHIP:DMG: Endpoint = 0x0, + [1661843250.245585][2719:2719] CHIP:DMG: Cluster = 0x2d, + [1661843250.245611][2719:2719] CHIP:DMG: Attribute = 0x0000_FFF9, + [1661843250.245669][2719:2719] CHIP:DMG: } + [1661843250.245696][2719:2719] CHIP:DMG: + [1661843250.245718][2719:2719] CHIP:DMG: ], + [1661843250.245741][2719:2719] CHIP:DMG: + [1661843250.245763][2719:2719] CHIP:DMG: isFabricFiltered = true, + [1661843250.245784][2719:2719] CHIP:DMG: InteractionModelRevision = 1 + [1661843250.245802][2719:2719] CHIP:DMG: }, + [1661843250.245867][2719:2719] CHIP:DMG: IM RH moving to [GeneratingReports] + [1661843250.245953][2719:2719] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1661843250.245979][2719:2719] CHIP:DMG: Cluster 2d, Attribute fff9 is dirty + [1661843250.245997][2719:2719] CHIP:DMG: Reading attribute: Cluster=0x0000_002D Endpoint=0 AttributeId=0x0000_FFF9 (expanded=0) + [1661843250.246019][2719:2719] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_002D e=0 p=v + [1661843250.246050][2719:2719] CHIP:DMG: AccessControl: allowed disabled: true - label: "{DUTread} (0xFFF8) GeneratedCommandList attribute" @@ -156,19 +176,19 @@ tests: [1659785447.481659][4122:4122] CHIP:IM: Received Read request [1659785447.481736][4122:4122] CHIP:DMG: ReadRequestMessage = [1659785447.481763][4122:4122] CHIP:DMG: { - [1659785447.481785][4122:4122] CHIP:DMG: AttributePathIBs = - [1659785447.481813][4122:4122] CHIP:DMG: [ - [1659785447.481837][4122:4122] CHIP:DMG: AttributePathIB = - [1659785447.481864][4122:4122] CHIP:DMG: { - [1659785447.481892][4122:4122] CHIP:DMG: Endpoint = 0x0, - [1659785447.481923][4122:4122] CHIP:DMG: Cluster = 0x2d, - [1659785447.481958][4122:4122] CHIP:DMG: Attribute = 0x0000_FFF8, - [1659785447.481985][4122:4122] CHIP:DMG: } + [1659785447.481785][4122:4122] CHIP:DMG: AttributePathIBs = + [1659785447.481813][4122:4122] CHIP:DMG: [ + [1659785447.481837][4122:4122] CHIP:DMG: AttributePathIB = + [1659785447.481864][4122:4122] CHIP:DMG: { + [1659785447.481892][4122:4122] CHIP:DMG: Endpoint = 0x0, + [1659785447.481923][4122:4122] CHIP:DMG: Cluster = 0x2d, + [1659785447.481958][4122:4122] CHIP:DMG: Attribute = 0x0000_FFF8, + [1659785447.481985][4122:4122] CHIP:DMG: } [1659785447.482014][4122:4122] CHIP:DMG: - [1659785447.482039][4122:4122] CHIP:DMG: ], + [1659785447.482039][4122:4122] CHIP:DMG: ], [1659785447.482067][4122:4122] CHIP:DMG: - [1659785447.482093][4122:4122] CHIP:DMG: isFabricFiltered = true, - [1659785447.482118][4122:4122] CHIP:DMG: InteractionModelRevision = 1 + [1659785447.482093][4122:4122] CHIP:DMG: isFabricFiltered = true, + [1659785447.482118][4122:4122] CHIP:DMG: InteractionModelRevision = 1 [1659785447.482142][4122:4122] CHIP:DMG: }, [1659785447.482215][4122:4122] CHIP:DMG: IM RH moving to [GeneratingReports] disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_3_13.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_3_13.yaml index fb381eda9168e8..236ad41225e82d 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_3_13.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_3_13.yaml @@ -36,10 +36,7 @@ tests: #This step implicitly validating the attribute(InputList)constraints, as long as the payload is being parsed successfully - label: "TH reads the InputList attribute from the DUT to show list of Inputs - available and Verify list of available inputs supported by the device - is provided, where each entry in the list contains an index(type:uint - 8), InputType (InputType Enums), Name (type: Strings), and - Description(Type:String)" + available" PICS: MEDIAINPUT.S.A0000 command: "readAttribute" attribute: "InputList" diff --git a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_3.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_3.yaml index 64592f1b3f6f43..fe5d51a5a79502 100644 --- a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_3.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + Chip-tool command used below are an example to verify the DUT as client test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + - label: "Factory Reset DUT (to ensure NOC list is empty at the beginning of the following steps)" diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index b6162beeede3bc..17bfa98ec4d45d 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -226,12 +226,7 @@ "TestCommissioningWindow" ], "MultiAdmin": ["TestMultiAdmin"], - "SoftwareDiagnostics": [ - "Test_TC_DGSW_1_1", - "Test_TC_DGSW_2_1", - "Test_TC_DGSW_2_2", - "Test_TC_DGSW_2_3" - ], + "SoftwareDiagnostics": ["Test_TC_DGSW_1_1"], "Subscriptions": ["TestSubscribe_OnOff"], "DoorLock": [ "DL_UsersAndCredentials", diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index 24c6eb007c3e45..fb755f1f72b12e 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -238,7 +238,13 @@ "Test_TC_SC_5_3", "Test_TC_SC_6_1" ], - "SoftwareDiagnostics": ["Test_TC_DGSW_3_1", "Test_TC_DGSW_3_2"], + "SoftwareDiagnostics": [ + "Test_TC_DGSW_2_1", + "Test_TC_DGSW_2_2", + "Test_TC_DGSW_2_3", + "Test_TC_DGSW_3_1", + "Test_TC_DGSW_3_2" + ], "WiFiNetworkDiagnostics": [ "Test_TC_DGWIFI_2_2", "Test_TC_DGWIFI_3_1", diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 0102b13479ac3c..2ea5356c2a5227 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -234,9 +234,6 @@ class TestList : public Command printf("TestCommissioningWindow\n"); printf("TestMultiAdmin\n"); printf("Test_TC_DGSW_1_1\n"); - printf("Test_TC_DGSW_2_1\n"); - printf("Test_TC_DGSW_2_2\n"); - printf("Test_TC_DGSW_2_3\n"); printf("TestSubscribe_OnOff\n"); printf("DL_UsersAndCredentials\n"); printf("DL_LockUnlock\n"); @@ -485,6 +482,9 @@ class ManualTestList : public Command printf("Test_TC_SC_5_2\n"); printf("Test_TC_SC_5_3\n"); printf("Test_TC_SC_6_1\n"); + printf("Test_TC_DGSW_2_1\n"); + printf("Test_TC_DGSW_2_2\n"); + printf("Test_TC_DGSW_2_3\n"); printf("Test_TC_DGSW_3_1\n"); printf("Test_TC_DGSW_3_2\n"); printf("Test_TC_DGWIFI_2_2\n"); @@ -4504,9 +4504,6 @@ class Test_TC_CC_3_2Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - uint8_t CurrentHueValueStep2f; - uint8_t CurrentHueValueStep3f; - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -4579,7 +4576,6 @@ class Test_TC_CC_3_2Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintMinValue("value", value, 80U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 110U)); - CurrentHueValueStep2f = value; } break; case 13: @@ -4591,7 +4587,8 @@ class Test_TC_CC_3_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, CurrentHueValueStep2f)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 80U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 110U)); } break; case 15: @@ -4613,8 +4610,8 @@ class Test_TC_CC_3_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 20U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 8U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 12U)); } break; case 20: @@ -4644,7 +4641,6 @@ class Test_TC_CC_3_2Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintMinValue("value", value, 140U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 190U)); - CurrentHueValueStep3f = value; } break; case 25: @@ -4656,7 +4652,8 @@ class Test_TC_CC_3_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, CurrentHueValueStep3f)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 140U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 190U)); } break; case 27: @@ -5047,8 +5044,8 @@ class Test_TC_CC_3_3Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); } break; case 10: @@ -5060,7 +5057,8 @@ class Test_TC_CC_3_3Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, 5U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); } break; case 12: @@ -5108,7 +5106,8 @@ class Test_TC_CC_3_3Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, 245U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 208U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; case 21: @@ -5475,7 +5474,8 @@ class Test_TC_CC_4_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentSaturation", value, 120U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 102U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 138U)); } break; case 14: @@ -5691,8 +5691,6 @@ class Test_TC_CC_4_2Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - uint8_t CurrentSaturationValueStep4e; - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -5747,7 +5745,7 @@ class Test_TC_CC_4_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 212U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 216U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; @@ -5760,7 +5758,8 @@ class Test_TC_CC_4_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentSaturation", value, 254U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 216U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 12: @@ -5795,8 +5794,8 @@ class Test_TC_CC_4_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 5U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 35U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 17U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 23U)); } break; case 19: @@ -5845,7 +5844,6 @@ class Test_TC_CC_4_2Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); - CurrentSaturationValueStep4e = value; } break; case 28: @@ -5857,7 +5855,8 @@ class Test_TC_CC_4_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentSaturation", value, CurrentSaturationValueStep4e)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); } break; case 30: @@ -6282,7 +6281,8 @@ class Test_TC_CC_4_3Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentSaturation", value, 240U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 204U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 12: @@ -6297,7 +6297,8 @@ class Test_TC_CC_4_3Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentSaturation", value, 254U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 216U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 15: @@ -6332,8 +6333,8 @@ class Test_TC_CC_4_3Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 5U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 15U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 8U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 12U)); } break; case 22: @@ -6345,7 +6346,8 @@ class Test_TC_CC_4_3Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentSaturation", value, 10U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 8U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 12U)); } break; case 24: @@ -6731,7 +6733,8 @@ class Test_TC_CC_4_4Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, 200U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); } break; case 6: @@ -6739,7 +6742,8 @@ class Test_TC_CC_4_4Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentSaturation", value, 50U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 42U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 58U)); } break; case 7: @@ -6799,7 +6803,8 @@ class Test_TC_CC_4_4Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, 160U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 135U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 185U)); } break; case 16: @@ -6807,7 +6812,8 @@ class Test_TC_CC_4_4Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentSaturation", value, 80U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 68U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 92U)); } break; case 17: @@ -7077,7 +7083,8 @@ class Test_TC_CC_5_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentX", value, 32768U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 27853U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 37683U)); } break; case 6: @@ -7085,7 +7092,8 @@ class Test_TC_CC_5_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentY", value, 19660U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 16711U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 22609U)); } break; case 7: @@ -7144,7 +7152,8 @@ class Test_TC_CC_5_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentX", value, 13107U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 11141U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 15073U)); } break; case 16: @@ -7152,7 +7161,8 @@ class Test_TC_CC_5_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentY", value, 13107U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 11141U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 15073U)); } break; case 17: @@ -7181,7 +7191,8 @@ class Test_TC_CC_5_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentX", value, 32768U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 27853U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 37683U)); } break; case 23: @@ -7189,7 +7200,8 @@ class Test_TC_CC_5_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentY", value, 19660U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 16711U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 22609U)); } break; case 24: @@ -7253,7 +7265,8 @@ class Test_TC_CC_5_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentX", value, 26214U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 22282U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 30146U)); } break; case 36: @@ -7261,7 +7274,8 @@ class Test_TC_CC_5_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentY", value, 32768U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 27853U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 37683U)); } break; case 37: @@ -7290,7 +7304,8 @@ class Test_TC_CC_5_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentX", value, 32768U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 27853U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 37683U)); } break; case 43: @@ -7298,7 +7313,8 @@ class Test_TC_CC_5_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentY", value, 19660U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 16711U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 22609U)); } break; case 44: @@ -7316,7 +7332,8 @@ class Test_TC_CC_5_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentX", value, 13107U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 11141U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 15073U)); } break; case 48: @@ -7324,7 +7341,8 @@ class Test_TC_CC_5_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentY", value, 13107U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 11141U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 15073U)); } break; case 49: @@ -7362,7 +7380,8 @@ class Test_TC_CC_5_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentX", value, 26214U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 22282U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 30146U)); } break; case 56: @@ -7370,7 +7389,8 @@ class Test_TC_CC_5_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentY", value, 32768U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 27853U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 37683U)); } break; case 57: @@ -8390,7 +8410,8 @@ class Test_TC_CC_5_3Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentX", value, 13000U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 11050U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 14950U)); } break; case 14: @@ -8398,7 +8419,8 @@ class Test_TC_CC_5_3Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentY", value, 14000U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 11900U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 16100U)); } break; case 15: @@ -8736,7 +8758,8 @@ class Test_TC_CC_6_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorTemperatureMireds", value, 250U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 212U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 288U)); } break; case 17: @@ -8975,7 +8998,6 @@ class Test_TC_CC_6_2Suite : public TestCommand uint16_t ColorTempPhysicalMinMiredsValue; uint16_t ColorTempPhysicalMaxMiredsValue; - uint16_t ColorTemperatureMiredsStep4c; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -9141,7 +9163,6 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - ColorTemperatureMiredsStep4c = value; } break; case 26: @@ -9153,7 +9174,8 @@ class Test_TC_CC_6_2Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorTemperatureMireds", value, ColorTemperatureMiredsStep4c)); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; case 28: @@ -10499,7 +10521,8 @@ class Test_TC_CC_7_3Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 12000U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 10200U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 13800U)); } break; case 14: @@ -10560,7 +10583,8 @@ class Test_TC_CC_7_3Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 6000U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 5100U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 6900U)); } break; case 25: @@ -10908,7 +10932,8 @@ class Test_TC_CC_7_4Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 20000U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 17000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 23000U)); } break; case 6: @@ -10916,7 +10941,8 @@ class Test_TC_CC_7_4Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentSaturation", value, 50U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 42U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 58U)); } break; case 7: @@ -11224,11 +11250,8 @@ class Test_TC_CC_8_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - uint8_t CurrentSaturationValue; uint16_t ColorTempPhysicalMinMireds; uint16_t ColorTempPhysicalMaxMireds; - uint16_t ColorTemperatureMiredsStep4f; - uint16_t EnhancedCurrentHueValue; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -11315,7 +11338,6 @@ class Test_TC_CC_8_1Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); - CurrentSaturationValue = value; } break; case 17: @@ -11327,7 +11349,8 @@ class Test_TC_CC_8_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentSaturation", value, CurrentSaturationValue)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); } break; case 19: @@ -11376,7 +11399,6 @@ class Test_TC_CC_8_1Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMireds)); VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMireds)); - ColorTemperatureMiredsStep4f = value; } break; case 27: @@ -11388,7 +11410,8 @@ class Test_TC_CC_8_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorTemperatureMireds", value, ColorTemperatureMiredsStep4f)); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMireds)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMireds)); } break; case 29: @@ -11415,7 +11438,6 @@ class Test_TC_CC_8_1Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintMinValue("value", value, 21250U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 28750U)); - EnhancedCurrentHueValue = value; } break; case 35: @@ -11427,7 +11449,8 @@ class Test_TC_CC_8_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, EnhancedCurrentHueValue)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 21250U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 28750U)); } break; case 37: @@ -23345,13 +23368,13 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand } case 8: { LogStep(8, "Read the optional command(LaunchContent) in AcceptedCommandList attribute"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.C.C0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 9: { LogStep(9, "Read the optional command(LaunchURL) in AcceptedCommandList attribute"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.C.C0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.C.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } @@ -24386,11 +24409,7 @@ class Test_TC_APPLAUNCHER_3_9Suite : public TestCommand break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value, 0U)); - } + shouldContinue = true; break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); @@ -24431,8 +24450,13 @@ class Test_TC_APPLAUNCHER_3_9Suite : public TestCommand } case 2: { LogStep(2, "Reads the Status attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::Status::Id, - true, chip::NullOptional); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -24823,10 +24847,7 @@ class Test_TC_MEDIAINPUT_3_13Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, - "TH reads the InputList attribute from the DUT to show list of Inputs available and Verify list of available " - "inputs supported by the device is provided, where each entry in the list contains an index(type:uint 8), " - "InputType (InputType Enums), Name (type: Strings), and Description(Type:String)"); + LogStep(1, "TH reads the InputList attribute from the DUT to show list of Inputs available"); VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::InputList::Id, true, chip::NullOptional); @@ -36711,7 +36732,7 @@ class Test_TC_DGTHREAD_1_1Suite : public TestCommand { public: Test_TC_DGTHREAD_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_1_1", 14, credsIssuerConfig) + TestCommand("Test_TC_DGTHREAD_1_1", 56, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -36847,7 +36868,7 @@ class Test_TC_DGTHREAD_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 56UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 14UL)); } break; case 10: @@ -36856,7 +36877,7 @@ class Test_TC_DGTHREAD_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 57UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); } break; case 11: @@ -36865,10 +36886,388 @@ class Test_TC_DGTHREAD_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 58UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); } break; case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); + } + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); + } + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); + } + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); + } + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 21UL)); + } + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 22UL)); + } + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 23UL)); + } + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 24UL)); + } + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 25UL)); + } + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 26UL)); + } + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 27UL)); + } + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 28UL)); + } + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 29UL)); + } + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 30UL)); + } + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 31UL)); + } + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 32UL)); + } + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 33UL)); + } + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 34UL)); + } + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 35UL)); + } + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 36UL)); + } + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 37UL)); + } + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 38UL)); + } + break; + case 34: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 39UL)); + } + break; + case 35: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 40UL)); + } + break; + case 36: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 41UL)); + } + break; + case 37: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 42UL)); + } + break; + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 43UL)); + } + break; + case 39: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 44UL)); + } + break; + case 40: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 45UL)); + } + break; + case 41: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 46UL)); + } + break; + case 42: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 47UL)); + } + break; + case 43: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 48UL)); + } + break; + case 44: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 49UL)); + } + break; + case 45: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 50UL)); + } + break; + case 46: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 51UL)); + } + break; + case 47: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 52UL)); + } + break; + case 48: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 53UL)); + } + break; + case 49: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 54UL)); + } + break; + case 50: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 55UL)); + } + break; + case 51: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 56UL)); + } + break; + case 52: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 57UL)); + } + break; + case 53: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 58UL)); + } + break; + case 54: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -36877,7 +37276,7 @@ class Test_TC_DGTHREAD_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 13: + case 55: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -36959,30 +37358,282 @@ class Test_TC_DGTHREAD_1_1Suite : public TestCommand ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Read the optional attribute(ActiveTimestamp) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0039"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "TH reads optional attribute (DetachedRoleCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Read the optional attribute(PendingTimestamp) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A003A"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "TH reads optional attribute (ChildRoleCount) AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A001f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Read the optional attribute(Delay) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A003B"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "TH reads optional attribute (RouterRoleCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "TH reads AcceptedCommandList from DUT"); + LogStep(12, "TH reads optional attribute (LeaderRoleCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "TH reads GeneratedCommandList from DUT"); + LogStep(13, "TH reads optional attribute (AttachAttemptCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 14: { + LogStep(14, "TH reads optional attribute (PartitionIdChangeCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 15: { + LogStep(15, "TH reads optional attribute (BetterPartitionAttachAttemptCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 16: { + LogStep(16, "TH reads optional attribute (ParentChangeCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 17: { + LogStep(17, "TH reads optional attribute (TxTotalCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 18: { + LogStep(18, "TH reads optional attribute (TxUnicastCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 19: { + LogStep(19, "TH reads optional attribute (TxBroadcastCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 20: { + LogStep(20, "TH reads optional attribute (TxAckRequestedCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 21: { + LogStep(21, "TH reads optional attribute (TxAckedCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 22: { + LogStep(22, "TH reads optional attribute (TxNoAckRequestedCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 23: { + LogStep(23, "TH reads optional attributes (TxDataCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A001c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 24: { + LogStep(24, "TH reads optional attribute (TxDataPollCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A001d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 25: { + LogStep(25, "TH reads optional attribute (TxBeaconCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A001e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 26: { + LogStep(26, "TH reads optional attribute (TxBeaconRequestCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A001f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 27: { + LogStep(27, "TH reads optional attribute (TxOtherCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 28: { + LogStep(28, "TH reads optional attribute (TxRetryCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 29: { + LogStep(29, "TH reads optional attribute (TxDirectMaxRetryExpiryCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 30: { + LogStep(30, "TH reads optional attribute (TxIndirectMaxRetryExpiryCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0023"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 31: { + LogStep(31, "TH reads optional attribute (TxErrCcaCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 32: { + LogStep(32, "TH reads optional attribute (TxErrAbortCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 33: { + LogStep(33, "TH reads optional attribute (TxErrBusyChannelCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0026"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 34: { + LogStep(34, "TH reads optional attribute (RxTotalCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0027"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 35: { + LogStep(35, "TH reads optional attribute (RxUnicastCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 36: { + LogStep(36, "TH reads optional attribute (RxBroadcastCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 37: { + LogStep(37, "TH reads optional attribute (RxDataCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 38: { + LogStep(38, "TH reads optional attribute (RxDataPollCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A002b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 39: { + LogStep(39, "TH reads optional attribute (RxBeaconCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A002c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 40: { + LogStep(40, "TH reads optional attribute (RxBeaconRequestCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A002d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 41: { + LogStep(41, "TH reads optional attribute (RxOtherCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A002e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 42: { + LogStep(42, "TH reads optional attribute (RxAddressFilteredCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A002f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 43: { + LogStep(43, "TH reads optional attribute (RxDestAddrFilteredCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 44: { + LogStep(44, "TH reads optional attribute (RxDuplicatedCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 45: { + LogStep(45, "TH reads optional attribute (RxErrNoFrameCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 46: { + LogStep(46, "TH reads optional attribute (RxErrUnknownNeighborCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 47: { + LogStep(47, "TH reads optional attribute (RxErrInvalidScrAddrCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0034"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 48: { + LogStep(48, "TH reads optional attribute (RxErrSecCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0035"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 49: { + LogStep(49, "TH reads optional attribute (RxErrFcsCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0036"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 50: { + LogStep(50, "TH reads optional attribute (RxErrOtherCount) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0037"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 51: { + LogStep(51, "Read the optional attribute (ActiveTimestamp) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0039"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 52: { + LogStep(52, "Read the optional attribute (PendingTimestamp) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A003A"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 53: { + LogStep(53, "Read the optional attribute (Delay) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A003B"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 54: { + LogStep(54, "TH reads AcceptedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 55: { + LogStep(55, "TH reads GeneratedCommandList from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -37857,7 +38508,7 @@ class Test_TC_DGTHREAD_2_2Suite : public TestCommand } case 10: { LogStep(10, "TH reads TxBeaconRequestCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A002f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A001f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id, true, chip::NullOptional); } @@ -62115,476 +62766,111 @@ class Test_TC_DGSW_1_1Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH reads the ClusterRevision from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads the FeatureMap from DUT"); - VerifyOrDo(!ShouldSkip(" !DGSW.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Given DGSW.S.F00(Watermarks) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("DGSW.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "TH reads AttributeList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "TH reads optional attribute(ThreadMetrics) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGSW.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "TH reads optional attribute(CurrentHeapFree) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGSW.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "TH reads optional attribute(CurrentHeapUsed) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGSW.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "TH reads Feature dependent attribute(CurrentHeapHighWatermark) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGSW.S.F00 || DGSW.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "TH reads AcceptedCommandList from DUT"); - VerifyOrDo(!ShouldSkip("DGSW.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "TH reads AcceptedCommandList from DUT"); - VerifyOrDo(!ShouldSkip(" !DGSW.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "TH reads GeneratedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGSW_2_1Suite : public TestCommand -{ -public: - Test_TC_DGSW_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGSW_2_1", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGSW_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Reads a list of ThreadMetrics struct non-global attribute from DUT."); - VerifyOrDo(!ShouldSkip("DGSW.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::ThreadMetrics::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Reads CurrentHeapFree non-global attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGSW.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::CurrentHeapFree::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Reads CurrentHeapUsed non-global attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGSW.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Reads CurrentHeapHighWaterMark non-global attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGSW.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGSW_2_2Suite : public TestCommand -{ -public: - Test_TC_DGSW_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGSW_2_2", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGSW_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, - "Reads a list of SoftwareFault struct from DUT and data type in each field of the struct must match the value " - "listed in spec"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGSW.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGSW_2_3Suite : public TestCommand -{ -public: - Test_TC_DGSW_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGSW_2_3", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGSW_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList - value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint64_t value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint64_t value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; default: @@ -62610,32 +62896,67 @@ class Test_TC_DGSW_2_3Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Sends ResetWatermarks to DUT"); - VerifyOrDo(!ShouldSkip("DGSW.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Commands::ResetWatermarks::Id, value, chip::NullOptional - - ); + LogStep(1, "TH reads the ClusterRevision from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, + SoftwareDiagnostics::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Reads a list of ThreadMetrics struct attribute from DUT."); - VerifyOrDo(!ShouldSkip("DGSW.S.A0000 && DGSW.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "TH reads the FeatureMap from DUT"); + VerifyOrDo(!ShouldSkip(" !DGSW.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::ThreadMetrics::Id, true, chip::NullOptional); + SoftwareDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Reads CurrentHeapUsed attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGSW.S.A0002 && DGSW.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Given DGSW.S.F00(Watermarks) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("DGSW.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id, true, chip::NullOptional); + SoftwareDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Reads CurrentHeapHighWaterMark attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGSW.S.A0003 && DGSW.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "TH reads AttributeList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, + SoftwareDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads optional attribute(ThreadMetrics) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGSW.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, + SoftwareDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "TH reads optional attribute(CurrentHeapFree) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGSW.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, + SoftwareDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "TH reads optional attribute(CurrentHeapUsed) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGSW.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id, true, chip::NullOptional); + SoftwareDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "TH reads Feature dependent attribute(CurrentHeapHighWatermark) in AttributeList"); + VerifyOrDo(!ShouldSkip("DGSW.S.F00 || DGSW.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, + SoftwareDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 9: { + LogStep(9, "TH reads AcceptedCommandList from DUT"); + VerifyOrDo(!ShouldSkip("DGSW.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, + SoftwareDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 10: { + LogStep(10, "TH reads AcceptedCommandList from DUT"); + VerifyOrDo(!ShouldSkip(" !DGSW.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, + SoftwareDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 11: { + LogStep(11, "TH reads GeneratedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, + SoftwareDiagnostics::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } } return CHIP_NO_ERROR; @@ -69236,7 +69557,7 @@ class DL_SchedulesSuite : public TestCommand class Test_TC_DRLK_1_1Suite : public TestCommand { public: - Test_TC_DRLK_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_1_1", 42, credsIssuerConfig) + Test_TC_DRLK_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_1_1", 43, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -69400,6 +69721,15 @@ class Test_TC_DRLK_1_1Suite : public TestCommand } break; case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } + break; + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69410,7 +69740,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 28UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69421,7 +69751,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 24UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69432,7 +69762,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 26UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69441,7 +69771,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69450,7 +69780,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 21UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69459,7 +69789,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 22UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69469,7 +69799,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 49UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69478,7 +69808,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 51UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69487,7 +69817,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 33UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69496,7 +69826,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 34UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69505,7 +69835,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 35UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69514,7 +69844,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 36UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69523,7 +69853,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 39UL)); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69532,7 +69862,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 40UL)); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69541,7 +69871,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 41UL)); } break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69550,7 +69880,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 42UL)); } break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69559,7 +69889,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 43UL)); } break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69568,7 +69898,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 44UL)); } break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69578,7 +69908,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69589,7 +69919,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 13UL)); } break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69600,7 +69930,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); } break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69611,7 +69941,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); } break; - case 36: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69625,7 +69955,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 38UL)); } break; - case 37: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69634,7 +69964,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 38: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69643,7 +69973,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); } break; - case 39: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69652,7 +69982,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); } break; - case 40: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69661,7 +69991,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); } break; - case 41: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -69669,6 +69999,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 28UL)); VerifyOrReturn(CheckConstraintContains("value", value, 35UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 37UL)); } break; default: @@ -69772,168 +70103,174 @@ class Test_TC_DRLK_1_1Suite : public TestCommand chip::NullOptional); } case 14: { - LogStep(14, "TH reads Feature dependent(DRLK.S.F08) attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "TH reads Feature dependent(DRLK.S.F05) attributes in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "TH reads Feature dependent(DRLK.S.F00) attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(15, "TH reads Feature dependent(DRLK.S.F08) attributes in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "TH reads Feature dependent(DRLK.S.F01) attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "TH reads Feature dependent(DRLK.S.F00) attributes in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep(17, "TH reads Feature dependent(DRLK.S.F04) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "TH reads Feature dependent(DRLK.S.F01) attributes in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, "TH reads Feature dependent(DRLK.S.F0a) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(18, "TH reads Feature dependent(DRLK.S.F04) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { - LogStep(19, "TH reads Feature dependent(DRLK.S.F0b) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(19, "TH reads Feature dependent(DRLK.S.F0a) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { - LogStep(20, "TH reads Feature dependent(DRLK.S.F00 or DRLK.S.F01) attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F00 || DRLK.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(20, "TH reads Feature dependent(DRLK.S.F0b) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F0b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { - LogStep(21, "TH reads Feature dependent(DRLK.S.F07 or DRLK.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F07 || DRLK.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(21, "TH reads Feature dependent(DRLK.S.F00 or DRLK.S.F01) attributes in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F00 || DRLK.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { - LogStep(22, "TH reads optional attribute(Language) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(22, "TH reads Feature dependent(DRLK.S.F07 or DRLK.S.F00) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F07 || DRLK.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { - LogStep(23, "TH reads optional attribute(LEDSettings) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(23, "TH reads optional attribute(Language) in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "TH reads optional attribute(AutoRelockTime) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0023"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, "TH reads optional attribute(LEDSettings) in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "TH reads optional attribute(SoundVolume) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "TH reads optional attribute(AutoRelockTime) in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.A0023"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "TH reads optional attribute(DefaultConfigurationRegister) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0027"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "TH reads optional attribute(SoundVolume) in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "TH reads optional attribute(EnableLocalProgramming) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "TH reads optional attribute(DefaultConfigurationRegister) in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.A0027"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 28: { - LogStep(28, "TH reads optional attribute(EnableOneTouchLocking) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(28, "TH reads optional attribute(EnableLocalProgramming) in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 29: { - LogStep(29, "TH reads optional attribute(EnableInsideStatusLED) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(29, "TH reads optional attribute(EnableOneTouchLocking) in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 30: { - LogStep(30, "TH reads optional attribute(EnablePrivacyModeButton) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A002b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(30, "TH reads optional attribute(EnableInsideStatusLED) in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 31: { - LogStep(31, "TH reads optional attribute(LocalProgrammingFeatures) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A002c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(31, "TH reads optional attribute(EnablePrivacyModeButton) in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.A002b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 32: { - LogStep(32, "TH reads AcceptedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, + LogStep(32, "TH reads optional attribute(LocalProgrammingFeatures) in AttributeList"); + VerifyOrDo(!ShouldSkip("DRLK.S.A002c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, chip::NullOptional); } case 33: { - LogStep(33, "TH reads Feature dependent commands(DRLK.S.F04) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(33, "TH reads AcceptedCommandList from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 34: { - LogStep(34, "TH reads Feature dependent commands(DRLK.S.F0a) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(34, "TH reads Feature dependent commands(DRLK.S.F04) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 35: { - LogStep(35, "TH reads Feature dependent commands(DRLK.S.F0b) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(35, "TH reads Feature dependent commands(DRLK.S.F0a) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 36: { - LogStep(36, "TH reads Feature dependent commands(DRLK.S.F08) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(36, "TH reads Feature dependent commands(DRLK.S.F0b) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F0b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 37: { - LogStep(37, "TH reads optional commands(DRLK.S.C03.Rsp) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("DRLK.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(37, "TH reads Feature dependent commands(DRLK.S.F08) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("DRLK.S.F08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 38: { - LogStep(38, "TH reads Feature dependent command(DRLK.S.F04) in GeneratedCommandList"); + LogStep(38, "TH reads optional commands(DRLK.S.C03.Rsp) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("DRLK.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, + chip::NullOptional); + } + case 39: { + LogStep(39, "TH reads Feature dependent command(DRLK.S.F04) in GeneratedCommandList"); VerifyOrDo(!ShouldSkip("DRLK.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 39: { - LogStep(39, "TH reads Feature dependent command(DRLK.S.F0a) in GeneratedCommandList"); + case 40: { + LogStep(40, "TH reads Feature dependent command(DRLK.S.F0a) in GeneratedCommandList"); VerifyOrDo(!ShouldSkip("DRLK.S.F0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 40: { - LogStep(40, "TH reads Feature dependent command(DRLK.S.F0b) in GeneratedCommandList"); + case 41: { + LogStep(41, "TH reads Feature dependent command(DRLK.S.F0b) in GeneratedCommandList"); VerifyOrDo(!ShouldSkip("DRLK.S.F0b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 41: { - LogStep(41, "TH reads Feature dependent command(DRLK.S.F08) in GeneratedCommandList"); + case 42: { + LogStep(42, "TH reads Feature dependent command(DRLK.S.F08) in GeneratedCommandList"); VerifyOrDo(!ShouldSkip("DRLK.S.F08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -71776,8 +72113,8 @@ class Test_TC_DRLK_2_7Suite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 2U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 21U)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 0U)); + VerifyOrReturn(CheckValue("userIndex", value.userIndex, 15U)); VerifyOrReturn(CheckValue("status", value.status, 133U)); VerifyOrReturn(CheckConstraintHasValue("value.localStartTime", value.localStartTime, false)); VerifyOrReturn(CheckConstraintHasValue("value.localEndTime", value.localEndTime, false)); @@ -71955,8 +72292,8 @@ class Test_TC_DRLK_2_7Suite : public TestCommand return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 2U; - value.userIndex = 21U; + value.yearDayIndex = 0U; + value.userIndex = 15U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -72090,7 +72427,7 @@ class Test_TC_DRLK_2_7Suite : public TestCommand class Test_TC_DRLK_2_9Suite : public TestCommand { public: - Test_TC_DRLK_2_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_9", 24, credsIssuerConfig) + Test_TC_DRLK_2_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_9", 21, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72216,14 +72553,7 @@ class Test_TC_DRLK_2_9Suite : public TestCommand break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 2U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } + shouldContinue = true; break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -72231,38 +72561,12 @@ class Test_TC_DRLK_2_9Suite : public TestCommand break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 2U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } + shouldContinue = true; break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 2U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 4U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -72274,10 +72578,10 @@ class Test_TC_DRLK_2_9Suite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 16: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 17: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; @@ -72288,10 +72592,10 @@ class Test_TC_DRLK_2_9Suite : public TestCommand VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); } break; - case 18: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -72303,7 +72607,7 @@ class Test_TC_DRLK_2_9Suite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 20: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -72315,13 +72619,13 @@ class Test_TC_DRLK_2_9Suite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 21: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; - case 22: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 23: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; default: @@ -72462,30 +72766,9 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } case 8: { - LogStep(8, "TH sends Set Credential Command to DUT"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 1U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 9: { - LogStep(9, + LogStep(8, "TH sends Set Credential Command to DUT and Verify that the DUT sends Set Credential Response command with " - "response as OCCUPIED if the CredentialIndex is repeated"); + "status as DUPLICATE or OCCUPIED"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -72495,29 +72778,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 10: { - LogStep(10, "TH sends Set Credential Command to DUT"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 1U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 11: { - LogStep(11, + case 9: { + LogStep(9, "TH sends Set Credential Command to DUT and Verify that the DUT sends Set Credential Response command with " "response as OCCUPIED if the CredentialIndex is repeated"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), @@ -72529,29 +72791,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 12: { - LogStep(12, "TH sends Set Credential Command to DUT"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(2); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 3U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 13: { - LogStep(13, + case 10: { + LogStep(10, "TH sends Set Credential Command to DUT and Verify that the DUT sends Set Credential Response command with " "response as OCCUPIED if the CredentialIndex is repeated"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), @@ -72563,8 +72804,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 14: { - LogStep(14, "TH sends Clear Credential Command to DUT"); + case 11: { + LogStep(11, "TH sends Clear Credential Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C26.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; @@ -72578,8 +72819,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 15: { - LogStep(15, "TH sends Get Credential Status Command to DUT"); + case 12: { + LogStep(12, "TH sends Get Credential Status Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -72593,8 +72834,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 16: { - LogStep(16, "TH sends Set User Command to DUT"); + case 13: { + LogStep(13, "TH sends Set User Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C1a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetUser::Type value; @@ -72615,8 +72856,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 17: { - LogStep(17, "TH sends Set Credential Command to DUT"); + case 14: { + LogStep(14, "TH sends Set Credential Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -72636,8 +72877,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 18: { - LogStep(18, "TH sends Clear Credential Command to DUT"); + case 15: { + LogStep(15, "TH sends Clear Credential Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C26.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; @@ -72651,8 +72892,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 19: { - LogStep(19, "TH sends Get Credential Status Command"); + case 16: { + LogStep(16, "TH sends Get Credential Status Command"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -72666,8 +72907,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 20: { - LogStep(20, "TH sends Get Credential Status Command"); + case 17: { + LogStep(17, "TH sends Get Credential Status Command"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -72681,8 +72922,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 21: { - LogStep(21, "TH sends Clear Credential Command to DUT"); + case 18: { + LogStep(18, "TH sends Clear Credential Command to DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C26.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; @@ -72696,8 +72937,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 22: { - LogStep(22, "Cleanup the first created user"); + case 19: { + LogStep(19, "Cleanup the first created user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; value.userIndex = 1U; @@ -72706,8 +72947,8 @@ class Test_TC_DRLK_2_9Suite : public TestCommand ); } - case 23: { - LogStep(23, "Cleanup the second created user"); + case 20: { + LogStep(20, "Cleanup the second created user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; value.userIndex = 2U; @@ -89478,10 +89719,178 @@ class Test_TC_SU_2_3Suite : public TestCommand } }; -class Test_TC_SU_2_4Suite : public TestCommand +class Test_TC_SU_2_4Suite : public TestCommand +{ +public: + Test_TC_SU_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_4", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_SU_2_4Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_SU_2_5Suite : public TestCommand +{ +public: + Test_TC_SU_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_5", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_SU_2_5Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_SU_2_6Suite : public TestCommand +{ +public: + Test_TC_SU_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_6", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_SU_2_6Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_SU_2_7Suite : public TestCommand { public: - Test_TC_SU_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_4", 0, credsIssuerConfig) + Test_TC_SU_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_7", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -89489,7 +89898,7 @@ class Test_TC_SU_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_4Suite() {} + ~Test_TC_SU_2_7Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -89534,10 +89943,10 @@ class Test_TC_SU_2_4Suite : public TestCommand } }; -class Test_TC_SU_2_5Suite : public TestCommand +class Test_TC_SU_2_8Suite : public TestCommand { public: - Test_TC_SU_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_5", 0, credsIssuerConfig) + Test_TC_SU_2_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_8", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -89545,7 +89954,7 @@ class Test_TC_SU_2_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_5Suite() {} + ~Test_TC_SU_2_8Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -89590,10 +89999,10 @@ class Test_TC_SU_2_5Suite : public TestCommand } }; -class Test_TC_SU_2_6Suite : public TestCommand +class Test_TC_SU_3_1Suite : public TestCommand { public: - Test_TC_SU_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_6", 0, credsIssuerConfig) + Test_TC_SU_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -89601,7 +90010,7 @@ class Test_TC_SU_2_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_6Suite() {} + ~Test_TC_SU_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -89646,10 +90055,10 @@ class Test_TC_SU_2_6Suite : public TestCommand } }; -class Test_TC_SU_2_7Suite : public TestCommand +class Test_TC_SU_3_2Suite : public TestCommand { public: - Test_TC_SU_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_7", 0, credsIssuerConfig) + Test_TC_SU_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -89657,7 +90066,7 @@ class Test_TC_SU_2_7Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_7Suite() {} + ~Test_TC_SU_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -89702,10 +90111,10 @@ class Test_TC_SU_2_7Suite : public TestCommand } }; -class Test_TC_SU_2_8Suite : public TestCommand +class Test_TC_SU_3_3Suite : public TestCommand { public: - Test_TC_SU_2_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_8", 0, credsIssuerConfig) + Test_TC_SU_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -89713,7 +90122,7 @@ class Test_TC_SU_2_8Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_8Suite() {} + ~Test_TC_SU_3_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -89758,10 +90167,10 @@ class Test_TC_SU_2_8Suite : public TestCommand } }; -class Test_TC_SU_3_1Suite : public TestCommand +class Test_TC_SU_3_4Suite : public TestCommand { public: - Test_TC_SU_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_1", 0, credsIssuerConfig) + Test_TC_SU_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -89769,7 +90178,7 @@ class Test_TC_SU_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_3_1Suite() {} + ~Test_TC_SU_3_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -89814,10 +90223,10 @@ class Test_TC_SU_3_1Suite : public TestCommand } }; -class Test_TC_SU_3_2Suite : public TestCommand +class Test_TC_SU_4_1Suite : public TestCommand { public: - Test_TC_SU_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_2", 0, credsIssuerConfig) + Test_TC_SU_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_4_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -89825,7 +90234,7 @@ class Test_TC_SU_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_3_2Suite() {} + ~Test_TC_SU_4_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -89870,10 +90279,10 @@ class Test_TC_SU_3_2Suite : public TestCommand } }; -class Test_TC_SU_3_3Suite : public TestCommand +class Test_TC_SU_4_2Suite : public TestCommand { public: - Test_TC_SU_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_3", 0, credsIssuerConfig) + Test_TC_SU_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_4_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -89881,7 +90290,7 @@ class Test_TC_SU_3_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_3_3Suite() {} + ~Test_TC_SU_4_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -89926,10 +90335,10 @@ class Test_TC_SU_3_3Suite : public TestCommand } }; -class Test_TC_SU_3_4Suite : public TestCommand +class Test_TC_PSCFG_2_2Suite : public TestCommand { public: - Test_TC_SU_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_4", 0, credsIssuerConfig) + Test_TC_PSCFG_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PSCFG_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -89937,7 +90346,7 @@ class Test_TC_SU_3_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_3_4Suite() {} + ~Test_TC_PSCFG_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -89982,10 +90391,10 @@ class Test_TC_SU_3_4Suite : public TestCommand } }; -class Test_TC_SU_4_1Suite : public TestCommand +class Test_TC_PSCFG_3_1Suite : public TestCommand { public: - Test_TC_SU_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_4_1", 0, credsIssuerConfig) + Test_TC_PSCFG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PSCFG_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -89993,7 +90402,7 @@ class Test_TC_SU_4_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_4_1Suite() {} + ~Test_TC_PSCFG_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -90038,10 +90447,10 @@ class Test_TC_SU_4_1Suite : public TestCommand } }; -class Test_TC_SU_4_2Suite : public TestCommand +class Test_TC_SC_1_1Suite : public TestCommand { public: - Test_TC_SU_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_4_2", 0, credsIssuerConfig) + Test_TC_SC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -90049,7 +90458,7 @@ class Test_TC_SU_4_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_4_2Suite() {} + ~Test_TC_SC_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -90094,10 +90503,10 @@ class Test_TC_SU_4_2Suite : public TestCommand } }; -class Test_TC_PSCFG_2_2Suite : public TestCommand +class Test_TC_SC_1_2Suite : public TestCommand { public: - Test_TC_PSCFG_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PSCFG_2_2", 0, credsIssuerConfig) + Test_TC_SC_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_1_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -90105,7 +90514,7 @@ class Test_TC_PSCFG_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_PSCFG_2_2Suite() {} + ~Test_TC_SC_1_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -90150,10 +90559,10 @@ class Test_TC_PSCFG_2_2Suite : public TestCommand } }; -class Test_TC_PSCFG_3_1Suite : public TestCommand +class Test_TC_SC_1_3Suite : public TestCommand { public: - Test_TC_PSCFG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PSCFG_3_1", 0, credsIssuerConfig) + Test_TC_SC_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_1_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -90161,7 +90570,7 @@ class Test_TC_PSCFG_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_PSCFG_3_1Suite() {} + ~Test_TC_SC_1_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -90206,10 +90615,10 @@ class Test_TC_PSCFG_3_1Suite : public TestCommand } }; -class Test_TC_SC_1_1Suite : public TestCommand +class Test_TC_SC_1_4Suite : public TestCommand { public: - Test_TC_SC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_1_1", 0, credsIssuerConfig) + Test_TC_SC_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_1_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -90217,7 +90626,7 @@ class Test_TC_SC_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_1_1Suite() {} + ~Test_TC_SC_1_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -90262,10 +90671,10 @@ class Test_TC_SC_1_1Suite : public TestCommand } }; -class Test_TC_SC_1_2Suite : public TestCommand +class Test_TC_SC_2_1Suite : public TestCommand { public: - Test_TC_SC_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_1_2", 0, credsIssuerConfig) + Test_TC_SC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -90273,7 +90682,7 @@ class Test_TC_SC_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_1_2Suite() {} + ~Test_TC_SC_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -90318,10 +90727,10 @@ class Test_TC_SC_1_2Suite : public TestCommand } }; -class Test_TC_SC_1_3Suite : public TestCommand +class Test_TC_SC_2_2Suite : public TestCommand { public: - Test_TC_SC_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_1_3", 0, credsIssuerConfig) + Test_TC_SC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -90329,7 +90738,7 @@ class Test_TC_SC_1_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_1_3Suite() {} + ~Test_TC_SC_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -90374,10 +90783,10 @@ class Test_TC_SC_1_3Suite : public TestCommand } }; -class Test_TC_SC_1_4Suite : public TestCommand +class Test_TC_SC_2_3Suite : public TestCommand { public: - Test_TC_SC_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_1_4", 0, credsIssuerConfig) + Test_TC_SC_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -90385,7 +90794,7 @@ class Test_TC_SC_1_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_1_4Suite() {} + ~Test_TC_SC_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -90430,10 +90839,10 @@ class Test_TC_SC_1_4Suite : public TestCommand } }; -class Test_TC_SC_2_1Suite : public TestCommand +class Test_TC_SC_2_4Suite : public TestCommand { public: - Test_TC_SC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_2_1", 0, credsIssuerConfig) + Test_TC_SC_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_2_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -90441,7 +90850,7 @@ class Test_TC_SC_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_2_1Suite() {} + ~Test_TC_SC_2_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -90486,10 +90895,10 @@ class Test_TC_SC_2_1Suite : public TestCommand } }; -class Test_TC_SC_2_2Suite : public TestCommand +class Test_TC_SC_3_1Suite : public TestCommand { public: - Test_TC_SC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_2_2", 0, credsIssuerConfig) + Test_TC_SC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -90497,7 +90906,7 @@ class Test_TC_SC_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_2_2Suite() {} + ~Test_TC_SC_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -90542,10 +90951,10 @@ class Test_TC_SC_2_2Suite : public TestCommand } }; -class Test_TC_SC_2_3Suite : public TestCommand +class Test_TC_SC_3_2Suite : public TestCommand { public: - Test_TC_SC_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_2_3", 0, credsIssuerConfig) + Test_TC_SC_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -90553,7 +90962,7 @@ class Test_TC_SC_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_2_3Suite() {} + ~Test_TC_SC_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -90598,10 +91007,10 @@ class Test_TC_SC_2_3Suite : public TestCommand } }; -class Test_TC_SC_2_4Suite : public TestCommand +class Test_TC_SC_3_3Suite : public TestCommand { public: - Test_TC_SC_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_2_4", 0, credsIssuerConfig) + Test_TC_SC_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_3_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -90609,7 +91018,7 @@ class Test_TC_SC_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_2_4Suite() {} + ~Test_TC_SC_3_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -90654,10 +91063,10 @@ class Test_TC_SC_2_4Suite : public TestCommand } }; -class Test_TC_SC_3_1Suite : public TestCommand +class Test_TC_SC_3_4Suite : public TestCommand { public: - Test_TC_SC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_3_1", 0, credsIssuerConfig) + Test_TC_SC_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_3_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -90665,7 +91074,7 @@ class Test_TC_SC_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_3_1Suite() {} + ~Test_TC_SC_3_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -90710,10 +91119,10 @@ class Test_TC_SC_3_1Suite : public TestCommand } }; -class Test_TC_SC_3_2Suite : public TestCommand +class Test_TC_SC_3_6Suite : public TestCommand { public: - Test_TC_SC_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_3_2", 0, credsIssuerConfig) + Test_TC_SC_3_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_3_6", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -90721,7 +91130,7 @@ class Test_TC_SC_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_3_2Suite() {} + ~Test_TC_SC_3_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -90766,10 +91175,10 @@ class Test_TC_SC_3_2Suite : public TestCommand } }; -class Test_TC_SC_3_3Suite : public TestCommand +class Test_TC_SC_4_1Suite : public TestCommand { public: - Test_TC_SC_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_3_3", 0, credsIssuerConfig) + Test_TC_SC_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -90777,7 +91186,7 @@ class Test_TC_SC_3_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_3_3Suite() {} + ~Test_TC_SC_4_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -90822,10 +91231,10 @@ class Test_TC_SC_3_3Suite : public TestCommand } }; -class Test_TC_SC_3_4Suite : public TestCommand +class Test_TC_SC_4_2Suite : public TestCommand { public: - Test_TC_SC_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_3_4", 0, credsIssuerConfig) + Test_TC_SC_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -90833,7 +91242,7 @@ class Test_TC_SC_3_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_3_4Suite() {} + ~Test_TC_SC_4_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -90878,10 +91287,10 @@ class Test_TC_SC_3_4Suite : public TestCommand } }; -class Test_TC_SC_3_6Suite : public TestCommand +class Test_TC_SC_4_3Suite : public TestCommand { public: - Test_TC_SC_3_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_3_6", 0, credsIssuerConfig) + Test_TC_SC_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -90889,7 +91298,7 @@ class Test_TC_SC_3_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_3_6Suite() {} + ~Test_TC_SC_4_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -90934,10 +91343,10 @@ class Test_TC_SC_3_6Suite : public TestCommand } }; -class Test_TC_SC_4_1Suite : public TestCommand +class Test_TC_SC_4_4Suite : public TestCommand { public: - Test_TC_SC_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_1", 0, credsIssuerConfig) + Test_TC_SC_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -90945,7 +91354,7 @@ class Test_TC_SC_4_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_1Suite() {} + ~Test_TC_SC_4_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -90990,10 +91399,10 @@ class Test_TC_SC_4_1Suite : public TestCommand } }; -class Test_TC_SC_4_2Suite : public TestCommand +class Test_TC_SC_4_5Suite : public TestCommand { public: - Test_TC_SC_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_2", 0, credsIssuerConfig) + Test_TC_SC_4_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -91001,7 +91410,7 @@ class Test_TC_SC_4_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_2Suite() {} + ~Test_TC_SC_4_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -91046,10 +91455,10 @@ class Test_TC_SC_4_2Suite : public TestCommand } }; -class Test_TC_SC_4_3Suite : public TestCommand +class Test_TC_SC_4_6Suite : public TestCommand { public: - Test_TC_SC_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_3", 0, credsIssuerConfig) + Test_TC_SC_4_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_6", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -91057,7 +91466,7 @@ class Test_TC_SC_4_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_3Suite() {} + ~Test_TC_SC_4_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -91102,10 +91511,10 @@ class Test_TC_SC_4_3Suite : public TestCommand } }; -class Test_TC_SC_4_4Suite : public TestCommand +class Test_TC_SC_4_7Suite : public TestCommand { public: - Test_TC_SC_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_4", 0, credsIssuerConfig) + Test_TC_SC_4_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_7", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -91113,7 +91522,7 @@ class Test_TC_SC_4_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_4Suite() {} + ~Test_TC_SC_4_7Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -91158,10 +91567,10 @@ class Test_TC_SC_4_4Suite : public TestCommand } }; -class Test_TC_SC_4_5Suite : public TestCommand +class Test_TC_SC_4_8Suite : public TestCommand { public: - Test_TC_SC_4_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_5", 0, credsIssuerConfig) + Test_TC_SC_4_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_8", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -91169,7 +91578,7 @@ class Test_TC_SC_4_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_5Suite() {} + ~Test_TC_SC_4_8Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -91214,10 +91623,10 @@ class Test_TC_SC_4_5Suite : public TestCommand } }; -class Test_TC_SC_4_6Suite : public TestCommand +class Test_TC_SC_4_9Suite : public TestCommand { public: - Test_TC_SC_4_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_6", 0, credsIssuerConfig) + Test_TC_SC_4_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_9", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -91225,7 +91634,7 @@ class Test_TC_SC_4_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_6Suite() {} + ~Test_TC_SC_4_9Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -91270,10 +91679,10 @@ class Test_TC_SC_4_6Suite : public TestCommand } }; -class Test_TC_SC_4_7Suite : public TestCommand +class Test_TC_SC_4_10Suite : public TestCommand { public: - Test_TC_SC_4_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_7", 0, credsIssuerConfig) + Test_TC_SC_4_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_10", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -91281,7 +91690,7 @@ class Test_TC_SC_4_7Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_7Suite() {} + ~Test_TC_SC_4_10Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -91326,10 +91735,10 @@ class Test_TC_SC_4_7Suite : public TestCommand } }; -class Test_TC_SC_4_8Suite : public TestCommand +class Test_TC_SC_5_1Suite : public TestCommand { public: - Test_TC_SC_4_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_8", 0, credsIssuerConfig) + Test_TC_SC_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_5_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -91337,7 +91746,7 @@ class Test_TC_SC_4_8Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_8Suite() {} + ~Test_TC_SC_5_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -91382,10 +91791,10 @@ class Test_TC_SC_4_8Suite : public TestCommand } }; -class Test_TC_SC_4_9Suite : public TestCommand +class Test_TC_SC_5_2Suite : public TestCommand { public: - Test_TC_SC_4_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_9", 0, credsIssuerConfig) + Test_TC_SC_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_5_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -91393,7 +91802,7 @@ class Test_TC_SC_4_9Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_9Suite() {} + ~Test_TC_SC_5_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -91438,10 +91847,10 @@ class Test_TC_SC_4_9Suite : public TestCommand } }; -class Test_TC_SC_4_10Suite : public TestCommand +class Test_TC_SC_5_3Suite : public TestCommand { public: - Test_TC_SC_4_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_10", 0, credsIssuerConfig) + Test_TC_SC_5_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_5_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -91449,7 +91858,7 @@ class Test_TC_SC_4_10Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_10Suite() {} + ~Test_TC_SC_5_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -91494,10 +91903,10 @@ class Test_TC_SC_4_10Suite : public TestCommand } }; -class Test_TC_SC_5_1Suite : public TestCommand +class Test_TC_SC_6_1Suite : public TestCommand { public: - Test_TC_SC_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_5_1", 0, credsIssuerConfig) + Test_TC_SC_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_6_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -91505,7 +91914,7 @@ class Test_TC_SC_5_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_5_1Suite() {} + ~Test_TC_SC_6_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -91550,10 +91959,10 @@ class Test_TC_SC_5_1Suite : public TestCommand } }; -class Test_TC_SC_5_2Suite : public TestCommand +class Test_TC_DGSW_2_1Suite : public TestCommand { public: - Test_TC_SC_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_5_2", 0, credsIssuerConfig) + Test_TC_DGSW_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGSW_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -91561,7 +91970,7 @@ class Test_TC_SC_5_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_5_2Suite() {} + ~Test_TC_DGSW_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -91606,10 +92015,10 @@ class Test_TC_SC_5_2Suite : public TestCommand } }; -class Test_TC_SC_5_3Suite : public TestCommand +class Test_TC_DGSW_2_2Suite : public TestCommand { public: - Test_TC_SC_5_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_5_3", 0, credsIssuerConfig) + Test_TC_DGSW_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGSW_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -91617,7 +92026,7 @@ class Test_TC_SC_5_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_5_3Suite() {} + ~Test_TC_DGSW_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -91662,10 +92071,10 @@ class Test_TC_SC_5_3Suite : public TestCommand } }; -class Test_TC_SC_6_1Suite : public TestCommand +class Test_TC_DGSW_2_3Suite : public TestCommand { public: - Test_TC_SC_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_6_1", 0, credsIssuerConfig) + Test_TC_DGSW_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGSW_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -91673,7 +92082,7 @@ class Test_TC_SC_6_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_6_1Suite() {} + ~Test_TC_DGSW_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -93378,7 +93787,8 @@ class Test_TC_CC_3_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, 120U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 102U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 138U)); } break; case 14: @@ -93434,7 +93844,8 @@ class Test_TC_CC_3_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, 135U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 115U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 155U)); } break; case 25: @@ -93495,7 +93906,8 @@ class Test_TC_CC_3_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, 120U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 102U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 138U)); } break; case 36: @@ -93543,8 +93955,8 @@ class Test_TC_CC_3_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 48U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 72U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 51U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 69U)); } break; case 45: @@ -93556,7 +93968,8 @@ class Test_TC_CC_3_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, 60U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 51U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 69U)); } break; case 47: @@ -94135,7 +94548,8 @@ class Test_TC_CC_7_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 12000U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 10200U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 13800U)); } break; case 14: @@ -94196,7 +94610,8 @@ class Test_TC_CC_7_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 54000U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 50700U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 62100U)); } break; case 25: @@ -94257,7 +94672,8 @@ class Test_TC_CC_7_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 12000U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 10200U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 13800U)); } break; case 36: @@ -94318,7 +94734,8 @@ class Test_TC_CC_7_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 6000U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 5100U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 6900U)); } break; case 47: @@ -103040,9 +103457,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -103280,6 +103694,9 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), 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 da6945329b3e00..6821b5add92477 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -217,9 +217,6 @@ class TestList : public Command { printf("TestCommissioningWindow\n"); printf("TestMultiAdmin\n"); printf("Test_TC_DGSW_1_1\n"); - printf("Test_TC_DGSW_2_1\n"); - printf("Test_TC_DGSW_2_2\n"); - printf("Test_TC_DGSW_2_3\n"); printf("TestSubscribe_OnOff\n"); printf("DL_UsersAndCredentials\n"); printf("DL_LockUnlock\n"); @@ -7456,7 +7453,6 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull CurrentHueValueStep2f; CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_12() { @@ -7472,9 +7468,6 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 80U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 110U)); - { - CurrentHueValueStep2f = value; - } NextTest(); }]; @@ -7502,10 +7495,8 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentHue", actualValue, CurrentHueValueStep2f)); - } + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 80U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 110U)); NextTest(); }]; @@ -7592,8 +7583,8 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 20U)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 8U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 12U)); NextTest(); }]; @@ -7661,7 +7652,6 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull CurrentHueValueStep3f; CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_24() { @@ -7677,9 +7667,6 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 140U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 190U)); - { - CurrentHueValueStep3f = value; - } NextTest(); }]; @@ -7707,10 +7694,8 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentHue", actualValue, CurrentHueValueStep3f)); - } + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 140U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 190U)); NextTest(); }]; @@ -8286,8 +8271,8 @@ class Test_TC_CC_3_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 10U)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 4U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 6U)); NextTest(); }]; @@ -8315,10 +8300,8 @@ class Test_TC_CC_3_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentHue", actualValue, 5U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 4U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 6U)); NextTest(); }]; @@ -8466,10 +8449,8 @@ class Test_TC_CC_3_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentHue", actualValue, 245U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 208U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 255U)); NextTest(); }]; @@ -9033,10 +9014,8 @@ class Test_TC_CC_4_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, 120U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 102U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 138U)); NextTest(); }]; @@ -9700,7 +9679,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 212U)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 216U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); @@ -9729,10 +9708,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, 254U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 216U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -9849,8 +9826,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 5U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 35U)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 17U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 23U)); NextTest(); }]; @@ -10002,7 +9979,6 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull CurrentSaturationValueStep4e; CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_27() { @@ -10018,9 +9994,6 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 170U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 230U)); - { - CurrentSaturationValueStep4e = value; - } NextTest(); }]; @@ -10048,10 +10021,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, CurrentSaturationValueStep4e)); - } + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 170U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 230U)); NextTest(); }]; @@ -10717,10 +10688,8 @@ class Test_TC_CC_4_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, 240U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 204U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -10775,10 +10744,8 @@ class Test_TC_CC_4_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, 254U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 216U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -10896,8 +10863,8 @@ class Test_TC_CC_4_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 5U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 15U)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 8U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 12U)); NextTest(); }]; @@ -10925,10 +10892,8 @@ class Test_TC_CC_4_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, 10U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 8U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 12U)); NextTest(); }]; @@ -11466,10 +11431,8 @@ class Test_TC_CC_4_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentHue", actualValue, 200U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 170U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 230U)); NextTest(); }]; @@ -11489,10 +11452,8 @@ class Test_TC_CC_4_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, 50U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 42U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 58U)); NextTest(); }]; @@ -11648,10 +11609,8 @@ class Test_TC_CC_4_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentHue", actualValue, 160U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 135U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 185U)); NextTest(); }]; @@ -11671,10 +11630,8 @@ class Test_TC_CC_4_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, 80U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 68U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 92U)); NextTest(); }]; @@ -12556,10 +12513,8 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentX", actualValue, 32768U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 27853U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 37683U)); NextTest(); }]; @@ -12579,10 +12534,8 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentY", actualValue, 19660U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 16711U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 22609U)); NextTest(); }]; @@ -12737,10 +12690,8 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentX", actualValue, 13107U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 11141U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 15073U)); NextTest(); }]; @@ -12760,10 +12711,8 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentY", actualValue, 13107U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 11141U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 15073U)); NextTest(); }]; @@ -12880,10 +12829,8 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentX", actualValue, 32768U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 27853U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 37683U)); NextTest(); }]; @@ -12903,10 +12850,8 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentY", actualValue, 19660U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 16711U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 22609U)); NextTest(); }]; @@ -13141,10 +13086,8 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentX", actualValue, 26214U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 22282U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 30146U)); NextTest(); }]; @@ -13164,10 +13107,8 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentY", actualValue, 32768U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 27853U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 37683U)); NextTest(); }]; @@ -13284,10 +13225,8 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentX", actualValue, 32768U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 27853U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 37683U)); NextTest(); }]; @@ -13307,10 +13246,8 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentY", actualValue, 19660U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 16711U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 22609U)); NextTest(); }]; @@ -13383,10 +13320,8 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentX", actualValue, 13107U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 11141U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 15073U)); NextTest(); }]; @@ -13406,10 +13341,8 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentY", actualValue, 13107U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 11141U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 15073U)); NextTest(); }]; @@ -13545,10 +13478,8 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentX", actualValue, 26214U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 22282U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 30146U)); NextTest(); }]; @@ -13568,10 +13499,8 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentY", actualValue, 32768U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 27853U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 37683U)); NextTest(); }]; @@ -14838,10 +14767,8 @@ class Test_TC_CC_5_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentX", actualValue, 13000U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 11050U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 14950U)); NextTest(); }]; @@ -14861,10 +14788,8 @@ class Test_TC_CC_5_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentY", actualValue, 14000U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 11900U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 16100U)); NextTest(); }]; @@ -15536,10 +15461,8 @@ class Test_TC_CC_6_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorTemperatureMireds", actualValue, 250U)); - } + VerifyOrReturn(CheckConstraintMinValue("colorTemperatureMireds", [value unsignedShortValue], 212U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTemperatureMireds", [value unsignedShortValue], 288U)); NextTest(); }]; @@ -16210,10 +16133,8 @@ class Test_TC_CC_7_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, 12000U)); - } + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 10200U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 13800U)); NextTest(); }]; @@ -16391,10 +16312,8 @@ class Test_TC_CC_7_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, 6000U)); - } + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 5100U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 6900U)); NextTest(); }]; @@ -16877,10 +16796,8 @@ class Test_TC_CC_7_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, 20000U)); - } + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 17000U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 23000U)); NextTest(); }]; @@ -16900,10 +16817,8 @@ class Test_TC_CC_7_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, 50U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 42U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 58U)); NextTest(); }]; @@ -35963,7 +35878,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { case 8: ChipLogProgress( chipTool, " ***** Test Step 8 : Read the optional command(LaunchContent) in AcceptedCommandList attribute\n"); - if (ShouldSkip("CONTENTLAUNCHER.C.C0000")) { + if (ShouldSkip("CONTENTLAUNCHER.C.C00.Tx")) { NextTest(); return; } @@ -35972,7 +35887,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { case 9: ChipLogProgress( chipTool, " ***** Test Step 9 : Read the optional command(LaunchURL) in AcceptedCommandList attribute\n"); - if (ShouldSkip("CONTENTLAUNCHER.C.C0001")) { + if (ShouldSkip("CONTENTLAUNCHER.C.C01.Tx")) { NextTest(); return; } @@ -37974,15 +37889,13 @@ class Test_TC_MEDIAINPUT_3_13 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : TH reads the InputList attribute from the DUT to show list of Inputs available and Verify " - "list of available inputs supported by the device is provided, where each entry in the list contains an " - "index(type:uint 8), InputType (InputType Enums), Name (type: Strings), and Description(Type:String)\n"); + ChipLogProgress( + chipTool, " ***** Test Step 1 : TH reads the InputList attribute from the DUT to show list of Inputs available\n"); if (ShouldSkip("MEDIAINPUT.S.A0000")) { NextTest(); return; } - err = TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyListOfAvailableInputsSupportedByTheDeviceIsProvidedWhereEachEntryInTheListContainsAnIndextypeuint8InputTypeInputTypeEnumsNameTypeStringsAndDescriptionTypeString_1(); + err = TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailable_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Rename Input Command\n"); @@ -38052,8 +37965,7 @@ class Test_TC_MEDIAINPUT_3_13 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR - TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyListOfAvailableInputsSupportedByTheDeviceIsProvidedWhereEachEntryInTheListContainsAnIndextypeuint8InputTypeInputTypeEnumsNameTypeStringsAndDescriptionTypeString_1() + CHIP_ERROR TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailable_1() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38061,10 +37973,7 @@ class Test_TC_MEDIAINPUT_3_13 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the InputList attribute from the DUT to show list of Inputs available and Verify list of available " - @"inputs supported by the device is provided, where each entry in the list contains an index(type:uint 8), " - @"InputType (InputType Enums), Name (type: Strings), and Description(Type:String) Error: %@", - err); + NSLog(@"TH reads the InputList attribute from the DUT to show list of Inputs available Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -61176,36 +61085,384 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { err = TestThReadsFeatureDependentAttributeDGTHREADSF01ERRCNTInAttributeList_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional attribute(ActiveTimestamp) in AttributeList\n"); - if (ShouldSkip("DGTHREAD.S.A0039")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads optional attribute (DetachedRoleCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A000e")) { NextTest(); return; } - err = TestReadTheOptionalAttributeActiveTimestampInAttributeList_9(); + err = TestThReadsOptionalAttributeDetachedRoleCountInAttributeList_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read the optional attribute(PendingTimestamp) in AttributeList\n"); - if (ShouldSkip("DGTHREAD.S.A003A")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads optional attribute (ChildRoleCount) AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A001f")) { NextTest(); return; } - err = TestReadTheOptionalAttributePendingTimestampInAttributeList_10(); + err = TestThReadsOptionalAttributeChildRoleCountAttributeList_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read the optional attribute(Delay) in AttributeList\n"); - if (ShouldSkip("DGTHREAD.S.A003B")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads optional attribute (RouterRoleCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0010")) { NextTest(); return; } - err = TestReadTheOptionalAttributeDelayInAttributeList_11(); + err = TestThReadsOptionalAttributeRouterRoleCountInAttributeList_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads AcceptedCommandList from DUT\n"); - err = TestThReadsAcceptedCommandListFromDut_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads optional attribute (LeaderRoleCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0011")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeLeaderRoleCountInAttributeList_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads GeneratedCommandList from DUT\n"); - err = TestThReadsGeneratedCommandListFromDut_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads optional attribute (AttachAttemptCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0012")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeAttachAttemptCountInAttributeList_13(); + break; + case 14: + ChipLogProgress( + chipTool, " ***** Test Step 14 : TH reads optional attribute (PartitionIdChangeCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0013")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributePartitionIdChangeCountInAttributeList_14(); + break; + case 15: + ChipLogProgress(chipTool, + " ***** Test Step 15 : TH reads optional attribute (BetterPartitionAttachAttemptCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0014")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeBetterPartitionAttachAttemptCountInAttributeList_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads optional attribute (ParentChangeCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0015")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeParentChangeCountInAttributeList_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads optional attribute (TxTotalCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0016")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeTxTotalCountInAttributeList_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads optional attribute (TxUnicastCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0017")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeTxUnicastCountInAttributeList_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads optional attribute (TxBroadcastCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0018")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeTxBroadcastCountInAttributeList_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads optional attribute (TxAckRequestedCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0019")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeTxAckRequestedCountInAttributeList_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads optional attribute (TxAckedCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A001a")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeTxAckedCountInAttributeList_21(); + break; + case 22: + ChipLogProgress( + chipTool, " ***** Test Step 22 : TH reads optional attribute (TxNoAckRequestedCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A001b")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeTxNoAckRequestedCountInAttributeList_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads optional attributes (TxDataCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A001c")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributesTxDataCountInAttributeList_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads optional attribute (TxDataPollCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A001d")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeTxDataPollCountInAttributeList_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : TH reads optional attribute (TxBeaconCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A001e")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeTxBeaconCountInAttributeList_25(); + break; + case 26: + ChipLogProgress( + chipTool, " ***** Test Step 26 : TH reads optional attribute (TxBeaconRequestCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A001f")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeTxBeaconRequestCountInAttributeList_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : TH reads optional attribute (TxOtherCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0020")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeTxOtherCountInAttributeList_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : TH reads optional attribute (TxRetryCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0021")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeTxRetryCountInAttributeList_28(); + break; + case 29: + ChipLogProgress( + chipTool, " ***** Test Step 29 : TH reads optional attribute (TxDirectMaxRetryExpiryCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0022")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeTxDirectMaxRetryExpiryCountInAttributeList_29(); + break; + case 30: + ChipLogProgress( + chipTool, " ***** Test Step 30 : TH reads optional attribute (TxIndirectMaxRetryExpiryCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0023")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeTxIndirectMaxRetryExpiryCountInAttributeList_30(); + break; + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : TH reads optional attribute (TxErrCcaCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0024")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeTxErrCcaCountInAttributeList_31(); + break; + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : TH reads optional attribute (TxErrAbortCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0025")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeTxErrAbortCountInAttributeList_32(); + break; + case 33: + ChipLogProgress( + chipTool, " ***** Test Step 33 : TH reads optional attribute (TxErrBusyChannelCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0026")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeTxErrBusyChannelCountInAttributeList_33(); + break; + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : TH reads optional attribute (RxTotalCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0027")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeRxTotalCountInAttributeList_34(); + break; + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : TH reads optional attribute (RxUnicastCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0028")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeRxUnicastCountInAttributeList_35(); + break; + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : TH reads optional attribute (RxBroadcastCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0029")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeRxBroadcastCountInAttributeList_36(); + break; + case 37: + ChipLogProgress(chipTool, " ***** Test Step 37 : TH reads optional attribute (RxDataCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A002a")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeRxDataCountInAttributeList_37(); + break; + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : TH reads optional attribute (RxDataPollCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A002b")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeRxDataPollCountInAttributeList_38(); + break; + case 39: + ChipLogProgress(chipTool, " ***** Test Step 39 : TH reads optional attribute (RxBeaconCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A002c")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeRxBeaconCountInAttributeList_39(); + break; + case 40: + ChipLogProgress( + chipTool, " ***** Test Step 40 : TH reads optional attribute (RxBeaconRequestCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A002d")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeRxBeaconRequestCountInAttributeList_40(); + break; + case 41: + ChipLogProgress(chipTool, " ***** Test Step 41 : TH reads optional attribute (RxOtherCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A002e")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeRxOtherCountInAttributeList_41(); + break; + case 42: + ChipLogProgress( + chipTool, " ***** Test Step 42 : TH reads optional attribute (RxAddressFilteredCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A002f")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeRxAddressFilteredCountInAttributeList_42(); + break; + case 43: + ChipLogProgress( + chipTool, " ***** Test Step 43 : TH reads optional attribute (RxDestAddrFilteredCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0030")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeRxDestAddrFilteredCountInAttributeList_43(); + break; + case 44: + ChipLogProgress(chipTool, " ***** Test Step 44 : TH reads optional attribute (RxDuplicatedCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0031")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeRxDuplicatedCountInAttributeList_44(); + break; + case 45: + ChipLogProgress(chipTool, " ***** Test Step 45 : TH reads optional attribute (RxErrNoFrameCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0032")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeRxErrNoFrameCountInAttributeList_45(); + break; + case 46: + ChipLogProgress( + chipTool, " ***** Test Step 46 : TH reads optional attribute (RxErrUnknownNeighborCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0033")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeRxErrUnknownNeighborCountInAttributeList_46(); + break; + case 47: + ChipLogProgress( + chipTool, " ***** Test Step 47 : TH reads optional attribute (RxErrInvalidScrAddrCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0034")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeRxErrInvalidScrAddrCountInAttributeList_47(); + break; + case 48: + ChipLogProgress(chipTool, " ***** Test Step 48 : TH reads optional attribute (RxErrSecCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0035")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeRxErrSecCountInAttributeList_48(); + break; + case 49: + ChipLogProgress(chipTool, " ***** Test Step 49 : TH reads optional attribute (RxErrFcsCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0036")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeRxErrFcsCountInAttributeList_49(); + break; + case 50: + ChipLogProgress(chipTool, " ***** Test Step 50 : TH reads optional attribute (RxErrOtherCount) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0037")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeRxErrOtherCountInAttributeList_50(); + break; + case 51: + ChipLogProgress(chipTool, " ***** Test Step 51 : Read the optional attribute (ActiveTimestamp) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A0039")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeActiveTimestampInAttributeList_51(); + break; + case 52: + ChipLogProgress(chipTool, " ***** Test Step 52 : Read the optional attribute (PendingTimestamp) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A003A")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributePendingTimestampInAttributeList_52(); + break; + case 53: + ChipLogProgress(chipTool, " ***** Test Step 53 : Read the optional attribute (Delay) in AttributeList\n"); + if (ShouldSkip("DGTHREAD.S.A003B")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeDelayInAttributeList_53(); + break; + case 54: + ChipLogProgress(chipTool, " ***** Test Step 54 : TH reads AcceptedCommandList from DUT\n"); + err = TestThReadsAcceptedCommandListFromDut_54(); + break; + case 55: + ChipLogProgress(chipTool, " ***** Test Step 55 : TH reads GeneratedCommandList from DUT\n"); + err = TestThReadsGeneratedCommandListFromDut_55(); break; } @@ -61260,6 +61517,132 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 34: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 35: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 36: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 37: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 39: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 40: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 41: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + 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; + case 47: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 48: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 49: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 50: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 51: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 52: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 53: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 54: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 55: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -61273,7 +61656,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 14; + const uint16_t mTestCount = 56; chip::Optional mNodeId; chip::Optional mCluster; @@ -61491,7 +61874,973 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeActiveTimestampInAttributeList_9() + CHIP_ERROR TestThReadsOptionalAttributeDetachedRoleCountInAttributeList_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (DetachedRoleCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 14UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeChildRoleCountAttributeList_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (ChildRoleCount) AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeRouterRoleCountInAttributeList_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (RouterRoleCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeLeaderRoleCountInAttributeList_12() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (LeaderRoleCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeAttachAttemptCountInAttributeList_13() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (AttachAttemptCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributePartitionIdChangeCountInAttributeList_14() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (PartitionIdChangeCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeBetterPartitionAttachAttemptCountInAttributeList_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (BetterPartitionAttachAttemptCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeParentChangeCountInAttributeList_16() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (ParentChangeCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 21UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeTxTotalCountInAttributeList_17() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (TxTotalCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 22UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeTxUnicastCountInAttributeList_18() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (TxUnicastCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 23UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeTxBroadcastCountInAttributeList_19() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (TxBroadcastCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 24UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeTxAckRequestedCountInAttributeList_20() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (TxAckRequestedCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 25UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeTxAckedCountInAttributeList_21() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (TxAckedCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 26UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeTxNoAckRequestedCountInAttributeList_22() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (TxNoAckRequestedCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 27UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributesTxDataCountInAttributeList_23() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attributes (TxDataCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 28UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeTxDataPollCountInAttributeList_24() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (TxDataPollCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 29UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeTxBeaconCountInAttributeList_25() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (TxBeaconCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 30UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeTxBeaconRequestCountInAttributeList_26() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (TxBeaconRequestCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 31UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeTxOtherCountInAttributeList_27() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (TxOtherCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 32UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeTxRetryCountInAttributeList_28() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (TxRetryCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 33UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeTxDirectMaxRetryExpiryCountInAttributeList_29() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (TxDirectMaxRetryExpiryCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 34UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeTxIndirectMaxRetryExpiryCountInAttributeList_30() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (TxIndirectMaxRetryExpiryCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 35UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeTxErrCcaCountInAttributeList_31() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (TxErrCcaCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 36UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeTxErrAbortCountInAttributeList_32() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (TxErrAbortCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 37UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeTxErrBusyChannelCountInAttributeList_33() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (TxErrBusyChannelCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 38UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeRxTotalCountInAttributeList_34() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (RxTotalCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 39UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeRxUnicastCountInAttributeList_35() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (RxUnicastCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 40UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeRxBroadcastCountInAttributeList_36() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (RxBroadcastCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 41UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeRxDataCountInAttributeList_37() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (RxDataCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 42UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeRxDataPollCountInAttributeList_38() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (RxDataPollCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 43UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeRxBeaconCountInAttributeList_39() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (RxBeaconCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 44UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeRxBeaconRequestCountInAttributeList_40() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (RxBeaconRequestCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 45UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeRxOtherCountInAttributeList_41() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (RxOtherCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 46UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeRxAddressFilteredCountInAttributeList_42() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (RxAddressFilteredCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 47UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeRxDestAddrFilteredCountInAttributeList_43() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (RxDestAddrFilteredCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 48UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeRxDuplicatedCountInAttributeList_44() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (RxDuplicatedCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 49UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeRxErrNoFrameCountInAttributeList_45() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (RxErrNoFrameCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 50UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeRxErrUnknownNeighborCountInAttributeList_46() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (RxErrUnknownNeighborCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 51UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeRxErrInvalidScrAddrCountInAttributeList_47() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (RxErrInvalidScrAddrCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 52UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeRxErrSecCountInAttributeList_48() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (RxErrSecCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 53UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeRxErrFcsCountInAttributeList_49() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (RxErrFcsCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 54UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeRxErrOtherCountInAttributeList_50() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (RxErrOtherCount) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 55UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeActiveTimestampInAttributeList_51() { MTRBaseDevice * device = GetDevice("alpha"); @@ -61501,7 +62850,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(ActiveTimestamp) in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute (ActiveTimestamp) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -61514,7 +62863,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributePendingTimestampInAttributeList_10() + CHIP_ERROR TestReadTheOptionalAttributePendingTimestampInAttributeList_52() { MTRBaseDevice * device = GetDevice("alpha"); @@ -61524,7 +62873,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(PendingTimestamp) in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute (PendingTimestamp) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -61537,7 +62886,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeDelayInAttributeList_11() + CHIP_ERROR TestReadTheOptionalAttributeDelayInAttributeList_53() { MTRBaseDevice * device = GetDevice("alpha"); @@ -61547,7 +62896,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute(Delay) in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute (Delay) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -61560,7 +62909,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAcceptedCommandListFromDut_12() + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_54() { MTRBaseDevice * device = GetDevice("alpha"); @@ -61583,7 +62932,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsGeneratedCommandListFromDut_13() + CHIP_ERROR TestThReadsGeneratedCommandListFromDut_55() { MTRBaseDevice * device = GetDevice("alpha"); @@ -105714,539 +107063,6 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { } }; -class Test_TC_DGSW_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DGSW_2_1() - : TestCommandBridge("Test_TC_DGSW_2_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_DGSW_2_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGSW_2_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGSW_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads a list of ThreadMetrics struct non-global attribute from DUT.\n"); - if (ShouldSkip("DGSW.S.A0000")) { - NextTest(); - return; - } - err = TestReadsAListOfThreadMetricsStructNonGlobalAttributeFromDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads CurrentHeapFree non-global attribute value from DUT\n"); - if (ShouldSkip("DGSW.S.A0001")) { - NextTest(); - return; - } - err = TestReadsCurrentHeapFreeNonGlobalAttributeValueFromDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads CurrentHeapUsed non-global attribute value from DUT\n"); - if (ShouldSkip("DGSW.S.A0002")) { - NextTest(); - return; - } - err = TestReadsCurrentHeapUsedNonGlobalAttributeValueFromDut_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads CurrentHeapHighWaterMark non-global attribute value from DUT\n"); - if (ShouldSkip("DGSW.S.A0003")) { - NextTest(); - return; - } - err = TestReadsCurrentHeapHighWaterMarkNonGlobalAttributeValueFromDut_4(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadsAListOfThreadMetricsStructNonGlobalAttributeFromDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeThreadMetricsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads a list of ThreadMetrics struct non-global attribute from DUT. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("threadMetrics", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsCurrentHeapFreeNonGlobalAttributeValueFromDut_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentHeapFreeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentHeapFree non-global attribute value from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("currentHeapFree", "int64u", "int64u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsCurrentHeapUsedNonGlobalAttributeValueFromDut_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentHeapUsedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentHeapUsed non-global attribute value from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("currentHeapUsed", "int64u", "int64u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsCurrentHeapHighWaterMarkNonGlobalAttributeValueFromDut_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentHeapHighWatermarkWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentHeapHighWaterMark non-global attribute value from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("currentHeapHighWatermark", "int64u", "int64u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGSW_2_2 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DGSW_2_2() - : TestCommandBridge("Test_TC_DGSW_2_2") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_DGSW_2_2() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGSW_2_2\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGSW_2_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : Reads a list of SoftwareFault struct from DUT and data type in each field of the struct must " - "match the value listed in spec\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGSW.S.E00")) { - NextTest(); - return; - } - err = TestReadsAListOfSoftwareFaultStructFromDutAndDataTypeInEachFieldOfTheStructMustMatchTheValueListedInSpec_1(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadsAListOfSoftwareFaultStructFromDutAndDataTypeInEachFieldOfTheStructMustMatchTheValueListedInSpec_1() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } -}; - -class Test_TC_DGSW_2_3 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DGSW_2_3() - : TestCommandBridge("Test_TC_DGSW_2_3") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_DGSW_2_3() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGSW_2_3\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGSW_2_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Sends ResetWatermarks to DUT\n"); - if (ShouldSkip("DGSW.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestSendsResetWatermarksToDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads a list of ThreadMetrics struct attribute from DUT.\n"); - if (ShouldSkip("DGSW.S.A0000 && DGSW.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestReadsAListOfThreadMetricsStructAttributeFromDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads CurrentHeapUsed attribute value from DUT\n"); - if (ShouldSkip("DGSW.S.A0002 && DGSW.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestReadsCurrentHeapUsedAttributeValueFromDut_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads CurrentHeapHighWaterMark attribute value from DUT\n"); - if (ShouldSkip("DGSW.S.A0003 && DGSW.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestReadsCurrentHeapHighWaterMarkAttributeValueFromDut_4(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestSendsResetWatermarksToDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster resetWatermarksWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Sends ResetWatermarks to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsAListOfThreadMetricsStructAttributeFromDut_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeThreadMetricsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads a list of ThreadMetrics struct attribute from DUT. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("threadMetrics", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsCurrentHeapUsedAttributeValueFromDut_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentHeapUsedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentHeapUsed attribute value from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("currentHeapUsed", "int64u", "int64u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsCurrentHeapHighWaterMarkAttributeValueFromDut_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device - endpoint:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentHeapHighWatermarkWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentHeapHighWaterMark attribute value from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("currentHeapHighWatermark", "int64u", "int64u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - class TestSubscribe_OnOff : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -120198,240 +121014,248 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { err = TestThReadsAttributeListFromDut_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads Feature dependent(DRLK.S.F08) attributes in AttributeList\n"); - if (ShouldSkip("DRLK.S.F08")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads Feature dependent(DRLK.S.F05) attributes in AttributeList\n"); + if (ShouldSkip("DRLK.S.F05")) { NextTest(); return; } - err = TestThReadsFeatureDependentDRLKSF08AttributesInAttributeList_14(); + err = TestThReadsFeatureDependentDRLKSF05AttributesInAttributeList_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads Feature dependent(DRLK.S.F00) attributes in AttributeList\n"); - if (ShouldSkip("DRLK.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads Feature dependent(DRLK.S.F08) attributes in AttributeList\n"); + if (ShouldSkip("DRLK.S.F08")) { NextTest(); return; } - err = TestThReadsFeatureDependentDRLKSF00AttributesInAttributeList_15(); + err = TestThReadsFeatureDependentDRLKSF08AttributesInAttributeList_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads Feature dependent(DRLK.S.F01) attributes in AttributeList\n"); - if (ShouldSkip("DRLK.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads Feature dependent(DRLK.S.F00) attributes in AttributeList\n"); + if (ShouldSkip("DRLK.S.F00")) { NextTest(); return; } - err = TestThReadsFeatureDependentDRLKSF01AttributesInAttributeList_16(); + err = TestThReadsFeatureDependentDRLKSF00AttributesInAttributeList_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads Feature dependent(DRLK.S.F04) attribute in AttributeList\n"); - if (ShouldSkip("DRLK.S.F04")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads Feature dependent(DRLK.S.F01) attributes in AttributeList\n"); + if (ShouldSkip("DRLK.S.F01")) { NextTest(); return; } - err = TestThReadsFeatureDependentDRLKSF04AttributeInAttributeList_17(); + err = TestThReadsFeatureDependentDRLKSF01AttributesInAttributeList_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads Feature dependent(DRLK.S.F0a) attribute in AttributeList\n"); - if (ShouldSkip("DRLK.S.F0a")) { + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads Feature dependent(DRLK.S.F04) attribute in AttributeList\n"); + if (ShouldSkip("DRLK.S.F04")) { NextTest(); return; } - err = TestThReadsFeatureDependentDRLKSF0aAttributeInAttributeList_18(); + err = TestThReadsFeatureDependentDRLKSF04AttributeInAttributeList_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads Feature dependent(DRLK.S.F0b) attribute in AttributeList\n"); - if (ShouldSkip("DRLK.S.F0b")) { + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads Feature dependent(DRLK.S.F0a) attribute in AttributeList\n"); + if (ShouldSkip("DRLK.S.F0a")) { NextTest(); return; } - err = TestThReadsFeatureDependentDRLKSF0bAttributeInAttributeList_19(); + err = TestThReadsFeatureDependentDRLKSF0aAttributeInAttributeList_19(); break; case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads Feature dependent(DRLK.S.F0b) attribute in AttributeList\n"); + if (ShouldSkip("DRLK.S.F0b")) { + NextTest(); + return; + } + err = TestThReadsFeatureDependentDRLKSF0bAttributeInAttributeList_20(); + break; + case 21: ChipLogProgress(chipTool, - " ***** Test Step 20 : TH reads Feature dependent(DRLK.S.F00 or DRLK.S.F01) attributes in AttributeList\n"); + " ***** Test Step 21 : TH reads Feature dependent(DRLK.S.F00 or DRLK.S.F01) attributes in AttributeList\n"); if (ShouldSkip("DRLK.S.F00 || DRLK.S.F01")) { NextTest(); return; } - err = TestThReadsFeatureDependentDRLKSF00OrDrlksf01AttributesInAttributeList_20(); + err = TestThReadsFeatureDependentDRLKSF00OrDrlksf01AttributesInAttributeList_21(); break; - case 21: + case 22: ChipLogProgress(chipTool, - " ***** Test Step 21 : TH reads Feature dependent(DRLK.S.F07 or DRLK.S.F00) attribute in AttributeList\n"); + " ***** Test Step 22 : TH reads Feature dependent(DRLK.S.F07 or DRLK.S.F00) attribute in AttributeList\n"); if (ShouldSkip("DRLK.S.F07 || DRLK.S.F00")) { NextTest(); return; } - err = TestThReadsFeatureDependentDRLKSF07OrDrlksf00AttributeInAttributeList_21(); + err = TestThReadsFeatureDependentDRLKSF07OrDrlksf00AttributeInAttributeList_22(); break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads optional attribute(Language) in AttributeList\n"); + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads optional attribute(Language) in AttributeList\n"); if (ShouldSkip("DRLK.S.A0021")) { NextTest(); return; } - err = TestThReadsOptionalAttributeLanguageInAttributeList_22(); + err = TestThReadsOptionalAttributeLanguageInAttributeList_23(); break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads optional attribute(LEDSettings) in AttributeList\n"); + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads optional attribute(LEDSettings) in AttributeList\n"); if (ShouldSkip("DRLK.S.A0022")) { NextTest(); return; } - err = TestThReadsOptionalAttributeLEDSettingsInAttributeList_23(); + err = TestThReadsOptionalAttributeLEDSettingsInAttributeList_24(); break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads optional attribute(AutoRelockTime) in AttributeList\n"); + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : TH reads optional attribute(AutoRelockTime) in AttributeList\n"); if (ShouldSkip("DRLK.S.A0023")) { NextTest(); return; } - err = TestThReadsOptionalAttributeAutoRelockTimeInAttributeList_24(); + err = TestThReadsOptionalAttributeAutoRelockTimeInAttributeList_25(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : TH reads optional attribute(SoundVolume) in AttributeList\n"); + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : TH reads optional attribute(SoundVolume) in AttributeList\n"); if (ShouldSkip("DRLK.S.A0024")) { NextTest(); return; } - err = TestThReadsOptionalAttributeSoundVolumeInAttributeList_25(); + err = TestThReadsOptionalAttributeSoundVolumeInAttributeList_26(); break; - case 26: + case 27: ChipLogProgress( - chipTool, " ***** Test Step 26 : TH reads optional attribute(DefaultConfigurationRegister) in AttributeList\n"); + chipTool, " ***** Test Step 27 : TH reads optional attribute(DefaultConfigurationRegister) in AttributeList\n"); if (ShouldSkip("DRLK.S.A0027")) { NextTest(); return; } - err = TestThReadsOptionalAttributeDefaultConfigurationRegisterInAttributeList_26(); + err = TestThReadsOptionalAttributeDefaultConfigurationRegisterInAttributeList_27(); break; - case 27: + case 28: ChipLogProgress( - chipTool, " ***** Test Step 27 : TH reads optional attribute(EnableLocalProgramming) in AttributeList\n"); + chipTool, " ***** Test Step 28 : TH reads optional attribute(EnableLocalProgramming) in AttributeList\n"); if (ShouldSkip("DRLK.S.A0028")) { NextTest(); return; } - err = TestThReadsOptionalAttributeEnableLocalProgrammingInAttributeList_27(); + err = TestThReadsOptionalAttributeEnableLocalProgrammingInAttributeList_28(); break; - case 28: + case 29: ChipLogProgress( - chipTool, " ***** Test Step 28 : TH reads optional attribute(EnableOneTouchLocking) in AttributeList\n"); + chipTool, " ***** Test Step 29 : TH reads optional attribute(EnableOneTouchLocking) in AttributeList\n"); if (ShouldSkip("DRLK.S.A0029")) { NextTest(); return; } - err = TestThReadsOptionalAttributeEnableOneTouchLockingInAttributeList_28(); + err = TestThReadsOptionalAttributeEnableOneTouchLockingInAttributeList_29(); break; - case 29: + case 30: ChipLogProgress( - chipTool, " ***** Test Step 29 : TH reads optional attribute(EnableInsideStatusLED) in AttributeList\n"); + chipTool, " ***** Test Step 30 : TH reads optional attribute(EnableInsideStatusLED) in AttributeList\n"); if (ShouldSkip("DRLK.S.A002a")) { NextTest(); return; } - err = TestThReadsOptionalAttributeEnableInsideStatusLEDInAttributeList_29(); + err = TestThReadsOptionalAttributeEnableInsideStatusLEDInAttributeList_30(); break; - case 30: + case 31: ChipLogProgress( - chipTool, " ***** Test Step 30 : TH reads optional attribute(EnablePrivacyModeButton) in AttributeList\n"); + chipTool, " ***** Test Step 31 : TH reads optional attribute(EnablePrivacyModeButton) in AttributeList\n"); if (ShouldSkip("DRLK.S.A002b")) { NextTest(); return; } - err = TestThReadsOptionalAttributeEnablePrivacyModeButtonInAttributeList_30(); + err = TestThReadsOptionalAttributeEnablePrivacyModeButtonInAttributeList_31(); break; - case 31: + case 32: ChipLogProgress( - chipTool, " ***** Test Step 31 : TH reads optional attribute(LocalProgrammingFeatures) in AttributeList\n"); + chipTool, " ***** Test Step 32 : TH reads optional attribute(LocalProgrammingFeatures) in AttributeList\n"); if (ShouldSkip("DRLK.S.A002c")) { NextTest(); return; } - err = TestThReadsOptionalAttributeLocalProgrammingFeaturesInAttributeList_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : TH reads AcceptedCommandList from DUT\n"); - err = TestThReadsAcceptedCommandListFromDut_32(); + err = TestThReadsOptionalAttributeLocalProgrammingFeaturesInAttributeList_32(); break; case 33: + ChipLogProgress(chipTool, " ***** Test Step 33 : TH reads AcceptedCommandList from DUT\n"); + err = TestThReadsAcceptedCommandListFromDut_33(); + break; + case 34: ChipLogProgress( - chipTool, " ***** Test Step 33 : TH reads Feature dependent commands(DRLK.S.F04) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 34 : TH reads Feature dependent commands(DRLK.S.F04) in AcceptedCommandList\n"); if (ShouldSkip("DRLK.S.F04")) { NextTest(); return; } - err = TestThReadsFeatureDependentCommandsDRLKSF04InAcceptedCommandList_33(); + err = TestThReadsFeatureDependentCommandsDRLKSF04InAcceptedCommandList_34(); break; - case 34: + case 35: ChipLogProgress( - chipTool, " ***** Test Step 34 : TH reads Feature dependent commands(DRLK.S.F0a) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 35 : TH reads Feature dependent commands(DRLK.S.F0a) in AcceptedCommandList\n"); if (ShouldSkip("DRLK.S.F0a")) { NextTest(); return; } - err = TestThReadsFeatureDependentCommandsDRLKSF0aInAcceptedCommandList_34(); + err = TestThReadsFeatureDependentCommandsDRLKSF0aInAcceptedCommandList_35(); break; - case 35: + case 36: ChipLogProgress( - chipTool, " ***** Test Step 35 : TH reads Feature dependent commands(DRLK.S.F0b) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 36 : TH reads Feature dependent commands(DRLK.S.F0b) in AcceptedCommandList\n"); if (ShouldSkip("DRLK.S.F0b")) { NextTest(); return; } - err = TestThReadsFeatureDependentCommandsDRLKSF0bInAcceptedCommandList_35(); + err = TestThReadsFeatureDependentCommandsDRLKSF0bInAcceptedCommandList_36(); break; - case 36: + case 37: ChipLogProgress( - chipTool, " ***** Test Step 36 : TH reads Feature dependent commands(DRLK.S.F08) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 37 : TH reads Feature dependent commands(DRLK.S.F08) in AcceptedCommandList\n"); if (ShouldSkip("DRLK.S.F08")) { NextTest(); return; } - err = TestThReadsFeatureDependentCommandsDRLKSF08InAcceptedCommandList_36(); + err = TestThReadsFeatureDependentCommandsDRLKSF08InAcceptedCommandList_37(); break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : TH reads optional commands(DRLK.S.C03.Rsp) in AcceptedCommandList\n"); + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : TH reads optional commands(DRLK.S.C03.Rsp) in AcceptedCommandList\n"); if (ShouldSkip("DRLK.S.C03.Rsp")) { NextTest(); return; } - err = TestThReadsOptionalCommandsDRLKSC03RspInAcceptedCommandList_37(); + err = TestThReadsOptionalCommandsDRLKSC03RspInAcceptedCommandList_38(); break; - case 38: + case 39: ChipLogProgress( - chipTool, " ***** Test Step 38 : TH reads Feature dependent command(DRLK.S.F04) in GeneratedCommandList\n"); + chipTool, " ***** Test Step 39 : TH reads Feature dependent command(DRLK.S.F04) in GeneratedCommandList\n"); if (ShouldSkip("DRLK.S.F04")) { NextTest(); return; } - err = TestThReadsFeatureDependentCommandDRLKSF04InGeneratedCommandList_38(); + err = TestThReadsFeatureDependentCommandDRLKSF04InGeneratedCommandList_39(); break; - case 39: + case 40: ChipLogProgress( - chipTool, " ***** Test Step 39 : TH reads Feature dependent command(DRLK.S.F0a) in GeneratedCommandList\n"); + chipTool, " ***** Test Step 40 : TH reads Feature dependent command(DRLK.S.F0a) in GeneratedCommandList\n"); if (ShouldSkip("DRLK.S.F0a")) { NextTest(); return; } - err = TestThReadsFeatureDependentCommandDRLKSF0aInGeneratedCommandList_39(); + err = TestThReadsFeatureDependentCommandDRLKSF0aInGeneratedCommandList_40(); break; - case 40: + case 41: ChipLogProgress( - chipTool, " ***** Test Step 40 : TH reads Feature dependent command(DRLK.S.F0b) in GeneratedCommandList\n"); + chipTool, " ***** Test Step 41 : TH reads Feature dependent command(DRLK.S.F0b) in GeneratedCommandList\n"); if (ShouldSkip("DRLK.S.F0b")) { NextTest(); return; } - err = TestThReadsFeatureDependentCommandDRLKSF0bInGeneratedCommandList_40(); + err = TestThReadsFeatureDependentCommandDRLKSF0bInGeneratedCommandList_41(); break; - case 41: + case 42: ChipLogProgress( - chipTool, " ***** Test Step 41 : TH reads Feature dependent command(DRLK.S.F08) in GeneratedCommandList\n"); + chipTool, " ***** Test Step 42 : TH reads Feature dependent command(DRLK.S.F08) in GeneratedCommandList\n"); if (ShouldSkip("DRLK.S.F08")) { NextTest(); return; } - err = TestThReadsFeatureDependentCommandDRLKSF08InGeneratedCommandList_41(); + err = TestThReadsFeatureDependentCommandDRLKSF08InGeneratedCommandList_42(); break; } @@ -120570,6 +121394,9 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 42: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -120583,7 +121410,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 42; + const uint16_t mTestCount = 43; chip::Optional mNodeId; chip::Optional mCluster; @@ -120866,7 +121693,28 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentDRLKSF08AttributesInAttributeList_14() + CHIP_ERROR TestThReadsFeatureDependentDRLKSF05AttributesInAttributeList_14() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads Feature dependent(DRLK.S.F05) attributes in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFeatureDependentDRLKSF08AttributesInAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -120889,7 +121737,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentDRLKSF00AttributesInAttributeList_15() + CHIP_ERROR TestThReadsFeatureDependentDRLKSF00AttributesInAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -120912,7 +121760,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentDRLKSF01AttributesInAttributeList_16() + CHIP_ERROR TestThReadsFeatureDependentDRLKSF01AttributesInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -120935,7 +121783,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentDRLKSF04AttributeInAttributeList_17() + CHIP_ERROR TestThReadsFeatureDependentDRLKSF04AttributeInAttributeList_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -120956,7 +121804,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentDRLKSF0aAttributeInAttributeList_18() + CHIP_ERROR TestThReadsFeatureDependentDRLKSF0aAttributeInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -120977,7 +121825,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentDRLKSF0bAttributeInAttributeList_19() + CHIP_ERROR TestThReadsFeatureDependentDRLKSF0bAttributeInAttributeList_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -120998,7 +121846,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentDRLKSF00OrDrlksf01AttributesInAttributeList_20() + CHIP_ERROR TestThReadsFeatureDependentDRLKSF00OrDrlksf01AttributesInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -121020,7 +121868,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentDRLKSF07OrDrlksf00AttributeInAttributeList_21() + CHIP_ERROR TestThReadsFeatureDependentDRLKSF07OrDrlksf00AttributeInAttributeList_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -121041,7 +121889,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeLanguageInAttributeList_22() + CHIP_ERROR TestThReadsOptionalAttributeLanguageInAttributeList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -121062,7 +121910,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeLEDSettingsInAttributeList_23() + CHIP_ERROR TestThReadsOptionalAttributeLEDSettingsInAttributeList_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -121083,7 +121931,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeAutoRelockTimeInAttributeList_24() + CHIP_ERROR TestThReadsOptionalAttributeAutoRelockTimeInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -121104,7 +121952,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeSoundVolumeInAttributeList_25() + CHIP_ERROR TestThReadsOptionalAttributeSoundVolumeInAttributeList_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -121125,7 +121973,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeDefaultConfigurationRegisterInAttributeList_26() + CHIP_ERROR TestThReadsOptionalAttributeDefaultConfigurationRegisterInAttributeList_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -121146,7 +121994,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeEnableLocalProgrammingInAttributeList_27() + CHIP_ERROR TestThReadsOptionalAttributeEnableLocalProgrammingInAttributeList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -121167,7 +122015,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeEnableOneTouchLockingInAttributeList_28() + CHIP_ERROR TestThReadsOptionalAttributeEnableOneTouchLockingInAttributeList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -121188,7 +122036,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeEnableInsideStatusLEDInAttributeList_29() + CHIP_ERROR TestThReadsOptionalAttributeEnableInsideStatusLEDInAttributeList_30() { MTRBaseDevice * device = GetDevice("alpha"); @@ -121209,7 +122057,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeEnablePrivacyModeButtonInAttributeList_30() + CHIP_ERROR TestThReadsOptionalAttributeEnablePrivacyModeButtonInAttributeList_31() { MTRBaseDevice * device = GetDevice("alpha"); @@ -121230,7 +122078,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeLocalProgrammingFeaturesInAttributeList_31() + CHIP_ERROR TestThReadsOptionalAttributeLocalProgrammingFeaturesInAttributeList_32() { MTRBaseDevice * device = GetDevice("alpha"); @@ -121251,7 +122099,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAcceptedCommandListFromDut_32() + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_33() { MTRBaseDevice * device = GetDevice("alpha"); @@ -121273,7 +122121,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentCommandsDRLKSF04InAcceptedCommandList_33() + CHIP_ERROR TestThReadsFeatureDependentCommandsDRLKSF04InAcceptedCommandList_34() { MTRBaseDevice * device = GetDevice("alpha"); @@ -121296,7 +122144,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentCommandsDRLKSF0aInAcceptedCommandList_34() + CHIP_ERROR TestThReadsFeatureDependentCommandsDRLKSF0aInAcceptedCommandList_35() { MTRBaseDevice * device = GetDevice("alpha"); @@ -121319,7 +122167,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentCommandsDRLKSF0bInAcceptedCommandList_35() + CHIP_ERROR TestThReadsFeatureDependentCommandsDRLKSF0bInAcceptedCommandList_36() { MTRBaseDevice * device = GetDevice("alpha"); @@ -121342,7 +122190,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentCommandsDRLKSF08InAcceptedCommandList_36() + CHIP_ERROR TestThReadsFeatureDependentCommandsDRLKSF08InAcceptedCommandList_37() { MTRBaseDevice * device = GetDevice("alpha"); @@ -121368,7 +122216,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalCommandsDRLKSC03RspInAcceptedCommandList_37() + CHIP_ERROR TestThReadsOptionalCommandsDRLKSC03RspInAcceptedCommandList_38() { MTRBaseDevice * device = GetDevice("alpha"); @@ -121389,7 +122237,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentCommandDRLKSF04InGeneratedCommandList_38() + CHIP_ERROR TestThReadsFeatureDependentCommandDRLKSF04InGeneratedCommandList_39() { MTRBaseDevice * device = GetDevice("alpha"); @@ -121410,7 +122258,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentCommandDRLKSF0aInGeneratedCommandList_39() + CHIP_ERROR TestThReadsFeatureDependentCommandDRLKSF0aInGeneratedCommandList_40() { MTRBaseDevice * device = GetDevice("alpha"); @@ -121431,7 +122279,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentCommandDRLKSF0bInGeneratedCommandList_40() + CHIP_ERROR TestThReadsFeatureDependentCommandDRLKSF0bInGeneratedCommandList_41() { MTRBaseDevice * device = GetDevice("alpha"); @@ -121452,7 +122300,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFeatureDependentCommandDRLKSF08InGeneratedCommandList_41() + CHIP_ERROR TestThReadsFeatureDependentCommandDRLKSF08InGeneratedCommandList_42() { MTRBaseDevice * device = GetDevice("alpha"); @@ -121467,6 +122315,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 28UL)); VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 35UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 37UL)); NextTest(); }]; @@ -125614,8 +126463,8 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:2U]; - params.userIndex = [NSNumber numberWithUnsignedShort:21U]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:0U]; + params.userIndex = [NSNumber numberWithUnsignedShort:15U]; [cluster getYearDayScheduleWithParams:params completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { @@ -125625,12 +126474,12 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2U)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 0U)); } { id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 21U)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 15U)); } { @@ -126034,12 +126883,14 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { err = TestThSendsSetCredentialCommandToDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends Set Credential Command to DUT\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : TH sends Set Credential Command to DUT and Verify that the DUT sends Set Credential Response " + "command with status as DUPLICATE or OCCUPIED\n"); + if (ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDut_8(); + err = TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithStatusAsDuplicateOrOccupied_8(); break; case 9: ChipLogProgress(chipTool, @@ -126052,72 +126903,70 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { err = TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends Set Credential Command to DUT\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : TH sends Set Credential Command to DUT and Verify that the DUT sends Set Credential " + "Response command with response as OCCUPIED if the CredentialIndex is repeated\n"); + if (ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDut_10(); + err = TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : TH sends Set Credential Command to DUT and Verify that the DUT sends Set Credential " - "Response command with response as OCCUPIED if the CredentialIndex is repeated\n"); - if (ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends Clear Credential Command to DUT\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C26.Rsp")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_11(); + err = TestThSendsClearCredentialCommandToDut_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends Set Credential Command to DUT\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends Get Credential Status Command to DUT\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDut_12(); + err = TestThSendsGetCredentialStatusCommandToDut_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : TH sends Set Credential Command to DUT and Verify that the DUT sends Set Credential " - "Response command with response as OCCUPIED if the CredentialIndex is repeated\n"); - if (ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends Set User Command to DUT\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C1a.Rsp")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_13(); + err = TestThSendsSetUserCommandToDut_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends Clear Credential Command to DUT\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C26.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends Set Credential Command to DUT\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestThSendsClearCredentialCommandToDut_14(); + err = TestThSendsSetCredentialCommandToDut_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends Get Credential Status Command to DUT\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends Clear Credential Command to DUT\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C26.Rsp")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandToDut_15(); + err = TestThSendsClearCredentialCommandToDut_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends Set User Command to DUT\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C1a.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends Get Credential Status Command\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestThSendsSetUserCommandToDut_16(); + err = TestThSendsGetCredentialStatusCommand_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH sends Set Credential Command to DUT\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : TH sends Get Credential Status Command\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDut_17(); + err = TestThSendsGetCredentialStatusCommand_17(); break; case 18: ChipLogProgress(chipTool, " ***** Test Step 18 : TH sends Clear Credential Command to DUT\n"); @@ -126128,36 +126977,12 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { err = TestThSendsClearCredentialCommandToDut_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH sends Get Credential Status Command\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { - NextTest(); - return; - } - err = TestThSendsGetCredentialStatusCommand_19(); + ChipLogProgress(chipTool, " ***** Test Step 19 : Cleanup the first created user\n"); + err = TestCleanupTheFirstCreatedUser_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH sends Get Credential Status Command\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { - NextTest(); - return; - } - err = TestThSendsGetCredentialStatusCommand_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH sends Clear Credential Command to DUT\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C26.Rsp")) { - NextTest(); - return; - } - err = TestThSendsClearCredentialCommandToDut_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Cleanup the first created user\n"); - err = TestCleanupTheFirstCreatedUser_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Cleanup the second created user\n"); - err = TestCleanupTheSecondCreatedUser_23(); + ChipLogProgress(chipTool, " ***** Test Step 20 : Cleanup the second created user\n"); + err = TestCleanupTheSecondCreatedUser_20(); break; } @@ -126225,7 +127050,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -126233,15 +127058,6 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -126255,7 +127071,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 24; + const uint16_t mTestCount = 21; chip::Optional mNodeId; chip::Optional mCluster; @@ -126587,54 +127403,8 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSetCredentialCommandToDut_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0U]; - params.credential = [[MTRDoorLockClusterDlCredential alloc] init]; - ((MTRDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; - ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - - params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.userStatus = nil; - params.userType = nil; - [cluster - setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 2U)); - } - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } - - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - CHIP_ERROR - TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_9() + TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithStatusAsDuplicateOrOccupied_8() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -126644,54 +127414,8 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestThSendsSetCredentialCommandToDut_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0U]; - params.credential = [[MTRDoorLockClusterDlCredential alloc] init]; - ((MTRDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; - ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - - params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.userStatus = nil; - params.userType = nil; - [cluster - setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 2U)); - } - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } - - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - CHIP_ERROR - TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_11() + TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_9() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -126701,54 +127425,8 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestThSendsSetCredentialCommandToDut_12() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:2U]; - params.credential = [[MTRDoorLockClusterDlCredential alloc] init]; - ((MTRDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; - ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; - - params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.userStatus = nil; - params.userType = nil; - [cluster - setCredentialWithParams:params - completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 2U)); - } - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } - - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - CHIP_ERROR - TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_13() + TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_10() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -126758,7 +127436,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestThSendsClearCredentialCommandToDut_14() + CHIP_ERROR TestThSendsClearCredentialCommandToDut_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -126782,7 +127460,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandToDut_15() + CHIP_ERROR TestThSendsGetCredentialStatusCommandToDut_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -126832,7 +127510,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSetUserCommandToDut_16() + CHIP_ERROR TestThSendsSetUserCommandToDut_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -126859,7 +127537,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSetCredentialCommandToDut_17() + CHIP_ERROR TestThSendsSetCredentialCommandToDut_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -126905,7 +127583,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsClearCredentialCommandToDut_18() + CHIP_ERROR TestThSendsClearCredentialCommandToDut_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -126929,7 +127607,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommand_19() + CHIP_ERROR TestThSendsGetCredentialStatusCommand_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -126979,7 +127657,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommand_20() + CHIP_ERROR TestThSendsGetCredentialStatusCommand_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -127029,7 +127707,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsClearCredentialCommandToDut_21() + CHIP_ERROR TestThSendsClearCredentialCommandToDut_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -127056,7 +127734,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCleanupTheFirstCreatedUser_22() + CHIP_ERROR TestCleanupTheFirstCreatedUser_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -127077,7 +127755,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCleanupTheSecondCreatedUser_23() + CHIP_ERROR TestCleanupTheSecondCreatedUser_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -129626,9 +130304,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), - make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(), From c74b7f8e6ae8cd28ca83d83e471dc74a10b61dda Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 22 Sep 2022 15:47:20 -0400 Subject: [PATCH 05/19] Use GlobalAttributesNotInMetadata instead of hardcoding the names. (#22453) * Use GlobalAttributesNotInMetadata instead of hardcoding the names. This way when we add EventList things should work right most places without needing to hunt them down and fix them. Fixes https://github.com/project-chip/connectedhomeip/issues/22443 * Address review comment. --- .../util/ember-compatibility-functions.cpp | 27 +++++++---- src/darwin/Framework/CHIP/MTRIMDispatch.mm | 48 ++++++++++--------- 2 files changed, 43 insertions(+), 32 deletions(-) diff --git a/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp index 31390a973ad4e3..6905527eed06d6 100644 --- a/src/app/util/ember-compatibility-functions.cpp +++ b/src/app/util/ember-compatibility-functions.cpp @@ -415,6 +415,12 @@ CHIP_ERROR GlobalAttributeReader::Read(const ConcreteReadAttributePath & aPath, return EncodeCommandList(aPath, aEncoder, &CommandHandlerInterface::EnumerateGeneratedCommands, mCluster->generatedCommandList); default: + // This function is only called if attributeCluster is non-null in + // ReadSingleClusterData, which only happens for attributes listed in + // GlobalAttributesNotInMetadata. If we reach this code, someone added + // a global attribute to that list but not the above switch. + VerifyOrDieWithMsg(false, DataManagement, "Unexpected global attribute: " ChipLogFormatMEI, + ChipLogValueMEI(aPath.mAttributeId)); return CHIP_NO_ERROR; } } @@ -551,16 +557,19 @@ CHIP_ERROR ReadSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, b const EmberAfCluster * attributeCluster = nullptr; const EmberAfAttributeMetadata * attributeMetadata = nullptr; - switch (aPath.mAttributeId) + bool isGlobalAttributeNotInMetadata = false; + for (auto & attr : GlobalAttributesNotInMetadata) + { + if (attr == aPath.mAttributeId) + { + isGlobalAttributeNotInMetadata = true; + attributeCluster = emberAfFindCluster(aPath.mEndpointId, aPath.mClusterId, CLUSTER_MASK_SERVER); + break; + } + } + + if (!isGlobalAttributeNotInMetadata) { - case Clusters::Globals::Attributes::AttributeList::Id: - FALLTHROUGH; - case Clusters::Globals::Attributes::AcceptedCommandList::Id: - FALLTHROUGH; - case Clusters::Globals::Attributes::GeneratedCommandList::Id: - attributeCluster = emberAfFindCluster(aPath.mEndpointId, aPath.mClusterId, CLUSTER_MASK_SERVER); - break; - default: attributeMetadata = emberAfLocateAttributeMetadata(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); } diff --git a/src/darwin/Framework/CHIP/MTRIMDispatch.mm b/src/darwin/Framework/CHIP/MTRIMDispatch.mm index 7979c34a832329..7d0594bd87aefa 100644 --- a/src/darwin/Framework/CHIP/MTRIMDispatch.mm +++ b/src/darwin/Framework/CHIP/MTRIMDispatch.mm @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -66,11 +67,29 @@ namespace { - Status DetermineAttributeStatus(const ConcreteAttributePath & aPath, bool aIsWrite) + bool IsSupportedGlobalAttribute(AttributeId aAttribute) { // We don't have any non-global attributes. using namespace Globals::Attributes; + for (auto & attr : GlobalAttributesNotInMetadata) { + if (attr == aAttribute) { + return true; + } + } + + switch (aAttribute) { + case FeatureMap::Id: + FALLTHROUGH; + case ClusterRevision::Id: + return true; + } + + return false; + } + + Status DetermineAttributeStatus(const ConcreteAttributePath & aPath, bool aIsWrite) + { // TODO: Consider making this configurable for applications that are not // trying to be an OTA provider, though in practice it just affects which // error is returned. @@ -85,30 +104,13 @@ Status DetermineAttributeStatus(const ConcreteAttributePath & aPath, bool aIsWri return Status::UnsupportedCluster; } - switch (aPath.mAttributeId) { - case AttributeList::Id: - FALLTHROUGH; - case AcceptedCommandList::Id: - FALLTHROUGH; - case GeneratedCommandList::Id: - FALLTHROUGH; - // When EventList is supported, include it here. -#if 0 - case EventList::Id: - FALLTHROUGH; -#endif - case FeatureMap::Id: - FALLTHROUGH; - case ClusterRevision::Id: - // No permissions for this for read, and none of these are writable for - // write. The writable-or-not check happens before the ACL check. - return aIsWrite ? Status::UnsupportedWrite : Status::UnsupportedAccess; - default: - // No other attributes. - break; + if (!IsSupportedGlobalAttribute(aPath.mAttributeId)) { + return Status::UnsupportedAttribute; } - return Status::UnsupportedAttribute; + // No permissions for this for read, and none of these are writable for + // write. The writable-or-not check happens before the ACL check. + return aIsWrite ? Status::UnsupportedWrite : Status::UnsupportedAccess; } } // anonymous namespace From edb93a03ef06682c6c7b2c1e8fd33e352c06b0b0 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Thu, 22 Sep 2022 23:18:06 +0200 Subject: [PATCH 06/19] [Darwin] Call ResetSharedConnection and not StartSharedConnection in src/platform/Darwin/DnssdHostNameRegistrar.cpp in order to properly unregister / register interfaces addresses (#22810) --- src/platform/Darwin/DnssdHostNameRegistrar.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/platform/Darwin/DnssdHostNameRegistrar.cpp b/src/platform/Darwin/DnssdHostNameRegistrar.cpp index a936521528f95d..a2415791d4aa4a 100644 --- a/src/platform/Darwin/DnssdHostNameRegistrar.cpp +++ b/src/platform/Darwin/DnssdHostNameRegistrar.cpp @@ -272,7 +272,7 @@ CHIP_ERROR HostNameRegistrar::Register() VerifyOrReturnError(!IsLocalOnly(), CHIP_NO_ERROR); return StartMonitorInterfaces(^(InetInterfacesVector inetInterfaces, Inet6InterfacesVector inet6Interfaces) { - ReturnOnFailure(StartSharedConnection()); + ReturnOnFailure(ResetSharedConnection()); RegisterInterfaces(inetInterfaces, kDNSServiceType_A); RegisterInterfaces(inet6Interfaces, kDNSServiceType_AAAA); }); @@ -355,6 +355,8 @@ void HostNameRegistrar::StopMonitorInterfaces() CHIP_ERROR HostNameRegistrar::StartSharedConnection() { + VerifyOrReturnError(mServiceRef == nullptr, CHIP_ERROR_INCORRECT_STATE); + auto err = DNSServiceCreateConnection(&mServiceRef); VerifyOrReturnValue(kDNSServiceErr_NoError == err, Error::ToChipError(err)); From dbe192dc617265c25181921bfc342ebc8e22d7ff Mon Sep 17 00:00:00 2001 From: manjunath-grl <102359958+manjunath-grl@users.noreply.github.com> Date: Fri, 23 Sep 2022 18:58:56 +0530 Subject: [PATCH 07/19] Modified TSTAT sep 21 (#22800) * Fixed issue #561and #562 TSTAT-2.1 TSTAT-2.2 * Auto generated files * Restyled by whitespace * Disabled TSTAT tests in Darwin * Auto generated files * Restyled by whitespace * Fix #2296 * Auto generated files Co-authored-by: Restyled.io --- .../templates/tests/ciTests.json | 4 +- .../suites/certification/Test_TC_ACL_2_2.yaml | 74 +- .../Test_TC_APPLAUNCHER_3_8.yaml | 27 +- .../Test_TC_AUDIOOUTPUT_1_8.yaml | 10 - .../certification/Test_TC_TSTAT_2_1.yaml | 231 +- .../certification/Test_TC_TSTAT_2_2.yaml | 1014 ++- .../chip-tool/zap-generated/test/Commands.h | 2401 +++++-- .../zap-generated/test/Commands.h | 5939 +---------------- 8 files changed, 3287 insertions(+), 6413 deletions(-) diff --git a/examples/darwin-framework-tool/templates/tests/ciTests.json b/examples/darwin-framework-tool/templates/tests/ciTests.json index fd8f8840d162a0..50f8ce2e3add50 100644 --- a/examples/darwin-framework-tool/templates/tests/ciTests.json +++ b/examples/darwin-framework-tool/templates/tests/ciTests.json @@ -20,6 +20,8 @@ "Test_TC_BINFO_2_1", "Test_TC_SWTCH_2_1", "Test_TC_G_2_1", - "Test_TC_FLABEL_2_1" + "Test_TC_FLABEL_2_1", + "Test_TC_TSTAT_2_1", + "Test_TC_TSTAT_2_2" ] } diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_2.yaml index a7f4c9b954713c..51463040fae4ff 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_2.yaml @@ -42,14 +42,72 @@ tests: type: list contains: [31] + #Endpoint configuration is not supported in YAML - label: "TH1 reads DUT Descriptor cluster ServerList attribute from every Endpoint except 0" - command: "readAttribute" - cluster: "Descriptor" - endpoint: 1 - attribute: "ServerList" - response: - constraints: - type: list - excludes: [31] + verification: | + ./chip-tool descriptor read server-list 1 1 + + + On TH1(Chiptool) ,Verify the serverList attribute of Descriptor Cluster without an element of 31( 0x001F) + + [1656412927.698026][3383:3388] CHIP:DMG: SuppressResponse = true, + [1656412927.698052][3383:3388] CHIP:DMG: InteractionModelRevision = 1 + [1656412927.698076][3383:3388] CHIP:DMG: } + [1656412927.698852][3383:3388] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 239898735 + [1656412927.698963][3383:3388] CHIP:TOO: server list: 44 entries + [1656412927.698997][3383:3388] CHIP:TOO: [1]: 3 + [1656412927.699023][3383:3388] CHIP:TOO: [2]: 4 + [1656412927.699050][3383:3388] CHIP:TOO: [3]: 5 + [1656412927.699075][3383:3388] CHIP:TOO: [4]: 6 + [1656412927.699101][3383:3388] CHIP:TOO: [5]: 7 + [1656412927.699127][3383:3388] CHIP:TOO: [6]: 8 + [1656412927.699153][3383:3388] CHIP:TOO: [7]: 15 + [1656412927.699179][3383:3388] CHIP:TOO: [8]: 29 + [1656412927.699205][3383:3388] CHIP:TOO: [9]: 30 + [1656412927.699231][3383:3388] CHIP:TOO: [10]: 37 + [1656412927.699258][3383:3388] CHIP:TOO: [11]: 47 + [1656412927.699284][3383:3388] CHIP:TOO: [12]: 59 + [1656412927.699310][3383:3388] CHIP:TOO: [13]: 64 + [1656412927.699336][3383:3388] CHIP:TOO: [14]: 65 + [1656412927.699361][3383:3388] CHIP:TOO: [15]: 69 + [1656412927.699387][3383:3388] CHIP:TOO: [16]: 80 + [1656412927.699414][3383:3388] CHIP:TOO: [17]: 257 + [1656412927.699440][3383:3388] CHIP:TOO: [18]: 258 + [1656412927.699466][3383:3388] CHIP:TOO: [19]: 259 + [1656412927.699492][3383:3388] CHIP:TOO: [20]: 512 + [1656412927.699518][3383:3388] CHIP:TOO: [21]: 513 + [1656412927.699544][3383:3388] CHIP:TOO: [22]: 514 + [1656412927.699571][3383:3388] CHIP:TOO: [23]: 516 + [1656412927.699596][3383:3388] CHIP:TOO: [24]: 768 + [1656412927.699623][3383:3388] CHIP:TOO: [25]: 1024 + [1656412927.699649][3383:3388] CHIP:TOO: [26]: 1026 + [1656412927.699675][3383:3388] CHIP:TOO: [27]: 1027 + [1656412927.699701][3383:3388] CHIP:TOO: [28]: 1028 + [1656412927.699727][3383:3388] CHIP:TOO: [29]: 1029 + [1656412927.699754][3383:3388] CHIP:TOO: [30]: 1030 + [1656412927.699780][3383:3388] CHIP:TOO: [31]: 1283 + [1656412927.699806][3383:3388] CHIP:TOO: [32]: 1284 + [1656412927.699832][3383:3388] CHIP:TOO: [33]: 1285 + [1656412927.699858][3383:3388] CHIP:TOO: [34]: 1286 + [1656412927.699884][3383:3388] CHIP:TOO: [35]: 1287 + [1656412927.699911][3383:3388] CHIP:TOO: [36]: 1288 + [1656412927.699937][3383:3388] CHIP:TOO: [37]: 1289 + [1656412927.699963][3383:3388] CHIP:TOO: [38]: 1290 + [1656412927.700002][3383:3388] CHIP:TOO: [39]: 1291 + [1656412927.700029][3383:3388] CHIP:TOO: [40]: 1292 + [1656412927.700056][3383:3388] CHIP:TOO: [41]: 1293 + [1656412927.700082][3383:3388] CHIP:TOO: [42]: 1294 + [1656412927.700108][3383:3388] CHIP:TOO: [43]: 2820 + [1656412927.700134][3383:3388] CHIP:TOO: [44]: 4294048773 + [1656412927.700251][3383:3388] CHIP:EM: Sending Standalone Ack for MessageCounter:186152197 on exchange 39489i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Factory Reset the DUT and enter 'y' after success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8.yaml b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8.yaml index 597becc21e27f4..893cc48e7e1431 100644 --- a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8.yaml @@ -53,10 +53,25 @@ tests: - name: "status" value: 0 + #Endpoint configuration is not supported in YAML - label: "Reads the Status attribute" - cluster: "Application Basic" - endpoint: 3 - command: "readAttribute" - attribute: "Status" - response: - value: 0 + PICS: PICS_USER_PROMPT + verification: | + The TH commands for this test step can be invoked using chip-tool (when DUT is a commissionee) or tv-casting-app (when DUT is a commissioner): + ./chip-tool applicationbasic read status 1 3 + ./chip-tv-casting-app applicationbasic read status 1 3 + + On TH verify that the Status attribute value as 0 + [1658208937.049446][2428:2433] CHIP:DMG: InteractionModelRevision = 1 + [1658208937.049483][2428:2433] CHIP:DMG: } + [1658208937.049690][2428:2433] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_050D Attribute 0x0000_0005 DataVersion: 3850684771 + [1658208937.049809][2428:2433] CHIP:TOO: Status: 0 + [1658208937.049922][2428:2433] CHIP:EM: Sending Standalone Ack for MessageCounter:75774840 on exchange 3041i + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Please enter 'y' after success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_1_8.yaml b/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_1_8.yaml index 8d1caa480a84a9..24dd9c6273e427 100644 --- a/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_1_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_1_8.yaml @@ -67,16 +67,6 @@ tests: contains: [0] - label: "Read the global attribute: GeneratedCommandList" - PICS: AUDIOOUTPUT.S.NU - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [1] - constraints: - type: list - - - label: "Read the global attribute: GeneratedCommandList" - PICS: " !AUDIOOUTPUT.S.NU " command: "readAttribute" attribute: "GeneratedCommandList" response: diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml index 6cf8fa3aa9051f..01bfc0f3e0d651 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml @@ -31,6 +31,87 @@ tests: - name: "nodeId" value: nodeId + - label: + "Saving value for comparision in step 5 read AbsMinCoolSetpointLimit + attribute" + PICS: TSTAT.S.A0005 + command: "readAttribute" + attribute: "AbsMinCoolSetpointLimit" + response: + saveAs: AbsMinCoolSetpointLimitStep5 + + - label: + "Saving value for comparision in step 5 read attribute + MinSetpointDeadBand attribute" + PICS: TSTAT.S.A0019 + command: "readAttribute" + attribute: "MinSetpointDeadBand" + response: + saveAs: MinSetpointDeadBand + + - label: + "Saving value for comparision in step 6 read AbsMaxCoolSetpointLimit + attribute" + PICS: TSTAT.S.A0006 + command: "readAttribute" + attribute: "AbsMaxCoolSetpointLimit" + response: + saveAs: AbsMaxCoolSetpointLimitStep6 + + - label: + "Saving value for comparision in step 17 read MinCoolSetpointLimit + attribute" + PICS: TSTAT.S.A0017 + command: "readAttribute" + attribute: "MinCoolSetpointLimit" + response: + saveAs: MinCoolSetpointLimit + + - label: + "Saving value for comparision in step 17 read MaxCoolSetpointLimit + attribute" + PICS: TSTAT.S.A0018 + command: "readAttribute" + attribute: "MaxCoolSetpointLimit" + response: + saveAs: MaxCoolSetpointLimit + + - label: + "Saving value for comparision in step 13 read attribute + OccupiedCoolingSetpoint" + PICS: TSTAT.S.F01 + command: "readAttribute" + attribute: "OccupiedCoolingSetpoint" + response: + saveAs: OccupiedCoolingSetpoint + + - label: + "Saving value for comparision in step 15 read attribute + AbsMinHeatSetpointLimit" + PICS: TSTAT.S.A0003 + command: "readAttribute" + attribute: "AbsMinHeatSetpointLimit" + response: + saveAs: AbsMinHeat + + - label: + "Saving value for comparision in step 15 read attribute + AbsMaxHeatSetpointLimit" + PICS: TSTAT.S.A0004 + command: "readAttribute" + attribute: "AbsMaxHeatSetpointLimit" + response: + saveAs: AbsMaxHeat + + - label: + "Saving value for comparision in step 16 read + UnoccupiedCoolingSetpoint attribute" + PICS: TSTAT.S.A0013 + command: "readAttribute" + attribute: "UnoccupiedCoolingSetpoint" + response: + saveAs: UnoccupiedCoolingSetpoint + - label: "Reads mandatory attributes from DUT: LocalTemperature" command: "readAttribute" attribute: "LocalTemperature" @@ -60,8 +141,30 @@ tests: minValue: 0 maxValue: 1 - - label: "Reads mandatory attributes from DUT: AbsMinHeatSetpointLimit" - PICS: TSTAT.S.A0003 + - label: + "Read attribute AbsMinHeatSetpointLimit if TSTAT.S.F05 feature is + supported" + PICS: TSTAT.S.A0003 && TSTAT.S.A0005 && TSTAT.S.F05 + command: "readAttribute" + attribute: "AbsMinHeatSetpointLimit" + response: + constraints: + type: int16s + maxValue: AbsMinCoolSetpointLimitStep5 - MinSetpointDeadBand + + - label: + "Read attribute AbsMinHeatSetpointLimit if TSTAT.S.F05 feature is + supported" + PICS: TSTAT.S.A0003 && !TSTAT.S.A0005 && TSTAT.S.F05 + command: "readAttribute" + attribute: "AbsMinHeatSetpointLimit" + response: + constraints: + type: int16s + maxValue: 1575 + + - label: "Read attribute AbsMinHeatSetpointLimit from DUT" + PICS: TSTAT.S.A0003 && !TSTAT.S.F05 command: "readAttribute" attribute: "AbsMinHeatSetpointLimit" response: @@ -80,7 +183,7 @@ tests: minValue: -27315 maxValue: 32767 - - label: "Reads optional attributes from DUT: AbsMinCoolSetpointLimit" + - label: "Read attribute AbsMinCoolSetpointLimit from DUT" PICS: TSTAT.S.A0005 command: "readAttribute" attribute: "AbsMinCoolSetpointLimit" @@ -90,7 +193,7 @@ tests: minValue: -27315 maxValue: 32767 - - label: "Reads optional attributes from DUT: AbsMaxCoolSetpointLimit" + - label: "Read attribute AbsMaxCoolSetpointLimit from DUT" PICS: TSTAT.S.A0006 command: "readAttribute" attribute: "AbsMaxCoolSetpointLimit" @@ -137,11 +240,21 @@ tests: response: constraints: type: int8s - minValue: 25 - maxValue: -25 + minValue: -25 + maxValue: 25 - - label: "Reads optional attributes from DUT: OccupiedCoolingSetpoint" - PICS: TSTAT.S.F01 + - label: "Read attribute OccupiedCoolingSetpoint from the DUT" + PICS: TSTAT.S.F01 && TSTAT.S.A0017 && TSTAT.S.A0018 + command: "readAttribute" + attribute: "OccupiedCoolingSetpoint" + response: + constraints: + type: int16s + minValue: MinCoolSetpointLimit + maxValue: MaxCoolSetpointLimit + + - label: "Read attribute OccupiedCoolingSetpoint from the DUT" + PICS: TSTAT.S.F01 && !TSTAT.S.A0017 && !TSTAT.S.A0018 command: "readAttribute" attribute: "OccupiedCoolingSetpoint" response: @@ -150,8 +263,20 @@ tests: minValue: 1600 maxValue: 3200 - - label: "Reads mandatory attributes from DUT: OccupiedHeatingSetpoint" - PICS: TSTAT.S.F00 + - label: + "Read attribute OccupiedHeatingSetpoint if TSTAT.S.F05 feature is + supported" + PICS: TSTAT.S.F05 && TSTAT.S.F00 + command: "readAttribute" + attribute: "OccupiedHeatingSetpoint" + response: + constraints: + type: int16s + minValue: AbsMinCoolSetpointLimitStep5 + maxValue: OccupiedCoolingSetpoint - MinSetpointDeadBand + + - label: "Read attribute OccupiedHeatingSetpoint from the DUT" + PICS: TSTAT.S.F00 && !TSTAT.S.F05 command: "readAttribute" attribute: "OccupiedHeatingSetpoint" response: @@ -161,7 +286,17 @@ tests: maxValue: 3000 - label: "Read UnoccupiedCoolingSetpoint attribute from the DUT" - PICS: TSTAT.S.F01 && TSTAT.S.F02 + PICS: TSTAT.S.F05 && TSTAT.S.A0013 + command: "readAttribute" + attribute: "UnoccupiedCoolingSetpoint" + response: + constraints: + type: int16s + minValue: AbsMinHeat + maxValue: AbsMaxHeat + + - label: "Read UnoccupiedCoolingSetpoint attribute from the DUT" + PICS: TSTAT.S.F01 && TSTAT.S.F02 && !TSTAT.S.F05 command: "readAttribute" attribute: "UnoccupiedCoolingSetpoint" response: @@ -171,7 +306,17 @@ tests: maxValue: 3200 - label: "Read UnoccupiedHeatingSetpoint attribute from the DUT" - PICS: TSTAT.S.F00 && TSTAT.S.F02 + PICS: TSTAT.S.F00 && TSTAT.S.F02 && TSTAT.S.F05 && TSTAT.S.A0013 + command: "readAttribute" + attribute: "UnoccupiedHeatingSetpoint" + response: + constraints: + type: int16s + minValue: 700 + maxValue: UnoccupiedCoolingSetpoint - MinSetpointDeadBand + + - label: "Read UnoccupiedHeatingSetpoint attribute from the DUT" + PICS: TSTAT.S.F00 && TSTAT.S.F02 && !TSTAT.S.F05 command: "readAttribute" attribute: "UnoccupiedHeatingSetpoint" response: @@ -181,7 +326,17 @@ tests: maxValue: 3000 - label: "Reads attribute from DUT: MinHeatSetpointLimit" - PICS: TSTAT.S.A0015 + PICS: TSTAT.S.A0015 && TSTAT.S.F05 && TSTAT.S.A0017 + command: "readAttribute" + attribute: "MinHeatSetpointLimit" + response: + constraints: + type: int16s + minValue: 700 + maxValue: MinCoolSetpointLimit - MinSetpointDeadBand + + - label: "Read attribute MinHeatSetpointLimit from the DUT" + PICS: TSTAT.S.A0015 && !TSTAT.S.F05 command: "readAttribute" attribute: "MinHeatSetpointLimit" response: @@ -190,37 +345,57 @@ tests: minValue: 700 maxValue: 3000 + - label: "Read attribute MaxHeatSetpointLimit from the DUT" + PICS: TSTAT.S.A0016 && !TSTAT.S.F05 + command: "readAttribute" + attribute: "MaxHeatSetpointLimit" + response: + constraints: + type: int16s + minValue: 700 + maxValue: 3000 + - label: "Reads attribute from DUT: MaxHeatSetpointLimit" - PICS: TSTAT.S.A0016 + PICS: TSTAT.S.A0016 && TSTAT.S.F05 && TSTAT.S.A0018 command: "readAttribute" attribute: "MaxHeatSetpointLimit" response: constraints: type: int16s - minValue: -27315 - maxValue: 32767 + minValue: 700 + maxValue: MaxCoolSetpointLimit - MinSetpointDeadBand - - label: "Reads optional attributes from DUT: MinCoolSetpointLimit" - PICS: TSTAT.S.A0017 + - label: "Read attribute MinCoolSetpointLimit from DUT" + PICS: TSTAT.S.A0017 && TSTAT.S.A0018 && TSTAT.S.A0005 command: "readAttribute" attribute: "MinCoolSetpointLimit" response: constraints: type: int16s - minValue: -27315 - maxValue: 32767 + minValue: AbsMinCoolSetpointLimitStep5 + maxValue: MaxCoolSetpointLimit - - label: "Reads optional attributes from DUT: MaxCoolSetpointLimit" - PICS: TSTAT.S.A0018 + - label: "Read attribute MinCoolSetpointLimit from DUT" + PICS: TSTAT.S.A0017 && !TSTAT.S.A0018 && !TSTAT.S.A0005 + command: "readAttribute" + attribute: "MinCoolSetpointLimit" + response: + constraints: + type: int16s + minValue: 1600 + maxValue: 3200 + + - label: "Read attribute MaxCoolSetpointLimit from DUT" + PICS: TSTAT.S.A0018 && TSTAT.S.A0006 && TSTAT.S.A0017 command: "readAttribute" attribute: "MaxCoolSetpointLimit" response: constraints: type: int16s - minValue: -27315 - maxValue: 32767 + minValue: MinCoolSetpointLimit + maxValue: AbsMaxCoolSetpointLimitStep6 - - label: "Reads optional attributes from DUT: MinSetpointDeadBand" + - label: "Read attribute MinSetpointDeadBand from DUT" PICS: TSTAT.S.F05 command: "readAttribute" attribute: "MinSetpointDeadBand" @@ -240,7 +415,8 @@ tests: minValue: 0 maxValue: 7 - - label: "Reads mandatory attributes from DUT: ControlSequenceOfOperation" + - label: "Read attribute ControlSequenceOfOperation from DUT" + PICS: TSTAT.S.A001b command: "readAttribute" attribute: "ControlSequenceOfOperation" response: @@ -249,7 +425,8 @@ tests: minValue: 0 maxValue: 5 - - label: "Reads mandatory attributes from DUT: SystemMode" + - label: "Read attribute SystemMode from DUT" + PICS: TSTAT.S.A001c command: "readAttribute" attribute: "SystemMode" response: diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_2_2.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_2_2.yaml index ab5fc6acb42b17..f402fa9f0ec0c9 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_2_2.yaml @@ -31,12 +31,124 @@ tests: - name: "nodeId" value: nodeId + - label: "Saving value for comparision in step 2a read MinCoolSetpointLimit" + PICS: TSTAT.S.A0017 + command: "readAttribute" + attribute: "MinCoolSetpointLimit" + response: + saveAs: MinCoolSetpointLimit + + - label: "Saving value for comparision in step 2a read MaxCoolSetpointLimit" + PICS: TSTAT.S.A0018 + command: "readAttribute" + attribute: "MaxCoolSetpointLimit" + response: + saveAs: MaxCoolSetpointLimit + + - label: + "Saving value for comparision in step 2c read attribute + MinSetpointDeadBand" + PICS: TSTAT.S.A0019 + command: "readAttribute" + attribute: "MinSetpointDeadBand" + response: + saveAs: MinSetpointDeadBand + + - label: "Saving value for comparision in step 3a read MinHeatSetpointLimit" + PICS: TSTAT.S.A0015 + command: "readAttribute" + attribute: "MinHeatSetpointLimit" + response: + saveAs: MinHeatSetpointLimit + + - label: + "Saving value for comparision in step 3 reads + UnoccupiedCoolingSetpoint attribute" + command: "readAttribute" + attribute: "UnoccupiedCoolingSetpoint" + PICS: TSTAT.S.A0013 + response: + saveAs: UnoccupiedCoolingSetpoint + + - label: "Saving value for comparision in step 3a read MaxHeatSetpointLimit" + PICS: TSTAT.S.A0016 + command: "readAttribute" + attribute: "MaxHeatSetpointLimit" + response: + saveAs: MaxHeatSetpointLimit + + - label: + "Saving value for comparision in step3c read attribute + OccupiedHeatingSetpoint" + PICS: TSTAT.S.A0012 + command: "readAttribute" + attribute: "OccupiedHeatingSetpoint" + response: + saveAs: OccupiedHeatingSetpoint + + - label: + "Saving value for comparision in step3c read attribute + OccupiedCoolingSetpoint" + PICS: TSTAT.S.A0011 + command: "readAttribute" + attribute: "OccupiedCoolingSetpoint" + response: + saveAs: OccupiedCoolingSetpoint + + - label: + "Saving value for comparision in step 6a read attribute + AbsMinHeatSetpointLimit" + command: "readAttribute" + attribute: "AbsMinHeatSetpointLimit" + PICS: TSTAT.S.A0003 + response: + saveAs: AbsMinHeatSetpointLimitValue + + - label: + "Saving value for comparision in step 7a read attribute + AbsMaxHeatSetpointLimit" + command: "readAttribute" + attribute: "AbsMaxHeatSetpointLimit" + PICS: TSTAT.S.A0004 + response: + saveAs: AbsMaxHeatSetpointLimitValue + + - label: + "Saving value for comparision in step 8a read attribute + AbsMinCoolSetpointLimit" + command: "readAttribute" + attribute: "AbsMinCoolSetpointLimit" + PICS: TSTAT.S.A0005 + response: + saveAs: AbsMinCoolSetpointLimit + + - label: + "Saving value for comparision in step9a read attribute + AbsMaxCoolSetpointLimit" + command: "readAttribute" + attribute: "AbsMaxCoolSetpointLimit" + PICS: TSTAT.S.A0006 + response: + saveAs: AbsMaxCoolSetpointLimit + + #Using saved values when optional attributes are available + - label: "Read attribute OccupiedCoolingSetpoint from the DUT" + PICS: TSTAT.S.F01 && TSTAT.S.A0017 && TSTAT.S.A0018 + command: "readAttribute" + attribute: "OccupiedCoolingSetpoint" + response: + constraints: + type: int16s + minValue: MinCoolSetpointLimit + maxValue: MaxCoolSetpointLimit + + #Using hard coded values when optional attributes are not available - label: "Reads OccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is within range" command: "readAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.F01 + PICS: TSTAT.S.F01 && !TSTAT.S.A0017 && !TSTAT.S.A0018 response: constraints: type: int16s @@ -63,61 +175,141 @@ tests: - label: "Writes OccupiedCoolingSetpoint to value below the - ABSMinCoolSetpointLimit" + MinCoolSetpointLimit" command: "writeAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.F01 + PICS: TSTAT.S.F01 && !TSTAT.S.A0017 arguments: value: 30 response: error: CONSTRAINT_ERROR + #MinCoolSetPointLimit might be negative if not checked before decrement + - label: + "Writes OccupiedCoolingSetpoint to value below the + MinCoolSetpointLimit" + PICS: TSTAT.S.F01 && TSTAT.S.A0017 && PICS_SKIP_SAMPLE_APP + verification: | + Optional attribute so its not compulsory to get the expected outcome + + ./chip-tool thermostat write occupied-cooling-setpoint 3600 1 1 + On TH(chip-tool) verify that DUT sends a CONSTRAINT_ERROR (0x87) + [1658386056.238286][2906:2911] CHIP:DMG: } + [1658386056.238356][2906:2911] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1658386056.238389][2906:2911] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) + [1658386056.238449][2906:2911] CHIP:EM: Sending Standalone Ack for MessageCounter:41416222 on exchange 5788i + [1658386056.238525][2906:2911] CHIP:IN: Prepared secure message 0xffffa77ed9e8 to 0x0000000000000001 (1) of type 0x10 and protocolId (0, 0) on exchange 5788i with MessageCounter:113884573 + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Please enter 'y' after success" + - name: "expectedValue" + value: "y" + - label: "Writes OccupiedCoolingSetpoint to value above the MaxCoolSetpointLimit" command: "writeAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.F01 + PICS: TSTAT.S.F01 && !TSTAT.S.A0017 arguments: value: 4000 response: error: CONSTRAINT_ERROR + - label: + "Writes OccupiedCoolingSetpoint to value above the + MaxCoolSetpointLimit" + command: "writeAttribute" + attribute: "OccupiedCoolingSetpoint" + PICS: TSTAT.S.F01 && TSTAT.S.A0017 + arguments: + value: MaxCoolSetpointLimit + 1000 + response: + error: CONSTRAINT_ERROR + - label: "Writes the limit of MinCoolSetpointLimit to OccupiedCoolingSetpoint attribute" command: "writeAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.F01 && !TSTAT.S.F05 + PICS: TSTAT.S.F01 && !TSTAT.S.F05 && !TSTAT.S.A0017 arguments: value: 1600 - label: - "Writes the CoolingSetpoint below the HeatingSetpoint when auto is - enabled" + "Writes the limit of MinCoolSetpointLimit to OccupiedCoolingSetpoint + attribute" command: "writeAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.F05 + PICS: TSTAT.S.F01 && !TSTAT.S.F05 && TSTAT.S.A0017 arguments: - value: 1600 - response: - error: CONSTRAINT_ERROR + value: MinCoolSetpointLimit + + #LowerLimit = Max(MinCoolSetpointLimit,(OccupiedHeatingSetpoint + MinSetpointDeadBand)) not possible in YAML + - label: + "Writes If TSTAT.S.F05(AUTO) LowerLimit = Max(MinCoolSetpointLimit, + (OccupiedHeatingSetpoint + MinSetpointDeadBand)) to + OccupiedCoolingSetpoint attribute when Auto is enabled" + PICS: TSTAT.S.F05 && TSTAT.S.A0012 && PICS_SKIP_SAMPLE_APP + verification: | + Optional attribute so its not compulsory to get the expected outcome + + ./chip-tool thermostat write occupied-cooling-setpoint 1600 1 1 + On TH(chip-tool) verify that DUT sends a success response + + [1658386056.238356][2906:2911] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1658386056.238389][2906:2911] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) + [1658386056.238449][2906:2911] CHIP:EM: Sending Standalone Ack for MessageCounter:41416222 on exchange 5788i + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Please enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Writes the limit of MaxCoolSetpointLimit to OccupiedCoolingSetpoint attribute" command: "writeAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.F01 + PICS: TSTAT.S.F01 && !TSTAT.S.A0017 arguments: value: 3200 + - label: + "Writes the limit of MaxCoolSetpointLimit to OccupiedCoolingSetpoint + attribute" + command: "writeAttribute" + attribute: "OccupiedCoolingSetpoint" + PICS: TSTAT.S.F01 && TSTAT.S.A0017 + arguments: + value: MaxCoolSetpointLimit + + #Using saved values when optional attributes are available - label: "Reads OccupiedHeatingSetpoint attribute from Server DUT and verifies that the value is within range" command: "readAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: TSTAT.S.F00 + PICS: TSTAT.S.F00 && TSTAT.S.A0015 && TSTAT.S.A0016 + response: + constraints: + type: int16s + minValue: MinHeatSetpointLimit + maxValue: MaxHeatSetpointLimit + + #Using hard coded values when optional attributes are not available + - label: + "Reads OccupiedHeatingSetpoint attribute from Server DUT and verifies + that the value is within range" + command: "readAttribute" + attribute: "OccupiedHeatingSetpoint" + PICS: TSTAT.S.F00 && !TSTAT.S.A0015 && !TSTAT.S.A0016 response: constraints: type: int16s @@ -147,47 +339,83 @@ tests: MinHeatSetpointLimit" command: "writeAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: TSTAT.S.F00 + PICS: TSTAT.S.F00 && !TSTAT.S.A0015 arguments: value: 600 response: error: CONSTRAINT_ERROR + #MinHeatSetpointLimit might be negative if not checked before decrement + - label: + "Writes OccupiedHeatingSetpoint to value below the + MinHeatSetpointLimit" + PICS: TSTAT.S.F00 && TSTAT.S.A0015 && PICS_SKIP_SAMPLE_APP + verification: | + Optional Attribute - + + ./chip-tool thermostat write occupied-heating-setpoint 5000 1 1 + + On TH(chip-tool) verify that DUT sends a CONSTRAINT_ERROR (0x87) + [1658388388.725344][3134:3139] CHIP:DMG: InteractionModelRevision = 1 + [1658388388.725388][3134:3139] CHIP:DMG: } + [1658388388.725505][3134:3139] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1658388388.725558][3134:3139] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) + [1658388388.725618][3134:3139] CHIP:EM: Sending Standalone Ack for MessageCounter:199663269 on exchange 29439i + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Please enter 'y' after success" + - name: "expectedValue" + value: "y" + - label: "Writes OccupiedHeatingSetpoint to value above the MaxHeatSetpointLimit" command: "writeAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: TSTAT.S.F00 + PICS: TSTAT.S.F00 && !TSTAT.S.A0016 arguments: value: 4010 response: error: CONSTRAINT_ERROR + - label: + "Writes OccupiedHeatingSetpoint to value above the + MaxHeatSetpointLimit" + command: "writeAttribute" + attribute: "OccupiedHeatingSetpoint" + PICS: TSTAT.S.F00 && TSTAT.S.A0016 + arguments: + value: MaxHeatSetpointLimit + 1000 + response: + error: CONSTRAINT_ERROR + - label: "Writes the limit of MinHeatSetpointLimit to OccupiedHeatingSetpoint attribute" command: "writeAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: TSTAT.S.F00 + PICS: TSTAT.S.F00 && !TSTAT.S.A0015 arguments: value: 700 - label: - "Reads it back again to confirm the successful write of - OccupiedHeatingSetpoint attribute" - command: "readAttribute" + "Writes the limit of MinHeatSetpointLimit to OccupiedHeatingSetpoint + attribute" + command: "writeAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: TSTAT.S.F00 - response: - value: 700 + PICS: TSTAT.S.F00 && TSTAT.S.A0015 + arguments: + value: MinHeatSetpointLimit - label: "Writes the limit of MaxHeatSetpointLimit to OccupiedHeatingSetpoint attribute" command: "writeAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: TSTAT.S.F00 && !TSTAT.S.F05 + PICS: TSTAT.S.F00 && !TSTAT.S.F05 && !TSTAT.S.A0016 arguments: value: 3000 @@ -196,18 +424,72 @@ tests: attribute" command: "writeAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: TSTAT.S.F05 + PICS: TSTAT.S.F00 && !TSTAT.S.F05 && TSTAT.S.A0016 + arguments: + value: MaxHeatSetpointLimit + + - label: + "Writes the limit of MaxHeatSetpointLimit to OccupiedHeatingSetpoint + attribute" + command: "writeAttribute" + attribute: "OccupiedHeatingSetpoint" + PICS: TSTAT.S.F05 && !TSTAT.S.A0015 arguments: value: 3000 response: error: CONSTRAINT_ERROR + #UpperLimit = Min(MaxHeatSetpointLimit,(OccupiedCoolingSetpoint - MinSetpointDeadBand)) not possible in YAML + - label: + "Writes If TSTAT.S.F05(AUTO) UpperLimit = Min(MaxHeatSetpointLimit, + (OccupiedCoolingSetpoint - MinSetpointDeadBand)) to + OccupiedHeatingSetpoint attribute when Auto is enabled" + PICS: + TSTAT.S.F05 && TSTAT.S.A0011 && TSTAT.S.A0012 && PICS_SKIP_SAMPLE_APP + verification: | + ./chip-tool thermostat write occupied-heating-setpoint 2200 1 1 + On TH(chip-tool) verify that DUT sends a success response + [1661755950.285710][3540:3545] CHIP:DMG: StatusIB = + [1661755950.285739][3540:3545] CHIP:DMG: { + [1661755950.285769][3540:3545] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), + [1661755950.285799][3540:3545] CHIP:DMG: }, + [1661755950.285831][3540:3545] CHIP:DMG: + [1661755950.285855][3540:3545] CHIP:DMG: }, + + ./chip-tool thermostat read occupied-heating-setpoint 1 1 + + On TH(chip-tool) verify that the occupied heating setpoint attribute value which is provided in previous step + [1661756337.957444][3574:3579] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0201 Attribute 0x0000_0012 DataVersion: 1052267276 + [1661756337.957573][3574:3579] CHIP:TOO: OccupiedHeatingSetpoint: 2000 + [1661756337.957876][3574:3579] CHIP:EM: Sending Standalone Ack for MessageCounter:176529588 on exchange 9927i + [1661756337.958020][3574:3579] CHIP:IN: Prepared secure message 0xffff867cd978 to 0x0000000000000001 (1) of type 0x10 and p + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Please enter 'y' after success" + - name: "expectedValue" + value: "y" + - label: "Reads UnoccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is within range" command: "readAttribute" attribute: "UnoccupiedCoolingSetpoint" - PICS: TSTAT.S.F02 && TSTAT.S.F01 + PICS: TSTAT.S.F02 && TSTAT.S.F01 && TSTAT.S.A0017 && TSTAT.S.A0018 + response: + constraints: + type: int16s + minValue: MinCoolSetpointLimit + maxValue: MaxCoolSetpointLimit + + - label: + "Reads UnoccupiedCoolingSetpoint attribute from Server DUT and + verifies that the value is within range" + command: "readAttribute" + attribute: "UnoccupiedCoolingSetpoint" + PICS: TSTAT.S.F02 && TSTAT.S.F01 && !TSTAT.S.A0017 && !TSTAT.S.A0018 response: constraints: type: int16s @@ -237,47 +519,148 @@ tests: MinCoolSetpointLimit" command: "writeAttribute" attribute: "UnoccupiedCoolingSetpoint" - PICS: TSTAT.S.F02 && TSTAT.S.F01 + PICS: TSTAT.S.F02 && TSTAT.S.F01 && !TSTAT.S.A0017 arguments: value: 1002 response: error: CONSTRAINT_ERROR + #MinCoolSetpointLimit might be negative if not checked before decrement + - label: + "Writes UnoccupiedCoolingSetpoint to value below the + MinCoolSetpointLimit" + PICS: TSTAT.S.F02 && TSTAT.S.F01 && TSTAT.S.A0017 && PICS_SKIP_SAMPLE_APP + verification: | + Optional Attribute - If it is supported, then in TH(chip-tool) log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + ./chip-tool thermostat write unoccupied-cooling-setpoint 2200 1 1 + + https://github.com/project-chip/connectedhomeip/issues/15627 + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Please enter 'y' after success" + - name: "expectedValue" + value: "y" + - label: "Writes UnoccupiedCoolingSetpoint to value above the MaxCoolSetpointLimit" command: "writeAttribute" attribute: "UnoccupiedCoolingSetpoint" - PICS: TSTAT.S.F02 && TSTAT.S.F01 + PICS: TSTAT.S.F02 && TSTAT.S.F01 && !TSTAT.S.A0018 arguments: value: 4010 response: error: CONSTRAINT_ERROR + - label: + "Writes UnoccupiedCoolingSetpoint to value above the + MaxCoolSetpointLimit" + command: "writeAttribute" + attribute: "UnoccupiedCoolingSetpoint" + PICS: TSTAT.S.F02 && TSTAT.S.F01 && TSTAT.S.A0018 + arguments: + value: MaxCoolSetpointLimit + 1000 + response: + error: CONSTRAINT_ERROR + - label: "Writes the limit of MinCoolSetpointLimit to UnoccupiedCoolingSetpoint attribute" command: "writeAttribute" attribute: "UnoccupiedCoolingSetpoint" - PICS: TSTAT.S.F02 && TSTAT.S.F01 + PICS: TSTAT.S.F02 && TSTAT.S.F01 && !TSTAT.S.A0017 && !TSTAT.S.F05 arguments: - value: 1800 + value: 1600 + + - label: + "Writes the limit of MinCoolSetpointLimit to UnoccupiedCoolingSetpoint + attribute" + command: "writeAttribute" + attribute: "UnoccupiedCoolingSetpoint" + PICS: TSTAT.S.F02 && TSTAT.S.F01 && !TSTAT.S.A0017 && TSTAT.S.F05 + arguments: + value: 1600 + response: + error: CONSTRAINT_ERROR + + - label: + "Writes the limit of MinCoolSetpointLimit to UnoccupiedCoolingSetpoint + attribute" + command: "writeAttribute" + attribute: "UnoccupiedCoolingSetpoint" + PICS: TSTAT.S.F02 && TSTAT.S.F01 && TSTAT.S.A0017 && !TSTAT.S.F05 + arguments: + value: MinCoolSetpointLimit + + #LowerLimit = Max(MinCoolSetpointLimit,(UnoccupiedCoolingSetpoint + MinSetpointDeadBand)) not possible in YAML + - label: + "Writes If TSTAT.S.F05(AUTO) LowerLimit = Max(MinCoolSetpointLimit, + (UnoccupiedCoolingSetpoint + MinSetpointDeadBand)) to + UnoccupiedCoolingSetpoint attribute" + PICS: + TSTAT.S.F02 && TSTAT.S.F01 && TSTAT.S.A0013 && TSTAT.S.F05 && + PICS_SKIP_SAMPLE_APP + verification: | + Optional Attribute - If it is supported, then in TH(chip-tool) log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + ./chip-tool thermostat read unoccupied-cooling-setpoint 1 1 + + Verify in TH(chip-tool) Log: + + [1650451290.847810][5403:5408] CHIP:TOO: Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE) + [1650451290.847903][5403:5408] CHIP:EM: Sending Standalone Ack for MessageCounter:5212350 on exchange 30170i + https://github.com/project-chip/connectedhomeip/issues/15627 + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Please enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Writes the limit of MaxCoolSetpointLimit to UnoccupiedCoolingSetpoint attribute" command: "writeAttribute" attribute: "UnoccupiedCoolingSetpoint" - PICS: TSTAT.S.F02 && TSTAT.S.F01 + PICS: TSTAT.S.F02 && TSTAT.S.F01 && !TSTAT.S.A0018 && !TSTAT.S.F05 arguments: - value: 3000 + value: 3200 + + - label: + "Writes the limit of MaxCoolSetpointLimit to UnoccupiedCoolingSetpoint + attribute" + command: "writeAttribute" + attribute: "UnoccupiedCoolingSetpoint" + PICS: TSTAT.S.F02 && TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.F05 + arguments: + value: MaxCoolSetpointLimit + #Using saved values when optional attributes are available - label: "Reads UnoccupiedHeatingSetpoint attribute from Server DUT and verifies that the value is within range" command: "readAttribute" attribute: "UnoccupiedHeatingSetpoint" - PICS: TSTAT.S.F02 && TSTAT.S.F00 + PICS: TSTAT.S.F02 && TSTAT.S.F00 && TSTAT.S.A0015 && TSTAT.S.A0016 + response: + constraints: + type: int16s + minValue: MinHeatSetpointLimit + maxValue: MaxHeatSetpointLimit + + #Using hardcoded values when optional attributes are not available + - label: + "Reads UnoccupiedHeatingSetpoint attribute from Server DUT and + verifies that the value is within range" + command: "readAttribute" + attribute: "UnoccupiedHeatingSetpoint" + PICS: TSTAT.S.F02 && TSTAT.S.F00 && !TSTAT.S.A0015 && !TSTAT.S.A0016 response: constraints: type: int16s @@ -307,47 +690,153 @@ tests: MinHeatSetpointLimit" command: "writeAttribute" attribute: "UnoccupiedHeatingSetpoint" - PICS: TSTAT.S.F02 && TSTAT.S.F00 + PICS: TSTAT.S.F02 && TSTAT.S.F00 && !TSTAT.S.A0015 arguments: value: 500 response: error: CONSTRAINT_ERROR + #MinHeatSetpointLimit might be negative if not checked before decrement + - label: + "Writes UnoccupiedHeatingSetpoint to value below the + MinHeatSetpointLimit" + PICS: TSTAT.S.F02 && TSTAT.S.F00 && TSTAT.S.A0015 && PICS_SKIP_SAMPLE_APP + verification: | + Optional Attribute - If it is supported, then in TH(chip-tool) log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + ./chip-tool thermostat read unoccupied-heating-setpoint 1 1 + As its an optional attribute, we are not getting expected result + [1658389018.789254][3201:3206] CHIP:DMG: SuppressResponse = true, + [1658389018.789288][3201:3206] CHIP:DMG: InteractionModelRevision = 1 + [1658389018.789312][3201:3206] CHIP:DMG: } + [1658389018.789426][3201:3206] CHIP:TOO: Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE) + [1658389018.789511][3201:3206] CHIP:EM: Sending Standalone Ack for MessageCounter:175660806 on exchange 16788i + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Please enter 'y' after success" + - name: "expectedValue" + value: "y" + - label: "Writes UnoccupiedHeatingSetpoint to value above the MaxHeatSetpointLimit" command: "writeAttribute" attribute: "UnoccupiedHeatingSetpoint" - PICS: TSTAT.S.F02 && TSTAT.S.F00 + PICS: TSTAT.S.F02 && TSTAT.S.F00 && !TSTAT.S.A0016 arguments: value: 4010 response: error: CONSTRAINT_ERROR + - label: + "Writes UnoccupiedHeatingSetpoint to value above the + MaxHeatSetpointLimit" + command: "writeAttribute" + attribute: "UnoccupiedHeatingSetpoint" + PICS: TSTAT.S.F02 && TSTAT.S.F00 && TSTAT.S.A0016 + arguments: + value: MaxHeatSetpointLimit + 1000 + response: + error: CONSTRAINT_ERROR + - label: "Writes the limit of MinHeatSetpointLimit to UnoccupiedHeatingSetpoint attribute" command: "writeAttribute" attribute: "UnoccupiedHeatingSetpoint" - PICS: TSTAT.S.F02 && TSTAT.S.F00 + PICS: TSTAT.S.F02 && TSTAT.S.F00 && !TSTAT.S.A0015 + arguments: + value: 700 + + - label: + "Writes the limit of MinHeatSetpointLimit to UnoccupiedHeatingSetpoint + attribute" + command: "writeAttribute" + attribute: "UnoccupiedHeatingSetpoint" + PICS: TSTAT.S.F02 && TSTAT.S.F00 && TSTAT.S.A0015 arguments: - value: 1800 + value: MinHeatSetpointLimit - label: "Writes the limit of MaxHeatSetpointLimit to UnoccupiedHeatingSetpoint attribute" command: "writeAttribute" attribute: "UnoccupiedHeatingSetpoint" - PICS: TSTAT.S.F02 && TSTAT.S.F00 + PICS: TSTAT.S.F02 && TSTAT.S.F00 && !TSTAT.S.A0016 && !TSTAT.S.F05 arguments: value: 3000 + - label: + "Writes the limit of MaxHeatSetpointLimit to UnoccupiedHeatingSetpoint + attribute" + command: "writeAttribute" + attribute: "UnoccupiedHeatingSetpoint" + PICS: TSTAT.S.F02 && TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05 + arguments: + value: MaxHeatSetpointLimit + + - label: + "Writes the limit of MaxHeatSetpointLimit to UnoccupiedHeatingSetpoint + attribute" + command: "writeAttribute" + attribute: "UnoccupiedHeatingSetpoint" + PICS: TSTAT.S.F02 && TSTAT.S.F00 && !TSTAT.S.A0016 && TSTAT.S.F05 + arguments: + value: 3000 + response: + error: CONSTRAINT_ERROR + + #UpperLimit = Min(MaxHeatSetpointLimit,(UnoccupiedCoolingSetpoint - MinSetpointDeadBand)) not possible in YAML + - label: + "Writes If TSTAT.S.F05(AUTO) UpperLimit = Min(MaxHeatSetpointLimit, + (UnoccupiedCoolingSetpoint - MinSetpointDeadBand)) to + UnoccupiedHeatingSetpoint attribute when Auto is enabled." + PICS: + TSTAT.S.F02 && TSTAT.S.F00 && TSTAT.S.A0013 && TSTAT.S.F05 && + PICS_SKIP_SAMPLE_APP + verification: | + Optional Attribute - If it is supported, then in TH (chip-tool) log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + ./chip-tool thermostat read unoccupied-heating-setpoint 1 1 + As its an optional attribute, we are not getting expected result + [1658389070.439643][3209:3214] CHIP:DMG: + [1658389070.439678][3209:3214] CHIP:DMG: SuppressResponse = true, + [1658389070.439715][3209:3214] CHIP:DMG: InteractionModelRevision = 1 + [1658389070.439750][3209:3214] CHIP:DMG: } + [1658389070.439896][3209:3214] CHIP:TOO: Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE) + [1658389070.439997][3209:3214] CHIP:EM: Sending Standalone Ack for MessageCounter:26480890 on exchange 13280i + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Please enter 'y' after success" + - name: "expectedValue" + value: "y" + + #Using saved values when optional attributes are available - label: "Reads MinHeatSetpointLimit attribute from Server DUT and verifies that the value is within range" command: "readAttribute" attribute: "MinHeatSetpointLimit" - PICS: TSTAT.S.F00 && TSTAT.S.A0015 + PICS: TSTAT.S.F00 && TSTAT.S.A0015 && TSTAT.S.A0016 && TSTAT.S.A0003 + response: + constraints: + type: int16s + minValue: AbsMinHeatSetpointLimitValue + maxValue: MaxHeatSetpointLimit + + #Using hard coded values when optional attributes are not available + - label: + "Reads MinHeatSetpointLimit attribute from Server DUT and verifies + that the value is within range" + command: "readAttribute" + attribute: "MinHeatSetpointLimit" + PICS: TSTAT.S.F00 && TSTAT.S.A0015 && !TSTAT.S.A0016 && !TSTAT.S.A0003 response: constraints: type: int16s @@ -386,47 +875,149 @@ tests: AbsMinHeatSetpointLimit " command: "writeAttribute" attribute: "MinHeatSetpointLimit" - PICS: TSTAT.S.F00 && TSTAT.S.A0015 + PICS: TSTAT.S.F00 && TSTAT.S.A0015 && !TSTAT.S.A0003 arguments: - value: 650 + value: 100 response: error: CONSTRAINT_ERROR + #AbsMinHeatSetpointLimit might be negative if not checked before decrement + - label: + "Writes MinHeatSetpointLimit to value below the + AbsMinHeatSetpointLimit " + PICS: + TSTAT.S.F00 && TSTAT.S.A0015 && TSTAT.S.A0003 && PICS_SKIP_SAMPLE_APP + verification: | + ./chip-tool thermostat write min-heat-setpoint-limit 300 1 1 + On TH (chip-tool) verify that DUT sends a CONSTRAINT_ERROR (0x87) + [1658389492.560607][3266:3272] CHIP:DMG: InteractionModelRevision = 1 + [1658389492.560644][3266:3272] CHIP:DMG: } + [1658389492.560749][3266:3272] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1658389492.560915][3266:3272] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) + [1658389492.561002][3266:3272] CHIP:EM: Sending Standalone Ack for MessageCounter:252582472 on exchange 3434i + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Please enter 'y' after success" + - name: "expectedValue" + value: "y" + - label: "Writes MinHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit " command: "writeAttribute" attribute: "MinHeatSetpointLimit" - PICS: TSTAT.S.F00 && TSTAT.S.A0015 + PICS: TSTAT.S.F00 && TSTAT.S.A0015 && !TSTAT.S.A0016 arguments: value: 4050 response: error: CONSTRAINT_ERROR + - label: + "Writes MinHeatSetpointLimit to value above the + AbsMaxHeatSetpointLimit " + command: "writeAttribute" + attribute: "MinHeatSetpointLimit" + PICS: TSTAT.S.F00 && TSTAT.S.A0015 && TSTAT.S.A0016 + arguments: + value: MaxHeatSetpointLimit + 1000 + response: + error: CONSTRAINT_ERROR + - label: "Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute" command: "writeAttribute" attribute: "MinHeatSetpointLimit" - PICS: TSTAT.S.F00 && TSTAT.S.A0015 + PICS: TSTAT.S.F00 && TSTAT.S.A0015 && !TSTAT.S.A0003 arguments: value: 700 - label: - "Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit + "Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit + attribute" + command: "writeAttribute" + attribute: "MinHeatSetpointLimit" + PICS: TSTAT.S.F00 && TSTAT.S.A0015 && TSTAT.S.A0003 + arguments: + value: AbsMinHeatSetpointLimitValue + + - label: + "Writes the limit of MaxHeatSetpointLimit to MinHeatSetpointLimit attribute" command: "writeAttribute" attribute: "MinHeatSetpointLimit" - PICS: TSTAT.S.F00 && TSTAT.S.A0015 && !TSTAT.S.F05 + PICS: TSTAT.S.F00 && TSTAT.S.A0015 && !TSTAT.S.F05 && !TSTAT.S.A0016 arguments: value: 3000 + - label: + "Writes the limit of MaxHeatSetpointLimit to MinHeatSetpointimit + attribute" + command: "writeAttribute" + attribute: "MinHeatSetpointLimit" + PICS: TSTAT.S.F00 && TSTAT.S.A0015 && !TSTAT.S.F05 && TSTAT.S.A0016 + arguments: + value: MaxHeatSetpointLimit + + #UpperLimit = Min(MaxHeatSetpointLimit,(MinCoolSetpointLimit - MinSetpointDeadBand)) not possible in YAML + - label: + "Writes If TSTAT.S.F05(AUTO) UpperLimit = Min(MaxHeatSetpointLimit, + (MinCoolSetpointLimit - MinSetpointDeadBand)) to MinHeatSetpointLimit + attribute when Auto is enabled" + PICS: + TSTAT.S.F00 && TSTAT.S.A0015 && TSTAT.S.F05 && TSTAT.S.A0005 && + PICS_SKIP_SAMPLE_APP + verification: | + ./chip-tool thermostat write min-heat-setpoint-limit 1000 1 1 + + On TH(chip-tool) verify that DUT sends a success response + [1658389641.734245][3279:3284] CHIP:DMG: Endpoint = 0x1, + [1658389641.734285][3279:3284] CHIP:DMG: Cluster = 0x201, + [1658389641.734326][3279:3284] CHIP:DMG: Attribute = 0x0000_0015, + [1658389641.734360][3279:3284] CHIP:DMG: } + [1658389641.734402][3279:3284] CHIP:DMG: + [1658389641.734438][3279:3284] CHIP:DMG: StatusIB = + [1658389641.734475][3279:3284] CHIP:DMG: { + [1658389641.734512][3279:3284] CHIP:DMG: status = 0x00 (SUCCESS), + [1658389641.734549][3279:3284] CHIP:DMG: }, + [1658389641.734586][3279:3284] CHIP:DMG: + [1658389641.734617][3279:3284] CHIP:DMG: }, + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Please enter 'y' after success" + - name: "expectedValue" + value: "y" + + #Using saved values when optional attributes are available + - label: + "Reads MaxHeatSetpointLimit attribute from Server DUT and verifies + that the value is within range" + command: "readAttribute" + attribute: "MaxHeatSetpointLimit" + PICS: + TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05 && TSTAT.S.A0004 && + TSTAT.S.A0016 + response: + constraints: + type: int16s + minValue: MinHeatSetpointLimit + maxValue: AbsMaxHeatSetpointLimitValue + + #Using hard coded values when optional attributes are not available - label: "Reads MaxHeatSetpointLimit attribute from Server DUT and verifies that the value is within range" command: "readAttribute" attribute: "MaxHeatSetpointLimit" - PICS: TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05 + PICS: + " TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05 && !TSTAT.S.A0004 && + !TSTAT.S.A0016 " response: constraints: type: int16s @@ -476,47 +1067,159 @@ tests: AbsMinHeatSetpointLimit " command: "writeAttribute" attribute: "MaxHeatSetpointLimit" - PICS: TSTAT.S.F00 && TSTAT.S.A0016 + PICS: TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.A0015 arguments: value: 500 response: error: CONSTRAINT_ERROR + #MinHeatSetpointLimit might be negative if not checked before decrement + - label: + "Writes MaxHeatSetpointLimit to value below the MinHeatSetpointLimit" + PICS: + TSTAT.S.F00 && TSTAT.S.A0016 && TSTAT.S.A0015 && PICS_SKIP_SAMPLE_APP + verification: | + Optional Attribute - + + ./chip-tool thermostat write max-heat-setpoint-limit 7000 1 1 + + On TH(chip-tool) verify that DUT sends a CONSTRAINT_ERROR (0x87) + + [1658389771.305508][3310:3315] CHIP:DMG: ], + [1658389771.305555][3310:3315] CHIP:DMG: + [1658389771.305594][3310:3315] CHIP:DMG: InteractionModelRevision = 1 + [1658389771.305632][3310:3315] CHIP:DMG: } + [1658389771.305737][3310:3315] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1658389771.305785][3310:3315] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) + [1658389771.305867][3310:3315] CHIP:EM: Sending Standalone Ack for MessageCounter:187660216 on exchange 59285i + + ./chip-tool thermostat write max-heat-setpoint-limit 100 1 1 + On TH(chip-tool) verify that DUT sends a CONSTRAINT_ERROR (0x87) + [1658389806.716013][3316:3321] CHIP:DMG: + [1658389806.716046][3316:3321] CHIP:DMG: StatusIB = + [1658389806.716084][3316:3321] CHIP:DMG: { + [1658389806.716121][3316:3321] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), + [1658389806.716158][3316:3321] CHIP:DMG: }, + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Please enter 'y' after success" + - name: "expectedValue" + value: "y" + - label: "Writes MaxHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit " command: "writeAttribute" attribute: "MaxHeatSetpointLimit" - PICS: TSTAT.S.F00 && TSTAT.S.A0016 + PICS: TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.A0004 arguments: value: 4000 response: error: CONSTRAINT_ERROR - label: - "Writes the limit of AbsMinHeatSetpointLimit to MaxHeatSetpointLimit + "Writes MaxHeatSetpointLimit to value above the + AbsMaxHeatSetpointLimit " + command: "writeAttribute" + attribute: "MaxHeatSetpointLimit" + PICS: TSTAT.S.F00 && TSTAT.S.A0016 && TSTAT.S.A0004 + arguments: + value: AbsMaxHeatSetpointLimitValue + 1000 + response: + error: CONSTRAINT_ERROR + + - label: + "Writes the limit of MinHeatSetpointLimit to MaxHeatSetpointLimit attribute" command: "writeAttribute" attribute: "MaxHeatSetpointLimit" - PICS: TSTAT.S.F00 && TSTAT.S.A0016 + PICS: TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.A0015 arguments: value: 700 + - label: + "Writes the limit of MinHeatSetpointLimit to MaxHeatSetpointLimit + attribute" + command: "writeAttribute" + attribute: "MaxHeatSetpointLimit" + PICS: TSTAT.S.F00 && TSTAT.S.A0016 && TSTAT.S.A0015 + arguments: + value: MinHeatSetpointLimit + - label: "Writes the limit of AbsMaxHeatSetpointLimit to MaxHeatSetpointLimit attribute" command: "writeAttribute" attribute: "MaxHeatSetpointLimit" - PICS: TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05 + PICS: TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05 && !TSTAT.S.A0004 arguments: value: 3000 + - label: + "Writes the limit of AbsMaxHeatSetpointLimit to MaxHeatSetpointLimit + attribute" + command: "writeAttribute" + attribute: "MaxHeatSetpointLimit" + PICS: TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05 && TSTAT.S.A0004 + arguments: + value: AbsMaxHeatSetpointLimitValue + + #UpperLimit = Min(AbsMaxHeatSetpointLimit,(MaxCoolSetpointLimit - MinSetpointDeadBand)) not possible in YAML + - label: + "Writes If TSTAT.S.F05(AUTO) UpperLimit = Min(AbsMaxHeatSetpointLimit, + (MaxCoolSetpointLimit - MinSetpointDeadBand)) to MaxHeatSetpointLimit + attribute" + PICS: + TSTAT.S.F00 && TSTAT.S.A0016 && TSTAT.S.F05 && TSTAT.S.A0018 && + PICS_SKIP_SAMPLE_APP + verification: | + ./chip-tool thermostat write max-heat-setpoint-limit 2000 1 1 + On TH(chip-tool) verify that DUT sends a success response + [1658389911.809423][3333:3338] CHIP:DMG: Endpoint = 0x1, + [1658389911.809492][3333:3338] CHIP:DMG: Cluster = 0x201, + [1658389911.809562][3333:3338] CHIP:DMG: Attribute = 0x0000_0016, + [1658389911.809627][3333:3338] CHIP:DMG: } + [1658389911.809698][3333:3338] CHIP:DMG: + [1658389911.809761][3333:3338] CHIP:DMG: StatusIB = + [1658389911.809827][3333:3338] CHIP:DMG: { + [1658389911.809892][3333:3338] CHIP:DMG: status = 0x00 (SUCCESS), + [1658389911.809957][3333:3338] CHIP:DMG: }, + [1658389911.809994][3333:3338] CHIP:DMG: + [1658389911.810021][3333:3338] CHIP:DMG: }, + [1658389911.810051][3333:3338] CHIP:DMG: + [1658389911.810076][3333:3338] CHIP:DMG: ], + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Please enter 'y' after success" + - name: "expectedValue" + value: "y" + + #Using saved values when optional attributes are available - label: "Reads MinCoolSetpointLimit attribute from Server DUT and verifies that the value is within range" command: "readAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.F01 && TSTAT.S.A0017 + PICS: TSTAT.S.F01 && TSTAT.S.A0017 && TSTAT.S.A0018 && TSTAT.S.A0005 + response: + constraints: + type: int16s + minValue: AbsMinCoolSetpointLimit + maxValue: MaxCoolSetpointLimit + + #Using hard coded values when optional attributes are not available + - label: + "Reads MinCoolSetpointLimit attribute from Server DUT and verifies + that the value is within range" + command: "readAttribute" + attribute: "MinCoolSetpointLimit" + PICS: TSTAT.S.F01 && TSTAT.S.A0017 && !TSTAT.S.A0018 && !TSTAT.S.A0005 response: constraints: type: int16s @@ -546,55 +1249,145 @@ tests: AbsMinCoolSetpointLimit " command: "writeAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.F01 && TSTAT.S.A0017 + PICS: TSTAT.S.F01 && TSTAT.S.A0017 && !TSTAT.S.A0005 arguments: value: 1000 response: error: CONSTRAINT_ERROR + #AbsMinCoolSetpointLimit might be negative if not checked before decrement + - label: + "Writes MinCoolSetpointLimit to value below the + AbsMinCoolSetpointLimit" + PICS: + TSTAT.S.F01 && TSTAT.S.A0017 && TSTAT.S.A0005 && PICS_SKIP_SAMPLE_APP + verification: | + Optional Attribute - + + + ./chip-tool thermostat write max-heat-setpoint-limit 9000 1 1 + On TH(chip-tool) verify that DUT sends a CONSTRAINT_ERROR (0x87) + [1658390040.444407][3343:3348] CHIP:DMG: + [1658390040.444443][3343:3348] CHIP:DMG: }, + [1658390040.444483][3343:3348] CHIP:DMG: + [1658390040.444515][3343:3348] CHIP:DMG: ], + [1658390040.444553][3343:3348] CHIP:DMG: + [1658390040.444585][3343:3348] CHIP:DMG: InteractionModelRevision = 1 + [1658390040.444616][3343:3348] CHIP:DMG: } + [1658390040.444703][3343:3348] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1658390040.444744][3343:3348] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) + [1658390040.444843][3343:3348] CHIP:EM: Sending Standalone Ack for MessageCounter:137523063 on exchange 39419i + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Please enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Writes MinCoolSetpointLimit to value above the MaxCoolSetpointLimit " command: "writeAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.F01 && TSTAT.S.A0017 + PICS: TSTAT.S.F01 && TSTAT.S.A0017 && !TSTAT.S.A0018 arguments: value: 4000 response: error: CONSTRAINT_ERROR + - label: + "Writes MinCoolSetpointLimit to value above the MaxCoolSetpointLimit " + command: "writeAttribute" + attribute: "MinCoolSetpointLimit" + PICS: TSTAT.S.F01 && TSTAT.S.A0017 && TSTAT.S.A0018 + arguments: + value: MaxCoolSetpointLimit + 1000 + response: + error: CONSTRAINT_ERROR + - label: "Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute" command: "writeAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.F01 && TSTAT.S.A0017 + PICS: TSTAT.S.F01 && TSTAT.S.A0017 && !TSTAT.S.A0005 && !TSTAT.S.F05 arguments: value: 1600 + - label: + "Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit + attribute" + command: "writeAttribute" + attribute: "MinCoolSetpointLimit" + PICS: TSTAT.S.F01 && TSTAT.S.A0017 && TSTAT.S.A0005 && !TSTAT.S.F05 + arguments: + value: AbsMinCoolSetpointLimit + + #LowerLimit = Max(AbsMinCoolSetpointLimit,(MinHeatSetpointLimit + MinSetpointDeadBand)) not possible in YAML + - label: + "Writes If TSTAT.S.F05(AUTO) LowerLimit = Max(AbsMinCoolSetpointLimit, + (MinHeatSetpointLimit + MinSetpointDeadBand)) to MinCoolSetpointLimit + attribute" + PICS: + TSTAT.S.F01 && TSTAT.S.A0017 && TSTAT.S.A0015 && TSTAT.S.F05 && + PICS_SKIP_SAMPLE_APP + verification: | + ./chip-tool thermostat write max-heat-setpoint-limit 2000 1 1 + + Verify in TH(chip-tool) Log: + [1658390406.512865][3384:3389] CHIP:DMG: + [1658390406.512895][3384:3389] CHIP:DMG: StatusIB = + [1658390406.512927][3384:3389] CHIP:DMG: { + [1658390406.512958][3384:3389] CHIP:DMG: status = 0x00 (SUCCESS), + [1658390406.512992][3384:3389] CHIP:DMG: }, + [1658390406.513023][3384:3389] CHIP:DMG: + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Please enter 'y' after success" + - name: "expectedValue" + value: "y" + - label: "Writes the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute" command: "writeAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.F01 && TSTAT.S.A0017 + PICS: TSTAT.S.F01 && TSTAT.S.A0017 && !TSTAT.S.A0018 arguments: value: 3200 - label: - "Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit + "Writes the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute" command: "writeAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.F01 && TSTAT.S.A0017 + PICS: TSTAT.S.F01 && TSTAT.S.A0017 && TSTAT.S.A0018 arguments: - value: 1600 + value: MaxCoolSetpointLimit + #Using saved values when optional attributes are available - label: "Reads MaxCoolSetpointLimit attribute from Server DUT and verifies that the value is within range" command: "readAttribute" attribute: "MaxCoolSetpointLimit" - PICS: TSTAT.S.F01 && TSTAT.S.A0018 + PICS: TSTAT.S.F01 && TSTAT.S.A0018 && TSTAT.S.A0017 && TSTAT.S.A0006 + response: + constraints: + type: int16s + minValue: MinCoolSetpointLimit + maxValue: AbsMaxCoolSetpointLimit + + #Using hard coded values when optional attributes are not available + - label: + "Reads MaxCoolSetpointLimit attribute from Server DUT and verifies + that the value is within range" + command: "readAttribute" + attribute: "MaxCoolSetpointLimit" + PICS: TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.A0017 && !TSTAT.S.A0006 response: constraints: type: int16s @@ -624,40 +1417,131 @@ tests: AbsMinCoolSetpointLimit " command: "writeAttribute" attribute: "MaxCoolSetpointLimit" - PICS: TSTAT.S.F01 && TSTAT.S.A0018 + PICS: TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.A0017 arguments: value: 1000 response: error: CONSTRAINT_ERROR + #AbsMinCoolSetpointLimit might be negative if not checked before decrement + - label: + "Writes MaxCoolSetpointLimit to value below the + AbsMinCoolSetpointLimit" + PICS: + TSTAT.S.F01 && TSTAT.S.A0018 && TSTAT.S.A0017 && PICS_SKIP_SAMPLE_APP + verification: | + Optional attribute so its not compulsory to get the expected outcome + + ./chip-tool thermostat write max-cool-setpoint-limit 9100 1 1 + On TH(chip-tool)(chip-tool) verify that DUT sends a CONSTRAINT_ERROR (0x87) + [1658396137.669807][3677:3682] CHIP:DMG: + [1658396137.669832][3677:3682] CHIP:DMG: InteractionModelRevision = 1 + [1658396137.669857][3677:3682] CHIP:DMG: } + [1658396137.669929][3677:3682] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1658396137.669964][3677:3682] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) + [1658396137.670019][3677:3682] CHIP:EM: Sending Standalone Ack for MessageCounter:77698449 on exchange 47844i + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Please enter 'y' after success" + - name: "expectedValue" + value: "y" + - label: "Writes MaxCoolSetpointLimit to value above the MaxCoolSetpointLimit " command: "writeAttribute" attribute: "MaxCoolSetpointLimit" - PICS: TSTAT.S.F01 && TSTAT.S.A0018 + PICS: TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.A0006 arguments: value: 4000 response: error: CONSTRAINT_ERROR - label: - "Writes the limit of AbsMinCoolSetpointLimit to MaxCoolSetpointLimit + "Writes MaxCoolSetpointLimit to value above the MaxCoolSetpointLimit " + command: "writeAttribute" + attribute: "MaxCoolSetpointLimit" + PICS: TSTAT.S.F01 && TSTAT.S.A0018 && TSTAT.S.A0006 + arguments: + value: AbsMaxCoolSetpointLimit + 1000 + response: + error: CONSTRAINT_ERROR + + - label: + "Writes the limit of MinCoolSetpointLimit to MaxCoolSetpointLimit attribute" command: "writeAttribute" attribute: "MaxCoolSetpointLimit" - PICS: TSTAT.S.F01 && TSTAT.S.A0018 + PICS: TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.A0017 && !TSTAT.S.F05 arguments: value: 1600 - label: - "Writes the limit of MaxCoolSetpointLimit to MaxCoolSetpointLimit + "Writes the limit of MinCoolSetpointLimit to MaxCoolSetpointLimit attribute" command: "writeAttribute" attribute: "MaxCoolSetpointLimit" - PICS: TSTAT.S.F01 && TSTAT.S.A0018 + PICS: TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.A0017 && TSTAT.S.F05 + arguments: + value: 1600 + response: + error: CONSTRAINT_ERROR + + - label: + "Writes the limit of MinCoolSetpointLimit to MaxCoolSetpointLimit + attribute" + command: "writeAttribute" + attribute: "MaxCoolSetpointLimit" + PICS: TSTAT.S.F01 && TSTAT.S.A0018 && TSTAT.S.A0017 && !TSTAT.S.F05 + arguments: + value: MinCoolSetpointLimit + + #LowerLimit = Max(MinCoolSetpointLimit,(MaxHeatSetpointLimit + MinSetpointDeadBand)) not possible in YAML + - label: + "Writes If TSTAT.S.F05(AUTO) LowerLimit = Max(MinCoolSetpointLimit, + (MaxHeatSetpointLimit + MinSetpointDeadBand)) to MaxCoolSetpointLimit + attribute" + PICS: + TSTAT.S.F01 && TSTAT.S.A0018 && TSTAT.S.A0016 && TSTAT.S.F05 && + PICS_SKIP_SAMPLE_APP + verification: | + Optional attribute so its not compulsory to get the expected outcome + + ./chip-tool thermostat write max-cool-setpoint-limit 1600 1 1 + On TH verify that DUT sends a success response + [1661766260.648041][10448:10453] CHIP:DMG: StatusIB = + [1661766260.648070][10448:10453] CHIP:DMG: { + [1661766260.648100][10448:10453] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), + [1661766260.648127][10448:10453] CHIP:DMG: }, + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Please enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: + "Writes the limit of AbsMaxCoolSetpointLimit to MaxCoolSetpointLimit + attribute" + command: "writeAttribute" + attribute: "MaxCoolSetpointLimit" + PICS: TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.A0006 arguments: value: 3200 + - label: + "Writes the limit of AbsMaxCoolSetpointLimit to MaxCoolSetpointLimit + attribute" + command: "writeAttribute" + attribute: "MaxCoolSetpointLimit" + PICS: TSTAT.S.F01 && TSTAT.S.A0018 && TSTAT.S.A0006 + arguments: + value: AbsMaxCoolSetpointLimit + - label: "Writes (sets back) default value of MinHeatSetpointLimit" command: "writeAttribute" attribute: "MinHeatSetpointLimit" diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 2ea5356c2a5227..ef88de3db001b2 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -2218,12 +2218,7 @@ class Test_TC_ACL_2_2Suite : public TestCommand break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 31UL)); - } + shouldContinue = true; break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); @@ -2254,8 +2249,14 @@ class Test_TC_ACL_2_2Suite : public TestCommand } case 2: { LogStep(2, "TH1 reads DUT Descriptor cluster ServerList attribute from every Endpoint except 0"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Descriptor::Id, Descriptor::Attributes::ServerList::Id, true, - chip::NullOptional); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -22593,7 +22594,7 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand { public: Test_TC_AUDIOOUTPUT_1_8Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_AUDIOOUTPUT_1_8", 7, credsIssuerConfig) + TestCommand("Test_TC_AUDIOOUTPUT_1_8", 6, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -22674,20 +22675,6 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand } break; case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 0)); - VerifyOrReturn(CheckValue("generatedCommandList[0]", iter_0.GetValue(), 1UL)); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 1)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -22743,13 +22730,6 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand } case 5: { LogStep(5, "Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("AUDIOOUTPUT.S.NU"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::GeneratedCommandList::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip(" !AUDIOOUTPUT.S.NU "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -24302,11 +24282,7 @@ class Test_TC_APPLAUNCHER_3_8Suite : public TestCommand break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value, 0U)); - } + shouldContinue = true; break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); @@ -24347,8 +24323,13 @@ class Test_TC_APPLAUNCHER_3_8Suite : public TestCommand } case 2: { LogStep(2, "Reads the Status attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::Status::Id, - true, chip::NullOptional); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -33640,7 +33621,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand class Test_TC_TSTAT_2_1Suite : public TestCommand { public: - Test_TC_TSTAT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_2_1", 50, credsIssuerConfig) + Test_TC_TSTAT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_2_1", 68, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -33661,6 +33642,16 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + int16_t AbsMinCoolSetpointLimitStep5; + int8_t MinSetpointDeadBand; + int16_t AbsMaxCoolSetpointLimitStep6; + int16_t MinCoolSetpointLimit; + int16_t MaxCoolSetpointLimit; + int16_t OccupiedCoolingSetpoint; + int16_t AbsMinHeat; + int16_t AbsMaxHeat; + int16_t UnoccupiedCoolingSetpoint; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -33678,6 +33669,78 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand shouldContinue = true; break; case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + AbsMinCoolSetpointLimitStep5 = value; + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + MinSetpointDeadBand = value; + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + AbsMaxCoolSetpointLimitStep6 = value; + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + MinCoolSetpointLimit = value; + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + MaxCoolSetpointLimit = value; + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + OccupiedCoolingSetpoint = value; + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + AbsMinHeat = value; + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + AbsMaxHeat = value; + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + UnoccupiedCoolingSetpoint = value; + } + break; + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -33687,7 +33750,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; - case 2: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -33697,7 +33760,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; - case 3: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -33707,7 +33770,25 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); } break; - case 4: + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMaxValue("value", value, AbsMinCoolSetpointLimitStep5 - MinSetpointDeadBand)); + } + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 1575)); + } + break; + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; @@ -33717,7 +33798,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; - case 5: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; @@ -33727,7 +33808,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; - case 6: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; @@ -33737,7 +33818,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; - case 7: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; @@ -33747,7 +33828,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; - case 8: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -33757,7 +33838,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } break; - case 9: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -33767,7 +33848,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } break; - case 10: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -33777,17 +33858,27 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 63U)); } break; - case 11: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "int8s", "int8s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 25)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, -25)); + VerifyOrReturn(CheckConstraintMinValue("value", value, -25)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 25)); } break; - case 12: + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, MinCoolSetpointLimit)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxCoolSetpointLimit)); + } + break; + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; @@ -33797,7 +33888,17 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); } break; - case 13: + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, AbsMinCoolSetpointLimitStep5)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, OccupiedCoolingSetpoint - MinSetpointDeadBand)); + } + break; + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; @@ -33807,7 +33908,17 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); } break; - case 14: + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, AbsMinHeat)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, AbsMaxHeat)); + } + break; + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; @@ -33817,7 +33928,17 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); } break; - case 15: + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, UnoccupiedCoolingSetpoint - MinSetpointDeadBand)); + } + break; + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; @@ -33827,7 +33948,17 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); } break; - case 16: + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, MinCoolSetpointLimit - MinSetpointDeadBand)); + } + break; + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; @@ -33837,37 +33968,57 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); } break; - case 17: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); } break; - case 18: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxCoolSetpointLimit - MinSetpointDeadBand)); } break; - case 19: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + VerifyOrReturn(CheckConstraintMinValue("value", value, AbsMinCoolSetpointLimitStep5)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxCoolSetpointLimit)); } break; - case 20: + case 36: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); + } + break; + case 37: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, MinCoolSetpointLimit)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, AbsMaxCoolSetpointLimitStep6)); + } + break; + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int8_t value; @@ -33877,7 +34028,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 25)); } break; - case 21: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -33887,7 +34038,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); } break; - case 22: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Thermostat::ThermostatControlSequence value; @@ -33897,7 +34048,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); } break; - case 23: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -33907,7 +34058,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); } break; - case 24: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -33917,7 +34068,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); } break; - case 25: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -33927,7 +34078,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); } break; - case 26: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -33937,7 +34088,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 27: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -33947,7 +34098,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 28: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -33957,7 +34108,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); } break; - case 29: + case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -33967,7 +34118,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 1440U)); } break; - case 30: + case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -33977,7 +34128,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); } break; - case 31: + case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -33987,7 +34138,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 127U)); } break; - case 32: + case 50: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -33997,7 +34148,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); } break; - case 33: + case 51: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -34007,7 +34158,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; - case 34: + case 52: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -34015,7 +34166,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "utc", "utc")); } break; - case 35: + case 53: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -34025,7 +34176,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 36: + case 54: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -34035,7 +34186,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 37: + case 55: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -34045,7 +34196,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 38: + case 56: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -34055,7 +34206,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 39: + case 57: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -34065,7 +34216,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 40: + case 58: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -34075,7 +34226,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 41: + case 59: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -34085,7 +34236,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 42: + case 60: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -34095,7 +34246,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); } break; - case 43: + case 61: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -34105,7 +34256,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 44: + case 62: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -34115,7 +34266,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; - case 45: + case 63: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -34125,7 +34276,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; - case 46: + case 64: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -34133,7 +34284,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; - case 47: + case 65: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -34143,7 +34294,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); } break; - case 48: + case 66: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -34153,7 +34304,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; - case 49: + case 67: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -34185,292 +34336,412 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Reads mandatory attributes from DUT: LocalTemperature"); + LogStep(1, "Saving value for comparision in step 5 read AbsMinCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::AbsMinCoolSetpointLimit::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Saving value for comparision in step 5 read attribute MinSetpointDeadBand attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, + true, chip::NullOptional); + } + case 3: { + LogStep(3, "Saving value for comparision in step 6 read AbsMaxCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::AbsMaxCoolSetpointLimit::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "Saving value for comparision in step 17 read MinCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, + true, chip::NullOptional); + } + case 5: { + LogStep(5, "Saving value for comparision in step 17 read MaxCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, + true, chip::NullOptional); + } + case 6: { + LogStep(6, "Saving value for comparision in step 13 read attribute OccupiedCoolingSetpoint"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::OccupiedCoolingSetpoint::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "Saving value for comparision in step 15 read attribute AbsMinHeatSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::AbsMinHeatSetpointLimit::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "Saving value for comparision in step 15 read attribute AbsMaxHeatSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::AbsMaxHeatSetpointLimit::Id, true, chip::NullOptional); + } + case 9: { + LogStep(9, "Saving value for comparision in step 16 read UnoccupiedCoolingSetpoint attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id, true, chip::NullOptional); + } + case 10: { + LogStep(10, "Reads mandatory attributes from DUT: LocalTemperature"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::LocalTemperature::Id, true, chip::NullOptional); } - case 2: { - LogStep(2, "Read OutdoorTemperature attribute from the DUT"); + case 11: { + LogStep(11, "Read OutdoorTemperature attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OutdoorTemperature::Id, true, chip::NullOptional); } - case 3: { - LogStep(3, "Read Occupancy attribute from the DUT"); + case 12: { + LogStep(12, "Read Occupancy attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::Occupancy::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Reads mandatory attributes from DUT: AbsMinHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 13: { + LogStep(13, "Read attribute AbsMinHeatSetpointLimit if TSTAT.S.F05 feature is supported"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0003 && TSTAT.S.A0005 && TSTAT.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AbsMinHeatSetpointLimit::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Reads mandatory attributes from DUT: AbsMaxHeatSetpointLimit"); + case 14: { + LogStep(14, "Read attribute AbsMinHeatSetpointLimit if TSTAT.S.F05 feature is supported"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0003 && !TSTAT.S.A0005 && TSTAT.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::AbsMinHeatSetpointLimit::Id, true, chip::NullOptional); + } + case 15: { + LogStep(15, "Read attribute AbsMinHeatSetpointLimit from DUT"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0003 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::AbsMinHeatSetpointLimit::Id, true, chip::NullOptional); + } + case 16: { + LogStep(16, "Reads mandatory attributes from DUT: AbsMaxHeatSetpointLimit"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AbsMaxHeatSetpointLimit::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Reads optional attributes from DUT: AbsMinCoolSetpointLimit"); + case 17: { + LogStep(17, "Read attribute AbsMinCoolSetpointLimit from DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AbsMinCoolSetpointLimit::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Reads optional attributes from DUT: AbsMaxCoolSetpointLimit"); + case 18: { + LogStep(18, "Read attribute AbsMaxCoolSetpointLimit from DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AbsMaxCoolSetpointLimit::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Read PICoolingDemand attribute from the DUT"); + case 19: { + LogStep(19, "Read PICoolingDemand attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::PICoolingDemand::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Read PIHeatingDemand attribute from the DUT"); + case 20: { + LogStep(20, "Read PIHeatingDemand attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::PIHeatingDemand::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Read HVACSystemTypeConfiguration attribute from the DUT"); + case 21: { + LogStep(21, "Read HVACSystemTypeConfiguration attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::HVACSystemTypeConfiguration::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Read LocalTemperatureCalibration attribute from the DUT"); + case 22: { + LogStep(22, "Read LocalTemperatureCalibration attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::LocalTemperatureCalibration::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Reads optional attributes from DUT: OccupiedCoolingSetpoint"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 23: { + LogStep(23, "Read attribute OccupiedCoolingSetpoint from the DUT"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017 && TSTAT.S.A0018"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedCoolingSetpoint::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Reads mandatory attributes from DUT: OccupiedHeatingSetpoint"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 24: { + LogStep(24, "Read attribute OccupiedCoolingSetpoint from the DUT"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && !TSTAT.S.A0017 && !TSTAT.S.A0018"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::OccupiedCoolingSetpoint::Id, true, chip::NullOptional); + } + case 25: { + LogStep(25, "Read attribute OccupiedHeatingSetpoint if TSTAT.S.F05 feature is supported"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05 && TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedHeatingSetpoint::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Read UnoccupiedCoolingSetpoint attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "Read attribute OccupiedHeatingSetpoint from the DUT"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::OccupiedHeatingSetpoint::Id, true, chip::NullOptional); + } + case 27: { + LogStep(27, "Read UnoccupiedCoolingSetpoint attribute from the DUT"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05 && TSTAT.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Read UnoccupiedHeatingSetpoint attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 28: { + LogStep(28, "Read UnoccupiedCoolingSetpoint attribute from the DUT"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id, true, chip::NullOptional); + } + case 29: { + LogStep(29, "Read UnoccupiedHeatingSetpoint attribute from the DUT"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02 && TSTAT.S.F05 && TSTAT.S.A0013"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Reads attribute from DUT: MinHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 30: { + LogStep(30, "Read UnoccupiedHeatingSetpoint attribute from the DUT"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id, true, chip::NullOptional); + } + case 31: { + LogStep(31, "Reads attribute from DUT: MinHeatSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0015 && TSTAT.S.F05 && TSTAT.S.A0017"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Reads attribute from DUT: MaxHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 32: { + LogStep(32, "Read attribute MinHeatSetpointLimit from the DUT"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0015 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, + true, chip::NullOptional); + } + case 33: { + LogStep(33, "Read attribute MaxHeatSetpointLimit from the DUT"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0016 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Reads optional attributes from DUT: MinCoolSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 34: { + LogStep(34, "Reads attribute from DUT: MaxHeatSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0016 && TSTAT.S.F05 && TSTAT.S.A0018"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, + true, chip::NullOptional); + } + case 35: { + LogStep(35, "Read attribute MinCoolSetpointLimit from DUT"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0017 && TSTAT.S.A0018 && TSTAT.S.A0005"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "Reads optional attributes from DUT: MaxCoolSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 36: { + LogStep(36, "Read attribute MinCoolSetpointLimit from DUT"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0017 && !TSTAT.S.A0018 && !TSTAT.S.A0005"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, + true, chip::NullOptional); + } + case 37: { + LogStep(37, "Read attribute MaxCoolSetpointLimit from DUT"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0018 && TSTAT.S.A0006 && TSTAT.S.A0017"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "Reads optional attributes from DUT: MinSetpointDeadBand"); + case 38: { + LogStep(38, "Read attribute MinSetpointDeadBand from DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "Read RemoteSensing attribute from the DUT"); + case 39: { + LogStep(39, "Read RemoteSensing attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::RemoteSensing::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "Reads mandatory attributes from DUT: ControlSequenceOfOperation"); + case 40: { + LogStep(40, "Read attribute ControlSequenceOfOperation from DUT"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ControlSequenceOfOperation::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Reads mandatory attributes from DUT: SystemMode"); + case 41: { + LogStep(41, "Read attribute SystemMode from DUT"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A001c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::SystemMode::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Read ThermostatRunningMode attribute from the DUT"); + case 42: { + LogStep(42, "Read ThermostatRunningMode attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A001e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ThermostatRunningMode::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Reads constraints of optional attributes from DUT: StartOfWeek"); + case 43: { + LogStep(43, "Reads constraints of optional attributes from DUT: StartOfWeek"); VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::StartOfWeek::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Reads optional attributes from DUT: NumberOfWeeklyTransitions"); + case 44: { + LogStep(44, "Reads optional attributes from DUT: NumberOfWeeklyTransitions"); VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::NumberOfWeeklyTransitions::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "Reads optional attributes from DUT: NumberOfDailyTransitions"); + case 45: { + LogStep(45, "Reads optional attributes from DUT: NumberOfDailyTransitions"); VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::NumberOfDailyTransitions::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Read TemperatureSetpointHold attribute from the DUT"); + case 46: { + LogStep(46, "Read TemperatureSetpointHold attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0023"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::TemperatureSetpointHold::Id, true, chip::NullOptional); } - case 29: { - LogStep(29, "Read TemperatureSetpointHoldDuration attribute from the DUT"); + case 47: { + LogStep(47, "Read TemperatureSetpointHoldDuration attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::TemperatureSetpointHoldDuration::Id, true, chip::NullOptional); } - case 30: { - LogStep(30, "Read ThermostatProgrammingOperationMode attribute from the DUT"); + case 48: { + LogStep(48, "Read ThermostatProgrammingOperationMode attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ThermostatProgrammingOperationMode::Id, true, chip::NullOptional); } - case 31: { - LogStep(31, "Read ThermostatRunningState attribute from the DUT"); + case 49: { + LogStep(49, "Read ThermostatRunningState attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ThermostatRunningState::Id, true, chip::NullOptional); } - case 32: { - LogStep(32, "Read SetpointChangeSource attribute from the DUT"); + case 50: { + LogStep(50, "Read SetpointChangeSource attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::SetpointChangeSource::Id, true, chip::NullOptional); } - case 33: { - LogStep(33, "Read SetpointChangeAmount attribute from the DUT"); + case 51: { + LogStep(51, "Read SetpointChangeAmount attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::SetpointChangeAmount::Id, true, chip::NullOptional); } - case 34: { - LogStep(34, "Read SetpointChangeSourceTimestamp attribute from the DUT"); + case 52: { + LogStep(52, "Read SetpointChangeSourceTimestamp attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::SetpointChangeSourceTimestamp::Id, true, chip::NullOptional); } - case 35: { - LogStep(35, "Read OccupiedSetback attribute from the DUT"); + case 53: { + LogStep(53, "Read OccupiedSetback attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedSetback::Id, true, chip::NullOptional); } - case 36: { - LogStep(36, "Read OccupiedSetbackMin attribute from the DUT"); + case 54: { + LogStep(54, "Read OccupiedSetbackMin attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedSetbackMin::Id, true, chip::NullOptional); } - case 37: { - LogStep(37, "Read OccupiedSetbackMax attribute from the DUT"); + case 55: { + LogStep(55, "Read OccupiedSetbackMax attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedSetbackMax::Id, true, chip::NullOptional); } - case 38: { - LogStep(38, "Read UnoccupiedSetback attribute from the DUT"); + case 56: { + LogStep(56, "Read UnoccupiedSetback attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::UnoccupiedSetback::Id, true, chip::NullOptional); } - case 39: { - LogStep(39, "Read UnoccupiedSetbackMin attribute from the DUT"); + case 57: { + LogStep(57, "Read UnoccupiedSetbackMin attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::UnoccupiedSetbackMin::Id, true, chip::NullOptional); } - case 40: { - LogStep(40, "Read UnoccupiedSetbackMax attribute from the DUT"); + case 58: { + LogStep(58, "Read UnoccupiedSetbackMax attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::UnoccupiedSetbackMax::Id, true, chip::NullOptional); } - case 41: { - LogStep(41, "Read EmergencyHeatDelta attribute from the DUT"); + case 59: { + LogStep(59, "Read EmergencyHeatDelta attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::EmergencyHeatDelta::Id, true, chip::NullOptional); } - case 42: { - LogStep(42, "Read ACType attribute from the DUT"); + case 60: { + LogStep(60, "Read ACType attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0040"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ACType::Id, true, chip::NullOptional); } - case 43: { - LogStep(43, "Read ACCapacity attribute from the DUT"); + case 61: { + LogStep(61, "Read ACCapacity attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0041"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ACCapacity::Id, true, chip::NullOptional); } - case 44: { - LogStep(44, "Read ACRefrigerantType attribute from the DUT"); + case 62: { + LogStep(62, "Read ACRefrigerantType attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0042"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ACRefrigerantType::Id, true, chip::NullOptional); } - case 45: { - LogStep(45, "Read ACCompressorType attribute from the DUT"); + case 63: { + LogStep(63, "Read ACCompressorType attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0043"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ACCompressorType::Id, true, chip::NullOptional); } - case 46: { - LogStep(46, "Read ACErrorCode attribute from the DUT"); + case 64: { + LogStep(64, "Read ACErrorCode attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0044"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ACErrorCode::Id, true, chip::NullOptional); } - case 47: { - LogStep(47, "Read ACLouverPosition attribute from the DUT"); + case 65: { + LogStep(65, "Read ACLouverPosition attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0045"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ACLouverPosition::Id, true, chip::NullOptional); } - case 48: { - LogStep(48, "Read ACCoilTemperature attribute from the DUT"); + case 66: { + LogStep(66, "Read ACCoilTemperature attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0046"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ACCoilTemperature::Id, true, chip::NullOptional); } - case 49: { - LogStep(49, "Read ACCapacityFormat attribute from the DUT"); + case 67: { + LogStep(67, "Read ACCapacityFormat attribute from the DUT"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0047"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ACCapacityformat::Id, true, chip::NullOptional); @@ -34483,7 +34754,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand class Test_TC_TSTAT_2_2Suite : public TestCommand { public: - Test_TC_TSTAT_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_2_2", 102, credsIssuerConfig) + Test_TC_TSTAT_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_2_2", 162, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -34504,6 +34775,19 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + int16_t MinCoolSetpointLimit; + int16_t MaxCoolSetpointLimit; + int8_t MinSetpointDeadBand; + int16_t MinHeatSetpointLimit; + int16_t UnoccupiedCoolingSetpoint; + int16_t MaxHeatSetpointLimit; + int16_t OccupiedHeatingSetpoint; + int16_t OccupiedCoolingSetpoint; + int16_t AbsMinHeatSetpointLimitValue; + int16_t AbsMaxHeatSetpointLimitValue; + int16_t AbsMinCoolSetpointLimit; + int16_t AbsMaxCoolSetpointLimit; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -34525,82 +34809,108 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); + MinCoolSetpointLimit = value; } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + MaxCoolSetpointLimit = value; + } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - int16_t value; + int8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("occupiedCoolingSetpoint", value, 2500)); + MinSetpointDeadBand = value; } break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + MinHeatSetpointLimit = value; + } break; case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + UnoccupiedCoolingSetpoint = value; + } break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + MaxHeatSetpointLimit = value; + } break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + OccupiedHeatingSetpoint = value; + } break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + OccupiedCoolingSetpoint = value; + } break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); + AbsMinHeatSetpointLimitValue = value; } break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + AbsMaxHeatSetpointLimitValue = value; + } break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", value, 2100)); + AbsMinCoolSetpointLimit = value; } break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", value, 700)); + AbsMaxCoolSetpointLimit = value; } break; - case 16: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, MinCoolSetpointLimit)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxCoolSetpointLimit)); + } break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 18: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; @@ -34610,97 +34920,108 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); } break; - case 19: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 20: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("unoccupiedCoolingSetpoint", value, 2500)); + VerifyOrReturn(CheckValue("occupiedCoolingSetpoint", value, 2500)); } break; - case 21: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; - case 22: + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); + VerifyOrReturn(CheckConstraintMinValue("value", value, MinHeatSetpointLimit)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxHeatSetpointLimit)); } break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("unoccupiedHeatingSetpoint", value, 2500)); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); } break; case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", value, 2100)); + } break; case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); - } + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("minHeatSetpointLimit", value, 800)); - } break; case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + 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_CONSTRAINT_ERROR)); break; case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -34708,71 +35029,82 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); + VerifyOrReturn(CheckConstraintMinValue("value", value, MinCoolSetpointLimit)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxCoolSetpointLimit)); } break; case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); + } break; case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 44: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("maxHeatSetpointLimit", value, 2900)); + VerifyOrReturn(CheckValue("unoccupiedCoolingSetpoint", value, 2500)); } break; - case 45: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; + case 45: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); - } + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 50: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 51: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("minCoolSetpointLimit", value, 2000)); - } + shouldContinue = true; break; case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 54: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, MinHeatSetpointLimit)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxHeatSetpointLimit)); + } break; case 55: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); + } break; case 56: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -34782,21 +35114,15 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); + VerifyOrReturn(CheckValue("unoccupiedHeatingSetpoint", value, 2500)); } break; case 58: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 59: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("maxCoolSetpointLimit", value, 2000)); - } + shouldContinue = true; break; case 60: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); @@ -34817,22 +35143,30 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 66: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 67: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 68: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, AbsMinHeatSetpointLimitValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxHeatSetpointLimit)); + } break; case 69: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - int8_t value; + int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8s", "int8s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 25)); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); } break; case 70: @@ -34841,9 +35175,9 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand case 71: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - int8_t value; + int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("minSetpointDeadBand", value, 5)); + VerifyOrReturn(CheckValue("minHeatSetpointLimit", value, 800)); } break; case 72: @@ -34854,31 +35188,19 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand break; case 74: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 75: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 76: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Thermostat::ThermostatControlSequence value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("controlSequenceOfOperation", value, 4U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); - } + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 77: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 78: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Thermostat::ThermostatControlSequence value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("controlSequenceOfOperation", value, 2U)); - } break; case 79: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -34888,56 +35210,57 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand break; case 81: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 82: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, MinHeatSetpointLimit)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, AbsMaxHeatSetpointLimitValue)); + } break; case 83: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", value, 1700)); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); } break; case 84: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 85: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 86: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", value, 2300)); - } break; case 87: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 88: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("occupiedCoolingSetpoint", value, 2300)); + VerifyOrReturn(CheckValue("maxHeatSetpointLimit", value, 2900)); } break; + case 88: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; case 89: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 90: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 91: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("occupiedCoolingSetpoint", value, 2900)); - } + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 92: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -34950,25 +35273,30 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand break; case 95: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("occupiedCoolingSetpoint", value, 2300)); - } break; case 96: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 97: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", value, 1700)); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, AbsMinCoolSetpointLimit)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxCoolSetpointLimit)); } break; - case 97: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 98: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); + } break; case 99: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -34978,23 +35306,286 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("occupiedCoolingSetpoint", value, 2900)); + VerifyOrReturn(CheckValue("minCoolSetpointLimit", value, 2000)); } break; case 101: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 102: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", value, 2300)); - } + shouldContinue = true; break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { + case 103: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 104: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 105: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 106: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 107: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 108: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 109: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 110: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, MinCoolSetpointLimit)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, AbsMaxCoolSetpointLimit)); + } + break; + case 111: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); + } + break; + case 112: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 113: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("maxCoolSetpointLimit", value, 2000)); + } + break; + case 114: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 115: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 116: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 117: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 118: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 119: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 120: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 121: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 122: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 123: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 124: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 125: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 126: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 127: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 128: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 129: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int8s", "int8s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 25)); + } + break; + case 130: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 131: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("minSetpointDeadBand", value, 5)); + } + break; + case 132: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 133: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 134: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 135: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 136: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::Thermostat::ThermostatControlSequence value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("controlSequenceOfOperation", value, 4U)); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); + } + break; + case 137: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 138: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::Thermostat::ThermostatControlSequence value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("controlSequenceOfOperation", value, 2U)); + } + break; + case 139: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 140: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 141: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 142: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 143: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", value, 1700)); + } + break; + case 144: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 145: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 146: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", value, 2300)); + } + break; + case 147: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 148: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("occupiedCoolingSetpoint", value, 2300)); + } + break; + case 149: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 150: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 151: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("occupiedCoolingSetpoint", value, 2900)); + } + break; + case 152: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 153: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 154: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 155: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("occupiedCoolingSetpoint", value, 2300)); + } + break; + case 156: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", value, 1700)); + } + break; + case 157: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 158: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 159: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 160: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("occupiedCoolingSetpoint", value, 2900)); + } + break; + case 161: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", value, 2300)); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { ContinueOnChipMainThread(CHIP_NO_ERROR); } } @@ -35012,13 +35603,93 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Reads OccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(1, "Saving value for comparision in step 2a read MinCoolSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, + true, chip::NullOptional); + } + case 2: { + LogStep(2, "Saving value for comparision in step 2a read MaxCoolSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, + true, chip::NullOptional); + } + case 3: { + LogStep(3, "Saving value for comparision in step 2c read attribute MinSetpointDeadBand"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, + true, chip::NullOptional); + } + case 4: { + LogStep(4, "Saving value for comparision in step 3a read MinHeatSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, + true, chip::NullOptional); + } + case 5: { + LogStep(5, "Saving value for comparision in step 3 reads UnoccupiedCoolingSetpoint attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "Saving value for comparision in step 3a read MaxHeatSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, + true, chip::NullOptional); + } + case 7: { + LogStep(7, "Saving value for comparision in step3c read attribute OccupiedHeatingSetpoint"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::OccupiedHeatingSetpoint::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "Saving value for comparision in step3c read attribute OccupiedCoolingSetpoint"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedCoolingSetpoint::Id, true, chip::NullOptional); } - case 2: { - LogStep(2, "Writes a value back that is different but valid for OccupiedCoolingSetpoint attribute"); + case 9: { + LogStep(9, "Saving value for comparision in step 6a read attribute AbsMinHeatSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::AbsMinHeatSetpointLimit::Id, true, chip::NullOptional); + } + case 10: { + LogStep(10, "Saving value for comparision in step 7a read attribute AbsMaxHeatSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::AbsMaxHeatSetpointLimit::Id, true, chip::NullOptional); + } + case 11: { + LogStep(11, "Saving value for comparision in step 8a read attribute AbsMinCoolSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::AbsMinCoolSetpointLimit::Id, true, chip::NullOptional); + } + case 12: { + LogStep(12, "Saving value for comparision in step9a read attribute AbsMaxCoolSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::AbsMaxCoolSetpointLimit::Id, true, chip::NullOptional); + } + case 13: { + LogStep(13, "Read attribute OccupiedCoolingSetpoint from the DUT"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017 && TSTAT.S.A0018"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::OccupiedCoolingSetpoint::Id, true, chip::NullOptional); + } + case 14: { + LogStep(14, "Reads OccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is within range"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && !TSTAT.S.A0017 && !TSTAT.S.A0018"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::OccupiedCoolingSetpoint::Id, true, chip::NullOptional); + } + case 15: { + LogStep(15, "Writes a value back that is different but valid for OccupiedCoolingSetpoint attribute"); VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35027,15 +35698,15 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::OccupiedCoolingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 3: { - LogStep(3, "Reads it back again to confirm the successful write of OccupiedCoolingSetpoint attribute"); + case 16: { + LogStep(16, "Reads it back again to confirm the successful write of OccupiedCoolingSetpoint attribute"); VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedCoolingSetpoint::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Writes OccupiedCoolingSetpoint to value below the ABSMinCoolSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 17: { + LogStep(17, "Writes OccupiedCoolingSetpoint to value below the MinCoolSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && !TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 30; @@ -35043,9 +35714,20 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::OccupiedCoolingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 5: { - LogStep(5, "Writes OccupiedCoolingSetpoint to value above the MaxCoolSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 18: { + LogStep(18, "Writes OccupiedCoolingSetpoint to value below the MinCoolSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017 && PICS_SKIP_SAMPLE_APP"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 19: { + LogStep(19, "Writes OccupiedCoolingSetpoint to value above the MaxCoolSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && !TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 4000; @@ -35053,19 +35735,20 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::OccupiedCoolingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 6: { - LogStep(6, "Writes the limit of MinCoolSetpointLimit to OccupiedCoolingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 20: { + LogStep(20, "Writes OccupiedCoolingSetpoint to value above the MaxCoolSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; - value = 1600; + value = static_cast(MaxCoolSetpointLimit + 1000); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedCoolingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 7: { - LogStep(7, "Writes the CoolingSetpoint below the HeatingSetpoint when auto is enabled"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 21: { + LogStep(21, "Writes the limit of MinCoolSetpointLimit to OccupiedCoolingSetpoint attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && !TSTAT.S.F05 && !TSTAT.S.A0017"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 1600; @@ -35073,9 +35756,32 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::OccupiedCoolingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 8: { - LogStep(8, "Writes the limit of MaxCoolSetpointLimit to OccupiedCoolingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 22: { + LogStep(22, "Writes the limit of MinCoolSetpointLimit to OccupiedCoolingSetpoint attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && !TSTAT.S.F05 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = MinCoolSetpointLimit; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::OccupiedCoolingSetpoint::Id, value, chip::NullOptional, + chip::NullOptional); + } + case 23: { + LogStep(23, + "Writes If TSTAT.S.F05(AUTO) LowerLimit = Max(MinCoolSetpointLimit, (OccupiedHeatingSetpoint + " + "MinSetpointDeadBand)) to OccupiedCoolingSetpoint attribute when Auto is enabled"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05 && TSTAT.S.A0012 && PICS_SKIP_SAMPLE_APP"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 24: { + LogStep(24, "Writes the limit of MaxCoolSetpointLimit to OccupiedCoolingSetpoint attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && !TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 3200; @@ -35083,14 +35789,32 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::OccupiedCoolingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 9: { - LogStep(9, "Reads OccupiedHeatingSetpoint attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 25: { + LogStep(25, "Writes the limit of MaxCoolSetpointLimit to OccupiedCoolingSetpoint attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = MaxCoolSetpointLimit; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::OccupiedCoolingSetpoint::Id, value, chip::NullOptional, + chip::NullOptional); + } + case 26: { + LogStep(26, "Reads OccupiedHeatingSetpoint attribute from Server DUT and verifies that the value is within range"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015 && TSTAT.S.A0016"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedHeatingSetpoint::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Writes a value back that is different but valid for OccupiedHeatingSetpoint attribute"); + case 27: { + LogStep(27, "Reads OccupiedHeatingSetpoint attribute from Server DUT and verifies that the value is within range"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && !TSTAT.S.A0015 && !TSTAT.S.A0016"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::OccupiedHeatingSetpoint::Id, true, chip::NullOptional); + } + case 28: { + LogStep(28, "Writes a value back that is different but valid for OccupiedHeatingSetpoint attribute"); VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35099,15 +35823,15 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::OccupiedHeatingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 11: { - LogStep(11, "Reads it back again to confirm the successful write of OccupiedHeatingSetpoint attribute"); + case 29: { + LogStep(29, "Reads it back again to confirm the successful write of OccupiedHeatingSetpoint attribute"); VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedHeatingSetpoint::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Writes OccupiedHeatingSetpoint to value below the MinHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 30: { + LogStep(30, "Writes OccupiedHeatingSetpoint to value below the MinHeatSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && !TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 600; @@ -35115,9 +35839,20 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::OccupiedHeatingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 13: { - LogStep(13, "Writes OccupiedHeatingSetpoint to value above the MaxHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 31: { + LogStep(31, "Writes OccupiedHeatingSetpoint to value below the MinHeatSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015 && PICS_SKIP_SAMPLE_APP"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 32: { + LogStep(32, "Writes OccupiedHeatingSetpoint to value above the MaxHeatSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && !TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 4010; @@ -35125,9 +35860,19 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::OccupiedHeatingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 14: { - LogStep(14, "Writes the limit of MinHeatSetpointLimit to OccupiedHeatingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 33: { + LogStep(33, "Writes OccupiedHeatingSetpoint to value above the MaxHeatSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = static_cast(MaxHeatSetpointLimit + 1000); + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::OccupiedHeatingSetpoint::Id, value, chip::NullOptional, + chip::NullOptional); + } + case 34: { + LogStep(34, "Writes the limit of MinHeatSetpointLimit to OccupiedHeatingSetpoint attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && !TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 700; @@ -35135,15 +35880,20 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::OccupiedHeatingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 15: { - LogStep(15, "Reads it back again to confirm the successful write of OccupiedHeatingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::OccupiedHeatingSetpoint::Id, true, chip::NullOptional); + case 35: { + LogStep(35, "Writes the limit of MinHeatSetpointLimit to OccupiedHeatingSetpoint attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = MinHeatSetpointLimit; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::OccupiedHeatingSetpoint::Id, value, chip::NullOptional, + chip::NullOptional); } - case 16: { - LogStep(16, "Writes the limit of MaxHeatSetpointLimit to OccupiedHeatingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 36: { + LogStep(36, "Writes the limit of MaxHeatSetpointLimit to OccupiedHeatingSetpoint attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && !TSTAT.S.F05 && !TSTAT.S.A0016"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 3000; @@ -35151,9 +35901,19 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::OccupiedHeatingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 17: { - LogStep(17, "Writes the limit of MaxHeatSetpointLimit to OccupiedHeatingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 37: { + LogStep(37, "Writes the limit of MaxHeatSetpointLimit to OccupiedHeatingSetpoint attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && !TSTAT.S.F05 && TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = MaxHeatSetpointLimit; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::OccupiedHeatingSetpoint::Id, value, chip::NullOptional, + chip::NullOptional); + } + case 38: { + LogStep(38, "Writes the limit of MaxHeatSetpointLimit to OccupiedHeatingSetpoint attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05 && !TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 3000; @@ -35161,14 +35921,35 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::OccupiedHeatingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 18: { - LogStep(18, "Reads UnoccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 39: { + LogStep(39, + "Writes If TSTAT.S.F05(AUTO) UpperLimit = Min(MaxHeatSetpointLimit, (OccupiedCoolingSetpoint - " + "MinSetpointDeadBand)) to OccupiedHeatingSetpoint attribute when Auto is enabled"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05 && TSTAT.S.A0011 && TSTAT.S.A0012 && PICS_SKIP_SAMPLE_APP"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 40: { + LogStep(40, "Reads UnoccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is within range"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01 && TSTAT.S.A0017 && TSTAT.S.A0018"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "Writes a value back that is different but valid for UnoccupiedCoolingSetpoint attribute"); + case 41: { + LogStep(41, "Reads UnoccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is within range"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01 && !TSTAT.S.A0017 && !TSTAT.S.A0018"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id, true, chip::NullOptional); + } + case 42: { + LogStep(42, "Writes a value back that is different but valid for UnoccupiedCoolingSetpoint attribute"); VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35177,15 +35958,15 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 20: { - LogStep(20, "Reads it back again to confirm the successful write of UnoccupiedCoolingSetpoint attribute"); + case 43: { + LogStep(43, "Reads it back again to confirm the successful write of UnoccupiedCoolingSetpoint attribute"); VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "Writes UnoccupiedCoolingSetpoint to value below the MinCoolSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 44: { + LogStep(44, "Writes UnoccupiedCoolingSetpoint to value below the MinCoolSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01 && !TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 1002; @@ -35193,9 +35974,20 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 22: { - LogStep(22, "Writes UnoccupiedCoolingSetpoint to value above the MaxCoolSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 45: { + LogStep(45, "Writes UnoccupiedCoolingSetpoint to value below the MinCoolSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01 && TSTAT.S.A0017 && PICS_SKIP_SAMPLE_APP"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 46: { + LogStep(46, "Writes UnoccupiedCoolingSetpoint to value above the MaxCoolSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01 && !TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 4010; @@ -35203,34 +35995,100 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 23: { - LogStep(23, "Writes the limit of MinCoolSetpointLimit to UnoccupiedCoolingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 47: { + LogStep(47, "Writes UnoccupiedCoolingSetpoint to value above the MaxCoolSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01 && TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; - value = 1800; + value = static_cast(MaxCoolSetpointLimit + 1000); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 24: { - LogStep(24, "Writes the limit of MaxCoolSetpointLimit to UnoccupiedCoolingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 48: { + LogStep(48, "Writes the limit of MinCoolSetpointLimit to UnoccupiedCoolingSetpoint attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01 && !TSTAT.S.A0017 && !TSTAT.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; - value = 3000; + value = 1600; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 25: { - LogStep(25, "Reads UnoccupiedHeatingSetpoint attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 49: { + LogStep(49, "Writes the limit of MinCoolSetpointLimit to UnoccupiedCoolingSetpoint attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01 && !TSTAT.S.A0017 && TSTAT.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = 1600; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id, value, chip::NullOptional, + chip::NullOptional); + } + case 50: { + LogStep(50, "Writes the limit of MinCoolSetpointLimit to UnoccupiedCoolingSetpoint attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01 && TSTAT.S.A0017 && !TSTAT.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = MinCoolSetpointLimit; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id, value, chip::NullOptional, + chip::NullOptional); + } + case 51: { + LogStep(51, + "Writes If TSTAT.S.F05(AUTO) LowerLimit = Max(MinCoolSetpointLimit, (UnoccupiedCoolingSetpoint + " + "MinSetpointDeadBand)) to UnoccupiedCoolingSetpoint attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01 && TSTAT.S.A0013 && TSTAT.S.F05 && PICS_SKIP_SAMPLE_APP"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 52: { + LogStep(52, "Writes the limit of MaxCoolSetpointLimit to UnoccupiedCoolingSetpoint attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01 && !TSTAT.S.A0018 && !TSTAT.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = 3200; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id, value, chip::NullOptional, + chip::NullOptional); + } + case 53: { + LogStep(53, "Writes the limit of MaxCoolSetpointLimit to UnoccupiedCoolingSetpoint attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = MaxCoolSetpointLimit; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id, value, chip::NullOptional, + chip::NullOptional); + } + case 54: { + LogStep(54, "Reads UnoccupiedHeatingSetpoint attribute from Server DUT and verifies that the value is within range"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00 && TSTAT.S.A0015 && TSTAT.S.A0016"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Writes a value back that is different but valid for UnoccupiedHeatingSetpoint attribute"); + case 55: { + LogStep(55, "Reads UnoccupiedHeatingSetpoint attribute from Server DUT and verifies that the value is within range"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00 && !TSTAT.S.A0015 && !TSTAT.S.A0016"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id, true, chip::NullOptional); + } + case 56: { + LogStep(56, "Writes a value back that is different but valid for UnoccupiedHeatingSetpoint attribute"); VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35239,15 +36097,15 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 27: { - LogStep(27, "Reads it back again to confirm the successful write of UnoccupiedHeatingSetpoint attribute"); + case 57: { + LogStep(57, "Reads it back again to confirm the successful write of UnoccupiedHeatingSetpoint attribute"); VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Writes UnoccupiedHeatingSetpoint to value below the MinHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 58: { + LogStep(58, "Writes UnoccupiedHeatingSetpoint to value below the MinHeatSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00 && !TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 500; @@ -35255,9 +36113,20 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 29: { - LogStep(29, "Writes UnoccupiedHeatingSetpoint to value above the MaxHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 59: { + LogStep(59, "Writes UnoccupiedHeatingSetpoint to value below the MinHeatSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00 && TSTAT.S.A0015 && PICS_SKIP_SAMPLE_APP"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 60: { + LogStep(60, "Writes UnoccupiedHeatingSetpoint to value above the MaxHeatSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00 && !TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 4010; @@ -35265,19 +36134,40 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 30: { - LogStep(30, "Writes the limit of MinHeatSetpointLimit to UnoccupiedHeatingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 61: { + LogStep(61, "Writes UnoccupiedHeatingSetpoint to value above the MaxHeatSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00 && TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; - value = 1800; + value = static_cast(MaxHeatSetpointLimit + 1000); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 31: { - LogStep(31, "Writes the limit of MaxHeatSetpointLimit to UnoccupiedHeatingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 62: { + LogStep(62, "Writes the limit of MinHeatSetpointLimit to UnoccupiedHeatingSetpoint attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00 && !TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = 700; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id, value, chip::NullOptional, + chip::NullOptional); + } + case 63: { + LogStep(63, "Writes the limit of MinHeatSetpointLimit to UnoccupiedHeatingSetpoint attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00 && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = MinHeatSetpointLimit; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id, value, chip::NullOptional, + chip::NullOptional); + } + case 64: { + LogStep(64, "Writes the limit of MaxHeatSetpointLimit to UnoccupiedHeatingSetpoint attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00 && !TSTAT.S.A0016 && !TSTAT.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 3000; @@ -35285,14 +36175,57 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 32: { - LogStep(32, "Reads MinHeatSetpointLimit attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 65: { + LogStep(65, "Writes the limit of MaxHeatSetpointLimit to UnoccupiedHeatingSetpoint attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = MaxHeatSetpointLimit; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id, value, chip::NullOptional, + chip::NullOptional); + } + case 66: { + LogStep(66, "Writes the limit of MaxHeatSetpointLimit to UnoccupiedHeatingSetpoint attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00 && !TSTAT.S.A0016 && TSTAT.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = 3000; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id, value, chip::NullOptional, + chip::NullOptional); + } + case 67: { + LogStep(67, + "Writes If TSTAT.S.F05(AUTO) UpperLimit = Min(MaxHeatSetpointLimit, (UnoccupiedCoolingSetpoint - " + "MinSetpointDeadBand)) to UnoccupiedHeatingSetpoint attribute when Auto is enabled."); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00 && TSTAT.S.A0013 && TSTAT.S.F05 && PICS_SKIP_SAMPLE_APP"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 68: { + LogStep(68, "Reads MinHeatSetpointLimit attribute from Server DUT and verifies that the value is within range"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015 && TSTAT.S.A0016 && TSTAT.S.A0003"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, true, chip::NullOptional); } - case 33: { - LogStep(33, "Writes a value back that is different but valid for MinHeatSetpointLimit attribute"); + case 69: { + LogStep(69, "Reads MinHeatSetpointLimit attribute from Server DUT and verifies that the value is within range"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015 && !TSTAT.S.A0016 && !TSTAT.S.A0003"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, + true, chip::NullOptional); + } + case 70: { + LogStep(70, "Writes a value back that is different but valid for MinHeatSetpointLimit attribute"); VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35300,14 +36233,14 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 34: { - LogStep(34, "Reads it back again to confirm the successful write of MinHeatSetpointLimit attribute"); + case 71: { + LogStep(71, "Reads it back again to confirm the successful write of MinHeatSetpointLimit attribute"); VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, true, chip::NullOptional); } - case 35: { - LogStep(35, "Writes a value back that is different but violates the deadband"); + case 72: { + LogStep(72, "Writes a value back that is different but violates the deadband"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0015 && TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35315,36 +36248,70 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 36: { - LogStep(36, "Writes MinHeatSetpointLimit to value below the AbsMinHeatSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 73: { + LogStep(73, "Writes MinHeatSetpointLimit to value below the AbsMinHeatSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015 && !TSTAT.S.A0003"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; - value = 650; + value = 100; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 37: { - LogStep(37, "Writes MinHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 74: { + LogStep(74, "Writes MinHeatSetpointLimit to value below the AbsMinHeatSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015 && TSTAT.S.A0003 && PICS_SKIP_SAMPLE_APP"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 75: { + LogStep(75, "Writes MinHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015 && !TSTAT.S.A0016"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 4050; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 38: { - LogStep(38, "Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 76: { + LogStep(76, "Writes MinHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015 && TSTAT.S.A0016"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = static_cast(MaxHeatSetpointLimit + 1000); + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); + } + case 77: { + LogStep(77, "Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015 && !TSTAT.S.A0003"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 700; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 39: { - LogStep(39, "Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015 && !TSTAT.S.F05"), + case 78: { + LogStep(78, "Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015 && TSTAT.S.A0003"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = AbsMinHeatSetpointLimitValue; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); + } + case 79: { + LogStep(79, "Writes the limit of MaxHeatSetpointLimit to MinHeatSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015 && !TSTAT.S.F05 && !TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35352,15 +36319,45 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 40: { - LogStep(40, "Reads MaxHeatSetpointLimit attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05"), + case 80: { + LogStep(80, "Writes the limit of MaxHeatSetpointLimit to MinHeatSetpointimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015 && !TSTAT.S.F05 && TSTAT.S.A0016"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = MaxHeatSetpointLimit; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); + } + case 81: { + LogStep(81, + "Writes If TSTAT.S.F05(AUTO) UpperLimit = Min(MaxHeatSetpointLimit, (MinCoolSetpointLimit - " + "MinSetpointDeadBand)) to MinHeatSetpointLimit attribute when Auto is enabled"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015 && TSTAT.S.F05 && TSTAT.S.A0005 && PICS_SKIP_SAMPLE_APP"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 82: { + LogStep(82, "Reads MaxHeatSetpointLimit attribute from Server DUT and verifies that the value is within range"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05 && TSTAT.S.A0004 && TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, true, chip::NullOptional); } - case 41: { - LogStep(41, "Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute"); + case 83: { + LogStep(83, "Reads MaxHeatSetpointLimit attribute from Server DUT and verifies that the value is within range"); + VerifyOrDo(!ShouldSkip(" TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05 && !TSTAT.S.A0004 && !TSTAT.S.A0016 "), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, + true, chip::NullOptional); + } + case 84: { + LogStep(84, "Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute"); VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35368,8 +36365,8 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 42: { - LogStep(42, "Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute"); + case 85: { + LogStep(85, "Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute"); VerifyOrDo(!ShouldSkip("TSTAT.S.A0015 && TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35377,8 +36374,8 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 43: { - LogStep(43, "Writes a value back that is different but valid for MaxHeatSetpointLimit attribute"); + case 86: { + LogStep(86, "Writes a value back that is different but valid for MaxHeatSetpointLimit attribute"); VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35386,42 +36383,76 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 44: { - LogStep(44, "Reads it back again to confirm the successful write of MaxHeatSetpointLimit attribute"); + case 87: { + LogStep(87, "Reads it back again to confirm the successful write of MaxHeatSetpointLimit attribute"); VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, true, chip::NullOptional); } - case 45: { - LogStep(45, "Writes MaxHeatSetpointLimit to value below the AbsMinHeatSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 88: { + LogStep(88, "Writes MaxHeatSetpointLimit to value below the AbsMinHeatSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.A0015"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 500; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 46: { - LogStep(46, "Writes MaxHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 89: { + LogStep(89, "Writes MaxHeatSetpointLimit to value below the MinHeatSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && TSTAT.S.A0015 && PICS_SKIP_SAMPLE_APP"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 90: { + LogStep(90, "Writes MaxHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.A0004"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 4000; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 47: { - LogStep(47, "Writes the limit of AbsMinHeatSetpointLimit to MaxHeatSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 91: { + LogStep(91, "Writes MaxHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && TSTAT.S.A0004"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = static_cast(AbsMaxHeatSetpointLimitValue + 1000); + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); + } + case 92: { + LogStep(92, "Writes the limit of MinHeatSetpointLimit to MaxHeatSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.A0015"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 700; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 48: { - LogStep(48, "Writes the limit of AbsMaxHeatSetpointLimit to MaxHeatSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05"), + case 93: { + LogStep(93, "Writes the limit of MinHeatSetpointLimit to MaxHeatSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && TSTAT.S.A0015"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = MinHeatSetpointLimit; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); + } + case 94: { + LogStep(94, "Writes the limit of AbsMaxHeatSetpointLimit to MaxHeatSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05 && !TSTAT.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35429,14 +36460,45 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 49: { - LogStep(49, "Reads MinCoolSetpointLimit attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 95: { + LogStep(95, "Writes the limit of AbsMaxHeatSetpointLimit to MaxHeatSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05 && TSTAT.S.A0004"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = AbsMaxHeatSetpointLimitValue; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); + } + case 96: { + LogStep(96, + "Writes If TSTAT.S.F05(AUTO) UpperLimit = Min(AbsMaxHeatSetpointLimit, (MaxCoolSetpointLimit - " + "MinSetpointDeadBand)) to MaxHeatSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && TSTAT.S.F05 && TSTAT.S.A0018 && PICS_SKIP_SAMPLE_APP"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 97: { + LogStep(97, "Reads MinCoolSetpointLimit attribute from Server DUT and verifies that the value is within range"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017 && TSTAT.S.A0018 && TSTAT.S.A0005"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, true, chip::NullOptional); } - case 50: { - LogStep(50, "Writes a value back that is different but valid for MinCoolSetpointLimit attribute"); + case 98: { + LogStep(98, "Reads MinCoolSetpointLimit attribute from Server DUT and verifies that the value is within range"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017 && !TSTAT.S.A0018 && !TSTAT.S.A0005"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, + true, chip::NullOptional); + } + case 99: { + LogStep(99, "Writes a value back that is different but valid for MinCoolSetpointLimit attribute"); VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35444,65 +36506,122 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 51: { - LogStep(51, "Reads it back again to confirm the successful write of MinCoolSetpointLimit attribute"); + case 100: { + LogStep(100, "Reads it back again to confirm the successful write of MinCoolSetpointLimit attribute"); VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, true, chip::NullOptional); } - case 52: { - LogStep(52, "Writes MinCoolSetpointLimit to value below the AbsMinCoolSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 101: { + LogStep(101, "Writes MinCoolSetpointLimit to value below the AbsMinCoolSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017 && !TSTAT.S.A0005"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 1000; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 53: { - LogStep(53, "Writes MinCoolSetpointLimit to value above the MaxCoolSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 102: { + LogStep(102, "Writes MinCoolSetpointLimit to value below the AbsMinCoolSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017 && TSTAT.S.A0005 && PICS_SKIP_SAMPLE_APP"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 103: { + LogStep(103, "Writes MinCoolSetpointLimit to value above the MaxCoolSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017 && !TSTAT.S.A0018"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 4000; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 54: { - LogStep(54, "Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 104: { + LogStep(104, "Writes MinCoolSetpointLimit to value above the MaxCoolSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017 && TSTAT.S.A0018"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = static_cast(MaxCoolSetpointLimit + 1000); + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); + } + case 105: { + LogStep(105, "Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017 && !TSTAT.S.A0005 && !TSTAT.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 1600; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 55: { - LogStep(55, "Writes the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 106: { + LogStep(106, "Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017 && TSTAT.S.A0005 && !TSTAT.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = AbsMinCoolSetpointLimit; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); + } + case 107: { + LogStep(107, + "Writes If TSTAT.S.F05(AUTO) LowerLimit = Max(AbsMinCoolSetpointLimit, (MinHeatSetpointLimit + " + "MinSetpointDeadBand)) to MinCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017 && TSTAT.S.A0015 && TSTAT.S.F05 && PICS_SKIP_SAMPLE_APP"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 108: { + LogStep(108, "Writes the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017 && !TSTAT.S.A0018"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 3200; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 56: { - LogStep(56, "Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 109: { + LogStep(109, "Writes the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017 && TSTAT.S.A0018"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; - value = 1600; + value = MaxCoolSetpointLimit; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 57: { - LogStep(57, "Reads MaxCoolSetpointLimit attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 110: { + LogStep(110, "Reads MaxCoolSetpointLimit attribute from Server DUT and verifies that the value is within range"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018 && TSTAT.S.A0017 && TSTAT.S.A0006"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, true, chip::NullOptional); } - case 58: { - LogStep(58, "Writes a value back that is different but valid for MaxCoolSetpointLimit attribute"); + case 111: { + LogStep(111, "Reads MaxCoolSetpointLimit attribute from Server DUT and verifies that the value is within range"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.A0017 && !TSTAT.S.A0006"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, + true, chip::NullOptional); + } + case 112: { + LogStep(112, "Writes a value back that is different but valid for MaxCoolSetpointLimit attribute"); VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35510,50 +36629,118 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 59: { - LogStep(59, "Reads it back again to confirm the successful write of MaxCoolSetpointLimit attribute"); + case 113: { + LogStep(113, "Reads it back again to confirm the successful write of MaxCoolSetpointLimit attribute"); VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, true, chip::NullOptional); } - case 60: { - LogStep(60, "Writes MaxCoolSetpointLimit to value below the AbsMinCoolSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 114: { + LogStep(114, "Writes MaxCoolSetpointLimit to value below the AbsMinCoolSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.A0017"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 1000; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 61: { - LogStep(61, "Writes MaxCoolSetpointLimit to value above the MaxCoolSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 115: { + LogStep(115, "Writes MaxCoolSetpointLimit to value below the AbsMinCoolSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018 && TSTAT.S.A0017 && PICS_SKIP_SAMPLE_APP"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 116: { + LogStep(116, "Writes MaxCoolSetpointLimit to value above the MaxCoolSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.A0006"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 4000; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 62: { - LogStep(62, "Writes the limit of AbsMinCoolSetpointLimit to MaxCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 117: { + LogStep(117, "Writes MaxCoolSetpointLimit to value above the MaxCoolSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018 && TSTAT.S.A0006"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = static_cast(AbsMaxCoolSetpointLimit + 1000); + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); + } + case 118: { + LogStep(118, "Writes the limit of MinCoolSetpointLimit to MaxCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.A0017 && !TSTAT.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 1600; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 63: { - LogStep(63, "Writes the limit of MaxCoolSetpointLimit to MaxCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 119: { + LogStep(119, "Writes the limit of MinCoolSetpointLimit to MaxCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.A0017 && TSTAT.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = 1600; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); + } + case 120: { + LogStep(120, "Writes the limit of MinCoolSetpointLimit to MaxCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018 && TSTAT.S.A0017 && !TSTAT.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = MinCoolSetpointLimit; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); + } + case 121: { + LogStep(121, + "Writes If TSTAT.S.F05(AUTO) LowerLimit = Max(MinCoolSetpointLimit, (MaxHeatSetpointLimit + " + "MinSetpointDeadBand)) to MaxCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018 && TSTAT.S.A0016 && TSTAT.S.F05 && PICS_SKIP_SAMPLE_APP"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 122: { + LogStep(122, "Writes the limit of AbsMaxCoolSetpointLimit to MaxCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.A0006"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 3200; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 64: { - LogStep(64, "Writes (sets back) default value of MinHeatSetpointLimit"); + case 123: { + LogStep(123, "Writes the limit of AbsMaxCoolSetpointLimit to MaxCoolSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018 && TSTAT.S.A0006"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + int16_t value; + value = AbsMaxCoolSetpointLimit; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); + } + case 124: { + LogStep(124, "Writes (sets back) default value of MinHeatSetpointLimit"); VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35561,8 +36748,8 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 65: { - LogStep(65, "Writes (sets back)default value of MaxHeatSetpointLimit"); + case 125: { + LogStep(125, "Writes (sets back)default value of MaxHeatSetpointLimit"); VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0016 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35570,8 +36757,8 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 66: { - LogStep(66, "Writes MaxHeatSetpointLimit That meets the deadband of 2.5C"); + case 126: { + LogStep(126, "Writes MaxHeatSetpointLimit That meets the deadband of 2.5C"); VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0016 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35579,8 +36766,8 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 67: { - LogStep(67, "Writes (sets back) default value of MinCoolSetpointLimit"); + case 127: { + LogStep(127, "Writes (sets back) default value of MinCoolSetpointLimit"); VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35588,8 +36775,8 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 68: { - LogStep(68, "Writes (sets back) default value of MaxCoolSetpointLimit"); + case 128: { + LogStep(128, "Writes (sets back) default value of MaxCoolSetpointLimit"); VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35597,14 +36784,14 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 69: { - LogStep(69, "Reads MinSetpointDeadBand attribute from Server DUT and verifies that the value is within range"); + case 129: { + LogStep(129, "Reads MinSetpointDeadBand attribute from Server DUT and verifies that the value is within range"); VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, true, chip::NullOptional); } - case 70: { - LogStep(70, "Writes a value back that is different but valid for MinSetpointDeadBand attribute"); + case 130: { + LogStep(130, "Writes a value back that is different but valid for MinSetpointDeadBand attribute"); VerifyOrDo(!ShouldSkip("TSTAT.S.F05 && TSTAT.S.M.MinSetpointDeadBandWritable"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -35613,15 +36800,15 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, value, chip::NullOptional, chip::NullOptional); } - case 71: { - LogStep(71, "Reads it back again to confirm the successful write of MinSetpointDeadBand attribute"); + case 131: { + LogStep(131, "Reads it back again to confirm the successful write of MinSetpointDeadBand attribute"); VerifyOrDo(!ShouldSkip("TSTAT.S.F05 && TSTAT.S.M.MinSetpointDeadBandWritable"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, true, chip::NullOptional); } - case 72: { - LogStep(72, "Writes the value below MinSetpointDeadBand"); + case 132: { + LogStep(132, "Writes the value below MinSetpointDeadBand"); VerifyOrDo(!ShouldSkip("TSTAT.S.F05 && TSTAT.S.M.MinSetpointDeadBandWritable"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -35630,8 +36817,8 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, value, chip::NullOptional, chip::NullOptional); } - case 73: { - LogStep(73, "Writes the value above MinSetpointDeadBand "); + case 133: { + LogStep(133, "Writes the value above MinSetpointDeadBand "); VerifyOrDo(!ShouldSkip("TSTAT.S.F05 && TSTAT.S.M.MinSetpointDeadBandWritable"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -35640,8 +36827,8 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, value, chip::NullOptional, chip::NullOptional); } - case 74: { - LogStep(74, "Writes the min limit of MinSetpointDeadBand"); + case 134: { + LogStep(134, "Writes the min limit of MinSetpointDeadBand"); VerifyOrDo(!ShouldSkip("TSTAT.S.F05 && TSTAT.S.M.MinSetpointDeadBandWritable"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -35650,8 +36837,8 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, value, chip::NullOptional, chip::NullOptional); } - case 75: { - LogStep(75, "Writes the max limit of MinSetpointDeadBand"); + case 135: { + LogStep(135, "Writes the max limit of MinSetpointDeadBand"); VerifyOrDo(!ShouldSkip("TSTAT.S.F05 && TSTAT.S.M.MinSetpointDeadBandWritable"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -35660,14 +36847,14 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, value, chip::NullOptional, chip::NullOptional); } - case 76: { - LogStep(76, "Reads ControlSequenceOfOperation from Server DUT and verifies that the value is valid"); + case 136: { + LogStep(136, "Reads ControlSequenceOfOperation from Server DUT and verifies that the value is valid"); VerifyOrDo(!ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ControlSequenceOfOperation::Id, true, chip::NullOptional); } - case 77: { - LogStep(77, "Write Attribute command for ControlSequenceOfOperation with a new valid value"); + case 137: { + LogStep(137, "Write Attribute command for ControlSequenceOfOperation with a new valid value"); VerifyOrDo(!ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Thermostat::ThermostatControlSequence value; @@ -35676,14 +36863,14 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::ControlSequenceOfOperation::Id, value, chip::NullOptional, chip::NullOptional); } - case 78: { - LogStep(78, "Read it back again to confirm the successful write"); + case 138: { + LogStep(138, "Read it back again to confirm the successful write"); VerifyOrDo(!ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ControlSequenceOfOperation::Id, true, chip::NullOptional); } - case 79: { - LogStep(79, "Writes MaxHeatSetpointLimit attribute to default value of 2950 to meet deadband constraint"); + case 139: { + LogStep(139, "Writes MaxHeatSetpointLimit attribute to default value of 2950 to meet deadband constraint"); VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015 && TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35691,8 +36878,8 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 80: { - LogStep(80, "Sets OccupiedCoolingSetpoint to default value"); + case 140: { + LogStep(140, "Sets OccupiedCoolingSetpoint to default value"); VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35701,8 +36888,8 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::OccupiedCoolingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 81: { - LogStep(81, "Sets OccupiedHeatingSetpoint to default value"); + case 141: { + LogStep(141, "Sets OccupiedHeatingSetpoint to default value"); VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35711,8 +36898,8 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::OccupiedHeatingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 82: { - LogStep(82, "Sends SetpointRaise Command Heat Only"); + case 142: { + LogStep(142, "Sends SetpointRaise Command Heat Only"); VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type value; @@ -35723,14 +36910,14 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand ); } - case 83: { - LogStep(83, "Reads back OccupiedHeatingSetpoint to confirm the success of the write"); + case 143: { + LogStep(143, "Reads back OccupiedHeatingSetpoint to confirm the success of the write"); VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedHeatingSetpoint::Id, true, chip::NullOptional); } - case 84: { - LogStep(84, "Sets OccupiedHeatingSetpoint to default value"); + case 144: { + LogStep(144, "Sets OccupiedHeatingSetpoint to default value"); VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35739,8 +36926,8 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::OccupiedHeatingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 85: { - LogStep(85, "Sends SetpointRaise Command Heat Only"); + case 145: { + LogStep(145, "Sends SetpointRaise Command Heat Only"); VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type value; @@ -35751,14 +36938,14 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand ); } - case 86: { - LogStep(86, "Reads back OccupiedHeatingSetpoint to confirm the success of the write"); + case 146: { + LogStep(146, "Reads back OccupiedHeatingSetpoint to confirm the success of the write"); VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedHeatingSetpoint::Id, true, chip::NullOptional); } - case 87: { - LogStep(87, "Sends SetpointRaise Command Cool Only"); + case 147: { + LogStep(147, "Sends SetpointRaise Command Cool Only"); VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type value; @@ -35769,14 +36956,14 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand ); } - case 88: { - LogStep(88, "Reads back OccupiedCoolingSetpoint to confirm the success of the write"); + case 148: { + LogStep(148, "Reads back OccupiedCoolingSetpoint to confirm the success of the write"); VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedCoolingSetpoint::Id, true, chip::NullOptional); } - case 89: { - LogStep(89, "Sets OccupiedCoolingSetpoint to default value"); + case 149: { + LogStep(149, "Sets OccupiedCoolingSetpoint to default value"); VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35785,8 +36972,8 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::OccupiedCoolingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 90: { - LogStep(90, "Sends SetpointRaise Command Cool Only"); + case 150: { + LogStep(150, "Sends SetpointRaise Command Cool Only"); VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type value; @@ -35797,14 +36984,14 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand ); } - case 91: { - LogStep(91, "Reads back OccupiedCoolingSetpoint to confirm the success of the write"); + case 151: { + LogStep(151, "Reads back OccupiedCoolingSetpoint to confirm the success of the write"); VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedCoolingSetpoint::Id, true, chip::NullOptional); } - case 92: { - LogStep(92, "Sets OccupiedCoolingSetpoint to default value"); + case 152: { + LogStep(152, "Sets OccupiedCoolingSetpoint to default value"); VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35813,8 +37000,8 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::OccupiedCoolingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 93: { - LogStep(93, "Sets OccupiedHeatingSetpoint to default value"); + case 153: { + LogStep(153, "Sets OccupiedHeatingSetpoint to default value"); VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35823,8 +37010,8 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::OccupiedHeatingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 94: { - LogStep(94, "Sends SetpointRaise Command Heat & Cool"); + case 154: { + LogStep(154, "Sends SetpointRaise Command Heat & Cool"); VerifyOrDo(!ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type value; @@ -35835,20 +37022,20 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand ); } - case 95: { - LogStep(95, "Reads back OccupiedCoolingSetpoint to confirm the success of the write"); + case 155: { + LogStep(155, "Reads back OccupiedCoolingSetpoint to confirm the success of the write"); VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedCoolingSetpoint::Id, true, chip::NullOptional); } - case 96: { - LogStep(96, "Reads back OccupiedHeatingSetpoint to confirm the success of the write"); + case 156: { + LogStep(156, "Reads back OccupiedHeatingSetpoint to confirm the success of the write"); VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedHeatingSetpoint::Id, true, chip::NullOptional); } - case 97: { - LogStep(97, "Sets OccupiedCoolingSetpoint to default value"); + case 157: { + LogStep(157, "Sets OccupiedCoolingSetpoint to default value"); VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35857,8 +37044,8 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::OccupiedCoolingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 98: { - LogStep(98, "Sets OccupiedHeatingSetpoint to default value"); + case 158: { + LogStep(158, "Sets OccupiedHeatingSetpoint to default value"); VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -35867,8 +37054,8 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::OccupiedHeatingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 99: { - LogStep(99, "Sends SetpointRaise Command Heat & Cool"); + case 159: { + LogStep(159, "Sends SetpointRaise Command Heat & Cool"); VerifyOrDo(!ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type value; @@ -35879,14 +37066,14 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand ); } - case 100: { - LogStep(100, "Reads back OccupiedCoolingSetpoint to confirm the success of the write"); + case 160: { + LogStep(160, "Reads back OccupiedCoolingSetpoint to confirm the success of the write"); VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedCoolingSetpoint::Id, true, chip::NullOptional); } - case 101: { - LogStep(101, "Reads back OccupiedHeatingSetpoint to confirm the success of the write"); + case 161: { + LogStep(161, "Reads back OccupiedHeatingSetpoint to confirm the success of the write"); VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedHeatingSetpoint::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 6821b5add92477..f6f906f71af461 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -149,8 +149,6 @@ class TestList : public Command { printf("Test_TC_TMP_1_1\n"); printf("Test_TC_TMP_2_1\n"); printf("Test_TC_TSTAT_1_1\n"); - printf("Test_TC_TSTAT_2_1\n"); - printf("Test_TC_TSTAT_2_2\n"); printf("Test_TC_TSUIC_1_1\n"); printf("Test_TC_TSUIC_2_1\n"); printf("Test_TC_TSUIC_2_2\n"); @@ -2666,6 +2664,10 @@ class Test_TC_ACL_2_2 : public TestCommandBridge { case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : TH1 reads DUT Descriptor cluster ServerList attribute from every Endpoint except 0\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } err = TestTh1ReadsDutDescriptorClusterServerListAttributeFromEveryEndpointExcept0_2(); break; } @@ -2740,22 +2742,12 @@ class Test_TC_ACL_2_2 : public TestCommandBridge { CHIP_ERROR TestTh1ReadsDutDescriptorClusterServerListAttributeFromEveryEndpointExcept0_2() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeServerListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH1 reads DUT Descriptor cluster ServerList attribute from every Endpoint except 0 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("serverList", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("serverList", value, 31UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } }; @@ -34884,289 +34876,249 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("AUDIOOUTPUT.S.NU")) { + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 6; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_TGTNAV_1_9 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_TGTNAV_1_9() + : TestCommandBridge("Test_TC_TGTNAV_1_9") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_TGTNAV_1_9() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TGTNAV_1_9\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TGTNAV_1_9\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + err = TestReadTheGlobalAttributeFeatureMap_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(CurrentTarget) in AttributeList\n"); + if (ShouldSkip("TGTNAV.S.A0001")) { NextTest(); return; } - err = TestReadTheGlobalAttributeGeneratedCommandList_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip(" !AUDIOOUTPUT.S.NU ")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the global attribute: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 3UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 1UL)); - } - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TGTNAV_1_9 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_TGTNAV_1_9() - : TestCommandBridge("Test_TC_TGTNAV_1_9") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_TGTNAV_1_9() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TGTNAV_1_9\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TGTNAV_1_9\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - err = TestReadTheGlobalAttributeFeatureMap_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(CurrentTarget) in AttributeList\n"); - if (ShouldSkip("TGTNAV.S.A0001")) { - NextTest(); - return; - } - err = TestReadTheOptionalAttributeCurrentTargetInAttributeList_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); + err = TestReadTheOptionalAttributeCurrentTargetInAttributeList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); @@ -53914,5395 +53866,6 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { } }; -class Test_TC_TSTAT_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_TSTAT_2_1() - : TestCommandBridge("Test_TC_TSTAT_2_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_TSTAT_2_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSTAT_2_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSTAT_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads mandatory attributes from DUT: LocalTemperature\n"); - err = TestReadsMandatoryAttributesFromDutLocalTemperature_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read OutdoorTemperature attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0001")) { - NextTest(); - return; - } - err = TestReadOutdoorTemperatureAttributeFromTheDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read Occupancy attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.F02")) { - NextTest(); - return; - } - err = TestReadOccupancyAttributeFromTheDut_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads mandatory attributes from DUT: AbsMinHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0003")) { - NextTest(); - return; - } - err = TestReadsMandatoryAttributesFromDutAbsMinHeatSetpointLimit_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads mandatory attributes from DUT: AbsMaxHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0004")) { - NextTest(); - return; - } - err = TestReadsMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads optional attributes from DUT: AbsMinCoolSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0005")) { - NextTest(); - return; - } - err = TestReadsOptionalAttributesFromDutAbsMinCoolSetpointLimit_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads optional attributes from DUT: AbsMaxCoolSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0006")) { - NextTest(); - return; - } - err = TestReadsOptionalAttributesFromDutAbsMaxCoolSetpointLimit_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read PICoolingDemand attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0007")) { - NextTest(); - return; - } - err = TestReadPICoolingDemandAttributeFromTheDut_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read PIHeatingDemand attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0008")) { - NextTest(); - return; - } - err = TestReadPIHeatingDemandAttributeFromTheDut_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read HVACSystemTypeConfiguration attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0009")) { - NextTest(); - return; - } - err = TestReadHVACSystemTypeConfigurationAttributeFromTheDut_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read LocalTemperatureCalibration attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0010")) { - NextTest(); - return; - } - err = TestReadLocalTemperatureCalibrationAttributeFromTheDut_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Reads optional attributes from DUT: OccupiedCoolingSetpoint\n"); - if (ShouldSkip("TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestReadsOptionalAttributesFromDutOccupiedCoolingSetpoint_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads mandatory attributes from DUT: OccupiedHeatingSetpoint\n"); - if (ShouldSkip("TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestReadsMandatoryAttributesFromDutOccupiedHeatingSetpoint_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read UnoccupiedCoolingSetpoint attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02")) { - NextTest(); - return; - } - err = TestReadUnoccupiedCoolingSetpointAttributeFromTheDut_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read UnoccupiedHeatingSetpoint attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02")) { - NextTest(); - return; - } - err = TestReadUnoccupiedHeatingSetpointAttributeFromTheDut_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Reads attribute from DUT: MinHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0015")) { - NextTest(); - return; - } - err = TestReadsAttributeFromDutMinHeatSetpointLimit_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Reads attribute from DUT: MaxHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0016")) { - NextTest(); - return; - } - err = TestReadsAttributeFromDutMaxHeatSetpointLimit_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Reads optional attributes from DUT: MinCoolSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0017")) { - NextTest(); - return; - } - err = TestReadsOptionalAttributesFromDutMinCoolSetpointLimit_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Reads optional attributes from DUT: MaxCoolSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0018")) { - NextTest(); - return; - } - err = TestReadsOptionalAttributesFromDutMaxCoolSetpointLimit_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Reads optional attributes from DUT: MinSetpointDeadBand\n"); - if (ShouldSkip("TSTAT.S.F05")) { - NextTest(); - return; - } - err = TestReadsOptionalAttributesFromDutMinSetpointDeadBand_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Read RemoteSensing attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A001a")) { - NextTest(); - return; - } - err = TestReadRemoteSensingAttributeFromTheDut_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Reads mandatory attributes from DUT: ControlSequenceOfOperation\n"); - err = TestReadsMandatoryAttributesFromDutControlSequenceOfOperation_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Reads mandatory attributes from DUT: SystemMode\n"); - err = TestReadsMandatoryAttributesFromDutSystemMode_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Read ThermostatRunningMode attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A001e")) { - NextTest(); - return; - } - err = TestReadThermostatRunningModeAttributeFromTheDut_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Reads constraints of optional attributes from DUT: StartOfWeek\n"); - if (ShouldSkip("TSTAT.S.F03")) { - NextTest(); - return; - } - err = TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Reads optional attributes from DUT: NumberOfWeeklyTransitions\n"); - if (ShouldSkip("TSTAT.S.F03")) { - NextTest(); - return; - } - err = TestReadsOptionalAttributesFromDutNumberOfWeeklyTransitions_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Reads optional attributes from DUT: NumberOfDailyTransitions\n"); - if (ShouldSkip("TSTAT.S.F03")) { - NextTest(); - return; - } - err = TestReadsOptionalAttributesFromDutNumberOfDailyTransitions_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Read TemperatureSetpointHold attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0023")) { - NextTest(); - return; - } - err = TestReadTemperatureSetpointHoldAttributeFromTheDut_28(); - break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Read TemperatureSetpointHoldDuration attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0024")) { - NextTest(); - return; - } - err = TestReadTemperatureSetpointHoldDurationAttributeFromTheDut_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Read ThermostatProgrammingOperationMode attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0025")) { - NextTest(); - return; - } - err = TestReadThermostatProgrammingOperationModeAttributeFromTheDut_30(); - break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Read ThermostatRunningState attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0029")) { - NextTest(); - return; - } - err = TestReadThermostatRunningStateAttributeFromTheDut_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Read SetpointChangeSource attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0030")) { - NextTest(); - return; - } - err = TestReadSetpointChangeSourceAttributeFromTheDut_32(); - break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Read SetpointChangeAmount attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0031")) { - NextTest(); - return; - } - err = TestReadSetpointChangeAmountAttributeFromTheDut_33(); - break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Read SetpointChangeSourceTimestamp attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0032")) { - NextTest(); - return; - } - err = TestReadSetpointChangeSourceTimestampAttributeFromTheDut_34(); - break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Read OccupiedSetback attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.F02")) { - NextTest(); - return; - } - err = TestReadOccupiedSetbackAttributeFromTheDut_35(); - break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Read OccupiedSetbackMin attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.F02")) { - NextTest(); - return; - } - err = TestReadOccupiedSetbackMinAttributeFromTheDut_36(); - break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Read OccupiedSetbackMax attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.F02")) { - NextTest(); - return; - } - err = TestReadOccupiedSetbackMaxAttributeFromTheDut_37(); - break; - case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Read UnoccupiedSetback attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F04")) { - NextTest(); - return; - } - err = TestReadUnoccupiedSetbackAttributeFromTheDut_38(); - break; - case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Read UnoccupiedSetbackMin attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F04")) { - NextTest(); - return; - } - err = TestReadUnoccupiedSetbackMinAttributeFromTheDut_39(); - break; - case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : Read UnoccupiedSetbackMax attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F04")) { - NextTest(); - return; - } - err = TestReadUnoccupiedSetbackMaxAttributeFromTheDut_40(); - break; - case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Read EmergencyHeatDelta attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A003a")) { - NextTest(); - return; - } - err = TestReadEmergencyHeatDeltaAttributeFromTheDut_41(); - break; - case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Read ACType attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0040")) { - NextTest(); - return; - } - err = TestReadACTypeAttributeFromTheDut_42(); - break; - case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Read ACCapacity attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0041")) { - NextTest(); - return; - } - err = TestReadACCapacityAttributeFromTheDut_43(); - break; - case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Read ACRefrigerantType attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0042")) { - NextTest(); - return; - } - err = TestReadACRefrigerantTypeAttributeFromTheDut_44(); - break; - case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : Read ACCompressorType attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0043")) { - NextTest(); - return; - } - err = TestReadACCompressorTypeAttributeFromTheDut_45(); - break; - case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : Read ACErrorCode attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0044")) { - NextTest(); - return; - } - err = TestReadACErrorCodeAttributeFromTheDut_46(); - break; - case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : Read ACLouverPosition attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0045")) { - NextTest(); - return; - } - err = TestReadACLouverPositionAttributeFromTheDut_47(); - break; - case 48: - ChipLogProgress(chipTool, " ***** Test Step 48 : Read ACCoilTemperature attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0046")) { - NextTest(); - return; - } - err = TestReadACCoilTemperatureAttributeFromTheDut_48(); - break; - case 49: - ChipLogProgress(chipTool, " ***** Test Step 49 : Read ACCapacityFormat attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0047")) { - NextTest(); - return; - } - err = TestReadACCapacityFormatAttributeFromTheDut_49(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - 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; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 50; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutLocalTemperature_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeLocalTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: LocalTemperature Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("localTemperature", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("localTemperature", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("localTemperature", [value shortValue], 32767)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadOutdoorTemperatureAttributeFromTheDut_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOutdoorTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read OutdoorTemperature attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("outdoorTemperature", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("outdoorTemperature", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("outdoorTemperature", [value shortValue], 32767)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadOccupancyAttributeFromTheDut_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read Occupancy attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("occupancy", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("occupancy", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("occupancy", [value unsignedCharValue], 1U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMinHeatSetpointLimit_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAbsMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: AbsMinHeatSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("absMinHeatSetpointLimit", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("absMinHeatSetpointLimit", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("absMinHeatSetpointLimit", [value shortValue], 32767)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAbsMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: AbsMaxHeatSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("absMaxHeatSetpointLimit", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("absMaxHeatSetpointLimit", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("absMaxHeatSetpointLimit", [value shortValue], 32767)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributesFromDutAbsMinCoolSetpointLimit_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAbsMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attributes from DUT: AbsMinCoolSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("absMinCoolSetpointLimit", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("absMinCoolSetpointLimit", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("absMinCoolSetpointLimit", [value shortValue], 32767)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributesFromDutAbsMaxCoolSetpointLimit_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attributes from DUT: AbsMaxCoolSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("absMaxCoolSetpointLimit", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("absMaxCoolSetpointLimit", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("absMaxCoolSetpointLimit", [value shortValue], 32767)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadPICoolingDemandAttributeFromTheDut_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePICoolingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read PICoolingDemand attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("PICoolingDemand", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("PICoolingDemand", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("PICoolingDemand", [value unsignedCharValue], 100U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadPIHeatingDemandAttributeFromTheDut_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePIHeatingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read PIHeatingDemand attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("PIHeatingDemand", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("PIHeatingDemand", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("PIHeatingDemand", [value unsignedCharValue], 100U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadHVACSystemTypeConfigurationAttributeFromTheDut_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeHVACSystemTypeConfigurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read HVACSystemTypeConfiguration attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("HVACSystemTypeConfiguration", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("HVACSystemTypeConfiguration", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("HVACSystemTypeConfiguration", [value unsignedCharValue], 63U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadLocalTemperatureCalibrationAttributeFromTheDut_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeLocalTemperatureCalibrationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read LocalTemperatureCalibration attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("localTemperatureCalibration", "int8s", "int8s")); - VerifyOrReturn(CheckConstraintMinValue("localTemperatureCalibration", [value charValue], 25)); - VerifyOrReturn(CheckConstraintMaxValue("localTemperatureCalibration", [value charValue], -25)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributesFromDutOccupiedCoolingSetpoint_12() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attributes from DUT: OccupiedCoolingSetpoint Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("occupiedCoolingSetpoint", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("occupiedCoolingSetpoint", [value shortValue], 1600)); - VerifyOrReturn(CheckConstraintMaxValue("occupiedCoolingSetpoint", [value shortValue], 3200)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutOccupiedHeatingSetpoint_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: OccupiedHeatingSetpoint Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("occupiedHeatingSetpoint", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("occupiedHeatingSetpoint", [value shortValue], 700)); - VerifyOrReturn(CheckConstraintMaxValue("occupiedHeatingSetpoint", [value shortValue], 3000)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadUnoccupiedCoolingSetpointAttributeFromTheDut_14() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeUnoccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read UnoccupiedCoolingSetpoint attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("unoccupiedCoolingSetpoint", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("unoccupiedCoolingSetpoint", [value shortValue], 1600)); - VerifyOrReturn(CheckConstraintMaxValue("unoccupiedCoolingSetpoint", [value shortValue], 3200)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadUnoccupiedHeatingSetpointAttributeFromTheDut_15() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeUnoccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read UnoccupiedHeatingSetpoint attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("unoccupiedHeatingSetpoint", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("unoccupiedHeatingSetpoint", [value shortValue], 700)); - VerifyOrReturn(CheckConstraintMaxValue("unoccupiedHeatingSetpoint", [value shortValue], 3000)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsAttributeFromDutMinHeatSetpointLimit_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads attribute from DUT: MinHeatSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("minHeatSetpointLimit", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("minHeatSetpointLimit", [value shortValue], 700)); - VerifyOrReturn(CheckConstraintMaxValue("minHeatSetpointLimit", [value shortValue], 3000)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsAttributeFromDutMaxHeatSetpointLimit_17() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads attribute from DUT: MaxHeatSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("maxHeatSetpointLimit", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("maxHeatSetpointLimit", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("maxHeatSetpointLimit", [value shortValue], 32767)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributesFromDutMinCoolSetpointLimit_18() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attributes from DUT: MinCoolSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("minCoolSetpointLimit", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("minCoolSetpointLimit", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("minCoolSetpointLimit", [value shortValue], 32767)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributesFromDutMaxCoolSetpointLimit_19() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attributes from DUT: MaxCoolSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("maxCoolSetpointLimit", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("maxCoolSetpointLimit", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("maxCoolSetpointLimit", [value shortValue], 32767)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributesFromDutMinSetpointDeadBand_20() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinSetpointDeadBandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attributes from DUT: MinSetpointDeadBand Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("minSetpointDeadBand", "int8s", "int8s")); - VerifyOrReturn(CheckConstraintMinValue("minSetpointDeadBand", [value charValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("minSetpointDeadBand", [value charValue], 25)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadRemoteSensingAttributeFromTheDut_21() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeRemoteSensingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read RemoteSensing attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("remoteSensing", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("remoteSensing", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("remoteSensing", [value unsignedCharValue], 7U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutControlSequenceOfOperation_22() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeControlSequenceOfOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: ControlSequenceOfOperation Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("controlSequenceOfOperation", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("controlSequenceOfOperation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("controlSequenceOfOperation", [value unsignedCharValue], 5U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutSystemMode_23() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeSystemModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: SystemMode Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("systemMode", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("systemMode", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("systemMode", [value unsignedCharValue], 9U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadThermostatRunningModeAttributeFromTheDut_24() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeThermostatRunningModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ThermostatRunningMode attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("thermostatRunningMode", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("thermostatRunningMode", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("thermostatRunningMode", [value unsignedCharValue], 9U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_25() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeStartOfWeekWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of optional attributes from DUT: StartOfWeek Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("startOfWeek", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("startOfWeek", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("startOfWeek", [value unsignedCharValue], 6U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributesFromDutNumberOfWeeklyTransitions_26() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeNumberOfWeeklyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attributes from DUT: NumberOfWeeklyTransitions Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("numberOfWeeklyTransitions", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("numberOfWeeklyTransitions", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("numberOfWeeklyTransitions", [value unsignedCharValue], 255U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributesFromDutNumberOfDailyTransitions_27() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeNumberOfDailyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attributes from DUT: NumberOfDailyTransitions Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("numberOfDailyTransitions", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("numberOfDailyTransitions", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("numberOfDailyTransitions", [value unsignedCharValue], 255U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTemperatureSetpointHoldAttributeFromTheDut_28() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTemperatureSetpointHoldWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read TemperatureSetpointHold attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("temperatureSetpointHold", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("temperatureSetpointHold", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("temperatureSetpointHold", [value unsignedCharValue], 1U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTemperatureSetpointHoldDurationAttributeFromTheDut_29() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTemperatureSetpointHoldDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read TemperatureSetpointHoldDuration attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("temperatureSetpointHoldDuration", "int16u", "int16u")); - VerifyOrReturn( - CheckConstraintMinValue("temperatureSetpointHoldDuration", [value unsignedShortValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("temperatureSetpointHoldDuration", [value unsignedShortValue], 1440U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadThermostatProgrammingOperationModeAttributeFromTheDut_30() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeThermostatProgrammingOperationModeWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ThermostatProgrammingOperationMode attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("thermostatProgrammingOperationMode", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("thermostatProgrammingOperationMode", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("thermostatProgrammingOperationMode", [value unsignedCharValue], 7U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadThermostatRunningStateAttributeFromTheDut_31() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeThermostatRunningStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ThermostatRunningState attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("thermostatRunningState", "bitmap16", "bitmap16")); - VerifyOrReturn(CheckConstraintMinValue("thermostatRunningState", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("thermostatRunningState", [value unsignedShortValue], 127U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadSetpointChangeSourceAttributeFromTheDut_32() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeSetpointChangeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read SetpointChangeSource attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("setpointChangeSource", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("setpointChangeSource", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("setpointChangeSource", [value unsignedCharValue], 2U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadSetpointChangeAmountAttributeFromTheDut_33() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeSetpointChangeAmountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read SetpointChangeAmount attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("setpointChangeAmount", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("setpointChangeAmount", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("setpointChangeAmount", [value shortValue], 32767)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadSetpointChangeSourceTimestampAttributeFromTheDut_34() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeSetpointChangeSourceTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read SetpointChangeSourceTimestamp attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("setpointChangeSourceTimestamp", "utc", "utc")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadOccupiedSetbackAttributeFromTheDut_35() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read OccupiedSetback attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("occupiedSetback", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("occupiedSetback", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("occupiedSetback", [value unsignedCharValue], 255U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadOccupiedSetbackMinAttributeFromTheDut_36() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read OccupiedSetbackMin attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("occupiedSetbackMin", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("occupiedSetbackMin", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("occupiedSetbackMin", [value unsignedCharValue], 255U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadOccupiedSetbackMaxAttributeFromTheDut_37() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read OccupiedSetbackMax attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("occupiedSetbackMax", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("occupiedSetbackMax", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("occupiedSetbackMax", [value unsignedCharValue], 255U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadUnoccupiedSetbackAttributeFromTheDut_38() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeUnoccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read UnoccupiedSetback attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("unoccupiedSetback", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("unoccupiedSetback", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("unoccupiedSetback", [value unsignedCharValue], 255U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadUnoccupiedSetbackMinAttributeFromTheDut_39() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeUnoccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read UnoccupiedSetbackMin attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("unoccupiedSetbackMin", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("unoccupiedSetbackMin", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("unoccupiedSetbackMin", [value unsignedCharValue], 255U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadUnoccupiedSetbackMaxAttributeFromTheDut_40() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeUnoccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read UnoccupiedSetbackMax attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("unoccupiedSetbackMax", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("unoccupiedSetbackMax", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("unoccupiedSetbackMax", [value unsignedCharValue], 255U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadEmergencyHeatDeltaAttributeFromTheDut_41() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEmergencyHeatDeltaWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read EmergencyHeatDelta attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("emergencyHeatDelta", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("emergencyHeatDelta", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("emergencyHeatDelta", [value unsignedCharValue], 255U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadACTypeAttributeFromTheDut_42() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeACTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ACType attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("ACType", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("ACType", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("ACType", [value unsignedCharValue], 4U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadACCapacityAttributeFromTheDut_43() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeACCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ACCapacity attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("ACCapacity", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("ACCapacity", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("ACCapacity", [value unsignedShortValue], 65535U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadACRefrigerantTypeAttributeFromTheDut_44() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeACRefrigerantTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ACRefrigerantType attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("ACRefrigerantType", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("ACRefrigerantType", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("ACRefrigerantType", [value unsignedCharValue], 3U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadACCompressorTypeAttributeFromTheDut_45() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeACCompressorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ACCompressorType attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("ACCompressorType", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("ACCompressorType", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("ACCompressorType", [value unsignedCharValue], 3U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadACErrorCodeAttributeFromTheDut_46() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeACErrorCodeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ACErrorCode attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("ACErrorCode", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadACLouverPositionAttributeFromTheDut_47() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeACLouverPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ACLouverPosition attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("ACLouverPosition", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("ACLouverPosition", [value unsignedCharValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue("ACLouverPosition", [value unsignedCharValue], 5U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadACCoilTemperatureAttributeFromTheDut_48() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeACCoilTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ACCoilTemperature attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("ACCoilTemperature", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("ACCoilTemperature", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("ACCoilTemperature", [value shortValue], 32767)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadACCapacityFormatAttributeFromTheDut_49() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeACCapacityformatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ACCapacityFormat attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ACCapacityformat", actualValue, 0U)); - } - - VerifyOrReturn(CheckConstraintType("ACCapacityformat", "enum8", "enum8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TSTAT_2_2 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_TSTAT_2_2() - : TestCommandBridge("Test_TC_TSTAT_2_2") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_TSTAT_2_2() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSTAT_2_2\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSTAT_2_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : Reads OccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is " - "within range\n"); - if (ShouldSkip("TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestReadsOccupiedCoolingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_1(); - break; - case 2: - ChipLogProgress(chipTool, - " ***** Test Step 2 : Writes a value back that is different but valid for OccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestWritesAValueBackThatIsDifferentButValidForOccupiedCoolingSetpointAttribute_2(); - break; - case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Reads it back again to confirm the successful write of OccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedCoolingSetpointAttribute_3(); - break; - case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Writes OccupiedCoolingSetpoint to value below the ABSMinCoolSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestWritesOccupiedCoolingSetpointToValueBelowTheABSMinCoolSetpointLimit_4(); - break; - case 5: - ChipLogProgress( - chipTool, " ***** Test Step 5 : Writes OccupiedCoolingSetpoint to value above the MaxCoolSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestWritesOccupiedCoolingSetpointToValueAboveTheMaxCoolSetpointLimit_5(); - break; - case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Writes the limit of MinCoolSetpointLimit to OccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.F01 && !TSTAT.S.F05")) { - NextTest(); - return; - } - err = TestWritesTheLimitOfMinCoolSetpointLimitToOccupiedCoolingSetpointAttribute_6(); - break; - case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : Writes the CoolingSetpoint below the HeatingSetpoint when auto is enabled\n"); - if (ShouldSkip("TSTAT.S.F05")) { - NextTest(); - return; - } - err = TestWritesTheCoolingSetpointBelowTheHeatingSetpointWhenAutoIsEnabled_7(); - break; - case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Writes the limit of MaxCoolSetpointLimit to OccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestWritesTheLimitOfMaxCoolSetpointLimitToOccupiedCoolingSetpointAttribute_8(); - break; - case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Reads OccupiedHeatingSetpoint attribute from Server DUT and verifies that the value is " - "within range\n"); - if (ShouldSkip("TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestReadsOccupiedHeatingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_9(); - break; - case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : Writes a value back that is different but valid for OccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestWritesAValueBackThatIsDifferentButValidForOccupiedHeatingSetpointAttribute_10(); - break; - case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Reads it back again to confirm the successful write of OccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedHeatingSetpointAttribute_11(); - break; - case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Writes OccupiedHeatingSetpoint to value below the MinHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestWritesOccupiedHeatingSetpointToValueBelowTheMinHeatSetpointLimit_12(); - break; - case 13: - ChipLogProgress( - chipTool, " ***** Test Step 13 : Writes OccupiedHeatingSetpoint to value above the MaxHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestWritesOccupiedHeatingSetpointToValueAboveTheMaxHeatSetpointLimit_13(); - break; - case 14: - ChipLogProgress( - chipTool, " ***** Test Step 14 : Writes the limit of MinHeatSetpointLimit to OccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestWritesTheLimitOfMinHeatSetpointLimitToOccupiedHeatingSetpointAttribute_14(); - break; - case 15: - ChipLogProgress(chipTool, - " ***** Test Step 15 : Reads it back again to confirm the successful write of OccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedHeatingSetpointAttribute_15(); - break; - case 16: - ChipLogProgress( - chipTool, " ***** Test Step 16 : Writes the limit of MaxHeatSetpointLimit to OccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.F00 && !TSTAT.S.F05")) { - NextTest(); - return; - } - err = TestWritesTheLimitOfMaxHeatSetpointLimitToOccupiedHeatingSetpointAttribute_16(); - break; - case 17: - ChipLogProgress( - chipTool, " ***** Test Step 17 : Writes the limit of MaxHeatSetpointLimit to OccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.F05")) { - NextTest(); - return; - } - err = TestWritesTheLimitOfMaxHeatSetpointLimitToOccupiedHeatingSetpointAttribute_17(); - break; - case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : Reads UnoccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is " - "within range\n"); - if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestReadsUnoccupiedCoolingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_18(); - break; - case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : Writes a value back that is different but valid for UnoccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestWritesAValueBackThatIsDifferentButValidForUnoccupiedCoolingSetpointAttribute_19(); - break; - case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : Reads it back again to confirm the successful write of UnoccupiedCoolingSetpoint " - "attribute\n"); - if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfUnoccupiedCoolingSetpointAttribute_20(); - break; - case 21: - ChipLogProgress( - chipTool, " ***** Test Step 21 : Writes UnoccupiedCoolingSetpoint to value below the MinCoolSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestWritesUnoccupiedCoolingSetpointToValueBelowTheMinCoolSetpointLimit_21(); - break; - case 22: - ChipLogProgress( - chipTool, " ***** Test Step 22 : Writes UnoccupiedCoolingSetpoint to value above the MaxCoolSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestWritesUnoccupiedCoolingSetpointToValueAboveTheMaxCoolSetpointLimit_22(); - break; - case 23: - ChipLogProgress(chipTool, - " ***** Test Step 23 : Writes the limit of MinCoolSetpointLimit to UnoccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestWritesTheLimitOfMinCoolSetpointLimitToUnoccupiedCoolingSetpointAttribute_23(); - break; - case 24: - ChipLogProgress(chipTool, - " ***** Test Step 24 : Writes the limit of MaxCoolSetpointLimit to UnoccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestWritesTheLimitOfMaxCoolSetpointLimitToUnoccupiedCoolingSetpointAttribute_24(); - break; - case 25: - ChipLogProgress(chipTool, - " ***** Test Step 25 : Reads UnoccupiedHeatingSetpoint attribute from Server DUT and verifies that the value is " - "within range\n"); - if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestReadsUnoccupiedHeatingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_25(); - break; - case 26: - ChipLogProgress(chipTool, - " ***** Test Step 26 : Writes a value back that is different but valid for UnoccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestWritesAValueBackThatIsDifferentButValidForUnoccupiedHeatingSetpointAttribute_26(); - break; - case 27: - ChipLogProgress(chipTool, - " ***** Test Step 27 : Reads it back again to confirm the successful write of UnoccupiedHeatingSetpoint " - "attribute\n"); - if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfUnoccupiedHeatingSetpointAttribute_27(); - break; - case 28: - ChipLogProgress( - chipTool, " ***** Test Step 28 : Writes UnoccupiedHeatingSetpoint to value below the MinHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestWritesUnoccupiedHeatingSetpointToValueBelowTheMinHeatSetpointLimit_28(); - break; - case 29: - ChipLogProgress( - chipTool, " ***** Test Step 29 : Writes UnoccupiedHeatingSetpoint to value above the MaxHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestWritesUnoccupiedHeatingSetpointToValueAboveTheMaxHeatSetpointLimit_29(); - break; - case 30: - ChipLogProgress(chipTool, - " ***** Test Step 30 : Writes the limit of MinHeatSetpointLimit to UnoccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestWritesTheLimitOfMinHeatSetpointLimitToUnoccupiedHeatingSetpointAttribute_30(); - break; - case 31: - ChipLogProgress(chipTool, - " ***** Test Step 31 : Writes the limit of MaxHeatSetpointLimit to UnoccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestWritesTheLimitOfMaxHeatSetpointLimitToUnoccupiedHeatingSetpointAttribute_31(); - break; - case 32: - ChipLogProgress(chipTool, - " ***** Test Step 32 : Reads MinHeatSetpointLimit attribute from Server DUT and verifies that the value is within " - "range\n"); - if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015")) { - NextTest(); - return; - } - err = TestReadsMinHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_32(); - break; - case 33: - ChipLogProgress(chipTool, - " ***** Test Step 33 : Writes a value back that is different but valid for MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015")) { - NextTest(); - return; - } - err = TestWritesAValueBackThatIsDifferentButValidForMinHeatSetpointLimitAttribute_33(); - break; - case 34: - ChipLogProgress(chipTool, - " ***** Test Step 34 : Reads it back again to confirm the successful write of MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015")) { - NextTest(); - return; - } - err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinHeatSetpointLimitAttribute_34(); - break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Writes a value back that is different but violates the deadband\n"); - if (ShouldSkip("TSTAT.S.A0015 && TSTAT.S.F05")) { - NextTest(); - return; - } - err = TestWritesAValueBackThatIsDifferentButViolatesTheDeadband_35(); - break; - case 36: - ChipLogProgress( - chipTool, " ***** Test Step 36 : Writes MinHeatSetpointLimit to value below the AbsMinHeatSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015")) { - NextTest(); - return; - } - err = TestWritesMinHeatSetpointLimitToValueBelowTheAbsMinHeatSetpointLimit_36(); - break; - case 37: - ChipLogProgress( - chipTool, " ***** Test Step 37 : Writes MinHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015")) { - NextTest(); - return; - } - err = TestWritesMinHeatSetpointLimitToValueAboveTheAbsMaxHeatSetpointLimit_37(); - break; - case 38: - ChipLogProgress( - chipTool, " ***** Test Step 38 : Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015")) { - NextTest(); - return; - } - err = TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_38(); - break; - case 39: - ChipLogProgress( - chipTool, " ***** Test Step 39 : Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015 && !TSTAT.S.F05")) { - NextTest(); - return; - } - err = TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_39(); - break; - case 40: - ChipLogProgress(chipTool, - " ***** Test Step 40 : Reads MaxHeatSetpointLimit attribute from Server DUT and verifies that the value is within " - "range\n"); - if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05")) { - NextTest(); - return; - } - err = TestReadsMaxHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_40(); - break; - case 41: - ChipLogProgress( - chipTool, " ***** Test Step 41 : Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015")) { - NextTest(); - return; - } - err = TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_41(); - break; - case 42: - ChipLogProgress( - chipTool, " ***** Test Step 42 : Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.A0015 && TSTAT.S.F05")) { - NextTest(); - return; - } - err = TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_42(); - break; - case 43: - ChipLogProgress(chipTool, - " ***** Test Step 43 : Writes a value back that is different but valid for MaxHeatSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05")) { - NextTest(); - return; - } - err = TestWritesAValueBackThatIsDifferentButValidForMaxHeatSetpointLimitAttribute_43(); - break; - case 44: - ChipLogProgress(chipTool, - " ***** Test Step 44 : Reads it back again to confirm the successful write of MaxHeatSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05")) { - NextTest(); - return; - } - err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxHeatSetpointLimitAttribute_44(); - break; - case 45: - ChipLogProgress( - chipTool, " ***** Test Step 45 : Writes MaxHeatSetpointLimit to value below the AbsMinHeatSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016")) { - NextTest(); - return; - } - err = TestWritesMaxHeatSetpointLimitToValueBelowTheAbsMinHeatSetpointLimit_45(); - break; - case 46: - ChipLogProgress( - chipTool, " ***** Test Step 46 : Writes MaxHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016")) { - NextTest(); - return; - } - err = TestWritesMaxHeatSetpointLimitToValueAboveTheAbsMaxHeatSetpointLimit_46(); - break; - case 47: - ChipLogProgress( - chipTool, " ***** Test Step 47 : Writes the limit of AbsMinHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016")) { - NextTest(); - return; - } - err = TestWritesTheLimitOfAbsMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_47(); - break; - case 48: - ChipLogProgress( - chipTool, " ***** Test Step 48 : Writes the limit of AbsMaxHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05")) { - NextTest(); - return; - } - err = TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_48(); - break; - case 49: - ChipLogProgress(chipTool, - " ***** Test Step 49 : Reads MinCoolSetpointLimit attribute from Server DUT and verifies that the value is within " - "range\n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { - NextTest(); - return; - } - err = TestReadsMinCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_49(); - break; - case 50: - ChipLogProgress(chipTool, - " ***** Test Step 50 : Writes a value back that is different but valid for MinCoolSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { - NextTest(); - return; - } - err = TestWritesAValueBackThatIsDifferentButValidForMinCoolSetpointLimitAttribute_50(); - break; - case 51: - ChipLogProgress(chipTool, - " ***** Test Step 51 : Reads it back again to confirm the successful write of MinCoolSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { - NextTest(); - return; - } - err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinCoolSetpointLimitAttribute_51(); - break; - case 52: - ChipLogProgress( - chipTool, " ***** Test Step 52 : Writes MinCoolSetpointLimit to value below the AbsMinCoolSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { - NextTest(); - return; - } - err = TestWritesMinCoolSetpointLimitToValueBelowTheAbsMinCoolSetpointLimit_52(); - break; - case 53: - ChipLogProgress( - chipTool, " ***** Test Step 53 : Writes MinCoolSetpointLimit to value above the MaxCoolSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { - NextTest(); - return; - } - err = TestWritesMinCoolSetpointLimitToValueAboveTheMaxCoolSetpointLimit_53(); - break; - case 54: - ChipLogProgress( - chipTool, " ***** Test Step 54 : Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { - NextTest(); - return; - } - err = TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_54(); - break; - case 55: - ChipLogProgress( - chipTool, " ***** Test Step 55 : Writes the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { - NextTest(); - return; - } - err = TestWritesTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_55(); - break; - case 56: - ChipLogProgress( - chipTool, " ***** Test Step 56 : Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { - NextTest(); - return; - } - err = TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_56(); - break; - case 57: - ChipLogProgress(chipTool, - " ***** Test Step 57 : Reads MaxCoolSetpointLimit attribute from Server DUT and verifies that the value is within " - "range\n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018")) { - NextTest(); - return; - } - err = TestReadsMaxCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_57(); - break; - case 58: - ChipLogProgress(chipTool, - " ***** Test Step 58 : Writes a value back that is different but valid for MaxCoolSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.F05")) { - NextTest(); - return; - } - err = TestWritesAValueBackThatIsDifferentButValidForMaxCoolSetpointLimitAttribute_58(); - break; - case 59: - ChipLogProgress(chipTool, - " ***** Test Step 59 : Reads it back again to confirm the successful write of MaxCoolSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.F05")) { - NextTest(); - return; - } - err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxCoolSetpointLimitAttribute_59(); - break; - case 60: - ChipLogProgress( - chipTool, " ***** Test Step 60 : Writes MaxCoolSetpointLimit to value below the AbsMinCoolSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018")) { - NextTest(); - return; - } - err = TestWritesMaxCoolSetpointLimitToValueBelowTheAbsMinCoolSetpointLimit_60(); - break; - case 61: - ChipLogProgress( - chipTool, " ***** Test Step 61 : Writes MaxCoolSetpointLimit to value above the MaxCoolSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018")) { - NextTest(); - return; - } - err = TestWritesMaxCoolSetpointLimitToValueAboveTheMaxCoolSetpointLimit_61(); - break; - case 62: - ChipLogProgress( - chipTool, " ***** Test Step 62 : Writes the limit of AbsMinCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018")) { - NextTest(); - return; - } - err = TestWritesTheLimitOfAbsMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_62(); - break; - case 63: - ChipLogProgress( - chipTool, " ***** Test Step 63 : Writes the limit of MaxCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018")) { - NextTest(); - return; - } - err = TestWritesTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_63(); - break; - case 64: - ChipLogProgress(chipTool, " ***** Test Step 64 : Writes (sets back) default value of MinHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0015")) { - NextTest(); - return; - } - err = TestWritesSetsBackDefaultValueOfMinHeatSetpointLimit_64(); - break; - case 65: - ChipLogProgress(chipTool, " ***** Test Step 65 : Writes (sets back)default value of MaxHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0016 && !TSTAT.S.F05")) { - NextTest(); - return; - } - err = TestWritesSetsBackdefaultValueOfMaxHeatSetpointLimit_65(); - break; - case 66: - ChipLogProgress(chipTool, " ***** Test Step 66 : Writes MaxHeatSetpointLimit That meets the deadband of 2.5C\n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0016 && !TSTAT.S.F05")) { - NextTest(); - return; - } - err = TestWritesMaxHeatSetpointLimitThatMeetsTheDeadbandOf25c_66(); - break; - case 67: - ChipLogProgress(chipTool, " ***** Test Step 67 : Writes (sets back) default value of MinCoolSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { - NextTest(); - return; - } - err = TestWritesSetsBackDefaultValueOfMinCoolSetpointLimit_67(); - break; - case 68: - ChipLogProgress(chipTool, " ***** Test Step 68 : Writes (sets back) default value of MaxCoolSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018")) { - NextTest(); - return; - } - err = TestWritesSetsBackDefaultValueOfMaxCoolSetpointLimit_68(); - break; - case 69: - ChipLogProgress(chipTool, - " ***** Test Step 69 : Reads MinSetpointDeadBand attribute from Server DUT and verifies that the value is within " - "range\n"); - if (ShouldSkip("TSTAT.S.F05")) { - NextTest(); - return; - } - err = TestReadsMinSetpointDeadBandAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_69(); - break; - case 70: - ChipLogProgress(chipTool, - " ***** Test Step 70 : Writes a value back that is different but valid for MinSetpointDeadBand attribute\n"); - if (ShouldSkip("TSTAT.S.F05 && TSTAT.S.M.MinSetpointDeadBandWritable")) { - NextTest(); - return; - } - err = TestWritesAValueBackThatIsDifferentButValidForMinSetpointDeadBandAttribute_70(); - break; - case 71: - ChipLogProgress(chipTool, - " ***** Test Step 71 : Reads it back again to confirm the successful write of MinSetpointDeadBand attribute\n"); - if (ShouldSkip("TSTAT.S.F05 && TSTAT.S.M.MinSetpointDeadBandWritable")) { - NextTest(); - return; - } - err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinSetpointDeadBandAttribute_71(); - break; - case 72: - ChipLogProgress(chipTool, " ***** Test Step 72 : Writes the value below MinSetpointDeadBand\n"); - if (ShouldSkip("TSTAT.S.F05 && TSTAT.S.M.MinSetpointDeadBandWritable")) { - NextTest(); - return; - } - err = TestWritesTheValueBelowMinSetpointDeadBand_72(); - break; - case 73: - ChipLogProgress(chipTool, " ***** Test Step 73 : Writes the value above MinSetpointDeadBand \n"); - if (ShouldSkip("TSTAT.S.F05 && TSTAT.S.M.MinSetpointDeadBandWritable")) { - NextTest(); - return; - } - err = TestWritesTheValueAboveMinSetpointDeadBand_73(); - break; - case 74: - ChipLogProgress(chipTool, " ***** Test Step 74 : Writes the min limit of MinSetpointDeadBand\n"); - if (ShouldSkip("TSTAT.S.F05 && TSTAT.S.M.MinSetpointDeadBandWritable")) { - NextTest(); - return; - } - err = TestWritesTheMinLimitOfMinSetpointDeadBand_74(); - break; - case 75: - ChipLogProgress(chipTool, " ***** Test Step 75 : Writes the max limit of MinSetpointDeadBand\n"); - if (ShouldSkip("TSTAT.S.F05 && TSTAT.S.M.MinSetpointDeadBandWritable")) { - NextTest(); - return; - } - err = TestWritesTheMaxLimitOfMinSetpointDeadBand_75(); - break; - case 76: - ChipLogProgress(chipTool, - " ***** Test Step 76 : Reads ControlSequenceOfOperation from Server DUT and verifies that the value is valid\n"); - if (ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestReadsControlSequenceOfOperationFromServerDutAndVerifiesThatTheValueIsValid_76(); - break; - case 77: - ChipLogProgress( - chipTool, " ***** Test Step 77 : Write Attribute command for ControlSequenceOfOperation with a new valid value\n"); - if (ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestWriteAttributeCommandForControlSequenceOfOperationWithANewValidValue_77(); - break; - case 78: - ChipLogProgress(chipTool, " ***** Test Step 78 : Read it back again to confirm the successful write\n"); - if (ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestReadItBackAgainToConfirmTheSuccessfulWrite_78(); - break; - case 79: - ChipLogProgress(chipTool, - " ***** Test Step 79 : Writes MaxHeatSetpointLimit attribute to default value of 2950 to meet deadband " - "constraint\n"); - if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015 && TSTAT.S.F05")) { - NextTest(); - return; - } - err = TestWritesMaxHeatSetpointLimitAttributeToDefaultValueOf2950ToMeetDeadbandConstraint_79(); - break; - case 80: - ChipLogProgress(chipTool, " ***** Test Step 80 : Sets OccupiedCoolingSetpoint to default value\n"); - if (ShouldSkip("TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestSetsOccupiedCoolingSetpointToDefaultValue_80(); - break; - case 81: - ChipLogProgress(chipTool, " ***** Test Step 81 : Sets OccupiedHeatingSetpoint to default value\n"); - if (ShouldSkip("TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestSetsOccupiedHeatingSetpointToDefaultValue_81(); - break; - case 82: - ChipLogProgress(chipTool, " ***** Test Step 82 : Sends SetpointRaise Command Heat Only\n"); - if (ShouldSkip("TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestSendsSetpointRaiseCommandHeatOnly_82(); - break; - case 83: - ChipLogProgress( - chipTool, " ***** Test Step 83 : Reads back OccupiedHeatingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_83(); - break; - case 84: - ChipLogProgress(chipTool, " ***** Test Step 84 : Sets OccupiedHeatingSetpoint to default value\n"); - if (ShouldSkip("TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestSetsOccupiedHeatingSetpointToDefaultValue_84(); - break; - case 85: - ChipLogProgress(chipTool, " ***** Test Step 85 : Sends SetpointRaise Command Heat Only\n"); - if (ShouldSkip("TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestSendsSetpointRaiseCommandHeatOnly_85(); - break; - case 86: - ChipLogProgress( - chipTool, " ***** Test Step 86 : Reads back OccupiedHeatingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_86(); - break; - case 87: - ChipLogProgress(chipTool, " ***** Test Step 87 : Sends SetpointRaise Command Cool Only\n"); - if (ShouldSkip("TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestSendsSetpointRaiseCommandCoolOnly_87(); - break; - case 88: - ChipLogProgress( - chipTool, " ***** Test Step 88 : Reads back OccupiedCoolingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestReadsBackOccupiedCoolingSetpointToConfirmTheSuccessOfTheWrite_88(); - break; - case 89: - ChipLogProgress(chipTool, " ***** Test Step 89 : Sets OccupiedCoolingSetpoint to default value\n"); - if (ShouldSkip("TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestSetsOccupiedCoolingSetpointToDefaultValue_89(); - break; - case 90: - ChipLogProgress(chipTool, " ***** Test Step 90 : Sends SetpointRaise Command Cool Only\n"); - if (ShouldSkip("TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestSendsSetpointRaiseCommandCoolOnly_90(); - break; - case 91: - ChipLogProgress( - chipTool, " ***** Test Step 91 : Reads back OccupiedCoolingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestReadsBackOccupiedCoolingSetpointToConfirmTheSuccessOfTheWrite_91(); - break; - case 92: - ChipLogProgress(chipTool, " ***** Test Step 92 : Sets OccupiedCoolingSetpoint to default value\n"); - if (ShouldSkip("TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestSetsOccupiedCoolingSetpointToDefaultValue_92(); - break; - case 93: - ChipLogProgress(chipTool, " ***** Test Step 93 : Sets OccupiedHeatingSetpoint to default value\n"); - if (ShouldSkip("TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestSetsOccupiedHeatingSetpointToDefaultValue_93(); - break; - case 94: - ChipLogProgress(chipTool, " ***** Test Step 94 : Sends SetpointRaise Command Heat & Cool\n"); - if (ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestSendsSetpointRaiseCommandHeatCool_94(); - break; - case 95: - ChipLogProgress( - chipTool, " ***** Test Step 95 : Reads back OccupiedCoolingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestReadsBackOccupiedCoolingSetpointToConfirmTheSuccessOfTheWrite_95(); - break; - case 96: - ChipLogProgress( - chipTool, " ***** Test Step 96 : Reads back OccupiedHeatingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_96(); - break; - case 97: - ChipLogProgress(chipTool, " ***** Test Step 97 : Sets OccupiedCoolingSetpoint to default value\n"); - if (ShouldSkip("TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestSetsOccupiedCoolingSetpointToDefaultValue_97(); - break; - case 98: - ChipLogProgress(chipTool, " ***** Test Step 98 : Sets OccupiedHeatingSetpoint to default value\n"); - if (ShouldSkip("TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestSetsOccupiedHeatingSetpointToDefaultValue_98(); - break; - case 99: - ChipLogProgress(chipTool, " ***** Test Step 99 : Sends SetpointRaise Command Heat & Cool\n"); - if (ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestSendsSetpointRaiseCommandHeatCool_99(); - break; - case 100: - ChipLogProgress( - chipTool, " ***** Test Step 100 : Reads back OccupiedCoolingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("TSTAT.S.F01")) { - NextTest(); - return; - } - err = TestReadsBackOccupiedCoolingSetpointToConfirmTheSuccessOfTheWrite_100(); - break; - case 101: - ChipLogProgress( - chipTool, " ***** Test Step 101 : Reads back OccupiedHeatingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("TSTAT.S.F00")) { - NextTest(); - return; - } - err = TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_101(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - 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), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 56: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 58: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 60: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 61: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 62: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 63: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 64: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 65: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 66: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 67: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 68: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 69: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 70: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 71: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 72: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 73: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 74: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 75: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 76: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 77: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 78: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 79: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 80: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 81: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 82: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 83: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 84: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 85: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 86: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 87: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 88: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 89: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 90: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 91: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 92: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 93: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 94: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 95: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 96: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 97: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 98: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 99: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 100: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 101: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 102; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadsOccupiedCoolingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is within range Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("occupiedCoolingSetpoint", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("occupiedCoolingSetpoint", [value shortValue], 1600)); - VerifyOrReturn(CheckConstraintMaxValue("occupiedCoolingSetpoint", [value shortValue], 3200)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForOccupiedCoolingSetpointAttribute_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupiedCoolingSetpointArgument; - occupiedCoolingSetpointArgument = [NSNumber numberWithShort:2500]; - [cluster writeAttributeOccupiedCoolingSetpointWithValue:occupiedCoolingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value back that is different but valid for " - @"OccupiedCoolingSetpoint attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedCoolingSetpointAttribute_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads it back again to confirm the successful write of OccupiedCoolingSetpoint attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OccupiedCoolingSetpoint", actualValue, 2500)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesOccupiedCoolingSetpointToValueBelowTheABSMinCoolSetpointLimit_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupiedCoolingSetpointArgument; - occupiedCoolingSetpointArgument = [NSNumber numberWithShort:30]; - [cluster writeAttributeOccupiedCoolingSetpointWithValue:occupiedCoolingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes OccupiedCoolingSetpoint to value below the " - @"ABSMinCoolSetpointLimit Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesOccupiedCoolingSetpointToValueAboveTheMaxCoolSetpointLimit_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupiedCoolingSetpointArgument; - occupiedCoolingSetpointArgument = [NSNumber numberWithShort:4000]; - [cluster writeAttributeOccupiedCoolingSetpointWithValue:occupiedCoolingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes OccupiedCoolingSetpoint to value above the " - @"MaxCoolSetpointLimit Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheLimitOfMinCoolSetpointLimitToOccupiedCoolingSetpointAttribute_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupiedCoolingSetpointArgument; - occupiedCoolingSetpointArgument = [NSNumber numberWithShort:1600]; - [cluster writeAttributeOccupiedCoolingSetpointWithValue:occupiedCoolingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the limit of MinCoolSetpointLimit to " - @"OccupiedCoolingSetpoint attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheCoolingSetpointBelowTheHeatingSetpointWhenAutoIsEnabled_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupiedCoolingSetpointArgument; - occupiedCoolingSetpointArgument = [NSNumber numberWithShort:1600]; - [cluster writeAttributeOccupiedCoolingSetpointWithValue:occupiedCoolingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the CoolingSetpoint below the HeatingSetpoint when auto is " - @"enabled Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheLimitOfMaxCoolSetpointLimitToOccupiedCoolingSetpointAttribute_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupiedCoolingSetpointArgument; - occupiedCoolingSetpointArgument = [NSNumber numberWithShort:3200]; - [cluster writeAttributeOccupiedCoolingSetpointWithValue:occupiedCoolingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the limit of MaxCoolSetpointLimit to " - @"OccupiedCoolingSetpoint attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOccupiedHeatingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OccupiedHeatingSetpoint attribute from Server DUT and verifies that the value is within range Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("occupiedHeatingSetpoint", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("occupiedHeatingSetpoint", [value shortValue], 700)); - VerifyOrReturn(CheckConstraintMaxValue("occupiedHeatingSetpoint", [value shortValue], 3000)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForOccupiedHeatingSetpointAttribute_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupiedHeatingSetpointArgument; - occupiedHeatingSetpointArgument = [NSNumber numberWithShort:2100]; - [cluster writeAttributeOccupiedHeatingSetpointWithValue:occupiedHeatingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value back that is different but valid for " - @"OccupiedHeatingSetpoint attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedHeatingSetpointAttribute_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads it back again to confirm the successful write of OccupiedHeatingSetpoint attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OccupiedHeatingSetpoint", actualValue, 2100)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesOccupiedHeatingSetpointToValueBelowTheMinHeatSetpointLimit_12() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupiedHeatingSetpointArgument; - occupiedHeatingSetpointArgument = [NSNumber numberWithShort:600]; - [cluster writeAttributeOccupiedHeatingSetpointWithValue:occupiedHeatingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes OccupiedHeatingSetpoint to value below the " - @"MinHeatSetpointLimit Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesOccupiedHeatingSetpointToValueAboveTheMaxHeatSetpointLimit_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupiedHeatingSetpointArgument; - occupiedHeatingSetpointArgument = [NSNumber numberWithShort:4010]; - [cluster writeAttributeOccupiedHeatingSetpointWithValue:occupiedHeatingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes OccupiedHeatingSetpoint to value above the " - @"MaxHeatSetpointLimit Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheLimitOfMinHeatSetpointLimitToOccupiedHeatingSetpointAttribute_14() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupiedHeatingSetpointArgument; - occupiedHeatingSetpointArgument = [NSNumber numberWithShort:700]; - [cluster writeAttributeOccupiedHeatingSetpointWithValue:occupiedHeatingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the limit of MinHeatSetpointLimit to " - @"OccupiedHeatingSetpoint attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedHeatingSetpointAttribute_15() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads it back again to confirm the successful write of OccupiedHeatingSetpoint attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OccupiedHeatingSetpoint", actualValue, 700)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheLimitOfMaxHeatSetpointLimitToOccupiedHeatingSetpointAttribute_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupiedHeatingSetpointArgument; - occupiedHeatingSetpointArgument = [NSNumber numberWithShort:3000]; - [cluster writeAttributeOccupiedHeatingSetpointWithValue:occupiedHeatingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the limit of MaxHeatSetpointLimit to " - @"OccupiedHeatingSetpoint attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheLimitOfMaxHeatSetpointLimitToOccupiedHeatingSetpointAttribute_17() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupiedHeatingSetpointArgument; - occupiedHeatingSetpointArgument = [NSNumber numberWithShort:3000]; - [cluster writeAttributeOccupiedHeatingSetpointWithValue:occupiedHeatingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the limit of MaxHeatSetpointLimit to " - @"OccupiedHeatingSetpoint attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsUnoccupiedCoolingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_18() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeUnoccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog( - @"Reads UnoccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is within range Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("unoccupiedCoolingSetpoint", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("unoccupiedCoolingSetpoint", [value shortValue], 1600)); - VerifyOrReturn(CheckConstraintMaxValue("unoccupiedCoolingSetpoint", [value shortValue], 3200)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForUnoccupiedCoolingSetpointAttribute_19() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id unoccupiedCoolingSetpointArgument; - unoccupiedCoolingSetpointArgument = [NSNumber numberWithShort:2500]; - [cluster writeAttributeUnoccupiedCoolingSetpointWithValue:unoccupiedCoolingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value back that is different but valid for " - @"UnoccupiedCoolingSetpoint attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfUnoccupiedCoolingSetpointAttribute_20() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeUnoccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads it back again to confirm the successful write of UnoccupiedCoolingSetpoint attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("UnoccupiedCoolingSetpoint", actualValue, 2500)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesUnoccupiedCoolingSetpointToValueBelowTheMinCoolSetpointLimit_21() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id unoccupiedCoolingSetpointArgument; - unoccupiedCoolingSetpointArgument = [NSNumber numberWithShort:1002]; - [cluster writeAttributeUnoccupiedCoolingSetpointWithValue:unoccupiedCoolingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes UnoccupiedCoolingSetpoint to value below the " - @"MinCoolSetpointLimit Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesUnoccupiedCoolingSetpointToValueAboveTheMaxCoolSetpointLimit_22() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id unoccupiedCoolingSetpointArgument; - unoccupiedCoolingSetpointArgument = [NSNumber numberWithShort:4010]; - [cluster writeAttributeUnoccupiedCoolingSetpointWithValue:unoccupiedCoolingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes UnoccupiedCoolingSetpoint to value above the " - @"MaxCoolSetpointLimit Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheLimitOfMinCoolSetpointLimitToUnoccupiedCoolingSetpointAttribute_23() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id unoccupiedCoolingSetpointArgument; - unoccupiedCoolingSetpointArgument = [NSNumber numberWithShort:1800]; - [cluster writeAttributeUnoccupiedCoolingSetpointWithValue:unoccupiedCoolingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the limit of MinCoolSetpointLimit to " - @"UnoccupiedCoolingSetpoint attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheLimitOfMaxCoolSetpointLimitToUnoccupiedCoolingSetpointAttribute_24() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id unoccupiedCoolingSetpointArgument; - unoccupiedCoolingSetpointArgument = [NSNumber numberWithShort:3000]; - [cluster writeAttributeUnoccupiedCoolingSetpointWithValue:unoccupiedCoolingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the limit of MaxCoolSetpointLimit to " - @"UnoccupiedCoolingSetpoint attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsUnoccupiedHeatingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_25() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeUnoccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog( - @"Reads UnoccupiedHeatingSetpoint attribute from Server DUT and verifies that the value is within range Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("unoccupiedHeatingSetpoint", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("unoccupiedHeatingSetpoint", [value shortValue], 700)); - VerifyOrReturn(CheckConstraintMaxValue("unoccupiedHeatingSetpoint", [value shortValue], 3000)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForUnoccupiedHeatingSetpointAttribute_26() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id unoccupiedHeatingSetpointArgument; - unoccupiedHeatingSetpointArgument = [NSNumber numberWithShort:2500]; - [cluster writeAttributeUnoccupiedHeatingSetpointWithValue:unoccupiedHeatingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value back that is different but valid for " - @"UnoccupiedHeatingSetpoint attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfUnoccupiedHeatingSetpointAttribute_27() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeUnoccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads it back again to confirm the successful write of UnoccupiedHeatingSetpoint attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("UnoccupiedHeatingSetpoint", actualValue, 2500)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesUnoccupiedHeatingSetpointToValueBelowTheMinHeatSetpointLimit_28() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id unoccupiedHeatingSetpointArgument; - unoccupiedHeatingSetpointArgument = [NSNumber numberWithShort:500]; - [cluster writeAttributeUnoccupiedHeatingSetpointWithValue:unoccupiedHeatingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes UnoccupiedHeatingSetpoint to value below the " - @"MinHeatSetpointLimit Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesUnoccupiedHeatingSetpointToValueAboveTheMaxHeatSetpointLimit_29() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id unoccupiedHeatingSetpointArgument; - unoccupiedHeatingSetpointArgument = [NSNumber numberWithShort:4010]; - [cluster writeAttributeUnoccupiedHeatingSetpointWithValue:unoccupiedHeatingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes UnoccupiedHeatingSetpoint to value above the " - @"MaxHeatSetpointLimit Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheLimitOfMinHeatSetpointLimitToUnoccupiedHeatingSetpointAttribute_30() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id unoccupiedHeatingSetpointArgument; - unoccupiedHeatingSetpointArgument = [NSNumber numberWithShort:1800]; - [cluster writeAttributeUnoccupiedHeatingSetpointWithValue:unoccupiedHeatingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the limit of MinHeatSetpointLimit to " - @"UnoccupiedHeatingSetpoint attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheLimitOfMaxHeatSetpointLimitToUnoccupiedHeatingSetpointAttribute_31() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id unoccupiedHeatingSetpointArgument; - unoccupiedHeatingSetpointArgument = [NSNumber numberWithShort:3000]; - [cluster writeAttributeUnoccupiedHeatingSetpointWithValue:unoccupiedHeatingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the limit of MaxHeatSetpointLimit to " - @"UnoccupiedHeatingSetpoint attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMinHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_32() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog( - @"Reads MinHeatSetpointLimit attribute from Server DUT and verifies that the value is within range Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("minHeatSetpointLimit", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("minHeatSetpointLimit", [value shortValue], 700)); - VerifyOrReturn(CheckConstraintMaxValue("minHeatSetpointLimit", [value shortValue], 3000)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMinHeatSetpointLimitAttribute_33() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id minHeatSetpointLimitArgument; - minHeatSetpointLimitArgument = [NSNumber numberWithShort:800]; - [cluster writeAttributeMinHeatSetpointLimitWithValue:minHeatSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value back that is different but valid for " - @"MinHeatSetpointLimit attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinHeatSetpointLimitAttribute_34() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads it back again to confirm the successful write of MinHeatSetpointLimit attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("MinHeatSetpointLimit", actualValue, 800)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesAValueBackThatIsDifferentButViolatesTheDeadband_35() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id minHeatSetpointLimitArgument; - minHeatSetpointLimitArgument = [NSNumber numberWithShort:2000]; - [cluster - writeAttributeMinHeatSetpointLimitWithValue:minHeatSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value back that is different but violates the deadband Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesMinHeatSetpointLimitToValueBelowTheAbsMinHeatSetpointLimit_36() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id minHeatSetpointLimitArgument; - minHeatSetpointLimitArgument = [NSNumber numberWithShort:650]; - [cluster writeAttributeMinHeatSetpointLimitWithValue:minHeatSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes MinHeatSetpointLimit to value below the " - @"AbsMinHeatSetpointLimit Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesMinHeatSetpointLimitToValueAboveTheAbsMaxHeatSetpointLimit_37() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id minHeatSetpointLimitArgument; - minHeatSetpointLimitArgument = [NSNumber numberWithShort:4050]; - [cluster writeAttributeMinHeatSetpointLimitWithValue:minHeatSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes MinHeatSetpointLimit to value above the " - @"AbsMaxHeatSetpointLimit Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_38() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id minHeatSetpointLimitArgument; - minHeatSetpointLimitArgument = [NSNumber numberWithShort:700]; - [cluster writeAttributeMinHeatSetpointLimitWithValue:minHeatSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit " - @"attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_39() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id minHeatSetpointLimitArgument; - minHeatSetpointLimitArgument = [NSNumber numberWithShort:3000]; - [cluster writeAttributeMinHeatSetpointLimitWithValue:minHeatSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit " - @"attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMaxHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_40() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog( - @"Reads MaxHeatSetpointLimit attribute from Server DUT and verifies that the value is within range Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("maxHeatSetpointLimit", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("maxHeatSetpointLimit", [value shortValue], 700)); - VerifyOrReturn(CheckConstraintMaxValue("maxHeatSetpointLimit", [value shortValue], 3000)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_41() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id minHeatSetpointLimitArgument; - minHeatSetpointLimitArgument = [NSNumber numberWithShort:700]; - [cluster writeAttributeMinHeatSetpointLimitWithValue:minHeatSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit " - @"attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_42() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id minHeatSetpointLimitArgument; - minHeatSetpointLimitArgument = [NSNumber numberWithShort:3000]; - [cluster writeAttributeMinHeatSetpointLimitWithValue:minHeatSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit " - @"attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMaxHeatSetpointLimitAttribute_43() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id maxHeatSetpointLimitArgument; - maxHeatSetpointLimitArgument = [NSNumber numberWithShort:2900]; - [cluster writeAttributeMaxHeatSetpointLimitWithValue:maxHeatSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value back that is different but valid for " - @"MaxHeatSetpointLimit attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxHeatSetpointLimitAttribute_44() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads it back again to confirm the successful write of MaxHeatSetpointLimit attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("MaxHeatSetpointLimit", actualValue, 2900)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesMaxHeatSetpointLimitToValueBelowTheAbsMinHeatSetpointLimit_45() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id maxHeatSetpointLimitArgument; - maxHeatSetpointLimitArgument = [NSNumber numberWithShort:500]; - [cluster writeAttributeMaxHeatSetpointLimitWithValue:maxHeatSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes MaxHeatSetpointLimit to value below the " - @"AbsMinHeatSetpointLimit Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesMaxHeatSetpointLimitToValueAboveTheAbsMaxHeatSetpointLimit_46() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id maxHeatSetpointLimitArgument; - maxHeatSetpointLimitArgument = [NSNumber numberWithShort:4000]; - [cluster writeAttributeMaxHeatSetpointLimitWithValue:maxHeatSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes MaxHeatSetpointLimit to value above the " - @"AbsMaxHeatSetpointLimit Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheLimitOfAbsMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_47() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id maxHeatSetpointLimitArgument; - maxHeatSetpointLimitArgument = [NSNumber numberWithShort:700]; - [cluster writeAttributeMaxHeatSetpointLimitWithValue:maxHeatSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the limit of AbsMinHeatSetpointLimit to MaxHeatSetpointLimit " - @"attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_48() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id maxHeatSetpointLimitArgument; - maxHeatSetpointLimitArgument = [NSNumber numberWithShort:3000]; - [cluster writeAttributeMaxHeatSetpointLimitWithValue:maxHeatSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the limit of AbsMaxHeatSetpointLimit to MaxHeatSetpointLimit " - @"attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMinCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_49() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog( - @"Reads MinCoolSetpointLimit attribute from Server DUT and verifies that the value is within range Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("minCoolSetpointLimit", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("minCoolSetpointLimit", [value shortValue], 1600)); - VerifyOrReturn(CheckConstraintMaxValue("minCoolSetpointLimit", [value shortValue], 3200)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMinCoolSetpointLimitAttribute_50() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id minCoolSetpointLimitArgument; - minCoolSetpointLimitArgument = [NSNumber numberWithShort:2000]; - [cluster writeAttributeMinCoolSetpointLimitWithValue:minCoolSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value back that is different but valid for " - @"MinCoolSetpointLimit attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinCoolSetpointLimitAttribute_51() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads it back again to confirm the successful write of MinCoolSetpointLimit attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("MinCoolSetpointLimit", actualValue, 2000)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesMinCoolSetpointLimitToValueBelowTheAbsMinCoolSetpointLimit_52() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id minCoolSetpointLimitArgument; - minCoolSetpointLimitArgument = [NSNumber numberWithShort:1000]; - [cluster writeAttributeMinCoolSetpointLimitWithValue:minCoolSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes MinCoolSetpointLimit to value below the " - @"AbsMinCoolSetpointLimit Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesMinCoolSetpointLimitToValueAboveTheMaxCoolSetpointLimit_53() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id minCoolSetpointLimitArgument; - minCoolSetpointLimitArgument = [NSNumber numberWithShort:4000]; - [cluster writeAttributeMinCoolSetpointLimitWithValue:minCoolSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes MinCoolSetpointLimit to value above the MaxCoolSetpointLimit " - @"Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_54() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id minCoolSetpointLimitArgument; - minCoolSetpointLimitArgument = [NSNumber numberWithShort:1600]; - [cluster writeAttributeMinCoolSetpointLimitWithValue:minCoolSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit " - @"attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_55() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id minCoolSetpointLimitArgument; - minCoolSetpointLimitArgument = [NSNumber numberWithShort:3200]; - [cluster writeAttributeMinCoolSetpointLimitWithValue:minCoolSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit " - @"attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_56() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id minCoolSetpointLimitArgument; - minCoolSetpointLimitArgument = [NSNumber numberWithShort:1600]; - [cluster writeAttributeMinCoolSetpointLimitWithValue:minCoolSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit " - @"attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMaxCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_57() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog( - @"Reads MaxCoolSetpointLimit attribute from Server DUT and verifies that the value is within range Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("maxCoolSetpointLimit", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("maxCoolSetpointLimit", [value shortValue], 1600)); - VerifyOrReturn(CheckConstraintMaxValue("maxCoolSetpointLimit", [value shortValue], 3200)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMaxCoolSetpointLimitAttribute_58() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id maxCoolSetpointLimitArgument; - maxCoolSetpointLimitArgument = [NSNumber numberWithShort:2000]; - [cluster writeAttributeMaxCoolSetpointLimitWithValue:maxCoolSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value back that is different but valid for " - @"MaxCoolSetpointLimit attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxCoolSetpointLimitAttribute_59() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads it back again to confirm the successful write of MaxCoolSetpointLimit attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("MaxCoolSetpointLimit", actualValue, 2000)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesMaxCoolSetpointLimitToValueBelowTheAbsMinCoolSetpointLimit_60() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id maxCoolSetpointLimitArgument; - maxCoolSetpointLimitArgument = [NSNumber numberWithShort:1000]; - [cluster writeAttributeMaxCoolSetpointLimitWithValue:maxCoolSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes MaxCoolSetpointLimit to value below the " - @"AbsMinCoolSetpointLimit Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesMaxCoolSetpointLimitToValueAboveTheMaxCoolSetpointLimit_61() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id maxCoolSetpointLimitArgument; - maxCoolSetpointLimitArgument = [NSNumber numberWithShort:4000]; - [cluster writeAttributeMaxCoolSetpointLimitWithValue:maxCoolSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes MaxCoolSetpointLimit to value above the MaxCoolSetpointLimit " - @"Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheLimitOfAbsMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_62() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id maxCoolSetpointLimitArgument; - maxCoolSetpointLimitArgument = [NSNumber numberWithShort:1600]; - [cluster writeAttributeMaxCoolSetpointLimitWithValue:maxCoolSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the limit of AbsMinCoolSetpointLimit to MaxCoolSetpointLimit " - @"attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_63() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id maxCoolSetpointLimitArgument; - maxCoolSetpointLimitArgument = [NSNumber numberWithShort:3200]; - [cluster writeAttributeMaxCoolSetpointLimitWithValue:maxCoolSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the limit of MaxCoolSetpointLimit to MaxCoolSetpointLimit " - @"attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesSetsBackDefaultValueOfMinHeatSetpointLimit_64() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id minHeatSetpointLimitArgument; - minHeatSetpointLimitArgument = [NSNumber numberWithShort:700]; - [cluster - writeAttributeMinHeatSetpointLimitWithValue:minHeatSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes (sets back) default value of MinHeatSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesSetsBackdefaultValueOfMaxHeatSetpointLimit_65() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id maxHeatSetpointLimitArgument; - maxHeatSetpointLimitArgument = [NSNumber numberWithShort:3000]; - [cluster - writeAttributeMaxHeatSetpointLimitWithValue:maxHeatSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes (sets back)default value of MaxHeatSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesMaxHeatSetpointLimitThatMeetsTheDeadbandOf25c_66() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id maxHeatSetpointLimitArgument; - maxHeatSetpointLimitArgument = [NSNumber numberWithShort:2950]; - [cluster - writeAttributeMaxHeatSetpointLimitWithValue:maxHeatSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Writes MaxHeatSetpointLimit That meets the deadband of 2.5C Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesSetsBackDefaultValueOfMinCoolSetpointLimit_67() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id minCoolSetpointLimitArgument; - minCoolSetpointLimitArgument = [NSNumber numberWithShort:1600]; - [cluster - writeAttributeMinCoolSetpointLimitWithValue:minCoolSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes (sets back) default value of MinCoolSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesSetsBackDefaultValueOfMaxCoolSetpointLimit_68() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id maxCoolSetpointLimitArgument; - maxCoolSetpointLimitArgument = [NSNumber numberWithShort:3200]; - [cluster - writeAttributeMaxCoolSetpointLimitWithValue:maxCoolSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes (sets back) default value of MaxCoolSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMinSetpointDeadBandAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_69() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinSetpointDeadBandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog( - @"Reads MinSetpointDeadBand attribute from Server DUT and verifies that the value is within range Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("minSetpointDeadBand", "int8s", "int8s")); - VerifyOrReturn(CheckConstraintMinValue("minSetpointDeadBand", [value charValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("minSetpointDeadBand", [value charValue], 25)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMinSetpointDeadBandAttribute_70() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id minSetpointDeadBandArgument; - minSetpointDeadBandArgument = [NSNumber numberWithChar:5]; - [cluster writeAttributeMinSetpointDeadBandWithValue:minSetpointDeadBandArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes a value back that is different but valid for " - @"MinSetpointDeadBand attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinSetpointDeadBandAttribute_71() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinSetpointDeadBandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads it back again to confirm the successful write of MinSetpointDeadBand attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("MinSetpointDeadBand", actualValue, 5)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheValueBelowMinSetpointDeadBand_72() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id minSetpointDeadBandArgument; - minSetpointDeadBandArgument = [NSNumber numberWithChar:-1]; - [cluster writeAttributeMinSetpointDeadBandWithValue:minSetpointDeadBandArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the value below MinSetpointDeadBand Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheValueAboveMinSetpointDeadBand_73() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id minSetpointDeadBandArgument; - minSetpointDeadBandArgument = [NSNumber numberWithChar:30]; - [cluster writeAttributeMinSetpointDeadBandWithValue:minSetpointDeadBandArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the value above MinSetpointDeadBand Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheMinLimitOfMinSetpointDeadBand_74() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id minSetpointDeadBandArgument; - minSetpointDeadBandArgument = [NSNumber numberWithChar:0]; - [cluster writeAttributeMinSetpointDeadBandWithValue:minSetpointDeadBandArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the min limit of MinSetpointDeadBand Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheMaxLimitOfMinSetpointDeadBand_75() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id minSetpointDeadBandArgument; - minSetpointDeadBandArgument = [NSNumber numberWithChar:25]; - [cluster writeAttributeMinSetpointDeadBandWithValue:minSetpointDeadBandArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes the max limit of MinSetpointDeadBand Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsControlSequenceOfOperationFromServerDutAndVerifiesThatTheValueIsValid_76() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeControlSequenceOfOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads ControlSequenceOfOperation from Server DUT and verifies that the value is valid Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ControlSequenceOfOperation", actualValue, 4U)); - } - - VerifyOrReturn(CheckConstraintType("controlSequenceOfOperation", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("controlSequenceOfOperation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("controlSequenceOfOperation", [value unsignedCharValue], 5U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWriteAttributeCommandForControlSequenceOfOperationWithANewValidValue_77() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id controlSequenceOfOperationArgument; - controlSequenceOfOperationArgument = [NSNumber numberWithUnsignedChar:2U]; - [cluster writeAttributeControlSequenceOfOperationWithValue:controlSequenceOfOperationArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write Attribute command for ControlSequenceOfOperation with a " - @"new valid value Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadItBackAgainToConfirmTheSuccessfulWrite_78() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeControlSequenceOfOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read it back again to confirm the successful write Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ControlSequenceOfOperation", actualValue, 2U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesMaxHeatSetpointLimitAttributeToDefaultValueOf2950ToMeetDeadbandConstraint_79() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id maxHeatSetpointLimitArgument; - maxHeatSetpointLimitArgument = [NSNumber numberWithShort:2950]; - [cluster writeAttributeMaxHeatSetpointLimitWithValue:maxHeatSetpointLimitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Writes MaxHeatSetpointLimit attribute to default value of 2950 to " - @"meet deadband constraint Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSetsOccupiedCoolingSetpointToDefaultValue_80() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupiedCoolingSetpointArgument; - occupiedCoolingSetpointArgument = [NSNumber numberWithShort:2600]; - [cluster writeAttributeOccupiedCoolingSetpointWithValue:occupiedCoolingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Sets OccupiedCoolingSetpoint to default value Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_81() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupiedHeatingSetpointArgument; - occupiedHeatingSetpointArgument = [NSNumber numberWithShort:2000]; - [cluster writeAttributeOccupiedHeatingSetpointWithValue:occupiedHeatingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Sets OccupiedHeatingSetpoint to default value Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendsSetpointRaiseCommandHeatOnly_82() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; - params.mode = [NSNumber numberWithUnsignedChar:0U]; - params.amount = [NSNumber numberWithChar:-30]; - [cluster setpointRaiseLowerWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Sends SetpointRaise Command Heat Only Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_83() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back OccupiedHeatingSetpoint to confirm the success of the write Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OccupiedHeatingSetpoint", actualValue, 1700)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_84() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupiedHeatingSetpointArgument; - occupiedHeatingSetpointArgument = [NSNumber numberWithShort:2000]; - [cluster writeAttributeOccupiedHeatingSetpointWithValue:occupiedHeatingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Sets OccupiedHeatingSetpoint to default value Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendsSetpointRaiseCommandHeatOnly_85() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; - params.mode = [NSNumber numberWithUnsignedChar:0U]; - params.amount = [NSNumber numberWithChar:30]; - [cluster setpointRaiseLowerWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Sends SetpointRaise Command Heat Only Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_86() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back OccupiedHeatingSetpoint to confirm the success of the write Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OccupiedHeatingSetpoint", actualValue, 2300)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendsSetpointRaiseCommandCoolOnly_87() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; - params.mode = [NSNumber numberWithUnsignedChar:1U]; - params.amount = [NSNumber numberWithChar:-30]; - [cluster setpointRaiseLowerWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Sends SetpointRaise Command Cool Only Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackOccupiedCoolingSetpointToConfirmTheSuccessOfTheWrite_88() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back OccupiedCoolingSetpoint to confirm the success of the write Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OccupiedCoolingSetpoint", actualValue, 2300)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSetsOccupiedCoolingSetpointToDefaultValue_89() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupiedCoolingSetpointArgument; - occupiedCoolingSetpointArgument = [NSNumber numberWithShort:2600]; - [cluster writeAttributeOccupiedCoolingSetpointWithValue:occupiedCoolingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Sets OccupiedCoolingSetpoint to default value Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendsSetpointRaiseCommandCoolOnly_90() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; - params.mode = [NSNumber numberWithUnsignedChar:1U]; - params.amount = [NSNumber numberWithChar:30]; - [cluster setpointRaiseLowerWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Sends SetpointRaise Command Cool Only Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackOccupiedCoolingSetpointToConfirmTheSuccessOfTheWrite_91() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back OccupiedCoolingSetpoint to confirm the success of the write Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OccupiedCoolingSetpoint", actualValue, 2900)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSetsOccupiedCoolingSetpointToDefaultValue_92() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupiedCoolingSetpointArgument; - occupiedCoolingSetpointArgument = [NSNumber numberWithShort:2600]; - [cluster writeAttributeOccupiedCoolingSetpointWithValue:occupiedCoolingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Sets OccupiedCoolingSetpoint to default value Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_93() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupiedHeatingSetpointArgument; - occupiedHeatingSetpointArgument = [NSNumber numberWithShort:2000]; - [cluster writeAttributeOccupiedHeatingSetpointWithValue:occupiedHeatingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Sets OccupiedHeatingSetpoint to default value Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendsSetpointRaiseCommandHeatCool_94() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; - params.mode = [NSNumber numberWithUnsignedChar:2U]; - params.amount = [NSNumber numberWithChar:-30]; - [cluster setpointRaiseLowerWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Sends SetpointRaise Command Heat & Cool Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackOccupiedCoolingSetpointToConfirmTheSuccessOfTheWrite_95() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back OccupiedCoolingSetpoint to confirm the success of the write Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OccupiedCoolingSetpoint", actualValue, 2300)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_96() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back OccupiedHeatingSetpoint to confirm the success of the write Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OccupiedHeatingSetpoint", actualValue, 1700)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSetsOccupiedCoolingSetpointToDefaultValue_97() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupiedCoolingSetpointArgument; - occupiedCoolingSetpointArgument = [NSNumber numberWithShort:2600]; - [cluster writeAttributeOccupiedCoolingSetpointWithValue:occupiedCoolingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Sets OccupiedCoolingSetpoint to default value Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_98() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupiedHeatingSetpointArgument; - occupiedHeatingSetpointArgument = [NSNumber numberWithShort:2000]; - [cluster writeAttributeOccupiedHeatingSetpointWithValue:occupiedHeatingSetpointArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Sets OccupiedHeatingSetpoint to default value Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendsSetpointRaiseCommandHeatCool_99() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; - params.mode = [NSNumber numberWithUnsignedChar:2U]; - params.amount = [NSNumber numberWithChar:30]; - [cluster setpointRaiseLowerWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Sends SetpointRaise Command Heat & Cool Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackOccupiedCoolingSetpointToConfirmTheSuccessOfTheWrite_100() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back OccupiedCoolingSetpoint to confirm the success of the write Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OccupiedCoolingSetpoint", actualValue, 2900)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_101() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpoint:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back OccupiedHeatingSetpoint to confirm the success of the write Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OccupiedHeatingSetpoint", actualValue, 2300)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - class Test_TC_TSUIC_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -130236,8 +124799,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(), From 5c6393a8d590d2df35fd245153653f6d2d4239d8 Mon Sep 17 00:00:00 2001 From: pankore <86098180+pankore@users.noreply.github.com> Date: Fri, 23 Sep 2022 21:36:58 +0800 Subject: [PATCH 08/19] [Ameba] Fix Trailing Null (#22836) * TC-BINFO-2.1 when reading location, it shows 3 chars. Remove trailing null after getPref_str_new --- src/platform/Ameba/AmebaConfig.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platform/Ameba/AmebaConfig.cpp b/src/platform/Ameba/AmebaConfig.cpp index 5c22877c603b87..cd03445fd0f63c 100644 --- a/src/platform/Ameba/AmebaConfig.cpp +++ b/src/platform/Ameba/AmebaConfig.cpp @@ -152,6 +152,7 @@ CHIP_ERROR AmebaConfig::ReadConfigValueStr(Key key, char * buf, size_t bufSize, if (success == 0) { + outLen -= 1; // Don't count trailing null return CHIP_NO_ERROR; } else From 61b9498f768f290a954ce739c19107a883fb602a Mon Sep 17 00:00:00 2001 From: Jerry Johns Date: Fri, 23 Sep 2022 06:38:39 -0700 Subject: [PATCH 09/19] Fix KeepSubscription flag handling (#22805) * Fix KeepSubscription flag handling This fixes the KeepSubscription flag handling to be done right at the onset of processing a SubscribeRequest message. This ensures that matching existing subscriptions are evicted before we attempt to continue further processing and allocation of ReadHandlers. Testing: In addition to the new test in TestRead, validated setting up a sub in chip-tool and then cancelling it by sending another sub to an invalid endpoint: basic subscribe location 0 5 2 0 any subscribe-by-id 0xFFFFFFFF 0xFFFFFFFF 0 5 2 100 Also tested by sending an empty subscribe request with the REPL. * Fixup printf specifier --- src/app/InteractionModelEngine.cpp | 49 ++++++++++--------- src/app/ReadClient.cpp | 3 -- .../python/chip/clusters/Attribute.py | 5 +- src/controller/tests/data_model/TestRead.cpp | 48 ++++++++++++++++++ 4 files changed, 76 insertions(+), 29 deletions(-) diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index 61af4c1b19b77b..979831bf5e40e6 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -426,6 +426,29 @@ Protocols::InteractionModel::Status InteractionModelEngine::OnReadInitialRequest SubscribeRequestMessage::Parser subscribeRequestParser; VerifyOrReturnError(subscribeRequestParser.Init(reader) == CHIP_NO_ERROR, Status::InvalidAction); + + VerifyOrReturnError(subscribeRequestParser.GetKeepSubscriptions(&keepExistingSubscriptions) == CHIP_NO_ERROR, + Status::InvalidAction); + if (!keepExistingSubscriptions) + { + // + // Walk through all existing subscriptions and shut down those whose subscriber matches + // that which just came in. + // + mReadHandlers.ForEachActiveObject([this, 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); + } + + return Loop::Continue; + }); + } + { size_t requestedAttributePathCount = 0; size_t requestedEventPathCount = 0; @@ -492,28 +515,6 @@ Protocols::InteractionModel::Status InteractionModelEngine::OnReadInitialRequest return Status::PathsExhausted; } } - - VerifyOrReturnError(subscribeRequestParser.GetKeepSubscriptions(&keepExistingSubscriptions) == CHIP_NO_ERROR, - Status::InvalidAction); - if (!keepExistingSubscriptions) - { - // - // Walk through all existing subscriptions and shut down those whose subscriber matches - // that which just came in. - // - mReadHandlers.ForEachActiveObject([this, 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); - } - - return Loop::Continue; - }); - } } else { @@ -790,6 +791,10 @@ bool InteractionModelEngine::TrimFabricForSubscriptions(FabricIndex aFabricIndex eventPathsSubscribedByCurrentFabric > perFabricPathCapacity || subscriptionsEstablishedByCurrentFabric > perFabricSubscriptionCapacity)) { + SubscriptionId subId; + candidate->GetSubscriptionId(subId); + ChipLogProgress(DataManagement, "Evicting Subscription ID %u:0x%" PRIx32, candidate->GetSubjectDescriptor().fabricIndex, + subId); candidate->Close(); return true; } diff --git a/src/app/ReadClient.cpp b/src/app/ReadClient.cpp index f981cb18217c6a..94a29cd36dac52 100644 --- a/src/app/ReadClient.cpp +++ b/src/app/ReadClient.cpp @@ -952,9 +952,6 @@ CHIP_ERROR ReadClient::SendSubscribeRequestImpl(const ReadPrepareParams & aReadP Span dataVersionFilters(aReadPrepareParams.mpDataVersionFilterList, aReadPrepareParams.mDataVersionFilterListSize); - VerifyOrReturnError(aReadPrepareParams.mAttributePathParamsListSize != 0 || aReadPrepareParams.mEventPathParamsListSize != 0, - CHIP_ERROR_INVALID_ARGUMENT); - System::PacketBufferHandle msgBuf; System::PacketBufferTLVWriter writer; SubscribeRequestMessage::Builder request; diff --git a/src/controller/python/chip/clusters/Attribute.py b/src/controller/python/chip/clusters/Attribute.py index 36d6e343f52b13..0fa3530d36ab41 100644 --- a/src/controller/python/chip/clusters/Attribute.py +++ b/src/controller/python/chip/clusters/Attribute.py @@ -955,10 +955,7 @@ def Read(future: Future, eventLoop, device, devCtrl, attributes: List[AttributeP if (not attributes) and dataVersionFilters: raise ValueError( "Must provide valid attribute list when data version filters is not null") - if (not attributes) and (not events): - raise ValueError( - "Must read some something" - ) + handle = chip.native.GetLibraryHandle() transaction = AsyncReadTransaction( future, eventLoop, devCtrl, returnClusterObject) diff --git a/src/controller/tests/data_model/TestRead.cpp b/src/controller/tests/data_model/TestRead.cpp index ff4359659f1f47..3da6e03ccdb905 100644 --- a/src/controller/tests/data_model/TestRead.cpp +++ b/src/controller/tests/data_model/TestRead.cpp @@ -282,6 +282,7 @@ class TestReadInteraction : public app::ReadHandler::ApplicationCallback static void TestReadAttribute_ManyDataValuesWrongPath(nlTestSuite * apSuite, void * apContext); static void TestReadAttribute_ManyErrors(nlTestSuite * apSuite, void * apContext); static void TestSubscribeAttributeDeniedNotExistPath(nlTestSuite * apSuite, void * apContext); + static void TestReadHandler_KeepSubscriptionTest(nlTestSuite * apSuite, void * apContext); private: static uint16_t mMaxInterval; @@ -1675,6 +1676,7 @@ void TestReadInteraction::TestSubscribeAttributeTimeout(nlTestSuite * apSuite, v app::InteractionModelEngine::GetInstance()->ShutdownActiveReads(); NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); + ctx.GetLoopback().mNumMessagesToDrop = 0; } void TestReadInteraction::TestReadHandler_MultipleSubscriptions(nlTestSuite * apSuite, void * apContext) @@ -4451,6 +4453,51 @@ void TestReadInteraction::TestReadAttribute_ManyErrors(nlTestSuite * apSuite, vo NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); } +// +// This validates the KeepSubscriptions flag by first setting up a valid subscription, then sending +// a subsequent SubcribeRequest with empty attribute AND event paths with KeepSubscriptions = false. +// +// This should evict the previous subscription before sending back an error. +// +void TestReadInteraction::TestReadHandler_KeepSubscriptionTest(nlTestSuite * apSuite, void * apContext) +{ + using namespace SubscriptionPathQuotaHelpers; + + TestContext & ctx = *static_cast(apContext); + TestReadCallback readCallback; + app::AttributePathParams pathParams(kTestEndpointId, TestCluster::Id, TestCluster::Attributes::Int16u::Id); + + app::ReadPrepareParams readParam(ctx.GetSessionAliceToBob()); + readParam.mpAttributePathParamsList = &pathParams; + readParam.mAttributePathParamsListSize = 1; + readParam.mMaxIntervalCeilingSeconds = 1; + readParam.mKeepSubscriptions = false; + + std::unique_ptr readClient = std::make_unique( + app::InteractionModelEngine::GetInstance(), app::InteractionModelEngine::GetInstance()->GetExchangeManager(), readCallback, + app::ReadClient::InteractionType::Subscribe); + NL_TEST_ASSERT(apSuite, readClient->SendRequest(readParam) == CHIP_NO_ERROR); + + ctx.DrainAndServiceIO(); + + NL_TEST_ASSERT(apSuite, app::InteractionModelEngine::GetInstance()->GetNumActiveReadHandlers() == 1); + + ChipLogProgress(DataManagement, "Issue another subscription that will evict the first sub..."); + + readParam.mAttributePathParamsListSize = 0; + readClient = std::make_unique(app::InteractionModelEngine::GetInstance(), + app::InteractionModelEngine::GetInstance()->GetExchangeManager(), readCallback, + app::ReadClient::InteractionType::Subscribe); + NL_TEST_ASSERT(apSuite, readClient->SendRequest(readParam) == CHIP_NO_ERROR); + + ctx.DrainAndServiceIO(); + + NL_TEST_ASSERT(apSuite, app::InteractionModelEngine::GetInstance()->GetNumActiveReadHandlers() == 0); + NL_TEST_ASSERT(apSuite, readCallback.mOnError != 0); + app::InteractionModelEngine::GetInstance()->ShutdownActiveReads(); + ctx.DrainAndServiceIO(); +} + // clang-format off const nlTest sTests[] = { @@ -4488,6 +4535,7 @@ const nlTest sTests[] = NL_TEST_DEF("TestSubscribeAttributeDeniedNotExistPath", TestReadInteraction::TestSubscribeAttributeDeniedNotExistPath), NL_TEST_DEF("TestResubscribeAttributeTimeout", TestReadInteraction::TestResubscribeAttributeTimeout), NL_TEST_DEF("TestSubscribeAttributeTimeout", TestReadInteraction::TestSubscribeAttributeTimeout), + NL_TEST_DEF("TestReadHandler_KeepSubscriptionTest", TestReadInteraction::TestReadHandler_KeepSubscriptionTest), NL_TEST_SENTINEL() }; // clang-format on From 1e3c5fe47c1f9b5e706168ea4ce58bec5e9de916 Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk <66371704+kkasperczyk-no@users.noreply.github.com> Date: Fri, 23 Sep 2022 15:43:12 +0200 Subject: [PATCH 10/19] [nrfconnect] Added reading stored onoff state in lighting app (#22791) OnOff cluster state is not read on lighting-app init, so the state stored before reboot is not recovered. --- .../lighting-app/nrfconnect/main/ZclCallbacks.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/examples/lighting-app/nrfconnect/main/ZclCallbacks.cpp b/examples/lighting-app/nrfconnect/main/ZclCallbacks.cpp index fa4798c678fff2..024d70a33f60f0 100644 --- a/examples/lighting-app/nrfconnect/main/ZclCallbacks.cpp +++ b/examples/lighting-app/nrfconnect/main/ZclCallbacks.cpp @@ -19,6 +19,7 @@ #include "AppTask.h" #include "PWMDevice.h" +#include #include #include #include @@ -26,6 +27,7 @@ using namespace chip; using namespace chip::app::Clusters; +using namespace chip::app::Clusters::OnOff; void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) @@ -70,5 +72,17 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & */ void emberAfOnOffClusterInitCallback(EndpointId endpoint) { + EmberAfStatus status; + bool storedValue; + + // Read storedValue on/off value + status = Attributes::OnOff::Get(endpoint, &storedValue); + if (status == EMBER_ZCL_STATUS_SUCCESS) + { + // Set actual state to the cluster state that was last persisted + GetAppTask().GetLightingDevice().InitiateAction(storedValue ? PWMDevice::ON_ACTION : PWMDevice::OFF_ACTION, + AppEvent::kEventType_Lighting, reinterpret_cast(&storedValue)); + } + GetAppTask().UpdateClusterState(); } From 46b4649a8cb7242b5c7d39c37564b81074a6946f Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 23 Sep 2022 09:44:30 -0400 Subject: [PATCH 11/19] Make sure to ignore setDeviceControllerDelegate calls on non-running controllers. (#22778) Otherwise we can end up with null-derefs trying to touch members that no longer exist. Fixes https://github.com/project-chip/connectedhomeip/issues/22776 --- src/darwin/Framework/CHIP/MTRDeviceController.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 43c2d0e7084fdc..221b4731d2dffb 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -535,7 +535,11 @@ - (void)removeDevice:(MTRDevice *)device - (void)setDeviceControllerDelegate:(id)delegate queue:(dispatch_queue_t)queue { + VerifyOrReturn([self checkIsRunning]); + dispatch_async(_chipWorkQueue, ^{ + VerifyOrReturn([self checkIsRunning]); + self->_deviceControllerDelegateBridge->setDelegate(self, delegate, queue); }); } From efb8f2f1015083df639bbbe5820aa2ccad2bfa7d Mon Sep 17 00:00:00 2001 From: Gene Harvey Date: Fri, 23 Sep 2022 08:46:04 -0500 Subject: [PATCH 12/19] Add missing pthread header (#22833) --- examples/platform/linux/NamedPipeCommands.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/platform/linux/NamedPipeCommands.cpp b/examples/platform/linux/NamedPipeCommands.cpp index 4d78cd4c87aab6..7eea3ebbb6b8a2 100644 --- a/examples/platform/linux/NamedPipeCommands.cpp +++ b/examples/platform/linux/NamedPipeCommands.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include From 2aaf589b46c4822df92332d427bdb91292ff5387 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Fri, 23 Sep 2022 16:43:13 +0200 Subject: [PATCH 13/19] [Darwin tests] Fix testAnySharedRemoteController and testReadClusterStateCacheFailure (#22838) * [Darwin Tests] Fix testAnySharedRemoteController * [Darwin Tests] Fix testReadClusterStateCacheFailure --- .../CHIP/MTRDeviceControllerOverXPC.m | 10 +- .../MTRDeviceControllerOverXPC_Internal.h | 3 +- src/darwin/Framework/CHIP/MTRDeviceOverXPC.m | 443 ++++++++---------- .../Framework/CHIPTests/MTRXPCProtocolTests.m | 3 +- 4 files changed, 203 insertions(+), 256 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.m b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.m index 52cfb2244caba1..fe4804f45b6b04 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.m +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.m @@ -88,6 +88,9 @@ - (nullable MTRBaseDevice *)deviceBeingCommissionedWithNodeID:(NSNumber *)nodeID - (void)fetchControllerIdWithQueue:(dispatch_queue_t)queue completion:(MTRFetchControllerIDCompletion)completion { + // Capture the proxy handle so that it won't be released prior to block call. + __block MTRDeviceControllerXPCProxyHandle * handleRetainer = nil; + dispatch_async(_workQueue, ^{ dispatch_group_t group = dispatch_group_create(); if (!self.controllerID) { @@ -100,10 +103,9 @@ - (void)fetchControllerIdWithQueue:(dispatch_queue_t)queue completion:(MTRFetchC MTR_LOG_ERROR("Failed to fetch any shared remote controller"); } else { self.controllerID = controller; + handleRetainer = handle; } dispatch_group_leave(group); - __auto_type handleRetainer = handle; - (void) handleRetainer; }]; } else { MTR_LOG_ERROR("XPC disconnected while retrieving any shared remote controller"); @@ -113,9 +115,9 @@ - (void)fetchControllerIdWithQueue:(dispatch_queue_t)queue completion:(MTRFetchC } dispatch_group_notify(group, queue, ^{ if (self.controllerID) { - completion(self.controllerID, nil); + completion(self.controllerID, handleRetainer, nil); } else { - completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); + completion(nil, nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); } }); }); diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h index d772dab879f077..ccbc2f29168450 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h @@ -20,7 +20,8 @@ NS_ASSUME_NONNULL_BEGIN -typedef void (^MTRFetchControllerIDCompletion)(id _Nullable controllerID, NSError * _Nullable error); +typedef void (^MTRFetchControllerIDCompletion)( + id _Nullable controllerID, MTRDeviceControllerXPCProxyHandle * _Nullable handle, NSError * _Nullable error); @interface MTRDeviceControllerOverXPC () diff --git a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.m b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.m index 4d16e9edde6661..a978272654ff2e 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.m +++ b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.m @@ -27,6 +27,8 @@ NS_ASSUME_NONNULL_BEGIN +typedef void (^MTRFetchProxyHandleCompletion)(MTRDeviceControllerXPCProxyHandle * _Nullable handle, NSError * _Nullable error); + @interface MTRDeviceOverXPC () @property (nonatomic, strong, readonly, nullable) id controllerID; @@ -34,6 +36,8 @@ @interface MTRDeviceOverXPC () @property (nonatomic, readonly) NSNumber * nodeID; @property (nonatomic, strong, readonly) MTRDeviceControllerXPCConnection * xpcConnection; +- (void)fetchProxyHandleWithQueue:(dispatch_queue_t)queue completion:(MTRFetchProxyHandleCompletion)completion; + @end @implementation MTRDeviceOverXPC @@ -60,52 +64,35 @@ - (void)subscribeWithQueue:(dispatch_queue_t)queue { MTR_LOG_DEBUG("Subscribing all attributes... Note that attributeReportHandler, eventReportHandler, and resubscriptionScheduled " "are not supported."); - __auto_type workBlock = ^{ + + __auto_type workBlock = ^(MTRDeviceControllerXPCProxyHandle * _Nullable handle, NSError * _Nullable error) { + if (error != nil) { + errorHandler(error); + return; + } + if (clusterStateCacheContainer) { [clusterStateCacheContainer setXPCConnection:self->_xpcConnection controllerID:self.controllerID deviceID:self.nodeID]; } - [self->_xpcConnection getProxyHandleWithCompletion:^( - dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { - if (handle) { - [handle.proxy subscribeWithController:self.controllerID - nodeID:self.nodeID - params:[MTRDeviceController encodeXPCSubscribeParams:params] - shouldCache:(clusterStateCacheContainer != nil) - completion:^(NSError * _Nullable error) { - dispatch_async(queue, ^{ - if (error) { - errorHandler(error); - } else { - subscriptionEstablishedHandler(); - } - }); - __auto_type handleRetainer = handle; - (void) handleRetainer; - }]; - } else { - MTR_LOG_ERROR("Failed to obtain XPC connection to write attribute"); - dispatch_async(queue, ^{ - errorHandler([NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); - }); - } - }]; - }; - if (self.controllerID != nil) { - workBlock(); - } else { - [self.controller fetchControllerIdWithQueue:queue - completion:^(id _Nullable controllerID, NSError * _Nullable error) { - if (error != nil) { - // We're already running on the right queue. - errorHandler(error); - return; - } + [handle.proxy subscribeWithController:self.controllerID + nodeID:self.nodeID + params:[MTRDeviceController encodeXPCSubscribeParams:params] + shouldCache:(clusterStateCacheContainer != nil) + completion:^(NSError * _Nullable error) { + dispatch_async(queue, ^{ + if (error) { + errorHandler(error); + } else { + subscriptionEstablishedHandler(); + } + }); + __auto_type handleRetainer = handle; + (void) handleRetainer; + }]; + }; - self->_controllerID = controllerID; - workBlock(); - }]; - } + [self fetchProxyHandleWithQueue:queue completion:workBlock]; } - (void)readAttributePathWithEndpointID:(NSNumber * _Nullable)endpointID @@ -116,50 +103,32 @@ - (void)readAttributePathWithEndpointID:(NSNumber * _Nullable)endpointID completion:(MTRDeviceResponseHandler)completion { MTR_LOG_DEBUG("Reading attribute ..."); - __auto_type workBlock = ^{ - [self->_xpcConnection getProxyHandleWithCompletion:^( - dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { - if (handle) { - [handle.proxy readAttributeWithController:self.controllerID - nodeID:self.nodeID - endpointID:endpointID - clusterID:clusterID - attributeID:attributeID - params:[MTRDeviceController encodeXPCReadParams:params] - completion:^(id _Nullable values, NSError * _Nullable error) { - dispatch_async(queue, ^{ - MTR_LOG_DEBUG("Attribute read"); - completion([MTRDeviceController decodeXPCResponseValues:values], error); - // The following captures the proxy handle in the closure so that the - // handle won't be released prior to block call. - __auto_type handleRetainer = handle; - (void) handleRetainer; - }); - }]; - } else { - dispatch_async(queue, ^{ - MTR_LOG_ERROR("Failed to obtain XPC connection to read attribute"); - completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); - }); - } - }]; - }; - if (self.controllerID != nil) { - workBlock(); - } else { - [self.controller fetchControllerIdWithQueue:queue - completion:^(id _Nullable controllerID, NSError * _Nullable error) { - if (error != nil) { - // We're already running on the right queue. - completion(nil, error); - return; - } + __auto_type workBlock = ^(MTRDeviceControllerXPCProxyHandle * _Nullable handle, NSError * _Nullable error) { + if (error != nil) { + completion(nil, error); + return; + } - self->_controllerID = controllerID; - workBlock(); - }]; - } + [handle.proxy readAttributeWithController:self.controllerID + nodeID:self.nodeID + endpointID:endpointID + clusterID:clusterID + attributeID:attributeID + params:[MTRDeviceController encodeXPCReadParams:params] + completion:^(id _Nullable values, NSError * _Nullable error) { + dispatch_async(queue, ^{ + MTR_LOG_DEBUG("Attribute read"); + completion([MTRDeviceController decodeXPCResponseValues:values], error); + // The following captures the proxy handle in the closure so that the + // handle won't be released prior to block call. + __auto_type handleRetainer = handle; + (void) handleRetainer; + }); + }]; + }; + + [self fetchProxyHandleWithQueue:queue completion:workBlock]; } - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID @@ -171,51 +140,33 @@ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID completion:(MTRDeviceResponseHandler)completion { MTR_LOG_DEBUG("Writing attribute ..."); - __auto_type workBlock = ^{ - [self->_xpcConnection getProxyHandleWithCompletion:^( - dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { - if (handle) { - [handle.proxy writeAttributeWithController:self.controllerID - nodeID:self.nodeID - endpointID:endpointID - clusterID:clusterID - attributeID:attributeID - value:value - timedWriteTimeout:timeoutMs - completion:^(id _Nullable values, NSError * _Nullable error) { - dispatch_async(queue, ^{ - MTR_LOG_DEBUG("Attribute written"); - completion([MTRDeviceController decodeXPCResponseValues:values], error); - // The following captures the proxy handle in the closure so that the - // handle won't be released prior to block call. - __auto_type handleRetainer = handle; - (void) handleRetainer; - }); - }]; - } else { - dispatch_async(queue, ^{ - MTR_LOG_ERROR("Failed to obtain XPC connection to write attribute"); - completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); - }); - } - }]; - }; - if (self.controllerID != nil) { - workBlock(); - } else { - [self.controller fetchControllerIdWithQueue:queue - completion:^(id _Nullable controllerID, NSError * _Nullable error) { - if (error != nil) { - // We're already running on the right queue. - completion(nil, error); - return; - } + __auto_type workBlock = ^(MTRDeviceControllerXPCProxyHandle * _Nullable handle, NSError * _Nullable error) { + if (error != nil) { + completion(nil, error); + return; + } - self->_controllerID = controllerID; - workBlock(); - }]; - } + [handle.proxy writeAttributeWithController:self.controllerID + nodeID:self.nodeID + endpointID:endpointID + clusterID:clusterID + attributeID:attributeID + value:value + timedWriteTimeout:timeoutMs + completion:^(id _Nullable values, NSError * _Nullable error) { + dispatch_async(queue, ^{ + MTR_LOG_DEBUG("Attribute written"); + completion([MTRDeviceController decodeXPCResponseValues:values], error); + // The following captures the proxy handle in the closure so that the + // handle won't be released prior to block call. + __auto_type handleRetainer = handle; + (void) handleRetainer; + }); + }]; + }; + + [self fetchProxyHandleWithQueue:queue completion:workBlock]; } - (void)invokeCommandWithEndpointID:(NSNumber *)endpointID @@ -227,51 +178,33 @@ - (void)invokeCommandWithEndpointID:(NSNumber *)endpointID completion:(MTRDeviceResponseHandler)completion { MTR_LOG_DEBUG("Invoking command ..."); - __auto_type workBlock = ^{ - [self->_xpcConnection getProxyHandleWithCompletion:^( - dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { - if (handle) { - [handle.proxy invokeCommandWithController:self.controllerID - nodeID:self.nodeID - endpointID:endpointID - clusterID:clusterID - commandID:commandID - fields:commandFields - timedInvokeTimeout:timeoutMs - completion:^(id _Nullable values, NSError * _Nullable error) { - dispatch_async(queue, ^{ - MTR_LOG_DEBUG("Command invoked"); - completion([MTRDeviceController decodeXPCResponseValues:values], error); - // The following captures the proxy handle in the closure so that the - // handle won't be released prior to block call. - __auto_type handleRetainer = handle; - (void) handleRetainer; - }); - }]; - } else { - dispatch_async(queue, ^{ - MTR_LOG_ERROR("Failed to obtain XPC connection to invoke command"); - completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); - }); - } - }]; - }; - if (self.controllerID != nil) { - workBlock(); - } else { - [self.controller fetchControllerIdWithQueue:queue - completion:^(id _Nullable controllerID, NSError * _Nullable error) { - if (error != nil) { - // We're already running on the right queue. - completion(nil, error); - return; - } + __auto_type workBlock = ^(MTRDeviceControllerXPCProxyHandle * _Nullable handle, NSError * _Nullable error) { + if (error != nil) { + completion(nil, error); + return; + } - self->_controllerID = controllerID; - workBlock(); - }]; - } + [handle.proxy invokeCommandWithController:self.controllerID + nodeID:self.nodeID + endpointID:endpointID + clusterID:clusterID + commandID:commandID + fields:commandFields + timedInvokeTimeout:timeoutMs + completion:^(id _Nullable values, NSError * _Nullable error) { + dispatch_async(queue, ^{ + MTR_LOG_DEBUG("Command invoked"); + completion([MTRDeviceController decodeXPCResponseValues:values], error); + // The following captures the proxy handle in the closure so that the + // handle won't be released prior to block call. + __auto_type handleRetainer = handle; + (void) handleRetainer; + }); + }]; + }; + + [self fetchProxyHandleWithQueue:queue completion:workBlock]; } - (void)subscribeAttributePathWithEndpointID:(NSNumber * _Nullable)endpointID @@ -283,90 +216,70 @@ - (void)subscribeAttributePathWithEndpointID:(NSNumber * _Nullable)endpointID subscriptionEstablished:(void (^_Nullable)(void))subscriptionEstablishedHandler { MTR_LOG_DEBUG("Subscribing attribute ..."); - __auto_type workBlock = ^{ - [self->_xpcConnection getProxyHandleWithCompletion:^( - dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { - if (handle) { - MTR_LOG_DEBUG("Setup report handler"); - [self.xpcConnection - registerReportHandlerWithController:self.controllerID - nodeID:self.nodeID - handler:^(id _Nullable values, NSError * _Nullable error) { - if (values && ![values isKindOfClass:[NSArray class]]) { - MTR_LOG_ERROR("Unsupported report format"); - return; - } - if (!values) { - MTR_LOG_DEBUG("Error report received"); - dispatch_async(queue, ^{ - reportHandler(values, error); - }); - return; - } - __auto_type decodedValues = - [MTRDeviceController decodeXPCResponseValues:values]; - NSMutableArray *> * filteredValues = - [NSMutableArray arrayWithCapacity:[decodedValues count]]; - for (NSDictionary * decodedValue in decodedValues) { - MTRAttributePath * attributePath = decodedValue[MTRAttributePathKey]; - if ((endpointID == nil || - [attributePath.endpoint isEqualToNumber:endpointID]) - && (clusterID == nil || - [attributePath.cluster isEqualToNumber:clusterID]) - && (attributeID == nil || - [attributePath.attribute isEqualToNumber:attributeID])) { - [filteredValues addObject:decodedValue]; - } - } - if ([filteredValues count] > 0) { - MTR_LOG_DEBUG("Report received"); - dispatch_async(queue, ^{ - reportHandler(filteredValues, error); - }); - } - }]; - - [handle.proxy subscribeAttributeWithController:self.controllerID - nodeID:self.nodeID - endpointID:endpointID - clusterID:clusterID - attributeID:attributeID - params:[MTRDeviceController encodeXPCSubscribeParams:params] - establishedHandler:^{ + + __auto_type workBlock = ^(MTRDeviceControllerXPCProxyHandle * _Nullable handle, NSError * _Nullable error) { + MTR_LOG_DEBUG("Setup report handler"); + + if (error != nil) { + subscriptionEstablishedHandler(); + reportHandler(nil, error); + return; + } + + [self.xpcConnection + registerReportHandlerWithController:self.controllerID + nodeID:self.nodeID + handler:^(id _Nullable values, NSError * _Nullable error) { + if (values && ![values isKindOfClass:[NSArray class]]) { + MTR_LOG_ERROR("Unsupported report format"); + return; + } + if (!values) { + MTR_LOG_DEBUG("Error report received"); dispatch_async(queue, ^{ - MTR_LOG_DEBUG("Subscription established"); - subscriptionEstablishedHandler(); - // The following captures the proxy handle in the closure so that the handle - // won't be released prior to block call. - __auto_type handleRetainer = handle; - (void) handleRetainer; + reportHandler(values, error); }); - }]; - } else { - dispatch_async(queue, ^{ - MTR_LOG_ERROR("Failed to obtain XPC connection to subscribe to attribute"); - subscriptionEstablishedHandler(); - reportHandler(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); - }); - } - }]; - }; + return; + } + __auto_type decodedValues = [MTRDeviceController decodeXPCResponseValues:values]; + NSMutableArray *> * filteredValues = + [NSMutableArray arrayWithCapacity:[decodedValues count]]; + for (NSDictionary * decodedValue in decodedValues) { + MTRAttributePath * attributePath = decodedValue[MTRAttributePathKey]; + if ((endpointID == nil || [attributePath.endpoint isEqualToNumber:endpointID]) + && (clusterID == nil || [attributePath.cluster isEqualToNumber:clusterID]) + && (attributeID == nil || + [attributePath.attribute isEqualToNumber:attributeID])) { + [filteredValues addObject:decodedValue]; + } + } + if ([filteredValues count] > 0) { + MTR_LOG_DEBUG("Report received"); + dispatch_async(queue, ^{ + reportHandler(filteredValues, error); + }); + } + }]; - if (self.controllerID != nil) { - workBlock(); - } else { - [self.controller fetchControllerIdWithQueue:queue - completion:^(id _Nullable controllerID, NSError * _Nullable error) { - if (error != nil) { - // We're already running on the right queue. - reportHandler(nil, error); - return; - } + [handle.proxy subscribeAttributeWithController:self.controllerID + nodeID:self.nodeID + endpointID:endpointID + clusterID:clusterID + attributeID:attributeID + params:[MTRDeviceController encodeXPCSubscribeParams:params] + establishedHandler:^{ + dispatch_async(queue, ^{ + MTR_LOG_DEBUG("Subscription established"); + subscriptionEstablishedHandler(); + // The following captures the proxy handle in the closure so that the handle + // won't be released prior to block call. + __auto_type handleRetainer = handle; + (void) handleRetainer; + }); + }]; + }; - self->_controllerID = controllerID; - workBlock(); - }]; - } + [self fetchProxyHandleWithQueue:queue completion:workBlock]; } - (void)deregisterReportHandlersWithQueue:(dispatch_queue_t)queue completion:(void (^)(void))completion @@ -384,7 +297,8 @@ - (void)deregisterReportHandlersWithQueue:(dispatch_queue_t)queue completion:(vo workBlock(); } else { [self.controller fetchControllerIdWithQueue:queue - completion:^(id _Nullable controllerID, NSError * _Nullable error) { + completion:^(id _Nullable controllerID, + MTRDeviceControllerXPCProxyHandle * _Nullable handle, NSError * _Nullable error) { if (error != nil) { // We're already running on the right queue. completion(); @@ -409,6 +323,35 @@ - (void)openCommissioningWindowWithSetupPasscode:(NSNumber *)setupPasscode }); } +- (void)fetchProxyHandleWithQueue:(dispatch_queue_t)queue completion:(MTRFetchProxyHandleCompletion)completion +{ + if (self.controllerID != nil) { + [self->_xpcConnection getProxyHandleWithCompletion:^( + dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { + dispatch_async(queue, ^{ + if (handle == nil) { + MTR_LOG_ERROR("Failed to obtain XPC connection"); + completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); + } else { + completion(handle, nil); + } + }); + }]; + } else { + [self.controller fetchControllerIdWithQueue:queue + completion:^(id _Nullable controllerID, + MTRDeviceControllerXPCProxyHandle * _Nullable handle, NSError * _Nullable error) { + // We're already running on the right queue. + if (error != nil) { + completion(nil, error); + } else { + self->_controllerID = controllerID; + completion(handle, nil); + } + }]; + } +} + @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIPTests/MTRXPCProtocolTests.m b/src/darwin/Framework/CHIPTests/MTRXPCProtocolTests.m index 6e8e5d18418870..91c4e21328bea7 100644 --- a/src/darwin/Framework/CHIPTests/MTRXPCProtocolTests.m +++ b/src/darwin/Framework/CHIPTests/MTRXPCProtocolTests.m @@ -2331,6 +2331,7 @@ - (void)testReadClusterStateCacheFailure completion(nil, myError); }; + _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; [clusterStateCacheContainer subscribeWithDeviceController:_remoteDeviceController deviceID:@(myNodeId) params:nil @@ -2340,7 +2341,7 @@ - (void)testReadClusterStateCacheFailure XCTAssertNil(error); [subscribeExpectation fulfill]; }]; - [self waitForExpectations:@[ subscribeExpectation ] timeout:kTimeoutInSeconds]; + [self waitForExpectations:@[ subscribeExpectation, _xpcDisconnectExpectation ] timeout:kTimeoutInSeconds]; _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; [clusterStateCacheContainer From a90c6b1600828354e8b57f4780d9d18014d8daaa Mon Sep 17 00:00:00 2001 From: kowsisoundhar12 <57476670+kowsisoundhar12@users.noreply.github.com> Date: Fri, 23 Sep 2022 20:17:38 +0530 Subject: [PATCH 14/19] Test added sep22 manualscript (#22824) * Added Auto generated file * Added Auto generated files * Restyled by clang-format * Updating autogen files Co-authored-by: Restyled.io Co-authored-by: kvikrambhat --- .../suites/certification/Test_TC_ACE_1_1.yaml | 6 +- .../suites/certification/Test_TC_ACL_2_7.yaml | 39 +- .../suites/certification/Test_TC_ACL_2_8.yaml | 61 +- .../certification/Test_TC_BINFO_2_2.yaml | 2 +- .../certification/Test_TC_BRBINFO_2_1.yaml | 16 +- .../certification/Test_TC_BRBINFO_2_3.yaml | 678 ++++++++---------- .../suites/certification/Test_TC_BR_1.yaml | 26 +- .../certification/Test_TC_CADMIN_1_17.yaml | 19 +- .../certification/Test_TC_CADMIN_1_18.yaml | 32 +- .../certification/Test_TC_CADMIN_1_7.yaml | 8 +- .../certification/Test_TC_CADMIN_1_8.yaml | 8 +- .../certification/Test_TC_DRLK_2_10.yaml | 2 +- .../suites/certification/Test_TC_IDM_2_1.yaml | 12 +- .../suites/certification/Test_TC_IDM_2_2.yaml | 23 +- .../suites/certification/Test_TC_IDM_3_2.yaml | 16 +- .../suites/certification/Test_TC_IDM_4_3.yaml | 82 ++- .../suites/certification/Test_TC_IDM_6_2.yaml | 78 +- .../suites/certification/Test_TC_IDM_7_1.yaml | 45 +- .../suites/certification/Test_TC_SC_5_1.yaml | 56 +- .../suites/certification/Test_TC_SC_5_2.yaml | 4 +- .../suites/certification/Test_TC_SC_6_1.yaml | 18 +- 21 files changed, 556 insertions(+), 675 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_ACE_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ACE_1_1.yaml index 17ca29b62ddc3c..13eb032c0e9ff1 100644 --- a/src/app/tests/suites/certification/Test_TC_ACE_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACE_1_1.yaml @@ -29,12 +29,12 @@ tests: - label: "TH1 commissions DUT using admin node ID N1" verification: | DUT side: - sudo ./chip-all-clusters-app + sudo ./chip-all-clusters-app TH side: - ./chip-tool pairing ethernet 1 20202021 chiip5 matter123 3840 5540 + ./chip-tool pairing ethernet 1 20202021 chiip5 matter123 3840 fe80::e65f:1ff:fe0f:2753 5540 - [1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success + [1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success" disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml index 569358ebba7e56..dac6858d339444 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml @@ -67,6 +67,7 @@ tests: Open a commissioning window On TH1(Chiptool)using below command ./chip-tool pairing open-commissioning-window 1 1 400 2000 3841 + [1657186324.710951][10820:10825] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 [1657186324.710980][10820:10825] CHIP:CTL: Successfully opened pairing window On TH(Chiptool)e device [1657186324.711048][10820:10825] CHIP:CTL: Manual pairing code: [36253605617] @@ -75,7 +76,7 @@ tests: Commission TH2(Chiptool) to DUT using manualcode generated in TH1 using open commission window - ./chip-tool pairing code 2 36253605617 --commissioner-name beta + ./chip-tool pairing code 2 36253605617 --commissioner-name beta --commissioner-nodeid 223344 [1657186359.584672][3509:3514] CHIP:CTL: Successfully finished commissioning step "Cleanup" [1657186359.584743][3509:3514] CHIP:TOO: Device commissioning completed with success disabled: true @@ -84,7 +85,7 @@ tests: "TH2 reads DUT Endpoint 0 OperationalCredentials cluster CurrentFabricIndex attribute" verification: | - ./chip-tool operationalcredentials read current-fabric-index 2 0 --commissioner-name beta + ./chip-tool operationalcredentials read current-fabric-index 2 0 --commissioner-name beta --commissioner-nodeid 223344 On TH2(Chiptool), verify CurrentFabricIndex attribute of operationalCredential cluster as 2 [1657186956.724761][3910:3915] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 3161849734 @@ -97,7 +98,7 @@ tests: 1.struct .Data field: D_OK_EMPTY 1718" PICS: ACL.S.A0001 verification: | - ./chip-tool accesscontrol write extension "[{"data":"1718"}]" 1 0 + ./chip-tool accesscontrol write extension '[{"data":"1718"}]' 1 0 On TH1(Chiptool),Verify Successfully to extension attribute list containg one element . @@ -146,7 +147,7 @@ tests: 17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" PICS: ACL.S.A0001 verification: | - ./chip-tool accesscontrol write extension "[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]" 2 0 --commissioner-name beta + ./chip-tool accesscontrol write extension '[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]' 2 0 --commissioner-name beta --commissioner-nodeid 223344 On TH2(Chiptool),Verify Successfully to extension attribute list containg one element . 1657894672.479983][2433:2438] CHIP:DMG: WriteClient moving to [ResponseRe] @@ -212,7 +213,7 @@ tests: "TH2 reads DUT Endpoint 0 AccessControl cluster Extension attribute" PICS: ACL.S.A0001 verification: | - ./chip-tool accesscontrol read extension 2 0 --commissioner-name beta + ./chip-tool accesscontrol read extension 2 0 --commissioner-name beta --commissioner-nodeid 223344 On TH2(Chiptool), Verify AccessControlExtensionStruct containing 1 element, and MUST NOT contain an element with FabricIndex F1 [1658327214.683199][2749:2754] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 2953114587 @@ -252,20 +253,18 @@ tests: AccessControlExtensionChanged event" PICS: ACL.S.E01 verification: | - ./chip-tool accesscontrol read-event access-control-extension-changed 2 0 --commissioner-name beta + ./chip-tool accesscontrol read-event access-control-extension-changed 2 0 --commissioner-name beta --commissioner-nodeid 223344 On TH2(Chiptool) , Verify AccessControlExtensionChanged containing 1 element, and MUST NOT contain an element with FabricIndex F1 - [1658327551.622018][4295:4300] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0001 - [1658327551.622043][4295:4300] CHIP:TOO: Event number: 6 - [1658327551.622065][4295:4300] CHIP:TOO: Priority: Info - [1658327551.622130][4295:4300] CHIP:TOO: Timestamp: 4633724 - [1658327551.622239][4295:4300] CHIP:TOO: AccessControlExtensionChanged: { - [1658327551.622287][4295:4300] CHIP:TOO: AdminNodeID: 112233 - [1658327551.622313][4295:4300] CHIP:TOO: AdminPasscodeID: null - [1658327551.622337][4295:4300] CHIP:TOO: ChangeType: 1 - [1658327551.622361][4295:4300] CHIP:TOO: LatestValue: { - [1658327551.622389][4295:4300] CHIP:TOO: Data: 17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018 - [1658327551.622414][4295:4300] CHIP:TOO: FabricIndex: 2 - [1658327551.622436][4295:4300] CHIP:TOO: } - [1658327551.622459][4295:4300] CHIP:TOO: AdminFabricIndex: 2 - [1658327551.622480][4295:4300] CHIP:TOO: } + [1663242753.957097][4264:4270] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0001 + [1663242753.957400][4264:4270] CHIP:TOO: Event number: 8 + [1663242753.957459][4264:4270] CHIP:TOO: Priority: Info + [1663242753.957507][4264:4270] CHIP:TOO: Timestamp: 20785045 + [1663242753.957708][4264:4270] CHIP:TOO: AccessControlExtensionChanged: { + [1663242753.957801][4264:4270] CHIP:TOO: AdminNodeID: 223344 + [1663242753.957867][4264:4270] CHIP:TOO: AdminPasscodeID: null + [1663242753.957931][4264:4270] CHIP:TOO: ChangeType: 1 + [1663242753.957991][4264:4270] CHIP:TOO: LatestValue: { + [1663242753.958055][4264:4270] CHIP:TOO: Data: 17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018 + [1663242753.958118][4264:4270] CHIP:TOO: FabricIndex: 2 + [1663242753.958183][4264:4270] CHIP:TOO: } disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml index 5956df5a81948f..80d0e91163ae2e 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml @@ -59,45 +59,17 @@ tests: verification: | Open a commissioning window On TH1(Chiptool)using below command - ./chip-tool administratorcommissioning open-basic-commissioning-window 180 1 0 --timedInteractionTimeoutMs 1000 - - [1657286379.420840][4724:4729] CHIP:DMG: InvokeResponseMessage = - [1657286379.420894][4724:4729] CHIP:DMG: { - [1657286379.420937][4724:4729] CHIP:DMG: suppressResponse = false, - [1657286379.421000][4724:4729] CHIP:DMG: InvokeResponseIBs = - [1657286379.421068][4724:4729] CHIP:DMG: [ - [1657286379.421120][4724:4729] CHIP:DMG: InvokeResponseIB = - [1657286379.421208][4724:4729] CHIP:DMG: { - [1657286379.421264][4724:4729] CHIP:DMG: CommandStatusIB = - [1657286379.421344][4724:4729] CHIP:DMG: { - [1657286379.421407][4724:4729] CHIP:DMG: CommandPathIB = - [1657286379.421493][4724:4729] CHIP:DMG: { - [1657286379.421581][4724:4729] CHIP:DMG: EndpointId = 0x0, - [1657286379.421656][4724:4729] CHIP:DMG: ClusterId = 0x3c, - [1657286379.421754][4724:4729] CHIP:DMG: CommandId = 0x1, - [1657286379.421838][4724:4729] CHIP:DMG: }, - [1657286379.421916][4724:4729] CHIP:DMG: - [1657286379.421998][4724:4729] CHIP:DMG: StatusIB = - [1657286379.422084][4724:4729] CHIP:DMG: { - [1657286379.422159][4724:4729] CHIP:DMG: status = 0x00 (SUCCESS), - [1657286379.422251][4724:4729] CHIP:DMG: }, - [1657286379.422336][4724:4729] CHIP:DMG: - [1657286379.422397][4724:4729] CHIP:DMG: }, - [1657286379.422483][4724:4729] CHIP:DMG: - [1657286379.422537][4724:4729] CHIP:DMG: }, - [1657286379.422616][4724:4729] CHIP:DMG: - [1657286379.422666][4724:4729] CHIP:DMG: ], - [1657286379.422745][4724:4729] CHIP:DMG: - [1657286379.422796][4724:4729] CHIP:DMG: InteractionModelRevision = 1 - [1657286379.422861][4724:4729] CHIP:DMG: }, - [1657286379.422975][4724:4729] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 - [1657286379.423058][4724:4729] CHIP:DMG: ICR moving to [AwaitingDe] - - - - CommissiOn TH2(Chiptool) to DUT using below command - - ./chip-tool pairing onnetwork 2 20202021 --commissioner-nodeid 223344 --commissioner-name beta + ./chip-tool pairing open-commissioning-window 1 1 400 2000 3841 + + [1657186324.710951][10820:10825] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 + [1657186324.710980][10820:10825] CHIP:CTL: Successfully opened pairing window On TH(Chiptool)e device + [1657186324.711048][10820:10825] CHIP:CTL: Manual pairing code: [36253605617] + [1657186324.711108][10820:10825] CHIP:CTL: SetupQRCode: [MT:-24J0IRV01A7TB7E700] + + + Commission TH2(Chiptool) to DUT using manualcode generated in TH1 using open commission window + + ./chip-tool pairing code 2 36253605617 --commissioner-name beta --commissioner-nodeid 223344 [1657186359.584672][3509:3514] CHIP:CTL: Successfully finished commissioning step "Cleanup" [1657186359.584743][3509:3514] CHIP:TOO: Device commissioning completed with success @@ -108,6 +80,7 @@ tests: CurrentFabricIndex attribute" verification: | ./chip-tool operationalcredentials read current-fabric-index 2 0 --commissioner-nodeid 223344 --commissioner-name beta + On TH2(Chiptool),verify CurrentFabricIndex attribute of operationalCredential cluster as 2 1658747098.843523][3024:3029] CHIP:DMG: }, @@ -131,7 +104,8 @@ tests: field: [N1, 1111] Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233,1111], "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233,1111], "targets":null}]' 1 0 + On TH1(Chiptool), verify AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing 1 element [1657286416.461279][4737:4742] CHIP:DMG: { @@ -185,7 +159,7 @@ tests: field: [N2, 2222] Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [223344,2222], "targets":null}]" 2 0 --commissioner-nodeid 223344 --commissioner-name beta + ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [223344,2222], "targets":null}]' 2 0 --commissioner-nodeid 223344 --commissioner-name beta On TH2(Chiptool), verify AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 1 element @@ -261,8 +235,8 @@ tests: On TH2(Chiptool), verify AccessControlEntryStruct containing 1 element, and MUST NOT contain an element with FabricIndex F1 - [1661407263.740571][2355:2360] CHIP:DMG: SuppressResponse = true, - [1661407263.740605][2355:2360] CHIP:DMG: InteractionModelRevision = 1 + [1661407263.740571][2355:2360] CHIP:DMG: SuppressResponse = true, + [1661407263.740605][2355:2360] CHIP:DMG: InteractionModelRevision = 1 [1661407263.740640][2355:2360] CHIP:DMG: } [1661407263.741000][2355:2360] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 2445703657 [1661407263.741100][2355:2360] CHIP:TOO: ACL: 1 entries @@ -353,6 +327,7 @@ tests: PICS: ACL.S.E00 verification: | ./chip-tool accesscontrol read-event access-control-entry-changed 2 0 --commissioner-name beta --commissioner-nodeid 223344 + On TH2(Chiptool), verify AccessControl cluster AccessControlEntryChanged containing 3 elements, and MUST NOT contain any element with FabricIndex F1 diff --git a/src/app/tests/suites/certification/Test_TC_BINFO_2_2.yaml b/src/app/tests/suites/certification/Test_TC_BINFO_2_2.yaml index dea7c8312782dc..5a504395bb9b5c 100644 --- a/src/app/tests/suites/certification/Test_TC_BINFO_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_BINFO_2_2.yaml @@ -32,7 +32,7 @@ tests: 3. BINFO.S.A0011(Reachable) - TH reads Reachable attribute from DUT and saves for future use(should be true) - 4. BINFO.S.E00(StartUp) && BINFO.S.E01(ShutDown) && BINFO.S.E02(Leave) - TH subscribes to StartUp, ShutDown, Leave and ReachableChanged events on the Basic Information cluster of the DUT + 4. BINFO.S.E00(StartUp) | BINFO.S.E01(ShutDown) && BINFO.S.E02(Leave) - TH subscribes to StartUp, ShutDown, Leave and ReachableChanged events on the Basic Information cluster of the DUT 5. TH saves the FabricIndex during commissioning disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_BRBINFO_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BRBINFO_2_1.yaml index af032127cea265..81ca10425f3bd0 100644 --- a/src/app/tests/suites/certification/Test_TC_BRBINFO_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BRBINFO_2_1.yaml @@ -140,14 +140,14 @@ tests: NOTE the quotes: single-quote/double-quote/string/double-quote/single-quote - [1660839701.840432][2444:2449] CHIP:DMG: } + [1660839701.840432][2444:2449] CHIP:DMG: } [1660839701.840505][2444:2449] CHIP:DMG: - [1660839701.840578][2444:2449] CHIP:DMG: StatusIB = - [1660839701.840661][2444:2449] CHIP:DMG: { - [1660839701.840742][2444:2449] CHIP:DMG: status = 0x88 (UNSUPPORTED_WRITE), - [1660839701.840827][2444:2449] CHIP:DMG: }, + [1660839701.840578][2444:2449] CHIP:DMG: StatusIB = + [1660839701.840661][2444:2449] CHIP:DMG: { + [1660839701.840742][2444:2449] CHIP:DMG: status = 0x88 (UNSUPPORTED_WRITE), + [1660839701.840827][2444:2449] CHIP:DMG: }, [1660839701.840905][2444:2449] CHIP:DMG: - [1660839701.840973][2444:2449] CHIP:DMG: }, + [1660839701.840973][2444:2449] CHIP:DMG: }, disabled: true - label: "TH reads NodeLabel" @@ -185,7 +185,7 @@ tests: - label: "TH reads HardwareVersion" PICS: BRBINFO.S.A0007 verification: | - ./chip-tool bridgeddevicebasic read hardware-version 1 3 + ./chip-tool bridgeddevicebasic write hardware-version-string 0x4531 1 3 Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE @@ -472,7 +472,7 @@ tests: false." PICS: BRBINFO.S.A0011 verification: | - ./chip-tool bridgeddevicebasic write-by-id 0x0005 false 1 0 + ./chip-tool bridgeddevicebasic write-by-id 17 false 1 3 diff --git a/src/app/tests/suites/certification/Test_TC_BRBINFO_2_3.yaml b/src/app/tests/suites/certification/Test_TC_BRBINFO_2_3.yaml index e057880b21e2e4..6ef05a6f489a14 100644 --- a/src/app/tests/suites/certification/Test_TC_BRBINFO_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_BRBINFO_2_3.yaml @@ -39,28 +39,23 @@ tests: Optional Attribute - If it is supported, then in TH(bridge-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE Example Log: - [1659966264.659547][3334:3334] CHIP:DMG: ReadRequestMessage = - [1659966264.659591][3334:3334] CHIP:DMG: { - [1659966264.659616][3334:3334] CHIP:DMG: AttributePathIBs = - [1659966264.659647][3334:3334] CHIP:DMG: [ - [1659966264.659684][3334:3334] CHIP:DMG: AttributePathIB = - [1659966264.659716][3334:3334] CHIP:DMG: { - [1659966264.659759][3334:3334] CHIP:DMG: Endpoint = 0x0, - [1659966264.659809][3334:3334] CHIP:DMG: Cluster = 0x28, - [1659966264.659845][3334:3334] CHIP:DMG: Attribute = 0x0000_0001, - [1659966264.659892][3334:3334] CHIP:DMG: } - [1659966264.659925][3334:3334] CHIP:DMG: - [1659966264.659963][3334:3334] CHIP:DMG: ], - [1659966264.659996][3334:3334] CHIP:DMG: - [1659966264.660036][3334:3334] CHIP:DMG: isFabricFiltered = true, - [1659966264.660074][3334:3334] CHIP:DMG: InteractionModelRevision = 1 - [1659966264.660101][3334:3334] CHIP:DMG: }, - [1659966264.660194][3334:3334] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659966264.660306][3334:3334] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1659966264.660339][3334:3334] CHIP:DMG: Cluster 28, Attribute 1 is dirty - [1659966264.660374][3334:3334] CHIP:DMG: Reading attribute: Cluster=0x0000_0028 Endpoint=0 AttributeId=0x0000_0001 (expanded=0) - [1659966264.660408][3334:3334] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0028 e=0 p=v - [1659966264.660445][3334:3334] CHIP:DMG: AccessControl: allowed + [1662483091.813322][6721:6721] CHIP:DMG: ReadRequestMessage = + [1662483091.813361][6721:6721] CHIP:DMG: { + [1662483091.813393][6721:6721] CHIP:DMG: AttributePathIBs = + [1662483091.813431][6721:6721] CHIP:DMG: [ + [1662483091.813467][6721:6721] CHIP:DMG: AttributePathIB = + [1662483091.813507][6721:6721] CHIP:DMG: { + [1662483091.813548][6721:6721] CHIP:DMG: Endpoint = 0x3, + [1662483091.813594][6721:6721] CHIP:DMG: Cluster = 0x39, + [1662483091.813641][6721:6721] CHIP:DMG: Attribute = 0x0000_0001, + [1662483091.813684][6721:6721] CHIP:DMG: } + [1662483091.813725][6721:6721] CHIP:DMG: + [1662483091.813762][6721:6721] CHIP:DMG: ], + [1662483091.813803][6721:6721] CHIP:DMG: + [1662483091.813841][6721:6721] CHIP:DMG: isFabricFiltered = true, + [1662483091.813878][6721:6721] CHIP:DMG: InteractionModelRevision = 1 + [1662483091.813912][6721:6721] CHIP:DMG: }, + [1662483091.814011][6721:6721] CHIP:DMG: IM RH moving to [GeneratingReports] disabled: true - label: "DUT reads VendorID from the TH" @@ -71,50 +66,24 @@ tests: Optional Attribute - If it is supported, then in TH(bridge-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE Example Log: - [1659966317.983464][3334:3334] CHIP:DMG: ReadRequestMessage = - [1659966317.983491][3334:3334] CHIP:DMG: { - [1659966317.983513][3334:3334] CHIP:DMG: AttributePathIBs = - [1659966317.983539][3334:3334] CHIP:DMG: [ - [1659966317.983563][3334:3334] CHIP:DMG: AttributePathIB = - [1659966317.983590][3334:3334] CHIP:DMG: { - [1659966317.983618][3334:3334] CHIP:DMG: Endpoint = 0x0, - [1659966317.983655][3334:3334] CHIP:DMG: Cluster = 0x28, - [1659966317.983687][3334:3334] CHIP:DMG: Attribute = 0x0000_0002, - [1659966317.983716][3334:3334] CHIP:DMG: } - [1659966317.983744][3334:3334] CHIP:DMG: - [1659966317.983770][3334:3334] CHIP:DMG: ], - [1659966317.983798][3334:3334] CHIP:DMG: - [1659966317.983825][3334:3334] CHIP:DMG: isFabricFiltered = true, - [1659966317.983851][3334:3334] CHIP:DMG: InteractionModelRevision = 1 - [1659966317.983874][3334:3334] CHIP:DMG: }, - [1659966317.983949][3334:3334] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659966317.984045][3334:3334] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1659966317.984077][3334:3334] CHIP:DMG: Cluster 28, Attribute 2 is dirty - [1659966317.984099][3334:3334] CHIP:DMG: Reading attribute: Cluster=0x0000_0028 Endpoint=0 AttributeId=0x0000_0002 (expanded=0) - [1659966317.984128][3334:3334] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0028 e=0 p=v - [1659966317.984161][3334:3334] CHIP:DMG: AccessControl: allowed - [1659966317.983464][3334:3334] CHIP:DMG: ReadRequestMessage = - [1659966317.983491][3334:3334] CHIP:DMG: { - [1659966317.983513][3334:3334] CHIP:DMG: AttributePathIBs = - [1659966317.983539][3334:3334] CHIP:DMG: [ - [1659966317.983563][3334:3334] CHIP:DMG: AttributePathIB = - [1659966317.983590][3334:3334] CHIP:DMG: { - [1659966317.983618][3334:3334] CHIP:DMG: Endpoint = 0x0, - [1659966317.983655][3334:3334] CHIP:DMG: Cluster = 0x28, - [1659966317.983687][3334:3334] CHIP:DMG: Attribute = 0x0000_0002, - [1659966317.983716][3334:3334] CHIP:DMG: } - [1659966317.983744][3334:3334] CHIP:DMG: - [1659966317.983770][3334:3334] CHIP:DMG: ], - [1659966317.983798][3334:3334] CHIP:DMG: - [1659966317.983825][3334:3334] CHIP:DMG: isFabricFiltered = true, - [1659966317.983851][3334:3334] CHIP:DMG: InteractionModelRevision = 1 - [1659966317.983874][3334:3334] CHIP:DMG: }, - [1659966317.983949][3334:3334] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659966317.984045][3334:3334] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1659966317.984077][3334:3334] CHIP:DMG: Cluster 28, Attribute 2 is dirty - [1659966317.984099][3334:3334] CHIP:DMG: Reading attribute: Cluster=0x0000_0028 Endpoint=0 AttributeId=0x0000_0002 (expanded=0) - [1659966317.984128][3334:3334] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0028 e=0 p=v - [1659966317.984161][3334:3334] CHIP:DMG: AccessControl: allowed + [1662483142.830377][6721:6721] CHIP:IM: Received Read request + [1662483142.830459][6721:6721] CHIP:DMG: ReadRequestMessage = + [1662483142.830487][6721:6721] CHIP:DMG: { + [1662483142.830510][6721:6721] CHIP:DMG: AttributePathIBs = + [1662483142.830553][6721:6721] CHIP:DMG: [ + [1662483142.830578][6721:6721] CHIP:DMG: AttributePathIB = + [1662483142.830616][6721:6721] CHIP:DMG: { + [1662483142.830650][6721:6721] CHIP:DMG: Endpoint = 0x3, + [1662483142.830690][6721:6721] CHIP:DMG: Cluster = 0x39, + [1662483142.830728][6721:6721] CHIP:DMG: Attribute = 0x0000_0002, + [1662483142.830756][6721:6721] CHIP:DMG: } + [1662483142.830792][6721:6721] CHIP:DMG: + [1662483142.830818][6721:6721] CHIP:DMG: ], + [1662483142.830856][6721:6721] CHIP:DMG: + [1662483142.830883][6721:6721] CHIP:DMG: isFabricFiltered = true, + [1662483142.830916][6721:6721] CHIP:DMG: InteractionModelRevision = 1 + [1662483142.830940][6721:6721] CHIP:DMG: }, + [1662483142.831024][6721:6721] CHIP:DMG: IM RH moving to [GeneratingReports] disabled: true - label: "DUT reads ProductName from the TH" @@ -125,26 +94,26 @@ tests: Optional Attribute - If it is supported, then in TH(bridge-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE Example Log: - [1659966351.620979][3334:3334] CHIP:IM: Received Read request - [1659966351.621076][3334:3334] CHIP:DMG: ReadRequestMessage = - [1659966351.621104][3334:3334] CHIP:DMG: { - [1659966351.621128][3334:3334] CHIP:DMG: AttributePathIBs = - [1659966351.621154][3334:3334] CHIP:DMG: [ - [1659966351.621178][3334:3334] CHIP:DMG: AttributePathIB = - [1659966351.621206][3334:3334] CHIP:DMG: { - [1659966351.621234][3334:3334] CHIP:DMG: Endpoint = 0x0, - [1659966351.621265][3334:3334] CHIP:DMG: Cluster = 0x28, - [1659966351.621297][3334:3334] CHIP:DMG: Attribute = 0x0000_0003, - [1659966351.621323][3334:3334] CHIP:DMG: } - [1659966351.621350][3334:3334] CHIP:DMG: - [1659966351.621375][3334:3334] CHIP:DMG: ], - [1659966351.621403][3334:3334] CHIP:DMG: - [1659966351.621429][3334:3334] CHIP:DMG: isFabricFiltered = true, - [1659966351.621454][3334:3334] CHIP:DMG: InteractionModelRevision = 1 - [1659966351.621476][3334:3334] CHIP:DMG: }, - [1659966351.621549][3334:3334] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659966351.621633][3334:3334] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1659966351.621662][3334:3334] CHIP:DMG: Cluster 28, Attribute 3 is dirty + [1662483164.120156][6721:6721] CHIP:IM: Received Read request + [1662483164.120237][6721:6721] CHIP:DMG: ReadRequestMessage = + [1662483164.120264][6721:6721] CHIP:DMG: { + [1662483164.120286][6721:6721] CHIP:DMG: AttributePathIBs = + [1662483164.120312][6721:6721] CHIP:DMG: [ + [1662483164.120336][6721:6721] CHIP:DMG: AttributePathIB = + [1662483164.120364][6721:6721] CHIP:DMG: { + [1662483164.120391][6721:6721] CHIP:DMG: Endpoint = 0x3, + [1662483164.120426][6721:6721] CHIP:DMG: Cluster = 0x39, + [1662483164.120458][6721:6721] CHIP:DMG: Attribute = 0x0000_0003, + [1662483164.120487][6721:6721] CHIP:DMG: } + [1662483164.120515][6721:6721] CHIP:DMG: + [1662483164.120540][6721:6721] CHIP:DMG: ], + [1662483164.120568][6721:6721] CHIP:DMG: + [1662483164.120594][6721:6721] CHIP:DMG: isFabricFiltered = true, + [1662483164.120619][6721:6721] CHIP:DMG: InteractionModelRevision = 1 + [1662483164.120642][6721:6721] CHIP:DMG: }, + [1662483164.120713][6721:6721] CHIP:DMG: IM RH moving to [GeneratingReports] + [1662483164.120803][6721:6721] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1662483164.120834][6721:6721] CHIP:DMG: Cluster 39, Attribute 3 is dirty disabled: true - label: "DUT reads NodeLabel from the TH" @@ -155,29 +124,26 @@ tests: Optional Attribute - If it is supported, then in TH(bridge-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE Example Log: - [1659966481.748125][3334:3334] CHIP:IM: Received Read request - [1659966481.748209][3334:3334] CHIP:DMG: ReadRequestMessage = - [1659966481.748236][3334:3334] CHIP:DMG: { - [1659966481.748258][3334:3334] CHIP:DMG: AttributePathIBs = - [1659966481.748283][3334:3334] CHIP:DMG: [ - [1659966481.748307][3334:3334] CHIP:DMG: AttributePathIB = - [1659966481.748334][3334:3334] CHIP:DMG: { - [1659966481.748362][3334:3334] CHIP:DMG: Endpoint = 0x0, - [1659966481.748397][3334:3334] CHIP:DMG: Cluster = 0x28, - [1659966481.748429][3334:3334] CHIP:DMG: Attribute = 0x0000_0005, - [1659966481.748458][3334:3334] CHIP:DMG: } - [1659966481.748486][3334:3334] CHIP:DMG: - [1659966481.748511][3334:3334] CHIP:DMG: ], - [1659966481.748539][3334:3334] CHIP:DMG: - [1659966481.748566][3334:3334] CHIP:DMG: isFabricFiltered = true, - [1659966481.748590][3334:3334] CHIP:DMG: InteractionModelRevision = 1 - [1659966481.748614][3334:3334] CHIP:DMG: }, - [1659966481.748689][3334:3334] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659966481.748787][3334:3334] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1659966481.748818][3334:3334] CHIP:DMG: Cluster 28, Attribute 5 is dirty - [1659966481.748839][3334:3334] CHIP:DMG: Reading attribute: Cluster=0x0000_0028 Endpoint=0 AttributeId=0x0000_0005 (expanded=0) - [1659966481.748868][3334:3334] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0028 e=0 p=v - [1659966481.748901][3334:3334] CHIP:DMG: AccessControl: allowed + [1662483190.104331][6721:6721] CHIP:IM: Received Read request + [1662483190.104408][6721:6721] CHIP:DMG: ReadRequestMessage = + [1662483190.104434][6721:6721] CHIP:DMG: { + [1662483190.104455][6721:6721] CHIP:DMG: AttributePathIBs = + [1662483190.104481][6721:6721] CHIP:DMG: [ + [1662483190.104505][6721:6721] CHIP:DMG: AttributePathIB = + [1662483190.104534][6721:6721] CHIP:DMG: { + [1662483190.104562][6721:6721] CHIP:DMG: Endpoint = 0x3, + [1662483190.104592][6721:6721] CHIP:DMG: Cluster = 0x39, + [1662483190.104623][6721:6721] CHIP:DMG: Attribute = 0x0000_0005, + [1662483190.104650][6721:6721] CHIP:DMG: } + [1662483190.104678][6721:6721] CHIP:DMG: + [1662483190.104702][6721:6721] CHIP:DMG: ], + [1662483190.104730][6721:6721] CHIP:DMG: + [1662483190.104755][6721:6721] CHIP:DMG: isFabricFiltered = true, + [1662483190.104780][6721:6721] CHIP:DMG: InteractionModelRevision = 1 + [1662483190.104803][6721:6721] CHIP:DMG: }, + [1662483190.104875][6721:6721] CHIP:DMG: IM RH moving to [GeneratingReports] + [1662483190.104951][6721:6721] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1662483190.104979][6721:6721] CHIP:DMG: Cluster 39, Attribute 5 is dirty disabled: true - label: "DUT reads Location from the TH" @@ -187,30 +153,9 @@ tests: Optional Attribute - If it is supported, then in TH(bridge-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE - Example Log: - [1659966523.437542][3334:3334] CHIP:IM: Received Read request - [1659966523.437648][3334:3334] CHIP:DMG: ReadRequestMessage = - [1659966523.437686][3334:3334] CHIP:DMG: { - [1659966523.437719][3334:3334] CHIP:DMG: AttributePathIBs = - [1659966523.437757][3334:3334] CHIP:DMG: [ - [1659966523.437792][3334:3334] CHIP:DMG: AttributePathIB = - [1659966523.437838][3334:3334] CHIP:DMG: { - [1659966523.437879][3334:3334] CHIP:DMG: Endpoint = 0x0, - [1659966523.437924][3334:3334] CHIP:DMG: Cluster = 0x28, - [1659966523.437972][3334:3334] CHIP:DMG: Attribute = 0x0000_0006, - [1659966523.438013][3334:3334] CHIP:DMG: } - [1659966523.438054][3334:3334] CHIP:DMG: - [1659966523.438092][3334:3334] CHIP:DMG: ], - [1659966523.438133][3334:3334] CHIP:DMG: - [1659966523.438171][3334:3334] CHIP:DMG: isFabricFiltered = true, - [1659966523.438208][3334:3334] CHIP:DMG: InteractionModelRevision = 1 - [1659966523.438243][3334:3334] CHIP:DMG: }, - [1659966523.438346][3334:3334] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659966523.438456][3334:3334] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1659966523.438499][3334:3334] CHIP:DMG: Cluster 28, Attribute 6 is dirty - [1659966523.438529][3334:3334] CHIP:DMG: Reading attribute: Cluster=0x0000_0028 Endpoint=0 AttributeId=0x0000_0006 (expanded=0) - [1659966523.438563][3334:3334] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0028 e=0 p=v - [1659966523.438603][3334:3334] CHIP:DMG: AccessControl: allowed + + + chip-tool needs to be implemented disabled: true - label: "DUT reads HardwareVersion from the TH" @@ -221,29 +166,25 @@ tests: Optional Attribute - If it is supported, then in TH(bridge-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE Example Log: - [1659966609.655514][3334:3334] CHIP:IM: Received Read request - [1659966609.655592][3334:3334] CHIP:DMG: ReadRequestMessage = - [1659966609.655618][3334:3334] CHIP:DMG: { - [1659966609.655640][3334:3334] CHIP:DMG: AttributePathIBs = - [1659966609.655666][3334:3334] CHIP:DMG: [ - [1659966609.655689][3334:3334] CHIP:DMG: AttributePathIB = - [1659966609.655719][3334:3334] CHIP:DMG: { - [1659966609.655748][3334:3334] CHIP:DMG: Endpoint = 0x0, - [1659966609.655778][3334:3334] CHIP:DMG: Cluster = 0x28, - [1659966609.655810][3334:3334] CHIP:DMG: Attribute = 0x0000_0008, - [1659966609.655841][3334:3334] CHIP:DMG: } - [1659966609.655871][3334:3334] CHIP:DMG: - [1659966609.655898][3334:3334] CHIP:DMG: ], - [1659966609.655925][3334:3334] CHIP:DMG: - [1659966609.655951][3334:3334] CHIP:DMG: isFabricFiltered = true, - [1659966609.655979][3334:3334] CHIP:DMG: InteractionModelRevision = 1 - [1659966609.656001][3334:3334] CHIP:DMG: }, - [1659966609.656073][3334:3334] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659966609.656154][3334:3334] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1659966609.656183][3334:3334] CHIP:DMG: Cluster 28, Attribute 8 is dirty - [1659966609.656204][3334:3334] CHIP:DMG: Reading attribute: Cluster=0x0000_0028 Endpoint=0 AttributeId=0x0000_0008 (expanded=0) - [1659966609.656233][3334:3334] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0028 e=0 p=v - [1659966609.656266][3334:3334] CHIP:DMG: AccessControl: allowed + [1662483240.584273][6721:6721] CHIP:IM: Received Read request + [1662483240.584351][6721:6721] CHIP:DMG: ReadRequestMessage = + [1662483240.584389][6721:6721] CHIP:DMG: { + [1662483240.584411][6721:6721] CHIP:DMG: AttributePathIBs = + [1662483240.584437][6721:6721] CHIP:DMG: [ + [1662483240.584470][6721:6721] CHIP:DMG: AttributePathIB = + [1662483240.584500][6721:6721] CHIP:DMG: { + [1662483240.584539][6721:6721] CHIP:DMG: Endpoint = 0x3, + [1662483240.584570][6721:6721] CHIP:DMG: Cluster = 0x39, + [1662483240.584611][6721:6721] CHIP:DMG: Attribute = 0x0000_0007, + [1662483240.584648][6721:6721] CHIP:DMG: } + [1662483240.584679][6721:6721] CHIP:DMG: + [1662483240.584713][6721:6721] CHIP:DMG: ], + [1662483240.584743][6721:6721] CHIP:DMG: + [1662483240.584780][6721:6721] CHIP:DMG: isFabricFiltered = true, + [1662483240.584805][6721:6721] CHIP:DMG: InteractionModelRevision = 1 + [1662483240.584837][6721:6721] CHIP:DMG: }, + [1662483240.584919][6721:6721] CHIP:DMG: IM RH moving to [GeneratingReports] + [1662483240.585010][6721:6721] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 disabled: true - label: "DUT reads HardwareVersionString from the TH" @@ -255,29 +196,26 @@ tests: Example Log: - [1659966639.857534][3334:3334] CHIP:IM: Received Read request - [1659966639.857613][3334:3334] CHIP:DMG: ReadRequestMessage = - [1659966639.857640][3334:3334] CHIP:DMG: { - [1659966639.857661][3334:3334] CHIP:DMG: AttributePathIBs = - [1659966639.857687][3334:3334] CHIP:DMG: [ - [1659966639.857711][3334:3334] CHIP:DMG: AttributePathIB = - [1659966639.857739][3334:3334] CHIP:DMG: { - [1659966639.857766][3334:3334] CHIP:DMG: Endpoint = 0x0, - [1659966639.857798][3334:3334] CHIP:DMG: Cluster = 0x28, - [1659966639.857828][3334:3334] CHIP:DMG: Attribute = 0x0000_0008, - [1659966639.857856][3334:3334] CHIP:DMG: } - [1659966639.857884][3334:3334] CHIP:DMG: - [1659966639.857909][3334:3334] CHIP:DMG: ], - [1659966639.857936][3334:3334] CHIP:DMG: - [1659966639.857962][3334:3334] CHIP:DMG: isFabricFiltered = true, - [1659966639.857987][3334:3334] CHIP:DMG: InteractionModelRevision = 1 - [1659966639.858010][3334:3334] CHIP:DMG: }, - [1659966639.858080][3334:3334] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659966639.858163][3334:3334] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1659966639.858192][3334:3334] CHIP:DMG: Cluster 28, Attribute 8 is dirty - [1659966639.858213][3334:3334] CHIP:DMG: Reading attribute: Cluster=0x0000_0028 Endpoint=0 AttributeId=0x0000_0008 (expanded=0) - [1659966639.858243][3334:3334] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0028 e=0 p=v - [1659966639.858275][3334:3334] CHIP:DMG: AccessControl: allowed + [1662483260.814729][6721:6721] CHIP:IM: Received Read request + [1662483260.814805][6721:6721] CHIP:DMG: ReadRequestMessage = + [1662483260.814843][6721:6721] CHIP:DMG: { + [1662483260.814872][6721:6721] CHIP:DMG: AttributePathIBs = + [1662483260.814903][6721:6721] CHIP:DMG: [ + [1662483260.814928][6721:6721] CHIP:DMG: AttributePathIB = + [1662483260.814955][6721:6721] CHIP:DMG: { + [1662483260.814983][6721:6721] CHIP:DMG: Endpoint = 0x3, + [1662483260.815022][6721:6721] CHIP:DMG: Cluster = 0x39, + [1662483260.815063][6721:6721] CHIP:DMG: Attribute = 0x0000_0008, + [1662483260.815091][6721:6721] CHIP:DMG: } + [1662483260.815129][6721:6721] CHIP:DMG: + [1662483260.815156][6721:6721] CHIP:DMG: ], + [1662483260.815192][6721:6721] CHIP:DMG: + [1662483260.815218][6721:6721] CHIP:DMG: isFabricFiltered = true, + [1662483260.815252][6721:6721] CHIP:DMG: InteractionModelRevision = 1 + [1662483260.815275][6721:6721] CHIP:DMG: }, + [1662483260.815364][6721:6721] CHIP:DMG: IM RH moving to [GeneratingReports] + [1662483260.815454][6721:6721] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1662483260.815483][6721:6721] CHIP:DMG: Cluster 39, Attribute 8 is dirty disabled: true - label: "DUT reads SoftwareVersion from the TH" @@ -289,29 +227,26 @@ tests: Example Log: - [1659966672.320763][3334:3334] CHIP:IM: Received Read request - [1659966672.320848][3334:3334] CHIP:DMG: ReadRequestMessage = - [1659966672.320876][3334:3334] CHIP:DMG: { - [1659966672.320898][3334:3334] CHIP:DMG: AttributePathIBs = - [1659966672.320987][3334:3334] CHIP:DMG: [ - [1659966672.321033][3334:3334] CHIP:DMG: AttributePathIB = - [1659966672.321066][3334:3334] CHIP:DMG: { - [1659966672.321095][3334:3334] CHIP:DMG: Endpoint = 0x0, - [1659966672.321128][3334:3334] CHIP:DMG: Cluster = 0x28, - [1659966672.321161][3334:3334] CHIP:DMG: Attribute = 0x0000_0009, - [1659966672.321191][3334:3334] CHIP:DMG: } - [1659966672.321220][3334:3334] CHIP:DMG: - [1659966672.321244][3334:3334] CHIP:DMG: ], - [1659966672.321273][3334:3334] CHIP:DMG: - [1659966672.321299][3334:3334] CHIP:DMG: isFabricFiltered = true, - [1659966672.321324][3334:3334] CHIP:DMG: InteractionModelRevision = 1 - [1659966672.321347][3334:3334] CHIP:DMG: }, - [1659966672.321427][3334:3334] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659966672.321529][3334:3334] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1659966672.321561][3334:3334] CHIP:DMG: Cluster 28, Attribute 9 is dirty - [1659966672.321583][3334:3334] CHIP:DMG: Reading attribute: Cluster=0x0000_0028 Endpoint=0 AttributeId=0x0000_0009 (expanded=0) - [1659966672.321612][3334:3334] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0028 e=0 p=v - [1659966672.321646][3334:3334] CHIP:DMG: AccessControl: allowed + [1662483282.272696][6721:6721] CHIP:IM: Received Read request + [1662483282.272777][6721:6721] CHIP:DMG: ReadRequestMessage = + [1662483282.272805][6721:6721] CHIP:DMG: { + [1662483282.272830][6721:6721] CHIP:DMG: AttributePathIBs = + [1662483282.272866][6721:6721] CHIP:DMG: [ + [1662483282.272891][6721:6721] CHIP:DMG: AttributePathIB = + [1662483282.272920][6721:6721] CHIP:DMG: { + [1662483282.272949][6721:6721] CHIP:DMG: Endpoint = 0x3, + [1662483282.272978][6721:6721] CHIP:DMG: Cluster = 0x39, + [1662483282.273007][6721:6721] CHIP:DMG: Attribute = 0x0000_0009, + [1662483282.273036][6721:6721] CHIP:DMG: } + [1662483282.273064][6721:6721] CHIP:DMG: + [1662483282.273089][6721:6721] CHIP:DMG: ], + [1662483282.273118][6721:6721] CHIP:DMG: + [1662483282.273144][6721:6721] CHIP:DMG: isFabricFiltered = true, + [1662483282.273169][6721:6721] CHIP:DMG: InteractionModelRevision = 1 + [1662483282.273192][6721:6721] CHIP:DMG: }, + [1662483282.273267][6721:6721] CHIP:DMG: IM RH moving to [GeneratingReports] + [1662483282.273361][6721:6721] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1662483282.273392][6721:6721] CHIP:DMG: Cluster 39, Attribute 9 is dirty disabled: true - label: "DUT reads SoftwareVersionString from the TH" @@ -323,29 +258,26 @@ tests: Example Log: - [1659966701.890819][3334:3334] CHIP:IM: Received Read request - [1659966701.890896][3334:3334] CHIP:DMG: ReadRequestMessage = - [1659966701.890922][3334:3334] CHIP:DMG: { - [1659966701.890944][3334:3334] CHIP:DMG: AttributePathIBs = - [1659966701.890973][3334:3334] CHIP:DMG: [ - [1659966701.890997][3334:3334] CHIP:DMG: AttributePathIB = - [1659966701.891024][3334:3334] CHIP:DMG: { - [1659966701.891052][3334:3334] CHIP:DMG: Endpoint = 0x0, - [1659966701.891083][3334:3334] CHIP:DMG: Cluster = 0x28, - [1659966701.891116][3334:3334] CHIP:DMG: Attribute = 0x0000_000A, - [1659966701.891148][3334:3334] CHIP:DMG: } - [1659966701.891178][3334:3334] CHIP:DMG: - [1659966701.891203][3334:3334] CHIP:DMG: ], - [1659966701.891230][3334:3334] CHIP:DMG: - [1659966701.891256][3334:3334] CHIP:DMG: isFabricFiltered = true, - [1659966701.891281][3334:3334] CHIP:DMG: InteractionModelRevision = 1 - [1659966701.891304][3334:3334] CHIP:DMG: }, - [1659966701.891376][3334:3334] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659966701.891456][3334:3334] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1659966701.891485][3334:3334] CHIP:DMG: Cluster 28, Attribute a is dirty - [1659966701.891507][3334:3334] CHIP:DMG: Reading attribute: Cluster=0x0000_0028 Endpoint=0 AttributeId=0x0000_000A (expanded=0) - [1659966701.891536][3334:3334] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0028 e=0 p=v - [1659966701.891568][3334:3334] CHIP:DMG: AccessControl: allowed + [1662483301.552473][6721:6721] CHIP:IM: Received Read request + [1662483301.552587][6721:6721] CHIP:DMG: ReadRequestMessage = + [1662483301.552630][6721:6721] CHIP:DMG: { + [1662483301.552666][6721:6721] CHIP:DMG: AttributePathIBs = + [1662483301.552709][6721:6721] CHIP:DMG: [ + [1662483301.552748][6721:6721] CHIP:DMG: AttributePathIB = + [1662483301.552796][6721:6721] CHIP:DMG: { + [1662483301.552842][6721:6721] CHIP:DMG: Endpoint = 0x3, + [1662483301.552893][6721:6721] CHIP:DMG: Cluster = 0x39, + [1662483301.552946][6721:6721] CHIP:DMG: Attribute = 0x0000_000A, + [1662483301.552992][6721:6721] CHIP:DMG: } + [1662483301.553038][6721:6721] CHIP:DMG: + [1662483301.553079][6721:6721] CHIP:DMG: ], + [1662483301.553125][6721:6721] CHIP:DMG: + [1662483301.553168][6721:6721] CHIP:DMG: isFabricFiltered = true, + [1662483301.553208][6721:6721] CHIP:DMG: InteractionModelRevision = 1 + [1662483301.553246][6721:6721] CHIP:DMG: }, + [1662483301.553352][6721:6721] CHIP:DMG: IM RH moving to [GeneratingReports] + [1662483301.553468][6721:6721] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1662483301.553513][6721:6721] CHIP:DMG: Cluster 39, Attribute a is dirty disabled: true - label: "DUT reads ManufacturingDate from the TH" @@ -357,29 +289,25 @@ tests: Example Log: - [1659966734.117679][3334:3334] CHIP:IM: Received Read request - [1659966734.117757][3334:3334] CHIP:DMG: ReadRequestMessage = - [1659966734.117784][3334:3334] CHIP:DMG: { - [1659966734.117806][3334:3334] CHIP:DMG: AttributePathIBs = - [1659966734.117832][3334:3334] CHIP:DMG: [ - [1659966734.117856][3334:3334] CHIP:DMG: AttributePathIB = - [1659966734.117892][3334:3334] CHIP:DMG: { - [1659966734.117920][3334:3334] CHIP:DMG: Endpoint = 0x0, - [1659966734.117952][3334:3334] CHIP:DMG: Cluster = 0x28, - [1659966734.117987][3334:3334] CHIP:DMG: Attribute = 0x0000_000B, - [1659966734.118016][3334:3334] CHIP:DMG: } - [1659966734.118046][3334:3334] CHIP:DMG: - [1659966734.118073][3334:3334] CHIP:DMG: ], - [1659966734.118100][3334:3334] CHIP:DMG: - [1659966734.118126][3334:3334] CHIP:DMG: isFabricFiltered = true, - [1659966734.118151][3334:3334] CHIP:DMG: InteractionModelRevision = 1 - [1659966734.118175][3334:3334] CHIP:DMG: }, - [1659966734.118248][3334:3334] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659966734.118331][3334:3334] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1659966734.118360][3334:3334] CHIP:DMG: Cluster 28, Attribute b is dirty - [1659966734.118382][3334:3334] CHIP:DMG: Reading attribute: Cluster=0x0000_0028 Endpoint=0 AttributeId=0x0000_000B (expanded=0) - [1659966734.118411][3334:3334] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0028 e=0 p=v - [1659966734.118444][3334:3334] CHIP:DMG: AccessControl: allowed + [1662483324.189011][6721:6721] CHIP:IM: Received Read request + [1662483324.189095][6721:6721] CHIP:DMG: ReadRequestMessage = + [1662483324.189123][6721:6721] CHIP:DMG: { + [1662483324.189145][6721:6721] CHIP:DMG: AttributePathIBs = + [1662483324.189170][6721:6721] CHIP:DMG: [ + [1662483324.189194][6721:6721] CHIP:DMG: AttributePathIB = + [1662483324.189222][6721:6721] CHIP:DMG: { + [1662483324.189250][6721:6721] CHIP:DMG: Endpoint = 0x3, + [1662483324.189284][6721:6721] CHIP:DMG: Cluster = 0x39, + [1662483324.189317][6721:6721] CHIP:DMG: Attribute = 0x0000_000B, + [1662483324.189347][6721:6721] CHIP:DMG: } + [1662483324.189376][6721:6721] CHIP:DMG: + [1662483324.189401][6721:6721] CHIP:DMG: ], + [1662483324.189429][6721:6721] CHIP:DMG: + [1662483324.189455][6721:6721] CHIP:DMG: isFabricFiltered = true, + [1662483324.189479][6721:6721] CHIP:DMG: InteractionModelRevision = 1 + [1662483324.189502][6721:6721] CHIP:DMG: }, + [1662483324.189575][6721:6721] CHIP:DMG: IM RH moving to [GeneratingReports] + [1662483324.189665][6721:6721] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = disabled: true - label: "DUT reads PartNumber from the TH" @@ -391,29 +319,26 @@ tests: Example Log: - [1659966759.882885][3334:3334] CHIP:IM: Received Read request - [1659966759.882962][3334:3334] CHIP:DMG: ReadRequestMessage = - [1659966759.882989][3334:3334] CHIP:DMG: { - [1659966759.883011][3334:3334] CHIP:DMG: AttributePathIBs = - [1659966759.883037][3334:3334] CHIP:DMG: [ - [1659966759.883061][3334:3334] CHIP:DMG: AttributePathIB = - [1659966759.883089][3334:3334] CHIP:DMG: { - [1659966759.883117][3334:3334] CHIP:DMG: Endpoint = 0x0, - [1659966759.883153][3334:3334] CHIP:DMG: Cluster = 0x28, - [1659966759.883182][3334:3334] CHIP:DMG: Attribute = 0x0000_000C, - [1659966759.883215][3334:3334] CHIP:DMG: } - [1659966759.883243][3334:3334] CHIP:DMG: - [1659966759.883268][3334:3334] CHIP:DMG: ], - [1659966759.883296][3334:3334] CHIP:DMG: - [1659966759.883322][3334:3334] CHIP:DMG: isFabricFiltered = true, - [1659966759.883347][3334:3334] CHIP:DMG: InteractionModelRevision = 1 - [1659966759.883370][3334:3334] CHIP:DMG: }, - [1659966759.883444][3334:3334] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659966759.883528][3334:3334] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1659966759.883557][3334:3334] CHIP:DMG: Cluster 28, Attribute c is dirty - [1659966759.883579][3334:3334] CHIP:DMG: Reading attribute: Cluster=0x0000_0028 Endpoint=0 AttributeId=0x0000_000C (expanded=0) - [1659966759.883608][3334:3334] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0028 e=0 p=v - [1659966759.883642][3334:3334] CHIP:DMG: AccessControl: allowed + [1662483344.709130][6721:6721] CHIP:IM: Received Read request + [1662483344.709209][6721:6721] CHIP:DMG: ReadRequestMessage = + [1662483344.709236][6721:6721] CHIP:DMG: { + [1662483344.709257][6721:6721] CHIP:DMG: AttributePathIBs = + [1662483344.709283][6721:6721] CHIP:DMG: [ + [1662483344.709307][6721:6721] CHIP:DMG: AttributePathIB = + [1662483344.709341][6721:6721] CHIP:DMG: { + [1662483344.709371][6721:6721] CHIP:DMG: Endpoint = 0x3, + [1662483344.709407][6721:6721] CHIP:DMG: Cluster = 0x39, + [1662483344.709439][6721:6721] CHIP:DMG: Attribute = 0x0000_000C, + [1662483344.709468][6721:6721] CHIP:DMG: } + [1662483344.709496][6721:6721] CHIP:DMG: + [1662483344.709523][6721:6721] CHIP:DMG: ], + [1662483344.709551][6721:6721] CHIP:DMG: + [1662483344.709576][6721:6721] CHIP:DMG: isFabricFiltered = true, + [1662483344.709603][6721:6721] CHIP:DMG: InteractionModelRevision = 1 + [1662483344.709626][6721:6721] CHIP:DMG: }, + [1662483344.709697][6721:6721] CHIP:DMG: IM RH moving to [GeneratingReports] + [1662483344.709776][6721:6721] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1662483344.709805][6721:6721] CHIP:DMG: Cluster 39, Attribute c is dirty disabled: true - label: "DUT reads ProductURL from the TH" @@ -425,29 +350,25 @@ tests: Example Log: - [1659966801.953254][3334:3334] CHIP:IM: Received Read request - [1659966801.953352][3334:3334] CHIP:DMG: ReadRequestMessage = - [1659966801.953388][3334:3334] CHIP:DMG: { - [1659966801.953417][3334:3334] CHIP:DMG: AttributePathIBs = - [1659966801.953452][3334:3334] CHIP:DMG: [ - [1659966801.953484][3334:3334] CHIP:DMG: AttributePathIB = - [1659966801.953531][3334:3334] CHIP:DMG: { - [1659966801.953569][3334:3334] CHIP:DMG: Endpoint = 0x0, - [1659966801.953611][3334:3334] CHIP:DMG: Cluster = 0x28, - [1659966801.953653][3334:3334] CHIP:DMG: Attribute = 0x0000_000D, - [1659966801.953693][3334:3334] CHIP:DMG: } - [1659966801.953731][3334:3334] CHIP:DMG: - [1659966801.953765][3334:3334] CHIP:DMG: ], - [1659966801.953802][3334:3334] CHIP:DMG: - [1659966801.953837][3334:3334] CHIP:DMG: isFabricFiltered = true, - [1659966801.953871][3334:3334] CHIP:DMG: InteractionModelRevision = 1 - [1659966801.953903][3334:3334] CHIP:DMG: }, - [1659966801.953996][3334:3334] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659966801.954102][3334:3334] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1659966801.954177][3334:3334] CHIP:DMG: Cluster 28, Attribute d is dirty - [1659966801.954208][3334:3334] CHIP:DMG: Reading attribute: Cluster=0x0000_0028 Endpoint=0 AttributeId=0x0000_000D (expanded=0) - [1659966801.954246][3334:3334] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0028 e=0 p=v - [1659966801.954288][3334:3334] CHIP:DMG: AccessControl: allowed + [1662483368.089998][6721:6721] CHIP:DMG: ReadRequestMessage = + [1662483368.090026][6721:6721] CHIP:DMG: { + [1662483368.090047][6721:6721] CHIP:DMG: AttributePathIBs = + [1662483368.090100][6721:6721] CHIP:DMG: [ + [1662483368.090126][6721:6721] CHIP:DMG: AttributePathIB = + [1662483368.090154][6721:6721] CHIP:DMG: { + [1662483368.090182][6721:6721] CHIP:DMG: Endpoint = 0x3, + [1662483368.090214][6721:6721] CHIP:DMG: Cluster = 0x39, + [1662483368.090244][6721:6721] CHIP:DMG: Attribute = 0x0000_000D, + [1662483368.090272][6721:6721] CHIP:DMG: } + [1662483368.090299][6721:6721] CHIP:DMG: + [1662483368.090324][6721:6721] CHIP:DMG: ], + [1662483368.090352][6721:6721] CHIP:DMG: + [1662483368.090378][6721:6721] CHIP:DMG: isFabricFiltered = true, + [1662483368.090403][6721:6721] CHIP:DMG: InteractionModelRevision = 1 + [1662483368.090426][6721:6721] CHIP:DMG: }, + [1662483368.090499][6721:6721] CHIP:DMG: IM RH moving to [GeneratingReports] + [1662483368.090578][6721:6721] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1662483368.090607][6721:6721] CHIP:DMG: Cluster 39, Attribute d is dirty disabled: true - label: "DUT reads ProductLabel from the TH" @@ -459,29 +380,24 @@ tests: Example Log: - [1659966838.501579][3334:3334] CHIP:IM: Received Read request - [1659966838.501708][3334:3334] CHIP:DMG: ReadRequestMessage = - [1659966838.501758][3334:3334] CHIP:DMG: { - [1659966838.501799][3334:3334] CHIP:DMG: AttributePathIBs = - [1659966838.501846][3334:3334] CHIP:DMG: [ - [1659966838.501892][3334:3334] CHIP:DMG: AttributePathIB = - [1659966838.501942][3334:3334] CHIP:DMG: { - [1659966838.501994][3334:3334] CHIP:DMG: Endpoint = 0x0, - [1659966838.502081][3334:3334] CHIP:DMG: Cluster = 0x28, - [1659966838.502146][3334:3334] CHIP:DMG: Attribute = 0x0000_000E, - [1659966838.502202][3334:3334] CHIP:DMG: } - [1659966838.502254][3334:3334] CHIP:DMG: - [1659966838.502301][3334:3334] CHIP:DMG: ], - [1659966838.502352][3334:3334] CHIP:DMG: - [1659966838.502401][3334:3334] CHIP:DMG: isFabricFiltered = true, - [1659966838.502448][3334:3334] CHIP:DMG: InteractionModelRevision = 1 - [1659966838.502492][3334:3334] CHIP:DMG: }, - [1659966838.502613][3334:3334] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659966838.502731][3334:3334] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1659966838.502768][3334:3334] CHIP:DMG: Cluster 28, Attribute e is dirty - [1659966838.502793][3334:3334] CHIP:DMG: Reading attribute: Cluster=0x0000_0028 Endpoint=0 AttributeId=0x0000_000E (expanded=0) - [1659966838.502827][3334:3334] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0028 e=0 p=v - [1659966838.502864][3334:3334] CHIP:DMG: AccessControl: allowed + [1662483390.848183][6721:6721] CHIP:IM: Received Read request + [1662483390.848263][6721:6721] CHIP:DMG: ReadRequestMessage = + [1662483390.848289][6721:6721] CHIP:DMG: { + [1662483390.848311][6721:6721] CHIP:DMG: AttributePathIBs = + [1662483390.848344][6721:6721] CHIP:DMG: [ + [1662483390.848368][6721:6721] CHIP:DMG: AttributePathIB = + [1662483390.848395][6721:6721] CHIP:DMG: { + [1662483390.848423][6721:6721] CHIP:DMG: Endpoint = 0x3, + [1662483390.848454][6721:6721] CHIP:DMG: Cluster = 0x39, + [1662483390.848488][6721:6721] CHIP:DMG: Attribute = 0x0000_000E, + [1662483390.848517][6721:6721] CHIP:DMG: } + [1662483390.848546][6721:6721] CHIP:DMG: + [1662483390.848573][6721:6721] CHIP:DMG: ], + [1662483390.848601][6721:6721] CHIP:DMG: + [1662483390.848627][6721:6721] CHIP:DMG: isFabricFiltered = true, + [1662483390.848652][6721:6721] CHIP:DMG: InteractionModelRevision = 1 + [1662483390.848675][6721:6721] CHIP:DMG: }, + [1662483390.848745][6721:6721] CHIP:DMG: IM RH moving to [GeneratingReports] disabled: true - label: "DUT reads SerialNumber from the TH" @@ -493,29 +409,26 @@ tests: Example Log: - [1659966910.846054][3334:3334] CHIP:IM: Received Read request - [1659966910.846136][3334:3334] CHIP:DMG: ReadRequestMessage = - [1659966910.846163][3334:3334] CHIP:DMG: { - [1659966910.846185][3334:3334] CHIP:DMG: AttributePathIBs = - [1659966910.846218][3334:3334] CHIP:DMG: [ - [1659966910.846243][3334:3334] CHIP:DMG: AttributePathIB = - [1659966910.846275][3334:3334] CHIP:DMG: { - [1659966910.846307][3334:3334] CHIP:DMG: Endpoint = 0x0, - [1659966910.846344][3334:3334] CHIP:DMG: Cluster = 0x28, - [1659966910.846381][3334:3334] CHIP:DMG: Attribute = 0x0000_000F, - [1659966910.846414][3334:3334] CHIP:DMG: } - [1659966910.846445][3334:3334] CHIP:DMG: - [1659966910.846473][3334:3334] CHIP:DMG: ], - [1659966910.846501][3334:3334] CHIP:DMG: - [1659966910.846527][3334:3334] CHIP:DMG: isFabricFiltered = true, - [1659966910.846552][3334:3334] CHIP:DMG: InteractionModelRevision = 1 - [1659966910.846578][3334:3334] CHIP:DMG: }, - [1659966910.846653][3334:3334] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659966910.846749][3334:3334] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1659966910.846780][3334:3334] CHIP:DMG: Cluster 28, Attribute f is dirty - [1659966910.846801][3334:3334] CHIP:DMG: Reading attribute: Cluster=0x0000_0028 Endpoint=0 AttributeId=0x0000_000F (expanded=0) - [1659966910.846831][3334:3334] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0028 e=0 p=v - [1659966910.846865][3334:3334] CHIP:DMG: AccessControl: allowed + [1662483412.129986][6721:6721] CHIP:IM: Received Read request + [1662483412.130062][6721:6721] CHIP:DMG: ReadRequestMessage = + [1662483412.130088][6721:6721] CHIP:DMG: { + [1662483412.130134][6721:6721] CHIP:DMG: AttributePathIBs = + [1662483412.130162][6721:6721] CHIP:DMG: [ + [1662483412.130186][6721:6721] CHIP:DMG: AttributePathIB = + [1662483412.130214][6721:6721] CHIP:DMG: { + [1662483412.130242][6721:6721] CHIP:DMG: Endpoint = 0x3, + [1662483412.130273][6721:6721] CHIP:DMG: Cluster = 0x39, + [1662483412.130304][6721:6721] CHIP:DMG: Attribute = 0x0000_000F, + [1662483412.130333][6721:6721] CHIP:DMG: } + [1662483412.130361][6721:6721] CHIP:DMG: + [1662483412.130386][6721:6721] CHIP:DMG: ], + [1662483412.130413][6721:6721] CHIP:DMG: + [1662483412.130439][6721:6721] CHIP:DMG: isFabricFiltered = true, + [1662483412.130464][6721:6721] CHIP:DMG: InteractionModelRevision = 1 + [1662483412.130487][6721:6721] CHIP:DMG: }, + [1662483412.130558][6721:6721] CHIP:DMG: IM RH moving to [GeneratingReports] + [1662483412.130636][6721:6721] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1662483412.130665][6721:6721] CHIP:DMG: Cluster 39, Attribute f is dirty disabled: true - label: "DUT reads Reachable from the TH" @@ -524,29 +437,26 @@ tests: ./chip-tool bridgeddevicebasic read reachable 1 3 Verify ReadRequestMessage is displayed on TH(bridge-app) Log - [1659966974.431316][3334:3334] CHIP:IM: Received Read request - [1659966974.431423][3334:3334] CHIP:DMG: ReadRequestMessage = - [1659966974.431461][3334:3334] CHIP:DMG: { - [1659966974.431493][3334:3334] CHIP:DMG: AttributePathIBs = - [1659966974.431531][3334:3334] CHIP:DMG: [ - [1659966974.431567][3334:3334] CHIP:DMG: AttributePathIB = - [1659966974.431607][3334:3334] CHIP:DMG: { - [1659966974.431649][3334:3334] CHIP:DMG: Endpoint = 0x0, - [1659966974.431696][3334:3334] CHIP:DMG: Cluster = 0x28, - [1659966974.431740][3334:3334] CHIP:DMG: Attribute = 0x0000_0011, - [1659966974.431784][3334:3334] CHIP:DMG: } - [1659966974.431825][3334:3334] CHIP:DMG: - [1659966974.431862][3334:3334] CHIP:DMG: ], - [1659966974.431903][3334:3334] CHIP:DMG: - [1659966974.431941][3334:3334] CHIP:DMG: isFabricFiltered = true, - [1659966974.431979][3334:3334] CHIP:DMG: InteractionModelRevision = 1 - [1659966974.432014][3334:3334] CHIP:DMG: }, - [1659966974.432116][3334:3334] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659966974.432230][3334:3334] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1659966974.432272][3334:3334] CHIP:DMG: Cluster 28, Attribute 11 is dirty - [1659966974.432304][3334:3334] CHIP:DMG: Reading attribute: Cluster=0x0000_0028 Endpoint=0 AttributeId=0x0000_0011 (expanded=0) - [1659966974.432345][3334:3334] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0028 e=0 p=v - [1659966974.432391][3334:3334] CHIP:DMG: AccessControl: allowed + [1662483432.994416][6721:6721] CHIP:IM: Received Read request + [1662483432.994498][6721:6721] CHIP:DMG: ReadRequestMessage = + [1662483432.994524][6721:6721] CHIP:DMG: { + [1662483432.994546][6721:6721] CHIP:DMG: AttributePathIBs = + [1662483432.994572][6721:6721] CHIP:DMG: [ + [1662483432.994596][6721:6721] CHIP:DMG: AttributePathIB = + [1662483432.994623][6721:6721] CHIP:DMG: { + [1662483432.994651][6721:6721] CHIP:DMG: Endpoint = 0x3, + [1662483432.994684][6721:6721] CHIP:DMG: Cluster = 0x39, + [1662483432.994714][6721:6721] CHIP:DMG: Attribute = 0x0000_0011, + [1662483432.994742][6721:6721] CHIP:DMG: } + [1662483432.994770][6721:6721] CHIP:DMG: + [1662483432.994795][6721:6721] CHIP:DMG: ], + [1662483432.994823][6721:6721] CHIP:DMG: + [1662483432.994849][6721:6721] CHIP:DMG: isFabricFiltered = true, + [1662483432.994873][6721:6721] CHIP:DMG: InteractionModelRevision = 1 + [1662483432.994896][6721:6721] CHIP:DMG: }, + [1662483432.994968][6721:6721] CHIP:DMG: IM RH moving to [GeneratingReports] + [1662483432.995051][6721:6721] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1662483432.995079][6721:6721] CHIP:DMG: Cluster 39, Attribute 11 is dirty disabled: true - label: "DUT reads UniqueID from the TH" @@ -557,27 +467,23 @@ tests: Optional Attribute - If it is supported, then in TH(bridge-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE Example Log: - [1659967013.796500][3334:3334] CHIP:IM: Received Read request - [1659967013.796577][3334:3334] CHIP:DMG: ReadRequestMessage = - [1659967013.796604][3334:3334] CHIP:DMG: { - [1659967013.796625][3334:3334] CHIP:DMG: AttributePathIBs = - [1659967013.796651][3334:3334] CHIP:DMG: [ - [1659967013.796675][3334:3334] CHIP:DMG: AttributePathIB = - [1659967013.796702][3334:3334] CHIP:DMG: { - [1659967013.796730][3334:3334] CHIP:DMG: Endpoint = 0x0, - [1659967013.796821][3334:3334] CHIP:DMG: Cluster = 0x28, - [1659967013.796854][3334:3334] CHIP:DMG: Attribute = 0x0000_0012, - [1659967013.796883][3334:3334] CHIP:DMG: } - [1659967013.796911][3334:3334] CHIP:DMG: - [1659967013.796935][3334:3334] CHIP:DMG: ], - [1659967013.796963][3334:3334] CHIP:DMG: - [1659967013.796989][3334:3334] CHIP:DMG: isFabricFiltered = true, - [1659967013.797014][3334:3334] CHIP:DMG: InteractionModelRevision = 1 - [1659967013.797074][3334:3334] CHIP:DMG: }, - [1659967013.797147][3334:3334] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659967013.797234][3334:3334] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1659967013.797263][3334:3334] CHIP:DMG: Cluster 28, Attribute 12 is dirty - [1659967013.797285][3334:3334] CHIP:DMG: Reading attribute: Cluster=0x0000_0028 Endpoint=0 AttributeId=0x0000_0012 (expanded=0) - [1659967013.797315][3334:3334] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0028 e=0 p=v - [1659967013.797348][3334:3334] CHIP:DMG: AccessControl: allowed + [1662483460.016076][6721:6721] CHIP:IM: Received Read request + [1662483460.016164][6721:6721] CHIP:DMG: ReadRequestMessage = + [1662483460.016192][6721:6721] CHIP:DMG: { + [1662483460.016214][6721:6721] CHIP:DMG: AttributePathIBs = + [1662483460.016240][6721:6721] CHIP:DMG: [ + [1662483460.016264][6721:6721] CHIP:DMG: AttributePathIB = + [1662483460.016298][6721:6721] CHIP:DMG: { + [1662483460.016335][6721:6721] CHIP:DMG: Endpoint = 0x3, + [1662483460.016368][6721:6721] CHIP:DMG: Cluster = 0x39, + [1662483460.016399][6721:6721] CHIP:DMG: Attribute = 0x0000_0012, + [1662483460.016429][6721:6721] CHIP:DMG: } + [1662483460.016457][6721:6721] CHIP:DMG: + [1662483460.016482][6721:6721] CHIP:DMG: ], + [1662483460.016510][6721:6721] CHIP:DMG: + [1662483460.016536][6721:6721] CHIP:DMG: isFabricFiltered = true, + [1662483460.016561][6721:6721] CHIP:DMG: InteractionModelRevision = 1 + [1662483460.016584][6721:6721] CHIP:DMG: }, + [1662483460.016656][6721:6721] CHIP:DMG: IM RH moving to [GeneratingReports] + [1662483460.016752][6721:6721] CHIP:DMG: Building Reports for ReadHandler with LastReportGenera disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_BR_1.yaml b/src/app/tests/suites/certification/Test_TC_BR_1.yaml index 01cb2eda0803fb..a48b1f6d56ba07 100644 --- a/src/app/tests/suites/certification/Test_TC_BR_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BR_1.yaml @@ -24,6 +24,14 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + 1. DUT (bridge) has been commissioned to TH + + 2. Two or more bridged devices of a supported type connected via non-Matter network/protocol to DUT (bridge). + If the bridge supports both actuator and sensor/switch devices, use at least one of each type + disabled: true + - label: "Read attribute DeviceTypeList of the Descriptor cluster on endpoint 0" PICS: MCORE.BRIDGE @@ -256,6 +264,16 @@ tests: [1657002538.135166][4097:4102] CHIP:TOO: } disabled: true + - label: + "IF 0 endpoints found in step 1c, FAIL the test (no Aggregator device + type found) ELSE Execute test steps 2a..7d for each of the endpoints + found in step 1c (i.e. for each of the Aggregator device types)" + verification: | + From Step1c, list all the endpoints having the aggregator i.e., 0x000e=14 + + Then in this case Endpoint is 1 + disabled: true + - label: "Read attribute PartsList of the Descriptor cluster on endpoint found in step 1c" @@ -480,7 +498,7 @@ tests: ./chip-tool bridgeddevicebasic read node-label 1 4 - Verify Verify Node-label is read sucessfully in TH(chip-tool) Log + Verify Node-label is read sucessfully in TH(chip-tool) Log [1657003598.573764][4552:4557] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_0039 Attribute 0x0000_0005 DataVersion: 3722118563 [1657003598.573811][4552:4557] CHIP:TOO: NodeLabel: Switch 1 @@ -646,7 +664,7 @@ tests: which is an actuator (e.g. light, window covering)" PICS: MCORE.BRIDGE verification: | - From Step 5 output , choose one of the device type and identfy the device from the device librray. + From Step 5 output , choose one of the device type and identify the device from the device library. For Ex: on-off cluster has been taken as example to run tfurther steps disabled: true @@ -716,10 +734,10 @@ tests: - label: "From the list acquired in step 5, choose one of the bridged devices which is a sensor (e.g. occupancy sensor, contact sensor, temperature - sensor)" + sensor)or switch" PICS: MCORE.BRIDGE verification: | - From Step 5 output , choose one of the sensor device type and identfy the device from the device librray. + From Step 5 output , choose one of the sensor device type and identify the device from the device library For Ex: temperature sensor, being added to bridge-app as example to run further steps disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml index c62bac9c96d359..7e3f09de5e6cf1 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml @@ -112,7 +112,7 @@ tests: verification: | On DUT_CR1 using chip tool, read fabrics list - Below are the example command for using single RPI as multiple controller. Vendor should have the provision to use the equivalent command in their DUT or use multiple commissioners/controllers + Below are the example command for using single RPI as multiplecontrollers. Vendor should have the provision to use the equivalent command in their DUT or use multiple commissioners/controllers Verify TH_CE receives and processes the command successfully on TH_CE (all-clusters-app) log @@ -219,15 +219,16 @@ tests: ./chip-tool operationalcredentials remove-fabric 2 1 0 --commissioner-name beta - Verify TH_CE responses with NOCResponse with a StatusCode OK on TH_CE (all-clusters-app) log + Verify TH_CE responses with "RemoveFabric successful" and "Expiring all sessions for fabric 0x2" on TH_CE (all-clusters-app) log + - CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 - CHIP:TOO: NOCResponse: { - CHIP:TOO: statusCode: 0 - CHIP:TOO: fabricIndex: 2 - CHIP:TOO: } - CHIP:DMG: ICR moving to [AwaitingDe] + [1663307444.729967][1746:1746] CHIP:DIS: mDNS service published: _matter._tcp + [1663307444.730031][1746:1746] CHIP:ZCL: OpCreds: RemoveFabric successful + [1663307444.730110][1746:1746] CHIP:DMG: Command handler moving to [ Preparing] + [1663307444.730183][1746:1746] CHIP:DMG: Command handler moving to [AddingComm] + [1663307444.730277][1746:1746] CHIP:DMG: Command handler moving to [AddedComma] + [1663307444.730346][1746:1746] CHIP:IN: Expiring all sessions for fabric 0x2!! + [1663307444.730426][1746:1746] CHIP:IN: SecureSession[0xaaaae0b82e10]: MarkForEviction Type:2 LSID:23764 disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml index d6ed7f4a529bd7..5189b69c536f72 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml @@ -224,17 +224,17 @@ tests: Below are the example command for using single RPI as multiple controller. Vendor should have the provision to use the equivalent command in their DUT or use multiple commissioners/controllers - Verify TH_CE responses with NOCResponse with a StatusCode OK on TH_CE (all-clusters-app) log + Verify TH_CE responses with "RemoveFabric successful" and "Expiring all sessions for fabric 0x2" on TH_CE (all-clusters-app) log ./chip-tool operationalcredentials remove-fabric 2 1 0 - CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 - CHIP:TOO: NOCResponse: { - CHIP:TOO: statusCode: 0 - CHIP:TOO: fabricIndex: 2 - CHIP:TOO: } - CHIP:DMG: ICR moving to [AwaitingDe] + [1663307444.729967][1746:1746] CHIP:DIS: mDNS service published: _matter._tcp + [1663307444.730031][1746:1746] CHIP:ZCL: OpCreds: RemoveFabric successful + [1663307444.730110][1746:1746] CHIP:DMG: Command handler moving to [ Preparing] + [1663307444.730183][1746:1746] CHIP:DMG: Command handler moving to [AddingComm] + [1663307444.730277][1746:1746] CHIP:DMG: Command handler moving to [AddedComma] + [1663307444.730346][1746:1746] CHIP:IN: Expiring all sessions for fabric 0x2!! + [1663307444.730426][1746:1746] CHIP:IN: SecureSession[0xaaaae0b82e10]: MarkForEviction Type:2 LSID:23764 disabled: true - label: @@ -250,15 +250,19 @@ tests: ./chip-tool basic write node-label te5new 2 0 --commissioner-name beta - Received error (protocol code 2) during pairing process. ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter - [1651819620.929567][4359:4364] CHIP:CTL: OperationalDeviceProxy[B8070CD13C99D367:0000000000000002]: State change 3 --> 2 - [1651819620.929700][4359:4364] CHIP:-: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter at ../../commands/clusters/ModelCommand.cpp:53 + [1663571657.500021][3463:3463] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) + [1663571657.500077][3463:3463] CHIP:DL: Inet Layer shutdown + [1663571657.500123][3463:3463] CHIP:DL: BLE shutdown + [1663571657.500168][3463:3463] CHIP:DL: System Layer shutdown + [1663571657.500383][3463:3463] CHIP:TOO: Run command failure: ../../examples/chip-tool/commands/common/CHIPCommand.cpp:454: CHIP Error 0x00000032: Timeout ./chip-tool basic read node-label 2 0 --commissioner-name beta - Received error (protocol code 2) during pairing process. ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter - [1651819620.929567][4359:4364] CHIP:CTL: OperationalDeviceProxy[B8070CD13C99D367:0000000000000002]: State change 3 --> 2 - [1651819620.929700][4359:4364] CHIP:-: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter at ../../commands/clusters/ModelCommand.cpp:53 + [1663571960.877702][3488:3488] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) + [1663571960.877766][3488:3488] CHIP:DL: Inet Layer shutdown + [1663571960.877820][3488:3488] CHIP:DL: BLE shutdown + [1663571960.877873][3488:3488] CHIP:DL: System Layer shutdown + [1663571960.878116][3488:3488] CHIP:TOO: Run command failure: ../../src/lib/address_resolve/AddressResolve_DefaultImpl.cpp:174: CHIP Error 0x00000032: Timeout disabled: true - label: "DUT_CR1 sends command to TH_CE to read the list of Fabrics" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml index f057ea57c34799..78d0cdcdd8e081 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml @@ -98,9 +98,11 @@ tests: Verify the below message in the TH_CR2(chip-tool) Log: - CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 - CHIP:TOO: Secure Pairing Failed - CHIP:TOO: Pairing Failure: ../../third_party/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:324: CHIP Error 0x00000032: Timeout + [1663841939.843550][13897:13897] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) + [1663841939.843617][13897:13897] CHIP:DL: Inet Layer shutdown + [1663841939.843673][13897:13897] CHIP:DL: BLE shutdown + [1663841939.843727][13897:13897] CHIP:DL: System Layer shutdown + [1663841939.844009][13897:13897] CHIP:TOO: Run command failure: ../../examples/chip-tool/commands/pairing/PairingCommand.cpp:151: CHIP Error 0x00000003: Incorrect state disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml index f6e9305e1e9a14..88151eae936eef 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml @@ -97,9 +97,11 @@ tests: Verify the below message in the TH_CR2(chip-tool) Log: - CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 - CHIP:TOO: Secure Pairing Failed - CHIP:TOO: Pairing Failure: ../../third_party/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:324: CHIP Error 0x00000032: Timeout + [1663842366.887733][13938:13938] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) + [1663842366.887797][13938:13938] CHIP:DL: Inet Layer shutdown + [1663842366.887851][13938:13938] CHIP:DL: BLE shutdown + [1663842366.887905][13938:13938] CHIP:DL: System Layer shutdown + [1663842366.888154][13938:13938] CHIP:TOO: Run command failure: ../../examples/chip-tool/commands/common/CHIPCommand.cpp:454: CHIP Error 0x00000032: Timeout disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_10.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_10.yaml index 28bdf63ef0a90f..ce5269763799ba 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_10.yaml @@ -30,7 +30,7 @@ tests: NOTE: https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/linux#readme Events to be executed as following 1. Compile app using below command in connectedhomeip folder - a. ./scripts/run_in_build_env.sh ./scripts/build/build_examples.py --target linux-arm64-all-clusters-no-ble-asan-clang build + a. ./scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target linux-arm64-all-clusters-no-ble-asan-clang build" 2. Build respective app (lock-app) 3. Commission DUT to TH 4. Open 2nd terminal of DUT and provide the below command to obtain PID of DUT diff --git a/src/app/tests/suites/certification/Test_TC_IDM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_2_1.yaml index 1fe257aa36c8ad..56abae9e8e9738 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_2_1.yaml @@ -870,15 +870,9 @@ tests: ./chip-tool any read-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF - The message flow can expect as mentioned below - TH(all-clusters-app) -> DUT(chip-tool) ReadRequest - DUT(chip-tool) -> TH(all-clusters-app) ReportData, not last chunk - TH (all-clusters-app)-> DUT(chip-tool) StatusResponse - Possibly DUT and TH repeat itself steps 2 & 3 a few times - DUT(chip-tool) -> TH(all-clusters-app) ReportData, last chunk, SuppressResponse set to true - TH(all-clusters-app) -> DUT(chip-tool) standalone ack - - From TH(all-clusters-app) will send read request to DUT(chip-tool), Then DUT(chip-tool) will send the report data message for the request which sent from TH(All-clusters-app), this report message keep on generating the report data until it reaches the last chuck message and for last chunk message DUT(chip-tool) will not get status response message + + From TH(all-clusters-app) will send read request to DUT(chip-tool), Then DUT(chip-tool) will send the report data message for the request which sent from TH(All-clusters-app), this report message keep on generating the report data until it reaches the last chuck message and for last chunk message TH(all-clusters-app) will not receive any status response. + [1663148506.794519][39604:39604] CHIP:EM: Removed CHIP MessageCounter:119127068 from RetransTable on exchange 23857r [1663148506.794525][39604:39604] CHIP:DMG: StatusResponseMessage = [1663148506.794527][39604:39604] CHIP:DMG: { diff --git a/src/app/tests/suites/certification/Test_TC_IDM_2_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_2_2.yaml index c968217d885833..f5aeaeeba553fd 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_2_2.yaml @@ -419,7 +419,7 @@ tests: verification: | DUT implementation required to verify read an attribute of data type Float - If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "Not Applicable" + If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "\Not Applicable\" disabled: true - label: @@ -581,7 +581,7 @@ tests: which is not readable. DUT responds with the report data action." verification: | DUT implementation required to verify read an attribute which is not having a read access - If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "Not Applicable" + If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "\Not Applicable\" disabled: true - label: @@ -654,7 +654,7 @@ tests: With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to send below mentioned command to Grant access to all clusters again. - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode":2, "subjects":[112233], "targets":null}]' 1 0 + ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode":2, "subjects":[112233], "targets":null}]" 1 0 disabled: true - label: @@ -721,9 +721,11 @@ tests: [1653633746.448576][9791:9796] CHIP:TOO: identify time: 0 [1653633746.448656][9791:9796] CHIP:EM: Sending Standalone Ack for MessageCounter:16255130 on exchange 13134i - Verify on TH(chip-tool) that DUT should not send a report data action with the attribute value to the TH + TH sends a below mentioned second read request to the same cluster with the DataVersionFilter Field set with the dataversion value received before. sudo ./chip-tool identify read identify-time 1 1 --data-version 0xd7cb76c6 + Verify on TH(chip-tool) that DUT should not send a report data action with the attribute value to the TH + [1653633771.729259][9806:9811] CHIP:DMG: ReportDataMessage = [1653633771.729282][9806:9811] CHIP:DMG: { [1653633771.729305][9806:9811] CHIP:DMG: SuppressResponse = true, @@ -787,7 +789,7 @@ tests: [1653633154.992480][9645:9650] CHIP:DMG: }, [1653633154.992499][9645:9650] CHIP:DMG: - + TH sends a below mentioned second read request to read an attribute from the same cluster with the DataVersionFilter Field set with the dataversion value received before, and verify that DUT should send a report data action with the attribute value to the TH. sudo ./chip-tool identify read identify-time 1 1 --data-version 0xd7cb76c3 [1653633215.246620][9664:9669] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 3620435654 @@ -863,6 +865,8 @@ tests: [1653634024.367404][9851:9856] CHIP:DMG: } [1653634024.367443][9851:9856] CHIP:DMG: WriteClient moving to [AwaitingDe] + TH sends a second read request to read all the attributes from the same cluster with the DataVersionFilter Field set with the dataversion value received before and verify that + DUT should send a report data action with all the attribute values to the TH. sudo ./chip-tool any read-by-id 0x03 0xFFFFFFFF 1 1 --data-version 0xd7cb76c6 @@ -911,6 +915,9 @@ tests: [1653634213.984086][9909:9914] CHIP:TOO: identify time: 0 [1653634213.984156][9909:9914] CHIP:EM: Sending Standalone Ack for MessageCounter:1385351 on exchange 48030i + + TH sends a below mentioned read request to the same cluster to read any attribute with the right DataVersion(received in the previous step) and also an older DataVersion. + The Read Request Message should have 2 DataVersionIB filters and verify that DUT should send a report data action with the attribute value to the TH. sudo ./chip-tool identify read identify-type 1 1 --data-version 0xd7cb76cc,0xd7cb76c9 [1653634371.474553][9936:9941] CHIP:DMG: ReportDataMessage = @@ -1037,7 +1044,7 @@ tests: PICS: MCORE.IDM.S.LargeData verification: | DUT implementation required to verify read an attribute which is is larger than 1 MTU(1280 bytes) - If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "Not Applicable" + If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "\Not Applicable\" disabled: true - label: @@ -1094,7 +1101,7 @@ tests: To Setup the TH(chip-tool) such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command Here by sending below mentioned ACL command giving only access for ACL cluster(31), So except ACL cluster command if try to send any other command will get status as unsupported access - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects":[1,112233], "targets": [{ "cluster":31, "endpoint":0, "deviceType":null }]}]' 1 0 + ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects":[1,112233], "targets": [{ "cluster":31, "endpoint":0, "deviceType":null }]}]" 1 0 [1659419722.669629][1915:1920] CHIP:DMG: WriteResponseMessage = [1659419722.669657][1915:1920] CHIP:DMG: { [1659419722.669687][1915:1920] CHIP:DMG: AttributeStatusIBs = @@ -1193,7 +1200,7 @@ tests: With the above command, we are overwriting the default privilege that chip-tool has as an admin. After this test step you need to send below mentioned command to Grant access to all clusters again. - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode":2, "subjects":[112233], "targets":null}]' 1 0 + ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode":2, "subjects":[112233], "targets":null}]" 1 0 disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_IDM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_3_2.yaml index 2e999ee455cd07..b3e9be24ab838d 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_3_2.yaml @@ -219,7 +219,7 @@ tests: verification: | DUT implementation required to verify write an attribute of data type signed integer. - If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "Not Applicable" + If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "\Not Applicable\" disabled: true - label: @@ -229,7 +229,7 @@ tests: verification: | DUT implementation required to verify write an attribute of data type float - If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "Not Applicable" + If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "\Not Applicable\" disabled: true - label: @@ -239,7 +239,7 @@ tests: verification: | DUT implementation required to verify write an attribute of data type Octet String - If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "Not Applicable" + If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "\Not Applicable\" disabled: true - label: @@ -249,7 +249,7 @@ tests: verification: | DUT implementation required to verify write an attribute ofdata type Struct - If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "Not Applicable" + If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "\Not Applicable\" disabled: true - label: @@ -259,7 +259,7 @@ tests: verification: | DUT implementation required to verify write an attribute of data type List - If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "Not Applicable" + If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "\Not Applicable\" disabled: true - label: @@ -732,7 +732,7 @@ tests: [1653028897.526687][6605:6611] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0011 DataVersion: 3301562286 [1653028897.526763][6605:6611] CHIP:TOO: on level: 2 - + TH sends below mentioned WriteRequestMessage to the DUT to modify the value of one attribute with the DataVersion field set to the one received in the prior step. ./chip-tool levelcontrol write on-level 3 1 1 --data-version 0xc4c9d7ae On TH, verify that DUT sends a Write Response message with a success @@ -803,7 +803,7 @@ tests: [1653029055.885209][6643:6648] CHIP:DMG: }, [1653029055.885219][6643:6648] CHIP:DMG: - + TH sends below mentioned second WriteRequestMessage to the DUT to modify the value of an attribute with the dataversion field set to the value received earlier. ./chip-tool levelcontrol write on-level 4 1 1 --data-version 0xc4c9d7af on TH, verify that DUT responds as DATA_VERSION_MISMATCH for the second Write request. @@ -842,5 +842,5 @@ tests: verification: | DUT implementation required to verify write an attribute which need NEEDS_TIMED_INTERACTION. - If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "Not Applicable" + If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "\Not Applicable\" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_4_3.yaml b/src/app/tests/suites/certification/Test_TC_IDM_4_3.yaml index 4a10b805110959..a12cdf8850d5fa 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_4_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_4_3.yaml @@ -461,7 +461,7 @@ tests: Subscribe to an attribute of type signed integer to the Harness - If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "Not Applicable" + If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "\Not Applicable\" disabled: true - label: @@ -475,7 +475,7 @@ tests: Subscribe to an attribute of type floating point to the Harness - If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "Not Applicable" + If the Vendor DUT doesn"t implement/supported this attribute, Please mark the test step as "\Not Applicable\" disabled: true - label: @@ -502,7 +502,6 @@ tests: here is an example command the TH can write an attribute in the userlabel cluster in the DUT to change the value that the TH subscribed in the above command. userlabel write label-list '[{"label":"room", "value":"bedroom 1"}, {"label":"orientation", "value":"east"}]' 1 0 - ./chip-tool userlabel subscribe label-list 100 500 1 0 [1655896422.936972][1899:1904] CHIP:DMG: } [1655896422.937347][1899:1904] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0041 Attribute 0x0000_0000 DataVersion: 3773922728 [1655896422.937478][1899:1904] CHIP:TOO: label list: 2 entries @@ -727,40 +726,49 @@ tests: onoff subscribe on-time 100 1000 1 1 - On TH(chip-tool) Verify that the DUT sends a Report Data action and There are no attribute value changes before MaxInterval elapses. - [1657453718.436970][11635:11640] CHIP:DMG: ReportDataMessage = - [1657453718.437043][11635:11640] CHIP:DMG: { - [1657453718.437108][11635:11640] CHIP:DMG: SubscriptionId = 0xce00f651, - [1657453718.437174][11635:11640] CHIP:DMG: AttributeReportIBs = - [1657453718.437253][11635:11640] CHIP:DMG: [ - [1657453718.437315][11635:11640] CHIP:DMG: AttributeReportIB = - [1657453718.437403][11635:11640] CHIP:DMG: { - [1657453718.437473][11635:11640] CHIP:DMG: AttributeDataIB = - [1657453718.437550][11635:11640] CHIP:DMG: { - [1657453718.437632][11635:11640] CHIP:DMG: DataVersion = 0x1979c38, - [1657453718.437711][11635:11640] CHIP:DMG: AttributePathIB = - [1657453718.437790][11635:11640] CHIP:DMG: { - [1657453718.437883][11635:11640] CHIP:DMG: Endpoint = 0x1, - [1657453718.437974][11635:11640] CHIP:DMG: Cluster = 0x6, - [1657453718.438063][11635:11640] CHIP:DMG: Attribute = 0x0000_4001, - [1657453718.438145][11635:11640] CHIP:DMG: } - [1657453718.438224][11635:11640] CHIP:DMG: - [1657453718.438318][11635:11640] CHIP:DMG: Data = 0, - [1657453718.438393][11635:11640] CHIP:DMG: }, - [1657453718.438483][11635:11640] CHIP:DMG: - [1657453718.438551][11635:11640] CHIP:DMG: }, - [1657453718.438626][11635:11640] CHIP:DMG: - [1657453718.438686][11635:11640] CHIP:DMG: ], - [1657453718.438760][11635:11640] CHIP:DMG: - [1657453718.438821][11635:11640] CHIP:DMG: InteractionModelRevision = 1 - [1657453718.438884][11635:11640] CHIP:DMG: } - [1657453718.439091][11635:11640] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 26713144 - [1657453718.439173][11635:11640] CHIP:TOO: OnTime: 0 - [1657453718.439260][11635:11640] CHIP:DMG: MoveToState ReadClient[0xffff94005970]: Moving to [AwaitingSu] - - here is an example command the TH can write an attribute in the onoff cluster in the DUT to change the value that the TH subscribed in the above command. - onoff write on-time 1 1 1 - There are no attribute value changes before MaxInterval elapses + On TH(chip-tool) Verify that the DUT sends a Report Data action with no data and There are no attribute value changes before MaxInterval elapses. + [1663737332.441587][143123:143128] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 807738967 + [1663737332.441608][143123:143128] CHIP:TOO: OnTime: 0 + [1663737332.441624][143123:143128] CHIP:DMG: MoveToState ReadClient[0x7f7afc026d10]: Moving to [AwaitingSu] + [1663737332.441656][143123:143128] CHIP:EM: <<< [E:57594i M:195529658 (Ack:189815301)] (S) Msg TX to 1:0000000000000001 [730F] --- Type 0001:01 (IM:StatusResponse) + [1663737332.441668][143123:143128] CHIP:IN: (S) Sending msg 195529658 on secure session with LSID: 48157 + [1663737332.442019][143123:143128] CHIP:EM: >>> [E:57594i M:189815302 (Ack:195529658)] (S) Msg RX from 1:0000000000000001 [730F] --- Type 0001:04 (IM:SubscribeResponse) + [1663737332.442045][143123:143128] CHIP:EM: Found matching exchange: 57594i, Delegate: 0x7f7afc026d20 + [1663737332.442062][143123:143128] CHIP:EM: Rxd Ack; Removing MessageCounter:195529658 from Retrans Table on exchange 57594i + [1663737332.442076][143123:143128] CHIP:DMG: SubscribeResponse is received + [1663737332.442093][143123:143128] CHIP:DMG: SubscribeResponseMessage = + [1663737332.442101][143123:143128] CHIP:DMG: { + [1663737332.442109][143123:143128] CHIP:DMG: SubscriptionId = 0xb98ba037, + [1663737332.442117][143123:143128] CHIP:DMG: MaxInterval = 0x64, + [1663737332.442124][143123:143128] CHIP:DMG: InteractionModelRevision = 1 + [1663737332.442131][143123:143128] CHIP:DMG: } + [1663737332.442140][143123:143128] CHIP:DMG: Subscription established with SubscriptionID = 0xb98ba037 MinInterval = 10s MaxInterval = 100s Peer = 01:0000000000000001 + [1663737332.442152][143123:143128] CHIP:DMG: MoveToState ReadClient[0x7f7afc026d10]: Moving to [Subscripti] + [1663737332.442180][143123:143128] CHIP:DMG: Refresh LivenessCheckTime for 125000 milliseconds with SubscriptionId = 0xb98ba037 Peer = 01:0000000000000001 + [1663737332.442218][143123:143128] CHIP:EM: <<< [E:57594i M:195529659 (Ack:189815302)] (S) Msg TX to 1:0000000000000001 [730F] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1663737332.442236][143123:143128] CHIP:IN: (S) Sending msg 195529659 on secure session with LSID: 48157 + [1663737332.442293][143123:143128] CHIP:EM: Flushed pending ack for MessageCounter:189815302 on exchange 57594i + [1663737432.513952][143123:143128] CHIP:EM: >>> [E:46530r M:189815303] (S) Msg RX from 1:0000000000000001 [730F] --- Type 0001:05 (IM:ReportData) + [1663737432.513994][143123:143128] CHIP:EM: Handling via exchange: 46530r, Delegate: 0x558ebddc7068 + [1663737432.514039][143123:143128] CHIP:DMG: ReportDataMessage = + [1663737432.514047][143123:143128] CHIP:DMG: { + [1663737432.514056][143123:143128] CHIP:DMG: SubscriptionId = 0xb98ba037, + [1663737432.514070][143123:143128] CHIP:DMG: InteractionModelRevision = 1 + [1663737432.514077][143123:143128] CHIP:DMG: } + [1663737432.514096][143123:143128] CHIP:DMG: Refresh LivenessCheckTime for 125000 milliseconds with SubscriptionId = 0xb98ba037 Peer = 01:0000000000000001 + [1663737432.514136][143123:143128] CHIP:EM: <<< [E:46530r M:195529660 (Ack:189815303)] (S) Msg TX to 1:0000000000000001 [730F] --- Type 0001:01 (IM:StatusResponse) + [1663737432.514151][143123:143128] CHIP:IN: (S) Sending msg 195529660 on secure session with LSID: 48157 + [1663737432.514638][143123:143128] CHIP:EM: >>> [E:46530r M:189815304 (Ack:195529660)] (S) Msg RX from 1:0000000000000001 [730F] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1663737432.514664][143123:143128] CHIP:EM: Found matching exchange: 46530r, Delegate: (nil) + [1663737432.514684][143123:143128] CHIP:EM: Rxd Ack; Removing MessageCounter:195529660 from Retrans Table on exchange 46530r + [1663737532.580214][143123:143128] CHIP:EM: >>> [E:46531r M:189815305] (S) Msg RX from 1:0000000000000001 [730F] --- Type 0001:05 (IM:ReportData) + [1663737532.580260][143123:143128] CHIP:EM: Handling via exchange: 46531r, Delegate: 0x558ebddc7068 + [1663737532.580304][143123:143128] CHIP:DMG: ReportDataMessage = + [1663737532.580317][143123:143128] CHIP:DMG: { + [1663737532.580329][143123:143128] CHIP:DMG: SubscriptionId = 0xb98ba037, + [1663737532.580341][143123:143128] CHIP:DMG: InteractionModelRevision = 1 + [1663737532.580351][143123:143128] CHIP:DMG: } + [1663737532.580380][143123:143128] CHIP:DMG: Refresh LivenessCheckTime for 125000 milliseconds with SubscriptionId = 0xb98ba037 Peer = 01:0000000000000001 disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml index e5651a7e5bf8e1..53dbe35abb6f9d 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml @@ -857,14 +857,6 @@ tests: [1655979596.079069][4557:4562] CHIP:DMG: Subscription established with SubscriptionID = 0x6a61af41 MinInterval = 20s MaxInterval = 400s Peer = 01:0000000000000001 disabled: true - - label: - "TH sends Subscribe Request Message to DUT. DUT sends Report Data - message to DUT + TH sends Status Response Message with an error - Status." - verification: | - Mark this as not testable /NA. Out of Scope for V1.0 - disabled: true - - label: "TH sends Subscribe Request Message to DUT with EventRequests set to path which indicates a cluster event that is not supported." @@ -928,7 +920,7 @@ tests: With the ACL command in step-2, we are overwriting the default privilege that chip-tool has an admin. After this step-3 you need to send below mentioned command to Grant access to all clusters again. - accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode":2, "subjects":[112233], "targets":null}]" 1 0 + accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode":2, "subjects":[112233], "targets":null}]' 1 0 disabled: true - label: @@ -942,7 +934,7 @@ tests: To Setup the TH such that there is no accessing fabric, 1st we need to send below mentioned ACL command - accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [1234], "targets": null}]' 1 0 + accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [1234], "targets": null}]" 1 0 any subscribe-event-by-id 0xFFFFFFFF 0xFFFFFFFF 100 1000 1 0xFFFF @@ -1103,70 +1095,6 @@ tests: [1655979915.866116][4607:4612] CHIP:TOO: AdminFabricIndex: 1 [1655979915.866148][4607:4612] CHIP:TOO: } [1655979915.866233][4607:4612] CHIP:DMG: MoveToState ReadClient[0xffffa0005710]: Moving to [AwaitingSu] - - [1655979915.863156][4607:4612] CHIP:DMG: ReportDataMessage = - [1655979915.863196][4607:4612] CHIP:DMG: { - [1655979915.863232][4607:4612] CHIP:DMG: SubscriptionId = 0xeb39dedd, - [1655979915.863268][4607:4612] CHIP:DMG: EventReportIBs = - [1655979915.863321][4607:4612] CHIP:DMG: [ - [1655979915.863357][4607:4612] CHIP:DMG: EventReportIB = - [1655979915.863412][4607:4612] CHIP:DMG: { - [1655979915.863450][4607:4612] CHIP:DMG: EventDataIB = - [1655979915.863496][4607:4612] CHIP:DMG: { - [1655979915.863538][4607:4612] CHIP:DMG: EventPath = - [1655979915.863586][4607:4612] CHIP:DMG: { - [1655979915.863636][4607:4612] CHIP:DMG: Endpoint = 0x0, - [1655979915.863692][4607:4612] CHIP:DMG: Cluster = 0x1f, - [1655979915.863743][4607:4612] CHIP:DMG: Event = 0x0, - [1655979915.863790][4607:4612] CHIP:DMG: }, - [1655979915.863845][4607:4612] CHIP:DMG: - [1655979915.863892][4607:4612] CHIP:DMG: EventNumber = 0x1, - [1655979915.863942][4607:4612] CHIP:DMG: PriorityLevel = 0x1, - [1655979915.863990][4607:4612] CHIP:DMG: SystemTimestamp = 0x4bdb01, - [1655979915.864036][4607:4612] CHIP:DMG: EventData = - [1655979915.864083][4607:4612] CHIP:DMG: { - [1655979915.864149][4607:4612] CHIP:DMG: 0x1 = NULL - [1655979915.864201][4607:4612] CHIP:DMG: 0x2 = 0, - [1655979915.864252][4607:4612] CHIP:DMG: 0x3 = 1, - [1655979915.864300][4607:4612] CHIP:DMG: 0x4 = - [1655979915.864348][4607:4612] CHIP:DMG: { - [1655979915.864399][4607:4612] CHIP:DMG: 0x1 = 5, - [1655979915.864454][4607:4612] CHIP:DMG: 0x2 = 2, - [1655979915.864505][4607:4612] CHIP:DMG: 0x3 = [ - [1655979915.864571][4607:4612] CHIP:DMG: 112233, - [1655979915.864631][4607:4612] CHIP:DMG: ], - [1655979915.864685][4607:4612] CHIP:DMG: 0x4 = NULL - [1655979915.864738][4607:4612] CHIP:DMG: 0xfe = 1, - [1655979915.864791][4607:4612] CHIP:DMG: }, - [1655979915.864841][4607:4612] CHIP:DMG: 0xfe = 1, - [1655979915.864889][4607:4612] CHIP:DMG: }, - [1655979915.864934][4607:4612] CHIP:DMG: }, - [1655979915.864989][4607:4612] CHIP:DMG: - [1655979915.865025][4607:4612] CHIP:DMG: }, - [1655979915.865076][4607:4612] CHIP:DMG: - [1655979915.865111][4607:4612] CHIP:DMG: ], - [1655979915.865163][4607:4612] CHIP:DMG: - [1655979915.865198][4607:4612] CHIP:DMG: InteractionModelRevision = 1 - [1655979915.865232][4607:4612] CHIP:DMG: } - [1655979915.865462][4607:4612] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 - [1655979915.865497][4607:4612] CHIP:TOO: Event number: 1 - [1655979915.865530][4607:4612] CHIP:TOO: Priority: Info - [1655979915.865562][4607:4612] CHIP:TOO: Timestamp: 4971265 - [1655979915.865683][4607:4612] CHIP:TOO: AccessControlEntryChanged: { - [1655979915.865720][4607:4612] CHIP:TOO: AdminNodeID: null - [1655979915.865767][4607:4612] CHIP:TOO: AdminPasscodeID: 0 - [1655979915.865802][4607:4612] CHIP:TOO: ChangeType: 1 - [1655979915.865835][4607:4612] CHIP:TOO: LatestValue: { - [1655979915.865867][4607:4612] CHIP:TOO: Privilege: 5 - [1655979915.865899][4607:4612] CHIP:TOO: AuthMode: 2 - [1655979915.865939][4607:4612] CHIP:TOO: Subjects: 1 entries - [1655979915.865981][4607:4612] CHIP:TOO: [1]: 112233 - [1655979915.866018][4607:4612] CHIP:TOO: Targets: null - [1655979915.866052][4607:4612] CHIP:TOO: FabricIndex: 1 - [1655979915.866084][4607:4612] CHIP:TOO: } - [1655979915.866116][4607:4612] CHIP:TOO: AdminFabricIndex: 1 - [1655979915.866148][4607:4612] CHIP:TOO: } - [1655979915.866233][4607:4612] CHIP:DMG: MoveToState ReadClient[0xffffa0005710]: Moving to [AwaitingSu] disabled: true - label: @@ -1205,7 +1133,7 @@ tests: Please run this test in chip tool interactive mode ./chip-tool interactive start - accesscontrol subscribe-event access-control-entry-changed 20 500 1 0 + accesscontrol subscribe-event access-control-entry-changed 20 500 1 0 --keepSubscriptions 1 On TH(chip-tool) verify that each event number [1658405014.975407][4236:4241] CHIP:DMG: } [1658405014.975582][4236:4241] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 diff --git a/src/app/tests/suites/certification/Test_TC_IDM_7_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_7_1.yaml index 187cbc0963b239..b48bfba1e276e8 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_7_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_7_1.yaml @@ -35,39 +35,30 @@ tests: Use the below commands to provision the DUT with 5 reference devices (Reference device is unique instance of a Chip-tool) RD1, RD2, RD3, RD4, RD5 should be on separate, distinct fabrics. in RPI platform - * For ethernet provisioning in DUT + execute the below mentioned command to put DUT into a commissionable state, Pls use equivalent command on the respective DUT ./chip-all-clusters-app + Once DUT reach the commissionable state pls send below mentioned command on RD"s respectively. Pls use equivalent command on the respective DUT + + *Provision the device using chip tool on first controller(RD1) - *./chip-tool pairing ethernet node-id setup-pin-code discriminator device-remote-ip device-remote-port(5540) - on first controller open a commissioning window using below command (In RD1) - ./chip-tool pairing open-commissioning-window 1 1 400 2000 3840 (Save the manualcode for 2nd Provision) + ./chip-tool pairing onnetwork 1 20202021 + ./chip-tool pairing open-commissioning-window 1 1 400 2000 3840 *Provision the device using chip tool on 2nd controller(RD2) - * ./chip-tool pairing code 2 mannualcode –commissioner name beta - on 2nd controller open a commissioning window using below command (In RD2) - ./chip-tool pairing open-commissioning-window 2 1 400 2000 3840 ( Save the manualcode for 3rd Provision) - + ./chip-tool pairing code 2 36453420312(mannualcode) --commissioner-name beta + ./chip-tool pairing open-commissioning-window 2 1 400 2000 3840 --commissioner-name beta *Provision the device using chip tool on 3rd controller(RD3) - * ./chip-tool pairing code 3 mannualcode –commissioner name gamma - on 3rd controller open a commissioning window using below command (In RD3) - ./chip-tool pairing open-commissioning-window 2 1 400 2000 3840 ( Save the manualcode for 4th Provision) + ./chip-tool pairing code 3 35603352859(mannualcode) --commissioner-name 4 + ./chip-tool pairing open-commissioning-window 3 1 400 2000 3840 --commissioner-name 4 *Provision the device using chip tool on 4th controller(RD4) - * ./chip-tool pairing code 4 mannualcode –commissioner name 234 - on 3rd controller open a commissioning window using below command (In RD4) - ./chip-tool pairing open-commissioning-window 2 1 400 2000 3840 ( Save the manualcode for 5th Provision) + ./chip-tool pairing code 4 36375333175(mannualcode) --commissioner-name 5 + ./chip-tool pairing open-commissioning-window 4 1 400 2000 3840 --commissioner-name 5 *Provision the device using chip tool on 5th controller(RD5) - * ./chip-tool pairing code 5 mannualcode –commissioner name 2345 - on 3rd controller open a commissioning window using below command (In RD5) - ./chip-tool pairing open-commissioning-window 2 1 400 2000 3840 - - - Please open 5 terminal windows to observe the subscription report messages coming from different subscriptions(to different fabrics) - - Please use Interactive mode to Verify subscription test cases. Here the command to enter interactive mode:-- ./chip-tool interactive start + ./chip-tool pairing code 5 35358158796(mannualcode) --commissioner-name 6 disabled: true - label: @@ -431,7 +422,7 @@ tests: - basic subscribe local-config-disabled 100 1000 5 0 --commissioner-name beta --keepSubscriptions 1 + basic subscribe local-config-disabled 100 1000 5 0 --commissioner-name 6 --keepSubscriptions 1 : } [1660653545.651601][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3782190838 [1660653545.651636][58149:58154] CHIP:TOO: LocalConfigDisabled: FALSE @@ -775,6 +766,8 @@ tests: contain 3 different paths. The subscription request from RD1 should contain 4 paths." verification: | + After provisioning again the values are been set to default values such as node label= " ". so in VS mentioned as node-label="", location=XX and local-config-disabled=FALSE but if your going to verify 3 steps contentiously you will get the attribute value as node-label="newlabel", location=in and local-config-disabled=TRUE. + Please run this test in chip tool interactive mode ./chip-tool interactive start Example commands given below are using 5 reference devices (User can use 5 reference devices and send the below command in from each reference device) @@ -1074,7 +1067,7 @@ tests: - basic subscribe local-config-disabled 100 1000 5 0 --commissioner-name beta --keepSubscriptions 1 + basic subscribe local-config-disabled 100 1000 5 0 --commissioner-name 6 --keepSubscriptions 1 : } [1660653545.651601][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3782190838 [1660653545.651636][58149:58154] CHIP:TOO: LocalConfigDisabled: FALSE @@ -1096,6 +1089,8 @@ tests: Requests are activated, RD1 sends 6 subscription request messages with each of them having 3 different paths." verification: | + After provisioning again the values are been set to default values such as node label= " ". so in VS mentioned as node-label="", location=XX and local-config-disabled=FALSE but if your going to verify 3 steps contentiously you will get the attribute value as node-label="newlabel", location=in and local-config-disabled=TRUE. + Please run this test in chip tool interactive mode ./chip-tool interactive start Example commands given below are using 5 reference devices (User can use 5 reference devices and send the below command in from each reference device) @@ -1328,7 +1323,7 @@ tests: - basic subscribe local-config-disabled 100 1000 5 0 --commissioner-name beta --keepSubscriptions 1 + basic subscribe local-config-disabled 100 1000 5 0 --commissioner-name 6 --keepSubscriptions 1 : } [1660653545.651601][58149:58154] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3782190838 [1660653545.651636][58149:58154] CHIP:TOO: LocalConfigDisabled: FALSE diff --git a/src/app/tests/suites/certification/Test_TC_SC_5_1.yaml b/src/app/tests/suites/certification/Test_TC_SC_5_1.yaml index f5822dcf2ced11..016040397ad665 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_5_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_5_1.yaml @@ -26,8 +26,6 @@ tests: - label: "Precondition" verification: | Group Member is commissioned with Admin - - DUT will set TestGroupEndpoint disabled: true - label: "TH writes ACL entry by setting AuthMode as Group to DUT" @@ -55,11 +53,7 @@ tests: "Admin sends KeySetWrite command to GroupKeyManagement cluster to DUT on PIXIT.G.ENDPOINT" verification: | - ./chip-tool groupkeymanagement key-set-write "{"groupKeySetID": 42, - "groupKeySecurityPolicy": 0, "epochKey0": - "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": - "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": - "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }" 1 0 + ./chip-tool groupkeymanagement key-set-write "{"groupKeySetID": 42,"groupKeySecurityPolicy": 0, "epochKey0":"d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1":"d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2":"d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }" 1 0 Verify success response on the TH Log: @@ -123,8 +117,8 @@ tests: disabled: true - label: - "Admin sends AddGroup Command to DUT with the GroupID set by Admin on - PIXIT.SC.ENDPOINT" + "Admin sends AddGroup Command to DUT with the GroupID and GroupName + set by Admin on PIXIT.G.ENDPOINT" verification: | ./chip-tool groups add-group 0x0001 grp1 1 1 @@ -139,7 +133,24 @@ tests: - label: "Admin sends ViewGroup command with the GroupID to the Group cluster - on the DUT on PIXIT.SC.ENDPOINT" + on the DUT on PIXIT.G.ENDPOINT" + verification: | + ./chip-tool groups view-group 0x0001 1 1 + + Verify ViewGroupResponse on the TH Log: + + [1651218576.149152][2635:2640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0001 + [1651218576.149231][2635:2640] CHIP:TOO: ViewGroupResponse: { + [1651218576.149265][2635:2640] CHIP:TOO: status: 0 + [1651218576.149289][2635:2640] CHIP:TOO: groupId: 1 + [1651218576.149311][2635:2640] CHIP:TOO: groupName: grp1 + [1651218576.149335][2635:2640] CHIP:TOO: } + disabled: true + + - label: + "Verify DUT sends a ViewGroupResponse command with the same GroupName + created by Admin in step 1b." + PICS: G.S.F00 verification: | ./chip-tool groups view-group 0x0001 1 1 @@ -203,9 +214,28 @@ tests: [1655965817.917408][3012:3017] CHIP:TOO: GroupTable: 1 entries [1655965817.917506][3012:3017] CHIP:TOO: [1]: { [1655965817.917559][3012:3017] CHIP:TOO: GroupId: 1 - [1655965817.917600][3012:3017] CHIP:TOO: Endpoints: 2 entries - [1655965817.917642][3012:3017] CHIP:TOO: [1]: 0 - [1655965817.917680][3012:3017] CHIP:TOO: [2]: 1 + [1655965817.917600][3012:3017] CHIP:TOO: Endpoints: 1 entries + [1655965817.917680][3012:3017] CHIP:TOO: [1]: 1 + [1655965817.917718][3012:3017] CHIP:TOO: GroupName: grp1 + [1655965817.917752][3012:3017] CHIP:TOO: FabricIndex: 1 + [1655965817.917784][3012:3017] CHIP:TOO: } + disabled: true + + - label: + "Verify each returned GroupInfoMapStruct contains an expected + GroupName as generated in step 1b." + PICS: G.S.F00 + verification: | + ./chip-tool groupkeymanagement read group-table 1 0 + + Verify GroupTable on the TH Log: + + [1655965817.917300][3012:3017] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 1208492408 + [1655965817.917408][3012:3017] CHIP:TOO: GroupTable: 1 entries + [1655965817.917506][3012:3017] CHIP:TOO: [1]: { + [1655965817.917559][3012:3017] CHIP:TOO: GroupId: 1 + [1655965817.917600][3012:3017] CHIP:TOO: Endpoints: 1 entries + [1655965817.917680][3012:3017] CHIP:TOO: [1]: 1 [1655965817.917718][3012:3017] CHIP:TOO: GroupName: grp1 [1655965817.917752][3012:3017] CHIP:TOO: FabricIndex: 1 [1655965817.917784][3012:3017] CHIP:TOO: } diff --git a/src/app/tests/suites/certification/Test_TC_SC_5_2.yaml b/src/app/tests/suites/certification/Test_TC_SC_5_2.yaml index a8297b8947d345..b18c8837d30bd9 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_5_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_5_2.yaml @@ -37,7 +37,7 @@ tests: - label: "TH sends a multicast Identify command with the IdentifyTime set to - 0x0078 (120s) to DUT with GroupID and PIXIT.SC.ENDPOINT" + 0x0078 (120s) to DUT with GroupID and PIXIT.G.ENDPOINT" PICS: I.S.C00.Rsp verification: | ./chip-tool identify identify 0x0078 0xffffffffffff0001 1 @@ -50,7 +50,7 @@ tests: - label: "TH reads immediately IdentifyTime attribute from DUT on the - PIXIT.SC.ENDPOINT set by DUT" + PIXIT.G.ENDPOINT set by DUT" PICS: I.S.A0000 verification: | ./chip-tool identify read identify-time 1 1 diff --git a/src/app/tests/suites/certification/Test_TC_SC_6_1.yaml b/src/app/tests/suites/certification/Test_TC_SC_6_1.yaml index 58537af164efd0..ef8f9139a39aa8 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_6_1.yaml @@ -31,8 +31,20 @@ tests: - label: "Precondition" verification: | Group Member is commissioned with Admin + disabled: true + + - label: "Precondition" + verification: | + Execute this step before executing the test steps. + + ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null },{"fabricIndex": 1, "privilege": 4, "authMode": 3, "subjects": [1], "targets": null }]" 1 0 + + Verify success response on the TH Log: - TH will set TestGroupEndpoint + [1652330385.328196][3240:3245] CHIP:DMG: StatusIB = + [1652330385.328229][3240:3245] CHIP:DMG: { + [1652330385.328264][3240:3245] CHIP:DMG: status = 0x00 (SUCCESS), + [1652330385.328298][3240:3245] CHIP:DMG: }, disabled: true - label: "TH should have the ACL entry with the AuthMode as Group by DUT" @@ -130,7 +142,7 @@ tests: - label: "DUT sends KeySetWrite command to GroupKeyManagement cluster to TH on - PIXIT.SC.ENDPOINT" + PIXIT.G.ENDPOINT" PICS: GRPKEY.C.C00.Tx verification: | @@ -195,7 +207,7 @@ tests: [1659350562.022661][5824:5824] CHIP:DMG: AccessControl: allowed disabled: true - - label: "DUT sends AddGroup Command to TH on PIXIT.SC.ENDPOINT" + - label: "DUT sends AddGroup Command to TH on PIXIT.G.ENDPOINT" PICS: G.C.C00.Tx verification: | ./chip-tool groups add-group 0x0001 grp1 1 0 From 977cfa4501159dd9b1600857eed858c693a1ba2a Mon Sep 17 00:00:00 2001 From: Carter Swedal Date: Fri, 23 Sep 2022 13:31:05 -0500 Subject: [PATCH 15/19] Fix Switch and MediaPlayback feature map zcl definitions (#22804) * Add MediaPlayback feature map to zcl xml definition Fixes Issue #22681 * Link SwitchFeature to cluster for zap tool usage Fixes Issue #22802 * Zap regeneration for MediaPlayback and Switch Featuremap addition --- .../all-clusters-common/all-clusters-app.matter | 13 +++++++++++++ .../all-clusters-minimal-app.matter | 13 +++++++++++++ .../bridge-app/bridge-common/bridge-app.matter | 8 ++++++++ ...oip_rootnode_dimmablelight_bCwGYSDpoe.matter | 8 ++++++++ .../rootnode_contactsensor_lFAGG1bfRO.matter | 8 ++++++++ .../rootnode_dimmablelight_bCwGYSDpoe.matter | 8 ++++++++ .../devices/rootnode_doorlock_aNKYAreMXE.matter | 8 ++++++++ ...ootnode_extendedcolorlight_8lcaaYJVAa.matter | 8 ++++++++ .../chef/devices/rootnode_fan_7N2TobIlOX.matter | 8 ++++++++ .../rootnode_flowsensor_1zVxHedlaV.matter | 8 ++++++++ ...ootnode_heatingcoolingunit_ncdGai1E5a.matter | 8 ++++++++ .../rootnode_humiditysensor_Xyj4gda6Hb.matter | 8 ++++++++ .../rootnode_lightsensor_lZQycTFcJK.matter | 8 ++++++++ .../rootnode_occupancysensor_iHyVgifZuo.matter | 8 ++++++++ .../rootnode_onofflight_bbs1b7IaOV.matter | 8 ++++++++ .../rootnode_onofflightswitch_FsPlMr090Q.matter | 8 ++++++++ .../rootnode_onoffpluginunit_Wtf8ss5EBY.matter | 8 ++++++++ .../rootnode_pressuresensor_s0qC9wLH4k.matter | 8 ++++++++ .../devices/rootnode_speaker_RpzeXdimqA.matter | 8 ++++++++ ...rootnode_temperaturesensor_Qy1zkNW7c3.matter | 8 ++++++++ .../rootnode_thermostat_bm3fb8dhYi.matter | 8 ++++++++ .../rootnode_windowcovering_RLCxaGi9Yx.matter | 8 ++++++++ .../light-switch-common/light-switch-app.matter | 8 ++++++++ .../lighting-common/lighting-app.matter | 8 ++++++++ .../placeholder/linux/apps/app1/config.matter | 16 ++++++++++++++++ .../placeholder/linux/apps/app2/config.matter | 16 ++++++++++++++++ examples/tv-app/tv-common/tv-app.matter | 5 +++++ .../tv-casting-common/tv-casting-app.matter | 13 +++++++++++++ .../data-model/chip/media-playback-cluster.xml | 9 ++++++++- .../zcl/data-model/chip/switch-cluster.xml | 1 + .../data_model/controller-clusters.matter | 13 +++++++++++++ .../CHIP/zap-generated/MTRBaseClusters.h | 13 +++++++++++++ .../app-common/zap-generated/cluster-enums.h | 17 +++++++++++++++++ .../app-common/app-common/zap-generated/enums.h | 4 ++++ 34 files changed, 308 insertions(+), 1 deletion(-) 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 71da6771c0e97a..0b35b596292b5b 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 @@ -1475,6 +1475,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } @@ -3168,6 +3176,11 @@ server cluster MediaPlayback = 1286 { kBuffering = 3; } + bitmap MediaPlaybackFeature : BITMAP32 { + kAdvancedSeek = 0x1; + kVariableSpeed = 0x2; + } + readonly attribute PlaybackStateEnum currentState = 0; readonly attribute nullable epoch_us startTime = 1; readonly attribute nullable int64u duration = 2; 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 0c92be802dc55f..870ea65eb0062f 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 @@ -1326,6 +1326,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } @@ -2565,6 +2573,11 @@ server cluster MediaPlayback = 1286 { kBuffering = 3; } + bitmap MediaPlaybackFeature : BITMAP32 { + kAdvancedSeek = 0x1; + kVariableSpeed = 0x2; + } + readonly attribute PlaybackStateEnum currentState = 0; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 3baf998f23fe38..138789996e7852 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -1162,6 +1162,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index aad52328e0c617..3c465df356c2c2 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1136,6 +1136,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index 60596508a41450..e7fdaaeefdd07c 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -1015,6 +1015,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index d2f9ec77638453..c0275e21e72b66 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1270,6 +1270,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index c0b9d2c3c52d73..6cbe7a36a7fba9 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -1237,6 +1237,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index 7a4a4fb9c85575..01f2502d71adf4 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -1270,6 +1270,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index e5ae8514734a09..61ef9bfc36d9da 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -1017,6 +1017,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 34cf518f1973f6..daf54c98a7dcb0 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -1028,6 +1028,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index b46ab7cfb2dc50..e5c2a0469bdd8d 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -1263,6 +1263,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 10b6896979e97a..fcb6064dca42b2 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -1028,6 +1028,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index f808bc7b148904..c605e42d0de9ab 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -1028,6 +1028,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index a1053201d67f99..535763399d623f 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -1028,6 +1028,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index bd6b39ca2ac72c..b757b5d62b7817 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -1270,6 +1270,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index eba212420b0454..4d0ce7aee5a0e7 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -1329,6 +1329,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 9724738e878eb3..bdb631dbbdeacc 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -1176,6 +1176,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index 9efb799b9ec1dd..388979274fd065 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -1028,6 +1028,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index 12a1f4e942535e..cbf27d1f709ba0 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -1150,6 +1150,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index 66c14827159114..cebe916ff0ce95 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -1028,6 +1028,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index a6dcee8bfd7fdb..c5708822cd4483 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -1126,6 +1126,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index b6b8e3feba8740..16721a189a8ff6 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -1126,6 +1126,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 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 3dc91b42426063..f99150bd192a5f 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 @@ -1215,6 +1215,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index fc6b3778c4afaf..8cbb903d0374a0 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -1166,6 +1166,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index f3e42f939f7db1..454dcf45dbf27f 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -1122,6 +1122,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } client cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } @@ -1163,6 +1171,14 @@ client cluster Switch = 59 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index f3e42f939f7db1..454dcf45dbf27f 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -1122,6 +1122,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } client cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } @@ -1163,6 +1171,14 @@ client cluster Switch = 59 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index e2994a99611d48..0c023840dd67bf 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -1656,6 +1656,11 @@ server cluster MediaPlayback = 1286 { kBuffering = 3; } + bitmap MediaPlaybackFeature : BITMAP32 { + kAdvancedSeek = 0x1; + kVariableSpeed = 0x2; + } + struct PlaybackPosition { int64u updatedAt = 0; nullable int64u position = 1; 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 ca2b0794270265..c3164ada025632 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 @@ -1376,6 +1376,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } @@ -1741,6 +1749,11 @@ client cluster MediaPlayback = 1286 { kBuffering = 3; } + bitmap MediaPlaybackFeature : BITMAP32 { + kAdvancedSeek = 0x1; + kVariableSpeed = 0x2; + } + readonly attribute int16u clusterRevision = 65533; request struct SkipForwardRequest { diff --git a/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml index 2c9b4cc45479b1..aad4a93ee93810 100644 --- a/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml @@ -25,6 +25,7 @@ limitations under the License. true This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. + CurrentState StartTime Duration @@ -112,4 +113,10 @@ limitations under the License. - \ No newline at end of file + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml index b87d790d3b102d..512cf5b384d055 100644 --- a/src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml @@ -67,6 +67,7 @@ Interactions with the switch device are exposed as attributes (for the latching + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 88d083f391bbd8..60bd47c8466b9e 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -1700,6 +1700,14 @@ client cluster BridgedDeviceBasic = 57 { } client cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } @@ -3580,6 +3588,11 @@ client cluster MediaPlayback = 1286 { kBuffering = 3; } + bitmap MediaPlaybackFeature : BITMAP32 { + kAdvancedSeek = 0x1; + kVariableSpeed = 0x2; + } + struct PlaybackPosition { int64u updatedAt = 0; nullable int64u position = 1; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 2e6fc6dd0a061e..96ffebb92eeef9 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -19617,6 +19617,14 @@ typedef NS_ENUM(uint8_t, MTRTimeSynchronizationTimeSource) { MTRTimeSynchronizationTimeSourceGnss = 0x10, }; +typedef NS_OPTIONS(uint32_t, MTRSwitchFeature) { + MTRSwitchFeatureLatchingSwitch = 0x1, + MTRSwitchFeatureMomentarySwitch = 0x2, + MTRSwitchFeatureMomentarySwitchRelease = 0x4, + MTRSwitchFeatureMomentarySwitchLongPress = 0x8, + MTRSwitchFeatureMomentarySwitchMultiPress = 0x10, +}; + typedef NS_ENUM(uint8_t, MTRAdministratorCommissioningCommissioningWindowStatus) { MTRAdministratorCommissioningCommissioningWindowStatusWindowNotOpen = 0x00, MTRAdministratorCommissioningCommissioningWindowStatusEnhancedWindowOpen = 0x01, @@ -20309,6 +20317,11 @@ typedef NS_ENUM(uint8_t, MTRMediaPlaybackPlaybackState) { MTRMediaPlaybackPlaybackStateBuffering = 0x03, }; +typedef NS_OPTIONS(uint32_t, MTRMediaPlaybackFeature) { + MTRMediaPlaybackFeatureAdvancedSeek = 0x1, + MTRMediaPlaybackFeatureVariableSpeed = 0x2, +}; + typedef NS_ENUM(uint8_t, MTRMediaInputInputType) { MTRMediaInputInputTypeInternal = 0x00, MTRMediaInputInputTypeAux = 0x01, 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 70a3f843d43583..52bf6e3ff7ac29 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 @@ -933,6 +933,16 @@ namespace BridgedDeviceBasic { } // namespace BridgedDeviceBasic namespace Switch { + +// Bitmap for SwitchFeature +enum class SwitchFeature : uint32_t +{ + kLatchingSwitch = 0x1, + kMomentarySwitch = 0x2, + kMomentarySwitchRelease = 0x4, + kMomentarySwitchLongPress = 0x8, + kMomentarySwitchMultiPress = 0x10, +}; } // namespace Switch namespace AdministratorCommissioning { @@ -1994,6 +2004,13 @@ enum class PlaybackStateEnum : uint8_t kBuffering = 0x03, kUnknownEnumValue = 4, }; + +// Bitmap for MediaPlaybackFeature +enum class MediaPlaybackFeature : uint32_t +{ + kAdvancedSeek = 0x1, + kVariableSpeed = 0x2, +}; } // namespace MediaPlayback namespace MediaInput { diff --git a/zzz_generated/app-common/app-common/zap-generated/enums.h b/zzz_generated/app-common/app-common/zap-generated/enums.h index 9becdd8f249d2f..76e565bbaeedb6 100644 --- a/zzz_generated/app-common/app-common/zap-generated/enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/enums.h @@ -749,6 +749,10 @@ enum EmberAfWiFiVersionType : uint8_t #define EMBER_AF_MAINS_ALARM_MASK_MAINS_POWER_SUPPLY_LOST_OFFSET (2) #define EMBER_AF_MEDIA_INPUT_FEATURE_NAME_UPDATES (1) #define EMBER_AF_MEDIA_INPUT_FEATURE_NAME_UPDATES_OFFSET (0) +#define EMBER_AF_MEDIA_PLAYBACK_FEATURE_ADVANCED_SEEK (1) +#define EMBER_AF_MEDIA_PLAYBACK_FEATURE_ADVANCED_SEEK_OFFSET (0) +#define EMBER_AF_MEDIA_PLAYBACK_FEATURE_VARIABLE_SPEED (2) +#define EMBER_AF_MEDIA_PLAYBACK_FEATURE_VARIABLE_SPEED_OFFSET (1) #define EMBER_AF_MODE_MOTOR_DIRECTION_REVERSED (1) #define EMBER_AF_MODE_MOTOR_DIRECTION_REVERSED_OFFSET (0) #define EMBER_AF_MODE_CALIBRATION_MODE (2) From bd6fa792fe83dea630ffa543142c6220e95bdf97 Mon Sep 17 00:00:00 2001 From: Sharad Binjola <31142146+sharadb-amazon@users.noreply.github.com> Date: Fri, 23 Sep 2022 11:59:59 -0700 Subject: [PATCH 16/19] Adding Media subscriptions support to Linux tv-casting-app (#22709) --- .../tv-casting-app/linux/CastingUtils.cpp | 62 +++++- examples/tv-casting-app/linux/CastingUtils.h | 7 + .../tv-casting-app/tv-casting-common/BUILD.gn | 4 + .../include/ApplicationLauncher.h | 10 + .../tv-casting-common/include/CastingServer.h | 164 ++++++++++++++- .../tv-casting-common/include/Channel.h | 40 ++++ .../tv-casting-common/include/LevelControl.h | 21 ++ .../tv-casting-common/include/MediaBase.h | 55 ++++++ .../include/MediaCommandBase.h | 32 +-- .../tv-casting-common/include/MediaPlayback.h | 48 +++++ .../include/MediaSubscriptionBase.h | 44 +++++ .../include/TargetNavigator.h | 16 ++ .../tv-casting-common/src/CastingServer.cpp | 187 ++++++++++++++++++ .../tv-casting-common/src/Channel.cpp | 29 +++ 14 files changed, 686 insertions(+), 33 deletions(-) create mode 100644 examples/tv-casting-app/tv-casting-common/include/Channel.h create mode 100644 examples/tv-casting-app/tv-casting-common/include/MediaBase.h create mode 100644 examples/tv-casting-app/tv-casting-common/include/MediaSubscriptionBase.h create mode 100644 examples/tv-casting-app/tv-casting-common/src/Channel.cpp diff --git a/examples/tv-casting-app/linux/CastingUtils.cpp b/examples/tv-casting-app/linux/CastingUtils.cpp index 0e6fc87acf757f..6f5ea539a501d2 100644 --- a/examples/tv-casting-app/linux/CastingUtils.cpp +++ b/examples/tv-casting-app/linux/CastingUtils.cpp @@ -26,6 +26,7 @@ using namespace chip::Dnssd; // TODO: Accept these values over CLI const char * kContentUrl = "https://www.test.com/videoid"; const char * kContentDisplayStr = "Test video"; +int gInitialContextVal = 121212; CHIP_ERROR DiscoverCommissioners() { @@ -114,14 +115,69 @@ void LaunchURLResponseCallback(CHIP_ERROR err) ChipLogProgress(AppServer, "LaunchURLResponseCallback called with %" CHIP_ERROR_FORMAT, err.Format()); } +void OnCurrentStateReadResponseSuccess( + void * context, chip::app::Clusters::MediaPlayback::Attributes::CurrentState::TypeInfo::DecodableArgType responseData) +{ + ChipLogProgress(AppServer, "OnCurrentStateReadResponseSuccess called with responseData: %d", static_cast(responseData)); + switch (responseData) + { + case chip::app::Clusters::MediaPlayback::PlaybackStateEnum::kPlaying: + ChipLogProgress(AppServer, "OnCurrentStateReadResponseSuccess CurrentState: Playing"); + break; + case chip::app::Clusters::MediaPlayback::PlaybackStateEnum::kPaused: + ChipLogProgress(AppServer, "OnCurrentStateReadResponseSuccess CurrentState: Paused"); + break; + case chip::app::Clusters::MediaPlayback::PlaybackStateEnum::kNotPlaying: + ChipLogProgress(AppServer, "OnCurrentStateReadResponseSuccess CurrentState: Not Playing"); + break; + case chip::app::Clusters::MediaPlayback::PlaybackStateEnum::kBuffering: + ChipLogProgress(AppServer, "OnCurrentStateReadResponseSuccess CurrentState: Buffering"); + break; + default: + ChipLogError(AppServer, "OnCurrentStateReadResponseSuccess Invalid CurrentState!"); + break; + } + + if (context != nullptr) + { + ChipLogProgress(AppServer, "OnCurrentStateReadResponseSuccess context value: %d", *(static_cast(context))); + } +} + +void OnCurrentStateReadResponseFailure(void * context, CHIP_ERROR err) +{ + ChipLogProgress(AppServer, "OnCurrentStateReadResponseFailure called with %" CHIP_ERROR_FORMAT, err.Format()); +} + +void OnCurrentStateSubscriptionEstablished(void * context) +{ + ChipLogProgress(AppServer, "OnCurrentStateSubscriptionEstablished called"); + if (context != nullptr) + { + ChipLogProgress(AppServer, "OnCurrentStateSubscriptionEstablished context value: %d", *(static_cast(context))); + } +} + void HandleCommissioningCompleteCallback(CHIP_ERROR err) { ChipLogProgress(AppServer, "HandleCommissioningCompleteCallback called with %" CHIP_ERROR_FORMAT, err.Format()); if (err == CHIP_NO_ERROR) { - ReturnOnFailure( - CastingServer::GetInstance()->ContentLauncherLaunchURL(kContentUrl, kContentDisplayStr, LaunchURLResponseCallback)); - ChipLogProgress(AppServer, "ContentLauncherLaunchURL called successfully"); + // Subscribe to a media attribute + err = CastingServer::GetInstance()->MediaPlayback_SubscribeToCurrentState( + static_cast(&gInitialContextVal), OnCurrentStateReadResponseSuccess, OnCurrentStateReadResponseFailure, 0, 4000, + OnCurrentStateSubscriptionEstablished); + if (err != CHIP_NO_ERROR) + { + ChipLogError(AppServer, "MediaPlayback_SubscribeToCurrentState call failed!"); + } + + // Send a media command + err = CastingServer::GetInstance()->ContentLauncherLaunchURL(kContentUrl, kContentDisplayStr, LaunchURLResponseCallback); + if (err != CHIP_NO_ERROR) + { + ChipLogError(AppServer, "ContentLauncherLaunchURL call failed!"); + } } } diff --git a/examples/tv-casting-app/linux/CastingUtils.h b/examples/tv-casting-app/linux/CastingUtils.h index 177bedfdb5506c..172b01896c9675 100644 --- a/examples/tv-casting-app/linux/CastingUtils.h +++ b/examples/tv-casting-app/linux/CastingUtils.h @@ -42,6 +42,13 @@ void HandleCommissioningCompleteCallback(CHIP_ERROR err); void LaunchURLResponseCallback(CHIP_ERROR err); +void OnCurrentStateReadResponseSuccess( + void * context, chip::app::Clusters::MediaPlayback::Attributes::CurrentState::TypeInfo::DecodableArgType responseData); + +void OnCurrentStateReadResponseFailure(void * context, CHIP_ERROR err); + +void OnCurrentStateSubscriptionEstablished(void * context); + #if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT void HandleUDCSendExpiration(chip::System::Layer * aSystemLayer, void * context); #endif // CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT diff --git a/examples/tv-casting-app/tv-casting-common/BUILD.gn b/examples/tv-casting-app/tv-casting-common/BUILD.gn index b421fada354493..dd3644a2baa039 100644 --- a/examples/tv-casting-app/tv-casting-common/BUILD.gn +++ b/examples/tv-casting-app/tv-casting-common/BUILD.gn @@ -49,16 +49,20 @@ chip_data_model("tv-casting-common") { "commands/common/CHIPCommand.cpp", "include/ApplicationLauncher.h", "include/CastingServer.h", + "include/Channel.h", "include/ContentLauncher.h", "include/KeypadInput.h", "include/LevelControl.h", + "include/MediaBase.h", "include/MediaCommandBase.h", "include/MediaPlayback.h", + "include/MediaSubscriptionBase.h", "include/TargetEndpointInfo.h", "include/TargetNavigator.h", "include/TargetVideoPlayerInfo.h", "src/ApplicationLauncher.cpp", "src/CastingServer.cpp", + "src/Channel.cpp", "src/ContentLauncher.cpp", "src/KeypadInput.cpp", "src/LevelControl.cpp", 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 d3365be9f00f9c..3444955958b6d2 100644 --- a/examples/tv-casting-app/tv-casting-common/include/ApplicationLauncher.h +++ b/examples/tv-casting-app/tv-casting-common/include/ApplicationLauncher.h @@ -17,10 +17,12 @@ */ #include "MediaCommandBase.h" +#include "MediaSubscriptionBase.h" #include #include +// COMMAND CLASSES class LaunchAppCommand : public MediaCommandBase @@ -51,3 +53,11 @@ class HideAppCommand : public MediaCommandBase responseCallback); }; + +// SUBSCRIBER CLASSES +class CurrentAppSubscriber + : public MediaSubscriptionBase +{ +public: + CurrentAppSubscriber() : MediaSubscriptionBase(chip::app::Clusters::ApplicationLauncher::Id) {} +}; diff --git a/examples/tv-casting-app/tv-casting-common/include/CastingServer.h b/examples/tv-casting-app/tv-casting-common/include/CastingServer.h index b29f82e0cba118..b91a0e0b077183 100644 --- a/examples/tv-casting-app/tv-casting-common/include/CastingServer.h +++ b/examples/tv-casting-app/tv-casting-common/include/CastingServer.h @@ -19,6 +19,7 @@ #pragma once #include "ApplicationLauncher.h" +#include "Channel.h" #include "ContentLauncher.h" #include "KeypadInput.h" #include "LevelControl.h" @@ -27,13 +28,15 @@ #include "TargetNavigator.h" #include "TargetVideoPlayerInfo.h" +#include #include #include #include +#include #include constexpr chip::System::Clock::Seconds16 kCommissioningWindowTimeout = chip::System::Clock::Seconds16(3 * 60); -constexpr chip::EndpointId kTvEndpoint = 1; +constexpr chip::EndpointId kTvEndpoint = 4; /** * @brief Represents a TV Casting server that can get the casting app commissioned @@ -73,6 +76,9 @@ class CastingServer chip::FabricIndex CurrentFabricIndex() { return mTargetVideoPlayerInfo.GetFabricIndex(); } void SetDefaultFabricIndex(); + /** + * @brief Content Launcher cluster + */ CHIP_ERROR ContentLauncher_LaunchURL( const char * contentUrl, const char * contentDisplayStr, chip::Optional brandingInformation, @@ -80,10 +86,43 @@ class CastingServer CHIP_ERROR ContentLauncher_LaunchContent(chip::app::Clusters::ContentLauncher::Structs::ContentSearch::Type search, bool autoPlay, chip::Optional data, std::function responseCallback); + + /** + * @brief Level Control cluster + */ CHIP_ERROR LevelControl_Step(chip::app::Clusters::LevelControl::StepMode stepMode, uint8_t stepSize, uint16_t transitionTime, uint8_t optionMask, uint8_t optionOverride, std::function responseCallback); CHIP_ERROR LevelControl_MoveToLevel(uint8_t level, uint16_t transitionTime, uint8_t optionMask, uint8_t optionOverride, std::function responseCallback); + + CHIP_ERROR + LevelControl_SubscribeToCurrentLevel( + void * context, + chip::Controller::ReadResponseSuccessCallback< + chip::app::Clusters::LevelControl::Attributes::CurrentLevel::TypeInfo::DecodableArgType> + successFn, + chip::Controller::ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + chip::Controller::SubscriptionEstablishedCallback onSubscriptionEstablished); + CHIP_ERROR + LevelControl_SubscribeToMinLevel(void * context, + chip::Controller::ReadResponseSuccessCallback< + chip::app::Clusters::LevelControl::Attributes::MinLevel::TypeInfo::DecodableArgType> + successFn, + chip::Controller::ReadResponseFailureCallback failureFn, uint16_t minInterval, + uint16_t maxInterval, + chip::Controller::SubscriptionEstablishedCallback onSubscriptionEstablished); + CHIP_ERROR + LevelControl_SubscribeToMaxLevel(void * context, + chip::Controller::ReadResponseSuccessCallback< + chip::app::Clusters::LevelControl::Attributes::MaxLevel::TypeInfo::DecodableArgType> + successFn, + chip::Controller::ReadResponseFailureCallback failureFn, uint16_t minInterval, + uint16_t maxInterval, + chip::Controller::SubscriptionEstablishedCallback onSubscriptionEstablished); + + /** + * @brief Media Playback cluster + */ CHIP_ERROR MediaPlayback_Play(std::function responseCallback); CHIP_ERROR MediaPlayback_Pause(std::function responseCallback); CHIP_ERROR MediaPlayback_StopPlayback(std::function responseCallback); @@ -91,17 +130,116 @@ class CastingServer CHIP_ERROR MediaPlayback_Seek(uint64_t position, std::function responseCallback); CHIP_ERROR MediaPlayback_SkipForward(uint64_t deltaPositionMilliseconds, std::function responseCallback); CHIP_ERROR MediaPlayback_SkipBackward(uint64_t deltaPositionMilliseconds, std::function responseCallback); + + CHIP_ERROR MediaPlayback_SubscribeToCurrentState( + void * context, + chip::Controller::ReadResponseSuccessCallback< + chip::app::Clusters::MediaPlayback::Attributes::CurrentState::TypeInfo::DecodableArgType> + successFn, + chip::Controller::ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + chip::Controller::SubscriptionEstablishedCallback onSubscriptionEstablished); + CHIP_ERROR + MediaPlayback_SubscribeToStartTime(void * context, + chip::Controller::ReadResponseSuccessCallback< + chip::app::Clusters::MediaPlayback::Attributes::StartTime::TypeInfo::DecodableArgType> + successFn, + chip::Controller::ReadResponseFailureCallback failureFn, uint16_t minInterval, + uint16_t maxInterval, + chip::Controller::SubscriptionEstablishedCallback onSubscriptionEstablished); + CHIP_ERROR + MediaPlayback_SubscribeToDuration(void * context, + chip::Controller::ReadResponseSuccessCallback< + chip::app::Clusters::MediaPlayback::Attributes::Duration::TypeInfo::DecodableArgType> + successFn, + chip::Controller::ReadResponseFailureCallback failureFn, uint16_t minInterval, + uint16_t maxInterval, + chip::Controller::SubscriptionEstablishedCallback onSubscriptionEstablished); + CHIP_ERROR MediaPlayback_SubscribeToSampledPosition( + void * context, + chip::Controller::ReadResponseSuccessCallback< + chip::app::Clusters::MediaPlayback::Attributes::SampledPosition::TypeInfo::DecodableArgType> + successFn, + chip::Controller::ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + chip::Controller::SubscriptionEstablishedCallback onSubscriptionEstablished); + CHIP_ERROR MediaPlayback_SubscribeToPlaybackSpeed( + void * context, + chip::Controller::ReadResponseSuccessCallback< + chip::app::Clusters::MediaPlayback::Attributes::PlaybackSpeed::TypeInfo::DecodableArgType> + successFn, + chip::Controller::ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + chip::Controller::SubscriptionEstablishedCallback onSubscriptionEstablished); + CHIP_ERROR MediaPlayback_SubscribeToSeekRangeEnd( + void * context, + chip::Controller::ReadResponseSuccessCallback< + chip::app::Clusters::MediaPlayback::Attributes::SeekRangeEnd::TypeInfo::DecodableArgType> + successFn, + chip::Controller::ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + chip::Controller::SubscriptionEstablishedCallback onSubscriptionEstablished); + CHIP_ERROR MediaPlayback_SubscribeToSeekRangeStart( + void * context, + chip::Controller::ReadResponseSuccessCallback< + chip::app::Clusters::MediaPlayback::Attributes::SeekRangeStart::TypeInfo::DecodableArgType> + successFn, + chip::Controller::ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + chip::Controller::SubscriptionEstablishedCallback onSubscriptionEstablished); + + /** + * @brief Application Launcher cluster + */ CHIP_ERROR ApplicationLauncher_LaunchApp(chip::app::Clusters::ApplicationLauncher::Structs::Application::Type application, chip::Optional data, std::function responseCallback); CHIP_ERROR ApplicationLauncher_StopApp(chip::app::Clusters::ApplicationLauncher::Structs::Application::Type application, std::function responseCallback); CHIP_ERROR ApplicationLauncher_HideApp(chip::app::Clusters::ApplicationLauncher::Structs::Application::Type application, std::function responseCallback); + + CHIP_ERROR + ApplicationLauncher_SubscribeToCurrentApp( + void * context, + chip::Controller::ReadResponseSuccessCallback< + chip::app::Clusters::ApplicationLauncher::Attributes::CurrentApp::TypeInfo::DecodableArgType> + successFn, + chip::Controller::ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + chip::Controller::SubscriptionEstablishedCallback onSubscriptionEstablished); + + /** + * @brief Target Navigator cluster + */ CHIP_ERROR TargetNavigator_NavigateTarget(const uint8_t target, const chip::Optional data, std::function responseCallback); + + CHIP_ERROR TargetNavigator_SubscribeToTargetList( + void * context, + chip::Controller::ReadResponseSuccessCallback< + chip::app::Clusters::TargetNavigator::Attributes::TargetList::TypeInfo::DecodableArgType> + successFn, + chip::Controller::ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + chip::Controller::SubscriptionEstablishedCallback onSubscriptionEstablished); + CHIP_ERROR TargetNavigator_SubscribeToCurrentTarget( + void * context, + chip::Controller::ReadResponseSuccessCallback< + chip::app::Clusters::TargetNavigator::Attributes::CurrentTarget::TypeInfo::DecodableArgType> + successFn, + chip::Controller::ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + chip::Controller::SubscriptionEstablishedCallback onSubscriptionEstablished); + + /** + * @brief Keypad Input cluster + */ CHIP_ERROR KeypadInput_SendKey(const chip::app::Clusters::KeypadInput::CecKeyCode keyCode, std::function responseCallback); + /** + * @brief Channel cluster + */ + CHIP_ERROR Channel_ChangeChannelCommand(const chip::CharSpan & match, std::function responseCallback); + CHIP_ERROR Channel_SubscribeToLineup( + void * context, + chip::Controller::ReadResponseSuccessCallback + successFn, + chip::Controller::ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + chip::Controller::SubscriptionEstablishedCallback onSubscriptionEstablished); + private: CHIP_ERROR InitBindingHandlers(); static void DeviceEventCallback(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg); @@ -127,6 +265,10 @@ class CastingServer StepCommand mStepCommand; MoveToLevelCommand mMoveToLevelCommand; + CurrentLevelSubscriber mCurrentLevelSubscriber; + MinLevelSubscriber mMinLevelSubscriber; + MaxLevelSubscriber mMaxLevelSubscriber; + /** * @brief Media Playback cluster */ @@ -138,6 +280,14 @@ class CastingServer SkipForwardCommand mSkipForwardCommand; SkipBackwardCommand mSkipBackwardCommand; + CurrentStateSubscriber mCurrentStateSubscriber; + StartTimeSubscriber mStartTimeSubscriber; + DurationSubscriber mDurationSubscriber; + SampledPositionSubscriber mSampledPositionSubscriber; + PlaybackSpeedSubscriber mPlaybackSpeedSubscriber; + SeekRangeEndSubscriber mSeekRangeEndSubscriber; + SeekRangeStartSubscriber mSeekRangeStartSubscriber; + /** * @brief Application Launcher cluster */ @@ -145,13 +295,25 @@ class CastingServer StopAppCommand mStopAppCommand; HideAppCommand mHideAppCommand; + CurrentAppSubscriber mCurrentAppSubscriber; + /** * @brief Target Navigator cluster */ NavigateTargetCommand mNavigateTargetCommand; + TargetListSubscriber mTargetListSubscriber; + CurrentTargetSubscriber mCurrentTargetSubscriber; + /** * @brief Keypad Input cluster */ SendKeyCommand mSendKeyCommand; + + /** + * @brief Channel cluster + */ + ChangeChannelCommand mChangeChannelCommand; + + LineupSubscriber mLineupSubscriber; }; diff --git a/examples/tv-casting-app/tv-casting-common/include/Channel.h b/examples/tv-casting-app/tv-casting-common/include/Channel.h new file mode 100644 index 00000000000000..1a0a18ec196ad8 --- /dev/null +++ b/examples/tv-casting-app/tv-casting-common/include/Channel.h @@ -0,0 +1,40 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "MediaCommandBase.h" +#include "MediaSubscriptionBase.h" + +#include +#include + +// COMMAND CLASSES +class ChangeChannelCommand : public MediaCommandBase +{ +public: + ChangeChannelCommand() : MediaCommandBase(chip::app::Clusters::Channel::Id) {} + + CHIP_ERROR Invoke(const chip::CharSpan & match, std::function responseCallback); +}; + +// SUBSCRIBER CLASSES +class LineupSubscriber : public MediaSubscriptionBase +{ +public: + LineupSubscriber() : MediaSubscriptionBase(chip::app::Clusters::Channel::Id) {} +}; 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 d431e3bb289597..a1fd1724b9de41 100644 --- a/examples/tv-casting-app/tv-casting-common/include/LevelControl.h +++ b/examples/tv-casting-app/tv-casting-common/include/LevelControl.h @@ -17,10 +17,12 @@ */ #include "MediaCommandBase.h" +#include "MediaSubscriptionBase.h" #include #include +// COMMAND CLASSES class StepCommand : public MediaCommandBase { @@ -41,3 +43,22 @@ class MoveToLevelCommand CHIP_ERROR Invoke(uint8_t level, chip::app::DataModel::Nullable transitionTime, uint8_t optionMask, uint8_t optionOverride, std::function responseCallback); }; + +// SUBSCRIBER CLASSES +class CurrentLevelSubscriber : public MediaSubscriptionBase +{ +public: + CurrentLevelSubscriber() : MediaSubscriptionBase(chip::app::Clusters::LevelControl::Id) {} +}; + +class MinLevelSubscriber : public MediaSubscriptionBase +{ +public: + MinLevelSubscriber() : MediaSubscriptionBase(chip::app::Clusters::LevelControl::Id) {} +}; + +class MaxLevelSubscriber : public MediaSubscriptionBase +{ +public: + MaxLevelSubscriber() : MediaSubscriptionBase(chip::app::Clusters::LevelControl::Id) {} +}; diff --git a/examples/tv-casting-app/tv-casting-common/include/MediaBase.h b/examples/tv-casting-app/tv-casting-common/include/MediaBase.h new file mode 100644 index 00000000000000..36861611e714cd --- /dev/null +++ b/examples/tv-casting-app/tv-casting-common/include/MediaBase.h @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include "TargetVideoPlayerInfo.h" + +#include + +class MediaBase +{ +public: + MediaBase(chip::ClusterId clusterId) { mClusterId = clusterId; } + + CHIP_ERROR SetTarget(TargetVideoPlayerInfo & targetVideoPlayerInfo, chip::EndpointId tvEndpoint) + { + auto deviceProxy = targetVideoPlayerInfo.GetOperationalDeviceProxy(); + if (deviceProxy == nullptr) + { + ChipLogError(AppServer, "Failed in getting an instance of OperationalDeviceProxy"); + return CHIP_ERROR_PEER_NODE_NOT_FOUND; + } + mTargetVideoPlayerInfo = &targetVideoPlayerInfo; + mTvEndpoint = tvEndpoint; + return CHIP_NO_ERROR; + } + + class MediaClusterBase : public chip::Controller::ClusterBase + { + public: + MediaClusterBase(chip::Messaging::ExchangeManager & exchangeManager, const chip::SessionHandle & session, + chip::ClusterId cluster, chip::EndpointId endpoint) : + ClusterBase(exchangeManager, session, cluster, endpoint) + {} + }; + +protected: + chip::ClusterId mClusterId; + TargetVideoPlayerInfo * mTargetVideoPlayerInfo = nullptr; + chip::EndpointId mTvEndpoint; +}; diff --git a/examples/tv-casting-app/tv-casting-common/include/MediaCommandBase.h b/examples/tv-casting-app/tv-casting-common/include/MediaCommandBase.h index a125f18d139f92..1b9c3d28929d3c 100644 --- a/examples/tv-casting-app/tv-casting-common/include/MediaCommandBase.h +++ b/examples/tv-casting-app/tv-casting-common/include/MediaCommandBase.h @@ -17,29 +17,15 @@ */ #pragma once -#include "TargetVideoPlayerInfo.h" +#include "MediaBase.h" -#include #include template -class MediaCommandBase +class MediaCommandBase : public MediaBase { public: - MediaCommandBase(chip::ClusterId clusterId) { mClusterId = clusterId; } - - CHIP_ERROR SetTarget(TargetVideoPlayerInfo & targetVideoPlayerInfo, chip::EndpointId tvEndpoint) - { - auto deviceProxy = targetVideoPlayerInfo.GetOperationalDeviceProxy(); - if (deviceProxy == nullptr) - { - ChipLogError(AppServer, "Failed in getting an instance of OperationalDeviceProxy"); - return CHIP_ERROR_PEER_NODE_NOT_FOUND; - } - mTargetVideoPlayerInfo = &targetVideoPlayerInfo; - mTvEndpoint = tvEndpoint; - return CHIP_NO_ERROR; - } + MediaCommandBase(chip::ClusterId clusterId) : MediaBase(clusterId) {} CHIP_ERROR Invoke(RequestType request, std::function responseCallback) { @@ -50,15 +36,6 @@ class MediaCommandBase sResponseCallback = responseCallback; - class MediaClusterBase : public chip::Controller::ClusterBase - { - public: - MediaClusterBase(chip::Messaging::ExchangeManager & exchangeManager, const chip::SessionHandle & session, - chip::ClusterId cluster, chip::EndpointId endpoint) : - ClusterBase(exchangeManager, session, cluster, endpoint) - {} - }; - MediaClusterBase cluster(*deviceProxy->GetExchangeManager(), deviceProxy->GetSecureSession().Value(), mClusterId, mTvEndpoint); return cluster.InvokeCommand(request, nullptr, OnSuccess, OnFailure); @@ -69,9 +46,6 @@ class MediaCommandBase static void OnFailure(void * context, CHIP_ERROR error) { sResponseCallback(error); } protected: - chip::ClusterId mClusterId; - TargetVideoPlayerInfo * mTargetVideoPlayerInfo = nullptr; - chip::EndpointId mTvEndpoint; static std::function sResponseCallback; }; 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 ca551bd5f832f5..c4d540fb353464 100644 --- a/examples/tv-casting-app/tv-casting-common/include/MediaPlayback.h +++ b/examples/tv-casting-app/tv-casting-common/include/MediaPlayback.h @@ -17,10 +17,12 @@ */ #include "MediaCommandBase.h" +#include "MediaSubscriptionBase.h" #include #include +// COMMAND CLASSES class PlayCommand : public MediaCommandBase { @@ -83,3 +85,49 @@ class SkipBackwardCommand : public MediaCommandBase responseCallback); }; + +// SUBSCRIBER CLASSES +class CurrentStateSubscriber : public MediaSubscriptionBase +{ +public: + CurrentStateSubscriber() : MediaSubscriptionBase(chip::app::Clusters::MediaPlayback::Id) {} +}; + +class StartTimeSubscriber : public MediaSubscriptionBase +{ +public: + StartTimeSubscriber() : MediaSubscriptionBase(chip::app::Clusters::MediaPlayback::Id) {} +}; + +class DurationSubscriber : public MediaSubscriptionBase +{ +public: + DurationSubscriber() : MediaSubscriptionBase(chip::app::Clusters::MediaPlayback::Id) {} +}; + +class SampledPositionSubscriber + : public MediaSubscriptionBase +{ +public: + SampledPositionSubscriber() : MediaSubscriptionBase(chip::app::Clusters::MediaPlayback::Id) {} +}; + +class PlaybackSpeedSubscriber + : public MediaSubscriptionBase +{ +public: + PlaybackSpeedSubscriber() : MediaSubscriptionBase(chip::app::Clusters::MediaPlayback::Id) {} +}; + +class SeekRangeEndSubscriber : public MediaSubscriptionBase +{ +public: + SeekRangeEndSubscriber() : MediaSubscriptionBase(chip::app::Clusters::MediaPlayback::Id) {} +}; + +class SeekRangeStartSubscriber + : public MediaSubscriptionBase +{ +public: + SeekRangeStartSubscriber() : MediaSubscriptionBase(chip::app::Clusters::MediaPlayback::Id) {} +}; diff --git a/examples/tv-casting-app/tv-casting-common/include/MediaSubscriptionBase.h b/examples/tv-casting-app/tv-casting-common/include/MediaSubscriptionBase.h new file mode 100644 index 00000000000000..e2a065ef13cdc4 --- /dev/null +++ b/examples/tv-casting-app/tv-casting-common/include/MediaSubscriptionBase.h @@ -0,0 +1,44 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include "MediaBase.h" + +template +class MediaSubscriptionBase : public MediaBase +{ +public: + MediaSubscriptionBase(chip::ClusterId clusterId) : MediaBase(clusterId) {} + + CHIP_ERROR SubscribeAttribute(void * context, + chip::Controller::ReadResponseSuccessCallback successFn, + chip::Controller::ReadResponseFailureCallback failureFn, uint16_t minInterval, + uint16_t maxInterval, chip::Controller::SubscriptionEstablishedCallback onSubscriptionEstablished) + { + VerifyOrDieWithMsg(mTargetVideoPlayerInfo != nullptr, AppServer, "Target unknown"); + + auto deviceProxy = mTargetVideoPlayerInfo->GetOperationalDeviceProxy(); + ReturnErrorCodeIf(deviceProxy == nullptr || !deviceProxy->ConnectionReady(), CHIP_ERROR_PEER_NODE_NOT_FOUND); + + MediaClusterBase cluster(*deviceProxy->GetExchangeManager(), deviceProxy->GetSecureSession().Value(), mClusterId, + mTvEndpoint); + + return cluster.template SubscribeAttribute(context, successFn, failureFn, minInterval, maxInterval, + onSubscriptionEstablished); + } +}; 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 731dfb78169a3e..b42d1685b183af 100644 --- a/examples/tv-casting-app/tv-casting-common/include/TargetNavigator.h +++ b/examples/tv-casting-app/tv-casting-common/include/TargetNavigator.h @@ -17,10 +17,12 @@ */ #include "MediaCommandBase.h" +#include "MediaSubscriptionBase.h" #include #include +// COMMAND CLASSES class NavigateTargetCommand : public MediaCommandBase @@ -31,3 +33,17 @@ class NavigateTargetCommand CHIP_ERROR Invoke(const uint8_t target, const chip::Optional data, std::function responseCallback); }; + +// SUBSCRIBER CLASSES +class TargetListSubscriber : public MediaSubscriptionBase +{ +public: + TargetListSubscriber() : MediaSubscriptionBase(chip::app::Clusters::TargetNavigator::Id) {} +}; + +class CurrentTargetSubscriber + : public MediaSubscriptionBase +{ +public: + CurrentTargetSubscriber() : MediaSubscriptionBase(chip::app::Clusters::TargetNavigator::Id) {} +}; diff --git a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp index 67c5f2f9132bc5..1acc685f117cac 100644 --- a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp +++ b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp @@ -282,6 +282,9 @@ void CastingServer::SetDefaultFabricIndex() ChipLogError(AppServer, " -- No initialized fabrics with video players"); } +/** + * @brief Content Launcher cluster + */ CHIP_ERROR CastingServer::ContentLauncher_LaunchURL( const char * contentUrl, const char * contentDisplayStr, chip::Optional brandingInformation, @@ -299,6 +302,9 @@ CHIP_ERROR CastingServer::ContentLauncher_LaunchContent(chip::app::Clusters::Con return mLaunchContentCommand.Invoke(search, autoPlay, data, responseCallback); } +/** + * @brief Level Control cluster + */ CHIP_ERROR CastingServer::LevelControl_Step(chip::app::Clusters::LevelControl::StepMode stepMode, uint8_t stepSize, uint16_t transitionTime, uint8_t optionMask, uint8_t optionOverride, std::function responseCallback) @@ -322,6 +328,42 @@ CHIP_ERROR CastingServer::LevelControl_MoveToLevel(uint8_t level, uint16_t trans return mMoveToLevelCommand.Invoke(level, nullableTransitionTime, optionMask, optionOverride, responseCallback); } +CHIP_ERROR CastingServer::LevelControl_SubscribeToCurrentLevel( + void * context, + ReadResponseSuccessCallback successFn, + ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + SubscriptionEstablishedCallback onSubscriptionEstablished) +{ + ReturnErrorOnFailure(mCurrentLevelSubscriber.SetTarget(mTargetVideoPlayerInfo, kTvEndpoint)); + return mCurrentLevelSubscriber.SubscribeAttribute(context, successFn, failureFn, minInterval, maxInterval, + onSubscriptionEstablished); +} + +CHIP_ERROR CastingServer::LevelControl_SubscribeToMinLevel( + void * context, + ReadResponseSuccessCallback successFn, + ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + SubscriptionEstablishedCallback onSubscriptionEstablished) +{ + ReturnErrorOnFailure(mMinLevelSubscriber.SetTarget(mTargetVideoPlayerInfo, kTvEndpoint)); + return mMinLevelSubscriber.SubscribeAttribute(context, successFn, failureFn, minInterval, maxInterval, + onSubscriptionEstablished); +} + +CHIP_ERROR CastingServer::LevelControl_SubscribeToMaxLevel( + void * context, + ReadResponseSuccessCallback successFn, + ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + SubscriptionEstablishedCallback onSubscriptionEstablished) +{ + ReturnErrorOnFailure(mMaxLevelSubscriber.SetTarget(mTargetVideoPlayerInfo, kTvEndpoint)); + return mMaxLevelSubscriber.SubscribeAttribute(context, successFn, failureFn, minInterval, maxInterval, + onSubscriptionEstablished); +} + +/** + * @brief Media Playback cluster + */ CHIP_ERROR CastingServer::MediaPlayback_Play(std::function responseCallback) { ReturnErrorOnFailure(mPlayCommand.SetTarget(mTargetVideoPlayerInfo, kTvEndpoint)); @@ -366,6 +408,89 @@ CHIP_ERROR CastingServer::MediaPlayback_SkipBackward(uint64_t deltaPositionMilli return mSkipBackwardCommand.Invoke(deltaPositionMilliseconds, responseCallback); } +CHIP_ERROR CastingServer::MediaPlayback_SubscribeToCurrentState( + void * context, + ReadResponseSuccessCallback successFn, + ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + SubscriptionEstablishedCallback onSubscriptionEstablished) +{ + ReturnErrorOnFailure(mCurrentStateSubscriber.SetTarget(mTargetVideoPlayerInfo, kTvEndpoint)); + return mCurrentStateSubscriber.SubscribeAttribute(context, successFn, failureFn, minInterval, maxInterval, + onSubscriptionEstablished); +} + +CHIP_ERROR CastingServer::MediaPlayback_SubscribeToStartTime( + void * context, + ReadResponseSuccessCallback successFn, + ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + SubscriptionEstablishedCallback onSubscriptionEstablished) +{ + ReturnErrorOnFailure(mStartTimeSubscriber.SetTarget(mTargetVideoPlayerInfo, kTvEndpoint)); + return mStartTimeSubscriber.SubscribeAttribute(context, successFn, failureFn, minInterval, maxInterval, + onSubscriptionEstablished); +} + +CHIP_ERROR CastingServer::MediaPlayback_SubscribeToDuration( + void * context, + ReadResponseSuccessCallback successFn, + ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + SubscriptionEstablishedCallback onSubscriptionEstablished) +{ + ReturnErrorOnFailure(mDurationSubscriber.SetTarget(mTargetVideoPlayerInfo, kTvEndpoint)); + return mDurationSubscriber.SubscribeAttribute(context, successFn, failureFn, minInterval, maxInterval, + onSubscriptionEstablished); +} + +CHIP_ERROR CastingServer::MediaPlayback_SubscribeToSampledPosition( + void * context, + ReadResponseSuccessCallback + successFn, + ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + SubscriptionEstablishedCallback onSubscriptionEstablished) +{ + ReturnErrorOnFailure(mSampledPositionSubscriber.SetTarget(mTargetVideoPlayerInfo, kTvEndpoint)); + return mSampledPositionSubscriber.SubscribeAttribute(context, successFn, failureFn, minInterval, maxInterval, + onSubscriptionEstablished); +} + +CHIP_ERROR CastingServer::MediaPlayback_SubscribeToPlaybackSpeed( + void * context, + ReadResponseSuccessCallback + successFn, + ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + SubscriptionEstablishedCallback onSubscriptionEstablished) +{ + ReturnErrorOnFailure(mPlaybackSpeedSubscriber.SetTarget(mTargetVideoPlayerInfo, kTvEndpoint)); + return mPlaybackSpeedSubscriber.SubscribeAttribute(context, successFn, failureFn, minInterval, maxInterval, + onSubscriptionEstablished); +} + +CHIP_ERROR CastingServer::MediaPlayback_SubscribeToSeekRangeEnd( + void * context, + ReadResponseSuccessCallback successFn, + ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + SubscriptionEstablishedCallback onSubscriptionEstablished) +{ + ReturnErrorOnFailure(mSeekRangeEndSubscriber.SetTarget(mTargetVideoPlayerInfo, kTvEndpoint)); + return mSeekRangeEndSubscriber.SubscribeAttribute(context, successFn, failureFn, minInterval, maxInterval, + onSubscriptionEstablished); +} + +CHIP_ERROR CastingServer::MediaPlayback_SubscribeToSeekRangeStart( + void * context, + ReadResponseSuccessCallback + successFn, + ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + SubscriptionEstablishedCallback onSubscriptionEstablished) +{ + ReturnErrorOnFailure(mSeekRangeStartSubscriber.SetTarget(mTargetVideoPlayerInfo, kTvEndpoint)); + return mSeekRangeStartSubscriber.SubscribeAttribute(context, successFn, failureFn, minInterval, maxInterval, + onSubscriptionEstablished); +} + +/** + * @brief Application Launcher cluster + */ CHIP_ERROR CastingServer::ApplicationLauncher_LaunchApp(chip::app::Clusters::ApplicationLauncher::Structs::Application::Type application, chip::Optional data, std::function responseCallback) @@ -390,6 +515,21 @@ CastingServer::ApplicationLauncher_HideApp(chip::app::Clusters::ApplicationLaunc return mHideAppCommand.Invoke(application, responseCallback); } +CHIP_ERROR CastingServer::ApplicationLauncher_SubscribeToCurrentApp( + void * context, + ReadResponseSuccessCallback + successFn, + ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + SubscriptionEstablishedCallback onSubscriptionEstablished) +{ + ReturnErrorOnFailure(mCurrentAppSubscriber.SetTarget(mTargetVideoPlayerInfo, kTvEndpoint)); + return mCurrentAppSubscriber.SubscribeAttribute(context, successFn, failureFn, minInterval, maxInterval, + onSubscriptionEstablished); +} + +/** + * @brief Target Navigator cluster + */ CHIP_ERROR CastingServer::TargetNavigator_NavigateTarget(const uint8_t target, const chip::Optional data, std::function responseCallback) { @@ -397,9 +537,56 @@ CHIP_ERROR CastingServer::TargetNavigator_NavigateTarget(const uint8_t target, c return mNavigateTargetCommand.Invoke(target, data, responseCallback); } +CHIP_ERROR CastingServer::TargetNavigator_SubscribeToTargetList( + void * context, + ReadResponseSuccessCallback successFn, + ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + SubscriptionEstablishedCallback onSubscriptionEstablished) +{ + ReturnErrorOnFailure(mTargetListSubscriber.SetTarget(mTargetVideoPlayerInfo, kTvEndpoint)); + return mTargetListSubscriber.SubscribeAttribute(context, successFn, failureFn, minInterval, maxInterval, + onSubscriptionEstablished); +} + +CHIP_ERROR CastingServer::TargetNavigator_SubscribeToCurrentTarget( + void * context, + ReadResponseSuccessCallback + successFn, + ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + SubscriptionEstablishedCallback onSubscriptionEstablished) +{ + ReturnErrorOnFailure(mCurrentTargetSubscriber.SetTarget(mTargetVideoPlayerInfo, kTvEndpoint)); + return mCurrentTargetSubscriber.SubscribeAttribute(context, successFn, failureFn, minInterval, maxInterval, + onSubscriptionEstablished); +} + +/** + * @brief Keypad Input cluster + */ CHIP_ERROR CastingServer::KeypadInput_SendKey(const chip::app::Clusters::KeypadInput::CecKeyCode keyCode, std::function responseCallback) { ReturnErrorOnFailure(mSendKeyCommand.SetTarget(mTargetVideoPlayerInfo, kTvEndpoint)); return mSendKeyCommand.Invoke(keyCode, responseCallback); } + +/** + * @brief Channel cluster + */ +CHIP_ERROR CastingServer::Channel_ChangeChannelCommand(const chip::CharSpan & match, + std::function responseCallback) +{ + ReturnErrorOnFailure(mChangeChannelCommand.SetTarget(mTargetVideoPlayerInfo, kTvEndpoint)); + return mChangeChannelCommand.Invoke(match, responseCallback); +} + +CHIP_ERROR CastingServer::Channel_SubscribeToLineup( + void * context, + chip::Controller::ReadResponseSuccessCallback + successFn, + chip::Controller::ReadResponseFailureCallback failureFn, uint16_t minInterval, uint16_t maxInterval, + chip::Controller::SubscriptionEstablishedCallback onSubscriptionEstablished) +{ + ReturnErrorOnFailure(mLineupSubscriber.SetTarget(mTargetVideoPlayerInfo, kTvEndpoint)); + return mLineupSubscriber.SubscribeAttribute(context, successFn, failureFn, minInterval, maxInterval, onSubscriptionEstablished); +} diff --git a/examples/tv-casting-app/tv-casting-common/src/Channel.cpp b/examples/tv-casting-app/tv-casting-common/src/Channel.cpp new file mode 100644 index 00000000000000..2f11367cb2d232 --- /dev/null +++ b/examples/tv-casting-app/tv-casting-common/src/Channel.cpp @@ -0,0 +1,29 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "Channel.h" + +using namespace chip; +using namespace chip::app::Clusters; + +CHIP_ERROR ChangeChannelCommand::Invoke(const CharSpan & match, std::function responseCallback) +{ + Channel::Commands::ChangeChannel::Type request; + request.match = match; + return MediaCommandBase::Invoke(request, responseCallback); +} From 8ac8ec72d0975716aff181d90863139e7690690c Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Fri, 23 Sep 2022 14:34:30 -0700 Subject: [PATCH 17/19] Improve matter gcoverage accuracy by excluding unit test files (#22834) * Improve matter gcoverage accuracy by excluding unit test files * Address review comment --- scripts/build/builders/host.py | 6 ++++-- scripts/build_coverage.sh | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/build/builders/host.py b/scripts/build/builders/host.py index 3e299384e2c3da..a599b0f6e6c3cf 100644 --- a/scripts/build/builders/host.py +++ b/scripts/build/builders/host.py @@ -365,12 +365,14 @@ def generate(self): def PreBuildCommand(self): if self.app == HostApp.TESTS and self.use_coverage: self._Execute(['ninja', '-C', self.output_dir, 'default'], title="Build-only") - self._Execute(['lcov', '--initial', '--capture', '--directory', os.path.join(self.output_dir, 'obj'), '--exclude', os.path.join(self.chip_dir, 'third_party/*'), '--exclude', '/usr/include/*', + self._Execute(['find', os.path.join(self.output_dir, 'obj/src/'), '-depth', + '-name', 'tests', '-exec', 'rm -rf {} \;'], title="Cleanup unit tests") + self._Execute(['lcov', '--initial', '--capture', '--directory', os.path.join(self.output_dir, 'obj'), '--exclude', os.path.join(self.chip_dir, 'zzz_generated/*'), '--exclude', os.path.join(self.chip_dir, 'third_party/*'), '--exclude', '/usr/include/*', '--output-file', os.path.join(self.coverage_dir, 'lcov_base.info')], title="Initial coverage baseline") def PostBuildCommand(self): if self.app == HostApp.TESTS and self.use_coverage: - self._Execute(['lcov', '--capture', '--directory', os.path.join(self.output_dir, 'obj'), '--exclude', os.path.join(self.chip_dir, 'third_party/*'), '--exclude', '/usr/include/*', + self._Execute(['lcov', '--capture', '--directory', os.path.join(self.output_dir, 'obj'), '--exclude', os.path.join(self.chip_dir, 'zzz_generated/*'), '--exclude', os.path.join(self.chip_dir, 'third_party/*'), '--exclude', '/usr/include/*', '--output-file', os.path.join(self.coverage_dir, 'lcov_test.info')], title="Update coverage") self._Execute(['lcov', '--add-tracefile', os.path.join(self.coverage_dir, 'lcov_base.info'), '--add-tracefile', os.path.join(self.coverage_dir, 'lcov_test.info'), diff --git a/scripts/build_coverage.sh b/scripts/build_coverage.sh index b7223ce2e4aa0b..91f5e7f4f0e2a0 100755 --- a/scripts/build_coverage.sh +++ b/scripts/build_coverage.sh @@ -92,8 +92,11 @@ if [ "$skip_gn" == false ]; then ninja -C "$OUTPUT_ROOT" check fi +# Remove unit test itself from coverage statistics +find "$OUTPUT_ROOT/obj/src/" -depth -name 'tests' -exec rm -rf {} \; + mkdir -p "$COVERAGE_ROOT" -lcov --initial --capture --directory "$OUTPUT_ROOT/obj/src" --exclude="$CHIP_ROOT/third_party/*" --exclude=/usr/include/* --output-file "$COVERAGE_ROOT/lcov_base.info" -lcov --capture --directory "$OUTPUT_ROOT/obj/src" --exclude="$CHIP_ROOT/third_party/*" --exclude=/usr/include/* --output-file "$COVERAGE_ROOT/lcov_test.info" +lcov --initial --capture --directory "$OUTPUT_ROOT/obj/src" --exclude="$PWD"/zzz_generated/* --exclude="$PWD"/third_party/* --exclude=/usr/include/* --output-file "$COVERAGE_ROOT/lcov_base.info" +lcov --capture --directory "$OUTPUT_ROOT/obj/src" --exclude="$PWD"/zzz_generated/* --exclude="$PWD"/third_party/* --exclude=/usr/include/* --output-file "$COVERAGE_ROOT/lcov_test.info" lcov --add-tracefile "$COVERAGE_ROOT/lcov_base.info" --add-tracefile "$COVERAGE_ROOT/lcov_test.info" --output-file "$COVERAGE_ROOT/lcov_final.info" genhtml "$COVERAGE_ROOT/lcov_final.info" --output-directory "$COVERAGE_ROOT/html" From bdb77b019d2a4eb65144c33b895d0f6e4b029c7a Mon Sep 17 00:00:00 2001 From: Wang Qixiang <43193572+wqx6@users.noreply.github.com> Date: Sun, 25 Sep 2022 01:24:36 +0800 Subject: [PATCH 18/19] ESP32: fix the issue when setting target esp32h2 (#22786) Co-authored-by: Andrei Litvin --- config/esp32/components/chip/Kconfig | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index c127e732853105..208525d7b8ecd5 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -520,25 +520,30 @@ menu "CHIP Device Layer" visible if ENABLE_ETHERNET_TELEMETRY config GPIO_RANGE_MIN - int + int + depends on ENABLE_ETHERNET_TELEMETRY default 0 config GPIO_RANGE_MAX - int + int + depends on ENABLE_ETHERNET_TELEMETRY default 33 if IDF_TARGET_ESP32 default 46 if IDF_TARGET_ESP32S2 default 19 if IDF_TARGET_ESP32C3 default 48 if IDF_TARGET_ESP32S3 + default 26 if IDF_TARGET_ESP32H2 config ETH_MDC_GPIO int "SMI MDC GPIO number" + depends on ENABLE_ETHERNET_TELEMETRY range GPIO_RANGE_MIN GPIO_RANGE_MAX - default 23 if ENABLE_ETHERNET_TELEMETRY + default 23 if ENABLE_ETHERNET_TELEMETRY help Set the GPIO number used by SMI MDC. config ETH_MDIO_GPIO int "SMI MDIO GPIO number" + depends on ENABLE_ETHERNET_TELEMETRY range GPIO_RANGE_MIN GPIO_RANGE_MAX default 18 if ENABLE_ETHERNET_TELEMETRY help @@ -546,6 +551,7 @@ menu "CHIP Device Layer" config ETH_PHY_RST_GPIO int "PHY Reset GPIO number" + depends on ENABLE_ETHERNET_TELEMETRY range -1 GPIO_RANGE_MAX default 5 if ENABLE_ETHERNET_TELEMETRY help From dc66d4efbd95c55c6564c2432f4929cb5a46ba24 Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk <66371704+kkasperczyk-no@users.noreply.github.com> Date: Sun, 25 Sep 2022 20:44:32 +0200 Subject: [PATCH 19/19] [server] Moved GetSetupPasscode failure log. (#22716) The GetSetupPasscode() failure log is printed even in case of using the default passcode, what may bring confusion to the user if everything went fine. Moved error log to be printed only if there is no default passcode to be used. --- src/app/server/OnboardingCodesUtil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/server/OnboardingCodesUtil.cpp b/src/app/server/OnboardingCodesUtil.cpp index 44c5e3553f9469..bef0b751b9d5d6 100644 --- a/src/app/server/OnboardingCodesUtil.cpp +++ b/src/app/server/OnboardingCodesUtil.cpp @@ -105,12 +105,12 @@ CHIP_ERROR GetPayloadContents(chip::PayloadContents & aPayload, chip::Rendezvous err = GetCommissionableDataProvider()->GetSetupPasscode(aPayload.setUpPINCode); if (err != CHIP_NO_ERROR) { - ChipLogError(AppServer, "GetCommissionableDataProvider()->GetSetupPasscode() failed: %" CHIP_ERROR_FORMAT, err.Format()); #if defined(CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE) && CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE ChipLogProgress(AppServer, "*** Using default EXAMPLE passcode %u ***", static_cast(CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE)); aPayload.setUpPINCode = CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE; #else + ChipLogError(AppServer, "GetCommissionableDataProvider()->GetSetupPasscode() failed: %" CHIP_ERROR_FORMAT, err.Format()); return err; #endif }