From 5665d3871b5c4c0250a3d437ea5245835953f8c9 Mon Sep 17 00:00:00 2001 From: jwinder-ca <105392648+jwinder-ca@users.noreply.github.com> Date: Thu, 21 Jul 2022 10:35:30 -0600 Subject: [PATCH 01/15] Added support to the bridge-app for action-lists. (#20121) * Added support to the bridge-app for action-lists. Added the actions to turn on/off lights in a room (endpoint-list). The instant-action is the supported command to run the actions. Also, the setup-url attrubute was changed to be active. * Restyled by clang-format * Fixed build for esp32 bridge-app. * Changes to return status correctly. Co-authored-by: Restyled.io --- .../bridge-common/bridge-app.matter | 9 + .../bridge-app/bridge-common/bridge-app.zap | 179 +++++++++--------- examples/bridge-app/esp32/main/main.cpp | 10 + examples/bridge-app/linux/Device.cpp | 12 ++ .../bridge-app/linux/bridged-actions-stub.cpp | 22 ++- examples/bridge-app/linux/include/Device.h | 25 +++ examples/bridge-app/linux/include/main.h | 2 + examples/bridge-app/linux/main.cpp | 109 +++++++++++ .../zap-generated/IMClusterCommandHandler.cpp | 40 ++++ .../zap-generated/endpoint_config.h | 47 +++-- 10 files changed, 352 insertions(+), 103 deletions(-) diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index cc4b20444d6399..9f36feecb38ac0 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -420,11 +420,19 @@ server cluster BridgedActions = 37 { readonly attribute ActionStruct actionList[] = 0; readonly attribute EndpointListStruct endpointList[] = 1; + readonly attribute long_char_string<512> setupUrl = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + request struct InstantActionRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + } + + command InstantAction(InstantActionRequest): DefaultSuccess = 0; } server cluster Basic = 40 { @@ -1723,6 +1731,7 @@ endpoint 1 { server cluster BridgedActions { callback attribute actionList; callback attribute endpointList; + ram attribute setupUrl default = "https://example.com"; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 6d01b0254bb3d5..10bffcd24bbd32 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 71, + "featureLevel": 72, "creator": "zap", "keyValuePairs": [ { @@ -115,7 +115,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -131,7 +131,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -147,7 +147,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -159,7 +159,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -175,7 +175,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -191,7 +191,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -297,7 +297,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -313,7 +313,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -373,7 +373,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -389,7 +389,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -511,7 +511,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "10", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -527,7 +527,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -543,7 +543,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -559,7 +559,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -575,7 +575,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -591,7 +591,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -607,7 +607,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "XX", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -623,7 +623,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -639,7 +639,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -655,7 +655,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -671,7 +671,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -827,7 +827,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -843,7 +843,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -859,7 +859,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -965,7 +965,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "en-US", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -981,7 +981,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -993,7 +993,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1009,7 +1009,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1025,7 +1025,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1131,7 +1131,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1175,7 +1175,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1191,7 +1191,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1207,7 +1207,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1325,7 +1325,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1341,7 +1341,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1357,7 +1357,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1589,7 +1589,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1605,7 +1605,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1621,7 +1621,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1925,7 +1925,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1941,7 +1941,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2273,7 +2273,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2289,7 +2289,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2305,7 +2305,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4175,7 +4175,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4191,7 +4191,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4207,7 +4207,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4503,7 +4503,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4519,7 +4519,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4535,7 +4535,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4687,7 +4687,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4703,7 +4703,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4719,7 +4719,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4735,7 +4735,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4751,7 +4751,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4767,7 +4767,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4783,7 +4783,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5052,7 +5052,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5068,7 +5068,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5080,7 +5080,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5096,7 +5096,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5112,7 +5112,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5214,7 +5214,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5230,11 +5230,11 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5246,11 +5246,11 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5262,11 +5262,11 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5278,7 +5278,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5294,7 +5294,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5310,7 +5310,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5412,7 +5412,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5428,7 +5428,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5444,7 +5444,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5460,7 +5460,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5510,7 +5510,16 @@ "define": "BRIDGED_ACTIONS_CLUSTER", "side": "client", "enabled": 0, - "commands": [], + "commands": [ + { + "name": "InstantAction", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], "attributes": [ { "name": "FeatureMap", @@ -5562,7 +5571,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5578,7 +5587,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5593,11 +5602,11 @@ "mfgCode": null, "side": "server", "type": "long_char_string", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "https://example.com", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5610,7 +5619,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5626,7 +5635,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5642,7 +5651,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/bridge-app/esp32/main/main.cpp b/examples/bridge-app/esp32/main/main.cpp index 3b94d192d216e1..0d022828740cfb 100644 --- a/examples/bridge-app/esp32/main/main.cpp +++ b/examples/bridge-app/esp32/main/main.cpp @@ -50,6 +50,7 @@ using namespace ::chip; using namespace ::chip::DeviceManager; using namespace ::chip::Platform; using namespace ::chip::Credentials; +using namespace ::chip::app::Clusters; static AppDeviceCallbacks AppCallback; @@ -328,6 +329,15 @@ void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask) } } +bool emberAfBridgedActionsClusterInstantActionCallback(app::CommandHandler * commandObj, + const app::ConcreteCommandPath & commandPath, + const BridgedActions::Commands::InstantAction::DecodableType & commandData) +{ + // No actions are implemented, just return status NotFound. + commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::NotFound); + return true; +} + const EmberAfDeviceType gBridgedRootDeviceTypes[] = { { DEVICE_TYPE_ROOT_NODE, DEVICE_VERSION_DEFAULT }, { DEVICE_TYPE_BRIDGE, DEVICE_VERSION_DEFAULT } }; diff --git a/examples/bridge-app/linux/Device.cpp b/examples/bridge-app/linux/Device.cpp index e2d2122a49ce25..12e78324ddc04c 100644 --- a/examples/bridge-app/linux/Device.cpp +++ b/examples/bridge-app/linux/Device.cpp @@ -262,3 +262,15 @@ Room::Room(std::string name, uint16_t endpointListId, EndpointListTypeEnum type, mType = type; mIsVisible = isVisible; } + +Action::Action(uint16_t actionId, std::string name, ActionTypeEnum type, uint16_t endpointListId, uint16_t supportedCommands, + ActionStateEnum status, bool isVisible) +{ + mActionId = actionId; + mName = name; + mType = type; + mEndpointListId = endpointListId; + mSupportedCommands = supportedCommands; + mStatus = status; + mIsVisible = isVisible; +} diff --git a/examples/bridge-app/linux/bridged-actions-stub.cpp b/examples/bridge-app/linux/bridged-actions-stub.cpp index 21712982dea9f7..debf2538206d57 100644 --- a/examples/bridge-app/linux/bridged-actions-stub.cpp +++ b/examples/bridge-app/linux/bridged-actions-stub.cpp @@ -57,8 +57,26 @@ constexpr uint16_t BridgedActionsAttrAccess::ClusterRevision; CHIP_ERROR BridgedActionsAttrAccess::ReadActionListAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder) { - // Just return an empty list - return aEncoder.EncodeEmptyList(); + CHIP_ERROR err = aEncoder.EncodeList([&endpoint](const auto & encoder) -> CHIP_ERROR { + std::vector actionList = GetActionListInfo(endpoint); + + for (auto action : actionList) + { + if (action->getIsVisible()) + { + BridgedActions::Structs::ActionStruct::Type actionStruct = { action->getActionId(), + CharSpan::fromCharString(action->getName().c_str()), + action->getType(), + action->getEndpointListId(), + action->getSupportedCommands(), + action->getStatus() }; + ReturnErrorOnFailure(encoder.Encode(actionStruct)); + } + } + + return CHIP_NO_ERROR; + }); + return err; } CHIP_ERROR BridgedActionsAttrAccess::ReadEndpointListAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder) diff --git a/examples/bridge-app/linux/include/Device.h b/examples/bridge-app/linux/include/Device.h index 1eea58a71a2eb1..75ea521e90d4d8 100644 --- a/examples/bridge-app/linux/include/Device.h +++ b/examples/bridge-app/linux/include/Device.h @@ -217,3 +217,28 @@ class Room uint16_t mEndpointListId; chip::app::Clusters::BridgedActions::EndpointListTypeEnum mType; }; + +class Action +{ +public: + Action(uint16_t actionId, std::string name, chip::app::Clusters::BridgedActions::ActionTypeEnum type, uint16_t endpointListId, + uint16_t supportedCommands, chip::app::Clusters::BridgedActions::ActionStateEnum status, bool isVisible); + inline void setName(std::string name) { mName = name; }; + inline std::string getName() { return mName; }; + inline chip::app::Clusters::BridgedActions::ActionTypeEnum getType() { return mType; }; + inline chip::app::Clusters::BridgedActions::ActionStateEnum getStatus() { return mStatus; }; + inline uint16_t getActionId() { return mActionId; }; + inline uint16_t getEndpointListId() { return mEndpointListId; }; + inline uint16_t getSupportedCommands() { return mSupportedCommands; }; + inline void setIsVisible(bool isVisible) { mIsVisible = isVisible; }; + inline bool getIsVisible() { return mIsVisible; }; + +private: + std::string mName; + chip::app::Clusters::BridgedActions::ActionTypeEnum mType; + chip::app::Clusters::BridgedActions::ActionStateEnum mStatus; + uint16_t mActionId; + uint16_t mEndpointListId; + uint16_t mSupportedCommands; + bool mIsVisible; +}; diff --git a/examples/bridge-app/linux/include/main.h b/examples/bridge-app/linux/include/main.h index fe81d30685f7ec..df7ba595cd6ece 100644 --- a/examples/bridge-app/linux/include/main.h +++ b/examples/bridge-app/linux/include/main.h @@ -19,3 +19,5 @@ #pragma once std::vector GetEndpointListInfo(chip::EndpointId parentId); + +std::vector GetActionListInfo(chip::EndpointId parentId); diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index d0b411446a210b..db5eafb1bf5544 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -68,6 +69,7 @@ EndpointId gCurrentEndpointId; EndpointId gFirstDynamicEndpointId; Device * gDevices[CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT]; std::vector gRooms; +std::vector gActions; // ENDPOINT DEFINITIONS: // ================================================================================= @@ -168,6 +170,13 @@ Room room1("Room 1", 0xE001, BridgedActions::EndpointListTypeEnum::kRoom, true); Room room2("Room 2", 0xE002, BridgedActions::EndpointListTypeEnum::kRoom, true); Room room3("Zone 3", 0xE003, BridgedActions::EndpointListTypeEnum::kZone, false); +Action action1(0x1001, "Room 1 On", BridgedActions::ActionTypeEnum::kAutomation, 0xE001, 0x1, + BridgedActions::ActionStateEnum::kInactive, true); +Action action2(0x1002, "Turn On Room 2", BridgedActions::ActionTypeEnum::kAutomation, 0xE002, 0x01, + BridgedActions::ActionStateEnum::kInactive, true); +Action action3(0x1003, "Turn Off Room 1", BridgedActions::ActionTypeEnum::kAutomation, 0xE003, 0x01, + BridgedActions::ActionStateEnum::kInactive, false); + // --------------------------------------------------------------------------- // // SWITCH ENDPOINT: contains the following clusters: @@ -360,6 +369,11 @@ std::vector GetEndpointListInfo(chip::EndpointId parentId) return infoList; } +std::vector GetActionListInfo(chip::EndpointId parentId) +{ + return gActions; +} + void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask) { if (itemChangedMask & Device::kChanged_Reachable) @@ -640,6 +654,82 @@ EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, Cluster return ret; } +void runOnOffRoomAction(Room * room, bool actionOn, EndpointId endpointId, uint16_t actionID, uint32_t invokeID, bool hasInvokeID) +{ + if (hasInvokeID) + { + BridgedActions::Events::StateChanged::Type event{ actionID, invokeID, BridgedActions::ActionStateEnum::kActive }; + EventNumber eventNumber; + chip::app::LogEvent(event, endpointId, eventNumber); + } + + // Check and run the action for ActionLight1 - ActionLight4 + if (room->getName().compare(ActionLight1.GetLocation()) == 0) + { + ActionLight1.SetOnOff(actionOn); + } + if (room->getName().compare(ActionLight2.GetLocation()) == 0) + { + ActionLight2.SetOnOff(actionOn); + } + if (room->getName().compare(ActionLight3.GetLocation()) == 0) + { + ActionLight3.SetOnOff(actionOn); + } + if (room->getName().compare(ActionLight4.GetLocation()) == 0) + { + ActionLight4.SetOnOff(actionOn); + } + + if (hasInvokeID) + { + BridgedActions::Events::StateChanged::Type event{ actionID, invokeID, BridgedActions::ActionStateEnum::kInactive }; + EventNumber eventNumber; + chip::app::LogEvent(event, endpointId, eventNumber); + } +} + +bool emberAfBridgedActionsClusterInstantActionCallback(app::CommandHandler * commandObj, + const app::ConcreteCommandPath & commandPath, + const BridgedActions::Commands::InstantAction::DecodableType & commandData) +{ + bool hasInvokeID = false; + uint32_t invokeID = 0; + EndpointId endpointID = commandPath.mEndpointId; + auto & actionID = commandData.actionID; + + if (commandData.invokeID.HasValue()) + { + hasInvokeID = true; + invokeID = commandData.invokeID.Value(); + } + + if (actionID == action1.getActionId() && action1.getIsVisible()) + { + // Turn On Lights in Room 1 + runOnOffRoomAction(&room1, true, endpointID, actionID, invokeID, hasInvokeID); + commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::Success); + return true; + } + if (actionID == action2.getActionId() && action2.getIsVisible()) + { + // Turn On Lights in Room 2 + runOnOffRoomAction(&room2, true, endpointID, actionID, invokeID, hasInvokeID); + commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::Success); + return true; + } + if (actionID == action3.getActionId() && action3.getIsVisible()) + { + // Turn Off Lights in Room 1 + runOnOffRoomAction(&room1, false, endpointID, actionID, invokeID, hasInvokeID); + commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::Success); + return true; + } + + commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::NotFound); + return true; +} + void ApplicationInit() {} const EmberAfDeviceType gBridgedOnOffDeviceTypes[] = { { DEVICE_TYPE_LO_ON_OFF_LIGHT, DEVICE_VERSION_DEFAULT }, @@ -744,6 +834,21 @@ void * bridge_polling_thread(void * context) room3.setIsVisible(true); ActionLight2.SetZone("Zone 3"); } + if (ch == 'm') + { + // TC-ACT-2.2 step 3c, rename "Turn on Room 1 lights" + action1.setName("Turn On Room 1"); + } + if (ch == 'n') + { + // TC-ACT-2.2 step 3f, remove "Turn on Room 2 lights" + action2.setIsVisible(false); + } + if (ch == 'o') + { + // TC-ACT-2.2 step 3i, add "Turn off Room 1 renamed lights" + action3.setIsVisible(true); + } continue; } @@ -866,6 +971,10 @@ int main(int argc, char * argv[]) gRooms.push_back(&room2); gRooms.push_back(&room3); + gActions.push_back(&action1); + gActions.push_back(&action2); + gActions.push_back(&action3); + { pthread_t poll_thread; int res = pthread_create(&poll_thread, nullptr, bridge_polling_thread, nullptr); diff --git a/zzz_generated/bridge-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/bridge-app/zap-generated/IMClusterCommandHandler.cpp index 93cd15f439ed14..198b5688cd957c 100644 --- a/zzz_generated/bridge-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/bridge-app/zap-generated/IMClusterCommandHandler.cpp @@ -99,6 +99,43 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace AdministratorCommissioning +namespace BridgedActions { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::InstantAction::Id: { + Commands::InstantAction::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfBridgedActionsClusterInstantActionCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace BridgedActions + namespace DiagnosticLogs { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -729,6 +766,9 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::AdministratorCommissioning::Id: Clusters::AdministratorCommissioning::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; + case Clusters::BridgedActions::Id: + Clusters::BridgedActions::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; case Clusters::DiagnosticLogs::Id: Clusters::DiagnosticLogs::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; diff --git a/zzz_generated/bridge-app/zap-generated/endpoint_config.h b/zzz_generated/bridge-app/zap-generated/endpoint_config.h index 2959aa6b9f8e48..3ccf64ec0b6f0a 100644 --- a/zzz_generated/bridge-app/zap-generated/endpoint_config.h +++ b/zzz_generated/bridge-app/zap-generated/endpoint_config.h @@ -38,6 +38,11 @@ \ /* 6 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Bridged Actions (server), big-endian */ \ + \ + /* 14 - setup url, */ \ + 0, 19, 'h', 't', 't', 'p', 's', ':', '/', '/', 'e', 'x', 'a', 'm', 'p', 'l', 'e', '.', 'c', 'o', 'm', \ } #else // !BIGENDIAN_CPU @@ -53,11 +58,16 @@ \ /* 6 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Bridged Actions (server), little-endian */ \ + \ + /* 14 - setup url, */ \ + 0, 19, 'h', 't', 't', 'p', 's', ':', '/', '/', 'e', 'x', 'a', 'm', 'p', 'l', 'e', '.', 'c', 'o', 'm', \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (2) +#define GENERATED_DEFAULTS_COUNT (3) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -90,7 +100,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 240 +#define GENERATED_ATTRIBUTE_COUNT 241 #define GENERATED_ATTRIBUTES \ { \ \ @@ -439,6 +449,7 @@ /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* action list */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* endpoint list */ \ + { 0x00000002, ZAP_TYPE(LONG_CHAR_STRING), 514, 0, ZAP_LONG_DEFAULTS_INDEX(14) }, /* setup url */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ @@ -600,14 +611,18 @@ 0x00000000 /* Identify */, \ 0x00000040 /* TriggerEffect */, \ chip::kInvalidCommandId /* end of list */, \ - /* Endpoint: 2, Cluster: On/Off (server) */\ + /* Endpoint: 1, Cluster: Bridged Actions (server) */\ /* AcceptedCommandList (index=57) */ \ + 0x00000000 /* InstantAction */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 2, Cluster: On/Off (server) */\ + /* AcceptedCommandList (index=59) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: Level Control (server) */\ - /* AcceptedCommandList (index=61) */ \ + /* AcceptedCommandList (index=63) */ \ 0x00000000 /* MoveToLevel */, \ 0x00000001 /* Move */, \ 0x00000002 /* Step */, \ @@ -872,39 +887,39 @@ /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ .clusterId = 0x00000025, \ .attributes = ZAP_ATTRIBUTE_INDEX(206), \ - .attributeCount = 4, \ - .clusterSize = 6, \ + .attributeCount = 5, \ + .clusterSize = 520, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 57 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 2, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(210), \ + .attributes = ZAP_ATTRIBUTE_INDEX(211), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 57 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 59 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 2, Cluster: Level Control (server) */ \ .clusterId = 0x00000008, \ - .attributes = ZAP_ATTRIBUTE_INDEX(213), \ + .attributes = ZAP_ATTRIBUTE_INDEX(214), \ .attributeCount = 16, \ .clusterSize = 27, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 61 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 63 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(229), \ + .attributes = ZAP_ATTRIBUTE_INDEX(230), \ .attributeCount = 6, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -915,7 +930,7 @@ { \ /* Endpoint: 2, Cluster: Switch (server) */ \ .clusterId = 0x0000003B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(235), \ + .attributes = ZAP_ATTRIBUTE_INDEX(236), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -934,11 +949,11 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 19, 230 }, { ZAP_CLUSTER_INDEX(19), 4, 21 }, { ZAP_CLUSTER_INDEX(23), 4, 47 }, \ + { ZAP_CLUSTER_INDEX(0), 19, 230 }, { ZAP_CLUSTER_INDEX(19), 4, 535 }, { ZAP_CLUSTER_INDEX(23), 4, 47 }, \ } // Largest attribute size is needed for various buffers -#define ATTRIBUTE_LARGEST (259) +#define ATTRIBUTE_LARGEST (515) static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, "ATTRIBUTE_LARGEST larger than expected"); @@ -946,7 +961,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (37) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (298) +#define ATTRIBUTE_MAX_SIZE (812) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) From b87244d1c82e6de6e516d78e7c002926b95f4549 Mon Sep 17 00:00:00 2001 From: Evgeny Margolis Date: Thu, 21 Jul 2022 11:28:35 -0700 Subject: [PATCH 02/15] Remove Obsolete TODOs in the AddTrustedRootCertificate and AddNOC Commands. (#21060) --- .../operational-credentials-server.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp index ce29aaea9c5fb1..35c4ec99e4ccd3 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -668,9 +668,6 @@ bool emberAfOperationalCredentialsClusterAddNOCCallback(app::CommandHandler * co // Flush acks before really slow work commandObj->FlushAcksRightAwayOnSlowCommand(); - // TODO: Add support for calling AddNOC without a prior AddTrustedRootCertificate if - // the root properly matches an existing one. - // We can't possibly have a matching root based on the fact that we don't have // a shared root store. Therefore we would later fail path validation due to // missing root. Let's early-bail with InvalidNOC. @@ -1197,8 +1194,6 @@ bool emberAfOperationalCredentialsClusterAddTrustedRootCertificateCallback( // Flush acks before really slow work commandObj->FlushAcksRightAwayOnSlowCommand(); - // TODO(#17208): Handle checking for byte-to-byte match with existing fabrics before allowing the add - err = ValidateChipRCAC(rootCertificate); VerifyOrExit(err == CHIP_NO_ERROR, finalStatus = Status::InvalidCommand); From 1d88b3270ccc052cc30d20f2cadaf43b6f5d88ed Mon Sep 17 00:00:00 2001 From: cpagravel Date: Thu, 21 Jul 2022 11:47:05 -0700 Subject: [PATCH 03/15] Chef - Add automated_test_stamp to Chef CD builds (#21059) --- examples/chef/cicd_config.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/chef/cicd_config.json b/examples/chef/cicd_config.json index f78baa7e3d3eee..27eafbe67631d3 100644 --- a/examples/chef/cicd_config.json +++ b/examples/chef/cicd_config.json @@ -2,14 +2,14 @@ "ci_allow_list": ["rootnode_dimmablelight_bCwGYSDpoe"], "cd_platforms": { "linux": { - "linux_x86": ["--cpu_type", "x64"], - "linux_arm64_ipv6only": ["--cpu_type", "arm64", "--ipv6only"] + "linux_x86": ["--cpu_type", "x64", "-a"], + "linux_arm64_ipv6only": ["--cpu_type", "arm64", "--ipv6only", "-a"] }, "esp32": { - "m5stack": [] + "m5stack": ["-a"] }, "nrfconnect": { - "nrf52840dk": [] + "nrf52840dk": ["-a"] } } } From e15af6f8a31ed3a183e075c02154e40736f6773e Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Thu, 21 Jul 2022 13:41:12 -0700 Subject: [PATCH 04/15] [esp32]: Do not setup DeviceInfoProvider within PlatformMgr (#21039) --- .../all-clusters-app/esp32/main/AppTask.cpp | 6 + .../esp32/main/CMakeLists.txt | 2 + .../light-switch-app/esp32/main/AppTask.cpp | 4 +- .../esp32/main/CMakeLists.txt | 2 + examples/lighting-app/esp32/main/AppTask.cpp | 5 + .../lighting-app/esp32/main/CMakeLists.txt | 6 +- examples/lock-app/esp32/main/AppTask.cpp | 5 + examples/lock-app/esp32/main/CMakeLists.txt | 8 +- src/platform/ESP32/BUILD.gn | 2 - src/platform/ESP32/DeviceInfoProviderImpl.cpp | 376 ------------------ src/platform/ESP32/DeviceInfoProviderImpl.h | 107 ----- src/platform/ESP32/PlatformManagerImpl.cpp | 2 - 12 files changed, 33 insertions(+), 492 deletions(-) delete mode 100644 src/platform/ESP32/DeviceInfoProviderImpl.cpp delete mode 100644 src/platform/ESP32/DeviceInfoProviderImpl.h diff --git a/examples/all-clusters-app/esp32/main/AppTask.cpp b/examples/all-clusters-app/esp32/main/AppTask.cpp index 6db8c63b3c14ec..04604ba419bd17 100644 --- a/examples/all-clusters-app/esp32/main/AppTask.cpp +++ b/examples/all-clusters-app/esp32/main/AppTask.cpp @@ -26,6 +26,7 @@ #include "esp_log.h" #include "esp_spi_flash.h" #include "freertos/FreeRTOS.h" +#include #include #define APP_TASK_NAME "APP" @@ -39,6 +40,8 @@ namespace { QueueHandle_t sAppEventQueue; TaskHandle_t sAppTaskHandle; +chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; + } // namespace AppTask AppTask::sAppTask; @@ -84,6 +87,9 @@ CHIP_ERROR AppTask::Init() #if CONFIG_HAVE_DISPLAY InitDeviceDisplay(); #endif + + chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); + return err; } diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index 4f8db9d121402d..40697450af516b 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -21,6 +21,7 @@ set(PRIV_INCLUDE_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/all-clusters-app" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/include" "${CMAKE_CURRENT_LIST_DIR}/include" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" ) set(SRC_DIRS_LIST @@ -28,6 +29,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/all-clusters-app/zap-generated" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/route_hook" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/ota" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" diff --git a/examples/light-switch-app/esp32/main/AppTask.cpp b/examples/light-switch-app/esp32/main/AppTask.cpp index f29b4a0927f783..6a1531940a1197 100644 --- a/examples/light-switch-app/esp32/main/AppTask.cpp +++ b/examples/light-switch-app/esp32/main/AppTask.cpp @@ -20,6 +20,7 @@ #include "BindingHandler.h" #include "esp_log.h" #include "freertos/FreeRTOS.h" +#include #define APP_TASK_NAME "APP" #define APP_EVENT_QUEUE_SIZE 10 @@ -37,6 +38,7 @@ namespace { QueueHandle_t sAppEventQueue; TaskHandle_t sAppTaskHandle; +chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; } // namespace @@ -62,8 +64,8 @@ CHIP_ERROR AppTask::Init() CHIP_ERROR err = CHIP_NO_ERROR; AppButton.Init(); - AppButton.SetButtonPressCallback(ButtonPressCallback); + chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); return err; } diff --git a/examples/light-switch-app/esp32/main/CMakeLists.txt b/examples/light-switch-app/esp32/main/CMakeLists.txt index 959a9bdb37f123..3abe09f4040e8b 100644 --- a/examples/light-switch-app/esp32/main/CMakeLists.txt +++ b/examples/light-switch-app/esp32/main/CMakeLists.txt @@ -19,12 +19,14 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/light-switch-app" "${CMAKE_CURRENT_LIST_DIR}/include" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" SRC_DIRS "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/light-switch-app/zap-generated" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/route_hook" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/ota" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" diff --git a/examples/lighting-app/esp32/main/AppTask.cpp b/examples/lighting-app/esp32/main/AppTask.cpp index bfa8a8d1401973..f175af3a3c5eeb 100644 --- a/examples/lighting-app/esp32/main/AppTask.cpp +++ b/examples/lighting-app/esp32/main/AppTask.cpp @@ -20,6 +20,7 @@ #include "esp_log.h" #include "freertos/FreeRTOS.h" +#include #include #include #include @@ -46,6 +47,8 @@ constexpr EndpointId kLightEndpointId = 1; QueueHandle_t sAppEventQueue; TaskHandle_t sAppTaskHandle; +chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; + } // namespace AppTask AppTask::sAppTask; @@ -74,6 +77,8 @@ CHIP_ERROR AppTask::Init() AppButton.SetButtonPressCallback(ButtonPressCallback); + chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); + return err; } diff --git a/examples/lighting-app/esp32/main/CMakeLists.txt b/examples/lighting-app/esp32/main/CMakeLists.txt index 93ff9dc67217bd..c30c6995c44e8f 100644 --- a/examples/lighting-app/esp32/main/CMakeLists.txt +++ b/examples/lighting-app/esp32/main/CMakeLists.txt @@ -18,6 +18,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lighting-app" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/lighting-app/lighting-common/include" "${CMAKE_CURRENT_LIST_DIR}/include" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" @@ -26,11 +27,12 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lighting-app/zap-generated" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/lighting-app/lighting-common/src" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/route_hook" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/ota" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/ota" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" diff --git a/examples/lock-app/esp32/main/AppTask.cpp b/examples/lock-app/esp32/main/AppTask.cpp index bedaf75b6946e2..b78de7f2cd30a4 100644 --- a/examples/lock-app/esp32/main/AppTask.cpp +++ b/examples/lock-app/esp32/main/AppTask.cpp @@ -21,6 +21,7 @@ #include "Button.h" #include "LEDWidget.h" #include "esp_log.h" +#include #include #include #include @@ -56,6 +57,8 @@ QueueHandle_t sAppEventQueue; bool sHaveBLEConnections = false; StackType_t appStack[APP_TASK_STACK_SIZE / sizeof(StackType_t)]; + +chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; } // namespace using namespace ::chip::DeviceLayer; @@ -103,6 +106,8 @@ CHIP_ERROR AppTask::Init() sLockLED.Set(!BoltLockMgr().IsUnlocked()); + chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); + chip::DeviceLayer::SystemLayer().ScheduleWork(UpdateClusterState, nullptr); ConfigurationMgr().LogDeviceConfig(); diff --git a/examples/lock-app/esp32/main/CMakeLists.txt b/examples/lock-app/esp32/main/CMakeLists.txt index 24fa3cc6ed70c7..0c5816f69eb5fd 100644 --- a/examples/lock-app/esp32/main/CMakeLists.txt +++ b/examples/lock-app/esp32/main/CMakeLists.txt @@ -21,6 +21,7 @@ idf_component_register(INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/pw_sys_io/public" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" @@ -30,9 +31,10 @@ idf_component_register(INCLUDE_DIRS "${IDF_PATH}/components/freertos/include/freertos" SRC_DIRS "${CMAKE_CURRENT_LIST_DIR}" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated" @@ -141,15 +143,17 @@ target_compile_options(${COMPONENT_LIB} PRIVATE else (CONFIG_ENABLE_PW_RPC) idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lock-app/" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_CURRENT_LIST_DIR}/include" SRC_DIRS "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lock-app/zap-generated" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/route_hook" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" diff --git a/src/platform/ESP32/BUILD.gn b/src/platform/ESP32/BUILD.gn index 822ffa58efcd5c..9f38280a1dfae9 100644 --- a/src/platform/ESP32/BUILD.gn +++ b/src/platform/ESP32/BUILD.gn @@ -34,8 +34,6 @@ static_library("ESP32") { "ConfigurationManagerImpl.h", "ConnectivityManagerImpl.cpp", "ConnectivityManagerImpl.h", - "DeviceInfoProviderImpl.cpp", - "DeviceInfoProviderImpl.h", "DeviceNetworkProvisioningDelegateImpl.cpp", "DeviceNetworkProvisioningDelegateImpl.h", "DiagnosticDataProviderImpl.cpp", diff --git a/src/platform/ESP32/DeviceInfoProviderImpl.cpp b/src/platform/ESP32/DeviceInfoProviderImpl.cpp deleted file mode 100644 index ff28ee8c585002..00000000000000 --- a/src/platform/ESP32/DeviceInfoProviderImpl.cpp +++ /dev/null @@ -1,376 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include -#include -#include -#include - -#include -#include - -namespace chip { -namespace DeviceLayer { - -namespace { -constexpr TLV::Tag kLabelNameTag = TLV::ContextTag(0); -constexpr TLV::Tag kLabelValueTag = TLV::ContextTag(1); -} // anonymous namespace - -DeviceInfoProviderImpl & DeviceInfoProviderImpl::GetDefaultInstance() -{ - static DeviceInfoProviderImpl sInstance; - return sInstance; -} - -DeviceInfoProvider::FixedLabelIterator * DeviceInfoProviderImpl::IterateFixedLabel(EndpointId endpoint) -{ - return new FixedLabelIteratorImpl(endpoint); -} - -DeviceInfoProviderImpl::FixedLabelIteratorImpl::FixedLabelIteratorImpl(EndpointId endpoint) : mEndpoint(endpoint) -{ - mIndex = 0; -} - -size_t DeviceInfoProviderImpl::FixedLabelIteratorImpl::Count() -{ - // TODO: Need to provide a script which can generate a binary file which contains device information and - // update the DeviceInfoProvider which can read the information from it. - // Now we use the hardcoded labellist. - return 4; -} - -bool DeviceInfoProviderImpl::FixedLabelIteratorImpl::Next(FixedLabelType & output) -{ - bool retval = true; - - // TODO: Need to provide a script which can generate a binary file which contains device information and - // update the DeviceInfoProvider which can read the information from it. - // Now we use the hardcoded labellist. - CHIP_ERROR err = CHIP_NO_ERROR; - - const char * labelPtr = nullptr; - const char * valuePtr = nullptr; - - VerifyOrReturnError(mIndex < 4, false); - - ChipLogProgress(DeviceLayer, "Get the fixed label with index:%d at endpoint:%d", mIndex, mEndpoint); - - switch (mIndex) - { - case 0: - labelPtr = "room"; - valuePtr = "bedroom 2"; - break; - case 1: - labelPtr = "orientation"; - valuePtr = "North"; - break; - case 2: - labelPtr = "floor"; - valuePtr = "2"; - break; - case 3: - labelPtr = "direction"; - valuePtr = "up"; - break; - default: - err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; - break; - } - - if (err == CHIP_NO_ERROR) - { - VerifyOrReturnError(strlen(labelPtr) <= kMaxLabelNameLength, false); - VerifyOrReturnError(strlen(valuePtr) <= kMaxLabelValueLength, false); - - Platform::CopyString(mFixedLabelNameBuf, kMaxLabelNameLength + 1, labelPtr); - Platform::CopyString(mFixedLabelValueBuf, kMaxLabelValueLength + 1, valuePtr); - - output.label = CharSpan::fromCharString(mFixedLabelNameBuf); - output.value = CharSpan::fromCharString(mFixedLabelValueBuf); - - mIndex++; - - retval = true; - } - else - { - retval = false; - } - - return retval; -} - -CHIP_ERROR DeviceInfoProviderImpl::SetUserLabelLength(EndpointId endpoint, size_t val) -{ - DefaultStorageKeyAllocator keyAlloc; - - return mStorage->SyncSetKeyValue(keyAlloc.UserLabelLengthKey(endpoint), &val, static_cast(sizeof(val))); -} - -CHIP_ERROR DeviceInfoProviderImpl::GetUserLabelLength(EndpointId endpoint, size_t & val) -{ - DefaultStorageKeyAllocator keyAlloc; - uint16_t len = static_cast(sizeof(val)); - - return mStorage->SyncGetKeyValue(keyAlloc.UserLabelLengthKey(endpoint), &val, len); -} - -CHIP_ERROR DeviceInfoProviderImpl::SetUserLabelAt(EndpointId endpoint, size_t index, const UserLabelType & userLabel) -{ - DefaultStorageKeyAllocator keyAlloc; - uint8_t buf[UserLabelTLVMaxSize()]; - TLV::TLVWriter writer; - writer.Init(buf); - - TLV::TLVType outerType; - ReturnErrorOnFailure(writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, outerType)); - ReturnErrorOnFailure(writer.PutString(kLabelNameTag, userLabel.label)); - ReturnErrorOnFailure(writer.PutString(kLabelValueTag, userLabel.value)); - ReturnErrorOnFailure(writer.EndContainer(outerType)); - - return mStorage->SyncSetKeyValue(keyAlloc.UserLabelIndexKey(endpoint, index), buf, - static_cast(writer.GetLengthWritten())); -} - -DeviceInfoProvider::UserLabelIterator * DeviceInfoProviderImpl::IterateUserLabel(EndpointId endpoint) -{ - return new UserLabelIteratorImpl(*this, endpoint); -} - -DeviceInfoProviderImpl::UserLabelIteratorImpl::UserLabelIteratorImpl(DeviceInfoProviderImpl & provider, EndpointId endpoint) : - mProvider(provider), mEndpoint(endpoint) -{ - size_t total = 0; - - ReturnOnFailure(mProvider.GetUserLabelLength(mEndpoint, total)); - mTotal = total; - mIndex = 0; -} - -bool DeviceInfoProviderImpl::UserLabelIteratorImpl::Next(UserLabelType & output) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - VerifyOrReturnError(mIndex < mTotal, false); - - DefaultStorageKeyAllocator keyAlloc; - uint8_t buf[UserLabelTLVMaxSize()]; - uint16_t len = static_cast(sizeof(buf)); - - err = mProvider.mStorage->SyncGetKeyValue(keyAlloc.UserLabelIndexKey(mEndpoint, mIndex), buf, len); - VerifyOrReturnError(err == CHIP_NO_ERROR, false); - - TLV::ContiguousBufferTLVReader reader; - reader.Init(buf); - err = reader.Next(TLV::kTLVType_Structure, TLV::AnonymousTag()); - VerifyOrReturnError(err == CHIP_NO_ERROR, false); - - TLV::TLVType containerType; - VerifyOrReturnError(reader.EnterContainer(containerType) == CHIP_NO_ERROR, false); - - chip::CharSpan label; - chip::CharSpan value; - - VerifyOrReturnError(reader.Next(kLabelNameTag) == CHIP_NO_ERROR, false); - VerifyOrReturnError(reader.Get(label) == CHIP_NO_ERROR, false); - - VerifyOrReturnError(reader.Next(kLabelValueTag) == CHIP_NO_ERROR, false); - VerifyOrReturnError(reader.Get(value) == CHIP_NO_ERROR, false); - - VerifyOrReturnError(reader.VerifyEndOfContainer() == CHIP_NO_ERROR, false); - VerifyOrReturnError(reader.ExitContainer(containerType) == CHIP_NO_ERROR, false); - - Platform::CopyString(mUserLabelNameBuf, label); - Platform::CopyString(mUserLabelValueBuf, value); - - output.label = CharSpan::fromCharString(mUserLabelNameBuf); - output.value = CharSpan::fromCharString(mUserLabelValueBuf); - - mIndex++; - - return true; -} - -DeviceInfoProvider::SupportedLocalesIterator * DeviceInfoProviderImpl::IterateSupportedLocales() -{ - return new SupportedLocalesIteratorImpl(); -} - -size_t DeviceInfoProviderImpl::SupportedLocalesIteratorImpl::Count() -{ - // TODO: Need to provide a script which can generate a binary file which contains device information and - // update the DeviceInfoProvider which can read the information from it. - // Now we use the hardcoded SupportedLocales. - // {("en-US"), ("de-DE"), ("fr-FR"), ("en-GB"), ("es-ES"), ("zh-CN"), ("it-IT"), ("ja-JP")} - - return 8; -} - -bool DeviceInfoProviderImpl::SupportedLocalesIteratorImpl::Next(CharSpan & output) -{ - bool retval = true; - - // TODO: Need to provide a script which can generate a binary file which contains device information and - // update the DeviceInfoProvider which can read the information from it. - // Now we use the hardcoded SupportedLocales. - CHIP_ERROR err = CHIP_NO_ERROR; - - const char * activeLocalePtr = nullptr; - - VerifyOrReturnError(mIndex < 8, false); - - switch (mIndex) - { - case 0: - activeLocalePtr = "en-US"; - break; - case 1: - activeLocalePtr = "de-DE"; - break; - case 2: - activeLocalePtr = "fr-FR"; - break; - case 3: - activeLocalePtr = "en-GB"; - break; - case 4: - activeLocalePtr = "es-ES"; - break; - case 5: - activeLocalePtr = "zh-CN"; - break; - case 6: - activeLocalePtr = "it-IT"; - break; - case 7: - activeLocalePtr = "ja-JP"; - break; - default: - err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; - break; - } - - if (err == CHIP_NO_ERROR) - { - VerifyOrReturnError(strlen(activeLocalePtr) <= kMaxActiveLocaleLength, false); - - Platform::CopyString(mActiveLocaleBuf, kMaxActiveLocaleLength + 1, activeLocalePtr); - - output = CharSpan::fromCharString(mActiveLocaleBuf); - - mIndex++; - - retval = true; - } - else - { - retval = false; - } - - return retval; -} - -DeviceInfoProvider::SupportedCalendarTypesIterator * DeviceInfoProviderImpl::IterateSupportedCalendarTypes() -{ - return new SupportedCalendarTypesIteratorImpl(); -} - -size_t DeviceInfoProviderImpl::SupportedCalendarTypesIteratorImpl::Count() -{ - // TODO: Need to provide a script which can generate a binary file which contains device information and - // update the DeviceInfoProvider which can read the information from it. - // Now we use the hardcoded SupportedCalendarTypes. - // {("kBuddhist"), ("kChinese"), ("kCoptic"), ("kEthiopian"), ("kGregorian"), ("kHebrew"), ("kIndian"), ("kJapanese"), - // ("kKorean"), ("kPersian"), ("kTaiwanese"), ("kIslamic")} - - return 12; -} - -bool DeviceInfoProviderImpl::SupportedCalendarTypesIteratorImpl::Next(CalendarType & output) -{ - bool retval = true; - - // TODO: Need to provide a script which can generate a binary file which contains device information and - // update the DeviceInfoProvider which can read the information from it. - // Now we use the hardcoded SupportedCalendarTypes. - CHIP_ERROR err = CHIP_NO_ERROR; - - VerifyOrReturnError(mIndex < 12, false); - - switch (mIndex) - { - case 0: - output = app::Clusters::TimeFormatLocalization::CalendarType::kBuddhist; - break; - case 1: - output = app::Clusters::TimeFormatLocalization::CalendarType::kChinese; - break; - case 2: - output = app::Clusters::TimeFormatLocalization::CalendarType::kCoptic; - break; - case 3: - output = app::Clusters::TimeFormatLocalization::CalendarType::kEthiopian; - break; - case 4: - output = app::Clusters::TimeFormatLocalization::CalendarType::kGregorian; - break; - case 5: - output = app::Clusters::TimeFormatLocalization::CalendarType::kHebrew; - break; - case 6: - output = app::Clusters::TimeFormatLocalization::CalendarType::kIndian; - break; - case 7: - output = app::Clusters::TimeFormatLocalization::CalendarType::kJapanese; - break; - case 8: - output = app::Clusters::TimeFormatLocalization::CalendarType::kKorean; - break; - case 9: - output = app::Clusters::TimeFormatLocalization::CalendarType::kPersian; - break; - case 10: - output = app::Clusters::TimeFormatLocalization::CalendarType::kTaiwanese; - break; - case 11: - output = app::Clusters::TimeFormatLocalization::CalendarType::kIslamic; - break; - default: - err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; - break; - } - - if (err == CHIP_NO_ERROR) - { - mIndex++; - retval = true; - } - else - { - retval = false; - } - - return retval; -} - -} // namespace DeviceLayer -} // namespace chip diff --git a/src/platform/ESP32/DeviceInfoProviderImpl.h b/src/platform/ESP32/DeviceInfoProviderImpl.h deleted file mode 100644 index 856e15498ab46f..00000000000000 --- a/src/platform/ESP32/DeviceInfoProviderImpl.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#pragma once - -#include -#include -#include - -namespace chip { -namespace DeviceLayer { - -class DeviceInfoProviderImpl : public DeviceInfoProvider -{ -public: - DeviceInfoProviderImpl() = default; - ~DeviceInfoProviderImpl() override {} - - // Iterators - FixedLabelIterator * IterateFixedLabel(EndpointId endpoint) override; - UserLabelIterator * IterateUserLabel(EndpointId endpoint) override; - SupportedLocalesIterator * IterateSupportedLocales() override; - SupportedCalendarTypesIterator * IterateSupportedCalendarTypes() override; - - static DeviceInfoProviderImpl & GetDefaultInstance(); - -protected: - class FixedLabelIteratorImpl : public FixedLabelIterator - { - public: - FixedLabelIteratorImpl(EndpointId endpoint); - size_t Count() override; - bool Next(FixedLabelType & output) override; - void Release() override { delete this; } - - private: - EndpointId mEndpoint = 0; - size_t mIndex = 0; - char mFixedLabelNameBuf[kMaxLabelNameLength + 1]; - char mFixedLabelValueBuf[kMaxLabelValueLength + 1]; - }; - - class UserLabelIteratorImpl : public UserLabelIterator - { - public: - UserLabelIteratorImpl(DeviceInfoProviderImpl & provider, EndpointId endpoint); - size_t Count() override { return mTotal; } - bool Next(UserLabelType & output) override; - void Release() override { delete this; } - - private: - DeviceInfoProviderImpl & mProvider; - EndpointId mEndpoint = 0; - size_t mIndex = 0; - size_t mTotal = 0; - char mUserLabelNameBuf[kMaxLabelNameLength + 1]; - char mUserLabelValueBuf[kMaxLabelValueLength + 1]; - }; - - class SupportedLocalesIteratorImpl : public SupportedLocalesIterator - { - public: - SupportedLocalesIteratorImpl() = default; - size_t Count() override; - bool Next(CharSpan & output) override; - void Release() override { delete this; } - - private: - size_t mIndex = 0; - char mActiveLocaleBuf[kMaxActiveLocaleLength + 1]; - }; - - class SupportedCalendarTypesIteratorImpl : public SupportedCalendarTypesIterator - { - public: - SupportedCalendarTypesIteratorImpl() = default; - size_t Count() override; - bool Next(CalendarType & output) override; - void Release() override { delete this; } - - private: - size_t mIndex = 0; - }; - - CHIP_ERROR SetUserLabelLength(EndpointId endpoint, size_t val) override; - CHIP_ERROR GetUserLabelLength(EndpointId endpoint, size_t & val) override; - CHIP_ERROR SetUserLabelAt(EndpointId endpoint, size_t index, const UserLabelType & userLabel) override; - -private: - static constexpr size_t UserLabelTLVMaxSize() { return TLV::EstimateStructOverhead(kMaxLabelNameLength, kMaxLabelValueLength); } -}; - -} // namespace DeviceLayer -} // namespace chip diff --git a/src/platform/ESP32/PlatformManagerImpl.cpp b/src/platform/ESP32/PlatformManagerImpl.cpp index 535674b8c2782a..d387814f3241f2 100644 --- a/src/platform/ESP32/PlatformManagerImpl.cpp +++ b/src/platform/ESP32/PlatformManagerImpl.cpp @@ -27,7 +27,6 @@ #include #include -#include #include #include #include @@ -61,7 +60,6 @@ static int app_entropy_source(void * data, unsigned char * output, size_t len, s CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) { SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); - SetDeviceInfoProvider(&DeviceInfoProviderImpl::GetDefaultInstance()); esp_err_t err; // Arrange for CHIP-encapsulated ESP32 errors to be translated to text From 4ce818ebb9a65d395838ab563854240f70950113 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 21 Jul 2022 16:50:53 -0400 Subject: [PATCH 05/15] Improve discovery logging a bit. (#21056) 1) In shared "platform" discovery code, log when we discovered an operational id or a commissionable instance and what the TXT records were. 2) In Darwin code, do Discovery, not DeviceLayer logging and improve some of the log messages. The intent is to make it a little clearer on failure where in the pipeline things stop propagating information. --- src/lib/dnssd/Discovery_ImplPlatform.cpp | 1 + src/lib/dnssd/Resolver.h | 2 ++ src/platform/Darwin/DnssdContexts.cpp | 11 ++++++----- src/platform/Darwin/DnssdImpl.cpp | 14 +++++++------- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/lib/dnssd/Discovery_ImplPlatform.cpp b/src/lib/dnssd/Discovery_ImplPlatform.cpp index 0626daf57ca137..5cf4821b7bf1a4 100644 --- a/src/lib/dnssd/Discovery_ImplPlatform.cpp +++ b/src/lib/dnssd/Discovery_ImplPlatform.cpp @@ -78,6 +78,7 @@ static void HandleNodeResolve(void * context, DnssdService * result, const Span< FillNodeDataFromTxt(key, val, nodeData.commissionData); } + nodeData.LogDetail(); proxy->OnNodeDiscovered(nodeData); proxy->Release(); } diff --git a/src/lib/dnssd/Resolver.h b/src/lib/dnssd/Resolver.h index 356fdf92f360e8..140a71617645b5 100644 --- a/src/lib/dnssd/Resolver.h +++ b/src/lib/dnssd/Resolver.h @@ -125,6 +125,7 @@ struct CommonResolutionData { ChipLogDetail(Discovery, "\tMrp Interval active: not present"); } + ChipLogDetail(Discovery, "\tTCP Supported: %d", supportsTcp); } }; @@ -243,6 +244,7 @@ struct DiscoveredNodeData void LogDetail() const { + ChipLogDetail(Discovery, "Discovered node:"); resolutionData.LogDetail(); commissionData.LogDetail(); } diff --git a/src/platform/Darwin/DnssdContexts.cpp b/src/platform/Darwin/DnssdContexts.cpp index 2699bec216983b..8a63a48752f8e1 100644 --- a/src/platform/Darwin/DnssdContexts.cpp +++ b/src/platform/Darwin/DnssdContexts.cpp @@ -262,7 +262,7 @@ RegisterContext::RegisterContext(const char * sType, DnssdPublishCallback cb, vo void RegisterContext::DispatchFailure(DNSServiceErrorType err) { - ChipLogError(DeviceLayer, "Register (%s)", Error::ToString(err)); + ChipLogError(Discovery, "Mdns: Register failure (%s)", Error::ToString(err)); callback(context, nullptr, CHIP_ERROR_INTERNAL); MdnsContexts::GetInstance().Remove(this); } @@ -283,7 +283,7 @@ BrowseContext::BrowseContext(void * cbContext, DnssdBrowseCallback cb, DnssdServ void BrowseContext::DispatchFailure(DNSServiceErrorType err) { - ChipLogError(DeviceLayer, "Browse (%s)", Error::ToString(err)); + ChipLogError(Discovery, "Mdns: Browse failure (%s)", Error::ToString(err)); callback(context, nullptr, 0, CHIP_ERROR_INTERNAL); MdnsContexts::GetInstance().Remove(this); } @@ -309,7 +309,7 @@ ResolveContext::~ResolveContext() void ResolveContext::DispatchFailure(DNSServiceErrorType err) { - ChipLogError(DeviceLayer, "Resolve (%s)", Error::ToString(err)); + ChipLogError(Discovery, "Mdns: Resolve failure (%s)", Error::ToString(err)); callback(context, nullptr, Span(), CHIP_ERROR_INTERNAL); MdnsContexts::GetInstance().Remove(this); } @@ -326,6 +326,7 @@ void ResolveContext::DispatchSuccess() continue; } + ChipLogDetail(Discovery, "Mdns: Resolve success on interface %" PRIu32, interface.first); callback(context, &interface.second.service, Span(ips.data(), ips.size()), CHIP_NO_ERROR); break; } @@ -342,7 +343,7 @@ CHIP_ERROR ResolveContext::OnNewAddress(uint32_t interfaceId, const struct socka #ifdef CHIP_DETAIL_LOGGING char addrStr[INET6_ADDRSTRLEN]; ip.ToString(addrStr, sizeof(addrStr)); - ChipLogDetail(DeviceLayer, "Mdns: %s interface: %" PRIu32 " ip:%s", __func__, interfaceId, addrStr); + ChipLogDetail(Discovery, "Mdns: %s interface: %" PRIu32 " ip:%s", __func__, interfaceId, addrStr); #endif // CHIP_DETAIL_LOGGING return CHIP_NO_ERROR; @@ -376,7 +377,7 @@ bool ResolveContext::HasAddress() void ResolveContext::OnNewInterface(uint32_t interfaceId, const char * fullname, const char * hostnameWithDomain, uint16_t port, uint16_t txtLen, const unsigned char * txtRecord) { - ChipLogDetail(DeviceLayer, "Mdns : %s hostname:%s fullname:%s interface: %" PRIu32, __func__, hostnameWithDomain, fullname, + ChipLogDetail(Discovery, "Mdns : %s hostname:%s fullname:%s interface: %" PRIu32, __func__, hostnameWithDomain, fullname, interfaceId); InterfaceInfo interface; diff --git a/src/platform/Darwin/DnssdImpl.cpp b/src/platform/Darwin/DnssdImpl.cpp index 488998c8398d40..98fdd0e19d3b74 100644 --- a/src/platform/Darwin/DnssdImpl.cpp +++ b/src/platform/Darwin/DnssdImpl.cpp @@ -100,7 +100,7 @@ void LogOnFailure(const char * name, DNSServiceErrorType err) { if (kDNSServiceErr_NoError != err) { - ChipLogError(DeviceLayer, "%s (%s)", name, Error::ToString(err)); + ChipLogError(Discovery, "%s (%s)", name, Error::ToString(err)); } } @@ -165,7 +165,7 @@ namespace { static void OnRegister(DNSServiceRef sdRef, DNSServiceFlags flags, DNSServiceErrorType err, const char * name, const char * type, const char * domain, void * context) { - ChipLogDetail(DeviceLayer, "Mdns: %s name: %s, type: %s, domain: %s, flags: %d", __func__, name, type, domain, flags); + ChipLogDetail(Discovery, "Mdns: %s name: %s, type: %s, domain: %s, flags: %d", __func__, name, type, domain, flags); auto sdCtx = reinterpret_cast(context); sdCtx->Finalize(err); @@ -174,7 +174,7 @@ static void OnRegister(DNSServiceRef sdRef, DNSServiceFlags flags, DNSServiceErr CHIP_ERROR Register(void * context, DnssdPublishCallback callback, uint32_t interfaceId, const char * type, const char * name, uint16_t port, ScopedTXTRecord & record) { - ChipLogProgress(DeviceLayer, "Publishing service %s on port %u with type: %s on interface id: %" PRIu32, name, port, type, + ChipLogProgress(Discovery, "Publishing service %s on port %u with type: %s on interface id: %" PRIu32, name, port, type, interfaceId); RegisterContext * sdCtx = nullptr; @@ -198,7 +198,7 @@ CHIP_ERROR Register(void * context, DnssdPublishCallback callback, uint32_t inte void OnBrowseAdd(BrowseContext * context, const char * name, const char * type, const char * domain, uint32_t interfaceId) { - ChipLogDetail(DeviceLayer, "Mdns: %s name: %s, type: %s, domain: %s, interface: %" PRIu32, __func__, name, type, domain, + ChipLogDetail(Discovery, "Mdns: %s name: %s, type: %s, domain: %s, interface: %" PRIu32, __func__, name, type, domain, interfaceId); VerifyOrReturn(strcmp(kLocalDot, domain) == 0); @@ -225,7 +225,7 @@ void OnBrowseAdd(BrowseContext * context, const char * name, const char * type, void OnBrowseRemove(BrowseContext * context, const char * name, const char * type, const char * domain, uint32_t interfaceId) { - ChipLogDetail(DeviceLayer, "Mdns: %s name: %s, type: %s, domain: %s, interface: %" PRIu32, __func__, name, type, domain, + ChipLogDetail(Discovery, "Mdns: %s name: %s, type: %s, domain: %s, interface: %" PRIu32, __func__, name, type, domain, interfaceId); VerifyOrReturn(strcmp(kLocalDot, domain) == 0); @@ -259,7 +259,7 @@ CHIP_ERROR Browse(void * context, DnssdBrowseCallback callback, uint32_t interfa auto sdCtx = chip::Platform::New(context, callback, protocol); VerifyOrReturnError(nullptr != sdCtx, CHIP_ERROR_NO_MEMORY); - ChipLogProgress(DeviceLayer, "Browsing for: %s", type); + ChipLogProgress(Discovery, "Browsing for: %s", type); DNSServiceRef sdRef; auto err = DNSServiceBrowse(&sdRef, kBrowseFlags, interfaceId, type, kLocalDot, OnBrowse, sdCtx); VerifyOrReturnError(kDNSServiceErr_NoError == err, sdCtx->Finalize(err)); @@ -329,7 +329,7 @@ static void OnResolve(DNSServiceRef sdRef, DNSServiceFlags flags, uint32_t inter static CHIP_ERROR Resolve(void * context, DnssdResolveCallback callback, uint32_t interfaceId, chip::Inet::IPAddressType addressType, const char * type, const char * name) { - ChipLogDetail(DeviceLayer, "Resolve type=%s name=%s interface=%" PRIu32, type, name, interfaceId); + ChipLogDetail(Discovery, "Resolve type=%s name=%s interface=%" PRIu32, type, name, interfaceId); auto sdCtx = chip::Platform::New(context, callback, addressType); VerifyOrReturnError(nullptr != sdCtx, CHIP_ERROR_NO_MEMORY); From b26327026405a15cc51b1585260f392d8039c8e7 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 21 Jul 2022 17:03:24 -0400 Subject: [PATCH 06/15] Unit localization cluster constraints (#21003) * Attempt to automate unit localization test case * Restyle * Update name of attribute to the correct value * ZAP regen (tests) * Add pre-attribute support and source file for unit localization * zap regen * Make the localization compile --- .../certification/Test_TC_LUNIT_3_1.yaml | 177 ++++++------------ .../chip/unit-localization-cluster.xml | 2 +- .../zap-generated/endpoint_config.h | 100 +++++----- .../zap-generated/endpoint_config.h | 12 +- .../chip-tool/zap-generated/test/Commands.h | 117 +++++++++++- .../zap-generated/endpoint_config.h | 14 +- .../zap-generated/endpoint_config.h | 28 +-- .../tv-app/zap-generated/endpoint_config.h | 12 +- .../zap-generated/endpoint_config.h | 16 +- 9 files changed, 273 insertions(+), 205 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_LUNIT_3_1.yaml b/src/app/tests/suites/certification/Test_TC_LUNIT_3_1.yaml index 47280cb67e371c..fe3bd7f1e55b46 100644 --- a/src/app/tests/suites/certification/Test_TC_LUNIT_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LUNIT_3_1.yaml @@ -19,150 +19,79 @@ name: config: nodeId: 0x12344321 - cluster: "Basic" + cluster: "Unit Localization" endpoint: 0 tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + - label: "TH reads TemperatureUnit attribute from DUT" PICS: LUNIT.S.A0000 - verification: | - Verify in TH log: - - ./chip-tool unitlocalization read temperature-unit 1 0 - [1651186538224] [11210:117238] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_0000 DataVersion: 486381485 - [1651186538224] [11210:117238] CHIP: [TOO] TemperatureUnit: 0 - disabled: true + command: "readAttribute" + attribute: "TemperatureUnit" + response: + constraints: + type: uint8 - - label: "TH writes 0 to TemperatureUnit attribute" + - label: "TH writes 0 (Fahrenheit) to TemperatureUnit attribute" PICS: LUNIT.C.A0000.Fahrenheit - verification: | - Verify in TH log: - - ./chip-tool unitlocalization write temperature-unit 0 1 0 - [1651191017267] [13215:170815] CHIP: [DMG] WriteResponseMessage = - [1651191017267] [13215:170815] CHIP: [DMG] { - [1651191017267] [13215:170815] CHIP: [DMG] AttributeStatusIBs = - [1651191017267] [13215:170815] CHIP: [DMG] [ - [1651191017267] [13215:170815] CHIP: [DMG] AttributeStatusIB = - [1651191017267] [13215:170815] CHIP: [DMG] { - [1651191017267] [13215:170815] CHIP: [DMG] AttributePathIB = - [1651191017267] [13215:170815] CHIP: [DMG] { - [1651191017267] [13215:170815] CHIP: [DMG] Endpoint = 0x0, - [1651191017267] [13215:170815] CHIP: [DMG] Cluster = 0x2d, - [1651191017267] [13215:170815] CHIP: [DMG] Attribute = 0x0000_0000, - [1651191017267] [13215:170815] CHIP: [DMG] } - [1651191017267] [13215:170815] CHIP: [DMG] - [1651191017267] [13215:170815] CHIP: [DMG] StatusIB = - [1651191017267] [13215:170815] CHIP: [DMG] { - [1651191017267] [13215:170815] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651191017267] [13215:170815] CHIP: [DMG] }, - [1651191017267] [13215:170815] CHIP: [DMG] - [1651191017267] [13215:170815] CHIP: [DMG] }, - [1651191017267] [13215:170815] CHIP: [DMG] - [1651191017267] [13215:170815] CHIP: [DMG] ], - [1651191017267] [13215:170815] CHIP: [DMG] - [1651191017267] [13215:170815] CHIP: [DMG] InteractionModelRevision = 1 - disabled: true + cluster: "Unit Localization" + command: "writeAttribute" + attribute: "TemperatureUnit" + arguments: + value: 0 - label: "TH reads TemperatureUnit attribute" PICS: LUNIT.C.A0000 - verification: | - Verify in TH log: + command: "readAttribute" + attribute: "TemperatureUnit" + response: + value: 0 - ./chip-tool unitlocalization read temperature-unit 1 0 - [1651190135534] [12868:159849] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_0000 DataVersion: 486381486 - [1651190135534] [12868:159849] CHIP: [TOO] TemperatureUnit: 0 - disabled: true - - - label: "TH writes 1 to TemperatureUnit attribute" + - label: "TH writes 1 (Celsius) to TemperatureUnit attribute" PICS: LUNIT.C.A0000.Celsius - verification: | - Verify in TH log: - - ./chip-tool unitlocalization write temperature-unit 1 1 0 - - [1651190221003] [12900:161139] CHIP: [DMG] WriteResponseMessage = - [1651190221003] [12900:161139] CHIP: [DMG] { - [1651190221003] [12900:161139] CHIP: [DMG] AttributeStatusIBs = - [1651190221003] [12900:161139] CHIP: [DMG] [ - [1651190221003] [12900:161139] CHIP: [DMG] AttributeStatusIB = - [1651190221003] [12900:161139] CHIP: [DMG] { - [1651190221003] [12900:161139] CHIP: [DMG] AttributePathIB = - [1651190221003] [12900:161139] CHIP: [DMG] { - [1651190221003] [12900:161139] CHIP: [DMG] Endpoint = 0x0, - [1651190221003] [12900:161139] CHIP: [DMG] Cluster = 0x2d, - [1651190221003] [12900:161139] CHIP: [DMG] Attribute = 0x0000_0000, - [1651190221003] [12900:161139] CHIP: [DMG] } - [1651190221003] [12900:161139] CHIP: [DMG] - [1651190221003] [12900:161139] CHIP: [DMG] StatusIB = - [1651190221003] [12900:161139] CHIP: [DMG] { - [1651190221003] [12900:161139] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651190221003] [12900:161139] CHIP: [DMG] }, - [1651190221003] [12900:161139] CHIP: [DMG] - [1651190221003] [12900:161139] CHIP: [DMG] }, - [1651190221003] [12900:161139] CHIP: [DMG] - [1651190221003] [12900:161139] CHIP: [DMG] ], - [1651190221003] [12900:161139] CHIP: [DMG] - [1651190221003] [12900:161139] CHIP: [DMG] InteractionModelRevision = 1 - [1651190221003] [12900:161139] CHIP: [DMG] } - disabled: true + cluster: "Unit Localization" + command: "writeAttribute" + attribute: "TemperatureUnit" + arguments: + value: 1 - label: "TH reads TemperatureUnit attribute" PICS: LUNIT.C.A0000 - verification: | - Verify in TH log: - - ./chip-tool unitlocalization read temperature-unit 1 0 - [1651190800434] [13122:167909] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_0000 DataVersion: 486381489 - [1651190800434] [13122:167909] CHIP: [TOO] TemperatureUnit: 1 - disabled: true + command: "readAttribute" + attribute: "TemperatureUnit" + response: + value: 1 - - label: "TH writes 2 to TemperatureUnit attribute" + - label: "TH writes 2 (Kelvin) to TemperatureUnit attribute" PICS: LUNIT.C.A0000.Kelvin - verification: | - Verify in TH log: - - ./chip-tool unitlocalization write temperature-unit 2 1 0 - [1651190829573] [13133:168303] CHIP: [DMG] WriteResponseMessage = - [1651190829573] [13133:168303] CHIP: [DMG] { - [1651190829573] [13133:168303] CHIP: [DMG] AttributeStatusIBs = - [1651190829573] [13133:168303] CHIP: [DMG] [ - [1651190829573] [13133:168303] CHIP: [DMG] AttributeStatusIB = - [1651190829573] [13133:168303] CHIP: [DMG] { - [1651190829573] [13133:168303] CHIP: [DMG] AttributePathIB = - [1651190829573] [13133:168303] CHIP: [DMG] { - [1651190829573] [13133:168303] CHIP: [DMG] Endpoint = 0x0, - [1651190829573] [13133:168303] CHIP: [DMG] Cluster = 0x2d, - [1651190829573] [13133:168303] CHIP: [DMG] Attribute = 0x0000_0000, - [1651190829573] [13133:168303] CHIP: [DMG] } - [1651190829573] [13133:168303] CHIP: [DMG] - [1651190829573] [13133:168303] CHIP: [DMG] StatusIB = - [1651190829573] [13133:168303] CHIP: [DMG] { - [1651190829573] [13133:168303] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651190829573] [13133:168303] CHIP: [DMG] }, - [1651190829573] [13133:168303] CHIP: [DMG] - [1651190829573] [13133:168303] CHIP: [DMG] }, - [1651190829573] [13133:168303] CHIP: [DMG] - [1651190829573] [13133:168303] CHIP: [DMG] ], - [1651190829573] [13133:168303] CHIP: [DMG] - [1651190829573] [13133:168303] CHIP: [DMG] InteractionModelRevision = 1 - [1651190829573] [13133:168303] CHIP: [DMG] } - disabled: true + cluster: "Unit Localization" + command: "writeAttribute" + attribute: "TemperatureUnit" + arguments: + value: 2 - label: "TH reads TemperatureUnit attribute" PICS: LUNIT.C.A0000 - verification: | - Verify in TH log: - - ./chip-tool unitlocalization read temperature-unit 1 0 - [1651190908005] [13164:169492] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_0000 DataVersion: 486381490 - [1651190908005] [13164:169492] CHIP: [TOO] TemperatureUnit: 2 - disabled: true + command: "readAttribute" + attribute: "TemperatureUnit" + response: + value: 2 - label: "TH writes 5 to TemperatureUnit attribute" PICS: LUNIT.C.A0000 - verification: | - Verify in TH log: - - Verify that the write request fails with 0x87 (Constraint Error) - disabled: true + cluster: "Unit Localization" + command: "writeAttribute" + attribute: "TemperatureUnit" + arguments: + # Per spec, if [TEMP] feature is enabled, then this attribute can be + # one of 0 (Farenheit), 1 (Celsius) or 2 (Kelvin) + value: 5 # INVALID + response: + error: CONSTRAINT_ERROR diff --git a/src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml index 6049f4e0d0e204..d6c7adf1e5dccc 100644 --- a/src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml @@ -35,7 +35,7 @@ limitations under the License. mechanism by which they can be configured to use a user’s preferred unit. - TemperatureUnit + TemperatureUnit diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 0689d5dc931128..bf73c8371b1f7a 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -286,13 +286,16 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 46 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 47 #define GENERATED_MIN_MAX_DEFAULTS \ { \ \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* HourFormat */ \ \ + /* Endpoint: 0, Cluster: Unit Localization (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 }, /* TemperatureUnit */ \ + \ /* Endpoint: 1, Cluster: On/Off (server) */ \ { (uint16_t) 0xFF, (uint16_t) 0x0, (uint16_t) 0x2 }, /* StartUpOnOff */ \ \ @@ -482,8 +485,9 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* TemperatureUnit */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, \ + ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* TemperatureUnit */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x1) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ @@ -780,14 +784,14 @@ { 0x00004003, ZAP_TYPE(ENUM8), 1, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* StartUpOnOff */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* StartUpOnOff */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* switch type */ \ { 0x00000010, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* switch actions */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* switch actions */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ @@ -800,7 +804,7 @@ { 0x00000005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ { 0x00000006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ { 0x0000000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* options */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* options */ \ { 0x00000010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ { 0x00000011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ @@ -819,7 +823,7 @@ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { 0x00000051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* out of service */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* out of service */ \ { 0x00000055, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* present value */ \ { 0x0000006F, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* status flags */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ @@ -918,9 +922,9 @@ { 0x00000021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(27) }, /* Language */ \ { 0x00000023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(60) }, /* AutoRelockTime */ \ { 0x00000024, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* SoundVolume */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* SoundVolume */ \ { 0x00000025, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* OperatingMode */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(7) }, /* OperatingMode */ \ { 0x00000026, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFF6) }, /* SupportedOperatingModes */ \ { 0x00000027, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0) }, /* DefaultConfigurationRegister */ \ { 0x00000029, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -929,9 +933,9 @@ { 0x0000002B, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x00) }, /* EnablePrivacyModeButton */ \ { 0x00000030, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(7) }, /* WrongCodeEntryLimit */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* WrongCodeEntryLimit */ \ { 0x00000031, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* UserCodeTemporaryDisableTime */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* UserCodeTemporaryDisableTime */ \ { 0x00000033, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* RequirePINforRemoteOperation */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0xD13) }, /* FeatureMap */ \ @@ -974,7 +978,7 @@ ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ { 0x00000017, ZAP_TYPE(BITMAP8), 1, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* Mode */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* Mode */ \ { 0x0000001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x17) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ @@ -1012,9 +1016,9 @@ { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0x00000000) }, /* LifetimeEnergyConsumed */ \ { 0x00000020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* OperationMode */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* OperationMode */ \ { 0x00000021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* ControlMode */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(12) }, /* ControlMode */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ @@ -1025,40 +1029,40 @@ { 0x00000005, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0640) }, /* AbsMinCoolSetpointLimit */ \ { 0x00000006, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0C80) }, /* AbsMaxCoolSetpointLimit */ \ { 0x00000011, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(12) }, /* OccupiedCoolingSetpoint */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(13) }, /* OccupiedCoolingSetpoint */ \ { 0x00000012, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(13) }, /* OccupiedHeatingSetpoint */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(14) }, /* OccupiedHeatingSetpoint */ \ { 0x00000015, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(14) }, /* MinHeatSetpointLimit */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(15) }, /* MinHeatSetpointLimit */ \ { 0x00000016, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(15) }, /* MaxHeatSetpointLimit */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(16) }, /* MaxHeatSetpointLimit */ \ { 0x00000017, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(16) }, /* MinCoolSetpointLimit */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(17) }, /* MinCoolSetpointLimit */ \ { 0x00000018, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(17) }, /* MaxCoolSetpointLimit */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(18) }, /* MaxCoolSetpointLimit */ \ { 0x00000019, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(18) }, /* MinSetpointDeadBand */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(19) }, /* MinSetpointDeadBand */ \ { 0x0000001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(19) }, /* ControlSequenceOfOperation */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(20) }, /* ControlSequenceOfOperation */ \ { 0x0000001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(20) }, /* SystemMode */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(21) }, /* SystemMode */ \ { 0x0000001E, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* ThermostatRunningMode */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x0023) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fan Control (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(21) }, /* fan mode */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(22) }, /* fan mode */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(22) }, /* fan mode sequence */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(23) }, /* fan mode sequence */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(23) }, /* percent setting */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(24) }, /* percent setting */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* percent current */ \ { 0x00000004, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(100) }, /* speed max */ \ { 0x00000005, ZAP_TYPE(INT8U), 1, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(24) }, /* speed setting */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(25) }, /* speed setting */ \ { 0x00000006, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* speed current */ \ { 0x00000007, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* rock support */ \ { 0x00000008, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* rock setting */ \ @@ -1069,11 +1073,11 @@ \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(25) }, /* temperature display mode */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(26) }, /* temperature display mode */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(26) }, /* keypad lockout */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(27) }, /* keypad lockout */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(27) }, /* schedule programming visibility */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(28) }, /* schedule programming visibility */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ @@ -1108,25 +1112,25 @@ { 0x00000029, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Primary6Y */ \ { 0x0000002A, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* Primary6Intensity */ \ { 0x00000030, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(28) }, /* WhitePointX */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(29) }, /* WhitePointX */ \ { 0x00000031, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(29) }, /* WhitePointY */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(30) }, /* WhitePointY */ \ { 0x00000032, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(30) }, /* ColorPointRX */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(31) }, /* ColorPointRX */ \ { 0x00000033, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(31) }, /* ColorPointRY */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(32) }, /* ColorPointRY */ \ { 0x00000034, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* ColorPointRIntensity */ \ { 0x00000036, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(32) }, /* ColorPointGX */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(33) }, /* ColorPointGX */ \ { 0x00000037, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(33) }, /* ColorPointGY */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(34) }, /* ColorPointGY */ \ { 0x00000038, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* ColorPointGIntensity */ \ { 0x0000003A, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(34) }, /* ColorPointBX */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(35) }, /* ColorPointBX */ \ { 0x0000003B, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(35) }, /* ColorPointBY */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(36) }, /* ColorPointBY */ \ { 0x0000003C, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* ColorPointBIntensity */ \ { 0x00004000, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* EnhancedCurrentHue */ \ @@ -1141,7 +1145,7 @@ { 0x0000400C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFEFF) }, /* ColorTempPhysicalMaxMireds */ \ { 0x0000400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* CoupleColorTempToLevelMinMireds */ \ { 0x00004010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(36) }, /* StartUpColorTemperatureMireds */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(37) }, /* StartUpColorTemperatureMireds */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x1F) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ @@ -1328,13 +1332,13 @@ { 0x00000025, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* struct_attr */ \ { 0x00000026, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(37) }, /* range_restricted_int8u */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(38) }, /* range_restricted_int8u */ \ { 0x00000027, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(38) }, /* range_restricted_int8s */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(39) }, /* range_restricted_int8s */ \ { 0x00000028, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(39) }, /* range_restricted_int16u */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(40) }, /* range_restricted_int16u */ \ { 0x00000029, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(40) }, /* range_restricted_int16s */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(41) }, /* range_restricted_int16s */ \ { 0x0000002A, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* list_long_octet_string */ \ { 0x0000002B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1406,16 +1410,16 @@ ZAP_EMPTY_DEFAULT() }, /* nullable_struct */ \ { 0x00004026, ZAP_TYPE(INT8U), 1, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(41) }, /* nullable_range_restricted_int8u */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(42) }, /* nullable_range_restricted_int8u */ \ { 0x00004027, ZAP_TYPE(INT8S), 1, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(42) }, /* nullable_range_restricted_int8s */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(43) }, /* nullable_range_restricted_int8s */ \ { 0x00004028, ZAP_TYPE(INT16U), 2, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(43) }, /* nullable_range_restricted_int16u */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(44) }, /* nullable_range_restricted_int16u */ \ { 0x00004029, ZAP_TYPE(INT16S), 2, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(44) }, /* nullable_range_restricted_int16s */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(45) }, /* nullable_range_restricted_int16s */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ @@ -1431,7 +1435,7 @@ { 0x00004002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OffWaitTime */ \ { 0x00004003, ZAP_TYPE(ENUM8), 1, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(45) }, /* StartUpOnOff */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(46) }, /* StartUpOnOff */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ diff --git a/zzz_generated/bridge-app/zap-generated/endpoint_config.h b/zzz_generated/bridge-app/zap-generated/endpoint_config.h index 3ccf64ec0b6f0a..a39aaf86134db5 100644 --- a/zzz_generated/bridge-app/zap-generated/endpoint_config.h +++ b/zzz_generated/bridge-app/zap-generated/endpoint_config.h @@ -88,13 +88,16 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 2 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 3 #define GENERATED_MIN_MAX_DEFAULTS \ { \ \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* HourFormat */ \ \ + /* Endpoint: 0, Cluster: Unit Localization (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 }, /* TemperatureUnit */ \ + \ /* Endpoint: 2, Cluster: Level Control (server) */ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 } /* options */ \ } @@ -190,8 +193,9 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* TemperatureUnit */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, \ + ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* TemperatureUnit */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x1) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ @@ -467,7 +471,7 @@ { 0x00000005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ { 0x00000006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ { 0x0000000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* options */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* options */ \ { 0x00000010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ { 0x00000011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 084f5b14dfd7d7..7c57104924eafb 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -89457,7 +89457,7 @@ class Test_TC_LUNIT_2_1Suite : public TestCommand class Test_TC_LUNIT_3_1Suite : public TestCommand { public: - Test_TC_LUNIT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_3_1", 0, credsIssuerConfig) + Test_TC_LUNIT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_3_1", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -89490,6 +89490,54 @@ class Test_TC_LUNIT_3_1Suite : public TestCommand 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::Clusters::UnitLocalization::TempUnit value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::UnitLocalization::TempUnit value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("temperatureUnit", value, 0U)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::UnitLocalization::TempUnit value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("temperatureUnit", value, 1U)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::UnitLocalization::TempUnit value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("temperatureUnit", value, 2U)); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -89505,6 +89553,73 @@ class Test_TC_LUNIT_3_1Suite : public TestCommand 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 TemperatureUnit attribute from DUT"); + VerifyOrDo(!ShouldSkip("LUNIT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "TH writes 0 (Fahrenheit) to TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000.Fahrenheit"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::UnitLocalization::TempUnit value; + value = static_cast(0); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH writes 1 (Celsius) to TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000.Celsius"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::UnitLocalization::TempUnit value; + value = static_cast(1); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "TH writes 2 (Kelvin) to TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000.Kelvin"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::UnitLocalization::TempUnit value; + value = static_cast(2); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); + } + case 7: { + LogStep(7, "TH reads TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "TH writes 5 to TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::UnitLocalization::TempUnit value; + value = static_cast(5); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); + } } return CHIP_NO_ERROR; } diff --git a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h index fcf8bb7ed5c0cc..c4d0febde581c8 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h @@ -78,14 +78,17 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 1 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 2 #define GENERATED_MIN_MAX_DEFAULTS \ { \ \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* HourFormat */ \ + \ + /* Endpoint: 0, Cluster: Unit Localization (server) */ \ { \ - (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 \ - } /* HourFormat */ \ + (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 \ + } /* TemperatureUnit */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask @@ -180,8 +183,9 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* TemperatureUnit */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, \ + ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* TemperatureUnit */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x1) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ diff --git a/zzz_generated/thermostat/zap-generated/endpoint_config.h b/zzz_generated/thermostat/zap-generated/endpoint_config.h index ee80e845d22462..9a7871ad6eaeb8 100644 --- a/zzz_generated/thermostat/zap-generated/endpoint_config.h +++ b/zzz_generated/thermostat/zap-generated/endpoint_config.h @@ -78,13 +78,16 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 10 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 11 #define GENERATED_MIN_MAX_DEFAULTS \ { \ \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* HourFormat */ \ \ + /* Endpoint: 0, Cluster: Unit Localization (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 }, /* TemperatureUnit */ \ + \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ { (uint16_t) 0xA28, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* OccupiedCoolingSetpoint */ \ { (uint16_t) 0x7D0, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* OccupiedHeatingSetpoint */ \ @@ -206,8 +209,9 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* TemperatureUnit */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, \ + ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* TemperatureUnit */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x1) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ @@ -521,23 +525,23 @@ { 0x00000005, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(1600) }, /* AbsMinCoolSetpointLimit */ \ { 0x00000006, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(3200) }, /* AbsMaxCoolSetpointLimit */ \ { 0x00000011, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* OccupiedCoolingSetpoint */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* OccupiedCoolingSetpoint */ \ { 0x00000012, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* OccupiedHeatingSetpoint */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* OccupiedHeatingSetpoint */ \ { 0x00000015, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* MinHeatSetpointLimit */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* MinHeatSetpointLimit */ \ { 0x00000016, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* MaxHeatSetpointLimit */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* MaxHeatSetpointLimit */ \ { 0x00000017, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* MinCoolSetpointLimit */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* MinCoolSetpointLimit */ \ { 0x00000018, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* MaxCoolSetpointLimit */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(7) }, /* MaxCoolSetpointLimit */ \ { 0x00000019, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(7) }, /* MinSetpointDeadBand */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* MinSetpointDeadBand */ \ { 0x0000001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* ControlSequenceOfOperation */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* ControlSequenceOfOperation */ \ { 0x0000001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* SystemMode */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* SystemMode */ \ { 0x00000020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* StartOfWeek */ \ { 0x00000021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* NumberOfWeeklyTransitions */ \ { 0x00000022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* NumberOfDailyTransitions */ \ diff --git a/zzz_generated/tv-app/zap-generated/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index 4c2e573255fe61..c1abffc5229436 100644 --- a/zzz_generated/tv-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-app/zap-generated/endpoint_config.h @@ -134,13 +134,16 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 2 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 3 #define GENERATED_MIN_MAX_DEFAULTS \ { \ \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* HourFormat */ \ \ + /* Endpoint: 0, Cluster: Unit Localization (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 }, /* TemperatureUnit */ \ + \ /* Endpoint: 2, Cluster: Level Control (server) */ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 } /* options */ \ } @@ -246,8 +249,9 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* TemperatureUnit */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, \ + ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* TemperatureUnit */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x1) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ @@ -594,7 +598,7 @@ { 0x00000005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ { 0x00000006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ { 0x0000000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* options */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* options */ \ { 0x00000010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ { 0x00000011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index 91305d7f76281c..39b8327c8f5b6b 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -78,13 +78,16 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 4 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 5 #define GENERATED_MIN_MAX_DEFAULTS \ { \ \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* HourFormat */ \ \ + /* Endpoint: 0, Cluster: Unit Localization (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 }, /* TemperatureUnit */ \ + \ /* Endpoint: 1, Cluster: On/Off (server) */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 }, /* StartUpOnOff */ \ \ @@ -199,8 +202,9 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* TemperatureUnit */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, \ + ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* TemperatureUnit */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x1) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ @@ -473,7 +477,7 @@ { 0x00004002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OffWaitTime */ \ { 0x00004003, ZAP_TYPE(ENUM8), 1, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* StartUpOnOff */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* StartUpOnOff */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ @@ -486,7 +490,7 @@ { 0x00000005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ { 0x00000006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ { 0x0000000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* options */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* options */ \ { 0x00000010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ { 0x00000011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ @@ -505,7 +509,7 @@ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { 0x00000051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* out of service */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* out of service */ \ { 0x00000055, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* present value */ \ { 0x0000006F, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* status flags */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ From f071851d5b72f71fe72c3c98c1820fed659d60d8 Mon Sep 17 00:00:00 2001 From: jwinder-ca <105392648+jwinder-ca@users.noreply.github.com> Date: Thu, 21 Jul 2022 15:45:09 -0600 Subject: [PATCH 07/15] Added support for the bridged device basic feature-map attribute. (#21061) * Added support for the bridged device basic feature-map attribute. * Fixes for Restyled. --- examples/bridge-app/linux/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index db5eafb1bf5544..71486c8fc392bd 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -120,6 +120,7 @@ DECLARE_DYNAMIC_ATTRIBUTE(ZCL_DEVICE_LIST_ATTRIBUTE_ID, ARRAY, kDescriptorAttrib DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(bridgedDeviceBasicAttrs) DECLARE_DYNAMIC_ATTRIBUTE(ZCL_NODE_LABEL_ATTRIBUTE_ID, CHAR_STRING, kNodeLabelSize, 0), /* NodeLabel */ DECLARE_DYNAMIC_ATTRIBUTE(ZCL_REACHABLE_ATTRIBUTE_ID, BOOLEAN, 1, 0), /* Reachable */ + DECLARE_DYNAMIC_ATTRIBUTE(ZCL_FEATURE_MAP_SERVER_ATTRIBUTE_ID, BITMAP32, 4, 0), /* feature map */ DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); // Declare Cluster List for Bridged Light endpoint @@ -204,6 +205,7 @@ DECLARE_DYNAMIC_ATTRIBUTE(ZCL_DEVICE_LIST_ATTRIBUTE_ID, ARRAY, kDescriptorAttrib DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(switchBridgedDeviceBasicAttrs) DECLARE_DYNAMIC_ATTRIBUTE(ZCL_NODE_LABEL_ATTRIBUTE_ID, CHAR_STRING, kNodeLabelSize, 0), /* NodeLabel */ DECLARE_DYNAMIC_ATTRIBUTE(ZCL_REACHABLE_ATTRIBUTE_ID, BOOLEAN, 1, 0), /* Reachable */ + DECLARE_DYNAMIC_ATTRIBUTE(ZCL_FEATURE_MAP_SERVER_ATTRIBUTE_ID, BITMAP32, 4, 0), /* feature map */ DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); // Declare Cluster List for Bridged Switch endpoint @@ -263,6 +265,7 @@ DataVersion gComposedPowerSourceDataVersions[ArraySize(bridgedPowerSourceCluster #define ZCL_DESCRIPTOR_CLUSTER_REVISION (1u) #define ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_REVISION (1u) +#define ZCL_BRIDGED_DEVICE_BASIC_FEATURE_MAP (0u) #define ZCL_FIXED_LABEL_CLUSTER_REVISION (1u) #define ZCL_ON_OFF_CLUSTER_REVISION (4u) #define ZCL_SWITCH_CLUSTER_REVISION (1u) @@ -477,6 +480,10 @@ EmberAfStatus HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::Attribut { *buffer = (uint16_t) ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_REVISION; } + else if ((attributeId == ZCL_FEATURE_MAP_SERVER_ATTRIBUTE_ID) && (maxReadLength == 4)) + { + *buffer = (uint32_t) ZCL_BRIDGED_DEVICE_BASIC_FEATURE_MAP; + } else { return EMBER_ZCL_STATUS_FAILURE; From 48d628ae3e83abb91326126d4a5fde31ac6e2631 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Michalak-Szmaci=C5=84ski?= <25711553+DamMicSzm@users.noreply.github.com> Date: Thu, 21 Jul 2022 23:48:00 +0200 Subject: [PATCH 08/15] Fix storage location of Docker images and containers for Mac or linux (#21046) * Fix storage location of Docker images and containers for osx or linux This will fix information about used memory space when build image of docker on osx host machine. Docker has another directory on linux and osx. * Fixed styling problem * Improved system checking and path mapping for docker volume --- integrations/docker/build.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/integrations/docker/build.sh b/integrations/docker/build.sh index 6c4a1a2dc26f98..cb52fe60746e89 100755 --- a/integrations/docker/build.sh +++ b/integrations/docker/build.sh @@ -33,6 +33,12 @@ IMAGE=${DOCKER_BUILD_IMAGE:-$(basename "$(pwd)")} # version VERSION=${DOCKER_BUILD_VERSION:-$(sed 's/ .*//' version)} +if [[ $OSTYPE == 'darwin'* ]]; then + DOCKER_VOLUME_PATH=~/Library/Containers/com.docker.docker/Data/vms/0/ +else + DOCKER_VOLUME_PATH=/var/lib/docker/ +fi + [[ ${*/--help//} != "${*}" ]] && { set +x echo "Usage: $me @@ -59,7 +65,7 @@ set -ex [[ -n $VERSION ]] || die "version cannot be empty" -mb_space_before=$(df -m /var/lib/docker/ | awk 'FNR==2{print $3}') +mb_space_before=$(df -m "$DOCKER_VOLUME_PATH" | awk 'FNR==2{print $3}') # go find and build any CHIP images this image is "FROM" awk -F/ '/^FROM connectedhomeip/ {print $2}' Dockerfile | while read -r dep; do @@ -92,8 +98,9 @@ docker image prune --force } docker images --filter=reference="$ORG/*" -df -h /var/lib/docker/ -mb_space_after=$(df -m /var/lib/docker/ | awk 'FNR==2{print $3}') +df -h "$DOCKER_VOLUME_PATH" +mb_space_after=$(df -m "$DOCKER_VOLUME_PATH" | awk 'FNR==2{print $3}') + printf "%'.f MB total used\n" "$((mb_space_before - mb_space_after))" exit 0 From 14c3b57c7eff68455bdaaa73f9c781fc88733e62 Mon Sep 17 00:00:00 2001 From: Michael Spang Date: Thu, 21 Jul 2022 17:48:18 -0400 Subject: [PATCH 09/15] Fix the python output name (#21073) As of 61dd4d02047 ("[python] Split Python wheel in two separate wheels (#20054)") ninja will forever try to regenerate this file because the filename is specified incorrectly: ninja: Entering directory `out/debug' ninja explain: output linux_x64_gcc/controller/python/chip_repl-0.0-py3-any.whl doesn't exist ninja explain: linux_x64_gcc/controller/python/chip_repl-0.0-py3-any.whl is dirty ninja explain: output linux_x64_gcc/controller/python/chip_clusters-0.0-py3-any.whl doesn't exist ninja explain: linux_x64_gcc/controller/python/chip_clusters-0.0-py3-any.whl is dirty ninja explain: linux_x64_gcc/obj/src/controller/python/chip-repl.stamp is dirty ninja explain: linux_x64_gcc/obj/default.stamp is dirty ninja explain: obj/host_gcc.stamp is dirty ninja explain: obj/default.stamp is dirty [2/3] ACTION //src/controller/python:chip-clusters(//build/toolchain/host:linux_x64_gcc) Fix the filename. --- src/controller/python/BUILD.gn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controller/python/BUILD.gn b/src/controller/python/BUILD.gn index 6e8c612c6e2e2a..3baf852afba26c 100644 --- a/src/controller/python/BUILD.gn +++ b/src/controller/python/BUILD.gn @@ -359,7 +359,7 @@ chip_python_wheel_action("chip-clusters") { py_package_name = "chip-clusters" py_platform_tag = "any" - output_name = "chip_clusters-${chip_python_version}-py3-any.whl" + output_name = "chip_clusters-${chip_python_version}-py3-none-any.whl" } chip_python_wheel_action("chip-repl") { @@ -407,5 +407,5 @@ chip_python_wheel_action("chip-repl") { ":chip-core", ] - output_name = "chip_repl-${chip_python_version}-py3-any.whl" + output_name = "chip_repl-${chip_python_version}-py3-none-any.whl" } From 4b77b8e65f3301a6f121a7e6412d0387c1c8d4d2 Mon Sep 17 00:00:00 2001 From: Michael Spang Date: Thu, 21 Jul 2022 19:39:24 -0400 Subject: [PATCH 10/15] Descope less relevant unit tests from unified build variants (#20950) Switch to more targeted testing of just crypto oriented tests for the MbedTLS build and just tests that need the fake platform for the fake platform build. This reduces the blowup in execution time from running the cartesian product of builds x tests and saves about 30% of default work done by gn_build.sh. --- .github/workflows/build.yaml | 2 +- .github/workflows/cirque.yaml | 7 ++++--- BUILD.gn | 16 +++++++++++++++- build/chip/chip_build.gni | 14 ++++++++++++-- build/chip/chip_test_group.gni | 4 ++-- src/BUILD.gn | 8 ++++++++ src/crypto/CHIPCryptoPALmbedTLS.cpp | 2 +- 7 files changed, 43 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d53628fb6274e0..f5f78507aa134d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -391,7 +391,7 @@ jobs: # use that on Darwin. # * the "host clang" build, which uses the pigweed # clang. - "default") GN_ARGS='target_os="all" is_asan=true enable_host_clang_build=false enable_host_gcc_mbedtls_build=false';; + "default") GN_ARGS='target_os="all" is_asan=true enable_host_clang_build=false';; "python_lib") GN_ARGS='enable_rtti=true enable_pylib=true';; esac BUILD_TYPE=$BUILD_TYPE scripts/build/gn_gen.sh --args="$GN_ARGS" --export-compile-commands diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml index e867790820231a..0ecc922ef25e82 100644 --- a/.github/workflows/cirque.yaml +++ b/.github/workflows/cirque.yaml @@ -110,10 +110,11 @@ jobs: chip_build_tests=false \ chip_enable_wifi=false \ chip_im_force_fabric_quota_check=true \ + enable_default_builds=false \ enable_host_gcc_build=true \ - enable_host_gcc_mbedtls_build=false \ - enable_host_clang_build=false \ - enable_fake_tests=false + enable_standalone_chip_tool_build=true \ + enable_linux_all_clusters_app_build=true \ + enable_linux_lighting_app_build=true - name: Run Tests timeout-minutes: 25 run: | diff --git a/BUILD.gn b/BUILD.gn index 390a4b7706d6a8..775264acacc621 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -235,7 +235,11 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { enable_host_gcc_build = enable_default_builds && host_os != "win" # Enable building chip with gcc & mbedtls. - enable_host_gcc_mbedtls_build = enable_default_builds && host_os != "win" + enable_host_gcc_mbedtls_build = false + + # Enable limited testing with gcc & mbedtls. + enable_host_gcc_mbedtls_crypto_tests = + enable_default_builds && host_os != "win" # Build the chip-cert tool. enable_standalone_chip_cert_build = @@ -349,6 +353,15 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { builds += [ ":host_gcc_mbedtls" ] } + if (enable_host_gcc_mbedtls_crypto_tests) { + chip_build("host_gcc_mbedtls_crypto_tests") { + test_group = "//src:crypto_tests" + toolchain = "${chip_root}/config/mbedtls/toolchain:${host_os}_${host_cpu}_gcc_mbedtls" + } + + builds += [ ":host_gcc_mbedtls_crypto_tests" ] + } + if (enable_android_builds) { chip_build("android_arm") { toolchain = "${build_root}/toolchain/android:android_arm" @@ -376,6 +389,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { if (enable_fake_tests) { chip_build("fake_platform") { + test_group = "//src:fake_platform_tests" toolchain = "${build_root}/toolchain/fake:fake_${host_cpu}_gcc" } diff --git a/build/chip/chip_build.gni b/build/chip/chip_build.gni index 1521f585a8d0ae..ce3a483d1be77d 100644 --- a/build/chip/chip_build.gni +++ b/build/chip/chip_build.gni @@ -20,11 +20,21 @@ template("chip_build") { _build_name = target_name _toolchain = invoker.toolchain + if (defined(invoker.test_group) && chip_build_tests) { + _build_target = invoker.test_group + _check_target = get_label_info(invoker.test_group, "dir") + ":" + + get_label_info(invoker.test_group, "name") + "_run" + } else { + _build_target = ":default" + _check_target = ":check" + not_needed(invoker, [ "test_group" ]) + } + group("${_build_name}") { - deps = [ ":default(${_toolchain})" ] + deps = [ "${_build_target}(${_toolchain})" ] } group("check_${_build_name}") { - deps = [ ":check(${_toolchain})" ] + deps = [ "${_check_target}(${_toolchain})" ] } } diff --git a/build/chip/chip_test_group.gni b/build/chip/chip_test_group.gni index b98622cf71f6f2..bb4c9def4bfb9b 100644 --- a/build/chip/chip_test_group.gni +++ b/build/chip/chip_test_group.gni @@ -60,8 +60,8 @@ template("chip_test_group") { } } - if (chip_link_tests) { - group("${_test_group_name}_run") { + group("${_test_group_name}_run") { + if (chip_link_tests) { deps = [] foreach(_test, invoker.deps) { deps += [ get_label_info(_test, "label_no_toolchain") + "_run" ] diff --git a/src/BUILD.gn b/src/BUILD.gn index bdc11442fc672e..c495ca83d1d908 100644 --- a/src/BUILD.gn +++ b/src/BUILD.gn @@ -128,4 +128,12 @@ if (chip_build_tests) { chip_test_group("fake_platform_tests") { deps = [ "${chip_root}/src/lib/dnssd/platform/tests" ] } + + # Tests to run with each Crypto PAL + chip_test_group("crypto_tests") { + deps = [ + "${chip_root}/src/credentials/tests", + "${chip_root}/src/crypto/tests", + ] + } } diff --git a/src/crypto/CHIPCryptoPALmbedTLS.cpp b/src/crypto/CHIPCryptoPALmbedTLS.cpp index f06c36a0c61c6c..5dbce1d3d62f8f 100644 --- a/src/crypto/CHIPCryptoPALmbedTLS.cpp +++ b/src/crypto/CHIPCryptoPALmbedTLS.cpp @@ -1634,7 +1634,7 @@ CHIP_ERROR ValidateCertificateChain(const uint8_t * rootCertificate, size_t root VerifyOrExit(mbedResult == 0, (result = CertificateChainValidationResult::kRootFormatInvalid, error = CHIP_ERROR_INTERNAL)); /* Verify the chain against the root */ - mbedResult = mbedtls_x509_crt_verify(&certChain, &rootCert, NULL, NULL, &flags, NULL, NULL); + mbedResult = mbedtls_x509_crt_verify(&certChain, &rootCert, nullptr, nullptr, &flags, nullptr, nullptr); switch (mbedResult) { From 206fcf8ed5f96f62fc05d99d299c66be645e0093 Mon Sep 17 00:00:00 2001 From: chrisbeach59 <33329862+chrisbeach59@users.noreply.github.com> Date: Thu, 21 Jul 2022 16:53:07 -0700 Subject: [PATCH 11/15] Thermostat Test Scripts (#21068) * Yaml File updates Updated scripts - Correct attribute * REGEN * Restyled by whitespace * Restyled by prettier-yaml Co-authored-by: Restyled.io --- src/app/tests/suites/certification/PICS.yaml | 51 +- .../certification/Test_TC_TSTAT_1_1.yaml | 34 +- .../certification/Test_TC_TSTAT_2_1.yaml | 105 +- .../certification/Test_TC_TSTAT_2_2.yaml | 642 ++------ .../tests/suites/certification/ci-pics-values | 46 +- .../chip-tool/zap-generated/test/Commands.h | 954 ++++++----- .../zap-generated/test/Commands.h | 1436 +++++++++-------- 7 files changed, 1502 insertions(+), 1766 deletions(-) diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index 3259ce2f988cc3..4eb0d890672a53 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -608,38 +608,23 @@ PICS: id: DGSW.S.C00.Rsp # Thermostat cluster - - label: "Does the device implement the Heating feature" + - label: "Thermostat is capable of managing a heating device" id: TSTAT.S.F00 - - label: "Does the device implement the Cooling feature" + - label: "Thermostat is capable of managing a cooling device" id: TSTAT.S.F01 - - label: "Does the device implement the Occupancy feature" + - label: "Supports Occupied and Unoccupied setpoints" id: TSTAT.S.F02 - - label: "Does the device implement the Auto feature" - id: TSTAT.S.F05 - - - label: "Does the device implement the MinHeatSetpointLimit attribute" - id: A_MINHEATSETPOINTLIMIT - - - label: "Does the device implement the MaxHeatSetpointLimit attribute" - id: A_MAXHEATSETPOINTLIMIT - - - label: "Does the device implement the MinCoolSetpointLimit attribute" - id: A_MINCOOLSETPOINTLIMIT - - - label: "Does the device implement the MaxCoolSetpointLimit attribute" - id: A_MAXCOOLSETPOINTLIMIT - - - label: "Does the device implement the Tolerance attribute?" - id: A_TEMPERATURE_TOLERANCE + - label: "Supports a weekly schedule of setpoint transitions(Schedule)" + id: TSTAT.S.F03 - - label: "Does the device implement the OccupiedCoolingSetpoint attribute?" - id: A_OCCUPIEDCOOLINGSETPOINT + - label: "Supports configurable setback (or span)" + id: TSTAT.S.F04 - - label: "Does the device implement the OccupiedHeatingSetpoint attribute?" - id: A_OCCUPIEDHEATINGSETPOINT + - label: "Supports a System Mode of Auto" + id: TSTAT.S.F05 - label: "Does the device implement the LocalTemperature attribute?" id: TSTAT.S.A0000 @@ -819,24 +804,6 @@ PICS: - label: "Does the device implement the GetRelayStatusLog command?" id: TSTAT.S.C04.Rsp - - label: "Thermostat is capable of managing a heating device" - id: TSTAT.S.F00 - - - label: "Thermostat is capable of managing a cooling device" - id: TSTAT.S.F01 - - - label: "Supports Occupied and Unoccupied setpoints" - id: TSTAT.S.F02 - - - label: "Supports a weekly schedule of setpoint transitions" - id: TSTAT.S.F03 - - - label: "Supports configurable setback (or span)" - id: TSTAT.S.F04 - - - label: "Supports a System Mode of Auto" - id: TSTAT.S.F05 - #Client Commands - label: "Does the device implement sending the SetpointRaiseLower command?" id: TSTAT.C.C00.Tx diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml index 88ca49f5849156..df0aabef7cabff 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml @@ -45,7 +45,7 @@ tests: response: constraints: type: map32 - minValue: 0 + minValue: 1 maxValue: 63 - label: "Read the global attribute: AttributeList" @@ -56,6 +56,16 @@ tests: type: list contains: [0, 27, 28, 65528, 65529, 65531, 65532, 65533] + - label: + "Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in + AttributeList" + PICS: TSTAT.S.F00 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [18] - label: "Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList" @@ -79,15 +89,15 @@ tests: contains: [2] - label: - "Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in - AttributeList" - PICS: TSTAT.S.F00 + "Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) + attribute in AttributeList" + PICS: TSTAT.S.F00 && TSTAT.S.F02 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [18] + contains: [20] - label: "Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) @@ -100,17 +110,6 @@ tests: type: list contains: [19] - - label: - "Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) - attribute in AttributeList" - PICS: TSTAT.S.F00 && TSTAT.S.F02 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [20] - - label: "Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList" @@ -120,7 +119,7 @@ tests: response: constraints: type: list - contains: [25] + contains: [17, 18, 25] - label: "Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in @@ -182,6 +181,7 @@ tests: #issue #15011 disabled steps below Global attributes missing from YAML framework - label: "Read the global attribute: EventList" + disabled: true verification: | Not implemented in chip-tool cluster: "LogCommands" 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 31f03c229dd4b6..1ddc6392d490df 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,7 +31,6 @@ tests: - label: "Reads mandatory attributes from DUT: LocalTemperature" command: "readAttribute" attribute: "LocalTemperature" - PICS: TSTAT.S.A0000 response: constraints: type: int16 @@ -49,7 +48,7 @@ tests: maxValue: 32767 - label: "Read Occupancy attribute from the DUT" - PICS: TSTAT.S.A0002 + PICS: TSTAT.S.F02 command: "readAttribute" attribute: "Occupancy" response: @@ -139,56 +138,56 @@ tests: maxValue: -25 - label: "Reads optional attributes from DUT: OccupiedCoolingSetpoint" - PICS: TSTAT.S.A0011 + PICS: TSTAT.S.F01 command: "readAttribute" attribute: "OccupiedCoolingSetpoint" response: constraints: type: int16 - minValue: -27315 - maxValue: 32767 + minValue: 1600 + maxValue: 3200 - label: "Reads mandatory attributes from DUT: OccupiedHeatingSetpoint" - PICS: TSTAT.S.A0012 + PICS: TSTAT.S.F00 command: "readAttribute" attribute: "OccupiedHeatingSetpoint" response: constraints: type: int16 - minValue: -27315 - maxValue: 32767 + minValue: 700 + maxValue: 3000 - label: "Read UnoccupiedCoolingSetpoint attribute from the DUT" - PICS: TSTAT.S.A0013 + PICS: TSTAT.S.F01 && TSTAT.S.F02 command: "readAttribute" attribute: "UnoccupiedCoolingSetpoint" response: constraints: type: int16 - minValue: -27315 - maxValue: 32767 + minValue: 1600 + maxValue: 3200 - label: "Read UnoccupiedHeatingSetpoint attribute from the DUT" - PICS: TSTAT.S.A0014 + PICS: TSTAT.S.F00 && TSTAT.S.F02 command: "readAttribute" attribute: "UnoccupiedHeatingSetpoint" response: constraints: type: int16 - minValue: -27315 - maxValue: 32767 + minValue: 700 + maxValue: 3000 - - label: "Reads mandatory attributes from DUT: MinHeatSetpointLimit" + - label: "Reads attribute from DUT: MinHeatSetpointLimit" PICS: TSTAT.S.A0015 command: "readAttribute" attribute: "MinHeatSetpointLimit" response: constraints: type: int16 - minValue: -27315 - maxValue: 32767 + minValue: 700 + maxValue: 3000 - - label: "Reads mandatory attributes from DUT: MaxHeatSetpointLimit" + - label: "Reads attribute from DUT: MaxHeatSetpointLimit" PICS: TSTAT.S.A0016 command: "readAttribute" attribute: "MaxHeatSetpointLimit" @@ -219,7 +218,7 @@ tests: maxValue: 32767 - label: "Reads optional attributes from DUT: MinSetpointDeadBand" - PICS: TSTAT.S.A0019 + PICS: TSTAT.S.F05 command: "readAttribute" attribute: "MinSetpointDeadBand" response: @@ -239,7 +238,6 @@ tests: maxValue: 7 - label: "Reads mandatory attributes from DUT: ControlSequenceOfOperation" - PICS: TSTAT.S.A001b command: "readAttribute" attribute: "ControlSequenceOfOperation" response: @@ -249,7 +247,6 @@ tests: maxValue: 5 - label: "Reads mandatory attributes from DUT: SystemMode" - PICS: TSTAT.S.A001c command: "readAttribute" attribute: "SystemMode" response: @@ -258,52 +255,6 @@ tests: minValue: 0 maxValue: 9 - - label: - "Read AlarmMask attribute from the DUT and Verify that the DUT - responds with a map8 value.The value has to be in the range of 0x00 to - 0x07." - verification: | - ./apps/chip-tool thermostat read alarm-mask 54321 1 - [1651147597.962878][10583:10588] CHIP:DMG: ReportDataMessage = - [1651147597.962928][10583:10588] CHIP:DMG: { - [1651147597.962957][10583:10588] CHIP:DMG: AttributeReportIBs = - [1651147597.963014][10583:10588] CHIP:DMG: [ - [1651147597.963047][10583:10588] CHIP:DMG: AttributeReportIB = - [1651147597.963103][10583:10588] CHIP:DMG: { - [1651147597.963138][10583:10588] CHIP:DMG: AttributeStatusIB = - [1651147597.963177][10583:10588] CHIP:DMG: { - [1651147597.963226][10583:10588] CHIP:DMG: AttributePathIB = - [1651147597.963286][10583:10588] CHIP:DMG: { - [1651147597.963329][10583:10588] CHIP:DMG: Endpoint = 0x1, - [1651147597.963389][10583:10588] CHIP:DMG: Cluster = 0x201, - [1651147597.963449][10583:10588] CHIP:DMG: Attribute = 0x0000_001D, - [1651147597.963575][10583:10588] CHIP:DMG: } - [1651147597.963641][10583:10588] CHIP:DMG: - [1651147597.963683][10583:10588] CHIP:DMG: StatusIB = - [1651147597.963724][10583:10588] CHIP:DMG: { - [1651147597.963785][10583:10588] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1651147597.963846][10583:10588] CHIP:DMG: }, - [1651147597.963892][10583:10588] CHIP:DMG: - [1651147597.963945][10583:10588] CHIP:DMG: }, - [1651147597.963991][10583:10588] CHIP:DMG: - [1651147597.964040][10583:10588] CHIP:DMG: }, - [1651147597.964092][10583:10588] CHIP:DMG: - [1651147597.964125][10583:10588] CHIP:DMG: ], - [1651147597.964180][10583:10588] CHIP:DMG: - [1651147597.964213][10583:10588] CHIP:DMG: SuppressResponse = true, - [1651147597.964258][10583:10588] CHIP:DMG: InteractionModelRevision = 1 - [1651147597.964290][10583:10588] CHIP:DMG: } - [1651147597.964450][10583:10588] CHIP:TOO: Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A001d - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - label: "Read ThermostatRunningMode attribute from the DUT" PICS: TSTAT.S.A001e command: "readAttribute" @@ -312,10 +263,10 @@ tests: constraints: type: enum8 minValue: 0 - maxValue: 4 + maxValue: 9 - label: "Reads constraints of optional attributes from DUT: StartOfWeek" - PICS: TSTAT.S.A0020 + PICS: TSTAT.S.F03 command: "readAttribute" attribute: "StartOfWeek" response: @@ -325,7 +276,7 @@ tests: maxValue: 6 - label: "Reads optional attributes from DUT: NumberOfWeeklyTransitions" - PICS: TSTAT.S.A0021 + PICS: TSTAT.S.F03 command: "readAttribute" attribute: "NumberOfWeeklyTransitions" response: @@ -335,7 +286,7 @@ tests: maxValue: 255 - label: "Reads optional attributes from DUT: NumberOfDailyTransitions" - PICS: TSTAT.S.A0022 + PICS: TSTAT.S.F03 command: "readAttribute" attribute: "NumberOfDailyTransitions" response: @@ -413,7 +364,7 @@ tests: type: utc - label: "Read OccupiedSetback attribute from the DUT" - PICS: TSTAT.S.A0034 + PICS: TSTAT.S.F02 command: "readAttribute" attribute: "OccupiedSetback" response: @@ -423,7 +374,7 @@ tests: maxValue: 255 - label: "Read OccupiedSetbackMin attribute from the DUT" - PICS: TSTAT.S.A0035 + PICS: TSTAT.S.F02 command: "readAttribute" attribute: "OccupiedSetbackMin" response: @@ -433,7 +384,7 @@ tests: maxValue: 255 - label: "Read OccupiedSetbackMax attribute from the DUT" - PICS: TSTAT.S.A0036 + PICS: TSTAT.S.F02 command: "readAttribute" attribute: "OccupiedSetbackMax" response: @@ -443,7 +394,7 @@ tests: maxValue: 255 - label: "Read UnoccupiedSetback attribute from the DUT" - PICS: TSTAT.S.A0037 + PICS: TSTAT.S.F02 && TSTAT.S.F04 command: "readAttribute" attribute: "UnoccupiedSetback" response: @@ -453,7 +404,7 @@ tests: maxValue: 255 - label: "Read UnoccupiedSetbackMin attribute from the DUT" - PICS: TSTAT.S.A0038 + PICS: TSTAT.S.F02 && TSTAT.S.F04 command: "readAttribute" attribute: "UnoccupiedSetbackMin" response: @@ -463,7 +414,7 @@ tests: maxValue: 255 - label: "Read UnoccupiedSetbackMax attribute from the DUT" - PICS: TSTAT.S.A0039 + PICS: TSTAT.S.F02 && TSTAT.S.F04 command: "readAttribute" attribute: "UnoccupiedSetbackMax" 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 6fa064ba30dec1..b6ef39e12cb377 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 @@ -33,7 +33,7 @@ tests: that the value is within range" command: "readAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.A0011 + PICS: TSTAT.S.F01 response: constraints: type: int16 @@ -45,7 +45,7 @@ tests: OccupiedCoolingSetpoint attribute" command: "writeAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.A0011 + PICS: TSTAT.S.F01 arguments: value: 2500 @@ -54,16 +54,16 @@ tests: OccupiedCoolingSetpoint attribute" command: "readAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.A0011 + PICS: TSTAT.S.F01 response: value: 2500 - label: "Writes OccupiedCoolingSetpoint to value below the - MinCoolSetpointLimit" + ABSMinCoolSetpointLimit" command: "writeAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.A0011 + PICS: TSTAT.S.F01 arguments: value: 30 response: @@ -74,7 +74,7 @@ tests: MaxCoolSetpointLimit" command: "writeAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.A0011 + PICS: TSTAT.S.F01 arguments: value: 4000 response: @@ -83,21 +83,11 @@ tests: - label: "Writes the limit of MinCoolSetpointLimit to OccupiedCoolingSetpoint attribute" - verification: | - ./chip-tool thermostat write occupied-cooling-setpoint 1600 1 1 - [1653574006.162208][16728:16733] CHIP:DMG: StatusIB = - [1653574006.162227][16728:16733] CHIP:DMG: { - [1653574006.162245][16728:16733] CHIP:DMG: status = 0x00 (SUCCESS), - [1653574006.162261][16728:16733] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0011 + command: "writeAttribute" + attribute: "OccupiedCoolingSetpoint" + PICS: TSTAT.S.F01 && !TSTAT.S.F05 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + value: 1600 - label: "Writes the CoolingSetpoint below the HeatingSetpoint when auto is @@ -115,7 +105,7 @@ tests: attribute" command: "writeAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.A0011 + PICS: TSTAT.S.F01 arguments: value: 3200 @@ -124,7 +114,7 @@ tests: that the value is within range" command: "readAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: TSTAT.S.A0012 + PICS: TSTAT.S.F00 response: constraints: type: int16 @@ -136,7 +126,7 @@ tests: OccupiedHeatingSetpoint attribute" command: "writeAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: TSTAT.S.A0012 + PICS: TSTAT.S.F00 arguments: value: 2100 @@ -145,7 +135,7 @@ tests: OccupiedHeatingSetpoint attribute" command: "readAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: TSTAT.S.A0012 + PICS: TSTAT.S.F00 response: value: 2100 @@ -154,7 +144,7 @@ tests: MinHeatSetpointLimit" command: "writeAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: TSTAT.S.A0012 + PICS: TSTAT.S.F00 arguments: value: 600 response: @@ -165,7 +155,7 @@ tests: MaxHeatSetpointLimit" command: "writeAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: TSTAT.S.A0012 + PICS: TSTAT.S.F00 arguments: value: 4010 response: @@ -176,7 +166,7 @@ tests: attribute" command: "writeAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: TSTAT.S.A0012 + PICS: TSTAT.S.F00 arguments: value: 700 @@ -201,26 +191,20 @@ tests: - label: "Writes the limit of MaxHeatSetpointLimit to OccupiedHeatingSetpoint attribute" - verification: | - ./chip-tool thermostat read occupied-heating-setpoint 1 1 - [1650451168.922888][5386:5391] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0201 Attribute 0x0000_0012 DataVersion: 1433129384 - [1650451168.922971][5386:5391] CHIP:TOO: occupied heating setpoint: 2000 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0012 + command: "writeAttribute" + attribute: "OccupiedHeatingSetpoint" + PICS: TSTAT.S.F05 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + value: 3000 + response: + error: CONSTRAINT_ERROR - label: "Reads UnoccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is within range" command: "readAttribute" attribute: "UnoccupiedCoolingSetpoint" - PICS: TSTAT.S.A0013 + PICS: TSTAT.S.F02 && TSTAT.S.F01 response: value: 2600 constraints: @@ -233,7 +217,7 @@ tests: UnoccupiedCoolingSetpoint attribute" command: "writeAttribute" attribute: "UnoccupiedCoolingSetpoint" - PICS: TSTAT.S.A0013 + PICS: TSTAT.S.F02 && TSTAT.S.F01 arguments: value: 2500 @@ -242,16 +226,16 @@ tests: UnoccupiedCoolingSetpoint attribute" command: "readAttribute" attribute: "UnoccupiedCoolingSetpoint" - PICS: TSTAT.S.A0013 + PICS: TSTAT.S.F02 && TSTAT.S.F01 response: value: 2500 - label: "Writes UnoccupiedCoolingSetpoint to value below the - MinHeatSetpointLimit" + MinCoolSetpointLimit" command: "writeAttribute" attribute: "UnoccupiedCoolingSetpoint" - PICS: TSTAT.S.A0013 + PICS: TSTAT.S.F02 && TSTAT.S.F01 arguments: value: 1002 response: @@ -259,10 +243,10 @@ tests: - label: "Writes UnoccupiedCoolingSetpoint to value above the - MaxHeatSetpointLimit" + MaxCoolSetpointLimit" command: "writeAttribute" attribute: "UnoccupiedCoolingSetpoint" - PICS: TSTAT.S.A0013 + PICS: TSTAT.S.F02 && TSTAT.S.F01 arguments: value: 4010 response: @@ -273,7 +257,7 @@ tests: attribute" command: "writeAttribute" attribute: "UnoccupiedCoolingSetpoint" - PICS: TSTAT.S.A0013 + PICS: TSTAT.S.F02 && TSTAT.S.F01 arguments: value: 1800 @@ -282,7 +266,7 @@ tests: attribute" command: "writeAttribute" attribute: "UnoccupiedCoolingSetpoint" - PICS: TSTAT.S.A0013 + PICS: TSTAT.S.F02 && TSTAT.S.F01 arguments: value: 3000 @@ -291,7 +275,7 @@ tests: verifies that the value is within range" command: "readAttribute" attribute: "UnoccupiedHeatingSetpoint" - PICS: TSTAT.S.A0014 + PICS: TSTAT.S.F02 && TSTAT.S.F00 response: value: 2000 constraints: @@ -302,9 +286,10 @@ tests: - label: "Writes a value back that is different but valid for UnoccupiedHeatingSetpoint attribute" + command: "writeAttribute" attribute: "UnoccupiedHeatingSetpoint" - PICS: TSTAT.S.A0014 + PICS: TSTAT.S.F02 && TSTAT.S.F00 arguments: value: 2500 @@ -313,7 +298,7 @@ tests: UnoccupiedHeatingSetpoint attribute" command: "readAttribute" attribute: "UnoccupiedHeatingSetpoint" - PICS: TSTAT.S.A0014 + PICS: TSTAT.S.F02 && TSTAT.S.F00 response: value: 2500 @@ -322,7 +307,7 @@ tests: MinHeatSetpointLimit" command: "writeAttribute" attribute: "UnoccupiedHeatingSetpoint" - PICS: TSTAT.S.A0014 + PICS: TSTAT.S.F02 && TSTAT.S.F00 arguments: value: 500 response: @@ -333,7 +318,7 @@ tests: MaxHeatSetpointLimit" command: "writeAttribute" attribute: "UnoccupiedHeatingSetpoint" - PICS: TSTAT.S.A0014 + PICS: TSTAT.S.F02 && TSTAT.S.F00 arguments: value: 4010 response: @@ -344,7 +329,7 @@ tests: attribute" command: "writeAttribute" attribute: "UnoccupiedHeatingSetpoint" - PICS: TSTAT.S.A0014 + PICS: TSTAT.S.F02 && TSTAT.S.F00 arguments: value: 1800 @@ -353,7 +338,7 @@ tests: attribute" command: "writeAttribute" attribute: "UnoccupiedHeatingSetpoint" - PICS: TSTAT.S.A0014 + PICS: TSTAT.S.F02 && TSTAT.S.F00 arguments: value: 3000 @@ -362,7 +347,7 @@ tests: that the value is within range" command: "readAttribute" attribute: "MinHeatSetpointLimit" - PICS: TSTAT.S.A0015 + PICS: TSTAT.S.F00 && TSTAT.S.A0015 response: value: 700 constraints: @@ -373,65 +358,36 @@ tests: - label: "Writes a value back that is different but valid for MinHeatSetpointLimit attribute" - verification: | - ./chip-tool thermostat write min-heat-setpoint-limit 1500 1 1 - [1651575873.602025][9521:9526] CHIP:DMG: WriteResponseMessage = - [1651575873.602056][9521:9526] CHIP:DMG: { - [1651575873.602078][9521:9526] CHIP:DMG: AttributeStatusIBs = - [1651575873.602124][9521:9526] CHIP:DMG: [ - [1651575873.602160][9521:9526] CHIP:DMG: AttributeStatusIB = - [1651575873.602195][9521:9526] CHIP:DMG: { - [1651575873.602233][9521:9526] CHIP:DMG: AttributePathIB = - [1651575873.602278][9521:9526] CHIP:DMG: { - [1651575873.602316][9521:9526] CHIP:DMG: Endpoint = 0x1, - [1651575873.602363][9521:9526] CHIP:DMG: Cluster = 0x201, - [1651575873.602412][9521:9526] CHIP:DMG: Attribute = 0x0000_0015, - [1651575873.602447][9521:9526] CHIP:DMG: } - [1651575873.602496][9521:9526] CHIP:DMG: - [1651575873.602537][9521:9526] CHIP:DMG: StatusIB = - [1651575873.602574][9521:9526] CHIP:DMG: { - [1651575873.602619][9521:9526] CHIP:DMG: status = 0x00 (SUCCESS), - [1651575873.602660][9521:9526] CHIP:DMG: }, - [1651575873.602697][9521:9526] CHIP:DMG: - [1651575873.602734][9521:9526] CHIP:DMG: }, - [1651575873.602775][9521:9526] CHIP:DMG: - [1651575873.602801][9521:9526] CHIP:DMG: ], - [1651575873.602840][9521:9526] CHIP:DMG: - [1651575873.602864][9521:9526] CHIP:DMG: InteractionModelRevision = 1 - [1651575873.602890][9521:9526] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0015 + command: "writeAttribute" + attribute: "MinHeatSetpointLimit" + PICS: TSTAT.S.F00 && TSTAT.S.A0015 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + value: 800 - label: "Reads it back again to confirm the successful write of MinHeatSetpointLimit attribute" - verification: | - ./chip-tool thermostat read min-heat-setpoint-limit 1 1 - [1650451588.651448][5452:5457] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0201 Attribute 0x0000_0015 DataVersion: 1433129384 - [1650451588.651531][5452:5457] CHIP:TOO: min heat setpoint limit: 1500 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0015 + command: "readAttribute" + attribute: "MinHeatSetpointLimit" + PICS: TSTAT.S.F00 && TSTAT.S.A0015 + response: + value: 800 + + - label: "Writes a value back that is different but violates the deadband" + command: "writeAttribute" + attribute: "MinHeatSetpointLimit" + PICS: TSTAT.S.A0015 && TSTAT.S.F05 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + value: 2000 + response: + error: CONSTRAINT_ERROR - label: "Writes MinHeatSetpointLimit to value below the AbsMinHeatSetpointLimit " command: "writeAttribute" attribute: "MinHeatSetpointLimit" - PICS: TSTAT.S.A0015 + PICS: TSTAT.S.F00 && TSTAT.S.A0015 arguments: value: 650 response: @@ -442,7 +398,7 @@ tests: AbsMaxHeatSetpointLimit " command: "writeAttribute" attribute: "MinHeatSetpointLimit" - PICS: TSTAT.S.A0015 + PICS: TSTAT.S.F00 && TSTAT.S.A0015 arguments: value: 4050 response: @@ -453,98 +409,38 @@ tests: attribute" command: "writeAttribute" attribute: "MinHeatSetpointLimit" - PICS: TSTAT.S.A0015 + PICS: TSTAT.S.F00 && TSTAT.S.A0015 arguments: value: 700 - label: "Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute" - verification: | - ./chip-tool thermostat write min-heat-setpoint-limit 1000 1 1 - [1651575767.881039][9507:9512] CHIP:DMG: WriteResponseMessage = - [1651575767.881065][9507:9512] CHIP:DMG: { - [1651575767.881088][9507:9512] CHIP:DMG: AttributeStatusIBs = - [1651575767.881128][9507:9512] CHIP:DMG: [ - [1651575767.881154][9507:9512] CHIP:DMG: AttributeStatusIB = - [1651575767.881183][9507:9512] CHIP:DMG: { - [1651575767.881210][9507:9512] CHIP:DMG: AttributePathIB = - [1651575767.881243][9507:9512] CHIP:DMG: { - [1651575767.881277][9507:9512] CHIP:DMG: Endpoint = 0x1, - [1651575767.881312][9507:9512] CHIP:DMG: Cluster = 0x201, - [1651575767.881350][9507:9512] CHIP:DMG: Attribute = 0x0000_0015, - [1651575767.881383][9507:9512] CHIP:DMG: } - [1651575767.881420][9507:9512] CHIP:DMG: - [1651575767.881452][9507:9512] CHIP:DMG: StatusIB = - [1651575767.881485][9507:9512] CHIP:DMG: { - [1651575767.881520][9507:9512] CHIP:DMG: status = 0x00 (SUCCESS), - [1651575767.881553][9507:9512] CHIP:DMG: }, - [1651575767.881589][9507:9512] CHIP:DMG: - [1651575767.881618][9507:9512] CHIP:DMG: }, - [1651575767.881651][9507:9512] CHIP:DMG: - [1651575767.881677][9507:9512] CHIP:DMG: ], - [1651575767.881708][9507:9512] CHIP:DMG: - [1651575767.881732][9507:9512] CHIP:DMG: InteractionModelRevision = 1 - [1651575767.881757][9507:9512] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0015 + command: "writeAttribute" + attribute: "MinHeatSetpointLimit" + PICS: TSTAT.S.F00 && TSTAT.S.A0015 && !TSTAT.S.F05 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + value: 3000 - label: "Reads MaxHeatSetpointLimit attribute from Server DUT and verifies that the value is within range" - verification: | - ./chip-tool thermostat read max-heat-setpoint-limit 1 1 - [1651575563.660840][9476:9481] CHIP:DMG: ReportDataMessage = - [1651575563.660870][9476:9481] CHIP:DMG: { - [1651575563.660892][9476:9481] CHIP:DMG: AttributeReportIBs = - [1651575563.660929][9476:9481] CHIP:DMG: [ - [1651575563.660954][9476:9481] CHIP:DMG: AttributeReportIB = - [1651575563.660994][9476:9481] CHIP:DMG: { - [1651575563.661023][9476:9481] CHIP:DMG: AttributeDataIB = - [1651575563.661059][9476:9481] CHIP:DMG: { - [1651575563.661096][9476:9481] CHIP:DMG: DataVersion = 0x366e43c8, - [1651575563.661132][9476:9481] CHIP:DMG: AttributePathIB = - [1651575563.661169][9476:9481] CHIP:DMG: { - [1651575563.661208][9476:9481] CHIP:DMG: Endpoint = 0x1, - [1651575563.661248][9476:9481] CHIP:DMG: Cluster = 0x201, - [1651575563.661287][9476:9481] CHIP:DMG: Attribute = 0x0000_0016, - [1651575563.661322][9476:9481] CHIP:DMG: } - [1651575563.661358][9476:9481] CHIP:DMG: - [1651575563.661399][9476:9481] CHIP:DMG: Data = 3000, - [1651575563.661436][9476:9481] CHIP:DMG: }, - [1651575563.661473][9476:9481] CHIP:DMG: - [1651575563.661502][9476:9481] CHIP:DMG: }, - [1651575563.661536][9476:9481] CHIP:DMG: - [1651575563.661559][9476:9481] CHIP:DMG: ], - [1651575563.661590][9476:9481] CHIP:DMG: - [1651575563.661615][9476:9481] CHIP:DMG: SuppressResponse = true, - [1651575563.661642][9476:9481] CHIP:DMG: InteractionModelRevision = 1 - [1651575563.661667][9476:9481] CHIP:DMG: } - [1651575563.661803][9476:9481] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0201 Attribute 0x0000_0016 DataVersion: 913195976 - [1651575563.661866][9476:9481] CHIP:TOO: max heat setpoint limit: 3000 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0016 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + command: "readAttribute" + attribute: "MaxHeatSetpointLimit" + PICS: TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05 + response: + value: 3000 + constraints: + type: int16 + minValue: 700 + maxValue: 3000 - label: "Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute" command: "writeAttribute" attribute: "MinHeatSetpointLimit" - PICS: TSTAT.S.F00 && A_MINHEATSETPOINTLIMIT + PICS: TSTAT.S.F00 && TSTAT.S.A0015 arguments: value: 700 @@ -553,7 +449,7 @@ tests: attribute" command: "writeAttribute" attribute: "MinHeatSetpointLimit" - PICS: A_MINHEATSETPOINTLIMIT && TSTAT.S.F05 + PICS: TSTAT.S.A0015 && TSTAT.S.F05 arguments: value: 3000 response: @@ -564,7 +460,7 @@ tests: MaxHeatSetpointLimit attribute" command: "writeAttribute" attribute: "MaxHeatSetpointLimit" - PICS: TSTAT.S.A0016 + PICS: TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05 arguments: value: 2900 @@ -573,7 +469,7 @@ tests: MaxHeatSetpointLimit attribute" command: "readAttribute" attribute: "MaxHeatSetpointLimit" - PICS: TSTAT.S.A0016 + PICS: TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05 response: value: 2900 @@ -582,7 +478,7 @@ tests: AbsMinHeatSetpointLimit " command: "writeAttribute" attribute: "MaxHeatSetpointLimit" - PICS: TSTAT.S.A0016 + PICS: TSTAT.S.F00 && TSTAT.S.A0016 arguments: value: 500 response: @@ -593,7 +489,7 @@ tests: AbsMaxHeatSetpointLimit " command: "writeAttribute" attribute: "MaxHeatSetpointLimit" - PICS: TSTAT.S.A0016 + PICS: TSTAT.S.F00 && TSTAT.S.A0016 arguments: value: 4000 response: @@ -604,55 +500,25 @@ tests: attribute" command: "writeAttribute" attribute: "MaxHeatSetpointLimit" - PICS: TSTAT.S.A0016 + PICS: TSTAT.S.F00 && TSTAT.S.A0016 arguments: value: 700 - label: "Writes the limit of AbsMaxHeatSetpointLimit to MaxHeatSetpointLimit attribute" - verification: | - ./chip-tool thermostat write max-heat-setpoint-limit 1000 1 1 - [1651575678.144963][9488:9493] CHIP:DMG: WriteResponseMessage = - [1651575678.144990][9488:9493] CHIP:DMG: { - [1651575678.145012][9488:9493] CHIP:DMG: AttributeStatusIBs = - [1651575678.145045][9488:9493] CHIP:DMG: [ - [1651575678.145071][9488:9493] CHIP:DMG: AttributeStatusIB = - [1651575678.145107][9488:9493] CHIP:DMG: { - [1651575678.145136][9488:9493] CHIP:DMG: AttributePathIB = - [1651575678.145169][9488:9493] CHIP:DMG: { - [1651575678.145204][9488:9493] CHIP:DMG: Endpoint = 0x1, - [1651575678.145242][9488:9493] CHIP:DMG: Cluster = 0x201, - [1651575678.145278][9488:9493] CHIP:DMG: Attribute = 0x0000_0016, - [1651575678.145314][9488:9493] CHIP:DMG: } - [1651575678.145353][9488:9493] CHIP:DMG: - [1651575678.145384][9488:9493] CHIP:DMG: StatusIB = - [1651575678.145418][9488:9493] CHIP:DMG: { - [1651575678.145450][9488:9493] CHIP:DMG: status = 0x00 (SUCCESS), - [1651575678.145483][9488:9493] CHIP:DMG: }, - [1651575678.145516][9488:9493] CHIP:DMG: - [1651575678.145543][9488:9493] CHIP:DMG: }, - [1651575678.145576][9488:9493] CHIP:DMG: - [1651575678.145603][9488:9493] CHIP:DMG: ], - [1651575678.145633][9488:9493] CHIP:DMG: - [1651575678.145658][9488:9493] CHIP:DMG: InteractionModelRevision = 1 - [1651575678.145683][9488:9493] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0016 + command: "writeAttribute" + attribute: "MaxHeatSetpointLimit" + PICS: TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + value: 3000 - label: "Reads MinCoolSetpointLimit attribute from Server DUT and verifies that the value is within range" command: "readAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.A0017 + PICS: TSTAT.S.F01 && TSTAT.S.A0017 response: value: 1600 constraints: @@ -665,7 +531,7 @@ tests: MinCoolSetpointLimit attribute" command: "writeAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.A0017 + PICS: TSTAT.S.F01 && TSTAT.S.A0017 arguments: value: 2000 @@ -674,7 +540,7 @@ tests: MinCoolSetpointLimit attribute" command: "readAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.A0017 + PICS: TSTAT.S.F01 && TSTAT.S.A0017 response: value: 2000 @@ -683,7 +549,7 @@ tests: AbsMinCoolSetpointLimit " command: "writeAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.A0017 + PICS: TSTAT.S.F01 && TSTAT.S.A0017 arguments: value: 1000 response: @@ -693,7 +559,7 @@ tests: "Writes MinCoolSetpointLimit to value above the MaxCoolSetpointLimit " command: "writeAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.A0017 + PICS: TSTAT.S.F01 && TSTAT.S.A0017 arguments: value: 4000 response: @@ -704,7 +570,7 @@ tests: attribute" command: "writeAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.A0017 + PICS: TSTAT.S.F01 && TSTAT.S.A0017 arguments: value: 1600 @@ -713,7 +579,7 @@ tests: attribute" command: "writeAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.A0017 + PICS: TSTAT.S.F01 && TSTAT.S.A0017 arguments: value: 3200 @@ -722,7 +588,7 @@ tests: attribute" command: "writeAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.F01 && A_MINCOOLSETPOINTLIMIT + PICS: TSTAT.S.F01 && TSTAT.S.A0017 arguments: value: 1600 @@ -731,7 +597,7 @@ tests: that the value is within range" command: "readAttribute" attribute: "MaxCoolSetpointLimit" - PICS: TSTAT.S.A0018 + PICS: TSTAT.S.F01 && TSTAT.S.A0018 response: value: 3200 constraints: @@ -742,91 +608,27 @@ tests: - label: "Writes a value back that is different but valid for MaxCoolSetpointLimit attribute" - verification: | - ./chip-tool thermostat write max-cool-setpoint-limit 3000 1 1 - [1651577904.824284][9656:9661] CHIP:DMG: WriteResponseMessage = - [1651577904.824317][9656:9661] CHIP:DMG: { - [1651577904.824347][9656:9661] CHIP:DMG: AttributeStatusIBs = - [1651577904.824387][9656:9661] CHIP:DMG: [ - [1651577904.824420][9656:9661] CHIP:DMG: AttributeStatusIB = - [1651577904.824457][9656:9661] CHIP:DMG: { - [1651577904.824492][9656:9661] CHIP:DMG: AttributePathIB = - [1651577904.824541][9656:9661] CHIP:DMG: { - [1651577904.824587][9656:9661] CHIP:DMG: Endpoint = 0x1, - [1651577904.824628][9656:9661] CHIP:DMG: Cluster = 0x201, - [1651577904.824674][9656:9661] CHIP:DMG: Attribute = 0x0000_0018, - [1651577904.824711][9656:9661] CHIP:DMG: } - [1651577904.824757][9656:9661] CHIP:DMG: - [1651577904.824797][9656:9661] CHIP:DMG: StatusIB = - [1651577904.824840][9656:9661] CHIP:DMG: { - [1651577904.824878][9656:9661] CHIP:DMG: status = 0x00 (SUCCESS), - [1651577904.824919][9656:9661] CHIP:DMG: }, - [1651577904.824957][9656:9661] CHIP:DMG: - [1651577904.824993][9656:9661] CHIP:DMG: }, - [1651577904.825035][9656:9661] CHIP:DMG: - [1651577904.825067][9656:9661] CHIP:DMG: ], - [1651577904.825106][9656:9661] CHIP:DMG: - [1651577904.825138][9656:9661] CHIP:DMG: InteractionModelRevision = 1 - [1651577904.825169][9656:9661] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0018 + command: "writeAttribute" + attribute: "MaxCoolSetpointLimit" + PICS: TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.F05 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + value: 2000 - label: "Reads it back again to confirm the successful write of MaxCoolSetpointLimit attribute" - verification: | - ./chip-tool thermostat read max-cool-setpoint-limit 1 1 - [1651576122.935621][9559:9564] CHIP:DMG: ReportDataMessage = - [1651576122.935665][9559:9564] CHIP:DMG: { - [1651576122.935701][9559:9564] CHIP:DMG: AttributeReportIBs = - [1651576122.935751][9559:9564] CHIP:DMG: [ - [1651576122.935791][9559:9564] CHIP:DMG: AttributeReportIB = - [1651576122.935857][9559:9564] CHIP:DMG: { - [1651576122.935900][9559:9564] CHIP:DMG: AttributeDataIB = - [1651576122.935953][9559:9564] CHIP:DMG: { - [1651576122.936006][9559:9564] CHIP:DMG: DataVersion = 0x366e43cd, - [1651576122.936059][9559:9564] CHIP:DMG: AttributePathIB = - [1651576122.936114][9559:9564] CHIP:DMG: { - [1651576122.936170][9559:9564] CHIP:DMG: Endpoint = 0x1, - [1651576122.936233][9559:9564] CHIP:DMG: Cluster = 0x201, - [1651576122.936296][9559:9564] CHIP:DMG: Attribute = 0x0000_0018, - [1651576122.936354][9559:9564] CHIP:DMG: } - [1651576122.936415][9559:9564] CHIP:DMG: - [1651576122.936477][9559:9564] CHIP:DMG: Data = 3000, - [1651576122.936525][9559:9564] CHIP:DMG: }, - [1651576122.936578][9559:9564] CHIP:DMG: - [1651576122.936622][9559:9564] CHIP:DMG: }, - [1651576122.936675][9559:9564] CHIP:DMG: - [1651576122.936714][9559:9564] CHIP:DMG: ], - [1651576122.936763][9559:9564] CHIP:DMG: - [1651576122.936804][9559:9564] CHIP:DMG: SuppressResponse = true, - [1651576122.936849][9559:9564] CHIP:DMG: InteractionModelRevision = 1 - [1651576122.936888][9559:9564] CHIP:DMG: } - [1651576122.937081][9559:9564] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0201 Attribute 0x0000_0018 DataVersion: 913195981 - [1651576122.937166][9559:9564] CHIP:TOO: max cool setpoint limit: 3000 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0018 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + command: "readAttribute" + attribute: "MaxCoolSetpointLimit" + PICS: TSTAT.S.F01 && TSTAT.S.A0018 && !TSTAT.S.F05 + response: + value: 2000 - label: "Writes MaxCoolSetpointLimit to value below the AbsMinCoolSetpointLimit " command: "writeAttribute" attribute: "MaxCoolSetpointLimit" - PICS: TSTAT.S.A0018 + PICS: TSTAT.S.F01 && TSTAT.S.A0018 arguments: value: 1000 response: @@ -836,7 +638,7 @@ tests: "Writes MaxCoolSetpointLimit to value above the MaxCoolSetpointLimit " command: "writeAttribute" attribute: "MaxCoolSetpointLimit" - PICS: TSTAT.S.A0018 + PICS: TSTAT.S.F01 && TSTAT.S.A0018 arguments: value: 4000 response: @@ -845,93 +647,53 @@ tests: - label: "Writes the limit of AbsMinCoolSetpointLimit to MaxCoolSetpointLimit attribute" - verification: | - ./chip-tool thermostat write max-cool-setpoint-limit 700 1 1 - [1651577904.824284][9656:9661] CHIP:DMG: WriteResponseMessage = - [1651577904.824317][9656:9661] CHIP:DMG: { - [1651577904.824347][9656:9661] CHIP:DMG: AttributeStatusIBs = - [1651577904.824387][9656:9661] CHIP:DMG: [ - [1651577904.824420][9656:9661] CHIP:DMG: AttributeStatusIB = - [1651577904.824457][9656:9661] CHIP:DMG: { - [1651577904.824492][9656:9661] CHIP:DMG: AttributePathIB = - [1651577904.824541][9656:9661] CHIP:DMG: { - [1651577904.824587][9656:9661] CHIP:DMG: Endpoint = 0x1, - [1651577904.824628][9656:9661] CHIP:DMG: Cluster = 0x201, - [1651577904.824674][9656:9661] CHIP:DMG: Attribute = 0x0000_0018, - [1651577904.824711][9656:9661] CHIP:DMG: } - [1651577904.824757][9656:9661] CHIP:DMG: - [1651577904.824797][9656:9661] CHIP:DMG: StatusIB = - [1651577904.824840][9656:9661] CHIP:DMG: { - [1651577904.824878][9656:9661] CHIP:DMG: status = 0x00 (SUCCESS), - [1651577904.824919][9656:9661] CHIP:DMG: }, - [1651577904.824957][9656:9661] CHIP:DMG: - [1651577904.824993][9656:9661] CHIP:DMG: }, - [1651577904.825035][9656:9661] CHIP:DMG: - [1651577904.825067][9656:9661] CHIP:DMG: ], - [1651577904.825106][9656:9661] CHIP:DMG: - [1651577904.825138][9656:9661] CHIP:DMG: InteractionModelRevision = 1 - [1651577904.825169][9656:9661] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0018 + command: "writeAttribute" + attribute: "MaxCoolSetpointLimit" + PICS: TSTAT.S.F01 && TSTAT.S.A0018 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + value: 1600 - label: "Writes the limit of MaxCoolSetpointLimit to MaxCoolSetpointLimit attribute" command: "writeAttribute" attribute: "MaxCoolSetpointLimit" - PICS: TSTAT.S.A0018 + PICS: TSTAT.S.F01 && TSTAT.S.A0018 arguments: value: 3200 - label: "Writes (sets back) default value of MinHeatSetpointLimit" command: "writeAttribute" attribute: "MinHeatSetpointLimit" - PICS: TSTAT.S.A0015 + PICS: TSTAT.S.F01 && TSTAT.S.A0015 arguments: value: 700 - label: "Writes (sets back)default value of MaxHeatSetpointLimit" - verification: | - ./chip-tool thermostat write max-heat-setpoint-limit 3000 1 1 - CHIP:ZCL: status: Success (0x0000) - CHIP:TOO: Default Success Response - CHIP:DMG: WriteClient moving to [Uninitiali] - CHIP:EM: Sending Standalone Ack for MessageCounter:1 on exchange 12610i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0016 + command: "writeAttribute" + attribute: "MaxHeatSetpointLimit" + PICS: TSTAT.S.F01 && TSTAT.S.A0016 &&!TSTAT.S.F05 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + value: 3000 - label: "Writes MaxHeatSetpointLimit That meets the deadband of 2.5C" command: "writeAttribute" attribute: "MaxHeatSetpointLimit" - PICS: TSTAT.S.F01 && A_MAXHEATSETPOINTLIMIT &&!TSTAT.S.F05 + PICS: TSTAT.S.F01 && TSTAT.S.A0016 &&!TSTAT.S.F05 arguments: value: 2950 - label: "Writes (sets back) default value of MinCoolSetpointLimit" command: "writeAttribute" attribute: "MinCoolSetpointLimit" - PICS: TSTAT.S.A0017 + PICS: TSTAT.S.F01 && TSTAT.S.A0017 arguments: value: 1600 - label: "Writes (sets back) default value of MaxCoolSetpointLimit" command: "writeAttribute" attribute: "MaxCoolSetpointLimit" - PICS: TSTAT.S.A0018 + PICS: TSTAT.S.F01 && TSTAT.S.A0018 arguments: value: 3200 @@ -940,7 +702,7 @@ tests: the value is within range" command: "readAttribute" attribute: "MinSetpointDeadBand" - PICS: TSTAT.S.A0019 + PICS: TSTAT.S.F05 response: value: 25 constraints: @@ -953,7 +715,7 @@ tests: MinSetpointDeadBand attribute" command: "writeAttribute" attribute: "MinSetpointDeadBand" - PICS: TSTAT.S.A0019 + PICS: TSTAT.S.F05 arguments: value: 5 @@ -962,14 +724,14 @@ tests: MinSetpointDeadBand attribute" command: "readAttribute" attribute: "MinSetpointDeadBand" - PICS: TSTAT.S.A0019 + PICS: TSTAT.S.F05 response: value: 5 - label: "Writes the value below MinSetpointDeadBand" command: "writeAttribute" attribute: "MinSetpointDeadBand" - PICS: TSTAT.S.A0019 + PICS: TSTAT.S.F05 arguments: value: -1 response: @@ -978,7 +740,7 @@ tests: - label: "Writes the value above MinSetpointDeadBand " command: "writeAttribute" attribute: "MinSetpointDeadBand" - PICS: TSTAT.S.A0019 + PICS: TSTAT.S.F05 arguments: value: 30 response: @@ -987,14 +749,14 @@ tests: - label: "Writes the min limit of MinSetpointDeadBand" command: "writeAttribute" attribute: "MinSetpointDeadBand" - PICS: TSTAT.S.A0019 + PICS: TSTAT.S.F05 arguments: value: 0 - label: "Writes the max limit of MinSetpointDeadBand" command: "writeAttribute" attribute: "MinSetpointDeadBand" - PICS: TSTAT.S.A0019 + PICS: TSTAT.S.F05 arguments: value: 25 @@ -1003,7 +765,7 @@ tests: the value is valid" command: "readAttribute" attribute: "ControlSequenceOfOperation" - PICS: TSTAT.S.A001b + PICS: TSTAT.S.F00 || TSTAT.S.F01 response: value: 4 constraints: @@ -1016,14 +778,14 @@ tests: valid value" command: "writeAttribute" attribute: "ControlSequenceOfOperation" - PICS: TSTAT.S.A001b + PICS: TSTAT.S.F00 || TSTAT.S.F01 arguments: value: 2 - label: "Read it back again to confirm the successful write" command: "readAttribute" attribute: "ControlSequenceOfOperation" - PICS: TSTAT.S.A001b + PICS: TSTAT.S.F00 || TSTAT.S.F01 response: value: 2 @@ -1032,7 +794,7 @@ tests: meet deadband constraint" command: "writeAttribute" attribute: "MaxHeatSetpointLimit" - PICS: TSTAT.S.F00 && A_MINHEATSETPOINTLIMIT && TSTAT.S.F05 + PICS: TSTAT.S.F00 && TSTAT.S.A0015 && TSTAT.S.F05 arguments: value: 2950 @@ -1044,25 +806,14 @@ tests: value: 2600 - label: "Sets OccupiedHeatingSetpoint to default value" - verification: | - ./chip-tool thermostat write occupied-heating-setpoint -30 1 1 - [1653575015.985079][16976:16981] CHIP:DMG: StatusIB = - [1653575015.985098][16976:16981] CHIP:DMG: { - [1653575015.985115][16976:16981] CHIP:DMG: status = 0x00 (SUCCESS), - [1653575015.985131][16976:16981] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0012 + command: "writeAttribute" + attribute: "OccupiedHeatingSetpoint" + PICS: TSTAT.S.F00 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - #issue #18545 SetpointRaise command is failing - - label: "Sends SetpointRaise Command" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00 + value: 2000 + + - label: "Sends SetpointRaise Command Heat Only" + PICS: TSTAT.S.F00 command: "SetpointRaiseLower" arguments: values: @@ -1076,31 +827,19 @@ tests: write" command: "readAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012 + PICS: TSTAT.S.F00 response: value: 1700 - label: "Sets OccupiedHeatingSetpoint to default value" - verification: | - ./chip-tool thermostat write occupied-heating-setpoint 2000 1 1 - CHIP:ZCL: WriteResponse: - CHIP:ZCL: status: Success (0x0000) - CHIP:TOO: Default Success Response - CHIP:DMG: WriteClient moving to [Uninitiali] - CHIP:EM: Sending Standalone Ack for MessageCounter:1 on exchange 11247i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0012 + command: "writeAttribute" + attribute: "OccupiedHeatingSetpoint" + PICS: TSTAT.S.F00 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - #issue #18545 SetpointRaise command is failing - - label: "Sends SetpointRaise Command" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00 + value: 2000 + + - label: "Sends SetpointRaise Command Heat Only" + PICS: TSTAT.S.F00 command: "SetpointRaiseLower" arguments: values: @@ -1114,20 +853,12 @@ tests: write" command: "readAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012 + PICS: TSTAT.S.F00 response: - value: 30 - - - label: "Sets OccupiedCoolingSetpoint to default value" - command: "writeAttribute" - attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.A0011 - arguments: - value: 2600 + value: 2300 - #issue #18545 SetpointRaise command is failing - - label: "Sends SetpointRaise Command" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00 + - label: "Sends SetpointRaise Command Cool Only" + PICS: TSTAT.S.F01 command: "SetpointRaiseLower" arguments: values: @@ -1141,20 +872,19 @@ tests: write" command: "readAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011 + PICS: TSTAT.S.F01 response: value: 2300 - label: "Sets OccupiedCoolingSetpoint to default value" command: "writeAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.A0011 + PICS: TSTAT.S.F01 arguments: value: 2600 - #issue #18545 SetpointRaise command is failing - - label: "Sends SetpointRaise Command" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00 + - label: "Sends SetpointRaise Command Cool Only" + PICS: TSTAT.S.F01 command: "SetpointRaiseLower" arguments: values: @@ -1168,39 +898,26 @@ tests: write" command: "readAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011 + PICS: TSTAT.S.F01 response: value: 2900 - label: "Sets OccupiedCoolingSetpoint to default value" command: "writeAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.A0011 + PICS: TSTAT.S.F01 arguments: value: 2600 - label: "Sets OccupiedHeatingSetpoint to default value" - verification: | - ./chip-tool thermostat read occupied-heating-setpoint 2000 1 1 - CHIP:ZCL: ReadAttributesResponse: - CHIP:ZCL: ClusterId: 0x0000_0201 - CHIP:ZCL: attributeId: 0x0000_0012 - CHIP:ZCL: status: Success (0x0000) - CHIP:ZCL: attribute TLV Type: 0x00 - CHIP:TOO: Int16s attribute Response: 2000 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0012 + command: "writeAttribute" + attribute: "OccupiedHeatingSetpoint" + PICS: TSTAT.S.F00 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - #issue #18545 SetpointRaise command is failing - - label: "Sends SetpointRaise Command" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00 + value: 2000 + + - label: "Sends SetpointRaise Command Heat & Cool" + PICS: TSTAT.S.F00 || TSTAT.S.F01 command: "SetpointRaiseLower" arguments: values: @@ -1214,7 +931,7 @@ tests: write" command: "readAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011 + PICS: TSTAT.S.F01 response: value: 2300 @@ -1223,39 +940,26 @@ tests: write" command: "readAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012 + PICS: TSTAT.S.F00 response: value: 1700 - label: "Sets OccupiedCoolingSetpoint to default value" command: "writeAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: TSTAT.S.A0011 + PICS: TSTAT.S.F01 arguments: value: 2600 - label: "Sets OccupiedHeatingSetpoint to default value" - verification: | - ./chip-tool thermostat read occupied-heating-setpoint 2000 1 1 - CHIP:ZCL: ReadAttributesResponse: - CHIP:ZCL: ClusterId: 0x0000_0201 - CHIP:ZCL: attributeId: 0x0000_0012 - CHIP:ZCL: status: Success (0x0000) - CHIP:ZCL: attribute TLV Type: 0x00 - CHIP:TOO: Int16s attribute Response: 2000 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && TSTAT.S.A0012 + command: "writeAttribute" + attribute: "OccupiedHeatingSetpoint" + PICS: TSTAT.S.F00 arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - #issue #18545 SetpointRaise command is failing - - label: "Sends SetpointRaise Command" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00 + value: 2000 + + - label: "Sends SetpointRaise Command Heat & Cool" + PICS: TSTAT.S.F00 || TSTAT.S.F01 command: "SetpointRaiseLower" arguments: values: @@ -1269,7 +973,7 @@ tests: write" command: "readAttribute" attribute: "OccupiedCoolingSetpoint" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011 + PICS: TSTAT.S.F01 response: value: 2900 @@ -1278,6 +982,6 @@ tests: write" command: "readAttribute" attribute: "OccupiedHeatingSetpoint" - PICS: PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012 + PICS: TSTAT.S.F00 response: value: 2300 diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index 4460c54a835fa0..8887e6bdebe372 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -33,12 +33,6 @@ DGSW.S.A0001=1 DGSW.S.A0002=1 DGSW.S.A0003=1 DGSW.S.C00.Rsp=1 -A_OCCUPIEDCOOLINGSETPOINT=1 -A_OCCUPIEDHEATINGSETPOINT=1 -A_MINHEATSETPOINTLIMIT=1 -A_MAXHEATSETPOINTLIMIT=1 -A_MINCOOLSETPOINTLIMIT=1 -A_MAXCOOLSETPOINTLIMIT=1 VENDOR_SUBTYPE=1 DEVTYPE_SUBTYPE=1 @@ -56,18 +50,6 @@ PICS_SDK_CI_ONLY=1 OO_LT=1 MANUAL_FLOW_CHANGE=1 -#Thermostat Server -TSTAT.S.F00=0 -TSTAT.S.F01=0 -TSTAT.S.F02=0 -TSTAT.S.F03=0 -TSTAT.S.F04=0 -TSTAT.S.F05=0 -A_MINHEATSETPOINTLIMIT=1 -A_MAXHEATSETPOINTLIMIT=1 -A_MINCOOLSETPOINTLIMIT=1 -A_MAXCOOLSETPOINTLIMIT=1 - # WindowCovering aka WNCV WNCV.S.F00=1 WNCV.S.F02=1 @@ -1024,11 +1006,6 @@ ILL.S.A0002=1 ILL.S.A0003=1 ILL.S.A0004=1 -#Thermostat -#Client Commands -TSTAT.C.C00.Tx=1 -TSTAT.C.C04.Tx=1 - #Door Lock #server attributes DRLK.S.A0000=1 @@ -1340,6 +1317,14 @@ OPCREDS.C.C0a.Tx=1 OPCREDS.C.C0b.Tx=1 #Thermostat +#Thermostat Server +TSTAT.S.F00=1 +TSTAT.S.F01=1 +TSTAT.S.F02=0 +TSTAT.S.F03=0 +TSTAT.S.F04=0 +TSTAT.S.F05=1 + TSTAT.S.A0000=1 TSTAT.S.A0001=0 TSTAT.S.A0002=0 @@ -1390,12 +1375,17 @@ TSTAT.S.A0044=0 TSTAT.S.A0045=0 TSTAT.S.A0046=0 TSTAT.S.A0047=0 -#commands + +#Server commands TSTAT.S.C00.Rsp=1 -TSTAT.S.C01.Rsp=1 -TSTAT.S.C02.Rsp=1 -TSTAT.S.C03.Rsp=1 -TSTAT.S.C04.Rsp=1 +TSTAT.S.C01.Rsp=0 +TSTAT.S.C02.Rsp=0 +TSTAT.S.C03.Rsp=0 +TSTAT.S.C04.Rsp=0 + +#Client Commands +TSTAT.C.C00.Tx=1 +TSTAT.C.C04.Tx=0 #Access Control cluster ACL.S.A0000=1 diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 7c57104924eafb..4f707a86b477c5 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -27334,7 +27334,7 @@ class Test_TC_TMP_2_1Suite : public TestCommand class Test_TC_TSTAT_1_1Suite : public TestCommand { public: - Test_TC_TSTAT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_1_1", 17, credsIssuerConfig) + Test_TC_TSTAT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_1_1", 16, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -27386,7 +27386,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "map32")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1UL)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 63UL)); } break; @@ -27412,7 +27412,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); } break; case 5: @@ -27421,7 +27421,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); } break; case 6: @@ -27430,7 +27430,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; case 7: @@ -27439,7 +27439,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); } break; case 8: @@ -27448,7 +27448,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); } break; case 9: @@ -27457,6 +27457,8 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); VerifyOrReturn(CheckConstraintContains("value", value, 25UL)); } break; @@ -27522,10 +27524,6 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -27566,32 +27564,32 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand chip::NullOptional); } case 4: { - LogStep(4, "Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } @@ -27636,16 +27634,6 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -27654,7 +27642,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", 51, credsIssuerConfig) + Test_TC_TSTAT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_2_1", 50, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -27807,8 +27795,8 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); } break; case 13: @@ -27817,8 +27805,8 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); } break; case 14: @@ -27827,8 +27815,8 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); } break; case 15: @@ -27837,8 +27825,8 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); } break; case 16: @@ -27847,8 +27835,8 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); } break; case 17: @@ -27922,20 +27910,16 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand } break; case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); } break; - case 26: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -27945,7 +27929,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); } break; - case 27: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -27955,7 +27939,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 28: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -27965,7 +27949,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 29: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -27975,7 +27959,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); } break; - case 30: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -27985,7 +27969,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 1440U)); } break; - case 31: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -27995,7 +27979,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); } break; - case 32: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -28005,7 +27989,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 127U)); } break; - case 33: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -28015,7 +27999,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); } break; - case 34: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -28025,7 +28009,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; - case 35: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -28033,7 +28017,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "utc")); } break; - case 36: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -28043,7 +28027,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 37: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -28053,7 +28037,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 38: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -28063,7 +28047,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 39: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -28073,7 +28057,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 40: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -28083,7 +28067,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 41: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -28093,7 +28077,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 42: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -28103,7 +28087,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 43: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -28113,7 +28097,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); } break; - case 44: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -28123,7 +28107,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 45: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -28133,7 +28117,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; - case 46: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -28143,7 +28127,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; - case 47: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -28151,7 +28135,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "map32")); } break; - case 48: + case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -28161,7 +28145,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); } break; - case 49: + case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -28171,7 +28155,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); } break; - case 50: + case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -28204,7 +28188,6 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand } case 1: { LogStep(1, "Reads mandatory attributes from DUT: LocalTemperature"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::LocalTemperature::Id, true, chip::NullOptional); } @@ -28216,7 +28199,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand } case 3: { LogStep(3, "Read Occupancy attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::Occupancy::Id, true, chip::NullOptional); } @@ -28270,36 +28253,36 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand } case 12: { LogStep(12, "Reads optional attributes from DUT: OccupiedCoolingSetpoint"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 13: { LogStep(13, "Reads mandatory attributes from DUT: OccupiedHeatingSetpoint"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 14: { LogStep(14, "Read UnoccupiedCoolingSetpoint attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02"), 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.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Reads mandatory attributes from DUT: MinHeatSetpointLimit"); + LogStep(16, "Reads attribute from DUT: 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 17: { - LogStep(17, "Reads mandatory attributes from DUT: MaxHeatSetpointLimit"); + LogStep(17, "Reads attribute from DUT: 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); @@ -28318,7 +28301,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand } case 20: { LogStep(20, "Reads optional attributes from DUT: MinSetpointDeadBand"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, true, chip::NullOptional); } @@ -28330,180 +28313,166 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand } case 22: { LogStep(22, "Reads mandatory attributes from DUT: ControlSequenceOfOperation"); - 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"); - 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 AlarmMask attribute from the DUT and Verify that the DUT responds with a map8 value.The value has to be " - "in the range of 0x00 to 0x07."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A001d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 25: { - LogStep(25, "Read ThermostatRunningMode attribute from the DUT"); + LogStep(24, "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 26: { - LogStep(26, "Reads constraints of optional attributes from DUT: StartOfWeek"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 25: { + LogStep(25, "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 27: { - LogStep(27, "Reads optional attributes from DUT: NumberOfWeeklyTransitions"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "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 28: { - LogStep(28, "Reads optional attributes from DUT: NumberOfDailyTransitions"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 27: { + LogStep(27, "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 29: { - LogStep(29, "Read TemperatureSetpointHold attribute from the DUT"); + case 28: { + LogStep(28, "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 30: { - LogStep(30, "Read TemperatureSetpointHoldDuration attribute from the DUT"); + case 29: { + LogStep(29, "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 31: { - LogStep(31, "Read ThermostatProgrammingOperationMode attribute from the DUT"); + case 30: { + LogStep(30, "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 32: { - LogStep(32, "Read ThermostatRunningState attribute from the DUT"); + case 31: { + LogStep(31, "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 33: { - LogStep(33, "Read SetpointChangeSource attribute from the DUT"); + case 32: { + LogStep(32, "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 34: { - LogStep(34, "Read SetpointChangeAmount attribute from the DUT"); + case 33: { + LogStep(33, "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 35: { - LogStep(35, "Read SetpointChangeSourceTimestamp attribute from the DUT"); + case 34: { + LogStep(34, "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 36: { - LogStep(36, "Read OccupiedSetback attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0034"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 35: { + LogStep(35, "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 37: { - LogStep(37, "Read OccupiedSetbackMin attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0035"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 36: { + LogStep(36, "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 38: { - LogStep(38, "Read OccupiedSetbackMax attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0036"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 37: { + LogStep(37, "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 39: { - LogStep(39, "Read UnoccupiedSetback attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0037"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 38: { + LogStep(38, "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 40: { - LogStep(40, "Read UnoccupiedSetbackMin attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0038"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 39: { + LogStep(39, "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 41: { - LogStep(41, "Read UnoccupiedSetbackMax attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0039"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 40: { + LogStep(40, "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 42: { - LogStep(42, "Read EmergencyHeatDelta attribute from the DUT"); + case 41: { + LogStep(41, "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 43: { - LogStep(43, "Read ACType attribute from the DUT"); + case 42: { + LogStep(42, "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 44: { - LogStep(44, "Read ACCapacity attribute from the DUT"); + case 43: { + LogStep(43, "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 45: { - LogStep(45, "Read ACRefrigerantType attribute from the DUT"); + case 44: { + LogStep(44, "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 46: { - LogStep(46, "Read ACCompressorType attribute from the DUT"); + case 45: { + LogStep(45, "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 47: { - LogStep(47, "Read ACErrorCode attribute from the DUT"); + case 46: { + LogStep(46, "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 48: { - LogStep(48, "Read ACLouverPosition attribute from the DUT"); + case 47: { + LogStep(47, "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 49: { - LogStep(49, "Read ACCoilTemperature attribute from the DUT"); + case 48: { + LogStep(48, "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 50: { - LogStep(50, "Read ACCapacityFormat attribute from the DUT"); + case 49: { + LogStep(49, "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); @@ -28582,7 +28551,6 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); @@ -28632,8 +28600,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + 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)); @@ -28716,11 +28683,14 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand break; case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + 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)); @@ -28729,26 +28699,35 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + 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)); - shouldContinue = true; 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)); + { + int16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("maxHeatSetpointLimit", value, 3000)); + VerifyOrReturn(CheckConstraintType("value", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); + } break; case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + 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)); { int16_t value; @@ -28756,20 +28735,19 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand VerifyOrReturn(CheckValue("maxHeatSetpointLimit", value, 2900)); } break; - 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), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + 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)); - shouldContinue = true; 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; @@ -28780,10 +28758,10 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); } break; - case 49: + case 50: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 50: + case 51: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int16_t value; @@ -28791,14 +28769,11 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand VerifyOrReturn(CheckValue("minCoolSetpointLimit", value, 2000)); } break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - 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), 0)); + 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)); @@ -28807,6 +28782,9 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand 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)); { int16_t value; @@ -28817,23 +28795,22 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); } break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; case 58: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 59: - 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("maxCoolSetpointLimit", value, 2000)); + } 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), 0)); - shouldContinue = true; + 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)); @@ -28843,7 +28820,6 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand break; case 64: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 65: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -28855,6 +28831,9 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand 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)); { int8_t value; @@ -28865,10 +28844,10 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 25)); } break; - case 69: + case 70: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 70: + case 71: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int8_t value; @@ -28876,19 +28855,19 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand VerifyOrReturn(CheckValue("minSetpointDeadBand", value, 5)); } break; - case 71: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - 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), 0)); + 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)); { chip::app::Clusters::Thermostat::ThermostatControlSequence value; @@ -28899,10 +28878,10 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); } break; - case 76: + case 77: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 77: + case 78: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Thermostat::ThermostatControlSequence value; @@ -28910,20 +28889,19 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand VerifyOrReturn(CheckValue("controlSequenceOfOperation", value, 2U)); } 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)); - shouldContinue = true; 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)); { int16_t value; @@ -28931,24 +28909,20 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", value, 1700)); } break; - case 83: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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)); { int16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", value, 30)); + VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", value, 2300)); } 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; @@ -28979,7 +28953,6 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand break; case 93: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 94: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -29005,7 +28978,6 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand break; case 98: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 99: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -29050,13 +29022,13 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 1: { LogStep(1, "Reads OccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 2: { LogStep(2, "Writes a value back that is different but valid for OccupiedCoolingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 2500; @@ -29066,13 +29038,13 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 3: { LogStep(3, "Reads it back again to confirm the successful write of OccupiedCoolingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 MinCoolSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Writes OccupiedCoolingSetpoint to value below the ABSMinCoolSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 30; @@ -29082,7 +29054,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 5: { LogStep(5, "Writes OccupiedCoolingSetpoint to value above the MaxCoolSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 4000; @@ -29092,13 +29064,13 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 6: { LogStep(6, "Writes the limit of MinCoolSetpointLimit to OccupiedCoolingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + int16_t value; + value = 1600; + 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"); @@ -29112,7 +29084,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 8: { LogStep(8, "Writes the limit of MaxCoolSetpointLimit to OccupiedCoolingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 3200; @@ -29122,13 +29094,13 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 9: { LogStep(9, "Reads OccupiedHeatingSetpoint attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 10: { LogStep(10, "Writes a value back that is different but valid for OccupiedHeatingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 2100; @@ -29138,13 +29110,13 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 11: { LogStep(11, "Reads it back again to confirm the successful write of OccupiedHeatingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 600; @@ -29154,7 +29126,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 13: { LogStep(13, "Writes OccupiedHeatingSetpoint to value above the MaxHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 4010; @@ -29164,7 +29136,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 14: { LogStep(14, "Writes the limit of MinHeatSetpointLimit to OccupiedHeatingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 700; @@ -29190,23 +29162,23 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 17: { LogStep(17, "Writes the limit of MaxHeatSetpointLimit to OccupiedHeatingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + int16_t value; + value = 3000; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + 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.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 19: { LogStep(19, "Writes a value back that is different but valid for UnoccupiedCoolingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 2500; @@ -29216,13 +29188,13 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 20: { LogStep(20, "Reads it back again to confirm the successful write of UnoccupiedCoolingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 MinHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(21, "Writes UnoccupiedCoolingSetpoint to value below the MinCoolSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 1002; @@ -29231,8 +29203,8 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand chip::NullOptional); } case 22: { - LogStep(22, "Writes UnoccupiedCoolingSetpoint to value above the MaxHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(22, "Writes UnoccupiedCoolingSetpoint to value above the MaxCoolSetpointLimit"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 4010; @@ -29242,7 +29214,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 23: { LogStep(23, "Writes the limit of MinCoolSetpointLimit to UnoccupiedCoolingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 1800; @@ -29252,7 +29224,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 24: { LogStep(24, "Writes the limit of MaxCoolSetpointLimit to UnoccupiedCoolingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 3000; @@ -29262,13 +29234,13 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 25: { LogStep(25, "Reads UnoccupiedHeatingSetpoint attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 26: { LogStep(26, "Writes a value back that is different but valid for UnoccupiedHeatingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 2500; @@ -29278,13 +29250,13 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 27: { LogStep(27, "Reads it back again to confirm the successful write of UnoccupiedHeatingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 500; @@ -29294,7 +29266,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 29: { LogStep(29, "Writes UnoccupiedHeatingSetpoint to value above the MaxHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 4010; @@ -29304,7 +29276,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 30: { LogStep(30, "Writes the limit of MinHeatSetpointLimit to UnoccupiedHeatingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 1800; @@ -29314,7 +29286,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 31: { LogStep(31, "Writes the limit of MaxHeatSetpointLimit to UnoccupiedHeatingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 3000; @@ -29324,389 +29296,382 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 32: { LogStep(32, "Reads MinHeatSetpointLimit attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 33: { LogStep(33, "Writes a value back that is different but valid for MinHeatSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + int16_t value; + value = 800; + 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"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + 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 MinHeatSetpointLimit to value below the AbsMinHeatSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(35, "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; - value = 650; + value = 2000; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } case 36: { - LogStep(36, "Writes MinHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(36, "Writes MinHeatSetpointLimit to value below the AbsMinHeatSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; - value = 4050; + value = 650; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } case 37: { - LogStep(37, "Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(37, "Writes MinHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; - value = 700; + 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 AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(38, "Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + 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, "Reads MaxHeatSetpointLimit attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(39, "Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015 && !TSTAT.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + int16_t value; + value = 3000; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); } case 40: { - LogStep(40, "Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && A_MINHEATSETPOINTLIMIT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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"), + 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"); + VerifyOrDo(!ShouldSkip("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::MinHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 41: { - LogStep(41, "Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("A_MINHEATSETPOINTLIMIT && TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 42: { + LogStep(42, "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; value = 3000; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 42: { - LogStep(42, "Writes a value back that is different but valid for MaxHeatSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 43: { + LogStep(43, "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; value = 2900; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 43: { - LogStep(43, "Reads it back again to confirm the successful write of MaxHeatSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 44: { + LogStep(44, "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 44: { - LogStep(44, "Writes MaxHeatSetpointLimit to value below the AbsMinHeatSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 45: { + LogStep(45, "Writes MaxHeatSetpointLimit to value below the AbsMinHeatSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016"), 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 45: { - LogStep(45, "Writes MaxHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 46: { + LogStep(46, "Writes MaxHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016"), 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 46: { - LogStep(46, "Writes the limit of AbsMinHeatSetpointLimit to MaxHeatSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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)); ListFreer listFreer; int16_t value; value = 700; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 47: { - LogStep(47, "Writes the limit of AbsMaxHeatSetpointLimit to MaxHeatSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 48: { + LogStep(48, "Writes the limit of AbsMaxHeatSetpointLimit to MaxHeatSetpointLimit attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016 && !TSTAT.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + int16_t value; + value = 3000; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); } - case 48: { - LogStep(48, "Reads MinCoolSetpointLimit attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, true, chip::NullOptional); } - case 49: { - LogStep(49, "Writes a value back that is different but valid for MinCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 50: { + LogStep(50, "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; value = 2000; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 50: { - LogStep(50, "Reads it back again to confirm the successful write of MinCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 51: { + LogStep(51, "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 51: { - LogStep(51, "Writes MinCoolSetpointLimit to value below the AbsMinCoolSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 52: { + LogStep(52, "Writes MinCoolSetpointLimit to value below the AbsMinCoolSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), 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 52: { - LogStep(52, "Writes MinCoolSetpointLimit to value above the MaxCoolSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 53: { + LogStep(53, "Writes MinCoolSetpointLimit 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; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 53: { - LogStep(53, "Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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)); ListFreer listFreer; int16_t value; value = 1600; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 54: { - LogStep(54, "Writes the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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)); ListFreer listFreer; int16_t value; value = 3200; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 55: { - LogStep(55, "Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && A_MINCOOLSETPOINTLIMIT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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)); ListFreer listFreer; int16_t value; value = 1600; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 56: { - LogStep(56, "Reads MaxCoolSetpointLimit attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, true, chip::NullOptional); } - case 57: { - LogStep(57, "Writes a value back that is different but valid for MaxCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } case 58: { - LogStep(58, "Reads it back again to confirm the successful write of MaxCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(58, "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; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + int16_t value; + value = 2000; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); } case 59: { - LogStep(59, "Writes MaxCoolSetpointLimit to value below the AbsMinCoolSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(59, "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)); ListFreer listFreer; int16_t value; value = 1000; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 60: { - LogStep(60, "Writes MaxCoolSetpointLimit to value above the MaxCoolSetpointLimit "); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 61: { + LogStep(61, "Writes MaxCoolSetpointLimit to value above the MaxCoolSetpointLimit "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018"), 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 61: { - LogStep(61, "Writes the limit of AbsMinCoolSetpointLimit to MaxCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + int16_t value; + value = 1600; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); } - case 62: { - LogStep(62, "Writes the limit of MaxCoolSetpointLimit to MaxCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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)); ListFreer listFreer; int16_t value; value = 3200; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 63: { - LogStep(63, "Writes (sets back) default value of MinHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 64: { + LogStep(64, "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; value = 700; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 64: { - LogStep(64, "Writes (sets back)default value of MaxHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 65: { + LogStep(65, "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; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + int16_t value; + value = 3000; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, + value, chip::NullOptional, chip::NullOptional); } - case 65: { - LogStep(65, "Writes MaxHeatSetpointLimit That meets the deadband of 2.5C"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && A_MAXHEATSETPOINTLIMIT &&!TSTAT.S.F05"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 66: { + LogStep(66, "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; value = 2950; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 66: { - LogStep(66, "Writes (sets back) default value of MinCoolSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 67: { + LogStep(67, "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; value = 1600; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 67: { - LogStep(67, "Writes (sets back) default value of MaxCoolSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 68: { + LogStep(68, "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; value = 3200; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 68: { - LogStep(68, "Reads MinSetpointDeadBand attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 69: { + LogStep(69, "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 69: { - LogStep(69, "Writes a value back that is different but valid for MinSetpointDeadBand attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 70: { + LogStep(70, "Writes a value back that is different but valid for MinSetpointDeadBand attribute"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int8_t value; value = 5; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, value, chip::NullOptional, chip::NullOptional); } - case 70: { - LogStep(70, "Reads it back again to confirm the successful write of MinSetpointDeadBand attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 71: { + LogStep(71, "Reads it back again to confirm the successful write of MinSetpointDeadBand attribute"); + 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 71: { - LogStep(71, "Writes the value below MinSetpointDeadBand"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 72: { + LogStep(72, "Writes the value below MinSetpointDeadBand"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int8_t value; value = -1; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, value, chip::NullOptional, chip::NullOptional); } - case 72: { - LogStep(72, "Writes the value above MinSetpointDeadBand "); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 73: { + LogStep(73, "Writes the value above MinSetpointDeadBand "); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int8_t value; value = 30; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, value, chip::NullOptional, chip::NullOptional); } - case 73: { - LogStep(73, "Writes the min limit of MinSetpointDeadBand"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 74: { + LogStep(74, "Writes the min limit of MinSetpointDeadBand"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int8_t value; value = 0; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, value, chip::NullOptional, chip::NullOptional); } - case 74: { - LogStep(74, "Writes the max limit of MinSetpointDeadBand"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 75: { + LogStep(75, "Writes the max limit of MinSetpointDeadBand"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int8_t value; value = 25; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, value, chip::NullOptional, chip::NullOptional); } - case 75: { - LogStep(75, "Reads ControlSequenceOfOperation from Server DUT and verifies that the value is valid"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 76: { + LogStep(76, "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 76: { - LogStep(76, "Write Attribute command for ControlSequenceOfOperation with a new valid value"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 77: { + LogStep(77, "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; value = static_cast(2); @@ -29714,24 +29679,23 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::ControlSequenceOfOperation::Id, value, chip::NullOptional, chip::NullOptional); } - case 77: { - LogStep(77, "Read it back again to confirm the successful write"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 78: { + LogStep(78, "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 78: { - LogStep(78, "Writes MaxHeatSetpointLimit attribute to default value of 2950 to meet deadband constraint"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && A_MINHEATSETPOINTLIMIT && TSTAT.S.F05"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 79: { + LogStep(79, "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; value = 2950; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 79: { - LogStep(79, "Sets OccupiedCoolingSetpoint to default value"); + case 80: { + LogStep(80, "Sets OccupiedCoolingSetpoint to default value"); VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; @@ -29740,20 +29704,19 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand Thermostat::Attributes::OccupiedCoolingSetpoint::Id, value, chip::NullOptional, chip::NullOptional); } - case 80: { - LogStep(80, "Sets OccupiedHeatingSetpoint to default value"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 81: { + LogStep(81, "Sets OccupiedHeatingSetpoint to default value"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + int16_t value; + value = 2000; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::OccupiedHeatingSetpoint::Id, value, chip::NullOptional, + chip::NullOptional); } - case 81: { - LogStep(81, "Sends SetpointRaise Command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 82: { + LogStep(82, "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; value.mode = static_cast(0); @@ -29763,26 +29726,25 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand ); } - case 82: { - LogStep(82, "Reads back OccupiedHeatingSetpoint to confirm the success of the write"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 83: { + LogStep(83, "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 83: { - LogStep(83, "Sets OccupiedHeatingSetpoint to default value"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 84: { + LogStep(84, "Sets OccupiedHeatingSetpoint to default value"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + int16_t value; + value = 2000; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::OccupiedHeatingSetpoint::Id, value, chip::NullOptional, + chip::NullOptional); } - case 84: { - LogStep(84, "Sends SetpointRaise Command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 85: { + LogStep(85, "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; value.mode = static_cast(0); @@ -29792,26 +29754,15 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand ); } - case 85: { - LogStep(85, "Reads back OccupiedHeatingSetpoint to confirm the success of the write"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 86: { + LogStep(86, "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 86: { - LogStep(86, "Sets OccupiedCoolingSetpoint to default value"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - int16_t value; - value = 2600; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::OccupiedCoolingSetpoint::Id, value, chip::NullOptional, - chip::NullOptional); - } case 87: { - LogStep(87, "Sends SetpointRaise Command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(87, "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; value.mode = static_cast(1); @@ -29823,13 +29774,13 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 88: { LogStep(88, "Reads back OccupiedCoolingSetpoint to confirm the success of the write"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 2600; @@ -29838,9 +29789,8 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand chip::NullOptional); } case 90: { - LogStep(90, "Sends SetpointRaise Command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(90, "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; value.mode = static_cast(1); @@ -29852,13 +29802,13 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 91: { LogStep(91, "Reads back OccupiedCoolingSetpoint to confirm the success of the write"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 2600; @@ -29868,18 +29818,17 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 93: { LogStep(93, "Sets OccupiedHeatingSetpoint to default value"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + int16_t value; + value = 2000; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::OccupiedHeatingSetpoint::Id, value, chip::NullOptional, + chip::NullOptional); } case 94: { - LogStep(94, "Sends SetpointRaise Command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(94, "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; value.mode = static_cast(2); @@ -29891,19 +29840,19 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 95: { LogStep(95, "Reads back OccupiedCoolingSetpoint to confirm the success of the write"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; int16_t value; value = 2600; @@ -29913,18 +29862,17 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 98: { LogStep(98, "Sets OccupiedHeatingSetpoint to default value"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + int16_t value; + value = 2000; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, + Thermostat::Attributes::OccupiedHeatingSetpoint::Id, value, chip::NullOptional, + chip::NullOptional); } case 99: { - LogStep(99, "Sends SetpointRaise Command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(99, "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; value.mode = static_cast(2); @@ -29936,13 +29884,13 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand } case 100: { LogStep(100, "Reads back OccupiedCoolingSetpoint to confirm the success of the write"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 6bc5360c4ffbc4..0edeb7084a01c3 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -43889,50 +43889,50 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { break; case 4: ChipLogProgress( - chipTool, " ***** Test Step 4 : Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList\n"); - if (ShouldSkip("TSTAT.S.F01")) { + chipTool, " ***** Test Step 4 : Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } - err = TestReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_4(); + err = TestReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_4(); break; case 5: ChipLogProgress( - chipTool, " ***** Test Step 5 : Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList\n"); - if (ShouldSkip("TSTAT.S.F02")) { + chipTool, " ***** Test Step 5 : Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } - err = TestReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_5(); + err = TestReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_5(); break; case 6: ChipLogProgress( - chipTool, " ***** Test Step 6 : Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList\n"); - if (ShouldSkip("TSTAT.S.F00")) { + chipTool, " ***** Test Step 6 : Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.F02")) { NextTest(); return; } - err = TestReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_6(); + err = TestReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_6(); break; case 7: ChipLogProgress(chipTool, - " ***** Test Step 7 : Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in " + " ***** Test Step 7 : Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in " "AttributeList\n"); - if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02")) { + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02")) { NextTest(); return; } - err = TestReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_7(); + err = TestReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_7(); break; case 8: ChipLogProgress(chipTool, - " ***** Test Step 8 : Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in " + " ***** Test Step 8 : Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in " "AttributeList\n"); - if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02")) { + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02")) { NextTest(); return; } - err = TestReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_8(); + err = TestReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_8(); break; case 9: ChipLogProgress( @@ -43991,14 +43991,6 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 15 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_15(); break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeEventList_16(); - break; } if (CHIP_NO_ERROR != err) { @@ -44058,9 +44050,6 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -44074,7 +44063,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 17; + const uint16_t mTestCount = 16; chip::Optional mNodeId; chip::Optional mCluster; @@ -44127,7 +44116,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); - VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 1UL)); VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 63UL)); NextTest(); @@ -44165,7 +44154,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_4() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -44174,12 +44163,12 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList Error: %@", err); + NSLog(@"Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); NextTest(); }]; @@ -44187,7 +44176,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_5() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -44196,12 +44185,12 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); + NSLog(@"Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); NextTest(); }]; @@ -44209,7 +44198,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_6() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -44218,12 +44207,12 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList Error: %@", err); + NSLog(@"Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); NextTest(); }]; @@ -44231,7 +44220,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_7() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -44240,12 +44229,12 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); + NSLog(@"Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); NextTest(); }]; @@ -44253,7 +44242,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_8() + CHIP_ERROR TestReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -44262,12 +44251,12 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); + NSLog(@"Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); NextTest(); }]; @@ -44289,6 +44278,8 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 25UL)); NextTest(); @@ -44435,15 +44426,6 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadTheGlobalAttributeEventList_16() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_TSTAT_2_1 : public TestCommandBridge { @@ -44490,10 +44472,6 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Reads mandatory attributes from DUT: LocalTemperature\n"); - if (ShouldSkip("TSTAT.S.A0000")) { - NextTest(); - return; - } err = TestReadsMandatoryAttributesFromDutLocalTemperature_1(); break; case 2: @@ -44506,7 +44484,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read Occupancy attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0002")) { + if (ShouldSkip("TSTAT.S.F02")) { NextTest(); return; } @@ -44578,7 +44556,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : Reads optional attributes from DUT: OccupiedCoolingSetpoint\n"); - if (ShouldSkip("TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } @@ -44586,7 +44564,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : Reads mandatory attributes from DUT: OccupiedHeatingSetpoint\n"); - if (ShouldSkip("TSTAT.S.A0012")) { + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } @@ -44594,7 +44572,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Read UnoccupiedCoolingSetpoint attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0013")) { + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02")) { NextTest(); return; } @@ -44602,27 +44580,27 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Read UnoccupiedHeatingSetpoint attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0014")) { + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02")) { NextTest(); return; } err = TestReadUnoccupiedHeatingSetpointAttributeFromTheDut_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Reads mandatory attributes from DUT: MinHeatSetpointLimit\n"); + ChipLogProgress(chipTool, " ***** Test Step 16 : Reads attribute from DUT: MinHeatSetpointLimit\n"); if (ShouldSkip("TSTAT.S.A0015")) { NextTest(); return; } - err = TestReadsMandatoryAttributesFromDutMinHeatSetpointLimit_16(); + err = TestReadsAttributeFromDutMinHeatSetpointLimit_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Reads mandatory attributes from DUT: MaxHeatSetpointLimit\n"); + ChipLogProgress(chipTool, " ***** Test Step 17 : Reads attribute from DUT: MaxHeatSetpointLimit\n"); if (ShouldSkip("TSTAT.S.A0016")) { NextTest(); return; } - err = TestReadsMandatoryAttributesFromDutMaxHeatSetpointLimit_17(); + err = TestReadsAttributeFromDutMaxHeatSetpointLimit_17(); break; case 18: ChipLogProgress(chipTool, " ***** Test Step 18 : Reads optional attributes from DUT: MinCoolSetpointLimit\n"); @@ -44642,7 +44620,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { break; case 20: ChipLogProgress(chipTool, " ***** Test Step 20 : Reads optional attributes from DUT: MinSetpointDeadBand\n"); - if (ShouldSkip("TSTAT.S.A0019")) { + if (ShouldSkip("TSTAT.S.F05")) { NextTest(); return; } @@ -44658,237 +44636,219 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { break; case 22: ChipLogProgress(chipTool, " ***** Test Step 22 : Reads mandatory attributes from DUT: ControlSequenceOfOperation\n"); - if (ShouldSkip("TSTAT.S.A001b")) { - NextTest(); - return; - } err = TestReadsMandatoryAttributesFromDutControlSequenceOfOperation_22(); break; case 23: ChipLogProgress(chipTool, " ***** Test Step 23 : Reads mandatory attributes from DUT: SystemMode\n"); - if (ShouldSkip("TSTAT.S.A001c")) { - NextTest(); - return; - } err = TestReadsMandatoryAttributesFromDutSystemMode_23(); break; case 24: - ChipLogProgress(chipTool, - " ***** Test Step 24 : Read AlarmMask attribute from the DUT and Verify that the DUT responds with a map8 " - "value.The value has to be in the range of 0x00 to 0x07.\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A001d")) { + ChipLogProgress(chipTool, " ***** Test Step 24 : Read ThermostatRunningMode attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A001e")) { NextTest(); return; } - err = TestReadAlarmMaskAttributeFromTheDutAndVerifyThatTheDutRespondsWithAMap8ValueTheValueHasToBeInTheRangeOf0x00To0x07_24(); + err = TestReadThermostatRunningModeAttributeFromTheDut_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read ThermostatRunningMode attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A001e")) { + ChipLogProgress(chipTool, " ***** Test Step 25 : Reads constraints of optional attributes from DUT: StartOfWeek\n"); + if (ShouldSkip("TSTAT.S.F03")) { NextTest(); return; } - err = TestReadThermostatRunningModeAttributeFromTheDut_25(); + err = TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Reads constraints of optional attributes from DUT: StartOfWeek\n"); - if (ShouldSkip("TSTAT.S.A0020")) { + ChipLogProgress(chipTool, " ***** Test Step 26 : Reads optional attributes from DUT: NumberOfWeeklyTransitions\n"); + if (ShouldSkip("TSTAT.S.F03")) { NextTest(); return; } - err = TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_26(); + err = TestReadsOptionalAttributesFromDutNumberOfWeeklyTransitions_26(); break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Reads optional attributes from DUT: NumberOfWeeklyTransitions\n"); - if (ShouldSkip("TSTAT.S.A0021")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : Reads optional attributes from DUT: NumberOfDailyTransitions\n"); + if (ShouldSkip("TSTAT.S.F03")) { NextTest(); return; } - err = TestReadsOptionalAttributesFromDutNumberOfWeeklyTransitions_27(); + err = TestReadsOptionalAttributesFromDutNumberOfDailyTransitions_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Reads optional attributes from DUT: NumberOfDailyTransitions\n"); - if (ShouldSkip("TSTAT.S.A0022")) { + ChipLogProgress(chipTool, " ***** Test Step 28 : Read TemperatureSetpointHold attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0023")) { NextTest(); return; } - err = TestReadsOptionalAttributesFromDutNumberOfDailyTransitions_28(); + err = TestReadTemperatureSetpointHoldAttributeFromTheDut_28(); break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Read TemperatureSetpointHold attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0023")) { + ChipLogProgress(chipTool, " ***** Test Step 29 : Read TemperatureSetpointHoldDuration attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0024")) { NextTest(); return; } - err = TestReadTemperatureSetpointHoldAttributeFromTheDut_29(); + err = TestReadTemperatureSetpointHoldDurationAttributeFromTheDut_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Read TemperatureSetpointHoldDuration attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0024")) { + ChipLogProgress(chipTool, " ***** Test Step 30 : Read ThermostatProgrammingOperationMode attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0025")) { NextTest(); return; } - err = TestReadTemperatureSetpointHoldDurationAttributeFromTheDut_30(); + err = TestReadThermostatProgrammingOperationModeAttributeFromTheDut_30(); break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Read ThermostatProgrammingOperationMode attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0025")) { + ChipLogProgress(chipTool, " ***** Test Step 31 : Read ThermostatRunningState attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0029")) { NextTest(); return; } - err = TestReadThermostatProgrammingOperationModeAttributeFromTheDut_31(); + err = TestReadThermostatRunningStateAttributeFromTheDut_31(); break; case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Read ThermostatRunningState attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0029")) { + ChipLogProgress(chipTool, " ***** Test Step 32 : Read SetpointChangeSource attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0030")) { NextTest(); return; } - err = TestReadThermostatRunningStateAttributeFromTheDut_32(); + err = TestReadSetpointChangeSourceAttributeFromTheDut_32(); break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Read SetpointChangeSource attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0030")) { + ChipLogProgress(chipTool, " ***** Test Step 33 : Read SetpointChangeAmount attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0031")) { NextTest(); return; } - err = TestReadSetpointChangeSourceAttributeFromTheDut_33(); + err = TestReadSetpointChangeAmountAttributeFromTheDut_33(); break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Read SetpointChangeAmount attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0031")) { + ChipLogProgress(chipTool, " ***** Test Step 34 : Read SetpointChangeSourceTimestamp attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.A0032")) { NextTest(); return; } - err = TestReadSetpointChangeAmountAttributeFromTheDut_34(); + err = TestReadSetpointChangeSourceTimestampAttributeFromTheDut_34(); break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Read SetpointChangeSourceTimestamp attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0032")) { + ChipLogProgress(chipTool, " ***** Test Step 35 : Read OccupiedSetback attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.F02")) { NextTest(); return; } - err = TestReadSetpointChangeSourceTimestampAttributeFromTheDut_35(); + err = TestReadOccupiedSetbackAttributeFromTheDut_35(); break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Read OccupiedSetback attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0034")) { + ChipLogProgress(chipTool, " ***** Test Step 36 : Read OccupiedSetbackMin attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.F02")) { NextTest(); return; } - err = TestReadOccupiedSetbackAttributeFromTheDut_36(); + err = TestReadOccupiedSetbackMinAttributeFromTheDut_36(); break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Read OccupiedSetbackMin attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0035")) { + ChipLogProgress(chipTool, " ***** Test Step 37 : Read OccupiedSetbackMax attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.F02")) { NextTest(); return; } - err = TestReadOccupiedSetbackMinAttributeFromTheDut_37(); + err = TestReadOccupiedSetbackMaxAttributeFromTheDut_37(); break; case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Read OccupiedSetbackMax attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0036")) { + ChipLogProgress(chipTool, " ***** Test Step 38 : Read UnoccupiedSetback attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F04")) { NextTest(); return; } - err = TestReadOccupiedSetbackMaxAttributeFromTheDut_38(); + err = TestReadUnoccupiedSetbackAttributeFromTheDut_38(); break; case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Read UnoccupiedSetback attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0037")) { + ChipLogProgress(chipTool, " ***** Test Step 39 : Read UnoccupiedSetbackMin attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F04")) { NextTest(); return; } - err = TestReadUnoccupiedSetbackAttributeFromTheDut_39(); + err = TestReadUnoccupiedSetbackMinAttributeFromTheDut_39(); break; case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : Read UnoccupiedSetbackMin attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0038")) { + ChipLogProgress(chipTool, " ***** Test Step 40 : Read UnoccupiedSetbackMax attribute from the DUT\n"); + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F04")) { NextTest(); return; } - err = TestReadUnoccupiedSetbackMinAttributeFromTheDut_40(); + err = TestReadUnoccupiedSetbackMaxAttributeFromTheDut_40(); break; case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Read UnoccupiedSetbackMax attribute from the DUT\n"); - if (ShouldSkip("TSTAT.S.A0039")) { - NextTest(); - return; - } - err = TestReadUnoccupiedSetbackMaxAttributeFromTheDut_41(); - break; - case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Read EmergencyHeatDelta attribute from the DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 41 : Read EmergencyHeatDelta attribute from the DUT\n"); if (ShouldSkip("TSTAT.S.A003a")) { NextTest(); return; } - err = TestReadEmergencyHeatDeltaAttributeFromTheDut_42(); + err = TestReadEmergencyHeatDeltaAttributeFromTheDut_41(); break; - case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Read ACType attribute from the DUT\n"); + case 42: + ChipLogProgress(chipTool, " ***** Test Step 42 : Read ACType attribute from the DUT\n"); if (ShouldSkip("TSTAT.S.A0040")) { NextTest(); return; } - err = TestReadACTypeAttributeFromTheDut_43(); + err = TestReadACTypeAttributeFromTheDut_42(); break; - case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Read ACCapacity attribute from the DUT\n"); + case 43: + ChipLogProgress(chipTool, " ***** Test Step 43 : Read ACCapacity attribute from the DUT\n"); if (ShouldSkip("TSTAT.S.A0041")) { NextTest(); return; } - err = TestReadACCapacityAttributeFromTheDut_44(); + err = TestReadACCapacityAttributeFromTheDut_43(); break; - case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : Read ACRefrigerantType attribute from the DUT\n"); + case 44: + ChipLogProgress(chipTool, " ***** Test Step 44 : Read ACRefrigerantType attribute from the DUT\n"); if (ShouldSkip("TSTAT.S.A0042")) { NextTest(); return; } - err = TestReadACRefrigerantTypeAttributeFromTheDut_45(); + err = TestReadACRefrigerantTypeAttributeFromTheDut_44(); break; - case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : Read ACCompressorType attribute from the DUT\n"); + case 45: + ChipLogProgress(chipTool, " ***** Test Step 45 : Read ACCompressorType attribute from the DUT\n"); if (ShouldSkip("TSTAT.S.A0043")) { NextTest(); return; } - err = TestReadACCompressorTypeAttributeFromTheDut_46(); + err = TestReadACCompressorTypeAttributeFromTheDut_45(); break; - case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : Read ACErrorCode attribute from the DUT\n"); + case 46: + ChipLogProgress(chipTool, " ***** Test Step 46 : Read ACErrorCode attribute from the DUT\n"); if (ShouldSkip("TSTAT.S.A0044")) { NextTest(); return; } - err = TestReadACErrorCodeAttributeFromTheDut_47(); + err = TestReadACErrorCodeAttributeFromTheDut_46(); break; - case 48: - ChipLogProgress(chipTool, " ***** Test Step 48 : Read ACLouverPosition attribute from the DUT\n"); + case 47: + ChipLogProgress(chipTool, " ***** Test Step 47 : Read ACLouverPosition attribute from the DUT\n"); if (ShouldSkip("TSTAT.S.A0045")) { NextTest(); return; } - err = TestReadACLouverPositionAttributeFromTheDut_48(); + err = TestReadACLouverPositionAttributeFromTheDut_47(); break; - case 49: - ChipLogProgress(chipTool, " ***** Test Step 49 : Read ACCoilTemperature attribute from the DUT\n"); + case 48: + ChipLogProgress(chipTool, " ***** Test Step 48 : Read ACCoilTemperature attribute from the DUT\n"); if (ShouldSkip("TSTAT.S.A0046")) { NextTest(); return; } - err = TestReadACCoilTemperatureAttributeFromTheDut_49(); + err = TestReadACCoilTemperatureAttributeFromTheDut_48(); break; - case 50: - ChipLogProgress(chipTool, " ***** Test Step 50 : Read ACCapacityFormat attribute from the DUT\n"); + case 49: + ChipLogProgress(chipTool, " ***** Test Step 49 : Read ACCapacityFormat attribute from the DUT\n"); if (ShouldSkip("TSTAT.S.A0047")) { NextTest(); return; } - err = TestReadACCapacityFormatAttributeFromTheDut_50(); + err = TestReadACCapacityFormatAttributeFromTheDut_49(); break; } @@ -45051,9 +45011,6 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -45067,7 +45024,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 51; + const uint16_t mTestCount = 50; chip::Optional mNodeId; chip::Optional mCluster; @@ -45356,8 +45313,8 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("occupiedCoolingSetpoint", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("occupiedCoolingSetpoint", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("occupiedCoolingSetpoint", [value shortValue], 32767)); + VerifyOrReturn(CheckConstraintMinValue("occupiedCoolingSetpoint", [value shortValue], 1600)); + VerifyOrReturn(CheckConstraintMaxValue("occupiedCoolingSetpoint", [value shortValue], 3200)); NextTest(); }]; @@ -45379,8 +45336,8 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("occupiedHeatingSetpoint", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("occupiedHeatingSetpoint", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("occupiedHeatingSetpoint", [value shortValue], 32767)); + VerifyOrReturn(CheckConstraintMinValue("occupiedHeatingSetpoint", [value shortValue], 700)); + VerifyOrReturn(CheckConstraintMaxValue("occupiedHeatingSetpoint", [value shortValue], 3000)); NextTest(); }]; @@ -45403,8 +45360,8 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("unoccupiedCoolingSetpoint", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("unoccupiedCoolingSetpoint", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("unoccupiedCoolingSetpoint", [value shortValue], 32767)); + VerifyOrReturn(CheckConstraintMinValue("unoccupiedCoolingSetpoint", [value shortValue], 1600)); + VerifyOrReturn(CheckConstraintMaxValue("unoccupiedCoolingSetpoint", [value shortValue], 3200)); NextTest(); }]; @@ -45427,8 +45384,8 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("unoccupiedHeatingSetpoint", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("unoccupiedHeatingSetpoint", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("unoccupiedHeatingSetpoint", [value shortValue], 32767)); + VerifyOrReturn(CheckConstraintMinValue("unoccupiedHeatingSetpoint", [value shortValue], 700)); + VerifyOrReturn(CheckConstraintMaxValue("unoccupiedHeatingSetpoint", [value shortValue], 3000)); NextTest(); }]; @@ -45436,7 +45393,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsMandatoryAttributesFromDutMinHeatSetpointLimit_16() + CHIP_ERROR TestReadsAttributeFromDutMinHeatSetpointLimit_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -45445,13 +45402,13 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeMinHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: MinHeatSetpointLimit Error: %@", err); + NSLog(@"Reads attribute from DUT: MinHeatSetpointLimit Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("minHeatSetpointLimit", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("minHeatSetpointLimit", [value shortValue], -27315)); - VerifyOrReturn(CheckConstraintMaxValue("minHeatSetpointLimit", [value shortValue], 32767)); + VerifyOrReturn(CheckConstraintMinValue("minHeatSetpointLimit", [value shortValue], 700)); + VerifyOrReturn(CheckConstraintMaxValue("minHeatSetpointLimit", [value shortValue], 3000)); NextTest(); }]; @@ -45459,7 +45416,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsMandatoryAttributesFromDutMaxHeatSetpointLimit_17() + CHIP_ERROR TestReadsAttributeFromDutMaxHeatSetpointLimit_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -45468,7 +45425,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeMaxHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: MaxHeatSetpointLimit Error: %@", err); + NSLog(@"Reads attribute from DUT: MaxHeatSetpointLimit Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45621,17 +45578,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadAlarmMaskAttributeFromTheDutAndVerifyThatTheDutRespondsWithAMap8ValueTheValueHasToBeInTheRangeOf0x00To0x07_24() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadThermostatRunningModeAttributeFromTheDut_25() + CHIP_ERROR TestReadThermostatRunningModeAttributeFromTheDut_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -45646,7 +45593,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("thermostatRunningMode", "", "enum8")); VerifyOrReturn(CheckConstraintMinValue("thermostatRunningMode", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("thermostatRunningMode", [value unsignedCharValue], 4U)); + VerifyOrReturn(CheckConstraintMaxValue("thermostatRunningMode", [value unsignedCharValue], 9U)); NextTest(); }]; @@ -45654,7 +45601,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_26() + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_25() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -45677,7 +45624,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOptionalAttributesFromDutNumberOfWeeklyTransitions_27() + CHIP_ERROR TestReadsOptionalAttributesFromDutNumberOfWeeklyTransitions_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -45701,7 +45648,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOptionalAttributesFromDutNumberOfDailyTransitions_28() + CHIP_ERROR TestReadsOptionalAttributesFromDutNumberOfDailyTransitions_27() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -45724,7 +45671,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTemperatureSetpointHoldAttributeFromTheDut_29() + CHIP_ERROR TestReadTemperatureSetpointHoldAttributeFromTheDut_28() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -45747,7 +45694,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTemperatureSetpointHoldDurationAttributeFromTheDut_30() + CHIP_ERROR TestReadTemperatureSetpointHoldDurationAttributeFromTheDut_29() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -45776,7 +45723,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadThermostatProgrammingOperationModeAttributeFromTheDut_31() + CHIP_ERROR TestReadThermostatProgrammingOperationModeAttributeFromTheDut_30() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -45800,7 +45747,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadThermostatRunningStateAttributeFromTheDut_32() + CHIP_ERROR TestReadThermostatRunningStateAttributeFromTheDut_31() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -45823,7 +45770,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadSetpointChangeSourceAttributeFromTheDut_33() + CHIP_ERROR TestReadSetpointChangeSourceAttributeFromTheDut_32() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -45846,7 +45793,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadSetpointChangeAmountAttributeFromTheDut_34() + CHIP_ERROR TestReadSetpointChangeAmountAttributeFromTheDut_33() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -45872,7 +45819,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadSetpointChangeSourceTimestampAttributeFromTheDut_35() + CHIP_ERROR TestReadSetpointChangeSourceTimestampAttributeFromTheDut_34() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -45893,7 +45840,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadOccupiedSetbackAttributeFromTheDut_36() + CHIP_ERROR TestReadOccupiedSetbackAttributeFromTheDut_35() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -45919,7 +45866,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadOccupiedSetbackMinAttributeFromTheDut_37() + CHIP_ERROR TestReadOccupiedSetbackMinAttributeFromTheDut_36() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -45945,7 +45892,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadOccupiedSetbackMaxAttributeFromTheDut_38() + CHIP_ERROR TestReadOccupiedSetbackMaxAttributeFromTheDut_37() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -45971,7 +45918,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadUnoccupiedSetbackAttributeFromTheDut_39() + CHIP_ERROR TestReadUnoccupiedSetbackAttributeFromTheDut_38() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -45997,7 +45944,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadUnoccupiedSetbackMinAttributeFromTheDut_40() + CHIP_ERROR TestReadUnoccupiedSetbackMinAttributeFromTheDut_39() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -46023,7 +45970,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadUnoccupiedSetbackMaxAttributeFromTheDut_41() + CHIP_ERROR TestReadUnoccupiedSetbackMaxAttributeFromTheDut_40() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -46049,7 +45996,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEmergencyHeatDeltaAttributeFromTheDut_42() + CHIP_ERROR TestReadEmergencyHeatDeltaAttributeFromTheDut_41() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -46072,7 +46019,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadACTypeAttributeFromTheDut_43() + CHIP_ERROR TestReadACTypeAttributeFromTheDut_42() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -46095,7 +46042,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadACCapacityAttributeFromTheDut_44() + CHIP_ERROR TestReadACCapacityAttributeFromTheDut_43() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -46118,7 +46065,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadACRefrigerantTypeAttributeFromTheDut_45() + CHIP_ERROR TestReadACRefrigerantTypeAttributeFromTheDut_44() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -46141,7 +46088,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadACCompressorTypeAttributeFromTheDut_46() + CHIP_ERROR TestReadACCompressorTypeAttributeFromTheDut_45() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -46164,7 +46111,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadACErrorCodeAttributeFromTheDut_47() + CHIP_ERROR TestReadACErrorCodeAttributeFromTheDut_46() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -46184,7 +46131,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadACLouverPositionAttributeFromTheDut_48() + CHIP_ERROR TestReadACLouverPositionAttributeFromTheDut_47() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -46207,7 +46154,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadACCoilTemperatureAttributeFromTheDut_49() + CHIP_ERROR TestReadACCoilTemperatureAttributeFromTheDut_48() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -46233,7 +46180,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadACCapacityFormatAttributeFromTheDut_50() + CHIP_ERROR TestReadACCapacityFormatAttributeFromTheDut_49() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -46305,7 +46252,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 1 : Reads OccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is " "within range\n"); - if (ShouldSkip("TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } @@ -46314,7 +46261,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Writes a value back that is different but valid for OccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } @@ -46323,7 +46270,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Reads it back again to confirm the successful write of OccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } @@ -46331,17 +46278,17 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { break; case 4: ChipLogProgress( - chipTool, " ***** Test Step 4 : Writes OccupiedCoolingSetpoint to value below the MinCoolSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0011")) { + chipTool, " ***** Test Step 4 : Writes OccupiedCoolingSetpoint to value below the ABSMinCoolSetpointLimit\n"); + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } - err = TestWritesOccupiedCoolingSetpointToValueBelowTheMinCoolSetpointLimit_4(); + err = TestWritesOccupiedCoolingSetpointToValueBelowTheABSMinCoolSetpointLimit_4(); break; case 5: ChipLogProgress( chipTool, " ***** Test Step 5 : Writes OccupiedCoolingSetpoint to value above the MaxCoolSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } @@ -46350,7 +46297,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 6: ChipLogProgress( chipTool, " ***** Test Step 6 : Writes the limit of MinCoolSetpointLimit to OccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01 && !TSTAT.S.F05")) { NextTest(); return; } @@ -46368,7 +46315,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 8: ChipLogProgress( chipTool, " ***** Test Step 8 : Writes the limit of MaxCoolSetpointLimit to OccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } @@ -46378,7 +46325,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 9 : Reads OccupiedHeatingSetpoint attribute from Server DUT and verifies that the value is " "within range\n"); - if (ShouldSkip("TSTAT.S.A0012")) { + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } @@ -46387,7 +46334,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Writes a value back that is different but valid for OccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0012")) { + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } @@ -46396,7 +46343,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Reads it back again to confirm the successful write of OccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0012")) { + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } @@ -46405,7 +46352,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 12: ChipLogProgress( chipTool, " ***** Test Step 12 : Writes OccupiedHeatingSetpoint to value below the MinHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0012")) { + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } @@ -46414,7 +46361,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 13: ChipLogProgress( chipTool, " ***** Test Step 13 : Writes OccupiedHeatingSetpoint to value above the MaxHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0012")) { + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } @@ -46423,7 +46370,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 14: ChipLogProgress( chipTool, " ***** Test Step 14 : Writes the limit of MinHeatSetpointLimit to OccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0012")) { + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } @@ -46450,7 +46397,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 17: ChipLogProgress( chipTool, " ***** Test Step 17 : Writes the limit of MaxHeatSetpointLimit to OccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0012")) { + if (ShouldSkip("TSTAT.S.F05")) { NextTest(); return; } @@ -46460,7 +46407,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 18 : Reads UnoccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is " "within range\n"); - if (ShouldSkip("TSTAT.S.A0013")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01")) { NextTest(); return; } @@ -46469,7 +46416,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 19: ChipLogProgress(chipTool, " ***** Test Step 19 : Writes a value back that is different but valid for UnoccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0013")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01")) { NextTest(); return; } @@ -46479,7 +46426,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 20 : Reads it back again to confirm the successful write of UnoccupiedCoolingSetpoint " "attribute\n"); - if (ShouldSkip("TSTAT.S.A0013")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01")) { NextTest(); return; } @@ -46487,26 +46434,26 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { break; case 21: ChipLogProgress( - chipTool, " ***** Test Step 21 : Writes UnoccupiedCoolingSetpoint to value below the MinHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0013")) { + chipTool, " ***** Test Step 21 : Writes UnoccupiedCoolingSetpoint to value below the MinCoolSetpointLimit\n"); + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01")) { NextTest(); return; } - err = TestWritesUnoccupiedCoolingSetpointToValueBelowTheMinHeatSetpointLimit_21(); + err = TestWritesUnoccupiedCoolingSetpointToValueBelowTheMinCoolSetpointLimit_21(); break; case 22: ChipLogProgress( - chipTool, " ***** Test Step 22 : Writes UnoccupiedCoolingSetpoint to value above the MaxHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0013")) { + chipTool, " ***** Test Step 22 : Writes UnoccupiedCoolingSetpoint to value above the MaxCoolSetpointLimit\n"); + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01")) { NextTest(); return; } - err = TestWritesUnoccupiedCoolingSetpointToValueAboveTheMaxHeatSetpointLimit_22(); + err = TestWritesUnoccupiedCoolingSetpointToValueAboveTheMaxCoolSetpointLimit_22(); break; case 23: ChipLogProgress(chipTool, " ***** Test Step 23 : Writes the limit of MinCoolSetpointLimit to UnoccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0013")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01")) { NextTest(); return; } @@ -46515,7 +46462,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 24: ChipLogProgress(chipTool, " ***** Test Step 24 : Writes the limit of MaxCoolSetpointLimit to UnoccupiedCoolingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0013")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F01")) { NextTest(); return; } @@ -46525,7 +46472,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 25 : Reads UnoccupiedHeatingSetpoint attribute from Server DUT and verifies that the value is " "within range\n"); - if (ShouldSkip("TSTAT.S.A0014")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00")) { NextTest(); return; } @@ -46534,7 +46481,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 26: ChipLogProgress(chipTool, " ***** Test Step 26 : Writes a value back that is different but valid for UnoccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0014")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00")) { NextTest(); return; } @@ -46544,7 +46491,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 27 : Reads it back again to confirm the successful write of UnoccupiedHeatingSetpoint " "attribute\n"); - if (ShouldSkip("TSTAT.S.A0014")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00")) { NextTest(); return; } @@ -46553,7 +46500,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 28: ChipLogProgress( chipTool, " ***** Test Step 28 : Writes UnoccupiedHeatingSetpoint to value below the MinHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0014")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00")) { NextTest(); return; } @@ -46562,7 +46509,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 29: ChipLogProgress( chipTool, " ***** Test Step 29 : Writes UnoccupiedHeatingSetpoint to value above the MaxHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0014")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00")) { NextTest(); return; } @@ -46571,7 +46518,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 30: ChipLogProgress(chipTool, " ***** Test Step 30 : Writes the limit of MinHeatSetpointLimit to UnoccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0014")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00")) { NextTest(); return; } @@ -46580,7 +46527,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 31: ChipLogProgress(chipTool, " ***** Test Step 31 : Writes the limit of MaxHeatSetpointLimit to UnoccupiedHeatingSetpoint attribute\n"); - if (ShouldSkip("TSTAT.S.A0014")) { + if (ShouldSkip("TSTAT.S.F02 && TSTAT.S.F00")) { NextTest(); return; } @@ -46590,7 +46537,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 32 : Reads MinHeatSetpointLimit attribute from Server DUT and verifies that the value is within " "range\n"); - if (ShouldSkip("TSTAT.S.A0015")) { + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015")) { NextTest(); return; } @@ -46599,7 +46546,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 33: ChipLogProgress(chipTool, " ***** Test Step 33 : Writes a value back that is different but valid for MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0015")) { + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015")) { NextTest(); return; } @@ -46608,481 +46555,481 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 34: ChipLogProgress(chipTool, " ***** Test Step 34 : Reads it back again to confirm the successful write of MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0015")) { + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015")) { NextTest(); return; } err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinHeatSetpointLimitAttribute_34(); break; case 35: - ChipLogProgress( - chipTool, " ***** Test Step 35 : Writes MinHeatSetpointLimit to value below the AbsMinHeatSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.A0015")) { + 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 = TestWritesMinHeatSetpointLimitToValueBelowTheAbsMinHeatSetpointLimit_35(); + err = TestWritesAValueBackThatIsDifferentButViolatesTheDeadband_35(); break; case 36: ChipLogProgress( - chipTool, " ***** Test Step 36 : Writes MinHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.A0015")) { + chipTool, " ***** Test Step 36 : Writes MinHeatSetpointLimit to value below the AbsMinHeatSetpointLimit \n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015")) { NextTest(); return; } - err = TestWritesMinHeatSetpointLimitToValueAboveTheAbsMaxHeatSetpointLimit_36(); + err = TestWritesMinHeatSetpointLimitToValueBelowTheAbsMinHeatSetpointLimit_36(); break; case 37: ChipLogProgress( - chipTool, " ***** Test Step 37 : Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.A0015")) { + chipTool, " ***** Test Step 37 : Writes MinHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit \n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015")) { NextTest(); return; } - err = TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_37(); + err = TestWritesMinHeatSetpointLimitToValueAboveTheAbsMaxHeatSetpointLimit_37(); break; case 38: ChipLogProgress( - chipTool, " ***** Test Step 38 : Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0015")) { + chipTool, " ***** Test Step 38 : Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015")) { NextTest(); return; } - err = TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_38(); + err = TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_38(); break; case 39: - ChipLogProgress(chipTool, - " ***** Test Step 39 : Reads MaxHeatSetpointLimit attribute from Server DUT and verifies that the value is within " - "range\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0016")) { + 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 = TestReadsMaxHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_39(); + err = TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_39(); break; case 40: - ChipLogProgress( - chipTool, " ***** Test Step 40 : Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.F00 && A_MINHEATSETPOINTLIMIT")) { + 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 = TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_40(); + err = TestReadsMaxHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_40(); break; case 41: ChipLogProgress( - chipTool, " ***** Test Step 41 : Writes the limit of AbsMaxHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); - if (ShouldSkip("A_MINHEATSETPOINTLIMIT && TSTAT.S.F05")) { + chipTool, " ***** Test Step 41 : Writes the limit of AbsMinHeatSetpointLimit to MinHeatSetpointLimit attribute\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015")) { NextTest(); return; } - err = TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_41(); + err = TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_41(); break; case 42: - ChipLogProgress(chipTool, - " ***** Test Step 42 : Writes a value back that is different but valid for MaxHeatSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.A0016")) { + 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 = TestWritesAValueBackThatIsDifferentButValidForMaxHeatSetpointLimitAttribute_42(); + err = TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_42(); break; case 43: ChipLogProgress(chipTool, - " ***** Test Step 43 : Reads it back again to confirm the successful write of MaxHeatSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.A0016")) { + " ***** 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 = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxHeatSetpointLimitAttribute_43(); + err = TestWritesAValueBackThatIsDifferentButValidForMaxHeatSetpointLimitAttribute_43(); break; case 44: - ChipLogProgress( - chipTool, " ***** Test Step 44 : Writes MaxHeatSetpointLimit to value below the AbsMinHeatSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.A0016")) { + 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 = TestWritesMaxHeatSetpointLimitToValueBelowTheAbsMinHeatSetpointLimit_44(); + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxHeatSetpointLimitAttribute_44(); break; case 45: ChipLogProgress( - chipTool, " ***** Test Step 45 : Writes MaxHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.A0016")) { + chipTool, " ***** Test Step 45 : Writes MaxHeatSetpointLimit to value below the AbsMinHeatSetpointLimit \n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016")) { NextTest(); return; } - err = TestWritesMaxHeatSetpointLimitToValueAboveTheAbsMaxHeatSetpointLimit_45(); + err = TestWritesMaxHeatSetpointLimitToValueBelowTheAbsMinHeatSetpointLimit_45(); break; case 46: ChipLogProgress( - chipTool, " ***** Test Step 46 : Writes the limit of AbsMinHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.A0016")) { + chipTool, " ***** Test Step 46 : Writes MaxHeatSetpointLimit to value above the AbsMaxHeatSetpointLimit \n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016")) { NextTest(); return; } - err = TestWritesTheLimitOfAbsMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_46(); + err = TestWritesMaxHeatSetpointLimitToValueAboveTheAbsMaxHeatSetpointLimit_46(); break; case 47: ChipLogProgress( - chipTool, " ***** Test Step 47 : Writes the limit of AbsMaxHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0016")) { + chipTool, " ***** Test Step 47 : Writes the limit of AbsMinHeatSetpointLimit to MaxHeatSetpointLimit attribute\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016")) { NextTest(); return; } - err = TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_47(); + err = TestWritesTheLimitOfAbsMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_47(); break; case 48: - ChipLogProgress(chipTool, - " ***** Test Step 48 : Reads MinCoolSetpointLimit attribute from Server DUT and verifies that the value is within " - "range\n"); - if (ShouldSkip("TSTAT.S.A0017")) { + 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 = TestReadsMinCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_48(); + err = TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_48(); break; case 49: ChipLogProgress(chipTool, - " ***** Test Step 49 : Writes a value back that is different but valid for MinCoolSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.A0017")) { + " ***** 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 = TestWritesAValueBackThatIsDifferentButValidForMinCoolSetpointLimitAttribute_49(); + err = TestReadsMinCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_49(); break; case 50: ChipLogProgress(chipTool, - " ***** Test Step 50 : Reads it back again to confirm the successful write of MinCoolSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.A0017")) { + " ***** 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 = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinCoolSetpointLimitAttribute_50(); + err = TestWritesAValueBackThatIsDifferentButValidForMinCoolSetpointLimitAttribute_50(); break; case 51: - ChipLogProgress( - chipTool, " ***** Test Step 51 : Writes MinCoolSetpointLimit to value below the AbsMinCoolSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.A0017")) { + 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 = TestWritesMinCoolSetpointLimitToValueBelowTheAbsMinCoolSetpointLimit_51(); + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinCoolSetpointLimitAttribute_51(); break; case 52: ChipLogProgress( - chipTool, " ***** Test Step 52 : Writes MinCoolSetpointLimit to value above the MaxCoolSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.A0017")) { + chipTool, " ***** Test Step 52 : Writes MinCoolSetpointLimit to value below the AbsMinCoolSetpointLimit \n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { NextTest(); return; } - err = TestWritesMinCoolSetpointLimitToValueAboveTheMaxCoolSetpointLimit_52(); + err = TestWritesMinCoolSetpointLimitToValueBelowTheAbsMinCoolSetpointLimit_52(); break; case 53: ChipLogProgress( - chipTool, " ***** Test Step 53 : Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.A0017")) { + chipTool, " ***** Test Step 53 : Writes MinCoolSetpointLimit to value above the MaxCoolSetpointLimit \n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { NextTest(); return; } - err = TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_53(); + err = TestWritesMinCoolSetpointLimitToValueAboveTheMaxCoolSetpointLimit_53(); break; case 54: ChipLogProgress( - chipTool, " ***** Test Step 54 : Writes the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.A0017")) { + chipTool, " ***** Test Step 54 : Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { NextTest(); return; } - err = TestWritesTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_54(); + err = TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_54(); break; case 55: ChipLogProgress( - chipTool, " ***** Test Step 55 : Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.F01 && A_MINCOOLSETPOINTLIMIT")) { + chipTool, " ***** Test Step 55 : Writes the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { NextTest(); return; } - err = TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_55(); + err = TestWritesTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_55(); break; case 56: - ChipLogProgress(chipTool, - " ***** Test Step 56 : Reads MaxCoolSetpointLimit attribute from Server DUT and verifies that the value is within " - "range\n"); - if (ShouldSkip("TSTAT.S.A0018")) { + 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 = TestReadsMaxCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_56(); + err = TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_56(); break; case 57: ChipLogProgress(chipTool, - " ***** Test Step 57 : Writes a value back that is different but valid for MaxCoolSetpointLimit attribute\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0018")) { + " ***** 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 = TestWritesAValueBackThatIsDifferentButValidForMaxCoolSetpointLimitAttribute_57(); + err = TestReadsMaxCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_57(); break; case 58: ChipLogProgress(chipTool, - " ***** Test Step 58 : Reads it back again to confirm the successful write of MaxCoolSetpointLimit attribute\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0018")) { + " ***** 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 = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxCoolSetpointLimitAttribute_58(); + err = TestWritesAValueBackThatIsDifferentButValidForMaxCoolSetpointLimitAttribute_58(); break; case 59: - ChipLogProgress( - chipTool, " ***** Test Step 59 : Writes MaxCoolSetpointLimit to value below the AbsMinCoolSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.A0018")) { + 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 = TestWritesMaxCoolSetpointLimitToValueBelowTheAbsMinCoolSetpointLimit_59(); + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxCoolSetpointLimitAttribute_59(); break; case 60: ChipLogProgress( - chipTool, " ***** Test Step 60 : Writes MaxCoolSetpointLimit to value above the MaxCoolSetpointLimit \n"); - if (ShouldSkip("TSTAT.S.A0018")) { + chipTool, " ***** Test Step 60 : Writes MaxCoolSetpointLimit to value below the AbsMinCoolSetpointLimit \n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018")) { NextTest(); return; } - err = TestWritesMaxCoolSetpointLimitToValueAboveTheMaxCoolSetpointLimit_60(); + err = TestWritesMaxCoolSetpointLimitToValueBelowTheAbsMinCoolSetpointLimit_60(); break; case 61: ChipLogProgress( - chipTool, " ***** Test Step 61 : Writes the limit of AbsMinCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0018")) { + chipTool, " ***** Test Step 61 : Writes MaxCoolSetpointLimit to value above the MaxCoolSetpointLimit \n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018")) { NextTest(); return; } - err = TestWritesTheLimitOfAbsMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_61(); + err = TestWritesMaxCoolSetpointLimitToValueAboveTheMaxCoolSetpointLimit_61(); break; case 62: ChipLogProgress( - chipTool, " ***** Test Step 62 : Writes the limit of MaxCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); - if (ShouldSkip("TSTAT.S.A0018")) { + chipTool, " ***** Test Step 62 : Writes the limit of AbsMinCoolSetpointLimit to MaxCoolSetpointLimit attribute\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018")) { NextTest(); return; } - err = TestWritesTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_62(); + err = TestWritesTheLimitOfAbsMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_62(); break; case 63: - ChipLogProgress(chipTool, " ***** Test Step 63 : Writes (sets back) default value of MinHeatSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0015")) { + 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 = TestWritesSetsBackDefaultValueOfMinHeatSetpointLimit_63(); + err = TestWritesTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_63(); break; case 64: - ChipLogProgress(chipTool, " ***** Test Step 64 : Writes (sets back)default value of MaxHeatSetpointLimit\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0016")) { + ChipLogProgress(chipTool, " ***** Test Step 64 : Writes (sets back) default value of MinHeatSetpointLimit\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0015")) { NextTest(); return; } - err = TestWritesSetsBackdefaultValueOfMaxHeatSetpointLimit_64(); + err = TestWritesSetsBackDefaultValueOfMinHeatSetpointLimit_64(); break; case 65: - ChipLogProgress(chipTool, " ***** Test Step 65 : Writes MaxHeatSetpointLimit That meets the deadband of 2.5C\n"); - if (ShouldSkip("TSTAT.S.F01 && A_MAXHEATSETPOINTLIMIT &&!TSTAT.S.F05")) { + 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 = TestWritesMaxHeatSetpointLimitThatMeetsTheDeadbandOf25c_65(); + err = TestWritesSetsBackdefaultValueOfMaxHeatSetpointLimit_65(); break; case 66: - ChipLogProgress(chipTool, " ***** Test Step 66 : Writes (sets back) default value of MinCoolSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0017")) { + 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 = TestWritesSetsBackDefaultValueOfMinCoolSetpointLimit_66(); + err = TestWritesMaxHeatSetpointLimitThatMeetsTheDeadbandOf25c_66(); break; case 67: - ChipLogProgress(chipTool, " ***** Test Step 67 : Writes (sets back) default value of MaxCoolSetpointLimit\n"); - if (ShouldSkip("TSTAT.S.A0018")) { + ChipLogProgress(chipTool, " ***** Test Step 67 : Writes (sets back) default value of MinCoolSetpointLimit\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { NextTest(); return; } - err = TestWritesSetsBackDefaultValueOfMaxCoolSetpointLimit_67(); + err = TestWritesSetsBackDefaultValueOfMinCoolSetpointLimit_67(); break; case 68: - ChipLogProgress(chipTool, - " ***** Test Step 68 : Reads MinSetpointDeadBand attribute from Server DUT and verifies that the value is within " - "range\n"); - if (ShouldSkip("TSTAT.S.A0019")) { + ChipLogProgress(chipTool, " ***** Test Step 68 : Writes (sets back) default value of MaxCoolSetpointLimit\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018")) { NextTest(); return; } - err = TestReadsMinSetpointDeadBandAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_68(); + err = TestWritesSetsBackDefaultValueOfMaxCoolSetpointLimit_68(); break; case 69: ChipLogProgress(chipTool, - " ***** Test Step 69 : Writes a value back that is different but valid for MinSetpointDeadBand attribute\n"); - if (ShouldSkip("TSTAT.S.A0019")) { + " ***** 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 = TestWritesAValueBackThatIsDifferentButValidForMinSetpointDeadBandAttribute_69(); + err = TestReadsMinSetpointDeadBandAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_69(); break; case 70: ChipLogProgress(chipTool, - " ***** Test Step 70 : Reads it back again to confirm the successful write of MinSetpointDeadBand attribute\n"); - if (ShouldSkip("TSTAT.S.A0019")) { + " ***** Test Step 70 : Writes a value back that is different but valid for MinSetpointDeadBand attribute\n"); + if (ShouldSkip("TSTAT.S.F05")) { NextTest(); return; } - err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinSetpointDeadBandAttribute_70(); + err = TestWritesAValueBackThatIsDifferentButValidForMinSetpointDeadBandAttribute_70(); break; case 71: - ChipLogProgress(chipTool, " ***** Test Step 71 : Writes the value below MinSetpointDeadBand\n"); - if (ShouldSkip("TSTAT.S.A0019")) { + ChipLogProgress(chipTool, + " ***** Test Step 71 : Reads it back again to confirm the successful write of MinSetpointDeadBand attribute\n"); + if (ShouldSkip("TSTAT.S.F05")) { NextTest(); return; } - err = TestWritesTheValueBelowMinSetpointDeadBand_71(); + err = TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinSetpointDeadBandAttribute_71(); break; case 72: - ChipLogProgress(chipTool, " ***** Test Step 72 : Writes the value above MinSetpointDeadBand \n"); - if (ShouldSkip("TSTAT.S.A0019")) { + ChipLogProgress(chipTool, " ***** Test Step 72 : Writes the value below MinSetpointDeadBand\n"); + if (ShouldSkip("TSTAT.S.F05")) { NextTest(); return; } - err = TestWritesTheValueAboveMinSetpointDeadBand_72(); + err = TestWritesTheValueBelowMinSetpointDeadBand_72(); break; case 73: - ChipLogProgress(chipTool, " ***** Test Step 73 : Writes the min limit of MinSetpointDeadBand\n"); - if (ShouldSkip("TSTAT.S.A0019")) { + ChipLogProgress(chipTool, " ***** Test Step 73 : Writes the value above MinSetpointDeadBand \n"); + if (ShouldSkip("TSTAT.S.F05")) { NextTest(); return; } - err = TestWritesTheMinLimitOfMinSetpointDeadBand_73(); + err = TestWritesTheValueAboveMinSetpointDeadBand_73(); break; case 74: - ChipLogProgress(chipTool, " ***** Test Step 74 : Writes the max limit of MinSetpointDeadBand\n"); - if (ShouldSkip("TSTAT.S.A0019")) { + ChipLogProgress(chipTool, " ***** Test Step 74 : Writes the min limit of MinSetpointDeadBand\n"); + if (ShouldSkip("TSTAT.S.F05")) { NextTest(); return; } - err = TestWritesTheMaxLimitOfMinSetpointDeadBand_74(); + err = TestWritesTheMinLimitOfMinSetpointDeadBand_74(); break; case 75: - ChipLogProgress(chipTool, - " ***** Test Step 75 : Reads ControlSequenceOfOperation from Server DUT and verifies that the value is valid\n"); - if (ShouldSkip("TSTAT.S.A001b")) { + ChipLogProgress(chipTool, " ***** Test Step 75 : Writes the max limit of MinSetpointDeadBand\n"); + if (ShouldSkip("TSTAT.S.F05")) { NextTest(); return; } - err = TestReadsControlSequenceOfOperationFromServerDutAndVerifiesThatTheValueIsValid_75(); + err = TestWritesTheMaxLimitOfMinSetpointDeadBand_75(); break; case 76: - ChipLogProgress( - chipTool, " ***** Test Step 76 : Write Attribute command for ControlSequenceOfOperation with a new valid value\n"); - if (ShouldSkip("TSTAT.S.A001b")) { + 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 = TestWriteAttributeCommandForControlSequenceOfOperationWithANewValidValue_76(); + err = TestReadsControlSequenceOfOperationFromServerDutAndVerifiesThatTheValueIsValid_76(); break; case 77: - ChipLogProgress(chipTool, " ***** Test Step 77 : Read it back again to confirm the successful write\n"); - if (ShouldSkip("TSTAT.S.A001b")) { + 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 = TestReadItBackAgainToConfirmTheSuccessfulWrite_77(); + err = TestWriteAttributeCommandForControlSequenceOfOperationWithANewValidValue_77(); break; case 78: - ChipLogProgress(chipTool, - " ***** Test Step 78 : Writes MaxHeatSetpointLimit attribute to default value of 2950 to meet deadband " - "constraint\n"); - if (ShouldSkip("TSTAT.S.F00 && A_MINHEATSETPOINTLIMIT && TSTAT.S.F05")) { + 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 = TestWritesMaxHeatSetpointLimitAttributeToDefaultValueOf2950ToMeetDeadbandConstraint_78(); + err = TestReadItBackAgainToConfirmTheSuccessfulWrite_78(); break; case 79: - ChipLogProgress(chipTool, " ***** Test Step 79 : Sets OccupiedCoolingSetpoint to default value\n"); - if (ShouldSkip("TSTAT.S.F01")) { + 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 = TestSetsOccupiedCoolingSetpointToDefaultValue_79(); + err = TestWritesMaxHeatSetpointLimitAttributeToDefaultValueOf2950ToMeetDeadbandConstraint_79(); break; case 80: - ChipLogProgress(chipTool, " ***** Test Step 80 : Sets OccupiedHeatingSetpoint to default value\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0012")) { + ChipLogProgress(chipTool, " ***** Test Step 80 : Sets OccupiedCoolingSetpoint to default value\n"); + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } - err = TestSetsOccupiedHeatingSetpointToDefaultValue_80(); + err = TestSetsOccupiedCoolingSetpointToDefaultValue_80(); break; case 81: - ChipLogProgress(chipTool, " ***** Test Step 81 : Sends SetpointRaise Command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 81 : Sets OccupiedHeatingSetpoint to default value\n"); + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } - err = TestSendsSetpointRaiseCommand_81(); + err = TestSetsOccupiedHeatingSetpointToDefaultValue_81(); break; case 82: - ChipLogProgress( - chipTool, " ***** Test Step 82 : Reads back OccupiedHeatingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012")) { + ChipLogProgress(chipTool, " ***** Test Step 82 : Sends SetpointRaise Command Heat Only\n"); + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } - err = TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_82(); + err = TestSendsSetpointRaiseCommandHeatOnly_82(); break; case 83: - ChipLogProgress(chipTool, " ***** Test Step 83 : Sets OccupiedHeatingSetpoint to default value\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0012")) { + ChipLogProgress( + chipTool, " ***** Test Step 83 : Reads back OccupiedHeatingSetpoint to confirm the success of the write\n"); + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } - err = TestSetsOccupiedHeatingSetpointToDefaultValue_83(); + err = TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_83(); break; case 84: - ChipLogProgress(chipTool, " ***** Test Step 84 : Sends SetpointRaise Command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 84 : Sets OccupiedHeatingSetpoint to default value\n"); + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } - err = TestSendsSetpointRaiseCommand_84(); + err = TestSetsOccupiedHeatingSetpointToDefaultValue_84(); break; case 85: - ChipLogProgress( - chipTool, " ***** Test Step 85 : Reads back OccupiedHeatingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012")) { + ChipLogProgress(chipTool, " ***** Test Step 85 : Sends SetpointRaise Command Heat Only\n"); + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } - err = TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_85(); + err = TestSendsSetpointRaiseCommandHeatOnly_85(); break; case 86: - ChipLogProgress(chipTool, " ***** Test Step 86 : Sets OccupiedCoolingSetpoint to default value\n"); - if (ShouldSkip("TSTAT.S.A0011")) { + ChipLogProgress( + chipTool, " ***** Test Step 86 : Reads back OccupiedHeatingSetpoint to confirm the success of the write\n"); + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } - err = TestSetsOccupiedCoolingSetpointToDefaultValue_86(); + err = TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_86(); break; case 87: - ChipLogProgress(chipTool, " ***** Test Step 87 : Sends SetpointRaise Command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 87 : Sends SetpointRaise Command Cool Only\n"); + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } - err = TestSendsSetpointRaiseCommand_87(); + err = TestSendsSetpointRaiseCommandCoolOnly_87(); break; case 88: ChipLogProgress( chipTool, " ***** Test Step 88 : Reads back OccupiedCoolingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } @@ -47090,24 +47037,24 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { break; case 89: ChipLogProgress(chipTool, " ***** Test Step 89 : Sets OccupiedCoolingSetpoint to default value\n"); - if (ShouldSkip("TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } err = TestSetsOccupiedCoolingSetpointToDefaultValue_89(); break; case 90: - ChipLogProgress(chipTool, " ***** Test Step 90 : Sends SetpointRaise Command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 90 : Sends SetpointRaise Command Cool Only\n"); + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } - err = TestSendsSetpointRaiseCommand_90(); + err = TestSendsSetpointRaiseCommandCoolOnly_90(); break; case 91: ChipLogProgress( chipTool, " ***** Test Step 91 : Reads back OccupiedCoolingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } @@ -47115,7 +47062,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { break; case 92: ChipLogProgress(chipTool, " ***** Test Step 92 : Sets OccupiedCoolingSetpoint to default value\n"); - if (ShouldSkip("TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } @@ -47123,24 +47070,24 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { break; case 93: ChipLogProgress(chipTool, " ***** Test Step 93 : Sets OccupiedHeatingSetpoint to default value\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0012")) { + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } err = TestSetsOccupiedHeatingSetpointToDefaultValue_93(); break; case 94: - ChipLogProgress(chipTool, " ***** Test Step 94 : Sends SetpointRaise Command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 94 : Sends SetpointRaise Command Heat & Cool\n"); + if (ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01")) { NextTest(); return; } - err = TestSendsSetpointRaiseCommand_94(); + err = TestSendsSetpointRaiseCommandHeatCool_94(); break; case 95: ChipLogProgress( chipTool, " ***** Test Step 95 : Reads back OccupiedCoolingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } @@ -47149,7 +47096,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 96: ChipLogProgress( chipTool, " ***** Test Step 96 : Reads back OccupiedHeatingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012")) { + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } @@ -47157,7 +47104,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { break; case 97: ChipLogProgress(chipTool, " ***** Test Step 97 : Sets OccupiedCoolingSetpoint to default value\n"); - if (ShouldSkip("TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } @@ -47165,24 +47112,24 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { break; case 98: ChipLogProgress(chipTool, " ***** Test Step 98 : Sets OccupiedHeatingSetpoint to default value\n"); - if (ShouldSkip("PICS_USER_PROMPT && TSTAT.S.A0012")) { + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } err = TestSetsOccupiedHeatingSetpointToDefaultValue_98(); break; case 99: - ChipLogProgress(chipTool, " ***** Test Step 99 : Sends SetpointRaise Command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.C00.Rsp && TSTAT.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 99 : Sends SetpointRaise Command Heat & Cool\n"); + if (ShouldSkip("TSTAT.S.F00 || TSTAT.S.F01")) { NextTest(); return; } - err = TestSendsSetpointRaiseCommand_99(); + err = TestSendsSetpointRaiseCommandHeatCool_99(); break; case 100: ChipLogProgress( chipTool, " ***** Test Step 100 : Reads back OccupiedCoolingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0011")) { + if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } @@ -47191,7 +47138,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { case 101: ChipLogProgress( chipTool, " ***** Test Step 101 : Reads back OccupiedHeatingSetpoint to confirm the success of the write\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && TSTAT.S.A0012")) { + if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } @@ -47260,7 +47207,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + 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)); @@ -47320,7 +47267,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + 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)); @@ -47332,22 +47279,22 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + 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), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + 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), 0)); + 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)); @@ -47362,13 +47309,13 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + 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), 0)); + 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)); @@ -47386,13 +47333,13 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + 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), 0)); + 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)); @@ -47422,13 +47369,13 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 71: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + 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), 0)); + 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)); @@ -47613,7 +47560,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesOccupiedCoolingSetpointToValueBelowTheMinCoolSetpointLimit_4() + CHIP_ERROR TestWritesOccupiedCoolingSetpointToValueBelowTheABSMinCoolSetpointLimit_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -47625,8 +47572,8 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { occupiedCoolingSetpointArgument = [NSNumber numberWithShort:30]; [cluster writeAttributeOccupiedCoolingSetpointWithValue:occupiedCoolingSetpointArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes OccupiedCoolingSetpoint to value below the MinCoolSetpointLimit " - @"Error: %@", + NSLog(@"Writes OccupiedCoolingSetpoint to value below the " + @"ABSMinCoolSetpointLimit Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -47671,11 +47618,26 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheLimitOfMinCoolSetpointLimitToOccupiedCoolingSetpointAttribute_6() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * 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 + completionHandler:^(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() @@ -47932,11 +47894,30 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheLimitOfMaxHeatSetpointLimitToOccupiedHeatingSetpointAttribute_17() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * 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 + completionHandler:^(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() @@ -48019,7 +48000,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesUnoccupiedCoolingSetpointToValueBelowTheMinHeatSetpointLimit_21() + CHIP_ERROR TestWritesUnoccupiedCoolingSetpointToValueBelowTheMinCoolSetpointLimit_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48032,7 +48013,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { [cluster writeAttributeUnoccupiedCoolingSetpointWithValue:unoccupiedCoolingSetpointArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Writes UnoccupiedCoolingSetpoint to value below the " - @"MinHeatSetpointLimit Error: %@", + @"MinCoolSetpointLimit Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -48047,7 +48028,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesUnoccupiedCoolingSetpointToValueAboveTheMaxHeatSetpointLimit_22() + CHIP_ERROR TestWritesUnoccupiedCoolingSetpointToValueAboveTheMaxCoolSetpointLimit_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48060,7 +48041,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { [cluster writeAttributeUnoccupiedCoolingSetpointWithValue:unoccupiedCoolingSetpointArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Writes UnoccupiedCoolingSetpoint to value above the " - @"MaxHeatSetpointLimit Error: %@", + @"MaxCoolSetpointLimit Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -48338,23 +48319,80 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMinHeatSetpointLimitAttribute_33() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * 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 + completionHandler:^(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() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMinHeatSetpointLimitWithCompletionHandler:^(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"); + MTRBaseClusterThermostat * 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 + completionHandler:^(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_35() + CHIP_ERROR TestWritesMinHeatSetpointLimitToValueBelowTheAbsMinHeatSetpointLimit_36() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48383,7 +48421,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesMinHeatSetpointLimitToValueAboveTheAbsMaxHeatSetpointLimit_36() + CHIP_ERROR TestWritesMinHeatSetpointLimitToValueAboveTheAbsMaxHeatSetpointLimit_37() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48412,7 +48450,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_37() + CHIP_ERROR TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_38() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48436,25 +48474,60 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_38() + CHIP_ERROR TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_39() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * 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 + completionHandler:^(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_39() + CHIP_ERROR TestReadsMaxHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_40() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaxHeatSetpointLimitWithCompletionHandler:^(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)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("MaxHeatSetpointLimit", actualValue, 3000)); + } + + VerifyOrReturn(CheckConstraintType("maxHeatSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("maxHeatSetpointLimit", [value shortValue], 700)); + VerifyOrReturn(CheckConstraintMaxValue("maxHeatSetpointLimit", [value shortValue], 3000)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_40() + CHIP_ERROR TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_41() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48478,7 +48551,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_41() + CHIP_ERROR TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_42() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48506,7 +48579,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMaxHeatSetpointLimitAttribute_42() + CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMaxHeatSetpointLimitAttribute_43() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48530,7 +48603,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxHeatSetpointLimitAttribute_43() + CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxHeatSetpointLimitAttribute_44() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48554,7 +48627,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesMaxHeatSetpointLimitToValueBelowTheAbsMinHeatSetpointLimit_44() + CHIP_ERROR TestWritesMaxHeatSetpointLimitToValueBelowTheAbsMinHeatSetpointLimit_45() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48583,7 +48656,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesMaxHeatSetpointLimitToValueAboveTheAbsMaxHeatSetpointLimit_45() + CHIP_ERROR TestWritesMaxHeatSetpointLimitToValueAboveTheAbsMaxHeatSetpointLimit_46() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48612,7 +48685,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheLimitOfAbsMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_46() + CHIP_ERROR TestWritesTheLimitOfAbsMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_47() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48636,16 +48709,31 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_47() + CHIP_ERROR TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_48() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * 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 + completionHandler:^(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_48() + CHIP_ERROR TestReadsMinCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_49() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48674,7 +48762,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMinCoolSetpointLimitAttribute_49() + CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMinCoolSetpointLimitAttribute_50() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48698,7 +48786,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinCoolSetpointLimitAttribute_50() + CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinCoolSetpointLimitAttribute_51() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48722,7 +48810,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesMinCoolSetpointLimitToValueBelowTheAbsMinCoolSetpointLimit_51() + CHIP_ERROR TestWritesMinCoolSetpointLimitToValueBelowTheAbsMinCoolSetpointLimit_52() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48751,7 +48839,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesMinCoolSetpointLimitToValueAboveTheMaxCoolSetpointLimit_52() + CHIP_ERROR TestWritesMinCoolSetpointLimitToValueAboveTheMaxCoolSetpointLimit_53() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48779,7 +48867,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_53() + CHIP_ERROR TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_54() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48803,7 +48891,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_54() + CHIP_ERROR TestWritesTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_55() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48827,7 +48915,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_55() + CHIP_ERROR TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_56() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48851,7 +48939,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsMaxCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_56() + CHIP_ERROR TestReadsMaxCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_57() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48880,25 +48968,55 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMaxCoolSetpointLimitAttribute_57() + CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMaxCoolSetpointLimitAttribute_58() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * 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 + completionHandler:^(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_58() + CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxCoolSetpointLimitAttribute_59() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaxCoolSetpointLimitWithCompletionHandler:^(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_59() + CHIP_ERROR TestWritesMaxCoolSetpointLimitToValueBelowTheAbsMinCoolSetpointLimit_60() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48927,7 +49045,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesMaxCoolSetpointLimitToValueAboveTheMaxCoolSetpointLimit_60() + CHIP_ERROR TestWritesMaxCoolSetpointLimitToValueAboveTheMaxCoolSetpointLimit_61() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48955,16 +49073,31 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheLimitOfAbsMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_61() + CHIP_ERROR TestWritesTheLimitOfAbsMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_62() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * 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 + completionHandler:^(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_62() + CHIP_ERROR TestWritesTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_63() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -48988,7 +49121,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesSetsBackDefaultValueOfMinHeatSetpointLimit_63() + CHIP_ERROR TestWritesSetsBackDefaultValueOfMinHeatSetpointLimit_64() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49010,16 +49143,29 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesSetsBackdefaultValueOfMaxHeatSetpointLimit_64() + CHIP_ERROR TestWritesSetsBackdefaultValueOfMaxHeatSetpointLimit_65() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * 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 + completionHandler:^(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_65() + CHIP_ERROR TestWritesMaxHeatSetpointLimitThatMeetsTheDeadbandOf25c_66() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49041,7 +49187,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesSetsBackDefaultValueOfMinCoolSetpointLimit_66() + CHIP_ERROR TestWritesSetsBackDefaultValueOfMinCoolSetpointLimit_67() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49063,7 +49209,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesSetsBackDefaultValueOfMaxCoolSetpointLimit_67() + CHIP_ERROR TestWritesSetsBackDefaultValueOfMaxCoolSetpointLimit_68() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49085,7 +49231,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsMinSetpointDeadBandAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_68() + CHIP_ERROR TestReadsMinSetpointDeadBandAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_69() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49114,7 +49260,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMinSetpointDeadBandAttribute_69() + CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMinSetpointDeadBandAttribute_70() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49138,7 +49284,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinSetpointDeadBandAttribute_70() + CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinSetpointDeadBandAttribute_71() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49162,7 +49308,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheValueBelowMinSetpointDeadBand_71() + CHIP_ERROR TestWritesTheValueBelowMinSetpointDeadBand_72() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49188,7 +49334,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheValueAboveMinSetpointDeadBand_72() + CHIP_ERROR TestWritesTheValueAboveMinSetpointDeadBand_73() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49214,7 +49360,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheMinLimitOfMinSetpointDeadBand_73() + CHIP_ERROR TestWritesTheMinLimitOfMinSetpointDeadBand_74() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49236,7 +49382,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheMaxLimitOfMinSetpointDeadBand_74() + CHIP_ERROR TestWritesTheMaxLimitOfMinSetpointDeadBand_75() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49258,7 +49404,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsControlSequenceOfOperationFromServerDutAndVerifiesThatTheValueIsValid_75() + CHIP_ERROR TestReadsControlSequenceOfOperationFromServerDutAndVerifiesThatTheValueIsValid_76() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49287,7 +49433,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeCommandForControlSequenceOfOperationWithANewValidValue_76() + CHIP_ERROR TestWriteAttributeCommandForControlSequenceOfOperationWithANewValidValue_77() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49311,7 +49457,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadItBackAgainToConfirmTheSuccessfulWrite_77() + CHIP_ERROR TestReadItBackAgainToConfirmTheSuccessfulWrite_78() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49336,7 +49482,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesMaxHeatSetpointLimitAttributeToDefaultValueOf2950ToMeetDeadbandConstraint_78() + CHIP_ERROR TestWritesMaxHeatSetpointLimitAttributeToDefaultValueOf2950ToMeetDeadbandConstraint_79() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49360,7 +49506,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSetsOccupiedCoolingSetpointToDefaultValue_79() + CHIP_ERROR TestSetsOccupiedCoolingSetpointToDefaultValue_80() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49382,16 +49528,29 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_80() + CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_81() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * 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 + completionHandler:^(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 TestSendsSetpointRaiseCommand_81() + CHIP_ERROR TestSendsSetpointRaiseCommandHeatOnly_82() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49404,7 +49563,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { params.amount = [NSNumber numberWithChar:-30]; [cluster setpointRaiseLowerWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends SetpointRaise Command Error: %@", err); + NSLog(@"Sends SetpointRaise Command Heat Only Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49414,7 +49573,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_82() + CHIP_ERROR TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_83() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49438,16 +49597,29 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_83() + CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_84() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * 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 + completionHandler:^(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 TestSendsSetpointRaiseCommand_84() + CHIP_ERROR TestSendsSetpointRaiseCommandHeatOnly_85() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49460,7 +49632,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { params.amount = [NSNumber numberWithChar:30]; [cluster setpointRaiseLowerWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends SetpointRaise Command Error: %@", err); + NSLog(@"Sends SetpointRaise Command Heat Only Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49470,7 +49642,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_85() + CHIP_ERROR TestReadsBackOccupiedHeatingSetpointToConfirmTheSuccessOfTheWrite_86() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49485,7 +49657,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("OccupiedHeatingSetpoint", actualValue, 30)); + VerifyOrReturn(CheckValue("OccupiedHeatingSetpoint", actualValue, 2300)); } NextTest(); @@ -49494,29 +49666,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSetsOccupiedCoolingSetpointToDefaultValue_86() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterThermostat * 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 - completionHandler:^(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 TestSendsSetpointRaiseCommand_87() + CHIP_ERROR TestSendsSetpointRaiseCommandCoolOnly_87() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49529,7 +49679,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { params.amount = [NSNumber numberWithChar:-30]; [cluster setpointRaiseLowerWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends SetpointRaise Command Error: %@", err); + NSLog(@"Sends SetpointRaise Command Cool Only Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49585,7 +49735,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsSetpointRaiseCommand_90() + CHIP_ERROR TestSendsSetpointRaiseCommandCoolOnly_90() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49598,7 +49748,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { params.amount = [NSNumber numberWithChar:30]; [cluster setpointRaiseLowerWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends SetpointRaise Command Error: %@", err); + NSLog(@"Sends SetpointRaise Command Cool Only Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49656,14 +49806,27 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_93() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * 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 + completionHandler:^(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 TestSendsSetpointRaiseCommand_94() + CHIP_ERROR TestSendsSetpointRaiseCommandHeatCool_94() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49676,7 +49839,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { params.amount = [NSNumber numberWithChar:-30]; [cluster setpointRaiseLowerWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends SetpointRaise Command Error: %@", err); + NSLog(@"Sends SetpointRaise Command Heat & Cool Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49758,14 +49921,27 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_98() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterThermostat * 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 + completionHandler:^(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 TestSendsSetpointRaiseCommand_99() + CHIP_ERROR TestSendsSetpointRaiseCommandHeatCool_99() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -49778,7 +49954,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { params.amount = [NSNumber numberWithChar:30]; [cluster setpointRaiseLowerWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends SetpointRaise Command Error: %@", err); + NSLog(@"Sends SetpointRaise Command Heat & Cool Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); From eeb75dac593efd36d79f6893a96d7ffe04627946 Mon Sep 17 00:00:00 2001 From: Keith Wheeler <42851569+keithmwheeler@users.noreply.github.com> Date: Thu, 21 Jul 2022 20:45:10 -0700 Subject: [PATCH 12/15] Updating Infineon P6 example lock application to support NtifyUpdate after OTA (#21092) --- examples/lock-app/p6/src/AppTask.cpp | 24 ++----------- src/platform/P6/OTAImageProcessorImpl.cpp | 41 ++++++++++++++++++++++- src/platform/P6/OTAImageProcessorImpl.h | 6 ++-- 3 files changed, 46 insertions(+), 25 deletions(-) diff --git a/examples/lock-app/p6/src/AppTask.cpp b/examples/lock-app/p6/src/AppTask.cpp index 6f62d3c3d852c8..7c4dd3d10385a8 100644 --- a/examples/lock-app/p6/src/AppTask.cpp +++ b/examples/lock-app/p6/src/AppTask.cpp @@ -66,7 +66,7 @@ using chip::FabricIndex; using chip::GetRequestorInstance; using chip::NodeId; using chip::OTADownloader; -using chip::OTAImageProcessorImpl; +using chip::DeviceLayer::OTAImageProcessorImpl; using chip::System::Layer; using namespace ::chip; @@ -662,34 +662,14 @@ void vApplicationStackOverflowHook(TaskHandle_t pxTask, char * pcTaskName) #if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR void AppTask::InitOTARequestor() { - CHIP_ERROR err = CHIP_NO_ERROR; SetRequestorInstance(&gRequestorCore); gRequestorStorage.Init(chip::Server::GetInstance().GetPersistentStorage()); gRequestorCore.Init(chip::Server::GetInstance(), gRequestorStorage, gRequestorUser, gDownloader); gImageProcessor.SetOTADownloader(&gDownloader); gDownloader.SetImageProcessorDelegate(&gImageProcessor); + ConfigurationMgr().StoreSoftwareVersion(CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION); gRequestorUser.Init(&gRequestorCore, &gImageProcessor); - uint32_t savedSoftwareVersion; - err = ConfigurationMgr().GetSoftwareVersion(savedSoftwareVersion); - if (err != CHIP_NO_ERROR) - { - P6_LOG("Can't get saved software version"); - appError(err); - } - - if (savedSoftwareVersion != CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION) - { - ConfigurationMgr().StoreSoftwareVersion(CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION); - - P6_LOG("Confirming update to version: %u", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION); - chip::OTARequestorInterface * requestor = chip::GetRequestorInstance(); - if (requestor != nullptr) - { - requestor->NotifyUpdateApplied(); - } - } - P6_LOG("Current Software Version: %u", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION); P6_LOG("Current Software Version String: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); } diff --git a/src/platform/P6/OTAImageProcessorImpl.cpp b/src/platform/P6/OTAImageProcessorImpl.cpp index b6e3bc175fab4a..5ca1fa089e98ea 100644 --- a/src/platform/P6/OTAImageProcessorImpl.cpp +++ b/src/platform/P6/OTAImageProcessorImpl.cpp @@ -16,11 +16,16 @@ * limitations under the License. */ +#include "OTAImageProcessorImpl.h" #include +#include +#include +#include -#include "OTAImageProcessorImpl.h" +using namespace ::chip::DeviceLayer::Internal; namespace chip { +namespace DeviceLayer { #ifdef P6_OTA CHIP_ERROR OTAImageProcessorImpl::PrepareDownload() @@ -99,6 +104,39 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessBlock(ByteSpan & block) return CHIP_NO_ERROR; } +bool OTAImageProcessorImpl::IsFirstImageRun() +{ + OTARequestorInterface * requestor = GetRequestorInstance(); + ReturnErrorCodeIf(requestor == nullptr, false); + + uint32_t currentVersion; + ReturnErrorCodeIf(ConfigurationMgr().GetSoftwareVersion(currentVersion) != CHIP_NO_ERROR, false); + + ChipLogProgress(SoftwareUpdate, "%ld", currentVersion); + ChipLogProgress(SoftwareUpdate, "%ld", requestor->GetTargetVersion()); + + return ((requestor->GetCurrentUpdateState() == OTARequestorInterface::OTAUpdateStateEnum::kApplying) && + (requestor->GetTargetVersion() == currentVersion)); +} + +CHIP_ERROR OTAImageProcessorImpl::ConfirmCurrentImage() +{ + OTARequestorInterface * requestor = chip::GetRequestorInstance(); + if (requestor == nullptr) + { + return CHIP_ERROR_INTERNAL; + } + + uint32_t currentVersion; + ReturnErrorOnFailure(DeviceLayer::ConfigurationMgr().GetSoftwareVersion(currentVersion)); + if (currentVersion != requestor->GetTargetVersion()) + { + return CHIP_ERROR_INCORRECT_STATE; + } + + return CHIP_NO_ERROR; +} + void OTAImageProcessorImpl::HandlePrepareDownload(intptr_t context) { auto * imageProcessor = reinterpret_cast(context); @@ -264,4 +302,5 @@ CHIP_ERROR OTAImageProcessorImpl::ReleaseBlock() } #endif // P6_OTA +} // namespace DeviceLayer } // namespace chip diff --git a/src/platform/P6/OTAImageProcessorImpl.h b/src/platform/P6/OTAImageProcessorImpl.h index 0f6a53fc7bd52a..4150565f8867ec 100644 --- a/src/platform/P6/OTAImageProcessorImpl.h +++ b/src/platform/P6/OTAImageProcessorImpl.h @@ -33,6 +33,7 @@ extern "C" { } namespace chip { +namespace DeviceLayer { class OTAImageProcessorImpl : public OTAImageProcessorInterface { @@ -43,8 +44,8 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface CHIP_ERROR Apply() override; CHIP_ERROR Abort() override; CHIP_ERROR ProcessBlock(ByteSpan & block) override; - bool IsFirstImageRun() override { return false; } - CHIP_ERROR ConfirmCurrentImage() override { return CHIP_NO_ERROR; } + bool IsFirstImageRun() override; + CHIP_ERROR ConfirmCurrentImage() override; void SetOTADownloader(OTADownloader * downloader) { mDownloader = downloader; } @@ -80,5 +81,6 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface OTAImageHeaderParser mHeaderParser; }; +} // namespace DeviceLayer } // namespace chip #endif From 8548f96327532bedbbe9b14a884e853ec14bb4a2 Mon Sep 17 00:00:00 2001 From: Timothy Maes Date: Fri, 22 Jul 2022 09:25:17 +0200 Subject: [PATCH 13/15] * Schedule initialisation of Server to not mix with OpenThread PlatformEvents (#20733) * Only open commissioning window when no fabric exists (lighting-app) --- examples/lighting-app/qpg/include/AppTask.h | 5 +- examples/lighting-app/qpg/src/AppTask.cpp | 66 +++++++++++++-------- examples/lock-app/qpg/include/AppTask.h | 1 + examples/lock-app/qpg/src/AppTask.cpp | 50 +++++++++------- 4 files changed, 71 insertions(+), 51 deletions(-) diff --git a/examples/lighting-app/qpg/include/AppTask.h b/examples/lighting-app/qpg/include/AppTask.h index edc33a5f88a0c3..510478fb9be3e3 100644 --- a/examples/lighting-app/qpg/include/AppTask.h +++ b/examples/lighting-app/qpg/include/AppTask.h @@ -48,12 +48,12 @@ class AppTask friend AppTask & GetAppTask(void); CHIP_ERROR Init(); + static void InitServer(intptr_t arg); + static void OpenCommissioning(intptr_t arg); static void ActionInitiated(LightingManager::Action_t aAction); static void ActionCompleted(LightingManager::Action_t aAction); - void CancelTimer(void); - void DispatchEvent(AppEvent * event); static void FunctionTimerEventHandler(AppEvent * aEvent); @@ -63,6 +63,7 @@ class AppTask static void TimerEventHandler(chip::System::Layer * aLayer, void * aAppState); void StartTimer(uint32_t aTimeoutMs); + void CancelTimer(void); enum Function_t { diff --git a/examples/lighting-app/qpg/src/AppTask.cpp b/examples/lighting-app/qpg/src/AppTask.cpp index 774754312989d6..13e78387cc4a99 100644 --- a/examples/lighting-app/qpg/src/AppTask.cpp +++ b/examples/lighting-app/qpg/src/AppTask.cpp @@ -208,28 +208,8 @@ CHIP_ERROR AppTask::StartAppTask() return CHIP_NO_ERROR; } -CHIP_ERROR AppTask::Init() +void AppTask::InitServer(intptr_t arg) { - CHIP_ERROR err = CHIP_NO_ERROR; - - ChipLogProgress(NotSpecified, "Current Software Version: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); - - err = LightingMgr().Init(); - if (err != CHIP_NO_ERROR) - { - ChipLogError(NotSpecified, "LightingMgr().Init() failed"); - return err; - } - LightingMgr().SetCallbacks(ActionInitiated, ActionCompleted); - - // Subscribe with our button callback to the qvCHIP button handler. - qvIO_SetBtnCallback(ButtonEventHandler); - -#if CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY - chip::app::DnssdServer::Instance().SetExtendedDiscoveryTimeoutSecs(extDiscTimeoutSecs); -#endif - - // Init ZCL Data Model static chip::CommonCaseDeviceServerInitParams initParams; (void) initParams.InitializeStaticResourcesBeforeServerInit(); @@ -243,18 +223,52 @@ CHIP_ERROR AppTask::Init() initParams.endpointNativeParams = static_cast(&nativeParams); chip::Server::GetInstance().Init(initParams); +#if CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY + chip::app::DnssdServer::Instance().SetExtendedDiscoveryTimeoutSecs(extDiscTimeoutSecs); +#endif + + // Open commissioning after boot if no fabric was available + if (chip::Server::GetInstance().GetFabricTable().FabricCount() == 0) + { + PlatformMgr().ScheduleWork(OpenCommissioning, 0); + } +} + +void AppTask::OpenCommissioning(intptr_t arg) +{ + // Enable BLE advertisements + chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow(); + ChipLogProgress(NotSpecified, "BLE advertising started. Waiting for Pairing."); +} + +CHIP_ERROR AppTask::Init() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + ChipLogProgress(NotSpecified, "Current Software Version: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + + // Init ZCL Data Model and start server + PlatformMgr().ScheduleWork(InitServer, 0); + // Initialize device attestation config SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); - UpdateClusterState(); + // Setup light + err = LightingMgr().Init(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "LightingMgr().Init() failed"); + return err; + } + LightingMgr().SetCallbacks(ActionInitiated, ActionCompleted); + // Setup button handler + qvIO_SetBtnCallback(ButtonEventHandler); + + // Log device configuration ConfigurationMgr().LogDeviceConfig(); PrintOnboardingCodes(chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE)); - // Enable BLE advertisements - chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow(); - ChipLogProgress(NotSpecified, "BLE advertising started. Waiting for Pairing."); - return err; } diff --git a/examples/lock-app/qpg/include/AppTask.h b/examples/lock-app/qpg/include/AppTask.h index fd6c1d888a8b7e..005d0aeb9da6e0 100644 --- a/examples/lock-app/qpg/include/AppTask.h +++ b/examples/lock-app/qpg/include/AppTask.h @@ -52,6 +52,7 @@ class AppTask friend AppTask & GetAppTask(void); CHIP_ERROR Init(); + static void InitServer(intptr_t arg); static void ActionInitiated(BoltLockManager::Action_t aAction, int32_t aActor); static void ActionCompleted(BoltLockManager::Action_t aAction); diff --git a/examples/lock-app/qpg/src/AppTask.cpp b/examples/lock-app/qpg/src/AppTask.cpp index e418e1def9fc71..86a28d5e9bb863 100644 --- a/examples/lock-app/qpg/src/AppTask.cpp +++ b/examples/lock-app/qpg/src/AppTask.cpp @@ -108,12 +108,38 @@ CHIP_ERROR AppTask::StartAppTask() return CHIP_NO_ERROR; } +void AppTask::InitServer(intptr_t arg) +{ + static chip::CommonCaseDeviceServerInitParams initParams; + (void) initParams.InitializeStaticResourcesBeforeServerInit(); + + gExampleDeviceInfoProvider.SetStorageDelegate(initParams.persistentStorageDelegate); + chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); + + chip::Inet::EndPointStateOpenThread::OpenThreadEndpointInitParam nativeParams; + nativeParams.lockCb = LockOpenThreadTask; + nativeParams.unlockCb = UnlockOpenThreadTask; + nativeParams.openThreadInstancePtr = chip::DeviceLayer::ThreadStackMgrImpl().OTInstance(); + initParams.endpointNativeParams = static_cast(&nativeParams); + chip::Server::GetInstance().Init(initParams); + +#if CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY + chip::app::DnssdServer::Instance().SetExtendedDiscoveryTimeoutSecs(extDiscTimeoutSecs); +#endif +} CHIP_ERROR AppTask::Init() { CHIP_ERROR err = CHIP_NO_ERROR; ChipLogProgress(NotSpecified, "Current Software Version: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + // Init ZCL Data Model and start server + PlatformMgr().ScheduleWork(InitServer, 0); + + // Initialize device attestation config + SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); + + // Setup Bolt err = BoltLockMgr().Init(); if (err != CHIP_NO_ERROR) { @@ -122,32 +148,11 @@ CHIP_ERROR AppTask::Init() } BoltLockMgr().SetCallbacks(ActionInitiated, ActionCompleted); - // Subscribe with our button callback to the qvCHIP button handler. + // Setup button handler qvIO_SetBtnCallback(ButtonEventHandler); qvIO_LedSet(LOCK_STATE_LED, !BoltLockMgr().IsUnlocked()); -#if CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY - chip::app::DnssdServer::Instance().SetExtendedDiscoveryTimeoutSecs(extDiscTimeoutSecs); -#endif - - // Init ZCL Data Model - static chip::CommonCaseDeviceServerInitParams initParams; - (void) initParams.InitializeStaticResourcesBeforeServerInit(); - - gExampleDeviceInfoProvider.SetStorageDelegate(initParams.persistentStorageDelegate); - chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); - - chip::Inet::EndPointStateOpenThread::OpenThreadEndpointInitParam nativeParams; - nativeParams.lockCb = LockOpenThreadTask; - nativeParams.unlockCb = UnlockOpenThreadTask; - nativeParams.openThreadInstancePtr = chip::DeviceLayer::ThreadStackMgrImpl().OTInstance(); - initParams.endpointNativeParams = static_cast(&nativeParams); - chip::Server::GetInstance().Init(initParams); - - // Initialize device attestation config - SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); - UpdateClusterState(); ConfigurationMgr().LogDeviceConfig(); @@ -164,7 +169,6 @@ void AppTask::AppTaskMain(void * pvParameter) if (err != CHIP_NO_ERROR) { ChipLogError(NotSpecified, "AppTask.Init() failed: %" CHIP_ERROR_FORMAT, err.Format()); - return; } ChipLogProgress(NotSpecified, "App Task started"); From ce075ee45872cc90ddeef6ca3a66e66d032632b8 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 22 Jul 2022 01:41:56 -0700 Subject: [PATCH 14/15] initial build (#21095) --- .github/workflows/docker_img.yaml | 6 ------ .../docker/images/chip-build-crosscompile/Dockerfile | 2 +- integrations/docker/images/chip-build-doxygen/Dockerfile | 8 ++++---- .../docker/images/chip-build-esp32-qemu/Dockerfile | 4 +--- integrations/docker/images/chip-build-esp32/Dockerfile | 2 +- integrations/docker/images/chip-build-imx/Dockerfile | 2 +- integrations/docker/images/chip-build-k32w/Dockerfile | 3 +-- integrations/docker/images/chip-build-mbed-os/Dockerfile | 2 +- .../docker/images/chip-build-nrf-platform/Dockerfile | 2 +- integrations/docker/images/chip-build-telink/Dockerfile | 2 +- integrations/docker/images/chip-build-ti/Dockerfile | 2 +- integrations/docker/images/chip-build-tizen/Dockerfile | 4 ++-- integrations/docker/images/chip-build-vscode/Dockerfile | 2 -- 13 files changed, 15 insertions(+), 26 deletions(-) diff --git a/.github/workflows/docker_img.yaml b/.github/workflows/docker_img.yaml index 9ea7ae9c7ea06a..b706dbcac39e42 100644 --- a/.github/workflows/docker_img.yaml +++ b/.github/workflows/docker_img.yaml @@ -65,9 +65,3 @@ jobs: run: | cd integrations/docker/images/chip-build${{ matrix.img }} ./build.sh --latest - - name: Scan for vulnerabilities - uses: crazy-max/docker-scan-action@master - with: - # NOTE: This task validates the images built previously with latest tag - image: connectedhomeip/chip-build${{ matrix.img }}:latest - annotations: true diff --git a/integrations/docker/images/chip-build-crosscompile/Dockerfile b/integrations/docker/images/chip-build-crosscompile/Dockerfile index 7bed01556f202b..59e023ea16f688 100644 --- a/integrations/docker/images/chip-build-crosscompile/Dockerfile +++ b/integrations/docker/images/chip-build-crosscompile/Dockerfile @@ -4,7 +4,7 @@ FROM connectedhomeip/chip-build:${VERSION} as build RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - git=1:2.25.1-1ubuntu3.4 \ + git \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && : # last line diff --git a/integrations/docker/images/chip-build-doxygen/Dockerfile b/integrations/docker/images/chip-build-doxygen/Dockerfile index 81fa1a7255364f..f9bff774d696b5 100644 --- a/integrations/docker/images/chip-build-doxygen/Dockerfile +++ b/integrations/docker/images/chip-build-doxygen/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:3.15 RUN apk --no-cache add \ - doxygen=1.9.2-r1 \ - graphviz=2.49.3-r0 \ - bash=5.1.16-r0 \ - git=2.34.2-r0 + doxygen=1.9.2-r1 \ + graphviz=2.49.3-r0 \ + bash \ + git diff --git a/integrations/docker/images/chip-build-esp32-qemu/Dockerfile b/integrations/docker/images/chip-build-esp32-qemu/Dockerfile index ea4ad647a8651c..6e69acf7f72478 100644 --- a/integrations/docker/images/chip-build-esp32-qemu/Dockerfile +++ b/integrations/docker/images/chip-build-esp32-qemu/Dockerfile @@ -4,9 +4,7 @@ FROM connectedhomeip/chip-build-esp32:${VERSION} RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - ninja-build=1.10.0-1build1 \ - git=1:2.25.1-1ubuntu3.4 \ - libgcrypt20-dev=1.8.5-5ubuntu1.1 \ + ninja-build git libgcrypt20-dev \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && : # last line diff --git a/integrations/docker/images/chip-build-esp32/Dockerfile b/integrations/docker/images/chip-build-esp32/Dockerfile index 9837ededf21b55..925fa68b03936b 100644 --- a/integrations/docker/images/chip-build-esp32/Dockerfile +++ b/integrations/docker/images/chip-build-esp32/Dockerfile @@ -4,7 +4,7 @@ FROM connectedhomeip/chip-build:${VERSION} as build RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - git=1:2.25.1-1ubuntu3.4 \ + git \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && : # last line diff --git a/integrations/docker/images/chip-build-imx/Dockerfile b/integrations/docker/images/chip-build-imx/Dockerfile index 8acc03833f9fec..815d3512d907e9 100644 --- a/integrations/docker/images/chip-build-imx/Dockerfile +++ b/integrations/docker/images/chip-build-imx/Dockerfile @@ -3,7 +3,7 @@ FROM connectedhomeip/chip-build:${VERSION} as build RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - wget=1.20.3-1ubuntu2 \ + wget \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && : # last line diff --git a/integrations/docker/images/chip-build-k32w/Dockerfile b/integrations/docker/images/chip-build-k32w/Dockerfile index 8a2887b6afe804..ba925821566384 100644 --- a/integrations/docker/images/chip-build-k32w/Dockerfile +++ b/integrations/docker/images/chip-build-k32w/Dockerfile @@ -4,8 +4,7 @@ FROM connectedhomeip/chip-build:${VERSION} as build RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - wget=1.20.3-1ubuntu2 \ - unzip=6.0-25ubuntu1 \ + wget unzip \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && : # last line diff --git a/integrations/docker/images/chip-build-mbed-os/Dockerfile b/integrations/docker/images/chip-build-mbed-os/Dockerfile index ee47fc681eeb89..459bca5d6bdf38 100644 --- a/integrations/docker/images/chip-build-mbed-os/Dockerfile +++ b/integrations/docker/images/chip-build-mbed-os/Dockerfile @@ -4,7 +4,7 @@ FROM connectedhomeip/chip-build:${VERSION} as build RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - wget=1.20.3-1ubuntu2 \ + wget \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && : # last line diff --git a/integrations/docker/images/chip-build-nrf-platform/Dockerfile b/integrations/docker/images/chip-build-nrf-platform/Dockerfile index 4c8009bbb11cc1..633a921f4d58e1 100644 --- a/integrations/docker/images/chip-build-nrf-platform/Dockerfile +++ b/integrations/docker/images/chip-build-nrf-platform/Dockerfile @@ -7,7 +7,7 @@ ARG NCS_REVISION=fd5905aa6b04febd99d00dba6c482ac25eb15222 RUN set -x \ && apt-get update \ && apt-get install --no-install-recommends -fy \ - curl=7.68.0-1ubuntu2.11 \ + curl \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && : # last line diff --git a/integrations/docker/images/chip-build-telink/Dockerfile b/integrations/docker/images/chip-build-telink/Dockerfile index 508226089c0401..ee30de2e28abb4 100644 --- a/integrations/docker/images/chip-build-telink/Dockerfile +++ b/integrations/docker/images/chip-build-telink/Dockerfile @@ -4,7 +4,7 @@ FROM connectedhomeip/chip-build:${VERSION} as build RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - wget=1.20.3-1ubuntu2 \ + wget \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && : # last line diff --git a/integrations/docker/images/chip-build-ti/Dockerfile b/integrations/docker/images/chip-build-ti/Dockerfile index 593b434c5a6df9..5e99fb9f44fc5a 100644 --- a/integrations/docker/images/chip-build-ti/Dockerfile +++ b/integrations/docker/images/chip-build-ti/Dockerfile @@ -4,7 +4,7 @@ FROM connectedhomeip/chip-build:${VERSION} RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - wget=1.20.3-1ubuntu2 \ + wget \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && : # last line diff --git a/integrations/docker/images/chip-build-tizen/Dockerfile b/integrations/docker/images/chip-build-tizen/Dockerfile index 3ae8192ec138c9..13fb66e234f1db 100644 --- a/integrations/docker/images/chip-build-tizen/Dockerfile +++ b/integrations/docker/images/chip-build-tizen/Dockerfile @@ -18,8 +18,8 @@ RUN set -x \ RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - cpio=2.13+dfsg-2 \ - obs-build=20180831-3ubuntu1 \ + cpio \ + obs-build \ openjdk-8-jre-headless \ zip \ # Cleanup diff --git a/integrations/docker/images/chip-build-vscode/Dockerfile b/integrations/docker/images/chip-build-vscode/Dockerfile index 5bbad09fa8a521..77f18352c61337 100644 --- a/integrations/docker/images/chip-build-vscode/Dockerfile +++ b/integrations/docker/images/chip-build-vscode/Dockerfile @@ -41,8 +41,6 @@ COPY --from=crosscompile /opt/ubuntu-21.04-aarch64-sysroot /opt/ubuntu-21.04-aar COPY --from=ameba /opt/ameba /opt/ameba -COPY --from=k32w /opt/sdk/sdks /opt/sdk/sdks - COPY --from=imx /opt/fsl-imx-xwayland /opt/fsl-imx-xwayland COPY --from=ti /opt/ti/sysconfig_1.11.0 /opt/ti/sysconfig_1.11.0 From c3e71f23a60da416f24aa026169ac5a789b92804 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 22 Jul 2022 01:55:52 -0700 Subject: [PATCH 15/15] Revert "[esp32]: Do not setup DeviceInfoProvider within PlatformMgr (#21039)" (#21097) This reverts commit e15af6f8a31ed3a183e075c02154e40736f6773e. --- .../all-clusters-app/esp32/main/AppTask.cpp | 6 - .../esp32/main/CMakeLists.txt | 2 - .../light-switch-app/esp32/main/AppTask.cpp | 4 +- .../esp32/main/CMakeLists.txt | 2 - examples/lighting-app/esp32/main/AppTask.cpp | 5 - .../lighting-app/esp32/main/CMakeLists.txt | 6 +- examples/lock-app/esp32/main/AppTask.cpp | 5 - examples/lock-app/esp32/main/CMakeLists.txt | 8 +- src/platform/ESP32/BUILD.gn | 2 + src/platform/ESP32/DeviceInfoProviderImpl.cpp | 376 ++++++++++++++++++ src/platform/ESP32/DeviceInfoProviderImpl.h | 107 +++++ src/platform/ESP32/PlatformManagerImpl.cpp | 2 + 12 files changed, 492 insertions(+), 33 deletions(-) create mode 100644 src/platform/ESP32/DeviceInfoProviderImpl.cpp create mode 100644 src/platform/ESP32/DeviceInfoProviderImpl.h diff --git a/examples/all-clusters-app/esp32/main/AppTask.cpp b/examples/all-clusters-app/esp32/main/AppTask.cpp index 04604ba419bd17..6db8c63b3c14ec 100644 --- a/examples/all-clusters-app/esp32/main/AppTask.cpp +++ b/examples/all-clusters-app/esp32/main/AppTask.cpp @@ -26,7 +26,6 @@ #include "esp_log.h" #include "esp_spi_flash.h" #include "freertos/FreeRTOS.h" -#include #include #define APP_TASK_NAME "APP" @@ -40,8 +39,6 @@ namespace { QueueHandle_t sAppEventQueue; TaskHandle_t sAppTaskHandle; -chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; - } // namespace AppTask AppTask::sAppTask; @@ -87,9 +84,6 @@ CHIP_ERROR AppTask::Init() #if CONFIG_HAVE_DISPLAY InitDeviceDisplay(); #endif - - chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); - return err; } diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index 40697450af516b..4f8db9d121402d 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -21,7 +21,6 @@ set(PRIV_INCLUDE_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/all-clusters-app" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/include" "${CMAKE_CURRENT_LIST_DIR}/include" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" ) set(SRC_DIRS_LIST @@ -29,7 +28,6 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/all-clusters-app/zap-generated" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/route_hook" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/ota" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" diff --git a/examples/light-switch-app/esp32/main/AppTask.cpp b/examples/light-switch-app/esp32/main/AppTask.cpp index 6a1531940a1197..f29b4a0927f783 100644 --- a/examples/light-switch-app/esp32/main/AppTask.cpp +++ b/examples/light-switch-app/esp32/main/AppTask.cpp @@ -20,7 +20,6 @@ #include "BindingHandler.h" #include "esp_log.h" #include "freertos/FreeRTOS.h" -#include #define APP_TASK_NAME "APP" #define APP_EVENT_QUEUE_SIZE 10 @@ -38,7 +37,6 @@ namespace { QueueHandle_t sAppEventQueue; TaskHandle_t sAppTaskHandle; -chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; } // namespace @@ -64,8 +62,8 @@ CHIP_ERROR AppTask::Init() CHIP_ERROR err = CHIP_NO_ERROR; AppButton.Init(); + AppButton.SetButtonPressCallback(ButtonPressCallback); - chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); return err; } diff --git a/examples/light-switch-app/esp32/main/CMakeLists.txt b/examples/light-switch-app/esp32/main/CMakeLists.txt index 3abe09f4040e8b..959a9bdb37f123 100644 --- a/examples/light-switch-app/esp32/main/CMakeLists.txt +++ b/examples/light-switch-app/esp32/main/CMakeLists.txt @@ -19,14 +19,12 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/light-switch-app" "${CMAKE_CURRENT_LIST_DIR}/include" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" SRC_DIRS "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/light-switch-app/zap-generated" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/route_hook" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/ota" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" diff --git a/examples/lighting-app/esp32/main/AppTask.cpp b/examples/lighting-app/esp32/main/AppTask.cpp index f175af3a3c5eeb..bfa8a8d1401973 100644 --- a/examples/lighting-app/esp32/main/AppTask.cpp +++ b/examples/lighting-app/esp32/main/AppTask.cpp @@ -20,7 +20,6 @@ #include "esp_log.h" #include "freertos/FreeRTOS.h" -#include #include #include #include @@ -47,8 +46,6 @@ constexpr EndpointId kLightEndpointId = 1; QueueHandle_t sAppEventQueue; TaskHandle_t sAppTaskHandle; -chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; - } // namespace AppTask AppTask::sAppTask; @@ -77,8 +74,6 @@ CHIP_ERROR AppTask::Init() AppButton.SetButtonPressCallback(ButtonPressCallback); - chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); - return err; } diff --git a/examples/lighting-app/esp32/main/CMakeLists.txt b/examples/lighting-app/esp32/main/CMakeLists.txt index c30c6995c44e8f..93ff9dc67217bd 100644 --- a/examples/lighting-app/esp32/main/CMakeLists.txt +++ b/examples/lighting-app/esp32/main/CMakeLists.txt @@ -18,7 +18,6 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lighting-app" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/lighting-app/lighting-common/include" "${CMAKE_CURRENT_LIST_DIR}/include" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" @@ -27,12 +26,11 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lighting-app/zap-generated" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/lighting-app/lighting-common/src" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/route_hook" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/ota" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/ota" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" diff --git a/examples/lock-app/esp32/main/AppTask.cpp b/examples/lock-app/esp32/main/AppTask.cpp index b78de7f2cd30a4..bedaf75b6946e2 100644 --- a/examples/lock-app/esp32/main/AppTask.cpp +++ b/examples/lock-app/esp32/main/AppTask.cpp @@ -21,7 +21,6 @@ #include "Button.h" #include "LEDWidget.h" #include "esp_log.h" -#include #include #include #include @@ -57,8 +56,6 @@ QueueHandle_t sAppEventQueue; bool sHaveBLEConnections = false; StackType_t appStack[APP_TASK_STACK_SIZE / sizeof(StackType_t)]; - -chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; } // namespace using namespace ::chip::DeviceLayer; @@ -106,8 +103,6 @@ CHIP_ERROR AppTask::Init() sLockLED.Set(!BoltLockMgr().IsUnlocked()); - chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); - chip::DeviceLayer::SystemLayer().ScheduleWork(UpdateClusterState, nullptr); ConfigurationMgr().LogDeviceConfig(); diff --git a/examples/lock-app/esp32/main/CMakeLists.txt b/examples/lock-app/esp32/main/CMakeLists.txt index 0c5816f69eb5fd..24fa3cc6ed70c7 100644 --- a/examples/lock-app/esp32/main/CMakeLists.txt +++ b/examples/lock-app/esp32/main/CMakeLists.txt @@ -21,7 +21,6 @@ idf_component_register(INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/pw_sys_io/public" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" @@ -31,10 +30,9 @@ idf_component_register(INCLUDE_DIRS "${IDF_PATH}/components/freertos/include/freertos" SRC_DIRS "${CMAKE_CURRENT_LIST_DIR}" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated" @@ -143,17 +141,15 @@ target_compile_options(${COMPONENT_LIB} PRIVATE else (CONFIG_ENABLE_PW_RPC) idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lock-app/" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_CURRENT_LIST_DIR}/include" SRC_DIRS "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lock-app/zap-generated" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/route_hook" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" diff --git a/src/platform/ESP32/BUILD.gn b/src/platform/ESP32/BUILD.gn index 9f38280a1dfae9..822ffa58efcd5c 100644 --- a/src/platform/ESP32/BUILD.gn +++ b/src/platform/ESP32/BUILD.gn @@ -34,6 +34,8 @@ static_library("ESP32") { "ConfigurationManagerImpl.h", "ConnectivityManagerImpl.cpp", "ConnectivityManagerImpl.h", + "DeviceInfoProviderImpl.cpp", + "DeviceInfoProviderImpl.h", "DeviceNetworkProvisioningDelegateImpl.cpp", "DeviceNetworkProvisioningDelegateImpl.h", "DiagnosticDataProviderImpl.cpp", diff --git a/src/platform/ESP32/DeviceInfoProviderImpl.cpp b/src/platform/ESP32/DeviceInfoProviderImpl.cpp new file mode 100644 index 00000000000000..ff28ee8c585002 --- /dev/null +++ b/src/platform/ESP32/DeviceInfoProviderImpl.cpp @@ -0,0 +1,376 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include +#include +#include + +#include +#include + +namespace chip { +namespace DeviceLayer { + +namespace { +constexpr TLV::Tag kLabelNameTag = TLV::ContextTag(0); +constexpr TLV::Tag kLabelValueTag = TLV::ContextTag(1); +} // anonymous namespace + +DeviceInfoProviderImpl & DeviceInfoProviderImpl::GetDefaultInstance() +{ + static DeviceInfoProviderImpl sInstance; + return sInstance; +} + +DeviceInfoProvider::FixedLabelIterator * DeviceInfoProviderImpl::IterateFixedLabel(EndpointId endpoint) +{ + return new FixedLabelIteratorImpl(endpoint); +} + +DeviceInfoProviderImpl::FixedLabelIteratorImpl::FixedLabelIteratorImpl(EndpointId endpoint) : mEndpoint(endpoint) +{ + mIndex = 0; +} + +size_t DeviceInfoProviderImpl::FixedLabelIteratorImpl::Count() +{ + // TODO: Need to provide a script which can generate a binary file which contains device information and + // update the DeviceInfoProvider which can read the information from it. + // Now we use the hardcoded labellist. + return 4; +} + +bool DeviceInfoProviderImpl::FixedLabelIteratorImpl::Next(FixedLabelType & output) +{ + bool retval = true; + + // TODO: Need to provide a script which can generate a binary file which contains device information and + // update the DeviceInfoProvider which can read the information from it. + // Now we use the hardcoded labellist. + CHIP_ERROR err = CHIP_NO_ERROR; + + const char * labelPtr = nullptr; + const char * valuePtr = nullptr; + + VerifyOrReturnError(mIndex < 4, false); + + ChipLogProgress(DeviceLayer, "Get the fixed label with index:%d at endpoint:%d", mIndex, mEndpoint); + + switch (mIndex) + { + case 0: + labelPtr = "room"; + valuePtr = "bedroom 2"; + break; + case 1: + labelPtr = "orientation"; + valuePtr = "North"; + break; + case 2: + labelPtr = "floor"; + valuePtr = "2"; + break; + case 3: + labelPtr = "direction"; + valuePtr = "up"; + break; + default: + err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; + break; + } + + if (err == CHIP_NO_ERROR) + { + VerifyOrReturnError(strlen(labelPtr) <= kMaxLabelNameLength, false); + VerifyOrReturnError(strlen(valuePtr) <= kMaxLabelValueLength, false); + + Platform::CopyString(mFixedLabelNameBuf, kMaxLabelNameLength + 1, labelPtr); + Platform::CopyString(mFixedLabelValueBuf, kMaxLabelValueLength + 1, valuePtr); + + output.label = CharSpan::fromCharString(mFixedLabelNameBuf); + output.value = CharSpan::fromCharString(mFixedLabelValueBuf); + + mIndex++; + + retval = true; + } + else + { + retval = false; + } + + return retval; +} + +CHIP_ERROR DeviceInfoProviderImpl::SetUserLabelLength(EndpointId endpoint, size_t val) +{ + DefaultStorageKeyAllocator keyAlloc; + + return mStorage->SyncSetKeyValue(keyAlloc.UserLabelLengthKey(endpoint), &val, static_cast(sizeof(val))); +} + +CHIP_ERROR DeviceInfoProviderImpl::GetUserLabelLength(EndpointId endpoint, size_t & val) +{ + DefaultStorageKeyAllocator keyAlloc; + uint16_t len = static_cast(sizeof(val)); + + return mStorage->SyncGetKeyValue(keyAlloc.UserLabelLengthKey(endpoint), &val, len); +} + +CHIP_ERROR DeviceInfoProviderImpl::SetUserLabelAt(EndpointId endpoint, size_t index, const UserLabelType & userLabel) +{ + DefaultStorageKeyAllocator keyAlloc; + uint8_t buf[UserLabelTLVMaxSize()]; + TLV::TLVWriter writer; + writer.Init(buf); + + TLV::TLVType outerType; + ReturnErrorOnFailure(writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, outerType)); + ReturnErrorOnFailure(writer.PutString(kLabelNameTag, userLabel.label)); + ReturnErrorOnFailure(writer.PutString(kLabelValueTag, userLabel.value)); + ReturnErrorOnFailure(writer.EndContainer(outerType)); + + return mStorage->SyncSetKeyValue(keyAlloc.UserLabelIndexKey(endpoint, index), buf, + static_cast(writer.GetLengthWritten())); +} + +DeviceInfoProvider::UserLabelIterator * DeviceInfoProviderImpl::IterateUserLabel(EndpointId endpoint) +{ + return new UserLabelIteratorImpl(*this, endpoint); +} + +DeviceInfoProviderImpl::UserLabelIteratorImpl::UserLabelIteratorImpl(DeviceInfoProviderImpl & provider, EndpointId endpoint) : + mProvider(provider), mEndpoint(endpoint) +{ + size_t total = 0; + + ReturnOnFailure(mProvider.GetUserLabelLength(mEndpoint, total)); + mTotal = total; + mIndex = 0; +} + +bool DeviceInfoProviderImpl::UserLabelIteratorImpl::Next(UserLabelType & output) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + VerifyOrReturnError(mIndex < mTotal, false); + + DefaultStorageKeyAllocator keyAlloc; + uint8_t buf[UserLabelTLVMaxSize()]; + uint16_t len = static_cast(sizeof(buf)); + + err = mProvider.mStorage->SyncGetKeyValue(keyAlloc.UserLabelIndexKey(mEndpoint, mIndex), buf, len); + VerifyOrReturnError(err == CHIP_NO_ERROR, false); + + TLV::ContiguousBufferTLVReader reader; + reader.Init(buf); + err = reader.Next(TLV::kTLVType_Structure, TLV::AnonymousTag()); + VerifyOrReturnError(err == CHIP_NO_ERROR, false); + + TLV::TLVType containerType; + VerifyOrReturnError(reader.EnterContainer(containerType) == CHIP_NO_ERROR, false); + + chip::CharSpan label; + chip::CharSpan value; + + VerifyOrReturnError(reader.Next(kLabelNameTag) == CHIP_NO_ERROR, false); + VerifyOrReturnError(reader.Get(label) == CHIP_NO_ERROR, false); + + VerifyOrReturnError(reader.Next(kLabelValueTag) == CHIP_NO_ERROR, false); + VerifyOrReturnError(reader.Get(value) == CHIP_NO_ERROR, false); + + VerifyOrReturnError(reader.VerifyEndOfContainer() == CHIP_NO_ERROR, false); + VerifyOrReturnError(reader.ExitContainer(containerType) == CHIP_NO_ERROR, false); + + Platform::CopyString(mUserLabelNameBuf, label); + Platform::CopyString(mUserLabelValueBuf, value); + + output.label = CharSpan::fromCharString(mUserLabelNameBuf); + output.value = CharSpan::fromCharString(mUserLabelValueBuf); + + mIndex++; + + return true; +} + +DeviceInfoProvider::SupportedLocalesIterator * DeviceInfoProviderImpl::IterateSupportedLocales() +{ + return new SupportedLocalesIteratorImpl(); +} + +size_t DeviceInfoProviderImpl::SupportedLocalesIteratorImpl::Count() +{ + // TODO: Need to provide a script which can generate a binary file which contains device information and + // update the DeviceInfoProvider which can read the information from it. + // Now we use the hardcoded SupportedLocales. + // {("en-US"), ("de-DE"), ("fr-FR"), ("en-GB"), ("es-ES"), ("zh-CN"), ("it-IT"), ("ja-JP")} + + return 8; +} + +bool DeviceInfoProviderImpl::SupportedLocalesIteratorImpl::Next(CharSpan & output) +{ + bool retval = true; + + // TODO: Need to provide a script which can generate a binary file which contains device information and + // update the DeviceInfoProvider which can read the information from it. + // Now we use the hardcoded SupportedLocales. + CHIP_ERROR err = CHIP_NO_ERROR; + + const char * activeLocalePtr = nullptr; + + VerifyOrReturnError(mIndex < 8, false); + + switch (mIndex) + { + case 0: + activeLocalePtr = "en-US"; + break; + case 1: + activeLocalePtr = "de-DE"; + break; + case 2: + activeLocalePtr = "fr-FR"; + break; + case 3: + activeLocalePtr = "en-GB"; + break; + case 4: + activeLocalePtr = "es-ES"; + break; + case 5: + activeLocalePtr = "zh-CN"; + break; + case 6: + activeLocalePtr = "it-IT"; + break; + case 7: + activeLocalePtr = "ja-JP"; + break; + default: + err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; + break; + } + + if (err == CHIP_NO_ERROR) + { + VerifyOrReturnError(strlen(activeLocalePtr) <= kMaxActiveLocaleLength, false); + + Platform::CopyString(mActiveLocaleBuf, kMaxActiveLocaleLength + 1, activeLocalePtr); + + output = CharSpan::fromCharString(mActiveLocaleBuf); + + mIndex++; + + retval = true; + } + else + { + retval = false; + } + + return retval; +} + +DeviceInfoProvider::SupportedCalendarTypesIterator * DeviceInfoProviderImpl::IterateSupportedCalendarTypes() +{ + return new SupportedCalendarTypesIteratorImpl(); +} + +size_t DeviceInfoProviderImpl::SupportedCalendarTypesIteratorImpl::Count() +{ + // TODO: Need to provide a script which can generate a binary file which contains device information and + // update the DeviceInfoProvider which can read the information from it. + // Now we use the hardcoded SupportedCalendarTypes. + // {("kBuddhist"), ("kChinese"), ("kCoptic"), ("kEthiopian"), ("kGregorian"), ("kHebrew"), ("kIndian"), ("kJapanese"), + // ("kKorean"), ("kPersian"), ("kTaiwanese"), ("kIslamic")} + + return 12; +} + +bool DeviceInfoProviderImpl::SupportedCalendarTypesIteratorImpl::Next(CalendarType & output) +{ + bool retval = true; + + // TODO: Need to provide a script which can generate a binary file which contains device information and + // update the DeviceInfoProvider which can read the information from it. + // Now we use the hardcoded SupportedCalendarTypes. + CHIP_ERROR err = CHIP_NO_ERROR; + + VerifyOrReturnError(mIndex < 12, false); + + switch (mIndex) + { + case 0: + output = app::Clusters::TimeFormatLocalization::CalendarType::kBuddhist; + break; + case 1: + output = app::Clusters::TimeFormatLocalization::CalendarType::kChinese; + break; + case 2: + output = app::Clusters::TimeFormatLocalization::CalendarType::kCoptic; + break; + case 3: + output = app::Clusters::TimeFormatLocalization::CalendarType::kEthiopian; + break; + case 4: + output = app::Clusters::TimeFormatLocalization::CalendarType::kGregorian; + break; + case 5: + output = app::Clusters::TimeFormatLocalization::CalendarType::kHebrew; + break; + case 6: + output = app::Clusters::TimeFormatLocalization::CalendarType::kIndian; + break; + case 7: + output = app::Clusters::TimeFormatLocalization::CalendarType::kJapanese; + break; + case 8: + output = app::Clusters::TimeFormatLocalization::CalendarType::kKorean; + break; + case 9: + output = app::Clusters::TimeFormatLocalization::CalendarType::kPersian; + break; + case 10: + output = app::Clusters::TimeFormatLocalization::CalendarType::kTaiwanese; + break; + case 11: + output = app::Clusters::TimeFormatLocalization::CalendarType::kIslamic; + break; + default: + err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; + break; + } + + if (err == CHIP_NO_ERROR) + { + mIndex++; + retval = true; + } + else + { + retval = false; + } + + return retval; +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/ESP32/DeviceInfoProviderImpl.h b/src/platform/ESP32/DeviceInfoProviderImpl.h new file mode 100644 index 00000000000000..856e15498ab46f --- /dev/null +++ b/src/platform/ESP32/DeviceInfoProviderImpl.h @@ -0,0 +1,107 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include +#include +#include + +namespace chip { +namespace DeviceLayer { + +class DeviceInfoProviderImpl : public DeviceInfoProvider +{ +public: + DeviceInfoProviderImpl() = default; + ~DeviceInfoProviderImpl() override {} + + // Iterators + FixedLabelIterator * IterateFixedLabel(EndpointId endpoint) override; + UserLabelIterator * IterateUserLabel(EndpointId endpoint) override; + SupportedLocalesIterator * IterateSupportedLocales() override; + SupportedCalendarTypesIterator * IterateSupportedCalendarTypes() override; + + static DeviceInfoProviderImpl & GetDefaultInstance(); + +protected: + class FixedLabelIteratorImpl : public FixedLabelIterator + { + public: + FixedLabelIteratorImpl(EndpointId endpoint); + size_t Count() override; + bool Next(FixedLabelType & output) override; + void Release() override { delete this; } + + private: + EndpointId mEndpoint = 0; + size_t mIndex = 0; + char mFixedLabelNameBuf[kMaxLabelNameLength + 1]; + char mFixedLabelValueBuf[kMaxLabelValueLength + 1]; + }; + + class UserLabelIteratorImpl : public UserLabelIterator + { + public: + UserLabelIteratorImpl(DeviceInfoProviderImpl & provider, EndpointId endpoint); + size_t Count() override { return mTotal; } + bool Next(UserLabelType & output) override; + void Release() override { delete this; } + + private: + DeviceInfoProviderImpl & mProvider; + EndpointId mEndpoint = 0; + size_t mIndex = 0; + size_t mTotal = 0; + char mUserLabelNameBuf[kMaxLabelNameLength + 1]; + char mUserLabelValueBuf[kMaxLabelValueLength + 1]; + }; + + class SupportedLocalesIteratorImpl : public SupportedLocalesIterator + { + public: + SupportedLocalesIteratorImpl() = default; + size_t Count() override; + bool Next(CharSpan & output) override; + void Release() override { delete this; } + + private: + size_t mIndex = 0; + char mActiveLocaleBuf[kMaxActiveLocaleLength + 1]; + }; + + class SupportedCalendarTypesIteratorImpl : public SupportedCalendarTypesIterator + { + public: + SupportedCalendarTypesIteratorImpl() = default; + size_t Count() override; + bool Next(CalendarType & output) override; + void Release() override { delete this; } + + private: + size_t mIndex = 0; + }; + + CHIP_ERROR SetUserLabelLength(EndpointId endpoint, size_t val) override; + CHIP_ERROR GetUserLabelLength(EndpointId endpoint, size_t & val) override; + CHIP_ERROR SetUserLabelAt(EndpointId endpoint, size_t index, const UserLabelType & userLabel) override; + +private: + static constexpr size_t UserLabelTLVMaxSize() { return TLV::EstimateStructOverhead(kMaxLabelNameLength, kMaxLabelValueLength); } +}; + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/ESP32/PlatformManagerImpl.cpp b/src/platform/ESP32/PlatformManagerImpl.cpp index d387814f3241f2..535674b8c2782a 100644 --- a/src/platform/ESP32/PlatformManagerImpl.cpp +++ b/src/platform/ESP32/PlatformManagerImpl.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -60,6 +61,7 @@ static int app_entropy_source(void * data, unsigned char * output, size_t len, s CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) { SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); + SetDeviceInfoProvider(&DeviceInfoProviderImpl::GetDefaultInstance()); esp_err_t err; // Arrange for CHIP-encapsulated ESP32 errors to be translated to text