From 80824049e344b6ee2e1d3c0e0b48de5af022f164 Mon Sep 17 00:00:00 2001 From: yunhanw-google Date: Mon, 8 Nov 2021 13:34:19 -0800 Subject: [PATCH] Refresh IM attribute encoding for attributeData and attribute report and corresponding read/write logic (#11514) * Refresh IM attribute encoding for attributeData and attribute report and corresponding read/write logic * run codegen --- src/app/AttributeAccessInterface.h | 5 +- src/app/AttributePathParams.cpp | 2 +- src/app/AttributePathParams.h | 18 +- src/app/BUILD.gn | 16 +- src/app/ClusterInfo.h | 18 +- src/app/CommandSender.cpp | 2 +- src/app/InteractionModelEngine.cpp | 4 +- src/app/InteractionModelEngine.h | 17 +- src/app/MessageDef/AttributeDataElement.cpp | 444 --- src/app/MessageDef/AttributeDataIB.cpp | 313 ++ ...tributeDataElement.h => AttributeDataIB.h} | 115 +- ...ibuteDataList.cpp => AttributeDataIBs.cpp} | 26 +- ...AttributeDataList.h => AttributeDataIBs.h} | 22 +- src/app/MessageDef/AttributeDataVersionList.h | 4 +- ...ttributePaths.cpp => AttributePathIBs.cpp} | 12 +- .../{AttributePaths.h => AttributePathIBs.h} | 6 +- src/app/MessageDef/AttributeReportIB.cpp | 153 + src/app/MessageDef/AttributeReportIB.h | 114 + src/app/MessageDef/AttributeReportIBs.cpp | 100 + src/app/MessageDef/AttributeReportIBs.h | 83 + src/app/MessageDef/ReadRequestMessage.cpp | 14 +- src/app/MessageDef/ReadRequestMessage.h | 14 +- src/app/MessageDef/ReportDataMessage.cpp | 30 +- src/app/MessageDef/ReportDataMessage.h | 18 +- .../MessageDef/SubscribeRequestMessage.cpp | 10 +- src/app/MessageDef/SubscribeRequestMessage.h | 10 +- src/app/MessageDef/WriteRequestMessage.cpp | 30 +- src/app/MessageDef/WriteRequestMessage.h | 22 +- src/app/ReadClient.cpp | 144 +- src/app/ReadClient.h | 5 +- src/app/ReadHandler.cpp | 12 +- src/app/ReadHandler.h | 2 +- src/app/WriteClient.cpp | 40 +- src/app/WriteClient.h | 11 +- src/app/WriteHandler.cpp | 24 +- src/app/WriteHandler.h | 2 +- src/app/reporting/Engine.cpp | 45 +- src/app/reporting/Engine.h | 4 +- src/app/tests/TestAttributeValueEncoder.cpp | 8 +- src/app/tests/TestClusterInfo.cpp | 14 +- src/app/tests/TestInteractionModelEngine.cpp | 10 +- src/app/tests/TestMessageDef.cpp | 283 +- src/app/tests/TestReadInteraction.cpp | 212 +- src/app/tests/TestReportingEngine.cpp | 4 +- src/app/tests/TestWriteInteraction.cpp | 60 +- .../tests/integration/chip_im_initiator.cpp | 36 +- .../tests/integration/chip_im_responder.cpp | 37 +- .../util/ember-compatibility-functions.cpp | 340 +- .../templates/app/CHIPClusters-src.zapt | 6 +- .../python/chip/clusters/Attribute.py | 6 +- src/controller/python/chip/clusters/write.cpp | 5 +- .../python/chip/interaction_model/__init__.py | 2 +- .../python/chip/interaction_model/delegate.py | 4 +- .../tests/data_model/TestCommands.cpp | 4 +- src/controller/tests/data_model/TestRead.cpp | 28 +- src/controller/tests/data_model/TestWrite.cpp | 10 +- src/lib/core/CHIPError.cpp | 3 + src/lib/core/CHIPError.h | 9 + ...nericThreadStackManagerImpl_OpenThread.cpp | 2 +- .../zap-generated/CHIPClusters.cpp | 3479 +++++++---------- .../zap-generated/CHIPClusters.cpp | 56 +- .../zap-generated/CHIPClusters.cpp | 7 +- .../pump-app/zap-generated/CHIPClusters.cpp | 105 +- .../zap-generated/CHIPClusters.cpp | 203 +- .../thermostat/zap-generated/CHIPClusters.cpp | 21 +- .../tv-app/zap-generated/CHIPClusters.cpp | 70 +- 66 files changed, 3387 insertions(+), 3548 deletions(-) delete mode 100644 src/app/MessageDef/AttributeDataElement.cpp create mode 100644 src/app/MessageDef/AttributeDataIB.cpp rename src/app/MessageDef/{AttributeDataElement.h => AttributeDataIB.h} (52%) rename src/app/MessageDef/{AttributeDataList.cpp => AttributeDataIBs.cpp} (71%) rename src/app/MessageDef/{AttributeDataList.h => AttributeDataIBs.h} (74%) rename src/app/MessageDef/{AttributePaths.cpp => AttributePathIBs.cpp} (87%) rename src/app/MessageDef/{AttributePaths.h => AttributePathIBs.h} (95%) create mode 100644 src/app/MessageDef/AttributeReportIB.cpp create mode 100644 src/app/MessageDef/AttributeReportIB.h create mode 100644 src/app/MessageDef/AttributeReportIBs.cpp create mode 100644 src/app/MessageDef/AttributeReportIBs.h diff --git a/src/app/AttributeAccessInterface.h b/src/app/AttributeAccessInterface.h index 6690d812a02da0..15627a40fead13 100644 --- a/src/app/AttributeAccessInterface.h +++ b/src/app/AttributeAccessInterface.h @@ -19,7 +19,7 @@ #pragma once #include -#include +#include #include #include // So we can encode lists #include @@ -44,7 +44,8 @@ class AttributeValueEncoder : protected TagBoundEncoder { public: AttributeValueEncoder(TLV::TLVWriter * aWriter, FabricIndex aAccessingFabricIndex) : - TagBoundEncoder(aWriter, TLV::ContextTag(AttributeDataElement::kCsTag_Data)), mAccessingFabricIndex(aAccessingFabricIndex) + TagBoundEncoder(aWriter, TLV::ContextTag(to_underlying(AttributeDataIB::Tag::kData))), + mAccessingFabricIndex(aAccessingFabricIndex) {} template diff --git a/src/app/AttributePathParams.cpp b/src/app/AttributePathParams.cpp index c4c232312e962f..01a4311b9544c1 100644 --- a/src/app/AttributePathParams.cpp +++ b/src/app/AttributePathParams.cpp @@ -36,7 +36,7 @@ CHIP_ERROR AttributePathParams::BuildAttributePath(AttributePathIB::Builder & aB if (!HasWildcardAttributeId()) { - aBuilder.Attribute(mFieldId); + aBuilder.Attribute(mAttributeId); } if (!HasWildcardListIndex()) diff --git a/src/app/AttributePathParams.h b/src/app/AttributePathParams.h index 06a9a4c517d014..3a696a26d8d9b2 100644 --- a/src/app/AttributePathParams.h +++ b/src/app/AttributePathParams.h @@ -37,12 +37,12 @@ struct AttributePathParams AttributePathParams(aEndpointId, aClusterId, ClusterInfo::kInvalidAttributeId, ClusterInfo::kInvalidListIndex) {} - AttributePathParams(EndpointId aEndpointId, ClusterId aClusterId, AttributeId aFieldId) : - AttributePathParams(aEndpointId, aClusterId, aFieldId, ClusterInfo::kInvalidListIndex) + AttributePathParams(EndpointId aEndpointId, ClusterId aClusterId, AttributeId aAttributeId) : + AttributePathParams(aEndpointId, aClusterId, aAttributeId, ClusterInfo::kInvalidListIndex) {} - AttributePathParams(EndpointId aEndpointId, ClusterId aClusterId, AttributeId aFieldId, ListIndex aListIndex) : - mEndpointId(aEndpointId), mClusterId(aClusterId), mFieldId(aFieldId), mListIndex(aListIndex) + AttributePathParams(EndpointId aEndpointId, ClusterId aClusterId, AttributeId aAttributeId, ListIndex aListIndex) : + mEndpointId(aEndpointId), mClusterId(aClusterId), mAttributeId(aAttributeId), mListIndex(aListIndex) {} AttributePathParams() {} @@ -60,13 +60,13 @@ struct AttributePathParams inline bool HasWildcardEndpointId() const { return mEndpointId == ClusterInfo::kInvalidEndpointId; } inline bool HasWildcardClusterId() const { return mClusterId == ClusterInfo::kInvalidClusterId; } - inline bool HasWildcardAttributeId() const { return mFieldId == ClusterInfo::kInvalidAttributeId; } + inline bool HasWildcardAttributeId() const { return mAttributeId == ClusterInfo::kInvalidAttributeId; } inline bool HasWildcardListIndex() const { return mListIndex == ClusterInfo::kInvalidListIndex; } - EndpointId mEndpointId = ClusterInfo::kInvalidEndpointId; - ClusterId mClusterId = ClusterInfo::kInvalidClusterId; - AttributeId mFieldId = ClusterInfo::kInvalidAttributeId; - ListIndex mListIndex = ClusterInfo::kInvalidListIndex; + EndpointId mEndpointId = ClusterInfo::kInvalidEndpointId; + ClusterId mClusterId = ClusterInfo::kInvalidClusterId; + AttributeId mAttributeId = ClusterInfo::kInvalidAttributeId; + ListIndex mListIndex = ClusterInfo::kInvalidListIndex; }; } // namespace app } // namespace chip diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 2ff14fb0783297..86aba27dd1de4c 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -44,16 +44,20 @@ static_library("app") { "InteractionModelEngine.cpp", "MessageDef/ArrayBuilder.cpp", "MessageDef/ArrayParser.cpp", - "MessageDef/AttributeDataElement.cpp", - "MessageDef/AttributeDataElement.h", - "MessageDef/AttributeDataList.cpp", - "MessageDef/AttributeDataList.h", + "MessageDef/AttributeDataIB.cpp", + "MessageDef/AttributeDataIB.h", + "MessageDef/AttributeDataIBs.cpp", + "MessageDef/AttributeDataIBs.h", "MessageDef/AttributeDataVersionList.cpp", "MessageDef/AttributeDataVersionList.h", "MessageDef/AttributePathIB.cpp", "MessageDef/AttributePathIB.h", - "MessageDef/AttributePaths.cpp", - "MessageDef/AttributePaths.h", + "MessageDef/AttributePathIBs.cpp", + "MessageDef/AttributePathIBs.h", + "MessageDef/AttributeReportIB.cpp", + "MessageDef/AttributeReportIB.h", + "MessageDef/AttributeReportIBs.cpp", + "MessageDef/AttributeReportIBs.h", "MessageDef/AttributeStatusIB.cpp", "MessageDef/AttributeStatusIB.h", "MessageDef/AttributeStatuses.cpp", diff --git a/src/app/ClusterInfo.h b/src/app/ClusterInfo.h index dca369cfb66210..b7dad7d88b8a5e 100644 --- a/src/app/ClusterInfo.h +++ b/src/app/ClusterInfo.h @@ -52,7 +52,7 @@ struct ClusterInfo { VerifyOrReturnError(HasWildcardEndpointId() || mEndpointId == other.mEndpointId, false); VerifyOrReturnError(HasWildcardClusterId() || mClusterId == other.mClusterId, false); - VerifyOrReturnError(HasWildcardAttributeId() || mFieldId == other.mFieldId, false); + VerifyOrReturnError(HasWildcardAttributeId() || mAttributeId == other.mAttributeId, false); VerifyOrReturnError(HasWildcardListIndex() || mListIndex == other.mListIndex, false); return true; @@ -70,7 +70,7 @@ struct ClusterInfo inline bool HasWildcardNodeId() const { return mNodeId == kUndefinedNodeId; } inline bool HasWildcardEndpointId() const { return mEndpointId == kInvalidEndpointId; } inline bool HasWildcardClusterId() const { return mClusterId == kInvalidClusterId; } - inline bool HasWildcardAttributeId() const { return mFieldId == kInvalidAttributeId; } + inline bool HasWildcardAttributeId() const { return mAttributeId == kInvalidAttributeId; } inline bool HasWildcardListIndex() const { return mListIndex == kInvalidListIndex; } inline bool HasWildcardEventId() const { return mEventId == kInvalidEventId; } @@ -81,13 +81,13 @@ struct ClusterInfo * Changing order to something more natural (e.g. endpoint id before cluster id) will result * in extra memory alignment padding. */ - NodeId mNodeId = kUndefinedNodeId; // uint64 - ClusterInfo * mpNext = nullptr; // pointer width (32/64 bits) - ClusterId mClusterId = kInvalidClusterId; // uint32 - AttributeId mFieldId = kInvalidAttributeId; // uint32 - EventId mEventId = kInvalidEventId; // uint32 - ListIndex mListIndex = kInvalidListIndex; // uint16 - EndpointId mEndpointId = kInvalidEndpointId; // uint16 + NodeId mNodeId = kUndefinedNodeId; // uint64 + ClusterInfo * mpNext = nullptr; // pointer width (32/64 bits) + ClusterId mClusterId = kInvalidClusterId; // uint32 + AttributeId mAttributeId = kInvalidAttributeId; // uint32 + EventId mEventId = kInvalidEventId; // uint32 + ListIndex mListIndex = kInvalidListIndex; // uint16 + EndpointId mEndpointId = kInvalidEndpointId; // uint16 }; } // namespace app } // namespace chip diff --git a/src/app/CommandSender.cpp b/src/app/CommandSender.cpp index d2cb41f4847dae..b99ce2e7ae01bd 100644 --- a/src/app/CommandSender.cpp +++ b/src/app/CommandSender.cpp @@ -198,7 +198,7 @@ CHIP_ERROR CommandSender::ProcessInvokeResponseIB(InvokeResponseIB::Parser & aIn if (CHIP_NO_ERROR == err) { CommandPathIB::Parser commandPath; - commandStatus.GetPath(&commandPath); + ReturnErrorOnFailure(commandStatus.GetPath(&commandPath)); ReturnErrorOnFailure(commandPath.GetClusterId(&clusterId)); ReturnErrorOnFailure(commandPath.GetCommandId(&commandId)); ReturnErrorOnFailure(commandPath.GetEndpointId(&endpointId)); diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index 5408bed1926ba6..1186ca94cdf4db 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -516,8 +516,8 @@ bool InteractionModelEngine::MergeOverlappedAttributePath(ClusterInfo * apAttrib } if (aAttributePath.IsAttributePathSupersetOf(*runner)) { - runner->mListIndex = aAttributePath.mListIndex; - runner->mFieldId = aAttributePath.mFieldId; + runner->mListIndex = aAttributePath.mListIndex; + runner->mAttributeId = aAttributePath.mAttributeId; return true; } runner = runner->mpNext; diff --git a/src/app/InteractionModelEngine.h b/src/app/InteractionModelEngine.h index b7bda95c88f722..8c6143474f7bba 100644 --- a/src/app/InteractionModelEngine.h +++ b/src/app/InteractionModelEngine.h @@ -255,26 +255,23 @@ void DispatchSingleClusterResponseCommand(const ConcreteCommandPath & aCommandPa bool ServerClusterCommandExists(const ConcreteCommandPath & aCommandPath); /** - * Fetch attribute value and version info and write to the TLVWriter provided. + * Fetch attribute value and version info and write to the AttributeReport provided. * When the endpoint / cluster / attribute / event data specified by aClusterInfo does not exist, corresponding interaction model - * error code will be put into the writer, and CHIP_NO_ERROR will be returned and apDataExists will be set to false. - * If the data exists on the server, the data (with tag kCsTag_Data) and the data version (with tag kCsTag_DataVersion) will be put - * into the TLVWriter and apDataExists will be set to true. TLVWriter error will be returned if any error occurred during encoding + * error code will be put into the writer, and CHIP_NO_ERROR will be returned. + * If the data exists on the server, the data (with tag kData) and the data version (with tag kDataVersion) will be put + * into the TLVWriter. TLVWriter error will be returned if any error occurred during encoding * these values. * This function is implemented by CHIP as a part of cluster data storage & management. * The apWriter and apDataExists can be nullptr. * * @param[in] aAccessingFabricIndex The accessing fabric index for the read. * @param[in] aPath The concrete path of the data being read. - * @param[in] apWriter The TLVWriter for holding cluster data. Can be a nullptr if the caller does not care - * the exact value of the attribute. - * @param[out] apDataExists Tell whether the cluster data exist on server. Can be a nullptr if the caller does not care - * whether the data exists. + * @param[in] aAttributeReport The TLV Builder for Cluter attribute builder. * * @retval CHIP_NO_ERROR on success */ -CHIP_ERROR ReadSingleClusterData(FabricIndex aAccessingFabricIndex, const ConcreteAttributePath & aPath, TLV::TLVWriter * apWriter, - bool * apDataExists); +CHIP_ERROR ReadSingleClusterData(FabricIndex aAccessingFabricIndex, const ConcreteAttributePath & aPath, + AttributeReportIB::Builder & aAttributeReport); /** * TODO: Document. diff --git a/src/app/MessageDef/AttributeDataElement.cpp b/src/app/MessageDef/AttributeDataElement.cpp deleted file mode 100644 index 4e4d3f52c53a5f..00000000000000 --- a/src/app/MessageDef/AttributeDataElement.cpp +++ /dev/null @@ -1,444 +0,0 @@ -/** - * - * Copyright (c) 2020-2021 Project CHIP Authors - * Copyright (c) 2018 Google LLC. - * Copyright (c) 2016-2017 Nest Labs, Inc. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * @file - * This file defines AttributeDataElement parser and builder in CHIP interaction model - * - */ - -#include "AttributeDataElement.h" - -#include "MessageDefHelper.h" - -#include -#include -#include - -#include - -using namespace chip; -using namespace chip::TLV; - -namespace chip { -namespace app { -CHIP_ERROR AttributeDataElement::Parser::Init(const chip::TLV::TLVReader & aReader) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - // make a copy of the reader here - mReader.Init(aReader); - - VerifyOrExit(chip::TLV::kTLVType_Structure == mReader.GetType(), err = CHIP_ERROR_WRONG_TLV_TYPE); - - err = mReader.EnterContainer(mOuterContainerType); - -exit: - - return err; -} - -CHIP_ERROR -AttributeDataElement::Parser::ParseData(chip::TLV::TLVReader & aReader, int aDepth) const -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - if (aDepth == 0) - { - PRETTY_PRINT("\tData = "); - } - else - { - if (chip::TLV::IsContextTag(aReader.GetTag())) - { - PRETTY_PRINT("\t0x%" PRIx32 " = ", chip::TLV::TagNumFromTag(aReader.GetTag())); - } - else if (chip::TLV::IsProfileTag(aReader.GetTag())) - { - PRETTY_PRINT("\t0x%" PRIx32 "::0x%" PRIx32 " = ", chip::TLV::ProfileIdFromTag(aReader.GetTag()), - chip::TLV::TagNumFromTag(aReader.GetTag())); - } - else - { - // Anonymous tag, don't print anything - } - } - - switch (aReader.GetType()) - { - case chip::TLV::kTLVType_Structure: - PRETTY_PRINT("\t{"); - break; - - case chip::TLV::kTLVType_Array: - PRETTY_PRINT_SAMELINE("["); - PRETTY_PRINT("\t\t"); - break; - - case chip::TLV::kTLVType_SignedInteger: { - int64_t value_s64; - - err = aReader.Get(value_s64); - SuccessOrExit(err); - - PRETTY_PRINT_SAMELINE("%" PRId64 ", ", value_s64); - break; - } - - case chip::TLV::kTLVType_UnsignedInteger: { - uint64_t value_u64; - - err = aReader.Get(value_u64); - SuccessOrExit(err); - - PRETTY_PRINT_SAMELINE("%" PRIu64 ", ", value_u64); - break; - } - - case chip::TLV::kTLVType_Boolean: { - bool value_b; - - err = aReader.Get(value_b); - SuccessOrExit(err); - - PRETTY_PRINT_SAMELINE("%s, ", value_b ? "true" : "false"); - break; - } - - case chip::TLV::kTLVType_UTF8String: { - char value_s[256]; - - err = aReader.GetString(value_s, sizeof(value_s)); - VerifyOrExit(err == CHIP_NO_ERROR || err == CHIP_ERROR_BUFFER_TOO_SMALL, ); - - if (err == CHIP_ERROR_BUFFER_TOO_SMALL) - { - PRETTY_PRINT_SAMELINE("... (byte string too long) ..."); - err = CHIP_NO_ERROR; - } - else - { - PRETTY_PRINT_SAMELINE("\"%s\", ", value_s); - } - break; - } - - case chip::TLV::kTLVType_ByteString: { - uint8_t value_b[256]; - uint32_t len, readerLen; - - readerLen = aReader.GetLength(); - - err = aReader.GetBytes(value_b, sizeof(value_b)); - VerifyOrExit(err == CHIP_NO_ERROR || err == CHIP_ERROR_BUFFER_TOO_SMALL, ); - - PRETTY_PRINT_SAMELINE("["); - PRETTY_PRINT("\t\t"); - - if (readerLen < sizeof(value_b)) - { - len = readerLen; - } - else - { - len = sizeof(value_b); - } - - if (err == CHIP_ERROR_BUFFER_TOO_SMALL) - { - PRETTY_PRINT_SAMELINE("... (byte string too long) ..."); - } - else - { - for (size_t i = 0; i < len; i++) - { - PRETTY_PRINT_SAMELINE("0x%" PRIx8 ", ", value_b[i]); - } - } - - err = CHIP_NO_ERROR; - PRETTY_PRINT("\t]"); - break; - } - - case chip::TLV::kTLVType_Null: - PRETTY_PRINT_SAMELINE("NULL"); - break; - - default: - PRETTY_PRINT_SAMELINE("--"); - break; - } - - if (aReader.GetType() == chip::TLV::kTLVType_Structure || aReader.GetType() == chip::TLV::kTLVType_Array) - { - const char terminating_char = (aReader.GetType() == chip::TLV::kTLVType_Structure) ? '}' : ']'; - chip::TLV::TLVType type; - - IgnoreUnusedVariable(terminating_char); - - err = aReader.EnterContainer(type); - SuccessOrExit(err); - - while ((err = aReader.Next()) == CHIP_NO_ERROR) - { - PRETTY_PRINT_INCDEPTH(); - - err = ParseData(aReader, aDepth + 1); - SuccessOrExit(err); - - PRETTY_PRINT_DECDEPTH(); - } - - PRETTY_PRINT("\t%c,", terminating_char); - - err = aReader.ExitContainer(type); - SuccessOrExit(err); - } - -exit: - return err; -} - -#if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK -CHIP_ERROR AttributeDataElement::Parser::CheckSchemaValidity() const -{ - CHIP_ERROR err = CHIP_NO_ERROR; - uint16_t TagPresenceMask = 0; - chip::TLV::TLVReader reader; - uint32_t tagNum = 0; - - PRETTY_PRINT("AttributeDataElement ="); - PRETTY_PRINT("{"); - - // make a copy of the reader - reader.Init(mReader); - - while (CHIP_NO_ERROR == (err = reader.Next())) - { - VerifyOrExit(chip::TLV::IsContextTag(reader.GetTag()), err = CHIP_ERROR_INVALID_TLV_TAG); - - tagNum = chip::TLV::TagNumFromTag(reader.GetTag()); - - switch (tagNum) - { - case kCsTag_AttributePath: - // check if this tag has appeared before - VerifyOrExit(!(TagPresenceMask & (1 << kCsTag_AttributePath)), err = CHIP_ERROR_INVALID_TLV_TAG); - TagPresenceMask |= (1 << kCsTag_AttributePath); - VerifyOrExit(chip::TLV::kTLVType_List == reader.GetType(), err = CHIP_ERROR_WRONG_TLV_TYPE); - - { - AttributePathIB::Parser path; - err = path.Init(reader); - SuccessOrExit(err); - - PRETTY_PRINT_INCDEPTH(); - err = path.CheckSchemaValidity(); - SuccessOrExit(err); - PRETTY_PRINT_DECDEPTH(); - } - - break; - case kCsTag_DataVersion: - // check if this tag has appeared before - VerifyOrExit(!(TagPresenceMask & (1 << kCsTag_DataVersion)), err = CHIP_ERROR_INVALID_TLV_TAG); - TagPresenceMask |= (1 << kCsTag_DataVersion); - VerifyOrExit(chip::TLV::kTLVType_UnsignedInteger == reader.GetType(), err = CHIP_ERROR_WRONG_TLV_TYPE); - -#if CHIP_DETAIL_LOGGING - { - chip::DataVersion version; - err = reader.Get(version); - SuccessOrExit(err); - - PRETTY_PRINT("\tDataElementVersion = 0x%" PRIx64 ",", version); - } -#endif // CHIP_DETAIL_LOGGING - break; - case kCsTag_Data: - // check if this tag has appeared before - VerifyOrExit(!(TagPresenceMask & (1 << kCsTag_Data)), err = CHIP_ERROR_INVALID_TLV_TAG); - TagPresenceMask |= (1 << kCsTag_Data); - - err = ParseData(reader, 0); - SuccessOrExit(err); - break; - case kCsTag_Status: - // check if this tag has appeared before - VerifyOrExit(!(TagPresenceMask & (1 << kCsTag_Status)), err = CHIP_ERROR_INVALID_TLV_TAG); - TagPresenceMask |= (1 << kCsTag_Status); - VerifyOrExit(chip::TLV::kTLVType_UnsignedInteger == reader.GetType(), err = CHIP_ERROR_WRONG_TLV_TYPE); - -#if CHIP_DETAIL_LOGGING - { - uint16_t status; - err = reader.Get(status); - SuccessOrExit(err); - - PRETTY_PRINT("\tStatus = 0x%" PRIx16 ",", status); - } - -#endif // CHIP_DETAIL_LOGGING - break; - case kCsTag_MoreClusterDataFlag: - // check if this tag has appeared before - VerifyOrExit(!(TagPresenceMask & (1 << kCsTag_MoreClusterDataFlag)), err = CHIP_ERROR_INVALID_TLV_TAG); - TagPresenceMask |= (1 << kCsTag_MoreClusterDataFlag); - VerifyOrExit(chip::TLV::kTLVType_Boolean == reader.GetType(), err = CHIP_ERROR_WRONG_TLV_TYPE); - -#if CHIP_DETAIL_LOGGING - { - bool flag; - err = reader.Get(flag); - SuccessOrExit(err); - - PRETTY_PRINT("\tMoreClusterDataFlag = %s,", flag ? "true" : "false"); - } - -#endif // CHIP_DETAIL_LOGGING - break; - - default: - PRETTY_PRINT("\tUnknown tag num %" PRIu32, tagNum); - break; - } - } - - PRETTY_PRINT("},"); - PRETTY_PRINT(""); - - // if we have exhausted this container - if (CHIP_END_OF_TLV == err) - { - // check for required fields: - // Either the data or the status code should exist. - const uint16_t RequiredFieldSetSuccess = (1 << kCsTag_AttributePath) | (1 << kCsTag_Data) | (1 << kCsTag_DataVersion); - const uint16_t RequiredFieldSetFailure = (1 << kCsTag_AttributePath) | (1 << kCsTag_Status); - if (((TagPresenceMask & RequiredFieldSetSuccess) == RequiredFieldSetSuccess) || - ((TagPresenceMask & RequiredFieldSetFailure) == RequiredFieldSetFailure)) - { - err = CHIP_NO_ERROR; - } - else - { - err = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_DATA_ELEMENT; - } - } - SuccessOrExit(err); - err = reader.ExitContainer(mOuterContainerType); - -exit: - - return err; -} -#endif // CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK - -CHIP_ERROR AttributeDataElement::Parser::GetAttributePath(AttributePathIB::Parser * const apAttributePath) const -{ - CHIP_ERROR err = CHIP_NO_ERROR; - chip::TLV::TLVReader reader; - - err = mReader.FindElementWithTag(chip::TLV::ContextTag(kCsTag_AttributePath), reader); - SuccessOrExit(err); - - VerifyOrExit(chip::TLV::kTLVType_List == reader.GetType(), err = CHIP_ERROR_WRONG_TLV_TYPE); - - err = apAttributePath->Init(reader); - SuccessOrExit(err); - -exit: - ChipLogIfFalse((CHIP_NO_ERROR == err) || (CHIP_END_OF_TLV == err)); - - return err; -} - -CHIP_ERROR AttributeDataElement::Parser::GetDataVersion(chip::DataVersion * const apVersion) const -{ - return GetUnsignedInteger(kCsTag_DataVersion, apVersion); -} - -CHIP_ERROR AttributeDataElement::Parser::GetData(chip::TLV::TLVReader * const apReader) const -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - err = mReader.FindElementWithTag(chip::TLV::ContextTag(kCsTag_Data), *apReader); - SuccessOrExit(err); - -exit: - ChipLogIfFalse((CHIP_NO_ERROR == err) || (CHIP_END_OF_TLV == err)); - - return err; -} - -CHIP_ERROR AttributeDataElement::Parser::GetStatus(uint16_t * const apStatus) const -{ - chip::TLV::TLVReader reader; - VerifyOrReturnError(apStatus != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(mReader.FindElementWithTag(chip::TLV::ContextTag(kCsTag_Status), reader)); - return reader.Get(*apStatus); -} - -CHIP_ERROR AttributeDataElement::Parser::GetMoreClusterDataFlag(bool * const apGetMoreClusterDataFlag) const -{ - return GetSimpleValue(kCsTag_MoreClusterDataFlag, chip::TLV::kTLVType_Boolean, apGetMoreClusterDataFlag); -} - -CHIP_ERROR AttributeDataElement::Builder::Init(chip::TLV::TLVWriter * const apWriter) -{ - return InitAnonymousStructure(apWriter); -} - -AttributePathIB::Builder & AttributeDataElement::Builder::CreateAttributePath() -{ - // skip if error has already been set - VerifyOrExit(CHIP_NO_ERROR == mError, mAttributePathBuilder.ResetError(mError)); - - mError = mAttributePathBuilder.Init(mpWriter, kCsTag_AttributePath); - -exit: - // on error, mAttributePathBuilder would be un-/partial initialized and cannot be used to write anything - return mAttributePathBuilder; -} - -AttributeDataElement::Builder & AttributeDataElement::Builder::DataVersion(const chip::DataVersion aDataVersion) -{ - // skip if error has already been set - if (mError == CHIP_NO_ERROR) - { - mError = mpWriter->Put(chip::TLV::ContextTag(kCsTag_DataVersion), aDataVersion); - } - return *this; -} - -AttributeDataElement::Builder & AttributeDataElement::Builder::MoreClusterData(const bool aMoreClusterData) -{ - // skip if error has already been set - if ((mError == CHIP_NO_ERROR) && aMoreClusterData) - { - mError = mpWriter->PutBoolean(chip::TLV::ContextTag(kCsTag_MoreClusterDataFlag), true); - } - return *this; -} - -AttributeDataElement::Builder & AttributeDataElement::Builder::EndOfAttributeDataElement() -{ - EndOfContainer(); - return *this; -} -}; // namespace app -}; // namespace chip diff --git a/src/app/MessageDef/AttributeDataIB.cpp b/src/app/MessageDef/AttributeDataIB.cpp new file mode 100644 index 00000000000000..b463606a5636cc --- /dev/null +++ b/src/app/MessageDef/AttributeDataIB.cpp @@ -0,0 +1,313 @@ +/** + * + * Copyright (c) 2020-2021 Project CHIP Authors + * Copyright (c) 2018 Google LLC. + * Copyright (c) 2016-2017 Nest Labs, Inc. + * 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 "AttributeDataIB.h" + +#include "MessageDefHelper.h" + +#include +#include +#include + +#include + +namespace chip { +namespace app { +CHIP_ERROR +AttributeDataIB::Parser::ParseData(TLV::TLVReader & aReader, int aDepth) const +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + if (aDepth == 0) + { + PRETTY_PRINT("\tData = "); + } + else + { + if (TLV::IsContextTag(aReader.GetTag())) + { + PRETTY_PRINT("\t0x%" PRIx32 " = ", TLV::TagNumFromTag(aReader.GetTag())); + } + else if (TLV::IsProfileTag(aReader.GetTag())) + { + PRETTY_PRINT("\t0x%" PRIx32 "::0x%" PRIx32 " = ", TLV::ProfileIdFromTag(aReader.GetTag()), + TLV::TagNumFromTag(aReader.GetTag())); + } + else + { + // Anonymous tag, don't print anything + } + } + + switch (aReader.GetType()) + { + case TLV::kTLVType_Structure: + PRETTY_PRINT("\t{"); + break; + + case TLV::kTLVType_Array: + PRETTY_PRINT_SAMELINE("["); + PRETTY_PRINT("\t\t"); + break; + + case TLV::kTLVType_SignedInteger: { + int64_t value_s64; + + ReturnErrorOnFailure(aReader.Get(value_s64)); + + PRETTY_PRINT_SAMELINE("%" PRId64 ", ", value_s64); + break; + } + + case TLV::kTLVType_UnsignedInteger: { + uint64_t value_u64; + + ReturnErrorOnFailure(aReader.Get(value_u64)); + + PRETTY_PRINT_SAMELINE("%" PRIu64 ", ", value_u64); + break; + } + + case TLV::kTLVType_Boolean: { + bool value_b; + + ReturnErrorOnFailure(aReader.Get(value_b)); + + PRETTY_PRINT_SAMELINE("%s, ", value_b ? "true" : "false"); + break; + } + + case TLV::kTLVType_UTF8String: { + char value_s[256]; + + err = aReader.GetString(value_s, sizeof(value_s)); + VerifyOrReturnError(err == CHIP_NO_ERROR || err == CHIP_ERROR_BUFFER_TOO_SMALL, err); + + if (err == CHIP_ERROR_BUFFER_TOO_SMALL) + { + PRETTY_PRINT_SAMELINE("... (byte string too long) ..."); + err = CHIP_NO_ERROR; + } + else + { + PRETTY_PRINT_SAMELINE("\"%s\", ", value_s); + } + break; + } + + case TLV::kTLVType_ByteString: { + uint8_t value_b[256]; + uint32_t len, readerLen; + + readerLen = aReader.GetLength(); + + err = aReader.GetBytes(value_b, sizeof(value_b)); + VerifyOrReturnError(err == CHIP_NO_ERROR || err == CHIP_ERROR_BUFFER_TOO_SMALL, err); + + PRETTY_PRINT_SAMELINE("["); + PRETTY_PRINT("\t\t"); + + if (readerLen < sizeof(value_b)) + { + len = readerLen; + } + else + { + len = sizeof(value_b); + } + + if (err == CHIP_ERROR_BUFFER_TOO_SMALL) + { + PRETTY_PRINT_SAMELINE("... (byte string too long) ..."); + } + else + { + for (size_t i = 0; i < len; i++) + { + PRETTY_PRINT_SAMELINE("0x%" PRIx8 ", ", value_b[i]); + } + } + + err = CHIP_NO_ERROR; + PRETTY_PRINT("\t]"); + break; + } + + case TLV::kTLVType_Null: + PRETTY_PRINT_SAMELINE("NULL"); + break; + + default: + PRETTY_PRINT_SAMELINE("--"); + break; + } + + if (aReader.GetType() == TLV::kTLVType_Structure || aReader.GetType() == TLV::kTLVType_Array) + { + const char terminating_char = (aReader.GetType() == TLV::kTLVType_Structure) ? '}' : ']'; + TLV::TLVType type; + + IgnoreUnusedVariable(terminating_char); + + ReturnErrorOnFailure(aReader.EnterContainer(type)); + + while ((err = aReader.Next()) == CHIP_NO_ERROR) + { + PRETTY_PRINT_INCDEPTH(); + + ReturnErrorOnFailure(ParseData(aReader, aDepth + 1)); + + PRETTY_PRINT_DECDEPTH(); + } + + PRETTY_PRINT("\t%c,", terminating_char); + + ReturnErrorOnFailure(aReader.ExitContainer(type)); + } + + return CHIP_NO_ERROR; +} + +#if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK +CHIP_ERROR AttributeDataIB::Parser::CheckSchemaValidity() const +{ + CHIP_ERROR err = CHIP_NO_ERROR; + int TagPresenceMask = 0; + TLV::TLVReader reader; + + PRETTY_PRINT("AttributeDataIB ="); + PRETTY_PRINT("{"); + + // make a copy of the Path reader + reader.Init(mReader); + + while (CHIP_NO_ERROR == (err = reader.Next())) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + uint32_t tagNum = TLV::TagNumFromTag(reader.GetTag()); + switch (tagNum) + { + case to_underlying(Tag::kDataVersion): + // check if this tag has appeared before + VerifyOrReturnError(!(TagPresenceMask & (1 << to_underlying(Tag::kDataVersion))), CHIP_ERROR_INVALID_TLV_TAG); + TagPresenceMask |= (1 << to_underlying(Tag::kDataVersion)); + VerifyOrReturnError(TLV::kTLVType_UnsignedInteger == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + +#if CHIP_DETAIL_LOGGING + { + chip::DataVersion version; + ReturnErrorOnFailure(reader.Get(version)); + PRETTY_PRINT("\tDataVersion = 0x%" PRIx32 ",", version); + } +#endif // CHIP_DETAIL_LOGGING + break; + case to_underlying(Tag::kPath): + // check if this tag has appeared before + VerifyOrReturnError(!(TagPresenceMask & (1 << to_underlying(Tag::kPath))), CHIP_ERROR_INVALID_TLV_TAG); + TagPresenceMask |= (1 << to_underlying(Tag::kPath)); + { + AttributePathIB::Parser path; + ReturnErrorOnFailure(path.Init(reader)); + + PRETTY_PRINT_INCDEPTH(); + ReturnErrorOnFailure(path.CheckSchemaValidity()); + PRETTY_PRINT_DECDEPTH(); + } + break; + case to_underlying(Tag::kData): + // check if this tag has appeared before + VerifyOrReturnError(!(TagPresenceMask & (1 << to_underlying(Tag::kData))), CHIP_ERROR_INVALID_TLV_TAG); + TagPresenceMask |= (1 << to_underlying(Tag::kData)); + + PRETTY_PRINT_INCDEPTH(); + ReturnErrorOnFailure(ParseData(reader, 0)); + PRETTY_PRINT_DECDEPTH(); + break; + default: + PRETTY_PRINT("Unknown tag num %" PRIu32, tagNum); + break; + } + } + PRETTY_PRINT("},"); + PRETTY_PRINT(""); + + // if we have exhausted this container + if (CHIP_END_OF_TLV == err) + { + // check for required fields: + const int RequiredFields = (1 << to_underlying(Tag::kPath)) | (1 << to_underlying(Tag::kData)); + + if ((TagPresenceMask & RequiredFields) == RequiredFields) + { + err = CHIP_NO_ERROR; + } + else + { + err = CHIP_ERROR_IM_MALFORMED_EVENT_DATA_ELEMENT; + } + } + ReturnErrorOnFailure(err); + ReturnErrorOnFailure(reader.ExitContainer(mOuterContainerType)); + return CHIP_NO_ERROR; +} +#endif // CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK + +CHIP_ERROR AttributeDataIB::Parser::GetPath(AttributePathIB::Parser * const apPath) const +{ + TLV::TLVReader reader; + ReturnErrorOnFailure(mReader.FindElementWithTag(TLV::ContextTag(to_underlying(Tag::kPath)), reader)); + ReturnErrorOnFailure(apPath->Init(reader)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR AttributeDataIB::Parser::GetDataVersion(chip::DataVersion * const apVersion) const +{ + return GetUnsignedInteger(to_underlying(Tag::kDataVersion), apVersion); +} + +CHIP_ERROR AttributeDataIB::Parser::GetData(TLV::TLVReader * const apReader) const +{ + return mReader.FindElementWithTag(TLV::ContextTag(to_underlying(Tag::kData)), *apReader); +} + +AttributePathIB::Builder & AttributeDataIB::Builder::CreatePath() +{ + if (mError == CHIP_NO_ERROR) + { + mError = mPath.Init(mpWriter, to_underlying(Tag::kPath)); + } + return mPath; +} + +AttributeDataIB::Builder & AttributeDataIB::Builder::DataVersion(const chip::DataVersion aDataVersion) +{ + // skip if error has already been set + if (mError == CHIP_NO_ERROR) + { + mError = mpWriter->Put(TLV::ContextTag(to_underlying(Tag::kDataVersion)), aDataVersion); + } + return *this; +} + +AttributeDataIB::Builder & AttributeDataIB::Builder::EndOfAttributeDataIB() +{ + EndOfContainer(); + return *this; +} +} // namespace app +} // namespace chip diff --git a/src/app/MessageDef/AttributeDataElement.h b/src/app/MessageDef/AttributeDataIB.h similarity index 52% rename from src/app/MessageDef/AttributeDataElement.h rename to src/app/MessageDef/AttributeDataIB.h index bd2a6898deeb68..a4144c4374d276 100644 --- a/src/app/MessageDef/AttributeDataElement.h +++ b/src/app/MessageDef/AttributeDataIB.h @@ -15,17 +15,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/** - * @file - * This file defines AttributeDataElement parser and builder in CHIP interaction model - * - */ #pragma once #include "AttributePathIB.h" -#include "Builder.h" -#include "Parser.h" +#include "StructBuilder.h" +#include "StructParser.h" #include #include @@ -36,28 +31,17 @@ namespace chip { namespace app { -namespace AttributeDataElement { -enum +namespace AttributeDataIB { +enum class Tag : uint8_t { - kCsTag_AttributePath = 0, - kCsTag_DataVersion = 1, - kCsTag_Data = 2, - kCsTag_Status = 3, - kCsTag_MoreClusterDataFlag = 4, + kDataVersion = 0, + kPath = 1, + kData = 2, }; -class Parser : public chip::app::Parser +class Parser : public StructParser { public: - /** - * @brief Initialize the parser object with TLVReader - * - * @param [in] aReader A pointer to a TLVReader, which should point to the beginning of this AttributeDataElement - * - * @return #CHIP_NO_ERROR on success - */ - CHIP_ERROR Init(const chip::TLV::TLVReader & aReader); - #if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK /** * @brief Roughly verify the message is correctly formed @@ -76,18 +60,7 @@ class Parser : public chip::app::Parser #endif /** - * @brief Get a TLVReader for the AttributePathIB. Next() must be called before accessing them. - * - * @param [in] apAttributePath A pointer to apAttributePath - * - * @return #CHIP_NO_ERROR on success - * #CHIP_ERROR_WRONG_TLV_TYPE if there is such element but it's not a Path - * #CHIP_END_OF_TLV if there is no such element - */ - CHIP_ERROR GetAttributePath(AttributePathIB::Parser * const apAttributePath) const; - - /** - * @brief Get a TLVReader for the DataVersion. Next() must be called before accessing them. + * @brief Get the DataVersion. * * @param [in] apVersion A pointer to apVersion * @@ -98,91 +71,61 @@ class Parser : public chip::app::Parser CHIP_ERROR GetDataVersion(chip::DataVersion * const apVersion) const; /** - * @brief Get a TLVReader for the Data. Next() must be called before accessing them. + * @brief Get a TLVReader for the AttributePathIB. Next() must be called before accessing them. * - * @param [in] apReader A pointer to apReader + * @param [in] apAttributePath A pointer to apAttributePath * * @return #CHIP_NO_ERROR on success + * #CHIP_ERROR_WRONG_TLV_TYPE if there is such element but it's not a Path * #CHIP_END_OF_TLV if there is no such element */ - CHIP_ERROR GetData(chip::TLV::TLVReader * const apReader) const; + CHIP_ERROR GetPath(AttributePathIB::Parser * const apPath) const; /** - * @brief Get the IM status code. - * - * @param [out] apStatus A pointer to result - * - * @return #CHIP_NO_ERROR on success - * #CHIP_END_OF_TLV if there is not such element - */ - CHIP_ERROR GetStatus(uint16_t * const apStatus) const; - - /** - * @brief Check whether it need more cluster data Next() must be called before accessing them. + * @brief Get a TLVReader for the Data. Next() must be called before accessing them. * - * @param [in] apMoreClusterDataFlag A pointer to apMoreClusterDataFlag + * @param [in] apReader A pointer to apReader * * @return #CHIP_NO_ERROR on success * #CHIP_END_OF_TLV if there is no such element */ - CHIP_ERROR GetMoreClusterDataFlag(bool * const apMoreClusterDataFlag) const; + CHIP_ERROR GetData(TLV::TLVReader * const apReader) const; protected: // A recursively callable function to parse a data element and pretty-print it. - CHIP_ERROR ParseData(chip::TLV::TLVReader & aReader, int aDepth) const; + CHIP_ERROR ParseData(TLV::TLVReader & aReader, int aDepth) const; }; -class Builder : public chip::app::Builder +class Builder : public StructBuilder { public: - /** - * @brief Initialize a AttributeDataElement::Builder for writing into a TLV stream - * - * @param [in] apWriter A pointer to TLVWriter - * - * @return #CHIP_NO_ERROR on success - */ - CHIP_ERROR Init(chip::TLV::TLVWriter * const apWriter); - - /** - * @brief Initialize a AttributePathIB::Builder for writing into the TLV stream - * - * @return A reference to AttributePathIB::Builder - */ - AttributePathIB::Builder & CreateAttributePath(); - /** * @brief Inject DataVersion into the TLV stream to indicate the numerical data version associated with * the cluster that is referenced by the path. * - * @param [in] aDataVersion The boolean variable to indicate if AttributeDataElement has version + * @param [in] aDataVersion The boolean variable to indicate if AttributeDataIB has version * * @return A reference to *this */ - AttributeDataElement::Builder & DataVersion(const chip::DataVersion aDataVersion); + AttributeDataIB::Builder & DataVersion(const chip::DataVersion aDataVersion); /** - * @brief Inject aMoreClusterData into the TLV stream to indicate whether there is more cluster data. - * This is present when there is more than one AttributeDataElement as part of a logical Changeset, - * and the entire set needs to be applied ‘atomically’ on the receiver. - * - * @param [in] aMoreClusterData The boolean variable to indicate if more cluster data is needed. + * @brief Initialize a AttributePathIB::Builder for writing into the TLV stream * - * @return A reference to *this + * @return A reference to AttributePathIB::Builder */ - AttributeDataElement::Builder & MoreClusterData(const bool aMoreClusterData); + AttributePathIB::Builder & CreatePath(); /** - * @brief Mark the end of this AttributeDataElement + * @brief Mark the end of this AttributeDataIB * * @return A reference to *this */ - AttributeDataElement::Builder & EndOfAttributeDataElement(); + AttributeDataIB::Builder & EndOfAttributeDataIB(); private: - AttributePathIB::Builder mAttributePathBuilder; + AttributePathIB::Builder mPath; }; -}; // namespace AttributeDataElement - -}; // namespace app -}; // namespace chip +} // namespace AttributeDataIB +} // namespace app +} // namespace chip diff --git a/src/app/MessageDef/AttributeDataList.cpp b/src/app/MessageDef/AttributeDataIBs.cpp similarity index 71% rename from src/app/MessageDef/AttributeDataList.cpp rename to src/app/MessageDef/AttributeDataIBs.cpp index a55761c58197cb..913888e7e36c35 100644 --- a/src/app/MessageDef/AttributeDataList.cpp +++ b/src/app/MessageDef/AttributeDataIBs.cpp @@ -17,11 +17,11 @@ */ /** * @file - * This file defines AttributeDataList parser and builder in CHIP interaction model + * This file defines AttributeDataIBs parser and builder in CHIP interaction model * */ -#include "AttributeDataList.h" +#include "AttributeDataIBs.h" #include "MessageDefHelper.h" @@ -37,13 +37,13 @@ using namespace chip::TLV; namespace chip { namespace app { #if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK -CHIP_ERROR AttributeDataList::Parser::CheckSchemaValidity() const +CHIP_ERROR AttributeDataIBs::Parser::CheckSchemaValidity() const { CHIP_ERROR err = CHIP_NO_ERROR; size_t NumDataElement = 0; chip::TLV::TLVReader reader; - PRETTY_PRINT("AttributeDataList ="); + PRETTY_PRINT("AttributeDataIBs ="); PRETTY_PRINT("["); // make a copy of the reader @@ -55,7 +55,7 @@ CHIP_ERROR AttributeDataList::Parser::CheckSchemaValidity() const VerifyOrExit(chip::TLV::kTLVType_Structure == reader.GetType(), err = CHIP_ERROR_WRONG_TLV_TYPE); { - AttributeDataElement::Parser data; + AttributeDataIB::Parser data; err = data.Init(reader); SuccessOrExit(err); @@ -89,25 +89,25 @@ CHIP_ERROR AttributeDataList::Parser::CheckSchemaValidity() const } #endif // CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK -AttributeDataElement::Builder & AttributeDataList::Builder::CreateAttributeDataElementBuilder() +AttributeDataIB::Builder & AttributeDataIBs::Builder::CreateAttributeDataIBBuilder() { // skip if error has already been set - VerifyOrExit(CHIP_NO_ERROR == mError, mAttributeDataElementBuilder.ResetError(mError)); + VerifyOrExit(CHIP_NO_ERROR == mError, mAttributeDataIBBuilder.ResetError(mError)); - mError = mAttributeDataElementBuilder.Init(mpWriter); + mError = mAttributeDataIBBuilder.Init(mpWriter); exit: - // on error, mAttributeDataElementBuilder would be un-/partial initialized and cannot be used to write anything - return mAttributeDataElementBuilder; + // on error, mAttributeDataIBBuilder would be un-/partial initialized and cannot be used to write anything + return mAttributeDataIBBuilder; } -AttributeDataElement::Builder & AttributeDataList::Builder::GetAttributeDataElementBuilder() +AttributeDataIB::Builder & AttributeDataIBs::Builder::GetAttributeDataIBBuilder() { - return mAttributeDataElementBuilder; + return mAttributeDataIBBuilder; } -AttributeDataList::Builder & AttributeDataList::Builder::EndOfAttributeDataList() +AttributeDataIBs::Builder & AttributeDataIBs::Builder::EndOfAttributeDataIBs() { EndOfContainer(); diff --git a/src/app/MessageDef/AttributeDataList.h b/src/app/MessageDef/AttributeDataIBs.h similarity index 74% rename from src/app/MessageDef/AttributeDataList.h rename to src/app/MessageDef/AttributeDataIBs.h index 20949a064fd45d..67dabd1e1a096b 100644 --- a/src/app/MessageDef/AttributeDataList.h +++ b/src/app/MessageDef/AttributeDataIBs.h @@ -17,7 +17,7 @@ */ /** * @file - * This file defines AttributeDataList parser and builder in CHIP interaction model + * This file defines AttributeDataIBs parser and builder in CHIP interaction model * */ @@ -25,7 +25,7 @@ #include "ArrayBuilder.h" #include "ArrayParser.h" -#include "AttributeDataElement.h" +#include "AttributeDataIB.h" #include #include @@ -36,7 +36,7 @@ namespace chip { namespace app { -namespace AttributeDataList { +namespace AttributeDataIBs { class Parser : public ArrayParser { public: @@ -62,25 +62,25 @@ class Builder : public ArrayBuilder { public: /** - * @brief Initialize a AttributeDataElement::Builder for writing into the TLV stream + * @brief Initialize a AttributeDataIB::Builder for writing into the TLV stream * - * @return A reference to AttributeDataElement::Builder + * @return A reference to AttributeDataIB::Builder */ - AttributeDataElement::Builder & CreateAttributeDataElementBuilder(); + AttributeDataIB::Builder & CreateAttributeDataIBBuilder(); - AttributeDataElement::Builder & GetAttributeDataElementBuilder(); + AttributeDataIB::Builder & GetAttributeDataIBBuilder(); /** - * @brief Mark the end of this AttributeDataList + * @brief Mark the end of this AttributeDataIBs * * @return A reference to *this */ - AttributeDataList::Builder & EndOfAttributeDataList(); + AttributeDataIBs::Builder & EndOfAttributeDataIBs(); private: - AttributeDataElement::Builder mAttributeDataElementBuilder; + AttributeDataIB::Builder mAttributeDataIBBuilder; }; -}; // namespace AttributeDataList +}; // namespace AttributeDataIBs }; // namespace app }; // namespace chip diff --git a/src/app/MessageDef/AttributeDataVersionList.h b/src/app/MessageDef/AttributeDataVersionList.h index cb079e18e470e6..a5b807c7aede39 100644 --- a/src/app/MessageDef/AttributeDataVersionList.h +++ b/src/app/MessageDef/AttributeDataVersionList.h @@ -25,7 +25,7 @@ #include "ArrayBuilder.h" #include "ArrayParser.h" -#include "AttributeDataElement.h" +#include "AttributeDataIB.h" #include #include @@ -107,7 +107,7 @@ class Builder : public ArrayBuilder AttributeDataVersionList::Builder & EndOfAttributeDataVersionList(); private: - AttributeDataElement::Builder mAttributeDataElementBuilder; + AttributeDataIB::Builder mAttributeDataIBBuilder; }; }; // namespace AttributeDataVersionList }; // namespace app diff --git a/src/app/MessageDef/AttributePaths.cpp b/src/app/MessageDef/AttributePathIBs.cpp similarity index 87% rename from src/app/MessageDef/AttributePaths.cpp rename to src/app/MessageDef/AttributePathIBs.cpp index eab1fa87b32bfc..c78988ef80e628 100644 --- a/src/app/MessageDef/AttributePaths.cpp +++ b/src/app/MessageDef/AttributePathIBs.cpp @@ -16,7 +16,7 @@ * limitations under the License. */ -#include "AttributePaths.h" +#include "AttributePathIBs.h" #include "MessageDefHelper.h" #include @@ -28,16 +28,16 @@ namespace chip { namespace app { #if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK -CHIP_ERROR AttributePaths::Parser::CheckSchemaValidity() const +CHIP_ERROR AttributePathIBs::Parser::CheckSchemaValidity() const { CHIP_ERROR err = CHIP_NO_ERROR; size_t numAttributePath = 0; TLV::TLVReader reader; - PRETTY_PRINT("AttributePaths ="); + PRETTY_PRINT("AttributePathIBs ="); PRETTY_PRINT("["); - // make a copy of the AttributePaths reader + // make a copy of the AttributePathIBs reader reader.Init(mReader); while (CHIP_NO_ERROR == (err = reader.Next())) @@ -73,7 +73,7 @@ CHIP_ERROR AttributePaths::Parser::CheckSchemaValidity() const } #endif // CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK -AttributePathIB::Builder & AttributePaths::Builder::CreateAttributePath() +AttributePathIB::Builder & AttributePathIBs::Builder::CreateAttributePath() { if (mError == CHIP_NO_ERROR) { @@ -83,7 +83,7 @@ AttributePathIB::Builder & AttributePaths::Builder::CreateAttributePath() } // Mark the end of this array and recover the type for outer container -AttributePaths::Builder & AttributePaths::Builder::EndOfAttributePaths() +AttributePathIBs::Builder & AttributePathIBs::Builder::EndOfAttributePathIBs() { EndOfContainer(); return *this; diff --git a/src/app/MessageDef/AttributePaths.h b/src/app/MessageDef/AttributePathIBs.h similarity index 95% rename from src/app/MessageDef/AttributePaths.h rename to src/app/MessageDef/AttributePathIBs.h index 079f0f30b28111..e8a4704e170eb2 100644 --- a/src/app/MessageDef/AttributePaths.h +++ b/src/app/MessageDef/AttributePathIBs.h @@ -31,7 +31,7 @@ namespace chip { namespace app { -namespace AttributePaths { +namespace AttributePathIBs { class Parser : public ArrayParser { public: @@ -68,11 +68,11 @@ class Builder : public ArrayBuilder * * @return A reference to *this */ - AttributePaths::Builder & EndOfAttributePaths(); + AttributePathIBs::Builder & EndOfAttributePathIBs(); private: AttributePathIB::Builder mAttributePath; }; -} // namespace AttributePaths +} // namespace AttributePathIBs } // namespace app } // namespace chip diff --git a/src/app/MessageDef/AttributeReportIB.cpp b/src/app/MessageDef/AttributeReportIB.cpp new file mode 100644 index 00000000000000..502a9816613de7 --- /dev/null +++ b/src/app/MessageDef/AttributeReportIB.cpp @@ -0,0 +1,153 @@ +/** + * + * Copyright (c) 2021 Project CHIP Authors + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "AttributeReportIB.h" +#include "AttributeDataIB.h" +#include "MessageDefHelper.h" +#include "StructBuilder.h" +#include "StructParser.h" + +#include +#include +#include + +#include + +namespace chip { +namespace app { +#if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK +CHIP_ERROR AttributeReportIB::Parser::CheckSchemaValidity() const +{ + CHIP_ERROR err = CHIP_NO_ERROR; + int TagPresenceMask = 0; + TLV::TLVReader reader; + + PRETTY_PRINT("AttributeReportIB ="); + PRETTY_PRINT("{"); + + // make a copy of the reader + reader.Init(mReader); + + while (CHIP_NO_ERROR == (err = reader.Next())) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + uint32_t tagNum = TLV::TagNumFromTag(reader.GetTag()); + switch (tagNum) + { + case to_underlying(Tag::kAttributeStatus): + // check if this tag has appeared before + VerifyOrReturnError(!(TagPresenceMask & (1 << to_underlying(Tag::kAttributeStatus))), CHIP_ERROR_INVALID_TLV_TAG); + TagPresenceMask |= (1 << to_underlying(Tag::kAttributeStatus)); + { + AttributeStatusIB::Parser attributeStatus; + ReturnErrorOnFailure(attributeStatus.Init(reader)); + + PRETTY_PRINT_INCDEPTH(); + ReturnErrorOnFailure(attributeStatus.CheckSchemaValidity()); + PRETTY_PRINT_DECDEPTH(); + } + break; + case to_underlying(Tag::kAttributeData): + // check if this tag has appeared before + VerifyOrReturnError(!(TagPresenceMask & (1 << to_underlying(Tag::kAttributeData))), CHIP_ERROR_INVALID_TLV_TAG); + TagPresenceMask |= (1 << to_underlying(Tag::kAttributeData)); + { + AttributeDataIB::Parser attributeData; + ReturnErrorOnFailure(attributeData.Init(reader)); + + PRETTY_PRINT_INCDEPTH(); + ReturnErrorOnFailure(attributeData.CheckSchemaValidity()); + PRETTY_PRINT_DECDEPTH(); + } + break; + default: + PRETTY_PRINT("Unknown tag num %" PRIu32, tagNum); + break; + } + } + + PRETTY_PRINT("},"); + PRETTY_PRINT(""); + + if (CHIP_END_OF_TLV == err) + { + // check for at most field: + const int CheckDataField = 1 << to_underlying(Tag::kAttributeData); + const int CheckStatusField = (1 << to_underlying(Tag::kAttributeStatus)); + + if ((TagPresenceMask & CheckDataField) == CheckDataField && (TagPresenceMask & CheckStatusField) == CheckStatusField) + { + // kAttributeData and kAttributeStatus both exist + err = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_REPORT_MESSAGE; + } + else if ((TagPresenceMask & CheckDataField) != CheckDataField && (TagPresenceMask & CheckStatusField) != CheckStatusField) + { + // kPath and kErrorStatus not exist + err = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_REPORT_MESSAGE; + } + else + { + err = CHIP_NO_ERROR; + } + } + + ReturnErrorOnFailure(err); + ReturnErrorOnFailure(reader.ExitContainer(mOuterContainerType)); + return CHIP_NO_ERROR; +} +#endif // CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK + +CHIP_ERROR AttributeReportIB::Parser::GetAttributeStatus(AttributeStatusIB::Parser * const apAttributeStatus) const +{ + TLV::TLVReader reader; + ReturnErrorOnFailure(mReader.FindElementWithTag(TLV::ContextTag(to_underlying(Tag::kAttributeStatus)), reader)); + ReturnErrorOnFailure(apAttributeStatus->Init(reader)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR AttributeReportIB::Parser::GetAttributeData(AttributeDataIB::Parser * const apAttributeData) const +{ + TLV::TLVReader reader; + ReturnErrorOnFailure(mReader.FindElementWithTag(TLV::ContextTag(to_underlying(Tag::kAttributeData)), reader)); + ReturnErrorOnFailure(apAttributeData->Init(reader)); + return CHIP_NO_ERROR; +} + +AttributeStatusIB::Builder & AttributeReportIB::Builder::CreateAttributeStatus() +{ + if (mError == CHIP_NO_ERROR) + { + mError = mAttributeStatus.Init(mpWriter, to_underlying(Tag::kAttributeStatus)); + } + return mAttributeStatus; +} + +AttributeDataIB::Builder & AttributeReportIB::Builder::CreateAttributeData() +{ + if (mError == CHIP_NO_ERROR) + { + mError = mAttributeData.Init(mpWriter, to_underlying(Tag::kAttributeData)); + } + return mAttributeData; +} + +AttributeReportIB::Builder & AttributeReportIB::Builder::EndOfAttributeReportIB() +{ + EndOfContainer(); + return *this; +} +} // namespace app +} // namespace chip diff --git a/src/app/MessageDef/AttributeReportIB.h b/src/app/MessageDef/AttributeReportIB.h new file mode 100644 index 00000000000000..d5f47183fe4d61 --- /dev/null +++ b/src/app/MessageDef/AttributeReportIB.h @@ -0,0 +1,114 @@ +/** + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "AttributeDataIB.h" +#include "AttributeStatusIB.h" +#include "StructBuilder.h" +#include "StructParser.h" + +#include +#include +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace AttributeReportIB { +enum class Tag : uint8_t +{ + kAttributeStatus = 0, + kAttributeData = 1, +}; + +class Parser : public StructParser +{ +public: +#if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK + /** + * @brief Roughly verify the message is correctly formed + * 1) all mandatory tags are present + * 2) all elements have expected data type + * 3) any tag can only appear once + * 4) At the top level of the structure, unknown tags are ignored for forward compatibility + * @note The main use of this function is to print out what we're + * receiving during protocol development and debugging. + * The encoding rule has changed in IM encoding spec so this + * check is only "roughly" conformant now. + * + * @return #CHIP_NO_ERROR on success + */ + CHIP_ERROR CheckSchemaValidity() const; +#endif + + /** + * @brief Get a TLVReader for the StatusIB. Next() must be called before accessing them. + * + * @param [in] apAttributeStatus A pointer to apAttributeStatus + * + * @return #CHIP_NO_ERROR on success + * # CHIP_ERROR_WRONG_TLV_TYPE if there is such element but it's not a structure + * #CHIP_END_OF_TLV if there is no such element + */ + CHIP_ERROR GetAttributeStatus(AttributeStatusIB::Parser * const apAttributeStatus) const; + + /** + * @brief Get a TLVReader for the AttributeDataIB. Next() must be called before accessing them. + * + * @param [in] apAttributeData A pointer to apAttributeData + * + * @return #CHIP_NO_ERROR on success + * #CHIP_ERROR_WRONG_TLV_TYPE if there is such element but it's not a AttributeData + * #CHIP_END_OF_TLV if there is no such element + */ + CHIP_ERROR GetAttributeData(AttributeDataIB::Parser * const apAttributeData) const; +}; + +class Builder : public StructBuilder +{ +public: + /** + * @brief Initialize a AttributeDataIB::Builder for writing into the TLV stream + * + * @return A reference to AttributeDataIB::Builder + */ + AttributeDataIB::Builder & CreateAttributeData(); + + /** + * @brief Initialize a StatusIB::Builder for writing into the TLV stream + * + * @return A reference to StatusIB::Builder + */ + AttributeStatusIB::Builder & CreateAttributeStatus(); + + /** + * @brief Mark the end of this AttributeReportIB + * + * @return A reference to *this + */ + AttributeReportIB::Builder & EndOfAttributeReportIB(); + +private: + AttributeStatusIB::Builder mAttributeStatus; + AttributeDataIB::Builder mAttributeData; +}; +} // namespace AttributeReportIB +} // namespace app +} // namespace chip diff --git a/src/app/MessageDef/AttributeReportIBs.cpp b/src/app/MessageDef/AttributeReportIBs.cpp new file mode 100644 index 00000000000000..cfa97ad5b0dca8 --- /dev/null +++ b/src/app/MessageDef/AttributeReportIBs.cpp @@ -0,0 +1,100 @@ +/** + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2018 Google LLC. + * Copyright (c) 2016-2017 Nest Labs, Inc. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @file + * This file defines AttributeReportIBs parser and builder in CHIP interaction model + * + */ + +#include "AttributeReportIBs.h" +#include "MessageDefHelper.h" + +#include +#include +#include + +#include + +namespace chip { +namespace app { +#if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK +CHIP_ERROR AttributeReportIBs::Parser::CheckSchemaValidity() const +{ + CHIP_ERROR err = CHIP_NO_ERROR; + size_t numAttributeReportIBs = 0; + TLV::TLVReader reader; + + PRETTY_PRINT("AttributeReportIBs ="); + PRETTY_PRINT("["); + + // make a copy of the reader + reader.Init(mReader); + + while (CHIP_NO_ERROR == (err = reader.Next())) + { + VerifyOrReturnError(TLV::AnonymousTag == reader.GetTag(), CHIP_ERROR_INVALID_TLV_TAG); + { + AttributeReportIB::Parser AttributeReport; + ReturnErrorOnFailure(AttributeReport.Init(reader)); + PRETTY_PRINT_INCDEPTH(); + ReturnErrorOnFailure(AttributeReport.CheckSchemaValidity()); + PRETTY_PRINT_DECDEPTH(); + } + + ++numAttributeReportIBs; + } + + PRETTY_PRINT("],"); + PRETTY_PRINT(""); + + // if we have exhausted this container + if (CHIP_END_OF_TLV == err) + { + // if we have at least one Attribute report + if (numAttributeReportIBs > 0) + { + err = CHIP_NO_ERROR; + } + else + { + ChipLogError(DataManagement, "PROTOCOL ERROR: Empty Attribute reports"); + err = CHIP_NO_ERROR; + } + } + ReturnErrorOnFailure(err); + ReturnErrorOnFailure(reader.ExitContainer(mOuterContainerType)); + return CHIP_NO_ERROR; +} +#endif // CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK + +AttributeReportIB::Builder & AttributeReportIBs::Builder::CreateAttributeReport() +{ + if (mError == CHIP_NO_ERROR) + { + mError = mAttributeReport.Init(mpWriter); + } + return mAttributeReport; +} + +AttributeReportIBs::Builder & AttributeReportIBs::Builder::EndOfAttributeReportIBs() +{ + EndOfContainer(); + return *this; +} +} // namespace app +} // namespace chip diff --git a/src/app/MessageDef/AttributeReportIBs.h b/src/app/MessageDef/AttributeReportIBs.h new file mode 100644 index 00000000000000..88630f722db1e4 --- /dev/null +++ b/src/app/MessageDef/AttributeReportIBs.h @@ -0,0 +1,83 @@ +/** + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2016-2017 Nest Labs, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @file + * This file defines AttributeReportIBs parser and builder in CHIP interaction model + * + */ + +#pragma once + +#include "ArrayBuilder.h" +#include "ArrayParser.h" +#include "AttributeReportIB.h" + +#include +#include +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace AttributeReportIBs { +class Parser : public ArrayParser +{ +public: +#if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK + /** + * @brief Roughly verify the message is correctly formed + * 1) all mandatory tags are present + * 2) all elements have expected data type + * 3) any tag can only appear once + * 4) At the top level of the structure, unknown tags are ignored for forward compatibility + * @note The main use of this function is to print out what we're + * receiving during protocol development and debugging. + * The encoding rule has changed in IM encoding spec so this + * check is only "roughly" conformant now. + * + * @return #CHIP_NO_ERROR on success + */ + CHIP_ERROR CheckSchemaValidity() const; +#endif +}; + +class Builder : public ArrayBuilder +{ +public: + /** + * @brief Initialize a AttributeReportIB::Builder for writing into the TLV stream + * + * @return A reference to AttributeReportIB::Builder + */ + AttributeReportIB::Builder & CreateAttributeReport(); + + /** + * @brief Mark the end of this AttributeReportIBs + * + * @return A reference to *this + */ + AttributeReportIBs::Builder & EndOfAttributeReportIBs(); + +private: + AttributeReportIB::Builder mAttributeReport; +}; +} // namespace AttributeReportIBs +} // namespace app +} // namespace chip diff --git a/src/app/MessageDef/ReadRequestMessage.cpp b/src/app/MessageDef/ReadRequestMessage.cpp index 5e979cfbc026b3..f4de6dc301d712 100644 --- a/src/app/MessageDef/ReadRequestMessage.cpp +++ b/src/app/MessageDef/ReadRequestMessage.cpp @@ -55,7 +55,7 @@ CHIP_ERROR ReadRequestMessage::Parser::CheckSchemaValidity() const CHIP_ERROR err = CHIP_NO_ERROR; uint16_t TagPresenceMask = 0; chip::TLV::TLVReader reader; - AttributePaths::Parser AttributePaths; + AttributePathIBs::Parser AttributePathIBs; EventPaths::Parser eventPathList; AttributeDataVersionList::Parser attributeDataVersionList; PRETTY_PRINT("ReadRequestMessage ="); @@ -74,11 +74,11 @@ CHIP_ERROR ReadRequestMessage::Parser::CheckSchemaValidity() const TagPresenceMask |= (1 << kCsTag_AttributePathList); VerifyOrExit(chip::TLV::kTLVType_Array == reader.GetType(), err = CHIP_ERROR_WRONG_TLV_TYPE); - AttributePaths.Init(reader); + AttributePathIBs.Init(reader); PRETTY_PRINT_INCDEPTH(); - err = AttributePaths.CheckSchemaValidity(); + err = AttributePathIBs.CheckSchemaValidity(); SuccessOrExit(err); PRETTY_PRINT_DECDEPTH(); @@ -119,11 +119,11 @@ CHIP_ERROR ReadRequestMessage::Parser::CheckSchemaValidity() const TagPresenceMask |= (1 << kCsTag_AttributePathList); VerifyOrExit(chip::TLV::kTLVType_Array == reader.GetType(), err = CHIP_ERROR_WRONG_TLV_TYPE); - AttributePaths.Init(reader); + AttributePathIBs.Init(reader); PRETTY_PRINT_INCDEPTH(); - err = AttributePaths.CheckSchemaValidity(); + err = AttributePathIBs.CheckSchemaValidity(); SuccessOrExit(err); PRETTY_PRINT_DECDEPTH(); @@ -161,7 +161,7 @@ CHIP_ERROR ReadRequestMessage::Parser::CheckSchemaValidity() const } #endif // CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK -CHIP_ERROR ReadRequestMessage::Parser::GetAttributePathList(AttributePaths::Parser * const apAttributePathList) const +CHIP_ERROR ReadRequestMessage::Parser::GetPathList(AttributePathIBs::Parser * const apAttributePathList) const { CHIP_ERROR err = CHIP_NO_ERROR; chip::TLV::TLVReader reader; @@ -229,7 +229,7 @@ CHIP_ERROR ReadRequestMessage::Builder::Init(chip::TLV::TLVWriter * const apWrit return InitAnonymousStructure(apWriter); } -AttributePaths::Builder & ReadRequestMessage::Builder::CreateAttributePathListBuilder() +AttributePathIBs::Builder & ReadRequestMessage::Builder::CreateAttributePathListBuilder() { // skip if error has already been set VerifyOrExit(CHIP_NO_ERROR == mError, mAttributePathListBuilder.ResetError(mError)); diff --git a/src/app/MessageDef/ReadRequestMessage.h b/src/app/MessageDef/ReadRequestMessage.h index de9e05ef6ab308..98d61e69c49a39 100644 --- a/src/app/MessageDef/ReadRequestMessage.h +++ b/src/app/MessageDef/ReadRequestMessage.h @@ -24,7 +24,7 @@ #pragma once #include "AttributeDataVersionList.h" -#include "AttributePaths.h" +#include "AttributePathIBs.h" #include "Builder.h" #include "EventPaths.h" @@ -77,14 +77,14 @@ class Parser : public chip::app::Parser #endif /** - * @brief Get a TLVReader for the AttributePaths. Next() must be called before accessing them. + * @brief Get a TLVReader for the AttributePathIBs. Next() must be called before accessing them. * * @param [in] apAttributePathList A pointer to an attribute path list parser. * * @return #CHIP_NO_ERROR on success * #CHIP_END_OF_TLV if there is no such element */ - CHIP_ERROR GetAttributePathList(AttributePaths::Parser * const apAttributePathList) const; + CHIP_ERROR GetPathList(AttributePathIBs::Parser * const apAttributePathList) const; /** * @brief Get a TLVReader for the EventPaths. Next() must be called before accessing them. @@ -130,11 +130,11 @@ class Builder : public chip::app::Builder CHIP_ERROR Init(chip::TLV::TLVWriter * const apWriter); /** - * @brief Initialize a AttributePaths::Builder for writing into the TLV stream + * @brief Initialize a AttributePathIBs::Builder for writing into the TLV stream * - * @return A reference to AttributePaths::Builder + * @return A reference to AttributePathIBs::Builder */ - AttributePaths::Builder & CreateAttributePathListBuilder(); + AttributePathIBs::Builder & CreateAttributePathListBuilder(); /** * @brief Initialize a EventPaths::Builder for writing into the TLV stream @@ -165,7 +165,7 @@ class Builder : public chip::app::Builder ReadRequestMessage::Builder & EndOfReadRequestMessage(); private: - AttributePaths::Builder mAttributePathListBuilder; + AttributePathIBs::Builder mAttributePathListBuilder; EventPaths::Builder mEventPathsBuilder; AttributeDataVersionList::Builder mAttributeDataVersionListBuilder; }; diff --git a/src/app/MessageDef/ReportDataMessage.cpp b/src/app/MessageDef/ReportDataMessage.cpp index db97c589287076..1ba284f0671009 100644 --- a/src/app/MessageDef/ReportDataMessage.cpp +++ b/src/app/MessageDef/ReportDataMessage.cpp @@ -42,7 +42,7 @@ CHIP_ERROR ReportDataMessage::Parser::CheckSchemaValidity() const CHIP_ERROR err = CHIP_NO_ERROR; uint16_t TagPresenceMask = 0; chip::TLV::TLVReader reader; - AttributeDataList::Parser attributeDataList; + AttributeReportIBs::Parser AttributeReportIBs; EventReports::Parser EventReports; PRETTY_PRINT("ReportDataMessage ="); @@ -83,17 +83,17 @@ CHIP_ERROR ReportDataMessage::Parser::CheckSchemaValidity() const } #endif // CHIP_DETAIL_LOGGING break; - case kCsTag_AttributeDataList: + case kCsTag_AttributeReportIBs: // check if this tag has appeared before - VerifyOrExit(!(TagPresenceMask & (1 << kCsTag_AttributeDataList)), err = CHIP_ERROR_INVALID_TLV_TAG); - TagPresenceMask |= (1 << kCsTag_AttributeDataList); + VerifyOrExit(!(TagPresenceMask & (1 << kCsTag_AttributeReportIBs)), err = CHIP_ERROR_INVALID_TLV_TAG); + TagPresenceMask |= (1 << kCsTag_AttributeReportIBs); VerifyOrExit(chip::TLV::kTLVType_Array == reader.GetType(), err = CHIP_ERROR_WRONG_TLV_TYPE); #if CHIP_DETAIL_LOGGING { - attributeDataList.Init(reader); + AttributeReportIBs.Init(reader); PRETTY_PRINT_INCDEPTH(); - err = attributeDataList.CheckSchemaValidity(); + err = AttributeReportIBs.CheckSchemaValidity(); SuccessOrExit(err); PRETTY_PRINT_DECDEPTH(); } @@ -159,17 +159,17 @@ CHIP_ERROR ReportDataMessage::Parser::GetSubscriptionId(uint64_t * const apSubsc return GetUnsignedInteger(kCsTag_SubscriptionId, apSubscriptionId); } -CHIP_ERROR ReportDataMessage::Parser::GetAttributeDataList(AttributeDataList::Parser * const apAttributeDataList) const +CHIP_ERROR ReportDataMessage::Parser::GetAttributeReportIBs(AttributeReportIBs::Parser * const apAttributeReportIBs) const { CHIP_ERROR err = CHIP_NO_ERROR; chip::TLV::TLVReader reader; - err = mReader.FindElementWithTag(chip::TLV::ContextTag(kCsTag_AttributeDataList), reader); + err = mReader.FindElementWithTag(chip::TLV::ContextTag(kCsTag_AttributeReportIBs), reader); SuccessOrExit(err); VerifyOrExit(chip::TLV::kTLVType_Array == reader.GetType(), err = CHIP_ERROR_WRONG_TLV_TYPE); - err = apAttributeDataList->Init(reader); + err = apAttributeReportIBs->Init(reader); SuccessOrExit(err); exit: @@ -222,21 +222,21 @@ ReportDataMessage::Builder & ReportDataMessage::Builder::SubscriptionId(const ui return *this; } -AttributeDataList::Builder & ReportDataMessage::Builder::CreateAttributeDataListBuilder() +AttributeReportIBs::Builder & ReportDataMessage::Builder::CreateAttributeReportIBs() { // skip if error has already been set if (mError == CHIP_NO_ERROR) { - mError = mAttributeDataListBuilder.Init(mpWriter, kCsTag_AttributeDataList); + mError = mAttributeReportIBsBuilder.Init(mpWriter, kCsTag_AttributeReportIBs); } else { - mAttributeDataListBuilder.ResetError(mError); + mAttributeReportIBsBuilder.ResetError(mError); } - return mAttributeDataListBuilder; + return mAttributeReportIBsBuilder; } -EventReports::Builder & ReportDataMessage::Builder::CreateEventReportsBuilder() +EventReports::Builder & ReportDataMessage::Builder::CreateEventReports() { // skip if error has already been set if (mError == CHIP_NO_ERROR) @@ -245,7 +245,7 @@ EventReports::Builder & ReportDataMessage::Builder::CreateEventReportsBuilder() } else { - mAttributeDataListBuilder.ResetError(mError); + mAttributeReportIBsBuilder.ResetError(mError); } return mEventReportsBuilder; } diff --git a/src/app/MessageDef/ReportDataMessage.h b/src/app/MessageDef/ReportDataMessage.h index a8050a266043fa..0bd4f8dbd45406 100644 --- a/src/app/MessageDef/ReportDataMessage.h +++ b/src/app/MessageDef/ReportDataMessage.h @@ -30,7 +30,7 @@ #include #include -#include "AttributeDataList.h" +#include "AttributeReportIBs.h" #include "EventReports.h" #include "StructBuilder.h" #include "StructParser.h" @@ -42,7 +42,7 @@ enum { kCsTag_SuppressResponse = 0, kCsTag_SubscriptionId = 1, - kCsTag_AttributeDataList = 2, + kCsTag_AttributeReportIBs = 2, kCsTag_EventReports = 3, kCsTag_MoreChunkedMessages = 4, }; @@ -91,13 +91,13 @@ class Parser : public StructParser /** * @brief Get a TLVReader for the AttributesDataList. Next() must be called before accessing them. * - * @param [in] apAttributeDataList A pointer to apAttributeDataList + * @param [in] apAttributeReportIBs A pointer to apAttributeReportIBs * * @return #CHIP_NO_ERROR on success * #CHIP_ERROR_WRONG_TLV_TYPE if there is such element but it's not a Array * #CHIP_END_OF_TLV if there is no such element */ - CHIP_ERROR GetAttributeDataList(AttributeDataList::Parser * const apAttributeDataList) const; + CHIP_ERROR GetAttributeReportIBs(AttributeReportIBs::Parser * const apAttributeReportIBs) const; /** * @brief Get a TLVReader for the EventReports. Next() must be called before accessing them. @@ -148,18 +148,18 @@ class Builder : public StructBuilder ReportDataMessage::Builder & SubscriptionId(const uint64_t aSubscriptionId); /** - * @brief Initialize a AttributeDataList::Builder for writing into the TLV stream + * @brief Initialize a AttributeReportIBs::Builder for writing into the TLV stream * - * @return A reference to AttributeDataList::Builder + * @return A reference to AttributeReportIBs::Builder */ - AttributeDataList::Builder & CreateAttributeDataListBuilder(); + AttributeReportIBs::Builder & CreateAttributeReportIBs(); /** * @brief Initialize a EventReports::Builder for writing into the TLV stream * * @return A reference to EventReports::Builder */ - EventReports::Builder & CreateEventReportsBuilder(); + EventReports::Builder & CreateEventReports(); /** * @brief This flag is set to ‘true’ when there are more chunked messages in a transaction. @@ -176,7 +176,7 @@ class Builder : public StructBuilder ReportDataMessage::Builder & EndOfReportDataMessage(); private: - AttributeDataList::Builder mAttributeDataListBuilder; + AttributeReportIBs::Builder mAttributeReportIBsBuilder; EventReports::Builder mEventReportsBuilder; }; }; // namespace ReportDataMessage diff --git a/src/app/MessageDef/SubscribeRequestMessage.cpp b/src/app/MessageDef/SubscribeRequestMessage.cpp index 75c1f5806adbbc..41756364d4ecf8 100644 --- a/src/app/MessageDef/SubscribeRequestMessage.cpp +++ b/src/app/MessageDef/SubscribeRequestMessage.cpp @@ -35,7 +35,7 @@ CHIP_ERROR SubscribeRequestMessage::Parser::CheckSchemaValidity() const CHIP_ERROR err = CHIP_NO_ERROR; uint16_t TagPresenceMask = 0; chip::TLV::TLVReader reader; - AttributePaths::Parser AttributePaths; + AttributePathIBs::Parser AttributePathIBs; EventPaths::Parser eventPathList; AttributeDataVersionList::Parser attributeDataVersionList; PRETTY_PRINT("SubscribeRequestMessage ="); @@ -54,10 +54,10 @@ CHIP_ERROR SubscribeRequestMessage::Parser::CheckSchemaValidity() const TagPresenceMask |= (1 << kCsTag_AttributePathList); VerifyOrReturnLogError(chip::TLV::kTLVType_Array == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - AttributePaths.Init(reader); + AttributePathIBs.Init(reader); PRETTY_PRINT_INCDEPTH(); - ReturnLogErrorOnFailure(AttributePaths.CheckSchemaValidity()); + ReturnLogErrorOnFailure(AttributePathIBs.CheckSchemaValidity()); PRETTY_PRINT_DECDEPTH(); break; case kCsTag_EventPaths: @@ -165,7 +165,7 @@ CHIP_ERROR SubscribeRequestMessage::Parser::CheckSchemaValidity() const } #endif // CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK -CHIP_ERROR SubscribeRequestMessage::Parser::GetAttributePathList(AttributePaths::Parser * const apAttributePathList) const +CHIP_ERROR SubscribeRequestMessage::Parser::GetPathList(AttributePathIBs::Parser * const apAttributePathList) const { TLV::TLVReader reader; ReturnLogErrorOnFailure(mReader.FindElementWithTag(chip::TLV::ContextTag(kCsTag_AttributePathList), reader)); @@ -221,7 +221,7 @@ CHIP_ERROR SubscribeRequestMessage::Builder::Init(chip::TLV::TLVWriter * const a return InitAnonymousStructure(apWriter); } -AttributePaths::Builder & SubscribeRequestMessage::Builder::CreateAttributePathListBuilder() +AttributePathIBs::Builder & SubscribeRequestMessage::Builder::CreateAttributePathListBuilder() { if (mError == CHIP_NO_ERROR) { diff --git a/src/app/MessageDef/SubscribeRequestMessage.h b/src/app/MessageDef/SubscribeRequestMessage.h index c1271dfb3840a9..c2536b5bd913ff 100644 --- a/src/app/MessageDef/SubscribeRequestMessage.h +++ b/src/app/MessageDef/SubscribeRequestMessage.h @@ -18,7 +18,7 @@ #pragma once #include "AttributeDataVersionList.h" -#include "AttributePaths.h" +#include "AttributePathIBs.h" #include "Builder.h" #include "EventPaths.h" #include "Parser.h" @@ -67,12 +67,12 @@ class Parser : public chip::app::Parser #endif /** - * @brief Get a TLVReader for the AttributePaths. Next() must be called before accessing them. + * @brief Get a TLVReader for the AttributePathIBs. Next() must be called before accessing them. * * @return #CHIP_NO_ERROR on success * #CHIP_END_OF_TLV if there is no such element */ - CHIP_ERROR GetAttributePathList(AttributePaths::Parser * const apAttributePathList) const; + CHIP_ERROR GetPathList(AttributePathIBs::Parser * const apAttributePathList) const; /** * @brief Get a TLVReader for the EventPaths. Next() must be called before accessing them. @@ -133,7 +133,7 @@ class Builder : public chip::app::Builder public: CHIP_ERROR Init(chip::TLV::TLVWriter * const apWriter); - AttributePaths::Builder & CreateAttributePathListBuilder(); + AttributePathIBs::Builder & CreateAttributePathListBuilder(); /** * @brief Initialize a EventPaths::Builder for writing into the TLV stream @@ -174,7 +174,7 @@ class Builder : public chip::app::Builder SubscribeRequestMessage::Builder & EndOfSubscribeRequestMessage(); private: - AttributePaths::Builder mAttributePathListBuilder; + AttributePathIBs::Builder mAttributePathListBuilder; EventPaths::Builder mEventPathsBuilder; AttributeDataVersionList::Builder mAttributeDataVersionListBuilder; }; diff --git a/src/app/MessageDef/WriteRequestMessage.cpp b/src/app/MessageDef/WriteRequestMessage.cpp index 487ead32ec471f..c45f3005277acd 100644 --- a/src/app/MessageDef/WriteRequestMessage.cpp +++ b/src/app/MessageDef/WriteRequestMessage.cpp @@ -54,7 +54,7 @@ CHIP_ERROR WriteRequestMessage::Parser::CheckSchemaValidity() const CHIP_ERROR err = CHIP_NO_ERROR; uint16_t TagPresenceMask = 0; chip::TLV::TLVReader reader; - AttributeDataList::Parser attributeDataList; + AttributeDataIBs::Parser AttributeDataIBs; AttributeDataVersionList::Parser attributeDataVersionList; PRETTY_PRINT("WriteRequestMessage ="); PRETTY_PRINT("{"); @@ -80,16 +80,16 @@ CHIP_ERROR WriteRequestMessage::Parser::CheckSchemaValidity() const } #endif // CHIP_DETAIL_LOGGING break; - case kCsTag_AttributeDataList: - VerifyOrExit(!(TagPresenceMask & (1 << kCsTag_AttributeDataList)), err = CHIP_ERROR_INVALID_TLV_TAG); - TagPresenceMask |= (1 << kCsTag_AttributeDataList); + case kCsTag_AttributeDataIBs: + VerifyOrExit(!(TagPresenceMask & (1 << kCsTag_AttributeDataIBs)), err = CHIP_ERROR_INVALID_TLV_TAG); + TagPresenceMask |= (1 << kCsTag_AttributeDataIBs); VerifyOrExit(chip::TLV::kTLVType_Array == reader.GetType(), err = CHIP_ERROR_WRONG_TLV_TYPE); - attributeDataList.Init(reader); + AttributeDataIBs.Init(reader); PRETTY_PRINT_INCDEPTH(); - err = attributeDataList.CheckSchemaValidity(); + err = AttributeDataIBs.CheckSchemaValidity(); SuccessOrExit(err); PRETTY_PRINT_DECDEPTH(); @@ -146,17 +146,17 @@ CHIP_ERROR WriteRequestMessage::Parser::GetSuppressResponse(bool * const apSuppr return GetSimpleValue(kCsTag_SuppressResponse, chip::TLV::kTLVType_Boolean, apSuppressResponse); } -CHIP_ERROR WriteRequestMessage::Parser::GetAttributeDataList(AttributeDataList::Parser * const apAttributeDataList) const +CHIP_ERROR WriteRequestMessage::Parser::GetAttributeReportIBs(AttributeDataIBs::Parser * const apAttributeDataIBs) const { CHIP_ERROR err = CHIP_NO_ERROR; chip::TLV::TLVReader reader; - err = mReader.FindElementWithTag(chip::TLV::ContextTag(kCsTag_AttributeDataList), reader); + err = mReader.FindElementWithTag(chip::TLV::ContextTag(kCsTag_AttributeDataIBs), reader); SuccessOrExit(err); VerifyOrExit(chip::TLV::kTLVType_Array == reader.GetType(), err = CHIP_ERROR_WRONG_TLV_TYPE); - err = apAttributeDataList->Init(reader); + err = apAttributeDataIBs->Init(reader); SuccessOrExit(err); exit: @@ -205,19 +205,19 @@ WriteRequestMessage::Builder & WriteRequestMessage::Builder::SuppressResponse(co return *this; } -AttributeDataList::Builder & WriteRequestMessage::Builder::CreateAttributeDataListBuilder() +AttributeDataIBs::Builder & WriteRequestMessage::Builder::CreateAttributeDataIBsBuilder() { // skip if error has already been set if (mError == CHIP_NO_ERROR) { - mError = mAttributeDataListBuilder.Init(mpWriter, kCsTag_AttributeDataList); + mError = mAttributeDataIBsBuilder.Init(mpWriter, kCsTag_AttributeDataIBs); } else { - mAttributeDataListBuilder.ResetError(mError); + mAttributeDataIBsBuilder.ResetError(mError); } - return mAttributeDataListBuilder; + return mAttributeDataIBsBuilder; } AttributeDataVersionList::Builder & WriteRequestMessage::Builder::CreateAttributeDataVersionListBuilder() @@ -244,9 +244,9 @@ WriteRequestMessage::Builder & WriteRequestMessage::Builder::MoreChunkedMessages return *this; } -AttributeDataList::Builder & WriteRequestMessage::Builder::GetAttributeDataListBuilder() +AttributeDataIBs::Builder & WriteRequestMessage::Builder::GetAttributeReportIBsBuilder() { - return mAttributeDataListBuilder; + return mAttributeDataIBsBuilder; } WriteRequestMessage::Builder & WriteRequestMessage::Builder::EndOfWriteRequestMessage() diff --git a/src/app/MessageDef/WriteRequestMessage.h b/src/app/MessageDef/WriteRequestMessage.h index 118dbb8bdb868d..8636b3579ffc8c 100644 --- a/src/app/MessageDef/WriteRequestMessage.h +++ b/src/app/MessageDef/WriteRequestMessage.h @@ -22,7 +22,7 @@ #pragma once -#include "AttributeDataList.h" +#include "AttributeDataIBs.h" #include "AttributeDataVersionList.h" #include "Builder.h" #include "Parser.h" @@ -38,7 +38,7 @@ namespace WriteRequestMessage { enum { kCsTag_SuppressResponse = 0, - kCsTag_AttributeDataList = 1, + kCsTag_AttributeDataIBs = 1, kCsTag_AttributeDataVersionList = 2, kCsTag_MoreChunkedMessages = 3, }; @@ -79,14 +79,14 @@ class Parser : public chip::app::Parser CHIP_ERROR GetSuppressResponse(bool * const apSuppressResponse) const; /** - * @brief Get a TLVReader for the AttributePaths. Next() must be called before accessing them. + * @brief Get a TLVReader for the AttributePathIBs. Next() must be called before accessing them. * - * @param [in] apAttributeDataList A pointer to apAttributeDataList + * @param [in] apAttributeDataIBs A pointer to apAttributeDataIBs * * @return #CHIP_NO_ERROR on success * #CHIP_END_OF_TLV if there is no such element */ - CHIP_ERROR GetAttributeDataList(AttributeDataList::Parser * const apAttributeDataList) const; + CHIP_ERROR GetAttributeReportIBs(AttributeDataIBs::Parser * const apAttributeDataIBs) const; /** * @brief Get a TLVReader for the AttributeDataVersionList. Next() must be called before accessing them. @@ -129,11 +129,11 @@ class Builder : public chip::app::Builder WriteRequestMessage::Builder & SuppressResponse(const bool aSuppressResponse); /** - * @brief Initialize a AttributeDataList::Builder for writing into the TLV stream + * @brief Initialize a AttributeDataIBs::Builder for writing into the TLV stream * - * @return A reference to AttributeDataList::Builder + * @return A reference to AttributeDataIBs::Builder */ - AttributeDataList::Builder & CreateAttributeDataListBuilder(); + AttributeDataIBs::Builder & CreateAttributeDataIBsBuilder(); /** * @brief Initialize a AttributeDataVersionList::Builder for writing into the TLV stream @@ -143,13 +143,13 @@ class Builder : public chip::app::Builder AttributeDataVersionList::Builder & CreateAttributeDataVersionListBuilder(); /** - * @brief Set True if the set of AttributeDataElements have to be sent across multiple packets in a single transaction + * @brief Set True if the set of AttributeDataIBs have to be sent across multiple packets in a single transaction * @param [in] aMoreChunkedMessages true if more chunked messaged is needed * @return A reference to *this */ WriteRequestMessage::Builder & MoreChunkedMessages(const bool aMoreChunkedMessages); - AttributeDataList::Builder & GetAttributeDataListBuilder(); + AttributeDataIBs::Builder & GetAttributeReportIBsBuilder(); /** * @brief Mark the end of this WriteRequestMessage @@ -159,7 +159,7 @@ class Builder : public chip::app::Builder WriteRequestMessage::Builder & EndOfWriteRequestMessage(); private: - AttributeDataList::Builder mAttributeDataListBuilder; + AttributeDataIBs::Builder mAttributeDataIBsBuilder; AttributeDataVersionList::Builder mAttributeDataVersionListBuilder; }; }; // namespace WriteRequestMessage diff --git a/src/app/ReadClient.cpp b/src/app/ReadClient.cpp index 0da0aa8d85dccf..c57c3417331ec4 100644 --- a/src/app/ReadClient.cpp +++ b/src/app/ReadClient.cpp @@ -152,7 +152,7 @@ CHIP_ERROR ReadClient::SendReadRequest(ReadPrepareParams & aReadPrepareParams) if (aReadPrepareParams.mAttributePathParamsListSize != 0 && aReadPrepareParams.mpAttributePathParamsList != nullptr) { - AttributePaths::Builder attributePathListBuilder = request.CreateAttributePathListBuilder(); + AttributePathIBs::Builder attributePathListBuilder = request.CreateAttributePathListBuilder(); SuccessOrExit(err = attributePathListBuilder.GetError()); err = GenerateAttributePathList(attributePathListBuilder, aReadPrepareParams.mpAttributePathParamsList, aReadPrepareParams.mAttributePathParamsListSize); @@ -253,17 +253,17 @@ CHIP_ERROR ReadClient::GenerateEventPaths(EventPaths::Builder & aEventPathsBuild return err; } -CHIP_ERROR ReadClient::GenerateAttributePathList(AttributePaths::Builder & aAttributePathListBuilder, +CHIP_ERROR ReadClient::GenerateAttributePathList(AttributePathIBs::Builder & aAttributePathIBsBuilder, AttributePathParams * apAttributePathParamsList, size_t aAttributePathParamsListSize) { for (size_t index = 0; index < aAttributePathParamsListSize; index++) { VerifyOrReturnError(apAttributePathParamsList[index].IsValidAttributePath(), CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH); - ReturnErrorOnFailure(apAttributePathParamsList[index].BuildAttributePath(aAttributePathListBuilder.CreateAttributePath())); + ReturnErrorOnFailure(apAttributePathParamsList[index].BuildAttributePath(aAttributePathIBsBuilder.CreateAttributePath())); } - aAttributePathListBuilder.EndOfAttributePaths(); - return aAttributePathListBuilder.GetError(); + aAttributePathIBsBuilder.EndOfAttributePathIBs(); + return aAttributePathIBsBuilder.GetError(); } CHIP_ERROR ReadClient::OnMessageReceived(Messaging::ExchangeContext * apExchangeContext, const PayloadHeader & aPayloadHeader, @@ -329,13 +329,13 @@ CHIP_ERROR ReadClient::ProcessReportData(System::PacketBufferHandle && aPayload) CHIP_ERROR err = CHIP_NO_ERROR; ReportDataMessage::Parser report; - bool isEventReportsPresent = false; - bool isAttributeDataListPresent = false; - bool suppressResponse = false; - bool moreChunkedMessages = false; - uint64_t subscriptionId = 0; + bool isEventReportsPresent = false; + bool isAttributeReportIBsPresent = false; + bool suppressResponse = false; + bool moreChunkedMessages = false; + uint64_t subscriptionId = 0; EventReports::Parser EventReports; - AttributeDataList::Parser attributeDataList; + AttributeReportIBs::Parser attributeReportIBs; System::PacketBufferTLVReader reader; reader.Init(std::move(aPayload)); @@ -400,22 +400,21 @@ CHIP_ERROR ReadClient::ProcessReportData(System::PacketBufferHandle && aPayload) { chip::TLV::TLVReader EventReportsReader; EventReports.GetReader(&EventReportsReader); - ChipLogProgress(DataManagement, "on event data is called!!!!!!!!!!!!!"); mpCallback->OnEventData(this, EventReportsReader); } - err = report.GetAttributeDataList(&attributeDataList); - isAttributeDataListPresent = (err == CHIP_NO_ERROR); + err = report.GetAttributeReportIBs(&attributeReportIBs); + isAttributeReportIBsPresent = (err == CHIP_NO_ERROR); if (err == CHIP_END_OF_TLV) { err = CHIP_NO_ERROR; } SuccessOrExit(err); - if (isAttributeDataListPresent && nullptr != mpCallback && !moreChunkedMessages) + if (isAttributeReportIBsPresent && nullptr != mpCallback && !moreChunkedMessages) { - chip::TLV::TLVReader attributeDataListReader; - attributeDataList.GetReader(&attributeDataListReader); - err = ProcessAttributeDataList(attributeDataListReader); + TLV::TLVReader attributeReportIBsReader; + attributeReportIBs.GetReader(&attributeReportIBsReader); + err = ProcessAttributeReportIBs(attributeReportIBsReader); SuccessOrExit(err); } @@ -442,78 +441,79 @@ void ReadClient::OnResponseTimeout(Messaging::ExchangeContext * apExchangeContex ShutdownInternal(CHIP_ERROR_TIMEOUT); } -CHIP_ERROR ReadClient::ProcessAttributeDataList(TLV::TLVReader & aAttributeDataListReader) +CHIP_ERROR ReadClient::ProcessAttributePath(AttributePathIB::Parser & aAttributePath, ClusterInfo & aClusterInfo) { - CHIP_ERROR err = CHIP_NO_ERROR; - while (CHIP_NO_ERROR == (err = aAttributeDataListReader.Next())) + CHIP_ERROR err = aAttributePath.GetNode(&(aClusterInfo.mNodeId)); + if (err == CHIP_END_OF_TLV) { - chip::TLV::TLVReader dataReader; - AttributeDataElement::Parser element; - AttributePathIB::Parser attributePathParser; - ClusterInfo clusterInfo; - uint16_t statusU16 = 0; - auto status = Protocols::InteractionModel::Status::Success; - - TLV::TLVReader reader = aAttributeDataListReader; - err = element.Init(reader); - SuccessOrExit(err); - - err = element.GetAttributePath(&attributePathParser); - VerifyOrExit(err == CHIP_NO_ERROR, err = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH); - - // We are using the feature that the parser won't touch the value if the field does not exist, since all fields in the - // cluster info will be invalid / wildcard, it is safe ignore CHIP_END_OF_TLV directly. - - err = attributePathParser.GetNode(&(clusterInfo.mNodeId)); - if (err == CHIP_END_OF_TLV) - { - err = CHIP_NO_ERROR; - } - VerifyOrExit(err == CHIP_NO_ERROR, err = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH); + err = CHIP_NO_ERROR; + } + VerifyOrReturnError(err == CHIP_NO_ERROR, err = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH); - // The ReportData must contain a concrete attribute path + // The ReportData must contain a concrete attribute path + err = aAttributePath.GetEndpoint(&(aClusterInfo.mEndpointId)); + VerifyOrReturnError(err == CHIP_NO_ERROR, CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH); - err = attributePathParser.GetEndpoint(&(clusterInfo.mEndpointId)); - VerifyOrExit(err == CHIP_NO_ERROR, err = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH); + err = aAttributePath.GetCluster(&(aClusterInfo.mClusterId)); + VerifyOrReturnError(err == CHIP_NO_ERROR, CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH); - err = attributePathParser.GetCluster(&(clusterInfo.mClusterId)); - VerifyOrExit(err == CHIP_NO_ERROR, err = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH); + err = aAttributePath.GetAttribute(&(aClusterInfo.mAttributeId)); + VerifyOrReturnError(err == CHIP_NO_ERROR, CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH); - err = attributePathParser.GetAttribute(&(clusterInfo.mFieldId)); - VerifyOrExit(err == CHIP_NO_ERROR, err = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH); + err = aAttributePath.GetListIndex(&(aClusterInfo.mListIndex)); + if (CHIP_END_OF_TLV == err) + { + err = CHIP_NO_ERROR; + } + VerifyOrReturnError(err == CHIP_NO_ERROR, CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH); + VerifyOrReturnError(aClusterInfo.IsValidAttributePath(), CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH); + return CHIP_NO_ERROR; +} - err = attributePathParser.GetListIndex(&(clusterInfo.mListIndex)); - if (CHIP_END_OF_TLV == err) - { - err = CHIP_NO_ERROR; - } - VerifyOrExit(err == CHIP_NO_ERROR, err = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH); +CHIP_ERROR ReadClient::ProcessAttributeReportIBs(TLV::TLVReader & aAttributeReportIBsReader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + while (CHIP_NO_ERROR == (err = aAttributeReportIBsReader.Next())) + { + TLV::TLVReader dataReader; + AttributeReportIB::Parser report; + AttributeDataIB::Parser data; + AttributeStatusIB::Parser status; + AttributePathIB::Parser path; + ClusterInfo clusterInfo; + StatusIB statusIB; - VerifyOrExit(clusterInfo.IsValidAttributePath(), err = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH); + TLV::TLVReader reader = aAttributeReportIBsReader; + ReturnErrorOnFailure(report.Init(reader)); - err = element.GetData(&dataReader); - if (err == CHIP_END_OF_TLV) + err = report.GetAttributeStatus(&status); + if (CHIP_NO_ERROR == err) { - // The spec requires that one of data or status code must exist, thus failure to read data and status code means we - // received malformed data from server. - SuccessOrExit(err = element.GetStatus(&statusU16)); - status = static_cast(statusU16); + StatusIB::Parser errorStatus; + ReturnErrorOnFailure(status.GetPath(&path)); + ReturnErrorOnFailure(ProcessAttributePath(path, clusterInfo)); + ReturnErrorOnFailure(status.GetErrorStatus(&errorStatus)); + ReturnErrorOnFailure(errorStatus.DecodeStatusIB(statusIB)); + mpCallback->OnAttributeData( + this, ConcreteAttributePath(clusterInfo.mEndpointId, clusterInfo.mClusterId, clusterInfo.mAttributeId), nullptr, + statusIB); } - else if (err != CHIP_NO_ERROR) + else if (CHIP_END_OF_TLV == err) { - ExitNow(); + ReturnErrorOnFailure(report.GetAttributeData(&data)); + ReturnErrorOnFailure(data.GetPath(&path)); + ReturnErrorOnFailure(ProcessAttributePath(path, clusterInfo)); + ReturnErrorOnFailure(data.GetData(&dataReader)); + mpCallback->OnAttributeData( + this, ConcreteAttributePath(clusterInfo.mEndpointId, clusterInfo.mClusterId, clusterInfo.mAttributeId), &dataReader, + statusIB); } - mpCallback->OnAttributeData( - this, ConcreteAttributePath(clusterInfo.mEndpointId, clusterInfo.mClusterId, clusterInfo.mFieldId), - status == Protocols::InteractionModel::Status::Success ? &dataReader : nullptr, StatusIB(status)); } if (CHIP_END_OF_TLV == err) { err = CHIP_NO_ERROR; } - -exit: return err; } @@ -617,7 +617,7 @@ CHIP_ERROR ReadClient::SendSubscribeRequest(ReadPrepareParams & aReadPreparePara if (aReadPrepareParams.mAttributePathParamsListSize != 0 && aReadPrepareParams.mpAttributePathParamsList != nullptr) { - AttributePaths::Builder & attributePathListBuilder = request.CreateAttributePathListBuilder(); + AttributePathIBs::Builder & attributePathListBuilder = request.CreateAttributePathListBuilder(); SuccessOrExit(err = attributePathListBuilder.GetError()); err = GenerateAttributePathList(attributePathListBuilder, aReadPrepareParams.mpAttributePathParamsList, aReadPrepareParams.mAttributePathParamsListSize); diff --git a/src/app/ReadClient.h b/src/app/ReadClient.h index 99eed71c330fe4..bdfba725964cda 100644 --- a/src/app/ReadClient.h +++ b/src/app/ReadClient.h @@ -240,9 +240,9 @@ class ReadClient : public Messaging::ExchangeDelegate CHIP_ERROR GenerateEventPaths(EventPaths::Builder & aEventPathsBuilder, EventPathParams * apEventPathParamsList, size_t aEventPathParamsListSize); - CHIP_ERROR GenerateAttributePathList(AttributePaths::Builder & aAttributeathListBuilder, + CHIP_ERROR GenerateAttributePathList(AttributePathIBs::Builder & aAttributePathIBsBuilder, AttributePathParams * apAttributePathParamsList, size_t aAttributePathParamsListSize); - CHIP_ERROR ProcessAttributeDataList(TLV::TLVReader & aAttributeDataListReader); + CHIP_ERROR ProcessAttributeReportIBs(TLV::TLVReader & aAttributeDataIBsReader); void ClearExchangeContext() { mpExchangeCtx = nullptr; } static void OnLivenessTimeoutCallback(System::Layer * apSystemLayer, void * apAppState); @@ -250,6 +250,7 @@ class ReadClient : public Messaging::ExchangeDelegate CHIP_ERROR RefreshLivenessCheckTimer(); void CancelLivenessCheckTimer(); void MoveToState(const ClientState aTargetState); + CHIP_ERROR ProcessAttributePath(AttributePathIB::Parser & aAttributePath, ClusterInfo & aClusterInfo); CHIP_ERROR ProcessReportData(System::PacketBufferHandle && aPayload); CHIP_ERROR AbortExistingExchangeContext(); const char * GetStateStr() const; diff --git a/src/app/ReadHandler.cpp b/src/app/ReadHandler.cpp index 5913aa29d1c76a..506f6a8e28eeb1 100644 --- a/src/app/ReadHandler.cpp +++ b/src/app/ReadHandler.cpp @@ -259,7 +259,7 @@ CHIP_ERROR ReadHandler::ProcessReadRequest(System::PacketBufferHandle && aPayloa ReadRequestMessage::Parser readRequestParser; EventPaths::Parser eventPathListParser; - AttributePaths::Parser attributePathListParser; + AttributePathIBs::Parser attributePathListParser; reader.Init(std::move(aPayload)); @@ -273,7 +273,7 @@ CHIP_ERROR ReadHandler::ProcessReadRequest(System::PacketBufferHandle && aPayloa SuccessOrExit(err); #endif - err = readRequestParser.GetAttributePathList(&attributePathListParser); + err = readRequestParser.GetPathList(&attributePathListParser); if (err == CHIP_END_OF_TLV) { err = CHIP_NO_ERROR; @@ -321,7 +321,7 @@ CHIP_ERROR ReadHandler::ProcessReadRequest(System::PacketBufferHandle && aPayloa return err; } -CHIP_ERROR ReadHandler::ProcessAttributePathList(AttributePaths::Parser & aAttributePathListParser) +CHIP_ERROR ReadHandler::ProcessAttributePathList(AttributePathIBs::Parser & aAttributePathListParser) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVReader reader; @@ -351,7 +351,7 @@ CHIP_ERROR ReadHandler::ProcessAttributePathList(AttributePaths::Parser & aAttri } SuccessOrExit(err); - err = path.GetAttribute(&(clusterInfo.mFieldId)); + err = path.GetAttribute(&(clusterInfo.mAttributeId)); if (CHIP_END_OF_TLV == err) { err = CHIP_NO_ERROR; @@ -538,8 +538,8 @@ CHIP_ERROR ReadHandler::ProcessSubscribeRequest(System::PacketBufferHandle && aP ReturnLogErrorOnFailure(subscribeRequestParser.CheckSchemaValidity()); #endif - AttributePaths::Parser attributePathListParser; - CHIP_ERROR err = subscribeRequestParser.GetAttributePathList(&attributePathListParser); + AttributePathIBs::Parser attributePathListParser; + CHIP_ERROR err = subscribeRequestParser.GetPathList(&attributePathListParser); if (err == CHIP_END_OF_TLV) { err = CHIP_NO_ERROR; diff --git a/src/app/ReadHandler.h b/src/app/ReadHandler.h index 9e1b276dc32779..6fb333d4663cd4 100644 --- a/src/app/ReadHandler.h +++ b/src/app/ReadHandler.h @@ -152,7 +152,7 @@ class ReadHandler : public Messaging::ExchangeDelegate CHIP_ERROR SendSubscribeResponse(); CHIP_ERROR ProcessSubscribeRequest(System::PacketBufferHandle && aPayload); CHIP_ERROR ProcessReadRequest(System::PacketBufferHandle && aPayload); - CHIP_ERROR ProcessAttributePathList(AttributePaths::Parser & aAttributePathListParser); + CHIP_ERROR ProcessAttributePathList(AttributePathIBs::Parser & aAttributePathListParser); CHIP_ERROR ProcessEventPaths(EventPaths::Parser & aEventPathsParser); CHIP_ERROR OnStatusResponse(Messaging::ExchangeContext * apExchangeContext, System::PacketBufferHandle && aPayload); CHIP_ERROR OnMessageReceived(Messaging::ExchangeContext * apExchangeContext, const PayloadHeader & aPayloadHeader, diff --git a/src/app/WriteClient.cpp b/src/app/WriteClient.cpp index b29be41cc12b70..211d8db96214c0 100644 --- a/src/app/WriteClient.cpp +++ b/src/app/WriteClient.cpp @@ -36,7 +36,7 @@ CHIP_ERROR WriteClient::Init(Messaging::ExchangeManager * apExchangeMgr, Callbac VerifyOrReturnError(mpExchangeMgr == nullptr, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(mpExchangeCtx == nullptr, CHIP_ERROR_INCORRECT_STATE); - AttributeDataList::Builder attributeDataListBuilder; + AttributeDataIBs::Builder AttributeDataIBsBuilder; System::PacketBufferHandle packet = System::PacketBufferHandle::New(chip::app::kMaxSecureSduLengthBytes); VerifyOrReturnError(!packet.IsNull(), CHIP_ERROR_NO_MEMORY); @@ -44,8 +44,8 @@ CHIP_ERROR WriteClient::Init(Messaging::ExchangeManager * apExchangeMgr, Callbac ReturnErrorOnFailure(mWriteRequestBuilder.Init(&mMessageWriter)); - attributeDataListBuilder = mWriteRequestBuilder.CreateAttributeDataListBuilder(); - ReturnErrorOnFailure(attributeDataListBuilder.GetError()); + AttributeDataIBsBuilder = mWriteRequestBuilder.CreateAttributeDataIBsBuilder(); + ReturnErrorOnFailure(AttributeDataIBsBuilder.GetError()); ClearExistingExchangeContext(); mpExchangeMgr = apExchangeMgr; @@ -137,10 +137,9 @@ CHIP_ERROR WriteClient::PrepareAttribute(const AttributePathParams & attributePa { CHIP_ERROR err = CHIP_NO_ERROR; - AttributeDataElement::Builder attributeDataElement = - mWriteRequestBuilder.GetAttributeDataListBuilder().CreateAttributeDataElementBuilder(); - SuccessOrExit(attributeDataElement.GetError()); - err = ConstructAttributePath(attributePathParams, attributeDataElement); + AttributeDataIB::Builder AttributeDataIB = mWriteRequestBuilder.GetAttributeReportIBsBuilder().CreateAttributeDataIBBuilder(); + SuccessOrExit(AttributeDataIB.GetError()); + err = ConstructAttributePath(attributePathParams, AttributeDataIB); exit: return err; @@ -150,40 +149,39 @@ CHIP_ERROR WriteClient::FinishAttribute() { CHIP_ERROR err = CHIP_NO_ERROR; - AttributeDataElement::Builder attributeDataElement = - mWriteRequestBuilder.GetAttributeDataListBuilder().GetAttributeDataElementBuilder(); + AttributeDataIB::Builder AttributeDataIB = mWriteRequestBuilder.GetAttributeReportIBsBuilder().GetAttributeDataIBBuilder(); // TODO: Add attribute version support - attributeDataElement.DataVersion(0); - attributeDataElement.EndOfAttributeDataElement(); - SuccessOrExit(err = attributeDataElement.GetError()); + AttributeDataIB.DataVersion(0); + AttributeDataIB.EndOfAttributeDataIB(); + SuccessOrExit(err = AttributeDataIB.GetError()); MoveToState(State::AddAttribute); exit: return err; } -TLV::TLVWriter * WriteClient::GetAttributeDataElementTLVWriter() +TLV::TLVWriter * WriteClient::GetAttributeDataIBTLVWriter() { - return mWriteRequestBuilder.GetAttributeDataListBuilder().GetAttributeDataElementBuilder().GetWriter(); + return mWriteRequestBuilder.GetAttributeReportIBsBuilder().GetAttributeDataIBBuilder().GetWriter(); } CHIP_ERROR WriteClient::ConstructAttributePath(const AttributePathParams & aAttributePathParams, - AttributeDataElement::Builder aAttributeDataElement) + AttributeDataIB::Builder aAttributeDataIB) { // We do not support wildcard write now, reject them on client side. VerifyOrReturnError(!aAttributePathParams.HasWildcard() && aAttributePathParams.IsValidAttributePath(), CHIP_ERROR_INVALID_PATH_LIST); - return aAttributePathParams.BuildAttributePath(aAttributeDataElement.CreateAttributePath()); + return aAttributePathParams.BuildAttributePath(aAttributeDataIB.CreatePath()); } CHIP_ERROR WriteClient::FinalizeMessage(System::PacketBufferHandle & aPacket) { CHIP_ERROR err = CHIP_NO_ERROR; - AttributeDataList::Builder attributeDataListBuilder; + AttributeDataIBs::Builder AttributeDataIBsBuilder; VerifyOrExit(mState == State::AddAttribute, err = CHIP_ERROR_INCORRECT_STATE); - attributeDataListBuilder = mWriteRequestBuilder.GetAttributeDataListBuilder().EndOfAttributeDataList(); - err = attributeDataListBuilder.GetError(); + AttributeDataIBsBuilder = mWriteRequestBuilder.GetAttributeReportIBsBuilder().EndOfAttributeDataIBs(); + err = AttributeDataIBsBuilder.GetError(); SuccessOrExit(err); mWriteRequestBuilder.EndOfWriteRequestMessage(); @@ -319,7 +317,7 @@ CHIP_ERROR WriteClient::ProcessAttributeStatusIB(AttributeStatusIB::Parser & aAt SuccessOrExit(err); err = attributePath.GetEndpoint(&(attributePathParams.mEndpointId)); SuccessOrExit(err); - err = attributePath.GetAttribute(&(attributePathParams.mFieldId)); + err = attributePath.GetAttribute(&(attributePathParams.mAttributeId)); SuccessOrExit(err); err = attributePath.GetListIndex(&(attributePathParams.mListIndex)); if (err == CHIP_END_OF_TLV) @@ -339,7 +337,7 @@ CHIP_ERROR WriteClient::ProcessAttributeStatusIB(AttributeStatusIB::Parser & aAt if (mpCallback != nullptr) { ConcreteAttributePath path(attributePathParams.mEndpointId, attributePathParams.mClusterId, - attributePathParams.mFieldId); + attributePathParams.mAttributeId); mpCallback->OnResponse(this, path, statusIB); } } diff --git a/src/app/WriteClient.h b/src/app/WriteClient.h index 7629bb682522a7..050aef4b558a38 100644 --- a/src/app/WriteClient.h +++ b/src/app/WriteClient.h @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include @@ -111,7 +111,7 @@ class WriteClient : public Messaging::ExchangeDelegate CHIP_ERROR PrepareAttribute(const AttributePathParams & attributePathParams); CHIP_ERROR FinishAttribute(); - TLV::TLVWriter * GetAttributeDataElementTLVWriter(); + TLV::TLVWriter * GetAttributeDataIBTLVWriter(); NodeId GetSourceNodeId() const { @@ -174,8 +174,7 @@ class WriteClient : public Messaging::ExchangeDelegate void MoveToState(const State aTargetState); CHIP_ERROR ProcessWriteResponseMessage(System::PacketBufferHandle && payload); CHIP_ERROR ProcessAttributeStatusIB(AttributeStatusIB::Parser & aAttributeStatusIB); - CHIP_ERROR ConstructAttributePath(const AttributePathParams & aAttributePathParams, - AttributeDataElement::Builder aAttributeDataElement); + CHIP_ERROR ConstructAttributePath(const AttributePathParams & aAttributePathParams, AttributeDataIB::Builder aAttributeDataIB); void ClearExistingExchangeContext(); const char * GetStateStr() const; void ClearState(); @@ -238,9 +237,9 @@ class WriteClientHandle VerifyOrReturnError(mpWriteClient != nullptr, CHIP_ERROR_INCORRECT_STATE); ReturnErrorOnFailure(mpWriteClient->PrepareAttribute(attributePath)); - VerifyOrReturnError((writer = mpWriteClient->GetAttributeDataElementTLVWriter()) != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError((writer = mpWriteClient->GetAttributeDataIBTLVWriter()) != nullptr, CHIP_ERROR_INCORRECT_STATE); ReturnErrorOnFailure( - DataModel::Encode(*writer, chip::TLV::ContextTag(chip::app::AttributeDataElement::kCsTag_Data), value)); + DataModel::Encode(*writer, chip::TLV::ContextTag(to_underlying(chip::app::AttributeDataIB::Tag::kData)), value)); ReturnErrorOnFailure(mpWriteClient->FinishAttribute()); return CHIP_NO_ERROR; diff --git a/src/app/WriteHandler.cpp b/src/app/WriteHandler.cpp index 66f5db87ceb668..200946f9a18d11 100644 --- a/src/app/WriteHandler.cpp +++ b/src/app/WriteHandler.cpp @@ -107,20 +107,20 @@ CHIP_ERROR WriteHandler::SendWriteResponse() return err; } -CHIP_ERROR WriteHandler::ProcessAttributeDataList(TLV::TLVReader & aAttributeDataListReader) +CHIP_ERROR WriteHandler::ProcessAttributeDataIBs(TLV::TLVReader & aAttributeDataIBsReader) { CHIP_ERROR err = CHIP_NO_ERROR; - while (CHIP_NO_ERROR == (err = aAttributeDataListReader.Next())) + while (CHIP_NO_ERROR == (err = aAttributeDataIBsReader.Next())) { chip::TLV::TLVReader dataReader; - AttributeDataElement::Parser element; + AttributeDataIB::Parser element; AttributePathIB::Parser attributePath; ClusterInfo clusterInfo; - TLV::TLVReader reader = aAttributeDataListReader; + TLV::TLVReader reader = aAttributeDataIBsReader; err = element.Init(reader); SuccessOrExit(err); - err = element.GetAttributePath(&attributePath); + err = element.GetPath(&attributePath); SuccessOrExit(err); // We are using the feature that the parser won't touch the value if the field does not exist, since all fields in the @@ -138,7 +138,7 @@ CHIP_ERROR WriteHandler::ProcessAttributeDataList(TLV::TLVReader & aAttributeDat err = attributePath.GetCluster(&(clusterInfo.mClusterId)); SuccessOrExit(err); - err = attributePath.GetAttribute(&(clusterInfo.mFieldId)); + err = attributePath.GetAttribute(&(clusterInfo.mAttributeId)); SuccessOrExit(err); err = attributePath.GetListIndex(&(clusterInfo.mListIndex)); @@ -156,7 +156,7 @@ CHIP_ERROR WriteHandler::ProcessAttributeDataList(TLV::TLVReader & aAttributeDat { const ConcreteAttributePath concretePath = - ConcreteAttributePath(clusterInfo.mEndpointId, clusterInfo.mClusterId, clusterInfo.mFieldId); + ConcreteAttributePath(clusterInfo.mEndpointId, clusterInfo.mClusterId, clusterInfo.mAttributeId); MatterPreAttributeWriteCallback(concretePath); err = WriteSingleClusterData(clusterInfo, dataReader, this); MatterPostAttributeWriteCallback(concretePath); @@ -179,8 +179,8 @@ CHIP_ERROR WriteHandler::ProcessWriteRequest(System::PacketBufferHandle && aPayl System::PacketBufferTLVReader reader; WriteRequestMessage::Parser writeRequestParser; - AttributeDataList::Parser attributeDataListParser; - TLV::TLVReader attributeDataListReader; + AttributeDataIBs::Parser AttributeDataIBsParser; + TLV::TLVReader AttributeDataIBsReader; bool needSuppressResponse = false; reader.Init(std::move(aPayload)); @@ -202,10 +202,10 @@ CHIP_ERROR WriteHandler::ProcessWriteRequest(System::PacketBufferHandle && aPayl } SuccessOrExit(err); - err = writeRequestParser.GetAttributeDataList(&attributeDataListParser); + err = writeRequestParser.GetAttributeReportIBs(&AttributeDataIBsParser); SuccessOrExit(err); - attributeDataListParser.GetReader(&attributeDataListReader); - err = ProcessAttributeDataList(attributeDataListReader); + AttributeDataIBsParser.GetReader(&AttributeDataIBsReader); + err = ProcessAttributeDataIBs(AttributeDataIBsReader); exit: return err; diff --git a/src/app/WriteHandler.h b/src/app/WriteHandler.h index 1fd75b6171b94b..7d0edd139f085e 100644 --- a/src/app/WriteHandler.h +++ b/src/app/WriteHandler.h @@ -70,7 +70,7 @@ class WriteHandler virtual ~WriteHandler() = default; - CHIP_ERROR ProcessAttributeDataList(TLV::TLVReader & aAttributeDataListReader); + CHIP_ERROR ProcessAttributeDataIBs(TLV::TLVReader & aAttributeDataIBsReader); CHIP_ERROR AddStatus(const AttributePathParams & aAttributePathParams, const Protocols::InteractionModel::Status aStatus); diff --git a/src/app/reporting/Engine.cpp b/src/app/reporting/Engine.cpp index e4d711e61b945e..3ea8d2c22bb11d 100644 --- a/src/app/reporting/Engine.cpp +++ b/src/app/reporting/Engine.cpp @@ -63,30 +63,23 @@ EventNumber Engine::CountEvents(ReadHandler * apReadHandler, EventNumber * apIni } CHIP_ERROR -Engine::RetrieveClusterData(FabricIndex aAccessingFabricIndex, AttributeDataList::Builder & aAttributeDataList, +Engine::RetrieveClusterData(FabricIndex aAccessingFabricIndex, AttributeReportIBs::Builder & aAttributeReportIBs, ClusterInfo & aClusterInfo) { CHIP_ERROR err = CHIP_NO_ERROR; - ConcreteAttributePath path(aClusterInfo.mEndpointId, aClusterInfo.mClusterId, aClusterInfo.mFieldId); - AttributeDataElement::Builder attributeDataElementBuilder = aAttributeDataList.CreateAttributeDataElementBuilder(); - AttributePathIB::Builder attributePathBuilder = attributeDataElementBuilder.CreateAttributePath(); - attributePathBuilder.Endpoint(aClusterInfo.mEndpointId) - .Cluster(aClusterInfo.mClusterId) - .Attribute(aClusterInfo.mFieldId) - .EndOfAttributePathIB(); - err = attributePathBuilder.GetError(); - SuccessOrExit(err); + ConcreteAttributePath path(aClusterInfo.mEndpointId, aClusterInfo.mClusterId, aClusterInfo.mAttributeId); + + AttributeReportIB::Builder attributeReport = aAttributeReportIBs.CreateAttributeReport(); - ChipLogDetail(DataManagement, " Cluster %" PRIx32 ", Field %" PRIx32 " is dirty", aClusterInfo.mClusterId, - aClusterInfo.mFieldId); + ChipLogDetail(DataManagement, " Cluster %" PRIx32 ", Attribute %" PRIx32 " is dirty", aClusterInfo.mClusterId, + aClusterInfo.mAttributeId); MatterPreAttributeReadCallback(path); - err = ReadSingleClusterData(aAccessingFabricIndex, path, attributeDataElementBuilder.GetWriter(), nullptr /* data exists */); + err = ReadSingleClusterData(aAccessingFabricIndex, path, attributeReport); MatterPostAttributeReadCallback(path); SuccessOrExit(err); - attributeDataElementBuilder.MoreClusterData(false); - attributeDataElementBuilder.EndOfAttributeDataElement(); - err = attributeDataElementBuilder.GetError(); + attributeReport.EndOfAttributeReportIB(); + err = attributeReport.GetError(); exit: if (err != CHIP_NO_ERROR) @@ -98,14 +91,14 @@ Engine::RetrieveClusterData(FabricIndex aAccessingFabricIndex, AttributeDataList return err; } -CHIP_ERROR Engine::BuildSingleReportDataAttributeDataList(ReportDataMessage::Builder & aReportDataBuilder, - ReadHandler * apReadHandler) +CHIP_ERROR Engine::BuildSingleReportDataAttributeReportIBs(ReportDataMessage::Builder & aReportDataBuilder, + ReadHandler * apReadHandler) { CHIP_ERROR err = CHIP_NO_ERROR; bool attributeClean = true; TLV::TLVWriter backup; aReportDataBuilder.Checkpoint(backup); - AttributeDataList::Builder attributeDataList = aReportDataBuilder.CreateAttributeDataListBuilder(); + AttributeReportIBs::Builder AttributeReportIBs = aReportDataBuilder.CreateAttributeReportIBs(); SuccessOrExit(err = aReportDataBuilder.GetError()); // TODO: Need to handle multiple chunk of message for (auto clusterInfo = apReadHandler->GetAttributeClusterInfolist(); clusterInfo != nullptr; clusterInfo = clusterInfo->mpNext) @@ -113,7 +106,7 @@ CHIP_ERROR Engine::BuildSingleReportDataAttributeDataList(ReportDataMessage::Bui if (apReadHandler->IsInitialReport()) { // Retrieve data for this cluster instance and clear its dirty flag. - err = RetrieveClusterData(apReadHandler->GetFabricIndex(), attributeDataList, *clusterInfo); + err = RetrieveClusterData(apReadHandler->GetFabricIndex(), AttributeReportIBs, *clusterInfo); VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(DataManagement, " Error retrieving data from cluster, aborting")); attributeClean = false; @@ -128,11 +121,11 @@ CHIP_ERROR Engine::BuildSingleReportDataAttributeDataList(ReportDataMessage::Bui // need to inject nodeId from subscribed path here. ClusterInfo dirtyPath = *path; dirtyPath.mNodeId = clusterInfo->mNodeId; - err = RetrieveClusterData(apReadHandler->GetFabricIndex(), attributeDataList, dirtyPath); + err = RetrieveClusterData(apReadHandler->GetFabricIndex(), AttributeReportIBs, dirtyPath); } else if (path->IsAttributePathSupersetOf(*clusterInfo)) { - err = RetrieveClusterData(apReadHandler->GetFabricIndex(), attributeDataList, *clusterInfo); + err = RetrieveClusterData(apReadHandler->GetFabricIndex(), AttributeReportIBs, *clusterInfo); } else { @@ -146,8 +139,8 @@ CHIP_ERROR Engine::BuildSingleReportDataAttributeDataList(ReportDataMessage::Bui } } } - attributeDataList.EndOfAttributeDataList(); - err = attributeDataList.GetError(); + AttributeReportIBs.EndOfAttributeReportIBs(); + err = AttributeReportIBs.GetError(); exit: if (attributeClean || err != CHIP_NO_ERROR) @@ -174,7 +167,7 @@ CHIP_ERROR Engine::BuildSingleReportDataEventReports(ReportDataMessage::Builder VerifyOrExit(clusterInfoList != nullptr, ); VerifyOrExit(apReadHandler != nullptr, err = CHIP_ERROR_INVALID_ARGUMENT); - EventReports = aReportDataBuilder.CreateEventReportsBuilder(); + EventReports = aReportDataBuilder.CreateEventReports(); SuccessOrExit(err = EventReports.GetError()); memcpy(initialEvents, eventNumberList, sizeof(initialEvents)); @@ -282,7 +275,7 @@ CHIP_ERROR Engine::BuildAndSendSingleReportData(ReadHandler * apReadHandler) reportDataBuilder.SubscriptionId(subscriptionId); } - err = BuildSingleReportDataAttributeDataList(reportDataBuilder, apReadHandler); + err = BuildSingleReportDataAttributeReportIBs(reportDataBuilder, apReadHandler); SuccessOrExit(err); err = BuildSingleReportDataEventReports(reportDataBuilder, apReadHandler); diff --git a/src/app/reporting/Engine.h b/src/app/reporting/Engine.h index 02e513b707d027..72b9c6329f22fa 100644 --- a/src/app/reporting/Engine.h +++ b/src/app/reporting/Engine.h @@ -92,9 +92,9 @@ class Engine */ CHIP_ERROR BuildAndSendSingleReportData(ReadHandler * apReadHandler); - CHIP_ERROR BuildSingleReportDataAttributeDataList(ReportDataMessage::Builder & reportDataBuilder, ReadHandler * apReadHandler); + CHIP_ERROR BuildSingleReportDataAttributeReportIBs(ReportDataMessage::Builder & reportDataBuilder, ReadHandler * apReadHandler); CHIP_ERROR BuildSingleReportDataEventReports(ReportDataMessage::Builder & reportDataBuilder, ReadHandler * apReadHandler); - CHIP_ERROR RetrieveClusterData(FabricIndex aAccessingFabricIndex, AttributeDataList::Builder & aAttributeDataList, + CHIP_ERROR RetrieveClusterData(FabricIndex aAccessingFabricIndex, AttributeReportIBs::Builder & aAttributeReportIBs, ClusterInfo & aClusterInfo); EventNumber CountEvents(ReadHandler * apReadHandler, EventNumber * apInitialEvents); diff --git a/src/app/tests/TestAttributeValueEncoder.cpp b/src/app/tests/TestAttributeValueEncoder.cpp index 36b9d8e1ace0dd..88a7cc51aa3ad3 100644 --- a/src/app/tests/TestAttributeValueEncoder.cpp +++ b/src/app/tests/TestAttributeValueEncoder.cpp @@ -23,7 +23,7 @@ */ #include -#include +#include #include #include #include @@ -73,7 +73,7 @@ void TestEncodeBool(nlTestSuite * aSuite, void * aContext) NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); // Anonymous tagged struct. // Control tag for boolean true with context tag. - // Context tag with value AttributeDataElement::kCsTag_Data. + // Context tag with value AttributeDataIB::Tag::kData. const uint8_t expected[] = { 0x15, 0x29, 0x02 }; VERIFY_BUFFER_STATE(aSuite, test, expected); } @@ -86,7 +86,7 @@ void TestEncodeListOfBools1(nlTestSuite * aSuite, void * aContext) NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); // Anonymous tagged struct. // Control tag for array with context tag. - // Context tag with value AttributeDataElement::kCsTag_Data. + // Context tag with value AttributeDataIB::Tag::kData. // Control tag for boolean true with anonymous tag. // Control tag for boolean false with anonymous tag. // End of list marker. @@ -108,7 +108,7 @@ void TestEncodeListOfBools2(nlTestSuite * aSuite, void * aContext) NL_TEST_ASSERT(aSuite, err == CHIP_NO_ERROR); // Anonymous tagged struct. // Control tag for array with context tag. - // Context tag with value AttributeDataElement::kCsTag_Data. + // Context tag with value AttributeDataIB::Tag::kData. // Control tag for boolean true with anonymous tag. // Control tag for boolean false with anonymous tag. // End of list marker. diff --git a/src/app/tests/TestClusterInfo.cpp b/src/app/tests/TestClusterInfo.cpp index c3e49795d938ce..f1651e7355d97b 100644 --- a/src/app/tests/TestClusterInfo.cpp +++ b/src/app/tests/TestClusterInfo.cpp @@ -34,9 +34,9 @@ void TestAttributePathIncludedSameFieldId(nlTestSuite * apSuite, void * apContex ClusterInfo clusterInfo1; ClusterInfo clusterInfo2; ClusterInfo clusterInfo3; - clusterInfo1.mFieldId = 1; - clusterInfo2.mFieldId = 1; - clusterInfo3.mFieldId = 1; + clusterInfo1.mAttributeId = 1; + clusterInfo2.mAttributeId = 1; + clusterInfo3.mAttributeId = 1; NL_TEST_ASSERT(apSuite, clusterInfo1.IsAttributePathSupersetOf(clusterInfo2)); clusterInfo2.mListIndex = 1; NL_TEST_ASSERT(apSuite, clusterInfo1.IsAttributePathSupersetOf(clusterInfo2)); @@ -53,14 +53,14 @@ void TestAttributePathIncludedDifferentFieldId(nlTestSuite * apSuite, void * apC { ClusterInfo clusterInfo1; ClusterInfo clusterInfo2; - clusterInfo1.mFieldId = 1; - clusterInfo2.mFieldId = 2; + clusterInfo1.mAttributeId = 1; + clusterInfo2.mAttributeId = 2; NL_TEST_ASSERT(apSuite, !clusterInfo1.IsAttributePathSupersetOf(clusterInfo2)); } { ClusterInfo clusterInfo1; ClusterInfo clusterInfo2; - clusterInfo2.mFieldId = 2; + clusterInfo2.mAttributeId = 2; NL_TEST_ASSERT(apSuite, clusterInfo1.IsAttributePathSupersetOf(clusterInfo2)); } { @@ -72,7 +72,7 @@ void TestAttributePathIncludedDifferentFieldId(nlTestSuite * apSuite, void * apC ClusterInfo clusterInfo1; ClusterInfo clusterInfo2; - clusterInfo1.mFieldId = 1; + clusterInfo1.mAttributeId = 1; NL_TEST_ASSERT(apSuite, !clusterInfo1.IsAttributePathSupersetOf(clusterInfo2)); } } diff --git a/src/app/tests/TestInteractionModelEngine.cpp b/src/app/tests/TestInteractionModelEngine.cpp index 3f0d6e66ab39e2..81ea4662e2216c 100644 --- a/src/app/tests/TestInteractionModelEngine.cpp +++ b/src/app/tests/TestInteractionModelEngine.cpp @@ -99,12 +99,12 @@ void TestInteractionModelEngine::TestMergeOverlappedAttributePath(nlTestSuite * NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ClusterInfo clusterInfoList[2]; - clusterInfoList[0].mFieldId = 1; - clusterInfoList[1].mFieldId = 2; + clusterInfoList[0].mAttributeId = 1; + clusterInfoList[1].mAttributeId = 2; { chip::app::ClusterInfo testClusterInfo; - testClusterInfo.mFieldId = 3; + testClusterInfo.mAttributeId = 3; NL_TEST_ASSERT(apSuite, !InteractionModelEngine::GetInstance()->MergeOverlappedAttributePath(clusterInfoList, testClusterInfo)); } @@ -115,8 +115,8 @@ void TestInteractionModelEngine::TestMergeOverlappedAttributePath(nlTestSuite * } { chip::app::ClusterInfo testClusterInfo; - testClusterInfo.mFieldId = 1; - testClusterInfo.mListIndex = 2; + testClusterInfo.mAttributeId = 1; + testClusterInfo.mListIndex = 2; NL_TEST_ASSERT(apSuite, InteractionModelEngine::GetInstance()->MergeOverlappedAttributePath(clusterInfoList, testClusterInfo)); } diff --git a/src/app/tests/TestMessageDef.cpp b/src/app/tests/TestMessageDef.cpp index b578a11d23ea1a..7c4d94e9c6b4b6 100644 --- a/src/app/tests/TestMessageDef.cpp +++ b/src/app/tests/TestMessageDef.cpp @@ -201,20 +201,20 @@ void ParseAttributePathIB(nlTestSuite * apSuite, chip::TLV::TLVReader & aReader) NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR && listIndex == 5); } -void BuildAttributePathList(nlTestSuite * apSuite, AttributePaths::Builder & aAttributePathListBuilder) +void BuildAttributePathList(nlTestSuite * apSuite, AttributePathIBs::Builder & aAttributePathListBuilder) { AttributePathIB::Builder attributePathBuilder = aAttributePathListBuilder.CreateAttributePath(); NL_TEST_ASSERT(apSuite, attributePathBuilder.GetError() == CHIP_NO_ERROR); BuildAttributePathIB(apSuite, attributePathBuilder); - aAttributePathListBuilder.EndOfAttributePaths(); + aAttributePathListBuilder.EndOfAttributePathIBs(); NL_TEST_ASSERT(apSuite, aAttributePathListBuilder.GetError() == CHIP_NO_ERROR); } void ParseAttributePathList(nlTestSuite * apSuite, chip::TLV::TLVReader & aReader) { CHIP_ERROR err = CHIP_NO_ERROR; - AttributePaths::Parser attributePathListParser; + AttributePathIBs::Parser attributePathListParser; AttributePathIB::Parser attributePathParser; err = attributePathListParser.Init(aReader); @@ -538,24 +538,20 @@ void ParseAttributeStatuses(nlTestSuite * apSuite, chip::TLV::TLVReader & aReade #endif } -void BuildAttributeDataElement(nlTestSuite * apSuite, AttributeDataElement::Builder & aAttributeDataElementBuilder) +void BuildAttributeDataIB(nlTestSuite * apSuite, AttributeDataIB::Builder & aAttributeDataIBBuilder) { CHIP_ERROR err = CHIP_NO_ERROR; - AttributePathIB::Builder attributePathBuilder = aAttributeDataElementBuilder.CreateAttributePath(); - NL_TEST_ASSERT(apSuite, aAttributeDataElementBuilder.GetError() == CHIP_NO_ERROR); + AttributePathIB::Builder attributePathBuilder = aAttributeDataIBBuilder.CreatePath(); + NL_TEST_ASSERT(apSuite, aAttributeDataIBBuilder.GetError() == CHIP_NO_ERROR); BuildAttributePathIB(apSuite, attributePathBuilder); - aAttributeDataElementBuilder.DataVersion(2); - err = aAttributeDataElementBuilder.GetError(); - NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - // Construct attribute data { - chip::TLV::TLVWriter * pWriter = aAttributeDataElementBuilder.GetWriter(); + chip::TLV::TLVWriter * pWriter = aAttributeDataIBBuilder.GetWriter(); chip::TLV::TLVType dummyType = chip::TLV::kTLVType_NotSpecified; - err = pWriter->StartContainer(chip::TLV::ContextTag(AttributeDataElement::kCsTag_Data), chip::TLV::kTLVType_Structure, - dummyType); + err = pWriter->StartContainer(chip::TLV::ContextTag(chip::to_underlying(AttributeDataIB::Tag::kData)), + chip::TLV::kTLVType_Structure, dummyType); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); err = pWriter->PutBoolean(chip::TLV::ContextTag(1), true); @@ -564,37 +560,33 @@ void BuildAttributeDataElement(nlTestSuite * apSuite, AttributeDataElement::Buil err = pWriter->EndContainer(dummyType); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); } - - aAttributeDataElementBuilder.MoreClusterData(true); - err = aAttributeDataElementBuilder.GetError(); + aAttributeDataIBBuilder.DataVersion(2); + err = aAttributeDataIBBuilder.GetError(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - - aAttributeDataElementBuilder.EndOfAttributeDataElement(); - NL_TEST_ASSERT(apSuite, aAttributeDataElementBuilder.GetError() == CHIP_NO_ERROR); + aAttributeDataIBBuilder.EndOfAttributeDataIB(); + NL_TEST_ASSERT(apSuite, aAttributeDataIBBuilder.GetError() == CHIP_NO_ERROR); } -void ParseAttributeDataElement(nlTestSuite * apSuite, AttributeDataElement::Parser & aAttributeDataElementParser) +void ParseAttributeDataIB(nlTestSuite * apSuite, AttributeDataIB::Parser & aAttributeDataIBParser) { CHIP_ERROR err = CHIP_NO_ERROR; AttributePathIB::Parser attributePathParser; - StatusIB::Parser StatusIBParser; chip::DataVersion version = 0; - bool moreClusterDataFlag = false; #if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK - err = aAttributeDataElementParser.CheckSchemaValidity(); + err = aAttributeDataIBParser.CheckSchemaValidity(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); #endif - err = aAttributeDataElementParser.GetAttributePath(&attributePathParser); + err = aAttributeDataIBParser.GetPath(&attributePathParser); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - err = aAttributeDataElementParser.GetDataVersion(&version); + err = aAttributeDataIBParser.GetDataVersion(&version); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR && version == 2); { chip::TLV::TLVReader reader; bool val = false; chip::TLV::TLVType container; - aAttributeDataElementParser.GetData(&reader); + aAttributeDataIBParser.GetData(&reader); err = reader.EnterContainer(container); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -607,30 +599,74 @@ void ParseAttributeDataElement(nlTestSuite * apSuite, AttributeDataElement::Pars err = reader.ExitContainer(container); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); } +} + +void BuildAttributeDataIBs(nlTestSuite * apSuite, AttributeDataIBs::Builder & aAttributeDataIBsBuilder) +{ + AttributeDataIB::Builder AttributeDataIBBuilder = aAttributeDataIBsBuilder.CreateAttributeDataIBBuilder(); + NL_TEST_ASSERT(apSuite, aAttributeDataIBsBuilder.GetError() == CHIP_NO_ERROR); + BuildAttributeDataIB(apSuite, AttributeDataIBBuilder); - err = aAttributeDataElementParser.GetMoreClusterDataFlag(&moreClusterDataFlag); - NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR && moreClusterDataFlag); + aAttributeDataIBsBuilder.EndOfAttributeDataIBs(); + NL_TEST_ASSERT(apSuite, aAttributeDataIBsBuilder.GetError() == CHIP_NO_ERROR); +} + +void ParseAttributeDataIBs(nlTestSuite * apSuite, chip::TLV::TLVReader & aReader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + AttributeDataIBs::Parser AttributeDataIBsParser; + + err = AttributeDataIBsParser.Init(aReader); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); +#if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK + err = AttributeDataIBsParser.CheckSchemaValidity(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); +#endif } -void BuildAttributeDataList(nlTestSuite * apSuite, AttributeDataList::Builder & aAttributeDataListBuilder) +void BuildAttributeReportIB(nlTestSuite * apSuite, AttributeReportIB::Builder & aAttributeReportIBBuilder) { - AttributeDataElement::Builder attributeDataElementBuilder = aAttributeDataListBuilder.CreateAttributeDataElementBuilder(); - NL_TEST_ASSERT(apSuite, aAttributeDataListBuilder.GetError() == CHIP_NO_ERROR); - BuildAttributeDataElement(apSuite, attributeDataElementBuilder); + AttributeDataIB::Builder attributeDataIBBuilder = aAttributeReportIBBuilder.CreateAttributeData(); + NL_TEST_ASSERT(apSuite, aAttributeReportIBBuilder.GetError() == CHIP_NO_ERROR); + BuildAttributeDataIB(apSuite, attributeDataIBBuilder); - aAttributeDataListBuilder.EndOfAttributeDataList(); - NL_TEST_ASSERT(apSuite, aAttributeDataListBuilder.GetError() == CHIP_NO_ERROR); + aAttributeReportIBBuilder.EndOfAttributeReportIB(); + NL_TEST_ASSERT(apSuite, aAttributeReportIBBuilder.GetError() == CHIP_NO_ERROR); } -void ParseAttributeDataList(nlTestSuite * apSuite, chip::TLV::TLVReader & aReader) +void ParseAttributeReportIB(nlTestSuite * apSuite, AttributeReportIB::Parser & aAttributeReportIBParser) { CHIP_ERROR err = CHIP_NO_ERROR; - AttributeDataList::Parser attributeDataListParser; + AttributeStatusIB::Parser attributeStatusParser; + AttributeDataIB::Parser attributeDataParser; - err = attributeDataListParser.Init(aReader); +#if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK + err = aAttributeReportIBParser.CheckSchemaValidity(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); +#endif + err = aAttributeReportIBParser.GetAttributeData(&attributeDataParser); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); +} + +void BuildAttributeReportIBs(nlTestSuite * apSuite, AttributeReportIBs::Builder & aAttributeReportIBsBuilder) +{ + AttributeReportIB::Builder attributeReportIBBuilder = aAttributeReportIBsBuilder.CreateAttributeReport(); + NL_TEST_ASSERT(apSuite, aAttributeReportIBsBuilder.GetError() == CHIP_NO_ERROR); + BuildAttributeReportIB(apSuite, attributeReportIBBuilder); + + aAttributeReportIBsBuilder.EndOfAttributeReportIBs(); + NL_TEST_ASSERT(apSuite, aAttributeReportIBsBuilder.GetError() == CHIP_NO_ERROR); +} + +void ParseAttributeReportIBs(nlTestSuite * apSuite, chip::TLV::TLVReader & aReader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + AttributeReportIBs::Parser attributeReportIBsParser; + + err = attributeReportIBsParser.Init(aReader); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); #if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK - err = attributeDataListParser.CheckSchemaValidity(); + err = attributeReportIBsParser.CheckSchemaValidity(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); #endif } @@ -929,27 +965,27 @@ void ParseInvokeResponseMessage(nlTestSuite * apSuite, chip::TLV::TLVReader & aR void BuildReportDataMessage(nlTestSuite * apSuite, chip::TLV::TLVWriter & aWriter) { CHIP_ERROR err = CHIP_NO_ERROR; - ReportDataMessage::Builder reportDataBuilder; + ReportDataMessage::Builder reportDataMessageBuilder; - err = reportDataBuilder.Init(&aWriter); + err = reportDataMessageBuilder.Init(&aWriter); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - reportDataBuilder.SuppressResponse(true).SubscriptionId(2); - NL_TEST_ASSERT(apSuite, reportDataBuilder.GetError() == CHIP_NO_ERROR); + reportDataMessageBuilder.SuppressResponse(true).SubscriptionId(2); + NL_TEST_ASSERT(apSuite, reportDataMessageBuilder.GetError() == CHIP_NO_ERROR); - AttributeDataList::Builder attributeDataList = reportDataBuilder.CreateAttributeDataListBuilder(); - NL_TEST_ASSERT(apSuite, reportDataBuilder.GetError() == CHIP_NO_ERROR); - BuildAttributeDataList(apSuite, attributeDataList); + AttributeReportIBs::Builder AttributeReportIBs = reportDataMessageBuilder.CreateAttributeReportIBs(); + NL_TEST_ASSERT(apSuite, reportDataMessageBuilder.GetError() == CHIP_NO_ERROR); + BuildAttributeReportIBs(apSuite, AttributeReportIBs); - EventReports::Builder EventReports = reportDataBuilder.CreateEventReportsBuilder(); - NL_TEST_ASSERT(apSuite, reportDataBuilder.GetError() == CHIP_NO_ERROR); + EventReports::Builder EventReports = reportDataMessageBuilder.CreateEventReports(); + NL_TEST_ASSERT(apSuite, reportDataMessageBuilder.GetError() == CHIP_NO_ERROR); BuildEventReports(apSuite, EventReports); - reportDataBuilder.MoreChunkedMessages(true); - NL_TEST_ASSERT(apSuite, reportDataBuilder.GetError() == CHIP_NO_ERROR); + reportDataMessageBuilder.MoreChunkedMessages(true); + NL_TEST_ASSERT(apSuite, reportDataMessageBuilder.GetError() == CHIP_NO_ERROR); - reportDataBuilder.EndOfReportDataMessage(); - NL_TEST_ASSERT(apSuite, reportDataBuilder.GetError() == CHIP_NO_ERROR); + reportDataMessageBuilder.EndOfReportDataMessage(); + NL_TEST_ASSERT(apSuite, reportDataMessageBuilder.GetError() == CHIP_NO_ERROR); } void ParseReportDataMessage(nlTestSuite * apSuite, chip::TLV::TLVReader & aReader) @@ -959,8 +995,8 @@ void ParseReportDataMessage(nlTestSuite * apSuite, chip::TLV::TLVReader & aReade bool suppressResponse = false; uint64_t subscriptionId = 0; - AttributeDataList::Parser attributeDataListParser; - EventReports::Parser EventReportsParser; + AttributeReportIBs::Parser attributeReportIBsParser; + EventReports::Parser eventReportsParser; bool moreChunkedMessages = false; reportDataParser.Init(aReader); @@ -974,10 +1010,10 @@ void ParseReportDataMessage(nlTestSuite * apSuite, chip::TLV::TLVReader & aReade err = reportDataParser.GetSubscriptionId(&subscriptionId); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR && subscriptionId == 2); - err = reportDataParser.GetAttributeDataList(&attributeDataListParser); + err = reportDataParser.GetAttributeReportIBs(&attributeReportIBsParser); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - err = reportDataParser.GetEventReports(&EventReportsParser); + err = reportDataParser.GetEventReports(&eventReportsParser); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); err = reportDataParser.GetMoreChunkedMessages(&moreChunkedMessages); @@ -992,9 +1028,9 @@ void BuildReadRequestMessage(nlTestSuite * apSuite, chip::TLV::TLVWriter & aWrit err = readRequestBuilder.Init(&aWriter); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - AttributePaths::Builder AttributePaths = readRequestBuilder.CreateAttributePathListBuilder(); + AttributePathIBs::Builder AttributePathIBs = readRequestBuilder.CreateAttributePathListBuilder(); NL_TEST_ASSERT(apSuite, readRequestBuilder.GetError() == CHIP_NO_ERROR); - BuildAttributePathList(apSuite, AttributePaths); + BuildAttributePathList(apSuite, AttributePathIBs); EventPaths::Builder eventPathList = readRequestBuilder.CreateEventPathsBuilder(); NL_TEST_ASSERT(apSuite, readRequestBuilder.GetError() == CHIP_NO_ERROR); @@ -1016,7 +1052,7 @@ void ParseReadRequestMessage(nlTestSuite * apSuite, chip::TLV::TLVReader & aRead CHIP_ERROR err = CHIP_NO_ERROR; ReadRequestMessage::Parser readRequestParser; - AttributePaths::Parser attributePathListParser; + AttributePathIBs::Parser attributePathListParser; EventPaths::Parser eventPathListParser; AttributeDataVersionList::Parser attributeDataVersionListParser; uint64_t eventNumber; @@ -1027,7 +1063,7 @@ void ParseReadRequestMessage(nlTestSuite * apSuite, chip::TLV::TLVReader & aRead err = readRequestParser.CheckSchemaValidity(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); #endif - err = readRequestParser.GetAttributePathList(&attributePathListParser); + err = readRequestParser.GetPathList(&attributePathListParser); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); err = readRequestParser.GetEventPaths(&eventPathListParser); @@ -1051,9 +1087,9 @@ void BuildWriteRequestMessage(nlTestSuite * apSuite, chip::TLV::TLVWriter & aWri writeRequestBuilder.SuppressResponse(true); NL_TEST_ASSERT(apSuite, writeRequestBuilder.GetError() == CHIP_NO_ERROR); - AttributeDataList::Builder attributeDataList = writeRequestBuilder.CreateAttributeDataListBuilder(); + AttributeDataIBs::Builder AttributeDataIBs = writeRequestBuilder.CreateAttributeDataIBsBuilder(); NL_TEST_ASSERT(apSuite, writeRequestBuilder.GetError() == CHIP_NO_ERROR); - BuildAttributeDataList(apSuite, attributeDataList); + BuildAttributeDataIBs(apSuite, AttributeDataIBs); AttributeDataVersionList::Builder attributeDataVersionList = writeRequestBuilder.CreateAttributeDataVersionListBuilder(); NL_TEST_ASSERT(apSuite, writeRequestBuilder.GetError() == CHIP_NO_ERROR); @@ -1072,7 +1108,7 @@ void ParseWriteRequestMessage(nlTestSuite * apSuite, chip::TLV::TLVReader & aRea WriteRequestMessage::Parser writeRequestParser; bool suppressResponse = false; - AttributeDataList::Parser attributeDataList; + AttributeDataIBs::Parser AttributeDataIBs; AttributeDataVersionList::Parser attributeDataVersionList; bool moreChunkedMessages = false; @@ -1085,7 +1121,7 @@ void ParseWriteRequestMessage(nlTestSuite * apSuite, chip::TLV::TLVReader & aRea err = writeRequestParser.GetSuppressResponse(&suppressResponse); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR && suppressResponse); - err = writeRequestParser.GetAttributeDataList(&attributeDataList); + err = writeRequestParser.GetAttributeReportIBs(&AttributeDataIBs); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); err = writeRequestParser.GetAttributeDataVersionList(&attributeDataVersionList); @@ -1135,9 +1171,9 @@ void BuildSubscribeRequestMessage(nlTestSuite * apSuite, chip::TLV::TLVWriter & err = subscribeRequestBuilder.Init(&aWriter); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - AttributePaths::Builder AttributePaths = subscribeRequestBuilder.CreateAttributePathListBuilder(); + AttributePathIBs::Builder AttributePathIBs = subscribeRequestBuilder.CreateAttributePathListBuilder(); NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); - BuildAttributePathList(apSuite, AttributePaths); + BuildAttributePathList(apSuite, AttributePathIBs); EventPaths::Builder eventPathList = subscribeRequestBuilder.CreateEventPathsBuilder(); NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); @@ -1171,7 +1207,7 @@ void ParseSubscribeRequestMessage(nlTestSuite * apSuite, chip::TLV::TLVReader & CHIP_ERROR err = CHIP_NO_ERROR; SubscribeRequestMessage::Parser subscribeRequestParser; - AttributePaths::Parser attributePathListParser; + AttributePathIBs::Parser attributePathListParser; EventPaths::Parser eventPathListParser; AttributeDataVersionList::Parser attributeDataVersionListParser; uint64_t eventNumber = 0; @@ -1186,7 +1222,7 @@ void ParseSubscribeRequestMessage(nlTestSuite * apSuite, chip::TLV::TLVReader & err = subscribeRequestParser.CheckSchemaValidity(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); #endif - err = subscribeRequestParser.GetAttributePathList(&attributePathListParser); + err = subscribeRequestParser.GetPathList(&attributePathListParser); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); err = subscribeRequestParser.GetEventPaths(&eventPathListParser); @@ -1359,7 +1395,7 @@ void AttributePathListTest(nlTestSuite * apSuite, void * apContext) CHIP_ERROR err = CHIP_NO_ERROR; chip::System::PacketBufferTLVWriter writer; chip::System::PacketBufferTLVReader reader; - AttributePaths::Builder attributePathListBuilder; + AttributePathIBs::Builder attributePathListBuilder; writer.Init(chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSize)); @@ -1522,6 +1558,51 @@ void EventReportsTest(nlTestSuite * apSuite, void * apContext) ParseEventReports(apSuite, reader); } +void AttributeReportIBTest(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + AttributeReportIB::Builder attributeReportIBBuilder; + AttributeReportIB::Parser attributeReportIBParser; + chip::System::PacketBufferTLVWriter writer; + chip::System::PacketBufferTLVReader reader; + writer.Init(chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSize)); + attributeReportIBBuilder.Init(&writer); + BuildAttributeReportIB(apSuite, attributeReportIBBuilder); + chip::System::PacketBufferHandle buf; + err = writer.Finalize(&buf); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + DebugPrettyPrint(buf); + + reader.Init(std::move(buf)); + err = reader.Next(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + attributeReportIBParser.Init(reader); + ParseAttributeReportIB(apSuite, attributeReportIBParser); +} + +void AttributeReportIBsTest(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + chip::System::PacketBufferTLVWriter writer; + chip::System::PacketBufferTLVReader reader; + AttributeReportIBs::Builder attributeReportIBsBuilder; + writer.Init(chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSize)); + attributeReportIBsBuilder.Init(&writer); + BuildAttributeReportIBs(apSuite, attributeReportIBsBuilder); + chip::System::PacketBufferHandle buf; + err = writer.Finalize(&buf); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + DebugPrettyPrint(buf); + + reader.Init(std::move(buf)); + err = reader.Next(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + ParseAttributeReportIBs(apSuite, reader); +} + void StatusIBTest(nlTestSuite * apSuite, void * apContext) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -1616,16 +1697,16 @@ void AttributeStatusesTest(nlTestSuite * apSuite, void * apContext) ParseAttributeStatuses(apSuite, reader); } -void AttributeDataElementTest(nlTestSuite * apSuite, void * apContext) +void AttributeDataIBTest(nlTestSuite * apSuite, void * apContext) { CHIP_ERROR err = CHIP_NO_ERROR; - AttributeDataElement::Builder attributeDataElementBuilder; - AttributeDataElement::Parser attributeDataElementParser; + AttributeDataIB::Builder AttributeDataIBBuilder; + AttributeDataIB::Parser AttributeDataIBParser; chip::System::PacketBufferTLVWriter writer; chip::System::PacketBufferTLVReader reader; writer.Init(chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSize)); - attributeDataElementBuilder.Init(&writer); - BuildAttributeDataElement(apSuite, attributeDataElementBuilder); + AttributeDataIBBuilder.Init(&writer); + BuildAttributeDataIB(apSuite, AttributeDataIBBuilder); chip::System::PacketBufferHandle buf; err = writer.Finalize(&buf); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -1636,19 +1717,19 @@ void AttributeDataElementTest(nlTestSuite * apSuite, void * apContext) err = reader.Next(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - attributeDataElementParser.Init(reader); - ParseAttributeDataElement(apSuite, attributeDataElementParser); + AttributeDataIBParser.Init(reader); + ParseAttributeDataIB(apSuite, AttributeDataIBParser); } -void AttributeDataListTest(nlTestSuite * apSuite, void * apContext) +void AttributeDataIBsTest(nlTestSuite * apSuite, void * apContext) { CHIP_ERROR err = CHIP_NO_ERROR; chip::System::PacketBufferTLVWriter writer; chip::System::PacketBufferTLVReader reader; writer.Init(chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSize)); - AttributeDataList::Builder attributeDataListBuilder; - attributeDataListBuilder.Init(&writer); - BuildAttributeDataList(apSuite, attributeDataListBuilder); + AttributeDataIBs::Builder AttributeDataIBsBuilder; + AttributeDataIBsBuilder.Init(&writer); + BuildAttributeDataIBs(apSuite, AttributeDataIBsBuilder); chip::System::PacketBufferHandle buf; err = writer.Finalize(&buf); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -1658,7 +1739,7 @@ void AttributeDataListTest(nlTestSuite * apSuite, void * apContext) reader.Init(std::move(buf)); err = reader.Next(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - ParseAttributeDataList(apSuite, reader); + ParseAttributeDataIBs(apSuite, reader); } void AttributeDataVersionListTest(nlTestSuite * apSuite, void * apContext) @@ -2021,27 +2102,27 @@ void CheckPointRollbackTest(nlTestSuite * apSuite, void * apContext) size_t NumDataElement = 0; chip::System::PacketBufferTLVWriter writer; chip::System::PacketBufferTLVReader reader; - AttributeDataList::Parser attributeDataListParser; + AttributeDataIBs::Parser AttributeDataIBsParser; chip::TLV::TLVWriter checkpoint; writer.Init(chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSize)); - AttributeDataList::Builder attributeDataListBuilder; - attributeDataListBuilder.Init(&writer); + AttributeDataIBs::Builder AttributeDataIBsBuilder; + AttributeDataIBsBuilder.Init(&writer); // encode one attribute element - AttributeDataElement::Builder attributeDataElementBuilder1 = attributeDataListBuilder.CreateAttributeDataElementBuilder(); - NL_TEST_ASSERT(apSuite, attributeDataListBuilder.GetError() == CHIP_NO_ERROR); - BuildAttributeDataElement(apSuite, attributeDataElementBuilder1); + AttributeDataIB::Builder AttributeDataIBBuilder1 = AttributeDataIBsBuilder.CreateAttributeDataIBBuilder(); + NL_TEST_ASSERT(apSuite, AttributeDataIBsBuilder.GetError() == CHIP_NO_ERROR); + BuildAttributeDataIB(apSuite, AttributeDataIBBuilder1); // checkpoint - attributeDataListBuilder.Checkpoint(checkpoint); + AttributeDataIBsBuilder.Checkpoint(checkpoint); // encode another attribute element - AttributeDataElement::Builder attributeDataElementBuilder2 = attributeDataListBuilder.CreateAttributeDataElementBuilder(); - NL_TEST_ASSERT(apSuite, attributeDataListBuilder.GetError() == CHIP_NO_ERROR); - BuildAttributeDataElement(apSuite, attributeDataElementBuilder2); + AttributeDataIB::Builder AttributeDataIBBuilder2 = AttributeDataIBsBuilder.CreateAttributeDataIBBuilder(); + NL_TEST_ASSERT(apSuite, AttributeDataIBsBuilder.GetError() == CHIP_NO_ERROR); + BuildAttributeDataIB(apSuite, AttributeDataIBBuilder2); // rollback to previous checkpoint - attributeDataListBuilder.Rollback(checkpoint); + AttributeDataIBsBuilder.Rollback(checkpoint); - attributeDataListBuilder.EndOfAttributeDataList(); - NL_TEST_ASSERT(apSuite, attributeDataListBuilder.GetError() == CHIP_NO_ERROR); + AttributeDataIBsBuilder.EndOfAttributeDataIBs(); + NL_TEST_ASSERT(apSuite, AttributeDataIBsBuilder.GetError() == CHIP_NO_ERROR); chip::System::PacketBufferHandle buf; err = writer.Finalize(&buf); @@ -2053,14 +2134,14 @@ void CheckPointRollbackTest(nlTestSuite * apSuite, void * apContext) err = reader.Next(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - err = attributeDataListParser.Init(reader); + err = AttributeDataIBsParser.Init(reader); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); #if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK - err = attributeDataListParser.CheckSchemaValidity(); + err = AttributeDataIBsParser.CheckSchemaValidity(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); #endif - while (CHIP_NO_ERROR == (err = attributeDataListParser.Next())) + while (CHIP_NO_ERROR == (err = AttributeDataIBsParser.Next())) { ++NumDataElement; } @@ -2079,6 +2160,12 @@ const nlTest sTests[] = NL_TEST_DEF("EventFiltersTest", EventFiltersTest), NL_TEST_DEF("AttributePathTest", AttributePathTest), NL_TEST_DEF("AttributePathListTest", AttributePathListTest), + NL_TEST_DEF("AttributeStatusIBTest", AttributeStatusIBTest), + NL_TEST_DEF("AttributeStatusesTest", AttributeStatusesTest), + NL_TEST_DEF("AttributeDataIBTest", AttributeDataIBTest), + NL_TEST_DEF("AttributeDataIBsTest", AttributeDataIBsTest), + NL_TEST_DEF("AttributeReportIBTest", AttributeReportIBTest), + NL_TEST_DEF("AttributeReportIBsTest", AttributeReportIBsTest), NL_TEST_DEF("EventPathTest", EventPathTest), NL_TEST_DEF("EventPathsTest", EventPathsTest), NL_TEST_DEF("EventDataIBTest", EventDataIBTest), @@ -2086,10 +2173,6 @@ const nlTest sTests[] = NL_TEST_DEF("EventReportsTest", EventReportsTest), NL_TEST_DEF("StatusIBTest", StatusIBTest), NL_TEST_DEF("EventStatusIBTest", EventStatusIBTest), - NL_TEST_DEF("AttributeStatusIBTest", AttributeStatusIBTest), - NL_TEST_DEF("AttributeStatusesTest", AttributeStatusesTest), - NL_TEST_DEF("AttributeDataElementTest", AttributeDataElementTest), - NL_TEST_DEF("AttributeDataListTest", AttributeDataListTest), NL_TEST_DEF("AttributeDataVersionListTest", AttributeDataVersionListTest), NL_TEST_DEF("CommandPathIBTest", CommandPathIBTest), NL_TEST_DEF("CommandDataIBTest", CommandDataIBTest), diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index 68dc8b284c3fda..b5079798c3d6c6 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -227,30 +227,35 @@ class MockInteractionModelApp : public chip::app::ReadClient::Callback, public c namespace chip { namespace app { -CHIP_ERROR ReadSingleClusterData(FabricIndex aAccessingFabricIndex, const ConcreteAttributePath & aPath, TLV::TLVWriter * apWriter, - bool * apDataExists) +CHIP_ERROR ReadSingleClusterData(FabricIndex aAccessingFabricIndex, const ConcreteAttributePath & aPath, + AttributeReportIB::Builder & aAttributeReport) { - uint64_t version = 0; + AttributeDataIB::Builder attributeData; + AttributePathIB::Builder attributePath; ChipLogDetail(DataManagement, "TEST Cluster %" PRIx32 ", Field %" PRIx32 " is dirty", aPath.mClusterId, aPath.mAttributeId); - if (apDataExists != nullptr) - { - *apDataExists = (aPath.mClusterId == kTestClusterId && aPath.mEndpointId == kTestEndpointId); - } - - if (apWriter == nullptr) - { - return CHIP_NO_ERROR; - } - if (!(aPath.mClusterId == kTestClusterId && aPath.mEndpointId == kTestEndpointId)) { - return apWriter->Put(chip::TLV::ContextTag(AttributeDataElement::kCsTag_Status), - chip::Protocols::InteractionModel::Status::UnsupportedAttribute); + AttributeStatusIB::Builder attributeStatus; + attributeStatus = aAttributeReport.CreateAttributeStatus(); + attributePath = attributeStatus.CreatePath(); + attributePath.Endpoint(aPath.mEndpointId).Cluster(aPath.mClusterId).Attribute(aPath.mAttributeId).EndOfAttributePathIB(); + ReturnErrorOnFailure(attributePath.GetError()); + StatusIB::Builder errorStatus = attributeStatus.CreateErrorStatus(); + errorStatus.EncodeStatusIB(StatusIB(Protocols::InteractionModel::Status::UnsupportedAttribute)); + attributeStatus.EndOfAttributeStatusIB(); + ReturnErrorOnFailure(attributeStatus.GetError()); + return CHIP_NO_ERROR; } - ReturnErrorOnFailure(AttributeValueEncoder(apWriter, 0).Encode(kTestFieldValue1)); - return apWriter->Put(TLV::ContextTag(AttributeDataElement::kCsTag_DataVersion), version); + attributeData = aAttributeReport.CreateAttributeData(); + attributePath = attributeData.CreatePath(); + attributePath.Endpoint(aPath.mEndpointId).Cluster(aPath.mClusterId).Attribute(aPath.mAttributeId).EndOfAttributePathIB(); + ReturnErrorOnFailure(attributePath.GetError()); + ReturnErrorOnFailure(AttributeValueEncoder(attributeData.GetWriter(), 0).Encode(kTestFieldValue1)); + attributeData.DataVersion(0).EndOfAttributeDataIB(); + ReturnErrorOnFailure(attributeData.GetError()); + return CHIP_NO_ERROR; } class TestReadInteraction @@ -284,19 +289,22 @@ void TestReadInteraction::GenerateReportData(nlTestSuite * apSuite, void * apCon System::PacketBufferTLVWriter writer; writer.Init(std::move(aPayload)); - ReportDataMessage::Builder reportDataBuilder; + ReportDataMessage::Builder reportDataMessageBuilder; - err = reportDataBuilder.Init(&writer); + err = reportDataMessageBuilder.Init(&writer); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - AttributeDataList::Builder attributeDataListBuilder = reportDataBuilder.CreateAttributeDataListBuilder(); - NL_TEST_ASSERT(apSuite, reportDataBuilder.GetError() == CHIP_NO_ERROR); + AttributeReportIBs::Builder attributeReportIBsBuilder = reportDataMessageBuilder.CreateAttributeReportIBs(); + NL_TEST_ASSERT(apSuite, reportDataMessageBuilder.GetError() == CHIP_NO_ERROR); + + AttributeReportIB::Builder attributeReportIBBuilder = attributeReportIBsBuilder.CreateAttributeReport(); + NL_TEST_ASSERT(apSuite, attributeReportIBsBuilder.GetError() == CHIP_NO_ERROR); - AttributeDataElement::Builder attributeDataElementBuilder = attributeDataListBuilder.CreateAttributeDataElementBuilder(); - NL_TEST_ASSERT(apSuite, attributeDataListBuilder.GetError() == CHIP_NO_ERROR); + AttributeDataIB::Builder attributeDataIBBuilder = attributeReportIBBuilder.CreateAttributeData(); + NL_TEST_ASSERT(apSuite, attributeReportIBBuilder.GetError() == CHIP_NO_ERROR); - AttributePathIB::Builder attributePathBuilder = attributeDataElementBuilder.CreateAttributePath(); - NL_TEST_ASSERT(apSuite, attributeDataElementBuilder.GetError() == CHIP_NO_ERROR); + AttributePathIB::Builder attributePathBuilder = attributeDataIBBuilder.CreatePath(); + NL_TEST_ASSERT(apSuite, attributeDataIBBuilder.GetError() == CHIP_NO_ERROR); if (aNeedInvalidReport) { @@ -310,16 +318,16 @@ void TestReadInteraction::GenerateReportData(nlTestSuite * apSuite, void * apCon err = attributePathBuilder.GetError(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - attributeDataElementBuilder.DataVersion(2); - err = attributeDataElementBuilder.GetError(); + attributeDataIBBuilder.DataVersion(2); + err = attributeDataIBBuilder.GetError(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); // Construct attribute data { - chip::TLV::TLVWriter * pWriter = attributeDataElementBuilder.GetWriter(); + chip::TLV::TLVWriter * pWriter = attributeDataIBBuilder.GetWriter(); chip::TLV::TLVType dummyType = chip::TLV::kTLVType_NotSpecified; - err = pWriter->StartContainer(chip::TLV::ContextTag(AttributeDataElement::kCsTag_Data), chip::TLV::kTLVType_Structure, - dummyType); + err = pWriter->StartContainer(chip::TLV::ContextTag(chip::to_underlying(chip::app::AttributeDataIB::Tag::kData)), + chip::TLV::kTLVType_Structure, dummyType); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); err = pWriter->PutBoolean(chip::TLV::ContextTag(1), true); @@ -329,24 +337,23 @@ void TestReadInteraction::GenerateReportData(nlTestSuite * apSuite, void * apCon NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); } - attributeDataElementBuilder.MoreClusterData(false); - err = attributeDataElementBuilder.GetError(); - NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + attributeDataIBBuilder.EndOfAttributeDataIB(); + NL_TEST_ASSERT(apSuite, attributeDataIBBuilder.GetError() == CHIP_NO_ERROR); - attributeDataElementBuilder.EndOfAttributeDataElement(); - NL_TEST_ASSERT(apSuite, attributeDataElementBuilder.GetError() == CHIP_NO_ERROR); + attributeReportIBBuilder.EndOfAttributeReportIB(); + NL_TEST_ASSERT(apSuite, attributeReportIBBuilder.GetError() == CHIP_NO_ERROR); - attributeDataListBuilder.EndOfAttributeDataList(); - NL_TEST_ASSERT(apSuite, attributeDataListBuilder.GetError() == CHIP_NO_ERROR); + attributeReportIBsBuilder.EndOfAttributeReportIBs(); + NL_TEST_ASSERT(apSuite, attributeReportIBsBuilder.GetError() == CHIP_NO_ERROR); - reportDataBuilder.SuppressResponse(true); - NL_TEST_ASSERT(apSuite, reportDataBuilder.GetError() == CHIP_NO_ERROR); + reportDataMessageBuilder.SuppressResponse(true); + NL_TEST_ASSERT(apSuite, reportDataMessageBuilder.GetError() == CHIP_NO_ERROR); - reportDataBuilder.MoreChunkedMessages(false); - NL_TEST_ASSERT(apSuite, reportDataBuilder.GetError() == CHIP_NO_ERROR); + reportDataMessageBuilder.MoreChunkedMessages(false); + NL_TEST_ASSERT(apSuite, reportDataMessageBuilder.GetError() == CHIP_NO_ERROR); - reportDataBuilder.EndOfReportDataMessage(); - NL_TEST_ASSERT(apSuite, reportDataBuilder.GetError() == CHIP_NO_ERROR); + reportDataMessageBuilder.EndOfReportDataMessage(); + NL_TEST_ASSERT(apSuite, reportDataMessageBuilder.GetError() == CHIP_NO_ERROR); err = writer.Finalize(&aPayload); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -398,7 +405,7 @@ void TestReadInteraction::TestReadHandler(nlTestSuite * apSuite, void * apContex err = readRequestBuilder.Init(&writer); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - AttributePaths::Builder attributePathListBuilder = readRequestBuilder.CreateAttributePathListBuilder(); + AttributePathIBs::Builder attributePathListBuilder = readRequestBuilder.CreateAttributePathListBuilder(); NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); AttributePathIB::Builder attributePathBuilder = attributePathListBuilder.CreateAttributePath(); @@ -408,7 +415,7 @@ void TestReadInteraction::TestReadHandler(nlTestSuite * apSuite, void * apContex err = attributePathBuilder.GetError(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - attributePathListBuilder.EndOfAttributePaths(); + attributePathListBuilder.EndOfAttributePathIBs(); err = attributePathListBuilder.GetError(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -444,10 +451,10 @@ void TestReadInteraction::TestReadClientGenerateAttributePathList(nlTestSuite * NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); AttributePathParams attributePathParams[2]; - attributePathParams[0].mFieldId = 0; - attributePathParams[1].mFieldId = 0; - attributePathParams[1].mListIndex = 0; - AttributePaths::Builder & attributePathListBuilder = request.CreateAttributePathListBuilder(); + attributePathParams[0].mAttributeId = 0; + attributePathParams[1].mAttributeId = 0; + attributePathParams[1].mListIndex = 0; + AttributePathIBs::Builder & attributePathListBuilder = request.CreateAttributePathListBuilder(); err = readClient.GenerateAttributePathList(attributePathListBuilder, attributePathParams, 2 /*aAttributePathParamsListSize*/); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); } @@ -471,9 +478,9 @@ void TestReadInteraction::TestReadClientGenerateInvalidAttributePathList(nlTestS NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); AttributePathParams attributePathParams[2]; - attributePathParams[0].mFieldId = 0; - attributePathParams[1].mListIndex = 0; - AttributePaths::Builder & attributePathListBuilder = request.CreateAttributePathListBuilder(); + attributePathParams[0].mAttributeId = 0; + attributePathParams[1].mListIndex = 0; + AttributePathIBs::Builder & attributePathListBuilder = request.CreateAttributePathListBuilder(); err = readClient.GenerateAttributePathList(attributePathListBuilder, attributePathParams, 2 /*aAttributePathParamsListSize*/); NL_TEST_ASSERT(apSuite, err == CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH); } @@ -527,7 +534,7 @@ void TestReadInteraction::TestReadHandlerInvalidAttributePath(nlTestSuite * apSu err = readRequestBuilder.Init(&writer); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - AttributePaths::Builder attributePathListBuilder = readRequestBuilder.CreateAttributePathListBuilder(); + AttributePathIBs::Builder attributePathListBuilder = readRequestBuilder.CreateAttributePathListBuilder(); NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); AttributePathIB::Builder attributePathBuilder = attributePathListBuilder.CreateAttributePath(); @@ -682,14 +689,14 @@ void TestReadInteraction::TestReadRoundtrip(nlTestSuite * apSuite, void * apCont eventPathParams[1].mEventId = kTestEventIdCritical; chip::app::AttributePathParams attributePathParams[2]; - attributePathParams[0].mEndpointId = kTestEndpointId; - attributePathParams[0].mClusterId = kTestClusterId; - attributePathParams[0].mFieldId = 1; + attributePathParams[0].mEndpointId = kTestEndpointId; + attributePathParams[0].mClusterId = kTestClusterId; + attributePathParams[0].mAttributeId = 1; - attributePathParams[1].mEndpointId = kTestEndpointId; - attributePathParams[1].mClusterId = kTestClusterId; - attributePathParams[1].mFieldId = 2; - attributePathParams[1].mListIndex = 1; + attributePathParams[1].mEndpointId = kTestEndpointId; + attributePathParams[1].mClusterId = kTestClusterId; + attributePathParams[1].mAttributeId = 2; + attributePathParams[1].mListIndex = 1; ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); readPrepareParams.mpEventPathParamsList = eventPathParams; @@ -729,9 +736,9 @@ void TestReadInteraction::TestReadInvalidAttributePathRoundtrip(nlTestSuite * ap NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); chip::app::AttributePathParams attributePathParams[2]; - attributePathParams[0].mEndpointId = kTestEndpointId; - attributePathParams[0].mClusterId = kInvalidTestClusterId; - attributePathParams[0].mFieldId = 1; + attributePathParams[0].mEndpointId = kTestEndpointId; + attributePathParams[0].mClusterId = kInvalidTestClusterId; + attributePathParams[0].mAttributeId = 1; ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); readPrepareParams.mpAttributePathParamsList = attributePathParams; @@ -788,7 +795,7 @@ void TestReadInteraction::TestProcessSubscribeRequest(nlTestSuite * apSuite, voi err = subscribeRequestBuilder.Init(&writer); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - AttributePaths::Builder attributePathListBuilder = subscribeRequestBuilder.CreateAttributePathListBuilder(); + AttributePathIBs::Builder attributePathListBuilder = subscribeRequestBuilder.CreateAttributePathListBuilder(); NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); AttributePathIB::Builder attributePathBuilder = attributePathListBuilder.CreateAttributePath(); @@ -798,7 +805,7 @@ void TestReadInteraction::TestProcessSubscribeRequest(nlTestSuite * apSuite, voi err = attributePathBuilder.GetError(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - attributePathListBuilder.EndOfAttributePaths(); + attributePathListBuilder.EndOfAttributePathIBs(); err = attributePathListBuilder.GetError(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -858,14 +865,14 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a readPrepareParams.mEventPathParamsListSize = 2; chip::app::AttributePathParams attributePathParams[2]; - readPrepareParams.mpAttributePathParamsList = attributePathParams; - readPrepareParams.mpAttributePathParamsList[0].mEndpointId = kTestEndpointId; - readPrepareParams.mpAttributePathParamsList[0].mClusterId = kTestClusterId; - readPrepareParams.mpAttributePathParamsList[0].mFieldId = 1; + readPrepareParams.mpAttributePathParamsList = attributePathParams; + readPrepareParams.mpAttributePathParamsList[0].mEndpointId = kTestEndpointId; + readPrepareParams.mpAttributePathParamsList[0].mClusterId = kTestClusterId; + readPrepareParams.mpAttributePathParamsList[0].mAttributeId = 1; - readPrepareParams.mpAttributePathParamsList[1].mEndpointId = kTestEndpointId; - readPrepareParams.mpAttributePathParamsList[1].mClusterId = kTestClusterId; - readPrepareParams.mpAttributePathParamsList[1].mFieldId = 2; + readPrepareParams.mpAttributePathParamsList[1].mEndpointId = kTestEndpointId; + readPrepareParams.mpAttributePathParamsList[1].mClusterId = kTestClusterId; + readPrepareParams.mpAttributePathParamsList[1].mAttributeId = 2; readPrepareParams.mAttributePathParamsListSize = 2; @@ -887,30 +894,30 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a NL_TEST_ASSERT(apSuite, delegate.mNumSubscriptions == 1); chip::app::ClusterInfo dirtyPath1; - dirtyPath1.mClusterId = kTestClusterId; - dirtyPath1.mEndpointId = kTestEndpointId; - dirtyPath1.mFieldId = 1; + dirtyPath1.mClusterId = kTestClusterId; + dirtyPath1.mEndpointId = kTestEndpointId; + dirtyPath1.mAttributeId = 1; chip::app::ClusterInfo dirtyPath2; - dirtyPath2.mClusterId = kTestClusterId; - dirtyPath2.mEndpointId = kTestEndpointId; - dirtyPath2.mFieldId = 2; + dirtyPath2.mClusterId = kTestClusterId; + dirtyPath2.mEndpointId = kTestEndpointId; + dirtyPath2.mAttributeId = 2; chip::app::ClusterInfo dirtyPath3; - dirtyPath3.mClusterId = kTestClusterId; - dirtyPath3.mEndpointId = kTestEndpointId; - dirtyPath3.mFieldId = 2; - dirtyPath3.mListIndex = 1; + dirtyPath3.mClusterId = kTestClusterId; + dirtyPath3.mEndpointId = kTestEndpointId; + dirtyPath3.mAttributeId = 2; + dirtyPath3.mListIndex = 1; chip::app::ClusterInfo dirtyPath4; - dirtyPath4.mClusterId = kTestClusterId; - dirtyPath4.mEndpointId = kTestEndpointId; - dirtyPath4.mFieldId = 3; + dirtyPath4.mClusterId = kTestClusterId; + dirtyPath4.mEndpointId = kTestEndpointId; + dirtyPath4.mAttributeId = 3; chip::app::ClusterInfo dirtyPath5; - dirtyPath5.mClusterId = kTestClusterId; - dirtyPath5.mEndpointId = kTestEndpointId; - dirtyPath5.mFieldId = 4; + dirtyPath5.mClusterId = kTestClusterId; + dirtyPath5.mEndpointId = kTestEndpointId; + dirtyPath5.mAttributeId = 4; // Test report with 2 different path delegate.mpReadHandler->mHoldReport = false; @@ -978,13 +985,14 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a delegate.mGotReport = false; ReadPrepareParams readPrepareParams1(ctx.GetSessionBobToAlice()); chip::app::AttributePathParams attributePathParams1[1]; - readPrepareParams1.mpAttributePathParamsList = attributePathParams1; - readPrepareParams1.mpAttributePathParamsList[0].mEndpointId = kTestEndpointId; - readPrepareParams1.mpAttributePathParamsList[0].mClusterId = kTestClusterId; - readPrepareParams1.mpAttributePathParamsList[0].mFieldId = 1; - readPrepareParams1.mAttributePathParamsListSize = 1; - readPrepareParams1.mMinIntervalFloorSeconds = 2; - readPrepareParams1.mMaxIntervalCeilingSeconds = 5; + readPrepareParams1.mpAttributePathParamsList = attributePathParams1; + readPrepareParams1.mpAttributePathParamsList[0].mEndpointId = kTestEndpointId; + readPrepareParams1.mpAttributePathParamsList[0].mClusterId = kTestClusterId; + readPrepareParams1.mpAttributePathParamsList[0].mAttributeId = 1; + readPrepareParams1.mAttributePathParamsListSize = 1; + readPrepareParams1.mMinIntervalFloorSeconds = 2; + readPrepareParams1.mMaxIntervalCeilingSeconds = 5; + printf("\nSend another subscribe request message to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); err = engine->SendSubscribeRequest(readPrepareParams1, &delegate); @@ -1029,9 +1037,9 @@ void TestReadInteraction::TestSubscribeEarlyShutdown(nlTestSuite * apSuite, void // Subscribe to the attribute AttributePathParams attributePathParams; - attributePathParams.mEndpointId = kTestEndpointId; - attributePathParams.mClusterId = kTestClusterId; - attributePathParams.mFieldId = 1; + attributePathParams.mEndpointId = kTestEndpointId; + attributePathParams.mClusterId = kTestClusterId; + attributePathParams.mAttributeId = 1; ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); readPrepareParams.mpAttributePathParamsList = &attributePathParams; @@ -1080,10 +1088,10 @@ void TestReadInteraction::TestSubscribeInvalidAttributePathRoundtrip(nlTestSuite ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); chip::app::AttributePathParams attributePathParams[1]; - readPrepareParams.mpAttributePathParamsList = attributePathParams; - readPrepareParams.mpAttributePathParamsList[0].mEndpointId = kTestEndpointId; - readPrepareParams.mpAttributePathParamsList[0].mClusterId = kInvalidTestClusterId; - readPrepareParams.mpAttributePathParamsList[0].mFieldId = 1; + readPrepareParams.mpAttributePathParamsList = attributePathParams; + readPrepareParams.mpAttributePathParamsList[0].mEndpointId = kTestEndpointId; + readPrepareParams.mpAttributePathParamsList[0].mClusterId = kInvalidTestClusterId; + readPrepareParams.mpAttributePathParamsList[0].mAttributeId = 1; readPrepareParams.mAttributePathParamsListSize = 1; diff --git a/src/app/tests/TestReportingEngine.cpp b/src/app/tests/TestReportingEngine.cpp index b1c6cc9470af50..a3b935f386375f 100644 --- a/src/app/tests/TestReportingEngine.cpp +++ b/src/app/tests/TestReportingEngine.cpp @@ -73,7 +73,7 @@ void TestReportingEngine::TestBuildAndSendSingleReportData(nlTestSuite * apSuite System::PacketBufferTLVWriter writer; System::PacketBufferHandle readRequestbuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); ReadRequestMessage::Builder readRequestBuilder; - AttributePaths::Builder attributePathListBuilder; + AttributePathIBs::Builder attributePathListBuilder; AttributePathIB::Builder attributePathBuilder; err = InteractionModelEngine::GetInstance()->Init(&ctx.GetExchangeManager(), nullptr); @@ -104,7 +104,7 @@ void TestReportingEngine::TestBuildAndSendSingleReportData(nlTestSuite * apSuite .Attribute(kTestFieldId2) .EndOfAttributePathIB(); NL_TEST_ASSERT(apSuite, attributePathBuilder.GetError() == CHIP_NO_ERROR); - attributePathListBuilder.EndOfAttributePaths(); + attributePathListBuilder.EndOfAttributePathIBs(); NL_TEST_ASSERT(apSuite, readRequestBuilder.GetError() == CHIP_NO_ERROR); readRequestBuilder.EndOfReadRequestMessage(); diff --git a/src/app/tests/TestWriteInteraction.cpp b/src/app/tests/TestWriteInteraction.cpp index 3d4388bdb792e1..1a5067e5cc0976 100644 --- a/src/app/tests/TestWriteInteraction.cpp +++ b/src/app/tests/TestWriteInteraction.cpp @@ -49,7 +49,7 @@ class TestWriteInteraction static void TestWriteRoundtripWithClusterObjects(nlTestSuite * apSuite, void * apContext); private: - static void AddAttributeDataElement(nlTestSuite * apSuite, void * apContext, WriteClientHandle & aWriteClient); + static void AddAttributeDataIB(nlTestSuite * apSuite, void * apContext, WriteClientHandle & aWriteClient); static void AddAttributeStatus(nlTestSuite * apSuite, void * apContext, WriteHandler & aWriteHandler); static void GenerateWriteRequest(nlTestSuite * apSuite, void * apContext, System::PacketBufferHandle & aPayload); static void GenerateWriteResponse(nlTestSuite * apSuite, void * apContext, System::PacketBufferHandle & aPayload); @@ -82,20 +82,20 @@ class TestWriteClientCallback : public chip::app::WriteClient::Callback int mOnDoneCalled = 0; }; -void TestWriteInteraction::AddAttributeDataElement(nlTestSuite * apSuite, void * apContext, WriteClientHandle & aWriteClient) +void TestWriteInteraction::AddAttributeDataIB(nlTestSuite * apSuite, void * apContext, WriteClientHandle & aWriteClient) { CHIP_ERROR err = CHIP_NO_ERROR; AttributePathParams attributePathParams; - attributePathParams.mEndpointId = 2; - attributePathParams.mClusterId = 3; - attributePathParams.mFieldId = 4; + attributePathParams.mEndpointId = 2; + attributePathParams.mClusterId = 3; + attributePathParams.mAttributeId = 4; err = aWriteClient->PrepareAttribute(attributePathParams); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - chip::TLV::TLVWriter * writer = aWriteClient->GetAttributeDataElementTLVWriter(); + chip::TLV::TLVWriter * writer = aWriteClient->GetAttributeDataIBTLVWriter(); - err = writer->PutBoolean(chip::TLV::ContextTag(chip::app::AttributeDataElement::kCsTag_Data), true); + err = writer->PutBoolean(chip::TLV::ContextTag(to_underlying(AttributeDataIB::Tag::kData)), true); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); err = aWriteClient->FinishAttribute(); @@ -106,9 +106,9 @@ void TestWriteInteraction::AddAttributeStatus(nlTestSuite * apSuite, void * apCo { CHIP_ERROR err = CHIP_NO_ERROR; AttributePathParams attributePathParams; - attributePathParams.mEndpointId = 2; - attributePathParams.mClusterId = 3; - attributePathParams.mFieldId = 4; + attributePathParams.mEndpointId = 2; + attributePathParams.mClusterId = 3; + attributePathParams.mAttributeId = 4; err = aWriteHandler.AddStatus(attributePathParams, Protocols::InteractionModel::Status::Success); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -123,12 +123,12 @@ void TestWriteInteraction::GenerateWriteRequest(nlTestSuite * apSuite, void * ap WriteRequestMessage::Builder writeRequestBuilder; err = writeRequestBuilder.Init(&writer); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - AttributeDataList::Builder attributeDataListBuilder = writeRequestBuilder.CreateAttributeDataListBuilder(); - NL_TEST_ASSERT(apSuite, attributeDataListBuilder.GetError() == CHIP_NO_ERROR); - AttributeDataElement::Builder attributeDataElementBuilder = attributeDataListBuilder.CreateAttributeDataElementBuilder(); - NL_TEST_ASSERT(apSuite, attributeDataElementBuilder.GetError() == CHIP_NO_ERROR); + AttributeDataIBs::Builder attributeDataIBsBuilder = writeRequestBuilder.CreateAttributeDataIBsBuilder(); + NL_TEST_ASSERT(apSuite, writeRequestBuilder.GetError() == CHIP_NO_ERROR); + AttributeDataIB::Builder attributeDataIBBuilder = attributeDataIBsBuilder.CreateAttributeDataIBBuilder(); + NL_TEST_ASSERT(apSuite, attributeDataIBsBuilder.GetError() == CHIP_NO_ERROR); - AttributePathIB::Builder attributePathBuilder = attributeDataElementBuilder.CreateAttributePath(); + AttributePathIB::Builder attributePathBuilder = attributeDataIBBuilder.CreatePath(); NL_TEST_ASSERT(apSuite, attributePathBuilder.GetError() == CHIP_NO_ERROR); attributePathBuilder.Node(1).Endpoint(2).Cluster(3).Attribute(4).ListIndex(5).EndOfAttributePathIB(); err = attributePathBuilder.GetError(); @@ -136,10 +136,10 @@ void TestWriteInteraction::GenerateWriteRequest(nlTestSuite * apSuite, void * ap // Construct attribute data { - chip::TLV::TLVWriter * pWriter = attributeDataElementBuilder.GetWriter(); + chip::TLV::TLVWriter * pWriter = attributeDataIBBuilder.GetWriter(); chip::TLV::TLVType dummyType = chip::TLV::kTLVType_NotSpecified; - err = pWriter->StartContainer(chip::TLV::ContextTag(AttributeDataElement::kCsTag_Data), chip::TLV::kTLVType_Structure, - dummyType); + err = pWriter->StartContainer(chip::TLV::ContextTag(to_underlying(AttributeDataIB::Tag::kData)), + chip::TLV::kTLVType_Structure, dummyType); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); err = pWriter->PutBoolean(chip::TLV::ContextTag(1), true); @@ -149,12 +149,11 @@ void TestWriteInteraction::GenerateWriteRequest(nlTestSuite * apSuite, void * ap NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); } - attributeDataElementBuilder.DataVersion(0); - attributeDataElementBuilder.EndOfAttributeDataElement(); - NL_TEST_ASSERT(apSuite, attributeDataElementBuilder.GetError() == CHIP_NO_ERROR); + attributeDataIBBuilder.DataVersion(0).EndOfAttributeDataIB(); + NL_TEST_ASSERT(apSuite, attributeDataIBBuilder.GetError() == CHIP_NO_ERROR); - attributeDataListBuilder.EndOfAttributeDataList(); - NL_TEST_ASSERT(apSuite, attributeDataListBuilder.GetError() == CHIP_NO_ERROR); + attributeDataIBsBuilder.EndOfAttributeDataIBs(); + NL_TEST_ASSERT(apSuite, attributeDataIBsBuilder.GetError() == CHIP_NO_ERROR); writeRequestBuilder.EndOfWriteRequestMessage(); NL_TEST_ASSERT(apSuite, writeRequestBuilder.GetError() == CHIP_NO_ERROR); @@ -216,7 +215,7 @@ void TestWriteInteraction::TestWriteClient(nlTestSuite * apSuite, void * apConte TestWriteClientCallback callback; err = writeClient.Init(&ctx.GetExchangeManager(), &callback); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - AddAttributeDataElement(apSuite, apContext, writeClientHandle); + AddAttributeDataIB(apSuite, apContext, writeClientHandle); err = writeClientHandle.SendWriteRequest(ctx.GetSessionBobToAlice()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -263,8 +262,9 @@ CHIP_ERROR WriteSingleClusterData(ClusterInfo & aClusterInfo, TLV::TLVReader & a writer.Init(attributeDataTLV); writer.CopyElement(TLV::AnonymousTag, aReader); attributeDataTLVLen = writer.GetLengthWritten(); - return aWriteHandler->AddStatus(AttributePathParams(aClusterInfo.mEndpointId, aClusterInfo.mClusterId, aClusterInfo.mFieldId), - Protocols::InteractionModel::Status::Success); + return aWriteHandler->AddStatus( + AttributePathParams(aClusterInfo.mEndpointId, aClusterInfo.mClusterId, aClusterInfo.mAttributeId), + Protocols::InteractionModel::Status::Success); } void TestWriteInteraction::TestWriteRoundtripWithClusterObjects(nlTestSuite * apSuite, void * apContext) @@ -289,9 +289,9 @@ void TestWriteInteraction::TestWriteRoundtripWithClusterObjects(nlTestSuite * ap System::PacketBufferHandle buf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); AttributePathParams attributePathParams; - attributePathParams.mEndpointId = 2; - attributePathParams.mClusterId = 3; - attributePathParams.mFieldId = 4; + attributePathParams.mEndpointId = 2; + attributePathParams.mClusterId = 3; + attributePathParams.mAttributeId = 4; const uint8_t byteSpanData[] = { 0xde, 0xad, 0xbe, 0xef }; const char charSpanData[] = "a simple test string"; @@ -355,7 +355,7 @@ void TestWriteInteraction::TestWriteRoundtrip(nlTestSuite * apSuite, void * apCo NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); System::PacketBufferHandle buf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); - AddAttributeDataElement(apSuite, apContext, writeClient); + AddAttributeDataIB(apSuite, apContext, writeClient); NL_TEST_ASSERT(apSuite, callback.mOnSuccessCalled == 0 && callback.mOnErrorCalled == 0 && callback.mOnDoneCalled == 0); diff --git a/src/app/tests/integration/chip_im_initiator.cpp b/src/app/tests/integration/chip_im_initiator.cpp index 686768b2e2aa49..22d1b54fd165f8 100644 --- a/src/app/tests/integration/chip_im_initiator.cpp +++ b/src/app/tests/integration/chip_im_initiator.cpp @@ -342,15 +342,16 @@ CHIP_ERROR SendWriteRequest(chip::app::WriteClientHandle & apWriteClient) printf("\nSend write request message to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); - attributePathParams.mEndpointId = 2; - attributePathParams.mClusterId = 3; - attributePathParams.mFieldId = 4; + attributePathParams.mEndpointId = 2; + attributePathParams.mClusterId = 3; + attributePathParams.mAttributeId = 4; SuccessOrExit(err = apWriteClient->PrepareAttribute(attributePathParams)); - writer = apWriteClient->GetAttributeDataElementTLVWriter(); + writer = apWriteClient->GetAttributeDataIBTLVWriter(); - SuccessOrExit(err = writer->PutBoolean(chip::TLV::ContextTag(chip::app::AttributeDataElement::kCsTag_Data), true)); + SuccessOrExit(err = + writer->PutBoolean(chip::TLV::ContextTag(chip::to_underlying(chip::app::AttributeDataIB::Tag::kData)), true)); SuccessOrExit(err = apWriteClient->FinishAttribute()); SuccessOrExit( err = apWriteClient.SendWriteRequest(gSessionManager.FindSecureSessionForNode(chip::kTestDeviceNodeId), gMessageTimeout)); @@ -386,10 +387,10 @@ CHIP_ERROR SendSubscribeRequest() readPrepareParams.mEventPathParamsListSize = 2; - readPrepareParams.mpAttributePathParamsList = attributePathParams; - readPrepareParams.mpAttributePathParamsList[0].mEndpointId = kTestEndpointId; - readPrepareParams.mpAttributePathParamsList[0].mClusterId = kTestClusterId; - readPrepareParams.mpAttributePathParamsList[0].mFieldId = 1; + readPrepareParams.mpAttributePathParamsList = attributePathParams; + readPrepareParams.mpAttributePathParamsList[0].mEndpointId = kTestEndpointId; + readPrepareParams.mpAttributePathParamsList[0].mClusterId = kTestClusterId; + readPrepareParams.mpAttributePathParamsList[0].mAttributeId = 1; readPrepareParams.mAttributePathParamsListSize = 1; @@ -628,13 +629,18 @@ void DispatchSingleClusterResponseCommand(const ConcreteCommandPath & aCommandPa gLastCommandResult = TestCommandResult::kSuccess; } -CHIP_ERROR ReadSingleClusterData(FabricIndex aAccessingFabricIndex, const ConcreteAttributePath & aPath, TLV::TLVWriter * apWriter, - bool * apDataExists) +CHIP_ERROR ReadSingleClusterData(FabricIndex aAccessingFabricIndex, const ConcreteAttributePath & aPath, + AttributeReportIB::Builder & aAttributeReport) { - // We do not really care about the value, just return a not found status code. - VerifyOrReturnError(apWriter != nullptr, CHIP_NO_ERROR); - return apWriter->Put(chip::TLV::ContextTag(AttributeDataElement::kCsTag_Status), - Protocols::InteractionModel::Status::UnsupportedAttribute); + AttributeStatusIB::Builder attributeStatus = aAttributeReport.CreateAttributeStatus(); + AttributePathIB::Builder attributePath = attributeStatus.CreatePath(); + attributePath.Endpoint(aPath.mEndpointId).Cluster(aPath.mClusterId).Attribute(aPath.mAttributeId).EndOfAttributePathIB(); + ReturnErrorOnFailure(attributePath.GetError()); + StatusIB::Builder errorStatus = attributeStatus.CreateErrorStatus(); + errorStatus.EncodeStatusIB(StatusIB(Protocols::InteractionModel::Status::UnsupportedAttribute)); + attributeStatus.EndOfAttributeStatusIB(); + ReturnErrorOnFailure(attributeStatus.GetError()); + return CHIP_NO_ERROR; } CHIP_ERROR WriteSingleClusterData(ClusterInfo & aClusterInfo, TLV::TLVReader & aReader, WriteHandler *) diff --git a/src/app/tests/integration/chip_im_responder.cpp b/src/app/tests/integration/chip_im_responder.cpp index 753646503d0ee1..82183111c7b495 100644 --- a/src/app/tests/integration/chip_im_responder.cpp +++ b/src/app/tests/integration/chip_im_responder.cpp @@ -110,31 +110,28 @@ void DispatchSingleClusterResponseCommand(const ConcreteCommandPath & aCommandPa (void) apCommandObj; } -CHIP_ERROR ReadSingleClusterData(FabricIndex aAccessingFabricIndex, const ConcreteAttributePath & aPath, TLV::TLVWriter * apWriter, - bool * apDataExists) +CHIP_ERROR ReadSingleClusterData(FabricIndex aAccessingFabricIndex, const ConcreteAttributePath & aPath, + AttributeReportIB::Builder & aAttributeReport) { - CHIP_ERROR err = CHIP_NO_ERROR; - uint64_t version = 0; - VerifyOrExit(aPath.mClusterId == kTestClusterId && aPath.mEndpointId == kTestEndpointId, err = CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrExit(apWriter != nullptr, /* no op */); - - err = AttributeValueEncoder(apWriter, 0).Encode(kTestFieldValue1); - SuccessOrExit(err); - err = apWriter->Put(TLV::ContextTag(AttributeDataElement::kCsTag_DataVersion), version); - -exit: - return err; + AttributeDataIB::Builder attributeData = aAttributeReport.CreateAttributeData(); + AttributePathIB::Builder attributePath = attributeData.CreatePath(); + VerifyOrReturnError(aPath.mClusterId == kTestClusterId && aPath.mEndpointId == kTestEndpointId, CHIP_ERROR_INVALID_ARGUMENT); + attributePath.Endpoint(aPath.mEndpointId).Cluster(aPath.mClusterId).Attribute(aPath.mAttributeId).EndOfAttributePathIB(); + ReturnErrorOnFailure(attributePath.GetError()); + ReturnErrorOnFailure(AttributeValueEncoder(attributeData.GetWriter(), 0).Encode(kTestFieldValue1)); + attributeData.DataVersion(0).EndOfAttributeDataIB(); + ReturnErrorOnFailure(attributeData.GetError()); + return CHIP_NO_ERROR; } CHIP_ERROR WriteSingleClusterData(ClusterInfo & aClusterInfo, TLV::TLVReader & aReader, WriteHandler * apWriteHandler) { CHIP_ERROR err = CHIP_NO_ERROR; AttributePathParams attributePathParams; - attributePathParams.mEndpointId = 2; - attributePathParams.mClusterId = 3; - attributePathParams.mFieldId = 4; - - err = apWriteHandler->AddStatus(attributePathParams, Protocols::InteractionModel::Status::Success); + attributePathParams.mEndpointId = 2; + attributePathParams.mClusterId = 3; + attributePathParams.mAttributeId = 4; + err = apWriteHandler->AddStatus(attributePathParams, Protocols::InteractionModel::Status::Success); return err; } } // namespace app @@ -172,7 +169,7 @@ void MutateClusterHandler(chip::System::Layer * systemLayer, void * appState) // send dirty change if (!testSyncReport) { - dirtyPath.mFieldId = 1; + dirtyPath.mAttributeId = 1; chip::app::InteractionModelEngine::GetInstance()->GetReportingEngine().SetDirty(dirtyPath); chip::app::InteractionModelEngine::GetInstance()->GetReportingEngine().ScheduleRun(); chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(1), MutateClusterHandler, NULL); @@ -180,7 +177,7 @@ void MutateClusterHandler(chip::System::Layer * systemLayer, void * appState) } else { - dirtyPath.mFieldId = 10; // unknown field + dirtyPath.mAttributeId = 10; // unknown field chip::app::InteractionModelEngine::GetInstance()->GetReportingEngine().SetDirty(dirtyPath); // send sync message(empty report) chip::app::InteractionModelEngine::GetInstance()->GetReportingEngine().ScheduleRun(); diff --git a/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp index 58aa77a11c96fb..450fe340d4f5c0 100644 --- a/src/app/util/ember-compatibility-functions.cpp +++ b/src/app/util/ember-compatibility-functions.cpp @@ -187,189 +187,215 @@ bool ServerClusterCommandExists(const ConcreteCommandPath & aCommandPath) return emberAfContainsServer(aCommandPath.mEndpointId, aCommandPath.mClusterId); } -CHIP_ERROR ReadSingleClusterData(FabricIndex aAccessingFabricIndex, const ConcreteAttributePath & aPath, TLV::TLVWriter * apWriter, - bool * apDataExists) +CHIP_ERROR ReadSingleClusterData(FabricIndex aAccessingFabricIndex, const ConcreteAttributePath & aPath, + AttributeReportIB::Builder & aAttributeReport) { ChipLogDetail(DataManagement, "Reading attribute: Cluster=" ChipLogFormatMEI " Endpoint=%" PRIx16 " AttributeId=" ChipLogFormatMEI, ChipLogValueMEI(aPath.mClusterId), aPath.mEndpointId, ChipLogValueMEI(aPath.mAttributeId)); + AttributeDataIB::Builder attributeDataIBBuilder; + AttributePathIB::Builder attributePathIBBuilder; + AttributeStatusIB::Builder attributeStatusIBBuilder; + TLV::TLVWriter * writer = nullptr; + TLV::TLVWriter backup; + aAttributeReport.Checkpoint(backup); + + attributeDataIBBuilder = aAttributeReport.CreateAttributeData(); + attributePathIBBuilder = attributeDataIBBuilder.CreatePath(); + attributePathIBBuilder.Endpoint(aPath.mEndpointId) + .Cluster(aPath.mClusterId) + .Attribute(aPath.mAttributeId) + .EndOfAttributePathIB(); + ReturnErrorOnFailure(attributePathIBBuilder.GetError()); AttributeAccessInterface * attrOverride = findAttributeAccessOverride(aPath.mEndpointId, aPath.mClusterId); if (attrOverride != nullptr) { // TODO: We should probably clone the writer and convert failures here // into status responses, unless our caller already does that. - AttributeValueEncoder valueEncoder(apWriter, aAccessingFabricIndex); + writer = attributeDataIBBuilder.GetWriter(); + VerifyOrReturnError(writer != nullptr, CHIP_NO_ERROR); + AttributeValueEncoder valueEncoder(writer, aAccessingFabricIndex); ReturnErrorOnFailure(attrOverride->Read(aPath, valueEncoder)); if (valueEncoder.TriedEncode()) { - if (apDataExists != nullptr) - { - *apDataExists = true; - } - if (apWriter != nullptr) - { - // TODO: Add DataVersion support - ReturnErrorOnFailure( - apWriter->Put(chip::TLV::ContextTag(AttributeDataElement::kCsTag_DataVersion), kTemporaryDataVersion)); - } + // TODO: Add DataVersion support + attributeDataIBBuilder.DataVersion(kTemporaryDataVersion).EndOfAttributeDataIB(); + ReturnErrorOnFailure(attributeDataIBBuilder.GetError()); return CHIP_NO_ERROR; } } EmberAfAttributeType attributeType; - EmberAfStatus status; - status = emberAfReadAttribute(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId, CLUSTER_MASK_SERVER, attributeData, - sizeof(attributeData), &attributeType); - - if (apDataExists != nullptr) - { - *apDataExists = (EMBER_ZCL_STATUS_SUCCESS == status); - } - - VerifyOrReturnError(apWriter != nullptr, CHIP_NO_ERROR); - if (status != EMBER_ZCL_STATUS_SUCCESS) - { - return apWriter->Put(chip::TLV::ContextTag(AttributeDataElement::kCsTag_Status), ToInteractionModelStatus(status)); - } + EmberAfStatus emberStatus = EMBER_ZCL_STATUS_SUCCESS; + emberStatus = emberAfReadAttribute(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId, CLUSTER_MASK_SERVER, attributeData, + sizeof(attributeData), &attributeType); - // TODO: ZCL_STRUCT_ATTRIBUTE_TYPE is not included in this switch case currently, should add support for structures. - switch (BaseType(attributeType)) - { - case ZCL_NO_DATA_ATTRIBUTE_TYPE: // No data - ReturnErrorOnFailure(apWriter->PutNull(TLV::ContextTag(AttributeDataElement::kCsTag_Data))); - break; - case ZCL_BOOLEAN_ATTRIBUTE_TYPE: // Boolean - ReturnErrorOnFailure(apWriter->PutBoolean(TLV::ContextTag(AttributeDataElement::kCsTag_Data), !!attributeData[0])); - break; - case ZCL_INT8U_ATTRIBUTE_TYPE: // Unsigned 8-bit integer - ReturnErrorOnFailure(apWriter->Put(TLV::ContextTag(AttributeDataElement::kCsTag_Data), attributeData[0])); - break; - case ZCL_INT16U_ATTRIBUTE_TYPE: // Unsigned 16-bit integer + if (emberStatus == EMBER_ZCL_STATUS_SUCCESS) { - uint16_t uint16_data; - memcpy(&uint16_data, attributeData, sizeof(uint16_data)); - ReturnErrorOnFailure(apWriter->Put(TLV::ContextTag(AttributeDataElement::kCsTag_Data), uint16_data)); - break; - } - case ZCL_INT32U_ATTRIBUTE_TYPE: // Unsigned 32-bit integer - { - uint32_t uint32_data; - memcpy(&uint32_data, attributeData, sizeof(uint32_data)); - ReturnErrorOnFailure(apWriter->Put(TLV::ContextTag(AttributeDataElement::kCsTag_Data), uint32_data)); - break; - } - case ZCL_INT64U_ATTRIBUTE_TYPE: // Unsigned 64-bit integer - { - uint64_t uint64_data; - memcpy(&uint64_data, attributeData, sizeof(uint64_data)); - ReturnErrorOnFailure(apWriter->Put(TLV::ContextTag(AttributeDataElement::kCsTag_Data), uint64_data)); - break; - } - case ZCL_INT8S_ATTRIBUTE_TYPE: // Signed 8-bit integer - { - int8_t int8_data; - memcpy(&int8_data, attributeData, sizeof(int8_data)); - ReturnErrorOnFailure(apWriter->Put(TLV::ContextTag(AttributeDataElement::kCsTag_Data), int8_data)); - break; - } - case ZCL_INT16S_ATTRIBUTE_TYPE: // Signed 16-bit integer - { - int16_t int16_data; - memcpy(&int16_data, attributeData, sizeof(int16_data)); - ReturnErrorOnFailure(apWriter->Put(TLV::ContextTag(AttributeDataElement::kCsTag_Data), int16_data)); - break; - } - case ZCL_INT32S_ATTRIBUTE_TYPE: // Signed 32-bit integer - { - int32_t int32_data; - memcpy(&int32_data, attributeData, sizeof(int32_data)); - ReturnErrorOnFailure(apWriter->Put(TLV::ContextTag(AttributeDataElement::kCsTag_Data), int32_data)); - break; - } - case ZCL_INT64S_ATTRIBUTE_TYPE: // Signed 64-bit integer - { - int64_t int64_data; - memcpy(&int64_data, attributeData, sizeof(int64_data)); - ReturnErrorOnFailure(apWriter->Put(TLV::ContextTag(AttributeDataElement::kCsTag_Data), int64_data)); - break; - } - case ZCL_CHAR_STRING_ATTRIBUTE_TYPE: // Char string - { - char * actualData = reinterpret_cast(attributeData + 1); - uint8_t dataLength = attributeData[0]; - if (dataLength == 0xFF /* invalid data, put empty value instead */) + writer = attributeDataIBBuilder.GetWriter(); + VerifyOrReturnError(writer != nullptr, CHIP_NO_ERROR); + // TODO: ZCL_STRUCT_ATTRIBUTE_TYPE is not included in this switch case currently, should add support for structures. + switch (BaseType(attributeType)) + { + case ZCL_NO_DATA_ATTRIBUTE_TYPE: // No data + ReturnErrorOnFailure(writer->PutNull(TLV::ContextTag(to_underlying(AttributeDataIB::Tag::kData)))); + break; + case ZCL_BOOLEAN_ATTRIBUTE_TYPE: // Boolean + ReturnErrorOnFailure( + writer->PutBoolean(TLV::ContextTag(to_underlying(AttributeDataIB::Tag::kData)), !!attributeData[0])); + break; + case ZCL_INT8U_ATTRIBUTE_TYPE: // Unsigned 8-bit integer + ReturnErrorOnFailure(writer->Put(TLV::ContextTag(to_underlying(AttributeDataIB::Tag::kData)), attributeData[0])); + break; + case ZCL_INT16U_ATTRIBUTE_TYPE: // Unsigned 16-bit integer { - dataLength = 0; + uint16_t uint16_data; + memcpy(&uint16_data, attributeData, sizeof(uint16_data)); + ReturnErrorOnFailure(writer->Put(TLV::ContextTag(to_underlying(AttributeDataIB::Tag::kData)), uint16_data)); + break; } - ReturnErrorOnFailure(apWriter->PutString(TLV::ContextTag(AttributeDataElement::kCsTag_Data), actualData, dataLength)); - break; - } - case ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE: { - char * actualData = reinterpret_cast(attributeData + 2); // The pascal string contains 2 bytes length - uint16_t dataLength; - memcpy(&dataLength, attributeData, sizeof(dataLength)); - if (dataLength == 0xFFFF /* invalid data, put empty value instead */) + case ZCL_INT32U_ATTRIBUTE_TYPE: // Unsigned 32-bit integer { - dataLength = 0; + uint32_t uint32_data; + memcpy(&uint32_data, attributeData, sizeof(uint32_data)); + ReturnErrorOnFailure(writer->Put(TLV::ContextTag(to_underlying(AttributeDataIB::Tag::kData)), uint32_data)); + break; } - ReturnErrorOnFailure(apWriter->PutString(TLV::ContextTag(AttributeDataElement::kCsTag_Data), actualData, dataLength)); - break; - } - case ZCL_OCTET_STRING_ATTRIBUTE_TYPE: // Octet string - { - uint8_t * actualData = attributeData + 1; - uint8_t dataLength = attributeData[0]; - if (dataLength == 0xFF /* invalid data, put empty value instead */) + case ZCL_INT64U_ATTRIBUTE_TYPE: // Unsigned 64-bit integer { - dataLength = 0; + uint64_t uint64_data; + memcpy(&uint64_data, attributeData, sizeof(uint64_data)); + ReturnErrorOnFailure(writer->Put(TLV::ContextTag(to_underlying(AttributeDataIB::Tag::kData)), uint64_data)); + break; } - ReturnErrorOnFailure( - apWriter->Put(TLV::ContextTag(AttributeDataElement::kCsTag_Data), chip::ByteSpan(actualData, dataLength))); - break; - } - case ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE: { - uint8_t * actualData = attributeData + 2; // The pascal string contains 2 bytes length - uint16_t dataLength; - memcpy(&dataLength, attributeData, sizeof(dataLength)); - if (dataLength == 0xFFFF /* invalid data, put empty value instead */) + case ZCL_INT8S_ATTRIBUTE_TYPE: // Signed 8-bit integer { - dataLength = 0; + int8_t int8_data; + memcpy(&int8_data, attributeData, sizeof(int8_data)); + ReturnErrorOnFailure(writer->Put(TLV::ContextTag(to_underlying(AttributeDataIB::Tag::kData)), int8_data)); + break; } - ReturnErrorOnFailure( - apWriter->Put(TLV::ContextTag(AttributeDataElement::kCsTag_Data), chip::ByteSpan(actualData, dataLength))); - break; - } - case ZCL_ARRAY_ATTRIBUTE_TYPE: { - // We only get here for attributes of list type that have no override - // registered. There should not be any nonempty lists like that. - uint16_t size = emberAfAttributeValueSize(aPath.mClusterId, aPath.mAttributeId, attributeType, attributeData); - if (size != 2) + case ZCL_INT16S_ATTRIBUTE_TYPE: // Signed 16-bit integer + { + int16_t int16_data; + memcpy(&int16_data, attributeData, sizeof(int16_data)); + ReturnErrorOnFailure(writer->Put(TLV::ContextTag(to_underlying(AttributeDataIB::Tag::kData)), int16_data)); + break; + } + case ZCL_INT32S_ATTRIBUTE_TYPE: // Signed 32-bit integer + { + int32_t int32_data; + memcpy(&int32_data, attributeData, sizeof(int32_data)); + ReturnErrorOnFailure(writer->Put(TLV::ContextTag(to_underlying(AttributeDataIB::Tag::kData)), int32_data)); + break; + } + case ZCL_INT64S_ATTRIBUTE_TYPE: // Signed 64-bit integer + { + int64_t int64_data; + memcpy(&int64_data, attributeData, sizeof(int64_data)); + ReturnErrorOnFailure(writer->Put(TLV::ContextTag(to_underlying(AttributeDataIB::Tag::kData)), int64_data)); + break; + } + case ZCL_CHAR_STRING_ATTRIBUTE_TYPE: // Char string + { + char * actualData = reinterpret_cast(attributeData + 1); + uint8_t dataLength = attributeData[0]; + if (dataLength == 0xFF /* invalid data, put empty value instead */) + { + dataLength = 0; + } + ReturnErrorOnFailure( + writer->PutString(TLV::ContextTag(to_underlying(AttributeDataIB::Tag::kData)), actualData, dataLength)); + break; + } + case ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE: { + char * actualData = reinterpret_cast(attributeData + 2); // The pascal string contains 2 bytes length + uint16_t dataLength; + memcpy(&dataLength, attributeData, sizeof(dataLength)); + if (dataLength == 0xFFFF /* invalid data, put empty value instead */) + { + dataLength = 0; + } + ReturnErrorOnFailure( + writer->PutString(TLV::ContextTag(to_underlying(AttributeDataIB::Tag::kData)), actualData, dataLength)); + break; + } + case ZCL_OCTET_STRING_ATTRIBUTE_TYPE: // Octet string { - // The value returned by emberAfAttributeValueSize for a list - // includes the space needed to store the list length (2 bytes) plus - // the space needed to store the actual list items. We expect it to - // return 2 here, indicating a zero-length list. If it doesn't, - // something has gone wrong. - return CHIP_ERROR_INCORRECT_STATE; + uint8_t * actualData = attributeData + 1; + uint8_t dataLength = attributeData[0]; + if (dataLength == 0xFF /* invalid data, put empty value instead */) + { + dataLength = 0; + } + ReturnErrorOnFailure( + writer->Put(TLV::ContextTag(to_underlying(AttributeDataIB::Tag::kData)), chip::ByteSpan(actualData, dataLength))); + break; } + case ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE: { + uint8_t * actualData = attributeData + 2; // The pascal string contains 2 bytes length + uint16_t dataLength; + memcpy(&dataLength, attributeData, sizeof(dataLength)); + if (dataLength == 0xFFFF /* invalid data, put empty value instead */) + { + dataLength = 0; + } + ReturnErrorOnFailure( + writer->Put(TLV::ContextTag(to_underlying(AttributeDataIB::Tag::kData)), chip::ByteSpan(actualData, dataLength))); + break; + } + case ZCL_ARRAY_ATTRIBUTE_TYPE: { + // We only get here for attributes of list type that have no override + // registered. There should not be any nonempty lists like that. + uint16_t size = emberAfAttributeValueSize(aPath.mClusterId, aPath.mAttributeId, attributeType, attributeData); + if (size != 2) + { + // The value returned by emberAfAttributeValueSize for a list + // includes the space needed to store the list length (2 bytes) plus + // the space needed to store the actual list items. We expect it to + // return 2 here, indicating a zero-length list. If it doesn't, + // something has gone wrong. + return CHIP_ERROR_INCORRECT_STATE; + } - // Just encode an empty array. - TLV::TLVType containerType; - ReturnErrorOnFailure( - apWriter->StartContainer(TLV::ContextTag(AttributeDataElement::kCsTag_Data), TLV::kTLVType_Array, containerType)); - ReturnErrorOnFailure(apWriter->EndContainer(containerType)); - break; - } - default: - ChipLogError(DataManagement, "Attribute type 0x%x not handled", static_cast(attributeType)); - return apWriter->Put(chip::TLV::ContextTag(AttributeDataElement::kCsTag_Status), - Protocols::InteractionModel::Status::UnsupportedRead); + // Just encode an empty array. + TLV::TLVType containerType; + ReturnErrorOnFailure(writer->StartContainer(TLV::ContextTag(to_underlying(AttributeDataIB::Tag::kData)), + TLV::kTLVType_Array, containerType)); + ReturnErrorOnFailure(writer->EndContainer(containerType)); + break; + } + default: + ChipLogError(DataManagement, "Attribute type 0x%x not handled", static_cast(attributeType)); + emberStatus = EMBER_ZCL_STATUS_WRITE_ONLY; + } } - // TODO: Add DataVersion support - ReturnErrorOnFailure(apWriter->Put(chip::TLV::ContextTag(AttributeDataElement::kCsTag_DataVersion), kTemporaryDataVersion)); + Protocols::InteractionModel::Status imStatus = ToInteractionModelStatus(emberStatus); + if (imStatus == Protocols::InteractionModel::Status::Success) + { + // TODO: Add DataVersion support + attributeDataIBBuilder.DataVersion(kTemporaryDataVersion).EndOfAttributeDataIB(); + ReturnErrorOnFailure(attributeDataIBBuilder.GetError()); + } + else + { + aAttributeReport.Rollback(backup); + attributeStatusIBBuilder = aAttributeReport.CreateAttributeStatus(); + attributePathIBBuilder = attributeStatusIBBuilder.CreatePath(); + attributePathIBBuilder.Endpoint(aPath.mEndpointId) + .Cluster(aPath.mClusterId) + .Attribute(aPath.mAttributeId) + .EndOfAttributePathIB(); + ReturnErrorOnFailure(attributePathIBBuilder.GetError()); + StatusIB::Builder statusIBBuilder = attributeStatusIBBuilder.CreateErrorStatus(); + statusIBBuilder.EncodeStatusIB(StatusIB(imStatus)); + ReturnErrorOnFailure(statusIBBuilder.GetError()); + attributeStatusIBBuilder.EndOfAttributeStatusIB(); + ReturnErrorOnFailure(attributeStatusIBBuilder.GetError()); + } return CHIP_NO_ERROR; } @@ -444,7 +470,7 @@ static Protocols::InteractionModel::Status WriteSingleClusterDataInternal(Cluste // Passing nullptr as buf to emberAfReadAttribute means we only need attribute type here, and ember will not do data read & // copy in this case. const EmberAfAttributeMetadata * attributeMetadata = emberAfLocateAttributeMetadata( - aClusterInfo.mEndpointId, aClusterInfo.mClusterId, aClusterInfo.mFieldId, CLUSTER_MASK_SERVER, 0); + aClusterInfo.mEndpointId, aClusterInfo.mClusterId, aClusterInfo.mAttributeId, CLUSTER_MASK_SERVER, 0); if (attributeMetadata == nullptr) { @@ -466,16 +492,16 @@ static Protocols::InteractionModel::Status WriteSingleClusterDataInternal(Cluste } return ToInteractionModelStatus(emberAfWriteAttributeExternal(aClusterInfo.mEndpointId, aClusterInfo.mClusterId, - aClusterInfo.mFieldId, CLUSTER_MASK_SERVER, 0, attributeData, + aClusterInfo.mAttributeId, CLUSTER_MASK_SERVER, 0, attributeData, attributeMetadata->attributeType)); } CHIP_ERROR WriteSingleClusterData(ClusterInfo & aClusterInfo, TLV::TLVReader & aReader, WriteHandler * apWriteHandler) { AttributePathParams attributePathParams; - attributePathParams.mEndpointId = aClusterInfo.mEndpointId; - attributePathParams.mClusterId = aClusterInfo.mClusterId; - attributePathParams.mFieldId = aClusterInfo.mFieldId; + attributePathParams.mEndpointId = aClusterInfo.mEndpointId; + attributePathParams.mClusterId = aClusterInfo.mClusterId; + attributePathParams.mAttributeId = aClusterInfo.mAttributeId; auto imCode = WriteSingleClusterDataInternal(aClusterInfo, aReader, apWriteHandler); return apWriteHandler->AddStatus(attributePathParams, imCode); @@ -497,9 +523,9 @@ void MatterReportingAttributeChangeCallback(EndpointId endpoint, ClusterId clust void MatterReportingAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { ClusterInfo info; - info.mClusterId = clusterId; - info.mFieldId = attributeId; - info.mEndpointId = endpoint; + info.mClusterId = clusterId; + info.mAttributeId = attributeId; + info.mEndpointId = endpoint; InteractionModelEngine::GetInstance()->GetReportingEngine().SetDirty(info); diff --git a/src/app/zap-templates/templates/app/CHIPClusters-src.zapt b/src/app/zap-templates/templates/app/CHIPClusters-src.zapt index b2d4044edd969b..cad634ea0ddb02 100644 --- a/src/app/zap-templates/templates/app/CHIPClusters-src.zapt +++ b/src/app/zap-templates/templates/app/CHIPClusters-src.zapt @@ -78,8 +78,7 @@ CHIP_ERROR {{asUpperCamelCase parent.name}}Cluster::ReadAttribute{{asUpperCamelC app::AttributePathParams attributePath; attributePath.mEndpointId = mEndpoint; attributePath.mClusterId = mClusterId; - attributePath.mFieldId = {{asHex code 8}}; - + attributePath.mAttributeId = {{asHex code 8}}; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback,{{#if isList}}{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}ListAttributeFilter{{else}}BasicAttributeFilter<{{chipCallback.name}}AttributeCallback>{{/if}}); } @@ -99,8 +98,7 @@ CHIP_ERROR {{asUpperCamelCase parent.name}}Cluster::SubscribeAttribute{{asUpperC chip::app::AttributePathParams attributePath; attributePath.mEndpointId = mEndpoint; attributePath.mClusterId = mClusterId; - attributePath.mFieldId = {{#if isGlobalAttribute}}Globals{{else}}{{asUpperCamelCase parent.name}}{{/if}}::Attributes::{{asUpperCamelCase name}}::Id; - + attributePath.mAttributeId = {{#if isGlobalAttribute}}Globals{{else}}{{asUpperCamelCase parent.name}}{{/if}}::Attributes::{{asUpperCamelCase name}}::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } diff --git a/src/controller/python/chip/clusters/Attribute.py b/src/controller/python/chip/clusters/Attribute.py index c33d0836bbf5cf..e8c3f0527e81e5 100644 --- a/src/controller/python/chip/clusters/Attribute.py +++ b/src/controller/python/chip/clusters/Attribute.py @@ -125,12 +125,12 @@ def WriteAttributes(future: Future, eventLoop, device, attributes: List[Attribut writeargs = [] for attr in attributes: - path = chip.interaction_model.AttributePathStruct.parse( - b'\x00' * chip.interaction_model.AttributePathStruct.sizeof()) + path = chip.interaction_model.AttributePathIBstruct.parse( + b'\x00' * chip.interaction_model.AttributePathIBstruct.sizeof()) path.EndpointId = attr.EndpointId path.ClusterId = attr.Attribute.cluster_id path.AttributeId = attr.Attribute.attribute_id - path = chip.interaction_model.AttributePathStruct.build(path) + path = chip.interaction_model.AttributePathIBstruct.build(path) tlv = attr.Attribute.ToTLV(None, attr.Data) writeargs.append(ctypes.c_char_p(path)) writeargs.append(ctypes.c_char_p(bytes(tlv))) diff --git a/src/controller/python/chip/clusters/write.cpp b/src/controller/python/chip/clusters/write.cpp index f5d6b52517dbdd..b6e2afb1e58be6 100644 --- a/src/controller/python/chip/clusters/write.cpp +++ b/src/controller/python/chip/clusters/write.cpp @@ -125,11 +125,12 @@ chip::ChipError::StorageType pychip_WriteClient_WriteAttributes(void * appContex SuccessOrExit(err = client->PrepareAttribute( chip::app::AttributePathParams(pathObj.endpointId, pathObj.clusterId, pathObj.attributeId))); - VerifyOrExit((writer = client->GetAttributeDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = client->GetAttributeDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); reader.Init(tlvBuffer, static_cast(length)); reader.Next(); - SuccessOrExit(err = writer->CopyElement(chip::TLV::ContextTag(chip::app::AttributeDataElement::kCsTag_Data), reader)); + SuccessOrExit(err = writer->CopyElement( + chip::TLV::ContextTag(chip::to_underlying(chip::app::AttributeDataIB::Tag::kData)), reader)); SuccessOrExit(err = client->FinishAttribute()); } diff --git a/src/controller/python/chip/interaction_model/__init__.py b/src/controller/python/chip/interaction_model/__init__.py index 60d63c2c8654d2..0ef2d861c18fc8 100644 --- a/src/controller/python/chip/interaction_model/__init__.py +++ b/src/controller/python/chip/interaction_model/__init__.py @@ -22,7 +22,7 @@ """Provides Python APIs for CHIP.""" import enum -from .delegate import OnSubscriptionReport, SetAttributeReportCallback, AttributePath, AttributePathStruct +from .delegate import OnSubscriptionReport, SetAttributeReportCallback, AttributePath, AttributePathIBstruct from chip.exceptions import ChipStackException diff --git a/src/controller/python/chip/interaction_model/delegate.py b/src/controller/python/chip/interaction_model/delegate.py index f8205dd0e7cde6..4909e148bcad07 100644 --- a/src/controller/python/chip/interaction_model/delegate.py +++ b/src/controller/python/chip/interaction_model/delegate.py @@ -46,7 +46,7 @@ ) # AttributePath should not contain padding -AttributePathStruct = Struct( +AttributePathIBstruct = Struct( "EndpointId" / Int16ul, "ClusterId" / Int32ul, "AttributeId" / Int32ul, @@ -161,7 +161,7 @@ def _OnCommandResponse(commandHandle: int, errorcode: int): @ _OnReportDataFunct def _OnReportData(nodeId: int, appId: int, subscriptionId: int, attrPathBuf, attrPathBufLen: int, tlvDataBuf, tlvDataBufLen: int, statusCode: int): global _onSubscriptionReport - attrPath = AttributePathStruct.parse( + attrPath = AttributePathIBstruct.parse( ctypes.string_at(attrPathBuf, attrPathBufLen)) tlvData = None path = AttributePath(nodeId, attrPath["EndpointId"], diff --git a/src/controller/tests/data_model/TestCommands.cpp b/src/controller/tests/data_model/TestCommands.cpp index 8421c0db738654..a6f6ecf3f0eb7a 100644 --- a/src/controller/tests/data_model/TestCommands.cpp +++ b/src/controller/tests/data_model/TestCommands.cpp @@ -127,8 +127,8 @@ bool ServerClusterCommandExists(const ConcreteCommandPath & aCommandPath) return (aCommandPath.mEndpointId == kTestEndpointId && aCommandPath.mClusterId == TestCluster::Id); } -CHIP_ERROR ReadSingleClusterData(FabricIndex aAccessingFabricIndex, const ConcreteAttributePath & aPath, TLV::TLVWriter * apWriter, - bool * apDataExists) +CHIP_ERROR ReadSingleClusterData(FabricIndex aAccessingFabricIndex, const ConcreteAttributePath & aPath, + AttributeReportIB::Builder & aAttributeReport) { return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } diff --git a/src/controller/tests/data_model/TestRead.cpp b/src/controller/tests/data_model/TestRead.cpp index e37509f6052be8..ea6519cc78ca8e 100644 --- a/src/controller/tests/data_model/TestRead.cpp +++ b/src/controller/tests/data_model/TestRead.cpp @@ -58,11 +58,13 @@ bool ServerClusterCommandExists(const ConcreteCommandPath & aCommandPath) return (aCommandPath.mEndpointId == kTestEndpointId && aCommandPath.mClusterId == TestCluster::Id); } -CHIP_ERROR ReadSingleClusterData(FabricIndex aAccessingFabricIndex, const ConcreteAttributePath & aPath, TLV::TLVWriter * apWriter, - bool * apDataExists) +CHIP_ERROR ReadSingleClusterData(FabricIndex aAccessingFabricIndex, const ConcreteAttributePath & aPath, + AttributeReportIB::Builder & aAttributeReport) { + if (responseDirective == kSendDataResponse) { + AttributeDataIB::Builder attributeData = aAttributeReport.CreateAttributeData(); TestCluster::Attributes::ListStructOctetString::TypeInfo::Type value; TestCluster::Structs::TestListStructOctet::Type valueBuf[4]; @@ -75,13 +77,27 @@ CHIP_ERROR ReadSingleClusterData(FabricIndex aAccessingFabricIndex, const Concre i++; } - ReturnErrorOnFailure(DataModel::Encode(*apWriter, chip::TLV::ContextTag(AttributeDataElement::kCsTag_Data), value)); - return apWriter->Put(TLV::ContextTag(AttributeDataElement::kCsTag_DataVersion), static_cast(0)); + AttributePathIB::Builder attributePath = attributeData.CreatePath(); + attributePath.Endpoint(aPath.mEndpointId).Cluster(aPath.mClusterId).Attribute(aPath.mAttributeId).EndOfAttributePathIB(); + ReturnErrorOnFailure(attributePath.GetError()); + + ReturnErrorOnFailure(DataModel::Encode(*(attributeData.GetWriter()), + chip::TLV::ContextTag(chip::to_underlying(AttributeDataIB::Tag::kData)), value)); + attributeData.DataVersion(0); + return CHIP_NO_ERROR; } else { - return apWriter->Put(chip::TLV::ContextTag(AttributeDataElement::kCsTag_Status), - chip::Protocols::InteractionModel::Status::Busy); + AttributeStatusIB::Builder attributeStatus = aAttributeReport.CreateAttributeStatus(); + AttributePathIB::Builder attributePath = attributeStatus.CreatePath(); + attributePath.Endpoint(aPath.mEndpointId).Cluster(aPath.mClusterId).Attribute(aPath.mAttributeId).EndOfAttributePathIB(); + ReturnErrorOnFailure(attributePath.GetError()); + + StatusIB::Builder errorStatus = attributeStatus.CreateErrorStatus(); + errorStatus.EncodeStatusIB(StatusIB(Protocols::InteractionModel::Status::Busy)); + attributeStatus.EndOfAttributeStatusIB(); + ReturnErrorOnFailure(attributeStatus.GetError()); + return CHIP_NO_ERROR; } return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; diff --git a/src/controller/tests/data_model/TestWrite.cpp b/src/controller/tests/data_model/TestWrite.cpp index fe9384d90de596..d18cf767f99710 100644 --- a/src/controller/tests/data_model/TestWrite.cpp +++ b/src/controller/tests/data_model/TestWrite.cpp @@ -59,8 +59,8 @@ bool ServerClusterCommandExists(const ConcreteCommandPath & aCommandPath) return (aCommandPath.mEndpointId == kTestEndpointId && aCommandPath.mClusterId == TestCluster::Id); } -CHIP_ERROR ReadSingleClusterData(FabricIndex aAccessingFabricIndex, const ConcreteAttributePath & aPath, TLV::TLVWriter * apWriter, - bool * apDataExists) +CHIP_ERROR ReadSingleClusterData(FabricIndex aAccessingFabricIndex, const ConcreteAttributePath & aPath, + AttributeReportIB::Builder & aAttributeReport) { return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } @@ -68,7 +68,7 @@ CHIP_ERROR ReadSingleClusterData(FabricIndex aAccessingFabricIndex, const Concre CHIP_ERROR WriteSingleClusterData(ClusterInfo & aClusterInfo, TLV::TLVReader & aReader, WriteHandler * aWriteHandler) { if (aClusterInfo.mClusterId == TestCluster::Id && - aClusterInfo.mFieldId == TestCluster::Attributes::ListStructOctetString::TypeInfo::GetAttributeId()) + aClusterInfo.mAttributeId == TestCluster::Attributes::ListStructOctetString::TypeInfo::GetAttributeId()) { if (responseDirective == kSendAttributeSuccess) { @@ -88,12 +88,12 @@ CHIP_ERROR WriteSingleClusterData(ClusterInfo & aClusterInfo, TLV::TLVReader & a VerifyOrReturnError(i == 4, CHIP_ERROR_INVALID_ARGUMENT); - AttributePathParams attributePathParams(aClusterInfo.mClusterId, aClusterInfo.mEndpointId, aClusterInfo.mFieldId); + AttributePathParams attributePathParams(aClusterInfo.mClusterId, aClusterInfo.mEndpointId, aClusterInfo.mAttributeId); aWriteHandler->AddStatus(attributePathParams, Protocols::InteractionModel::Status::Success); } else { - AttributePathParams attributePathParams(aClusterInfo.mClusterId, aClusterInfo.mEndpointId, aClusterInfo.mFieldId); + AttributePathParams attributePathParams(aClusterInfo.mClusterId, aClusterInfo.mEndpointId, aClusterInfo.mAttributeId); aWriteHandler->AddStatus(attributePathParams, Protocols::InteractionModel::Status::Failure); } diff --git a/src/lib/core/CHIPError.cpp b/src/lib/core/CHIPError.cpp index 27e811faaad9d1..edec0415c29220 100644 --- a/src/lib/core/CHIPError.cpp +++ b/src/lib/core/CHIPError.cpp @@ -665,6 +665,9 @@ bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err) case CHIP_ERROR_IM_MALFORMED_INVOKE_RESPONSE_MESSAGE.AsInteger(): desc = "Malformed Interaction Model Invoke Response MESSAGE"; break; + case CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_REPORT_MESSAGE.AsInteger(): + desc = "Malformed Interaction Model Attribute Report MESSAGE"; + break; } #endif // !CHIP_CONFIG_SHORT_ERROR_STR diff --git a/src/lib/core/CHIPError.h b/src/lib/core/CHIPError.h index 3fe6730b7472ab..f101c2478b68bb 100644 --- a/src/lib/core/CHIPError.h +++ b/src/lib/core/CHIPError.h @@ -2252,6 +2252,15 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_IM_MALFORMED_INVOKE_RESPONSE_MESSAGE CHIP_CORE_ERROR(0xce) +/** + * @def CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_REPORT_MESSAGE + * + * @brief + * The InvokeResponseMessage is malformed: it either does not contain + * the required elements + */ +#define CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_REPORT_MESSAGE CHIP_CORE_ERROR(0xcf) + /** * @} */ diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp index f217a0627c1b06..15e4638f670121 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp @@ -58,7 +58,7 @@ #include #include -#include +#include #include #include diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp index 69a22b842a7c94..6c671bc1fc8f27 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp @@ -124,10 +124,9 @@ CHIP_ERROR AccountLoginCluster::ReadAttributeClusterRevision(Callback::Cancelabl Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -276,10 +275,9 @@ CHIP_ERROR AdministratorCommissioningCluster::ReadAttributeClusterRevision(Callb Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -331,10 +329,9 @@ CHIP_ERROR ApplicationBasicCluster::ReadAttributeVendorName(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -343,10 +340,9 @@ CHIP_ERROR ApplicationBasicCluster::ReadAttributeVendorId(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -355,10 +351,9 @@ CHIP_ERROR ApplicationBasicCluster::ReadAttributeApplicationName(Callback::Cance Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -367,10 +362,9 @@ CHIP_ERROR ApplicationBasicCluster::ReadAttributeProductId(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -379,10 +373,9 @@ CHIP_ERROR ApplicationBasicCluster::ReadAttributeApplicationId(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000005; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000005; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -391,10 +384,9 @@ CHIP_ERROR ApplicationBasicCluster::ReadAttributeCatalogVendorId(Callback::Cance Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000006; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000006; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -403,10 +395,9 @@ CHIP_ERROR ApplicationBasicCluster::ReadAttributeApplicationStatus(Callback::Can Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000007; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000007; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -415,10 +406,9 @@ CHIP_ERROR ApplicationBasicCluster::ReadAttributeClusterRevision(Callback::Cance Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -474,10 +464,9 @@ CHIP_ERROR ApplicationLauncherCluster::ReadAttributeApplicationLauncherList(Call Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, ApplicationLauncherClusterApplicationLauncherListListAttributeFilter); } @@ -486,10 +475,9 @@ CHIP_ERROR ApplicationLauncherCluster::ReadAttributeCatalogVendorId(Callback::Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -498,10 +486,9 @@ CHIP_ERROR ApplicationLauncherCluster::ReadAttributeApplicationId(Callback::Canc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -510,10 +497,9 @@ CHIP_ERROR ApplicationLauncherCluster::ReadAttributeClusterRevision(Callback::Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -608,10 +594,9 @@ CHIP_ERROR AudioOutputCluster::ReadAttributeAudioOutputList(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, AudioOutputClusterAudioOutputListListAttributeFilter); } @@ -620,10 +605,9 @@ CHIP_ERROR AudioOutputCluster::ReadAttributeCurrentAudioOutput(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -632,10 +616,9 @@ CHIP_ERROR AudioOutputCluster::ReadAttributeClusterRevision(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -727,10 +710,9 @@ CHIP_ERROR BarrierControlCluster::ReadAttributeBarrierMovingState(Callback::Canc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -739,10 +721,9 @@ CHIP_ERROR BarrierControlCluster::ReadAttributeBarrierSafetyStatus(Callback::Can Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -751,10 +732,9 @@ CHIP_ERROR BarrierControlCluster::ReadAttributeBarrierCapabilities(Callback::Can Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -763,10 +743,9 @@ CHIP_ERROR BarrierControlCluster::ReadAttributeBarrierPosition(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000A; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000A; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -775,10 +754,9 @@ CHIP_ERROR BarrierControlCluster::ReadAttributeClusterRevision(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -827,10 +805,9 @@ CHIP_ERROR BasicCluster::ReadAttributeInteractionModelVersion(Callback::Cancelab Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -838,10 +815,9 @@ CHIP_ERROR BasicCluster::ReadAttributeInteractionModelVersion(Callback::Cancelab CHIP_ERROR BasicCluster::ReadAttributeVendorName(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -849,10 +825,9 @@ CHIP_ERROR BasicCluster::ReadAttributeVendorName(Callback::Cancelable * onSucces CHIP_ERROR BasicCluster::ReadAttributeVendorID(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -861,10 +836,9 @@ CHIP_ERROR BasicCluster::ReadAttributeProductName(Callback::Cancelable * onSucce Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -872,10 +846,9 @@ CHIP_ERROR BasicCluster::ReadAttributeProductName(Callback::Cancelable * onSucce CHIP_ERROR BasicCluster::ReadAttributeProductID(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000004; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000004; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -883,10 +856,9 @@ CHIP_ERROR BasicCluster::ReadAttributeProductID(Callback::Cancelable * onSuccess CHIP_ERROR BasicCluster::ReadAttributeUserLabel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000005; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000005; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -905,10 +877,9 @@ CHIP_ERROR BasicCluster::WriteAttributeUserLabel(Callback::Cancelable * onSucces CHIP_ERROR BasicCluster::ReadAttributeLocation(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000006; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000006; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -928,10 +899,9 @@ CHIP_ERROR BasicCluster::ReadAttributeHardwareVersion(Callback::Cancelable * onS Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000007; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000007; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -940,10 +910,9 @@ CHIP_ERROR BasicCluster::ReadAttributeHardwareVersionString(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000008; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000008; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -952,10 +921,9 @@ CHIP_ERROR BasicCluster::ReadAttributeSoftwareVersion(Callback::Cancelable * onS Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000009; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000009; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -964,10 +932,9 @@ CHIP_ERROR BasicCluster::ReadAttributeSoftwareVersionString(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000A; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000A; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -976,10 +943,9 @@ CHIP_ERROR BasicCluster::ReadAttributeManufacturingDate(Callback::Cancelable * o Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000B; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000B; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -987,10 +953,9 @@ CHIP_ERROR BasicCluster::ReadAttributeManufacturingDate(Callback::Cancelable * o CHIP_ERROR BasicCluster::ReadAttributePartNumber(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000C; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000C; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -998,10 +963,9 @@ CHIP_ERROR BasicCluster::ReadAttributePartNumber(Callback::Cancelable * onSucces CHIP_ERROR BasicCluster::ReadAttributeProductURL(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000D; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000D; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -1010,10 +974,9 @@ CHIP_ERROR BasicCluster::ReadAttributeProductLabel(Callback::Cancelable * onSucc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000E; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000E; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -1022,10 +985,9 @@ CHIP_ERROR BasicCluster::ReadAttributeSerialNumber(Callback::Cancelable * onSucc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000F; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000F; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -1034,10 +996,9 @@ CHIP_ERROR BasicCluster::ReadAttributeLocalConfigDisabled(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000010; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000010; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -1056,10 +1017,9 @@ CHIP_ERROR BasicCluster::WriteAttributeLocalConfigDisabled(Callback::Cancelable CHIP_ERROR BasicCluster::ReadAttributeReachable(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000011; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000011; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -1068,10 +1028,9 @@ CHIP_ERROR BasicCluster::ReadAttributeClusterRevision(Callback::Cancelable * onS Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -1082,10 +1041,9 @@ CHIP_ERROR BinaryInputBasicCluster::ReadAttributeOutOfService(Callback::Cancelab Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000051; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000051; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -1105,10 +1063,9 @@ CHIP_ERROR BinaryInputBasicCluster::ReadAttributePresentValue(Callback::Cancelab Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000055; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000055; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -1129,10 +1086,9 @@ CHIP_ERROR BinaryInputBasicCluster::SubscribeAttributePresentValue(Callback::Can uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = BinaryInputBasic::Attributes::PresentValue::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = BinaryInputBasic::Attributes::PresentValue::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -1146,10 +1102,9 @@ CHIP_ERROR BinaryInputBasicCluster::ReadAttributeStatusFlags(Callback::Cancelabl Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000006F; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000006F; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -1159,10 +1114,9 @@ CHIP_ERROR BinaryInputBasicCluster::SubscribeAttributeStatusFlags(Callback::Canc uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = BinaryInputBasic::Attributes::StatusFlags::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = BinaryInputBasic::Attributes::StatusFlags::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -1176,10 +1130,9 @@ CHIP_ERROR BinaryInputBasicCluster::ReadAttributeClusterRevision(Callback::Cance Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -1285,10 +1238,9 @@ CHIP_ERROR BindingCluster::ReadAttributeClusterRevision(Callback::Cancelable * o Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -1299,10 +1251,9 @@ CHIP_ERROR BooleanStateCluster::ReadAttributeStateValue(Callback::Cancelable * o Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -1312,10 +1263,9 @@ CHIP_ERROR BooleanStateCluster::SubscribeAttributeStateValue(Callback::Cancelabl uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = BooleanState::Attributes::StateValue::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = BooleanState::Attributes::StateValue::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -1329,10 +1279,9 @@ CHIP_ERROR BooleanStateCluster::ReadAttributeClusterRevision(Callback::Cancelabl Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -1879,10 +1828,9 @@ CHIP_ERROR BridgedActionsCluster::ReadAttributeActionList(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BridgedActionsClusterActionListListAttributeFilter); } @@ -1891,10 +1839,9 @@ CHIP_ERROR BridgedActionsCluster::ReadAttributeEndpointList(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BridgedActionsClusterEndpointListListAttributeFilter); } @@ -1903,10 +1850,9 @@ CHIP_ERROR BridgedActionsCluster::ReadAttributeSetupUrl(Callback::Cancelable * o Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -1915,10 +1861,9 @@ CHIP_ERROR BridgedActionsCluster::ReadAttributeClusterRevision(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -1929,10 +1874,9 @@ CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeVendorName(Callback::Cancelab Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -1941,10 +1885,9 @@ CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeVendorID(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -1953,10 +1896,9 @@ CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeProductName(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -1965,10 +1907,9 @@ CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeUserLabel(Callback::Cancelabl Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000005; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000005; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -1988,10 +1929,9 @@ CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeHardwareVersion(Callback::Can Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000007; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000007; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -2000,10 +1940,9 @@ CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeHardwareVersionString(Callbac Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000008; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000008; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -2012,10 +1951,9 @@ CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeSoftwareVersion(Callback::Can Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000009; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000009; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -2024,10 +1962,9 @@ CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeSoftwareVersionString(Callbac Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000A; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000A; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -2036,10 +1973,9 @@ CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeManufacturingDate(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000B; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000B; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -2048,10 +1984,9 @@ CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributePartNumber(Callback::Cancelab Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000C; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000C; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -2060,10 +1995,9 @@ CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeProductURL(Callback::Cancelab Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000D; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000D; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -2072,10 +2006,9 @@ CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeProductLabel(Callback::Cancel Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000E; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000E; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -2084,10 +2017,9 @@ CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeSerialNumber(Callback::Cancel Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000F; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000F; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -2096,10 +2028,9 @@ CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeReachable(Callback::Cancelabl Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000011; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000011; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -2108,10 +2039,9 @@ CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeClusterRevision(Callback::Can Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3065,10 +2995,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeCurrentHue(Callback::Cancelable * o Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3078,10 +3007,9 @@ CHIP_ERROR ColorControlCluster::SubscribeAttributeCurrentHue(Callback::Cancelabl uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = ColorControl::Attributes::CurrentHue::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = ColorControl::Attributes::CurrentHue::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -3095,10 +3023,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeCurrentSaturation(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3108,10 +3035,9 @@ CHIP_ERROR ColorControlCluster::SubscribeAttributeCurrentSaturation(Callback::Ca uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = ColorControl::Attributes::CurrentSaturation::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = ColorControl::Attributes::CurrentSaturation::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -3125,10 +3051,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeRemainingTime(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3137,10 +3062,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeCurrentX(Callback::Cancelable * onS Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3150,10 +3074,9 @@ CHIP_ERROR ColorControlCluster::SubscribeAttributeCurrentX(Callback::Cancelable uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = ColorControl::Attributes::CurrentX::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = ColorControl::Attributes::CurrentX::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -3167,10 +3090,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeCurrentY(Callback::Cancelable * onS Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000004; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000004; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3180,10 +3102,9 @@ CHIP_ERROR ColorControlCluster::SubscribeAttributeCurrentY(Callback::Cancelable uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = ColorControl::Attributes::CurrentY::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = ColorControl::Attributes::CurrentY::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -3197,10 +3118,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeDriftCompensation(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000005; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000005; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3209,10 +3129,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeCompensationText(Callback::Cancelab Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000006; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000006; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3221,10 +3140,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeColorTemperature(Callback::Cancelab Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000007; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000007; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3234,10 +3152,9 @@ CHIP_ERROR ColorControlCluster::SubscribeAttributeColorTemperature(Callback::Can uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = ColorControl::Attributes::ColorTemperature::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = ColorControl::Attributes::ColorTemperature::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -3251,10 +3168,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeColorMode(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000008; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000008; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3263,10 +3179,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeColorControlOptions(Callback::Cance Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000F; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000F; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3286,10 +3201,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeNumberOfPrimaries(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000010; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000010; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3298,10 +3212,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributePrimary1X(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000011; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000011; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3310,10 +3223,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributePrimary1Y(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000012; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000012; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3322,10 +3234,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributePrimary1Intensity(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000013; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000013; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3334,10 +3245,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributePrimary2X(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000015; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000015; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3346,10 +3256,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributePrimary2Y(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000016; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000016; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3358,10 +3267,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributePrimary2Intensity(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000017; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000017; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3370,10 +3278,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributePrimary3X(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000019; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000019; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3382,10 +3289,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributePrimary3Y(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000001A; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000001A; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3394,10 +3300,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributePrimary3Intensity(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000001B; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000001B; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3406,10 +3311,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributePrimary4X(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000020; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000020; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3418,10 +3322,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributePrimary4Y(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000021; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000021; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3430,10 +3333,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributePrimary4Intensity(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000022; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000022; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3442,10 +3344,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributePrimary5X(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000024; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000024; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3454,10 +3355,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributePrimary5Y(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000025; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000025; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3466,10 +3366,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributePrimary5Intensity(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000026; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000026; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3478,10 +3377,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributePrimary6X(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000028; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000028; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3490,10 +3388,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributePrimary6Y(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000029; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000029; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3502,10 +3399,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributePrimary6Intensity(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000002A; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000002A; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3514,10 +3410,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeWhitePointX(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000030; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000030; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3537,10 +3432,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeWhitePointY(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000031; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000031; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3560,10 +3454,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeColorPointRX(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000032; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000032; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3583,10 +3476,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeColorPointRY(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000033; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000033; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3606,10 +3498,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeColorPointRIntensity(Callback::Canc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000034; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000034; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3629,10 +3520,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeColorPointGX(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000036; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000036; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3652,10 +3542,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeColorPointGY(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000037; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000037; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3675,10 +3564,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeColorPointGIntensity(Callback::Canc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000038; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000038; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3698,10 +3586,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeColorPointBX(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000003A; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000003A; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3721,10 +3608,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeColorPointBY(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000003B; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000003B; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3744,10 +3630,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeColorPointBIntensity(Callback::Canc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000003C; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000003C; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3767,10 +3652,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeEnhancedCurrentHue(Callback::Cancel Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00004000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00004000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3779,10 +3663,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeEnhancedColorMode(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00004001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00004001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3791,10 +3674,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeColorLoopActive(Callback::Cancelabl Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00004002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00004002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3803,10 +3685,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeColorLoopDirection(Callback::Cancel Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00004003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00004003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3815,10 +3696,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeColorLoopTime(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00004004; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00004004; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3827,10 +3707,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeColorLoopStartEnhancedHue(Callback: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00004005; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00004005; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3839,10 +3718,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeColorLoopStoredEnhancedHue(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00004006; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00004006; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3851,10 +3729,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeColorCapabilities(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000400A; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000400A; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3863,10 +3740,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeColorTempPhysicalMin(Callback::Canc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000400B; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000400B; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3875,10 +3751,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeColorTempPhysicalMax(Callback::Canc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000400C; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000400C; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3887,10 +3762,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeCoupleColorTempToLevelMinMireds(Cal Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000400D; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000400D; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3899,10 +3773,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeStartUpColorTemperatureMireds(Callb Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00004010; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00004010; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -3923,10 +3796,9 @@ CHIP_ERROR ColorControlCluster::ReadAttributeClusterRevision(Callback::Cancelabl Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -4023,10 +3895,9 @@ CHIP_ERROR ContentLauncherCluster::ReadAttributeAcceptsHeaderList(Callback::Canc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, ContentLauncherClusterAcceptsHeaderListListAttributeFilter); } @@ -4035,10 +3906,9 @@ CHIP_ERROR ContentLauncherCluster::ReadAttributeSupportedStreamingTypes(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, ContentLauncherClusterSupportedStreamingTypesListAttributeFilter); } @@ -4047,10 +3917,9 @@ CHIP_ERROR ContentLauncherCluster::ReadAttributeClusterRevision(Callback::Cancel Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -4061,10 +3930,9 @@ CHIP_ERROR DescriptorCluster::ReadAttributeDeviceList(Callback::Cancelable * onS Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, DescriptorClusterDeviceListListAttributeFilter); } @@ -4073,10 +3941,9 @@ CHIP_ERROR DescriptorCluster::ReadAttributeServerList(Callback::Cancelable * onS Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, DescriptorClusterServerListListAttributeFilter); } @@ -4085,10 +3952,9 @@ CHIP_ERROR DescriptorCluster::ReadAttributeClientList(Callback::Cancelable * onS Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, DescriptorClusterClientListListAttributeFilter); } @@ -4097,10 +3963,9 @@ CHIP_ERROR DescriptorCluster::ReadAttributePartsList(Callback::Cancelable * onSu Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, DescriptorClusterPartsListListAttributeFilter); } @@ -4109,10 +3974,9 @@ CHIP_ERROR DescriptorCluster::ReadAttributeClusterRevision(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5159,10 +5023,9 @@ CHIP_ERROR DoorLockCluster::ReadAttributeLockState(Callback::Cancelable * onSucc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5172,10 +5035,9 @@ CHIP_ERROR DoorLockCluster::SubscribeAttributeLockState(Callback::Cancelable * o uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = DoorLock::Attributes::LockState::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = DoorLock::Attributes::LockState::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -5189,10 +5051,9 @@ CHIP_ERROR DoorLockCluster::ReadAttributeLockType(Callback::Cancelable * onSucce Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5201,10 +5062,9 @@ CHIP_ERROR DoorLockCluster::ReadAttributeActuatorEnabled(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5213,10 +5073,9 @@ CHIP_ERROR DoorLockCluster::ReadAttributeClusterRevision(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5227,10 +5086,9 @@ CHIP_ERROR ElectricalMeasurementCluster::ReadAttributeMeasurementType(Callback:: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5239,10 +5097,9 @@ CHIP_ERROR ElectricalMeasurementCluster::ReadAttributeTotalActivePower(Callback: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000304; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000304; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5251,10 +5108,9 @@ CHIP_ERROR ElectricalMeasurementCluster::ReadAttributeRmsVoltage(Callback::Cance Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000505; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000505; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5263,10 +5119,9 @@ CHIP_ERROR ElectricalMeasurementCluster::ReadAttributeRmsVoltageMin(Callback::Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000506; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000506; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5275,10 +5130,9 @@ CHIP_ERROR ElectricalMeasurementCluster::ReadAttributeRmsVoltageMax(Callback::Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000507; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000507; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5287,10 +5141,9 @@ CHIP_ERROR ElectricalMeasurementCluster::ReadAttributeRmsCurrent(Callback::Cance Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000508; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000508; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5299,10 +5152,9 @@ CHIP_ERROR ElectricalMeasurementCluster::ReadAttributeRmsCurrentMin(Callback::Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000509; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000509; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5311,10 +5163,9 @@ CHIP_ERROR ElectricalMeasurementCluster::ReadAttributeRmsCurrentMax(Callback::Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000050A; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000050A; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5323,10 +5174,9 @@ CHIP_ERROR ElectricalMeasurementCluster::ReadAttributeActivePower(Callback::Canc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000050B; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000050B; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5335,10 +5185,9 @@ CHIP_ERROR ElectricalMeasurementCluster::ReadAttributeActivePowerMin(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000050C; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000050C; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5347,10 +5196,9 @@ CHIP_ERROR ElectricalMeasurementCluster::ReadAttributeActivePowerMax(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000050D; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000050D; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5359,10 +5207,9 @@ CHIP_ERROR ElectricalMeasurementCluster::ReadAttributeClusterRevision(Callback:: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5413,10 +5260,9 @@ CHIP_ERROR EthernetNetworkDiagnosticsCluster::ReadAttributePHYRate(Callback::Can Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5425,10 +5271,9 @@ CHIP_ERROR EthernetNetworkDiagnosticsCluster::ReadAttributeFullDuplex(Callback:: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5437,10 +5282,9 @@ CHIP_ERROR EthernetNetworkDiagnosticsCluster::ReadAttributePacketRxCount(Callbac Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5449,10 +5293,9 @@ CHIP_ERROR EthernetNetworkDiagnosticsCluster::ReadAttributePacketTxCount(Callbac Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5461,10 +5304,9 @@ CHIP_ERROR EthernetNetworkDiagnosticsCluster::ReadAttributeTxErrCount(Callback:: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000004; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000004; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5473,10 +5315,9 @@ CHIP_ERROR EthernetNetworkDiagnosticsCluster::ReadAttributeCollisionCount(Callba Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000005; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000005; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5485,10 +5326,9 @@ CHIP_ERROR EthernetNetworkDiagnosticsCluster::ReadAttributeOverrunCount(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000006; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000006; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5497,10 +5337,9 @@ CHIP_ERROR EthernetNetworkDiagnosticsCluster::ReadAttributeCarrierDetect(Callbac Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000007; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000007; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5509,10 +5348,9 @@ CHIP_ERROR EthernetNetworkDiagnosticsCluster::ReadAttributeTimeSinceReset(Callba Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000008; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000008; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5521,10 +5359,9 @@ CHIP_ERROR EthernetNetworkDiagnosticsCluster::ReadAttributeClusterRevision(Callb Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5535,10 +5372,9 @@ CHIP_ERROR FixedLabelCluster::ReadAttributeLabelList(Callback::Cancelable * onSu Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, FixedLabelClusterLabelListListAttributeFilter); } @@ -5547,10 +5383,9 @@ CHIP_ERROR FixedLabelCluster::ReadAttributeClusterRevision(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5561,10 +5396,9 @@ CHIP_ERROR FlowMeasurementCluster::ReadAttributeMeasuredValue(Callback::Cancelab Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5573,10 +5407,9 @@ CHIP_ERROR FlowMeasurementCluster::ReadAttributeMinMeasuredValue(Callback::Cance Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5585,10 +5418,9 @@ CHIP_ERROR FlowMeasurementCluster::ReadAttributeMaxMeasuredValue(Callback::Cance Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5597,10 +5429,9 @@ CHIP_ERROR FlowMeasurementCluster::ReadAttributeTolerance(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5609,10 +5440,9 @@ CHIP_ERROR FlowMeasurementCluster::ReadAttributeClusterRevision(Callback::Cancel Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5758,10 +5588,9 @@ CHIP_ERROR GeneralCommissioningCluster::ReadAttributeBreadcrumb(Callback::Cancel Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5781,10 +5610,9 @@ CHIP_ERROR GeneralCommissioningCluster::ReadAttributeBasicCommissioningInfoList( Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, GeneralCommissioningClusterBasicCommissioningInfoListListAttributeFilter); } @@ -5793,10 +5621,9 @@ CHIP_ERROR GeneralCommissioningCluster::ReadAttributeClusterRevision(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5807,10 +5634,9 @@ CHIP_ERROR GeneralDiagnosticsCluster::ReadAttributeNetworkInterfaces(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, GeneralDiagnosticsClusterNetworkInterfacesListAttributeFilter); } @@ -5819,10 +5645,9 @@ CHIP_ERROR GeneralDiagnosticsCluster::ReadAttributeRebootCount(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5831,10 +5656,9 @@ CHIP_ERROR GeneralDiagnosticsCluster::ReadAttributeUpTime(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5843,10 +5667,9 @@ CHIP_ERROR GeneralDiagnosticsCluster::ReadAttributeTotalOperationalHours(Callbac Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5855,10 +5678,9 @@ CHIP_ERROR GeneralDiagnosticsCluster::ReadAttributeBootReasons(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000004; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000004; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5867,10 +5689,9 @@ CHIP_ERROR GeneralDiagnosticsCluster::ReadAttributeClusterRevision(Callback::Can Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -5881,10 +5702,9 @@ CHIP_ERROR GroupKeyManagementCluster::ReadAttributeGroups(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, GroupKeyManagementClusterGroupsListAttributeFilter); } @@ -5893,10 +5713,9 @@ CHIP_ERROR GroupKeyManagementCluster::ReadAttributeGroupKeys(Callback::Cancelabl Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, GroupKeyManagementClusterGroupKeysListAttributeFilter); } @@ -5905,10 +5724,9 @@ CHIP_ERROR GroupKeyManagementCluster::ReadAttributeClusterRevision(Callback::Can Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -6168,10 +5986,9 @@ CHIP_ERROR GroupsCluster::ReadAttributeNameSupport(Callback::Cancelable * onSucc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -6180,10 +5997,9 @@ CHIP_ERROR GroupsCluster::ReadAttributeClusterRevision(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -6316,10 +6132,9 @@ CHIP_ERROR IdentifyCluster::ReadAttributeIdentifyTime(Callback::Cancelable * onS Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -6339,10 +6154,9 @@ CHIP_ERROR IdentifyCluster::ReadAttributeIdentifyType(Callback::Cancelable * onS Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -6351,10 +6165,9 @@ CHIP_ERROR IdentifyCluster::ReadAttributeClusterRevision(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -6365,10 +6178,9 @@ CHIP_ERROR IlluminanceMeasurementCluster::ReadAttributeMeasuredValue(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -6378,10 +6190,9 @@ CHIP_ERROR IlluminanceMeasurementCluster::SubscribeAttributeMeasuredValue(Callba uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = IlluminanceMeasurement::Attributes::MeasuredValue::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = IlluminanceMeasurement::Attributes::MeasuredValue::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -6395,10 +6206,9 @@ CHIP_ERROR IlluminanceMeasurementCluster::ReadAttributeMinMeasuredValue(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -6407,10 +6217,9 @@ CHIP_ERROR IlluminanceMeasurementCluster::ReadAttributeMaxMeasuredValue(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -6419,10 +6228,9 @@ CHIP_ERROR IlluminanceMeasurementCluster::ReadAttributeTolerance(Callback::Cance Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -6431,10 +6239,9 @@ CHIP_ERROR IlluminanceMeasurementCluster::ReadAttributeLightSensorType(Callback: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000004; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000004; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -6443,10 +6250,9 @@ CHIP_ERROR IlluminanceMeasurementCluster::ReadAttributeClusterRevision(Callback: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -6498,10 +6304,9 @@ CHIP_ERROR KeypadInputCluster::ReadAttributeClusterRevision(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -6869,10 +6674,9 @@ CHIP_ERROR LevelControlCluster::ReadAttributeCurrentLevel(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -6882,10 +6686,9 @@ CHIP_ERROR LevelControlCluster::SubscribeAttributeCurrentLevel(Callback::Cancela uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = LevelControl::Attributes::CurrentLevel::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = LevelControl::Attributes::CurrentLevel::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -6899,10 +6702,9 @@ CHIP_ERROR LevelControlCluster::ReadAttributeRemainingTime(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -6911,10 +6713,9 @@ CHIP_ERROR LevelControlCluster::ReadAttributeMinLevel(Callback::Cancelable * onS Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -6923,10 +6724,9 @@ CHIP_ERROR LevelControlCluster::ReadAttributeMaxLevel(Callback::Cancelable * onS Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -6935,10 +6735,9 @@ CHIP_ERROR LevelControlCluster::ReadAttributeCurrentFrequency(Callback::Cancelab Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000004; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000004; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -6947,10 +6746,9 @@ CHIP_ERROR LevelControlCluster::ReadAttributeMinFrequency(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000005; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000005; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -6959,10 +6757,9 @@ CHIP_ERROR LevelControlCluster::ReadAttributeMaxFrequency(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000006; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000006; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -6971,10 +6768,9 @@ CHIP_ERROR LevelControlCluster::ReadAttributeOptions(Callback::Cancelable * onSu Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000F; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000F; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -6994,10 +6790,9 @@ CHIP_ERROR LevelControlCluster::ReadAttributeOnOffTransitionTime(Callback::Cance Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000010; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000010; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -7017,10 +6812,9 @@ CHIP_ERROR LevelControlCluster::ReadAttributeOnLevel(Callback::Cancelable * onSu Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000011; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000011; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -7040,10 +6834,9 @@ CHIP_ERROR LevelControlCluster::ReadAttributeOnTransitionTime(Callback::Cancelab Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000012; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000012; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -7063,10 +6856,9 @@ CHIP_ERROR LevelControlCluster::ReadAttributeOffTransitionTime(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000013; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000013; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -7086,10 +6878,9 @@ CHIP_ERROR LevelControlCluster::ReadAttributeDefaultMoveRate(Callback::Cancelabl Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000014; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000014; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -7109,10 +6900,9 @@ CHIP_ERROR LevelControlCluster::ReadAttributeStartUpCurrentLevel(Callback::Cance Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00004000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00004000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -7132,10 +6922,9 @@ CHIP_ERROR LevelControlCluster::ReadAttributeClusterRevision(Callback::Cancelabl Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -7184,10 +6973,9 @@ CHIP_ERROR LowPowerCluster::ReadAttributeClusterRevision(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -7358,10 +7146,9 @@ CHIP_ERROR MediaInputCluster::ReadAttributeMediaInputList(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, MediaInputClusterMediaInputListListAttributeFilter); } @@ -7370,10 +7157,9 @@ CHIP_ERROR MediaInputCluster::ReadAttributeCurrentMediaInput(Callback::Cancelabl Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -7382,10 +7168,9 @@ CHIP_ERROR MediaInputCluster::ReadAttributeClusterRevision(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -7824,10 +7609,9 @@ CHIP_ERROR MediaPlaybackCluster::ReadAttributePlaybackState(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -7836,10 +7620,9 @@ CHIP_ERROR MediaPlaybackCluster::ReadAttributeStartTime(Callback::Cancelable * o Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -7848,10 +7631,9 @@ CHIP_ERROR MediaPlaybackCluster::ReadAttributeDuration(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -7860,10 +7642,9 @@ CHIP_ERROR MediaPlaybackCluster::ReadAttributePositionUpdatedAt(Callback::Cancel Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -7872,10 +7653,9 @@ CHIP_ERROR MediaPlaybackCluster::ReadAttributePosition(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000004; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000004; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -7884,10 +7664,9 @@ CHIP_ERROR MediaPlaybackCluster::ReadAttributePlaybackSpeed(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000005; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000005; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -7896,10 +7675,9 @@ CHIP_ERROR MediaPlaybackCluster::ReadAttributeSeekRangeEnd(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000006; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000006; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -7908,10 +7686,9 @@ CHIP_ERROR MediaPlaybackCluster::ReadAttributeSeekRangeStart(Callback::Cancelabl Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000007; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000007; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -7920,10 +7697,9 @@ CHIP_ERROR MediaPlaybackCluster::ReadAttributeClusterRevision(Callback::Cancelab Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -7975,10 +7751,9 @@ CHIP_ERROR ModeSelectCluster::ReadAttributeCurrentMode(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -7988,10 +7763,9 @@ CHIP_ERROR ModeSelectCluster::SubscribeAttributeCurrentMode(Callback::Cancelable uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = ModeSelect::Attributes::CurrentMode::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = ModeSelect::Attributes::CurrentMode::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -8005,10 +7779,9 @@ CHIP_ERROR ModeSelectCluster::ReadAttributeSupportedModes(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, ModeSelectClusterSupportedModesListAttributeFilter); } @@ -8017,10 +7790,9 @@ CHIP_ERROR ModeSelectCluster::ReadAttributeOnMode(Callback::Cancelable * onSucce Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -8040,10 +7812,9 @@ CHIP_ERROR ModeSelectCluster::ReadAttributeStartUpMode(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -8052,10 +7823,9 @@ CHIP_ERROR ModeSelectCluster::ReadAttributeDescription(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000004; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000004; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -8064,10 +7834,9 @@ CHIP_ERROR ModeSelectCluster::ReadAttributeClusterRevision(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -8456,10 +8225,9 @@ CHIP_ERROR NetworkCommissioningCluster::ReadAttributeFeatureMap(Callback::Cancel Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFC; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFC; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -8468,10 +8236,9 @@ CHIP_ERROR NetworkCommissioningCluster::ReadAttributeClusterRevision(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -8631,10 +8398,9 @@ CHIP_ERROR OtaSoftwareUpdateProviderCluster::ReadAttributeClusterRevision(Callba Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -8695,10 +8461,9 @@ CHIP_ERROR OtaSoftwareUpdateRequestorCluster::ReadAttributeDefaultOtaProvider(Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -8720,10 +8485,9 @@ CHIP_ERROR OtaSoftwareUpdateRequestorCluster::ReadAttributeUpdatePossible(Callba Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -8732,10 +8496,9 @@ CHIP_ERROR OtaSoftwareUpdateRequestorCluster::ReadAttributeClusterRevision(Callb Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -8746,10 +8509,9 @@ CHIP_ERROR OccupancySensingCluster::ReadAttributeOccupancy(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -8759,10 +8521,9 @@ CHIP_ERROR OccupancySensingCluster::SubscribeAttributeOccupancy(Callback::Cancel uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = OccupancySensing::Attributes::Occupancy::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = OccupancySensing::Attributes::Occupancy::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -8776,10 +8537,9 @@ CHIP_ERROR OccupancySensingCluster::ReadAttributeOccupancySensorType(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -8788,10 +8548,9 @@ CHIP_ERROR OccupancySensingCluster::ReadAttributeOccupancySensorTypeBitmap(Callb Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -8800,10 +8559,9 @@ CHIP_ERROR OccupancySensingCluster::ReadAttributeClusterRevision(Callback::Cance Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9053,10 +8811,9 @@ CHIP_ERROR OnOffCluster::Toggle(Callback::Cancelable * onSuccessCallback, Callba CHIP_ERROR OnOffCluster::ReadAttributeOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9065,10 +8822,9 @@ CHIP_ERROR OnOffCluster::SubscribeAttributeOnOff(Callback::Cancelable * onSucces uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = OnOff::Attributes::OnOff::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = OnOff::Attributes::OnOff::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -9082,10 +8838,9 @@ CHIP_ERROR OnOffCluster::ReadAttributeGlobalSceneControl(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00004000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00004000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9093,10 +8848,9 @@ CHIP_ERROR OnOffCluster::ReadAttributeGlobalSceneControl(Callback::Cancelable * CHIP_ERROR OnOffCluster::ReadAttributeOnTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00004001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00004001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9116,10 +8870,9 @@ CHIP_ERROR OnOffCluster::ReadAttributeOffWaitTime(Callback::Cancelable * onSucce Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00004002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00004002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9139,10 +8892,9 @@ CHIP_ERROR OnOffCluster::ReadAttributeStartUpOnOff(Callback::Cancelable * onSucc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00004003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00004003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9161,10 +8913,9 @@ CHIP_ERROR OnOffCluster::WriteAttributeStartUpOnOff(Callback::Cancelable * onSuc CHIP_ERROR OnOffCluster::ReadAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFC; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFC; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9173,10 +8924,9 @@ CHIP_ERROR OnOffCluster::ReadAttributeClusterRevision(Callback::Cancelable * onS Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9187,10 +8937,9 @@ CHIP_ERROR OnOffSwitchConfigurationCluster::ReadAttributeSwitchType(Callback::Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9199,10 +8948,9 @@ CHIP_ERROR OnOffSwitchConfigurationCluster::ReadAttributeSwitchActions(Callback: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000010; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000010; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9222,10 +8970,9 @@ CHIP_ERROR OnOffSwitchConfigurationCluster::ReadAttributeClusterRevision(Callbac Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9627,10 +9374,9 @@ CHIP_ERROR OperationalCredentialsCluster::ReadAttributeFabricsList(Callback::Can Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, OperationalCredentialsClusterFabricsListListAttributeFilter); } @@ -9639,10 +9385,9 @@ CHIP_ERROR OperationalCredentialsCluster::ReadAttributeSupportedFabrics(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9651,10 +9396,9 @@ CHIP_ERROR OperationalCredentialsCluster::ReadAttributeCommissionedFabrics(Callb Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9663,10 +9407,9 @@ CHIP_ERROR OperationalCredentialsCluster::ReadAttributeTrustedRootCertificates(C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000004; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000004; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, OperationalCredentialsClusterTrustedRootCertificatesListAttributeFilter); } @@ -9675,10 +9418,9 @@ CHIP_ERROR OperationalCredentialsCluster::ReadAttributeCurrentFabricIndex(Callba Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000005; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000005; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9687,10 +9429,9 @@ CHIP_ERROR OperationalCredentialsCluster::ReadAttributeClusterRevision(Callback: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9701,10 +9442,9 @@ CHIP_ERROR PowerSourceCluster::ReadAttributeStatus(Callback::Cancelable * onSucc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9713,10 +9453,9 @@ CHIP_ERROR PowerSourceCluster::ReadAttributeOrder(Callback::Cancelable * onSucce Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9725,10 +9464,9 @@ CHIP_ERROR PowerSourceCluster::ReadAttributeDescription(Callback::Cancelable * o Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9737,10 +9475,9 @@ CHIP_ERROR PowerSourceCluster::ReadAttributeBatteryVoltage(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000B; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000B; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9749,10 +9486,9 @@ CHIP_ERROR PowerSourceCluster::ReadAttributeBatteryPercentRemaining(Callback::Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000C; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000C; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9761,10 +9497,9 @@ CHIP_ERROR PowerSourceCluster::ReadAttributeBatteryTimeRemaining(Callback::Cance Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000D; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000D; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9773,10 +9508,9 @@ CHIP_ERROR PowerSourceCluster::ReadAttributeBatteryChargeLevel(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000E; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000E; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9785,10 +9519,9 @@ CHIP_ERROR PowerSourceCluster::ReadAttributeActiveBatteryFaults(Callback::Cancel Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000012; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000012; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, PowerSourceClusterActiveBatteryFaultsListAttributeFilter); } @@ -9797,10 +9530,9 @@ CHIP_ERROR PowerSourceCluster::ReadAttributeBatteryChargeState(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000001A; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000001A; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9809,10 +9541,9 @@ CHIP_ERROR PowerSourceCluster::ReadAttributeFeatureMap(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFC; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFC; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9821,10 +9552,9 @@ CHIP_ERROR PowerSourceCluster::ReadAttributeClusterRevision(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9835,10 +9565,9 @@ CHIP_ERROR PressureMeasurementCluster::ReadAttributeMeasuredValue(Callback::Canc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9848,10 +9577,9 @@ CHIP_ERROR PressureMeasurementCluster::SubscribeAttributeMeasuredValue(Callback: uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = PressureMeasurement::Attributes::MeasuredValue::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = PressureMeasurement::Attributes::MeasuredValue::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -9865,10 +9593,9 @@ CHIP_ERROR PressureMeasurementCluster::ReadAttributeMinMeasuredValue(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9877,10 +9604,9 @@ CHIP_ERROR PressureMeasurementCluster::ReadAttributeMaxMeasuredValue(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9889,10 +9615,9 @@ CHIP_ERROR PressureMeasurementCluster::ReadAttributeClusterRevision(Callback::Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9903,10 +9628,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeMaxPressure(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9915,10 +9639,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeMaxSpeed(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9927,10 +9650,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeMaxFlow(Callback::Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9939,10 +9661,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeMinConstPressure(Cal Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9951,10 +9672,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeMaxConstPressure(Cal Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000004; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000004; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9963,10 +9683,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeMinCompPressure(Call Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000005; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000005; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9975,10 +9694,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeMaxCompPressure(Call Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000006; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000006; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9987,10 +9705,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeMinConstSpeed(Callba Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000007; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000007; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -9999,10 +9716,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeMaxConstSpeed(Callba Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000008; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000008; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10011,10 +9727,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeMinConstFlow(Callbac Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000009; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000009; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10023,10 +9738,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeMaxConstFlow(Callbac Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000A; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000A; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10035,10 +9749,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeMinConstTemp(Callbac Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000B; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000B; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10047,10 +9760,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeMaxConstTemp(Callbac Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000C; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000C; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10059,10 +9771,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributePumpStatus(Callback: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000010; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000010; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10072,10 +9783,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributePumpStatus(Call uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = PumpConfigurationAndControl::Attributes::PumpStatus::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::PumpStatus::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -10089,10 +9799,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeEffectiveOperationMo Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000011; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000011; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10101,10 +9810,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeEffectiveControlMode Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000012; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000012; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10113,10 +9821,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeCapacity(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000013; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000013; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10126,10 +9833,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeCapacity(Callba uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = PumpConfigurationAndControl::Attributes::Capacity::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::Capacity::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -10143,10 +9849,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeSpeed(Callback::Canc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000014; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000014; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10155,10 +9860,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeLifetimeEnergyConsum Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000017; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000017; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10167,10 +9871,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeOperationMode(Callba Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000020; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000020; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10190,10 +9893,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeControlMode(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000021; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000021; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10213,10 +9915,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeAlarmMask(Callback:: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000022; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000022; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10225,10 +9926,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeFeatureMap(Callback: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFC; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFC; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10237,10 +9937,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeClusterRevision(Call Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10251,10 +9950,9 @@ CHIP_ERROR RelativeHumidityMeasurementCluster::ReadAttributeMeasuredValue(Callba Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10264,10 +9962,9 @@ CHIP_ERROR RelativeHumidityMeasurementCluster::SubscribeAttributeMeasuredValue(C uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = RelativeHumidityMeasurement::Attributes::MeasuredValue::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = RelativeHumidityMeasurement::Attributes::MeasuredValue::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -10281,10 +9978,9 @@ CHIP_ERROR RelativeHumidityMeasurementCluster::ReadAttributeMinMeasuredValue(Cal Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10293,10 +9989,9 @@ CHIP_ERROR RelativeHumidityMeasurementCluster::ReadAttributeMaxMeasuredValue(Cal Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10305,10 +10000,9 @@ CHIP_ERROR RelativeHumidityMeasurementCluster::ReadAttributeTolerance(Callback:: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10318,10 +10012,9 @@ CHIP_ERROR RelativeHumidityMeasurementCluster::SubscribeAttributeTolerance(Callb uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = RelativeHumidityMeasurement::Attributes::Tolerance::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = RelativeHumidityMeasurement::Attributes::Tolerance::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -10335,10 +10028,9 @@ CHIP_ERROR RelativeHumidityMeasurementCluster::ReadAttributeClusterRevision(Call Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10659,10 +10351,9 @@ CHIP_ERROR ScenesCluster::ReadAttributeSceneCount(Callback::Cancelable * onSucce Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10671,10 +10362,9 @@ CHIP_ERROR ScenesCluster::ReadAttributeCurrentScene(Callback::Cancelable * onSuc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10683,10 +10373,9 @@ CHIP_ERROR ScenesCluster::ReadAttributeCurrentGroup(Callback::Cancelable * onSuc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10695,10 +10384,9 @@ CHIP_ERROR ScenesCluster::ReadAttributeSceneValid(Callback::Cancelable * onSucce Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10707,10 +10395,9 @@ CHIP_ERROR ScenesCluster::ReadAttributeNameSupport(Callback::Cancelable * onSucc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000004; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000004; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10719,10 +10406,9 @@ CHIP_ERROR ScenesCluster::ReadAttributeClusterRevision(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10773,10 +10459,9 @@ CHIP_ERROR SoftwareDiagnosticsCluster::ReadAttributeCurrentHeapFree(Callback::Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10785,10 +10470,9 @@ CHIP_ERROR SoftwareDiagnosticsCluster::ReadAttributeCurrentHeapUsed(Callback::Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10797,10 +10481,9 @@ CHIP_ERROR SoftwareDiagnosticsCluster::ReadAttributeCurrentHeapHighWatermark(Cal Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10809,10 +10492,9 @@ CHIP_ERROR SoftwareDiagnosticsCluster::ReadAttributeClusterRevision(Callback::Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10823,10 +10505,9 @@ CHIP_ERROR SwitchCluster::ReadAttributeNumberOfPositions(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10835,10 +10516,9 @@ CHIP_ERROR SwitchCluster::ReadAttributeCurrentPosition(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10848,10 +10528,9 @@ CHIP_ERROR SwitchCluster::SubscribeAttributeCurrentPosition(Callback::Cancelable uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = Switch::Attributes::CurrentPosition::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = Switch::Attributes::CurrentPosition::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -10865,10 +10544,9 @@ CHIP_ERROR SwitchCluster::ReadAttributeMultiPressMax(Callback::Cancelable * onSu Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10877,10 +10555,9 @@ CHIP_ERROR SwitchCluster::ReadAttributeFeatureMap(Callback::Cancelable * onSucce Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFC; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFC; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -10889,10 +10566,9 @@ CHIP_ERROR SwitchCluster::ReadAttributeClusterRevision(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -11029,10 +10705,9 @@ CHIP_ERROR TvChannelCluster::ReadAttributeTvChannelList(Callback::Cancelable * o Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, TvChannelClusterTvChannelListListAttributeFilter); } @@ -11041,10 +10716,9 @@ CHIP_ERROR TvChannelCluster::ReadAttributeTvChannelLineup(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -11053,10 +10727,9 @@ CHIP_ERROR TvChannelCluster::ReadAttributeCurrentTvChannel(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -11065,10 +10738,9 @@ CHIP_ERROR TvChannelCluster::ReadAttributeClusterRevision(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -11122,10 +10794,9 @@ CHIP_ERROR TargetNavigatorCluster::ReadAttributeTargetNavigatorList(Callback::Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, TargetNavigatorClusterTargetNavigatorListListAttributeFilter); } @@ -11134,10 +10805,9 @@ CHIP_ERROR TargetNavigatorCluster::ReadAttributeClusterRevision(Callback::Cancel Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -11148,10 +10818,9 @@ CHIP_ERROR TemperatureMeasurementCluster::ReadAttributeMeasuredValue(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -11161,10 +10830,9 @@ CHIP_ERROR TemperatureMeasurementCluster::SubscribeAttributeMeasuredValue(Callba uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = TemperatureMeasurement::Attributes::MeasuredValue::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = TemperatureMeasurement::Attributes::MeasuredValue::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -11178,10 +10846,9 @@ CHIP_ERROR TemperatureMeasurementCluster::ReadAttributeMinMeasuredValue(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -11190,10 +10857,9 @@ CHIP_ERROR TemperatureMeasurementCluster::ReadAttributeMaxMeasuredValue(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -11202,10 +10868,9 @@ CHIP_ERROR TemperatureMeasurementCluster::ReadAttributeTolerance(Callback::Cance Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -11215,10 +10880,9 @@ CHIP_ERROR TemperatureMeasurementCluster::SubscribeAttributeTolerance(Callback:: uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = TemperatureMeasurement::Attributes::Tolerance::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = TemperatureMeasurement::Attributes::Tolerance::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -11232,10 +10896,9 @@ CHIP_ERROR TemperatureMeasurementCluster::ReadAttributeClusterRevision(Callback: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -11717,10 +11380,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeBoolean(Callback::Cancelable * onSuc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -11740,10 +11402,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeBitmap8(Callback::Cancelable * onSuc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -11763,10 +11424,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeBitmap16(Callback::Cancelable * onSu Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -11786,10 +11446,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeBitmap32(Callback::Cancelable * onSu Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -11809,10 +11468,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeBitmap64(Callback::Cancelable * onSu Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000004; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000004; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -11832,10 +11490,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeInt8u(Callback::Cancelable * onSucce Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000005; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000005; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -11855,10 +11512,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeInt16u(Callback::Cancelable * onSucc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000006; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000006; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -11878,10 +11534,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeInt32u(Callback::Cancelable * onSucc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000008; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000008; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -11901,10 +11556,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeInt64u(Callback::Cancelable * onSucc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000C; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000C; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -11924,10 +11578,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeInt8s(Callback::Cancelable * onSucce Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000D; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000D; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -11947,10 +11600,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeInt16s(Callback::Cancelable * onSucc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000E; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000E; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -11970,10 +11622,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeInt32s(Callback::Cancelable * onSucc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000010; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000010; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -11993,10 +11644,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeInt64s(Callback::Cancelable * onSucc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000014; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000014; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12016,10 +11666,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeEnum8(Callback::Cancelable * onSucce Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000015; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000015; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12039,10 +11688,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeEnum16(Callback::Cancelable * onSucc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000016; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000016; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12062,10 +11710,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeOctetString(Callback::Cancelable * o Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000019; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000019; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12085,10 +11732,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeListInt8u(Callback::Cancelable * onS Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000001A; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000001A; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, TestClusterClusterListInt8uListAttributeFilter); } @@ -12097,10 +11743,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeListOctetString(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000001B; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000001B; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, TestClusterClusterListOctetStringListAttributeFilter); } @@ -12109,10 +11754,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeListStructOctetString(Callback::Canc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000001C; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000001C; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, TestClusterClusterListStructOctetStringListAttributeFilter); } @@ -12121,10 +11765,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeLongOctetString(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000001D; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000001D; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12144,10 +11787,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeCharString(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000001E; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000001E; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12167,10 +11809,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeLongCharString(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000001F; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000001F; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12190,10 +11831,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeEpochUs(Callback::Cancelable * onSuc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000020; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000020; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12213,10 +11853,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeEpochS(Callback::Cancelable * onSucc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000021; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000021; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12236,10 +11875,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeVendorId(Callback::Cancelable * onSu Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000022; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000022; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12259,10 +11897,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeListNullablesAndOptionalsStruct(Call Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000023; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000023; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, TestClusterClusterListNullablesAndOptionalsStructListAttributeFilter); } @@ -12271,10 +11908,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeUnsupported(Callback::Cancelable * o Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x000000FF; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x000000FF; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12294,10 +11930,9 @@ CHIP_ERROR TestClusterCluster::ReadAttributeClusterRevision(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12519,10 +12154,9 @@ CHIP_ERROR ThermostatCluster::ReadAttributeLocalTemperature(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12532,10 +12166,9 @@ CHIP_ERROR ThermostatCluster::SubscribeAttributeLocalTemperature(Callback::Cance uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = Thermostat::Attributes::LocalTemperature::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = Thermostat::Attributes::LocalTemperature::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -12549,10 +12182,9 @@ CHIP_ERROR ThermostatCluster::ReadAttributeAbsMinHeatSetpointLimit(Callback::Can Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12561,10 +12193,9 @@ CHIP_ERROR ThermostatCluster::ReadAttributeAbsMaxHeatSetpointLimit(Callback::Can Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000004; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000004; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12573,10 +12204,9 @@ CHIP_ERROR ThermostatCluster::ReadAttributeAbsMinCoolSetpointLimit(Callback::Can Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000005; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000005; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12585,10 +12215,9 @@ CHIP_ERROR ThermostatCluster::ReadAttributeAbsMaxCoolSetpointLimit(Callback::Can Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000006; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000006; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12597,10 +12226,9 @@ CHIP_ERROR ThermostatCluster::ReadAttributeOccupiedCoolingSetpoint(Callback::Can Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000011; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000011; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12620,10 +12248,9 @@ CHIP_ERROR ThermostatCluster::ReadAttributeOccupiedHeatingSetpoint(Callback::Can Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000012; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000012; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12643,10 +12270,9 @@ CHIP_ERROR ThermostatCluster::ReadAttributeMinHeatSetpointLimit(Callback::Cancel Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000015; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000015; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12666,10 +12292,9 @@ CHIP_ERROR ThermostatCluster::ReadAttributeMaxHeatSetpointLimit(Callback::Cancel Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000016; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000016; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12689,10 +12314,9 @@ CHIP_ERROR ThermostatCluster::ReadAttributeMinCoolSetpointLimit(Callback::Cancel Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000017; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000017; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12712,10 +12336,9 @@ CHIP_ERROR ThermostatCluster::ReadAttributeMaxCoolSetpointLimit(Callback::Cancel Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000018; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000018; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12735,10 +12358,9 @@ CHIP_ERROR ThermostatCluster::ReadAttributeMinSetpointDeadBand(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000019; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000019; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12758,10 +12380,9 @@ CHIP_ERROR ThermostatCluster::ReadAttributeControlSequenceOfOperation(Callback:: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000001B; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000001B; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12781,10 +12402,9 @@ CHIP_ERROR ThermostatCluster::ReadAttributeSystemMode(Callback::Cancelable * onS Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000001C; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000001C; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12804,10 +12424,9 @@ CHIP_ERROR ThermostatCluster::ReadAttributeStartOfWeek(Callback::Cancelable * on Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000020; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000020; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12816,10 +12435,9 @@ CHIP_ERROR ThermostatCluster::ReadAttributeNumberOfWeeklyTransitions(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000021; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000021; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12828,10 +12446,9 @@ CHIP_ERROR ThermostatCluster::ReadAttributeNumberOfDailyTransitions(Callback::Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000022; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000022; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12840,10 +12457,9 @@ CHIP_ERROR ThermostatCluster::ReadAttributeFeatureMap(Callback::Cancelable * onS Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFC; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFC; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12852,10 +12468,9 @@ CHIP_ERROR ThermostatCluster::ReadAttributeClusterRevision(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12867,10 +12482,9 @@ ThermostatUserInterfaceConfigurationCluster::ReadAttributeTemperatureDisplayMode Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12892,10 +12506,9 @@ CHIP_ERROR ThermostatUserInterfaceConfigurationCluster::ReadAttributeKeypadLocko Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12918,10 +12531,9 @@ ThermostatUserInterfaceConfigurationCluster::ReadAttributeScheduleProgrammingVis Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12943,10 +12555,9 @@ CHIP_ERROR ThermostatUserInterfaceConfigurationCluster::ReadAttributeClusterRevi Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -12997,10 +12608,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeChannel(Callback::Cance Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13009,10 +12619,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeRoutingRole(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13021,10 +12630,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeNetworkName(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13033,10 +12641,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributePanId(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13045,10 +12652,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeExtendedPanId(Callback: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000004; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000004; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13057,10 +12663,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeMeshLocalPrefix(Callbac Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000005; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000005; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13069,10 +12674,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeOverrunCount(Callback:: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000006; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000006; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13081,10 +12685,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeNeighborTableList(Callb Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000007; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000007; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, ThreadNetworkDiagnosticsClusterNeighborTableListListAttributeFilter); } @@ -13093,10 +12696,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeRouteTableList(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000008; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000008; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, ThreadNetworkDiagnosticsClusterRouteTableListListAttributeFilter); } @@ -13105,10 +12707,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributePartitionId(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000009; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000009; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13117,10 +12718,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeWeighting(Callback::Can Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000A; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000A; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13129,10 +12729,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeDataVersion(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000B; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000B; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13141,10 +12740,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeStableDataVersion(Callb Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000C; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000C; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13153,10 +12751,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeLeaderRouterId(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000D; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000D; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13165,10 +12762,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeDetachedRoleCount(Callb Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000E; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000E; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13177,10 +12773,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeChildRoleCount(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000F; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000F; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13189,10 +12784,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeRouterRoleCount(Callbac Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000010; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000010; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13201,10 +12795,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeLeaderRoleCount(Callbac Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000011; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000011; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13213,10 +12806,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeAttachAttemptCount(Call Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000012; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000012; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13225,10 +12817,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributePartitionIdChangeCount( Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000013; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000013; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13237,10 +12828,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeBetterPartitionAttachAt Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000014; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000014; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13249,10 +12839,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeParentChangeCount(Callb Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000015; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000015; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13261,10 +12850,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeTxTotalCount(Callback:: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000016; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000016; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13273,10 +12861,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeTxUnicastCount(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000017; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000017; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13285,10 +12872,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeTxBroadcastCount(Callba Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000018; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000018; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13297,10 +12883,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeTxAckRequestedCount(Cal Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000019; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000019; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13309,10 +12894,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeTxAckedCount(Callback:: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000001A; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000001A; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13321,10 +12905,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeTxNoAckRequestedCount(C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000001B; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000001B; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13333,10 +12916,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeTxDataCount(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000001C; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000001C; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13345,10 +12927,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeTxDataPollCount(Callbac Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000001D; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000001D; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13357,10 +12938,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeTxBeaconCount(Callback: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000001E; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000001E; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13369,10 +12949,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeTxBeaconRequestCount(Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000001F; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000001F; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13381,10 +12960,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeTxOtherCount(Callback:: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000020; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000020; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13393,10 +12971,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeTxRetryCount(Callback:: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000021; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000021; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13405,10 +12982,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeTxDirectMaxRetryExpiryC Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000022; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000022; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13417,10 +12993,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeTxIndirectMaxRetryExpir Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000023; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000023; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13429,10 +13004,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeTxErrCcaCount(Callback: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000024; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000024; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13441,10 +13015,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeTxErrAbortCount(Callbac Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000025; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000025; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13453,10 +13026,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeTxErrBusyChannelCount(C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000026; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000026; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13465,10 +13037,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeRxTotalCount(Callback:: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000027; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000027; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13477,10 +13048,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeRxUnicastCount(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000028; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000028; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13489,10 +13059,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeRxBroadcastCount(Callba Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000029; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000029; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13501,10 +13070,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeRxDataCount(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000002A; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000002A; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13513,10 +13081,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeRxDataPollCount(Callbac Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000002B; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000002B; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13525,10 +13092,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeRxBeaconCount(Callback: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000002C; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000002C; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13537,10 +13103,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeRxBeaconRequestCount(Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000002D; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000002D; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13549,10 +13114,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeRxOtherCount(Callback:: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000002E; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000002E; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13561,10 +13125,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeRxAddressFilteredCount( Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000002F; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000002F; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13573,10 +13136,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeRxDestAddrFilteredCount Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000030; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000030; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13585,10 +13147,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeRxDuplicatedCount(Callb Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000031; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000031; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13597,10 +13158,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeRxErrNoFrameCount(Callb Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000032; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000032; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13609,10 +13169,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeRxErrUnknownNeighborCou Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000033; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000033; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13621,10 +13180,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeRxErrInvalidSrcAddrCoun Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000034; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000034; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13633,10 +13191,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeRxErrSecCount(Callback: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000035; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000035; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13645,10 +13202,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeRxErrFcsCount(Callback: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000036; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000036; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13657,10 +13213,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeRxErrOtherCount(Callbac Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000037; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000037; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13669,10 +13224,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeActiveTimestamp(Callbac Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000038; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000038; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13681,10 +13235,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributePendingTimestamp(Callba Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000039; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000039; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13693,10 +13246,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeDelay(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000003A; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000003A; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13705,10 +13257,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeSecurityPolicy(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000003B; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000003B; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, ThreadNetworkDiagnosticsClusterSecurityPolicyListAttributeFilter); } @@ -13717,10 +13268,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeChannelMask(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000003C; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000003C; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13729,10 +13279,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeOperationalDatasetCompo Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000003D; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000003D; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, ThreadNetworkDiagnosticsClusterOperationalDatasetComponentsListAttributeFilter); } @@ -13741,10 +13290,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeActiveNetworkFaultsList Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000003E; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000003E; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, ThreadNetworkDiagnosticsClusterActiveNetworkFaultsListListAttributeFilter); } @@ -13753,10 +13301,9 @@ CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReadAttributeClusterRevision(Callbac Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13767,10 +13314,9 @@ CHIP_ERROR WakeOnLanCluster::ReadAttributeWakeOnLanMacAddress(Callback::Cancelab Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13779,10 +13325,9 @@ CHIP_ERROR WakeOnLanCluster::ReadAttributeClusterRevision(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13832,10 +13377,9 @@ CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReadAttributeBssid(Callback::Cancelabl Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13844,10 +13388,9 @@ CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReadAttributeSecurityType(Callback::Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13856,10 +13399,9 @@ CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReadAttributeWiFiVersion(Callback::Can Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13868,10 +13410,9 @@ CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReadAttributeChannelNumber(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13880,10 +13421,9 @@ CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReadAttributeRssi(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000004; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000004; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13892,10 +13432,9 @@ CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReadAttributeBeaconLostCount(Callback: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000005; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000005; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13904,10 +13443,9 @@ CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReadAttributeBeaconRxCount(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000006; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000006; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13916,10 +13454,9 @@ CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReadAttributePacketMulticastRxCount(Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000007; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000007; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13928,10 +13465,9 @@ CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReadAttributePacketMulticastTxCount(Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000008; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000008; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13940,10 +13476,9 @@ CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReadAttributePacketUnicastRxCount(Call Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000009; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000009; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13952,10 +13487,9 @@ CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReadAttributePacketUnicastTxCount(Call Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000A; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000A; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13964,10 +13498,9 @@ CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReadAttributeCurrentMaxRate(Callback:: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000B; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000B; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13976,10 +13509,9 @@ CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReadAttributeOverrunCount(Callback::Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000C; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000C; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -13988,10 +13520,9 @@ CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReadAttributeClusterRevision(Callback: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -14286,10 +13817,9 @@ CHIP_ERROR WindowCoveringCluster::ReadAttributeType(Callback::Cancelable * onSuc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -14298,10 +13828,9 @@ CHIP_ERROR WindowCoveringCluster::ReadAttributeCurrentPositionLift(Callback::Can Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -14310,10 +13839,9 @@ CHIP_ERROR WindowCoveringCluster::ReadAttributeCurrentPositionTilt(Callback::Can Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000004; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000004; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -14322,10 +13850,9 @@ CHIP_ERROR WindowCoveringCluster::ReadAttributeConfigStatus(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000007; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000007; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -14334,10 +13861,9 @@ CHIP_ERROR WindowCoveringCluster::ReadAttributeCurrentPositionLiftPercentage(Cal Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000008; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000008; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -14347,10 +13873,9 @@ CHIP_ERROR WindowCoveringCluster::SubscribeAttributeCurrentPositionLiftPercentag uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = WindowCovering::Attributes::CurrentPositionLiftPercentage::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = WindowCovering::Attributes::CurrentPositionLiftPercentage::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -14364,10 +13889,9 @@ CHIP_ERROR WindowCoveringCluster::ReadAttributeCurrentPositionTiltPercentage(Cal Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000009; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000009; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -14377,10 +13901,9 @@ CHIP_ERROR WindowCoveringCluster::SubscribeAttributeCurrentPositionTiltPercentag uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = WindowCovering::Attributes::CurrentPositionTiltPercentage::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = WindowCovering::Attributes::CurrentPositionTiltPercentage::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -14394,10 +13917,9 @@ CHIP_ERROR WindowCoveringCluster::ReadAttributeOperationalStatus(Callback::Cance Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000A; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000A; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -14407,10 +13929,9 @@ CHIP_ERROR WindowCoveringCluster::SubscribeAttributeOperationalStatus(Callback:: uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = WindowCovering::Attributes::OperationalStatus::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = WindowCovering::Attributes::OperationalStatus::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -14424,10 +13945,9 @@ CHIP_ERROR WindowCoveringCluster::ReadAttributeTargetPositionLiftPercent100ths(C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000B; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000B; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -14437,10 +13957,9 @@ CHIP_ERROR WindowCoveringCluster::SubscribeAttributeTargetPositionLiftPercent100 uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = WindowCovering::Attributes::TargetPositionLiftPercent100ths::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = WindowCovering::Attributes::TargetPositionLiftPercent100ths::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -14454,10 +13973,9 @@ CHIP_ERROR WindowCoveringCluster::ReadAttributeTargetPositionTiltPercent100ths(C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000C; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000C; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -14467,10 +13985,9 @@ CHIP_ERROR WindowCoveringCluster::SubscribeAttributeTargetPositionTiltPercent100 uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = WindowCovering::Attributes::TargetPositionTiltPercent100ths::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = WindowCovering::Attributes::TargetPositionTiltPercent100ths::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -14484,10 +14001,9 @@ CHIP_ERROR WindowCoveringCluster::ReadAttributeEndProductType(Callback::Cancelab Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000D; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000D; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -14496,10 +14012,9 @@ CHIP_ERROR WindowCoveringCluster::ReadAttributeCurrentPositionLiftPercent100ths( Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000E; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000E; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -14509,10 +14024,9 @@ CHIP_ERROR WindowCoveringCluster::SubscribeAttributeCurrentPositionLiftPercent10 uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -14526,10 +14040,9 @@ CHIP_ERROR WindowCoveringCluster::ReadAttributeCurrentPositionTiltPercent100ths( Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000000F; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000000F; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -14539,10 +14052,9 @@ CHIP_ERROR WindowCoveringCluster::SubscribeAttributeCurrentPositionTiltPercent10 uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -14556,10 +14068,9 @@ CHIP_ERROR WindowCoveringCluster::ReadAttributeInstalledOpenLimitLift(Callback:: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000010; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000010; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -14568,10 +14079,9 @@ CHIP_ERROR WindowCoveringCluster::ReadAttributeInstalledClosedLimitLift(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000011; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000011; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -14580,10 +14090,9 @@ CHIP_ERROR WindowCoveringCluster::ReadAttributeInstalledOpenLimitTilt(Callback:: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000012; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000012; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -14592,10 +14101,9 @@ CHIP_ERROR WindowCoveringCluster::ReadAttributeInstalledClosedLimitTilt(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000013; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000013; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -14604,10 +14112,9 @@ CHIP_ERROR WindowCoveringCluster::ReadAttributeMode(Callback::Cancelable * onSuc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000017; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000017; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -14627,10 +14134,9 @@ CHIP_ERROR WindowCoveringCluster::ReadAttributeSafetyStatus(Callback::Cancelable Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000001A; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000001A; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -14640,10 +14146,9 @@ CHIP_ERROR WindowCoveringCluster::SubscribeAttributeSafetyStatus(Callback::Cance uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = WindowCovering::Attributes::SafetyStatus::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = WindowCovering::Attributes::SafetyStatus::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -14657,10 +14162,9 @@ CHIP_ERROR WindowCoveringCluster::ReadAttributeFeatureMap(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFC; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFC; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -14669,10 +14173,9 @@ CHIP_ERROR WindowCoveringCluster::ReadAttributeClusterRevision(Callback::Cancela Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } diff --git a/zzz_generated/lighting-app/zap-generated/CHIPClusters.cpp b/zzz_generated/lighting-app/zap-generated/CHIPClusters.cpp index 2594d22385b993..0811065c111e43 100644 --- a/zzz_generated/lighting-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/lighting-app/zap-generated/CHIPClusters.cpp @@ -39,10 +39,9 @@ namespace Controller { CHIP_ERROR OnOffCluster::ReadAttributeOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -51,10 +50,9 @@ CHIP_ERROR OnOffCluster::SubscribeAttributeOnOff(Callback::Cancelable * onSucces uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = OnOff::Attributes::OnOff::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = OnOff::Attributes::OnOff::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -68,10 +66,9 @@ CHIP_ERROR OnOffCluster::ReadAttributeGlobalSceneControl(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00004000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00004000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -79,10 +76,9 @@ CHIP_ERROR OnOffCluster::ReadAttributeGlobalSceneControl(Callback::Cancelable * CHIP_ERROR OnOffCluster::ReadAttributeOnTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00004001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00004001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -102,10 +98,9 @@ CHIP_ERROR OnOffCluster::ReadAttributeOffWaitTime(Callback::Cancelable * onSucce Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00004002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00004002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -125,10 +120,9 @@ CHIP_ERROR OnOffCluster::ReadAttributeStartUpOnOff(Callback::Cancelable * onSucc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00004003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00004003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -147,10 +141,9 @@ CHIP_ERROR OnOffCluster::WriteAttributeStartUpOnOff(Callback::Cancelable * onSuc CHIP_ERROR OnOffCluster::ReadAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFC; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFC; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -159,10 +152,9 @@ CHIP_ERROR OnOffCluster::ReadAttributeClusterRevision(Callback::Cancelable * onS Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } diff --git a/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.cpp b/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.cpp index 30280fe15fc065..96420c2a4445ea 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.cpp @@ -189,10 +189,9 @@ CHIP_ERROR OtaSoftwareUpdateProviderCluster::ReadAttributeClusterRevision(Callba Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } diff --git a/zzz_generated/pump-app/zap-generated/CHIPClusters.cpp b/zzz_generated/pump-app/zap-generated/CHIPClusters.cpp index 18686c264df872..59e96d4d545093 100644 --- a/zzz_generated/pump-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/pump-app/zap-generated/CHIPClusters.cpp @@ -40,10 +40,9 @@ CHIP_ERROR FlowMeasurementCluster::ReadAttributeMeasuredValue(Callback::Cancelab Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -53,10 +52,9 @@ CHIP_ERROR FlowMeasurementCluster::SubscribeAttributeMeasuredValue(Callback::Can uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = FlowMeasurement::Attributes::MeasuredValue::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = FlowMeasurement::Attributes::MeasuredValue::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -70,10 +68,9 @@ CHIP_ERROR FlowMeasurementCluster::ReadAttributeMinMeasuredValue(Callback::Cance Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -82,10 +79,9 @@ CHIP_ERROR FlowMeasurementCluster::ReadAttributeMaxMeasuredValue(Callback::Cance Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -94,10 +90,9 @@ CHIP_ERROR FlowMeasurementCluster::ReadAttributeClusterRevision(Callback::Cancel Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -108,10 +103,9 @@ CHIP_ERROR PressureMeasurementCluster::ReadAttributeMeasuredValue(Callback::Canc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -121,10 +115,9 @@ CHIP_ERROR PressureMeasurementCluster::SubscribeAttributeMeasuredValue(Callback: uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = PressureMeasurement::Attributes::MeasuredValue::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = PressureMeasurement::Attributes::MeasuredValue::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -138,10 +131,9 @@ CHIP_ERROR PressureMeasurementCluster::ReadAttributeMinMeasuredValue(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -150,10 +142,9 @@ CHIP_ERROR PressureMeasurementCluster::ReadAttributeMaxMeasuredValue(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -162,10 +153,9 @@ CHIP_ERROR PressureMeasurementCluster::ReadAttributeClusterRevision(Callback::Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -176,10 +166,9 @@ CHIP_ERROR TemperatureMeasurementCluster::ReadAttributeMeasuredValue(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -189,10 +178,9 @@ CHIP_ERROR TemperatureMeasurementCluster::SubscribeAttributeMeasuredValue(Callba uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = TemperatureMeasurement::Attributes::MeasuredValue::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = TemperatureMeasurement::Attributes::MeasuredValue::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -206,10 +194,9 @@ CHIP_ERROR TemperatureMeasurementCluster::ReadAttributeMinMeasuredValue(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -218,10 +205,9 @@ CHIP_ERROR TemperatureMeasurementCluster::ReadAttributeMaxMeasuredValue(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -230,10 +216,9 @@ CHIP_ERROR TemperatureMeasurementCluster::ReadAttributeClusterRevision(Callback: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } diff --git a/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.cpp b/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.cpp index 8922f66ff2a44c..ca26e9aa3a4f0d 100644 --- a/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.cpp @@ -40,10 +40,9 @@ CHIP_ERROR FlowMeasurementCluster::ReadAttributeMeasuredValue(Callback::Cancelab Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -53,10 +52,9 @@ CHIP_ERROR FlowMeasurementCluster::SubscribeAttributeMeasuredValue(Callback::Can uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = FlowMeasurement::Attributes::MeasuredValue::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = FlowMeasurement::Attributes::MeasuredValue::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -70,10 +68,9 @@ CHIP_ERROR FlowMeasurementCluster::ReadAttributeMinMeasuredValue(Callback::Cance Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -82,10 +79,9 @@ CHIP_ERROR FlowMeasurementCluster::ReadAttributeMaxMeasuredValue(Callback::Cance Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -94,10 +90,9 @@ CHIP_ERROR FlowMeasurementCluster::ReadAttributeClusterRevision(Callback::Cancel Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -465,10 +460,9 @@ CHIP_ERROR LevelControlCluster::ReadAttributeCurrentLevel(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -478,10 +472,9 @@ CHIP_ERROR LevelControlCluster::SubscribeAttributeCurrentLevel(Callback::Cancela uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = LevelControl::Attributes::CurrentLevel::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = LevelControl::Attributes::CurrentLevel::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -495,10 +488,9 @@ CHIP_ERROR LevelControlCluster::ReadAttributeClusterRevision(Callback::Cancelabl Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -622,10 +614,9 @@ CHIP_ERROR OnOffCluster::Toggle(Callback::Cancelable * onSuccessCallback, Callba CHIP_ERROR OnOffCluster::ReadAttributeOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -634,10 +625,9 @@ CHIP_ERROR OnOffCluster::ReadAttributeClusterRevision(Callback::Cancelable * onS Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -648,10 +638,9 @@ CHIP_ERROR PressureMeasurementCluster::ReadAttributeMeasuredValue(Callback::Canc Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -661,10 +650,9 @@ CHIP_ERROR PressureMeasurementCluster::SubscribeAttributeMeasuredValue(Callback: uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = PressureMeasurement::Attributes::MeasuredValue::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = PressureMeasurement::Attributes::MeasuredValue::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -678,10 +666,9 @@ CHIP_ERROR PressureMeasurementCluster::ReadAttributeMinMeasuredValue(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -690,10 +677,9 @@ CHIP_ERROR PressureMeasurementCluster::ReadAttributeMaxMeasuredValue(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -702,10 +688,9 @@ CHIP_ERROR PressureMeasurementCluster::ReadAttributeClusterRevision(Callback::Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -716,10 +701,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeMaxPressure(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -728,10 +712,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeMaxSpeed(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -740,10 +723,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeMaxFlow(Callback::Ca Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -752,10 +734,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeEffectiveOperationMo Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000011; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000011; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -764,10 +745,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeEffectiveControlMode Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000012; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000012; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -776,10 +756,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeCapacity(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000013; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000013; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -789,10 +768,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeCapacity(Callba uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = PumpConfigurationAndControl::Attributes::Capacity::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::Capacity::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -806,10 +784,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeOperationMode(Callba Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000020; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000020; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -829,10 +806,9 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeClusterRevision(Call Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -843,10 +819,9 @@ CHIP_ERROR TemperatureMeasurementCluster::ReadAttributeMeasuredValue(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -856,10 +831,9 @@ CHIP_ERROR TemperatureMeasurementCluster::SubscribeAttributeMeasuredValue(Callba uint16_t minInterval, uint16_t maxInterval) { chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = TemperatureMeasurement::Attributes::MeasuredValue::Id; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = TemperatureMeasurement::Attributes::MeasuredValue::Id; return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); } @@ -873,10 +847,9 @@ CHIP_ERROR TemperatureMeasurementCluster::ReadAttributeMinMeasuredValue(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -885,10 +858,9 @@ CHIP_ERROR TemperatureMeasurementCluster::ReadAttributeMaxMeasuredValue(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -897,10 +869,9 @@ CHIP_ERROR TemperatureMeasurementCluster::ReadAttributeClusterRevision(Callback: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } diff --git a/zzz_generated/thermostat/zap-generated/CHIPClusters.cpp b/zzz_generated/thermostat/zap-generated/CHIPClusters.cpp index 5a8acbf0c7e841..3b6ca45c83ce18 100644 --- a/zzz_generated/thermostat/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/thermostat/zap-generated/CHIPClusters.cpp @@ -119,10 +119,9 @@ CHIP_ERROR IdentifyCluster::ReadAttributeIdentifyTime(Callback::Cancelable * onS Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -142,10 +141,9 @@ CHIP_ERROR IdentifyCluster::ReadAttributeIdentifyType(Callback::Cancelable * onS Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -154,10 +152,9 @@ CHIP_ERROR IdentifyCluster::ReadAttributeClusterRevision(Callback::Cancelable * Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } diff --git a/zzz_generated/tv-app/zap-generated/CHIPClusters.cpp b/zzz_generated/tv-app/zap-generated/CHIPClusters.cpp index 9562cab90014dd..ea9bada042799c 100644 --- a/zzz_generated/tv-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/tv-app/zap-generated/CHIPClusters.cpp @@ -175,10 +175,9 @@ CHIP_ERROR GeneralCommissioningCluster::ReadAttributeBreadcrumb(Callback::Cancel Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000000; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000000; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -198,10 +197,9 @@ CHIP_ERROR GeneralCommissioningCluster::ReadAttributeBasicCommissioningInfoList( Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, GeneralCommissioningClusterBasicCommissioningInfoListListAttributeFilter); } @@ -210,10 +208,9 @@ CHIP_ERROR GeneralCommissioningCluster::ReadAttributeClusterRevision(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -409,10 +406,9 @@ CHIP_ERROR NetworkCommissioningCluster::ReadAttributeClusterRevision(Callback::C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -727,10 +723,9 @@ CHIP_ERROR OperationalCredentialsCluster::ReadAttributeFabricsList(Callback::Can Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000001; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000001; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, OperationalCredentialsClusterFabricsListListAttributeFilter); } @@ -739,10 +734,9 @@ CHIP_ERROR OperationalCredentialsCluster::ReadAttributeSupportedFabrics(Callback Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000002; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000002; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -751,10 +745,9 @@ CHIP_ERROR OperationalCredentialsCluster::ReadAttributeCommissionedFabrics(Callb Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000003; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000003; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -763,10 +756,9 @@ CHIP_ERROR OperationalCredentialsCluster::ReadAttributeTrustedRootCertificates(C Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000004; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000004; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, OperationalCredentialsClusterTrustedRootCertificatesListAttributeFilter); } @@ -775,10 +767,9 @@ CHIP_ERROR OperationalCredentialsCluster::ReadAttributeCurrentFabricIndex(Callba Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x00000005; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x00000005; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); } @@ -787,10 +778,9 @@ CHIP_ERROR OperationalCredentialsCluster::ReadAttributeClusterRevision(Callback: Callback::Cancelable * onFailureCallback) { app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mFieldId = 0x0000FFFD; - + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mAttributeId = 0x0000FFFD; return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, BasicAttributeFilter); }