From c870167f08db7172cc50b431e1243defd6f0ba97 Mon Sep 17 00:00:00 2001 From: Yunhan Wang Date: Wed, 20 Oct 2021 01:06:16 -0700 Subject: [PATCH 1/2] Rename CommandDataElement to CommandDataIB --- .../OTAProviderExample.cpp | 4 +- src/app/BUILD.gn | 4 +- src/app/Command.cpp | 31 ++++--- src/app/Command.h | 8 +- src/app/CommandHandler.cpp | 4 +- src/app/CommandHandler.h | 8 +- src/app/CommandSender.cpp | 2 +- src/app/CommandSender.h | 6 +- ...mmandDataElement.cpp => CommandDataIB.cpp} | 26 +++--- .../{CommandDataElement.h => CommandDataIB.h} | 12 +-- src/app/MessageDef/CommandList.cpp | 12 +-- src/app/MessageDef/CommandList.h | 14 ++-- src/app/MessageDef/InvokeCommand.h | 2 +- .../account-login-server.cpp | 2 +- .../application-launcher-server.cpp | 2 +- .../door-lock-server-logging.cpp | 2 +- .../door-lock-server-schedule.cpp | 18 ++--- .../door-lock-server-user.cpp | 26 +++--- .../clusters/groups-server/groups-server.cpp | 8 +- .../identify-server/identify-server.cpp | 2 +- .../keypad-input-server.cpp | 2 +- .../media-playback-server.cpp | 2 +- .../operational-credentials-server.cpp | 2 +- src/app/clusters/scenes/scenes.cpp | 12 +-- .../target-navigator-server.cpp | 2 +- .../tv-channel-server/tv-channel-server.cpp | 2 +- src/app/tests/TestCommandInteraction.cpp | 41 +++++----- src/app/tests/TestMessageDef.cpp | 81 +++++++++---------- .../tests/integration/chip_im_initiator.cpp | 2 +- .../tests/integration/chip_im_responder.cpp | 2 +- .../templates/app/CHIPClusters-src.zapt | 2 +- .../python/chip/clusters/command.cpp | 2 +- 32 files changed, 172 insertions(+), 173 deletions(-) rename src/app/MessageDef/{CommandDataElement.cpp => CommandDataIB.cpp} (90%) rename src/app/MessageDef/{CommandDataElement.h => CommandDataIB.h} (93%) diff --git a/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp b/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp index d04235b9653f90..e021520de92704 100644 --- a/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp +++ b/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp @@ -156,7 +156,7 @@ EmberAfStatus OTAProviderExample::HandleQueryImage(chip::app::CommandHandler * c TLVWriter * writer = nullptr; uint8_t tagNum = 0; VerifyOrReturnError((commandObj->PrepareCommand(cmdParams) == CHIP_NO_ERROR), EMBER_ZCL_STATUS_FAILURE); - VerifyOrReturnError((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, EMBER_ZCL_STATUS_FAILURE); + VerifyOrReturnError((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, EMBER_ZCL_STATUS_FAILURE); VerifyOrReturnError(writer->Put(ContextTag(tagNum++), queryStatus) == CHIP_NO_ERROR, EMBER_ZCL_STATUS_FAILURE); VerifyOrReturnError(writer->Put(ContextTag(tagNum++), mDelayedActionTimeSec) == CHIP_NO_ERROR, EMBER_ZCL_STATUS_FAILURE); VerifyOrReturnError(writer->PutString(ContextTag(tagNum++), uriBuf) == CHIP_NO_ERROR, EMBER_ZCL_STATUS_FAILURE); @@ -190,7 +190,7 @@ EmberAfStatus OTAProviderExample::HandleApplyUpdateRequest(chip::app::CommandHan TLVWriter * writer = nullptr; VerifyOrReturnError((commandObj->PrepareCommand(cmdParams) == CHIP_NO_ERROR), EMBER_ZCL_STATUS_FAILURE); - VerifyOrReturnError((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, EMBER_ZCL_STATUS_FAILURE); + VerifyOrReturnError((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, EMBER_ZCL_STATUS_FAILURE); VerifyOrReturnError(writer->Put(ContextTag(0), updateAction) == CHIP_NO_ERROR, EMBER_ZCL_STATUS_FAILURE); VerifyOrReturnError(writer->Put(ContextTag(1), mDelayedActionTimeSec) == CHIP_NO_ERROR, EMBER_ZCL_STATUS_FAILURE); VerifyOrReturnError((commandObj->FinishCommand() == CHIP_NO_ERROR), EMBER_ZCL_STATUS_FAILURE); diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 623f7be819ea02..5fa15d41afd031 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -57,8 +57,8 @@ static_library("app") { "MessageDef/AttributeStatusList.h", "MessageDef/Builder.cpp", "MessageDef/Builder.h", - "MessageDef/CommandDataElement.cpp", - "MessageDef/CommandDataElement.h", + "MessageDef/CommandDataIB.cpp", + "MessageDef/CommandDataIB.h", "MessageDef/CommandList.cpp", "MessageDef/CommandList.h", "MessageDef/CommandPathIB.cpp", diff --git a/src/app/Command.cpp b/src/app/Command.cpp index e77540b056c815..b2bdcb305090eb 100644 --- a/src/app/Command.cpp +++ b/src/app/Command.cpp @@ -93,12 +93,12 @@ CHIP_ERROR Command::ProcessCommandMessage(System::PacketBufferHandle && payload, VerifyOrExit(chip::TLV::AnonymousTag == commandListReader.GetTag(), err = CHIP_ERROR_INVALID_TLV_TAG); VerifyOrExit(chip::TLV::kTLVType_Structure == commandListReader.GetType(), err = CHIP_ERROR_WRONG_TLV_TYPE); - CommandDataElement::Parser commandElement; + CommandDataIB::Parser commandElement; err = commandElement.Init(commandListReader); SuccessOrExit(err); - err = ProcessCommandDataElement(commandElement); + err = ProcessCommandDataIB(commandElement); SuccessOrExit(err); } @@ -115,7 +115,7 @@ CHIP_ERROR Command::ProcessCommandMessage(System::PacketBufferHandle && payload, CHIP_ERROR Command::PrepareCommand(const CommandPathParams & aCommandPathParams, bool aStartDataStruct) { CHIP_ERROR err = CHIP_NO_ERROR; - CommandDataElement::Builder commandDataElement; + CommandDataIB::Builder commandDataIB; err = AllocateBuffer(); SuccessOrExit(err); @@ -125,17 +125,17 @@ CHIP_ERROR Command::PrepareCommand(const CommandPathParams & aCommandPathParams, // VerifyOrExit(mState == CommandState::Idle, err = CHIP_ERROR_INCORRECT_STATE); - commandDataElement = mInvokeCommandBuilder.GetCommandListBuilder().CreateCommandDataElementBuilder(); - err = commandDataElement.GetError(); + commandDataIB = mInvokeCommandBuilder.GetCommandListBuilder().CreateCommandDataIBBuilder(); + err = commandDataIB.GetError(); SuccessOrExit(err); - err = ConstructCommandPath(aCommandPathParams, commandDataElement); + err = ConstructCommandPath(aCommandPathParams, commandDataIB); SuccessOrExit(err); if (aStartDataStruct) { - err = commandDataElement.GetWriter()->StartContainer(TLV::ContextTag(CommandDataElement::kCsTag_Data), - TLV::kTLVType_Structure, mDataElementContainerType); + err = commandDataIB.GetWriter()->StartContainer(TLV::ContextTag(CommandDataIB::kCsTag_Data), TLV::kTLVType_Structure, + mDataElementContainerType); } MoveToState(CommandState::AddingCommand); @@ -144,7 +144,7 @@ CHIP_ERROR Command::PrepareCommand(const CommandPathParams & aCommandPathParams, return err; } -TLV::TLVWriter * Command::GetCommandDataElementTLVWriter() +TLV::TLVWriter * Command::GetCommandDataIBTLVWriter() { if (mState != CommandState::AddingCommand) { @@ -152,7 +152,7 @@ TLV::TLVWriter * Command::GetCommandDataElementTLVWriter() } else { - return mInvokeCommandBuilder.GetCommandListBuilder().GetCommandDataElementBuilder().GetWriter(); + return mInvokeCommandBuilder.GetCommandListBuilder().GetCommandDataIBBuilder().GetWriter(); } } @@ -168,13 +168,13 @@ CHIP_ERROR Command::FinishCommand(bool aEndDataStruct) VerifyOrReturnError(mState == CommandState::AddingCommand, err = CHIP_ERROR_INCORRECT_STATE); - CommandDataElement::Builder commandDataElement = mInvokeCommandBuilder.GetCommandListBuilder().GetCommandDataElementBuilder(); + CommandDataIB::Builder commandDataIB = mInvokeCommandBuilder.GetCommandListBuilder().GetCommandDataIBBuilder(); if (aEndDataStruct) { - ReturnErrorOnFailure(commandDataElement.GetWriter()->EndContainer(mDataElementContainerType)); + ReturnErrorOnFailure(commandDataIB.GetWriter()->EndContainer(mDataElementContainerType)); } - ReturnErrorOnFailure(commandDataElement.EndOfCommandDataElement().GetError()); + ReturnErrorOnFailure(commandDataIB.EndOfCommandDataIB().GetError()); ReturnErrorOnFailure(mInvokeCommandBuilder.GetCommandListBuilder().EndOfCommandList().GetError()); ReturnErrorOnFailure(mInvokeCommandBuilder.EndOfInvokeCommand().GetError()); @@ -183,10 +183,9 @@ CHIP_ERROR Command::FinishCommand(bool aEndDataStruct) return CHIP_NO_ERROR; } -CHIP_ERROR Command::ConstructCommandPath(const CommandPathParams & aCommandPathParams, - CommandDataElement::Builder aCommandDataElement) +CHIP_ERROR Command::ConstructCommandPath(const CommandPathParams & aCommandPathParams, CommandDataIB::Builder aCommandDataIB) { - CommandPathIB::Builder commandPath = aCommandDataElement.CreateCommandPathBuilder(); + CommandPathIB::Builder commandPath = aCommandDataIB.CreateCommandPathBuilder(); if (aCommandPathParams.mFlags.Has(CommandPathFlags::kEndpointIdValid)) { commandPath.EndpointId(aCommandPathParams.mEndpointId); diff --git a/src/app/Command.h b/src/app/Command.h index 822fd0ab217b6e..a4a75d3b8df0b5 100644 --- a/src/app/Command.h +++ b/src/app/Command.h @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -74,7 +74,7 @@ class Command * A set of methods to construct command request or response payloads */ CHIP_ERROR PrepareCommand(const CommandPathParams & aCommandPathParams, bool aStartDataStruct = true); - TLV::TLVWriter * GetCommandDataElementTLVWriter(); + TLV::TLVWriter * GetCommandDataIBTLVWriter(); CHIP_ERROR FinishCommand(bool aEndDataStruct = true); CHIP_ERROR Finalize(System::PacketBufferHandle & commandPacket); @@ -102,7 +102,7 @@ class Command */ Messaging::ExchangeContext * GetExchangeContext() const { return mpExchangeCtx; } - virtual CHIP_ERROR ProcessCommandDataElement(CommandDataElement::Parser & aCommandElement) = 0; + virtual CHIP_ERROR ProcessCommandDataIB(CommandDataIB::Parser & aCommandElement) = 0; protected: Command(); @@ -124,7 +124,7 @@ class Command void MoveToState(const CommandState aTargetState); CHIP_ERROR ProcessCommandMessage(System::PacketBufferHandle && payload, CommandRoleId aCommandRoleId); - CHIP_ERROR ConstructCommandPath(const CommandPathParams & aCommandPathParams, CommandDataElement::Builder aCommandDataElement); + CHIP_ERROR ConstructCommandPath(const CommandPathParams & aCommandPathParams, CommandDataIB::Builder aCommandDataIB); const char * GetStateStr() const; InvokeCommand::Builder mInvokeCommandBuilder; diff --git a/src/app/CommandHandler.cpp b/src/app/CommandHandler.cpp index 2b2ea469a75de0..25082046ec3248 100644 --- a/src/app/CommandHandler.cpp +++ b/src/app/CommandHandler.cpp @@ -88,7 +88,7 @@ CHIP_ERROR CommandHandler::SendCommandResponse() return CHIP_NO_ERROR; } -CHIP_ERROR CommandHandler::ProcessCommandDataElement(CommandDataElement::Parser & aCommandElement) +CHIP_ERROR CommandHandler::ProcessCommandDataIB(CommandDataIB::Parser & aCommandElement) { CHIP_ERROR err = CHIP_NO_ERROR; CommandPathIB::Parser commandPath; @@ -167,7 +167,7 @@ CHIP_ERROR CommandHandler::AddStatus(const ConcreteCommandPath & aCommandPath, c err = PrepareCommand(commandPathParams, false /* aStartDataStruct */); SuccessOrExit(err); - statusIBBuilder = mInvokeCommandBuilder.GetCommandListBuilder().GetCommandDataElementBuilder().CreateStatusIBBuilder(); + statusIBBuilder = mInvokeCommandBuilder.GetCommandListBuilder().GetCommandDataIBBuilder().CreateStatusIBBuilder(); // // TODO: Most of the callers are incorrectly passing SecureChannel as the protocol ID, when in fact, the status code provided diff --git a/src/app/CommandHandler.h b/src/app/CommandHandler.h index a58c3d65126e55..01fb11d18db23a 100644 --- a/src/app/CommandHandler.h +++ b/src/app/CommandHandler.h @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include #include @@ -88,9 +88,9 @@ class CommandHandler : public Command CHIP_ERROR AddResponseData(const ConcreteCommandPath & aRequestCommandPath, const CommandData & aData) { ReturnErrorOnFailure(PrepareResponse(aRequestCommandPath, CommandData::GetCommandId())); - TLV::TLVWriter * writer = GetCommandDataElementTLVWriter(); + TLV::TLVWriter * writer = GetCommandDataIBTLVWriter(); VerifyOrReturnError(writer != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure(DataModel::Encode(*writer, TLV::ContextTag(CommandDataElement::kCsTag_Data), aData)); + ReturnErrorOnFailure(DataModel::Encode(*writer, TLV::ContextTag(CommandDataIB::kCsTag_Data), aData)); return FinishCommand(/* aEndDataStruct = */ false); } @@ -105,7 +105,7 @@ class CommandHandler : public Command friend class TestCommandInteraction; CHIP_ERROR SendCommandResponse(); - CHIP_ERROR ProcessCommandDataElement(CommandDataElement::Parser & aCommandElement) override; + CHIP_ERROR ProcessCommandDataIB(CommandDataIB::Parser & aCommandElement) override; CHIP_ERROR PrepareResponse(const ConcreteCommandPath & aRequestCommandPath, CommandId aResponseCommand); Callback * mpCallback = nullptr; }; diff --git a/src/app/CommandSender.cpp b/src/app/CommandSender.cpp index cd5d5a18932440..57677dc94428a6 100644 --- a/src/app/CommandSender.cpp +++ b/src/app/CommandSender.cpp @@ -113,7 +113,7 @@ void CommandSender::Close() } } -CHIP_ERROR CommandSender::ProcessCommandDataElement(CommandDataElement::Parser & aCommandElement) +CHIP_ERROR CommandSender::ProcessCommandDataIB(CommandDataIB::Parser & aCommandElement) { CHIP_ERROR err = CHIP_NO_ERROR; chip::ClusterId clusterId; diff --git a/src/app/CommandSender.h b/src/app/CommandSender.h index 934f52af598c79..76452fda2378ea 100644 --- a/src/app/CommandSender.h +++ b/src/app/CommandSender.h @@ -129,9 +129,9 @@ class CommandSender final : public Command, public Messaging::ExchangeDelegate CHIP_ERROR AddRequestData(const CommandPathParams & aCommandPath, const CommandDataT & aData) { ReturnErrorOnFailure(PrepareCommand(aCommandPath, /* aStartDataStruct = */ false)); - TLV::TLVWriter * writer = GetCommandDataElementTLVWriter(); + TLV::TLVWriter * writer = GetCommandDataIBTLVWriter(); VerifyOrReturnError(writer != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure(DataModel::Encode(*writer, TLV::ContextTag(CommandDataElement::kCsTag_Data), aData)); + ReturnErrorOnFailure(DataModel::Encode(*writer, TLV::ContextTag(CommandDataIB::kCsTag_Data), aData)); return FinishCommand(/* aEndDataStruct = */ false); } @@ -171,7 +171,7 @@ class CommandSender final : public Command, public Messaging::ExchangeDelegate // void Close(); - CHIP_ERROR ProcessCommandDataElement(CommandDataElement::Parser & aCommandElement) override; + CHIP_ERROR ProcessCommandDataIB(CommandDataIB::Parser & aCommandElement) override; Callback * mpCallback = nullptr; Messaging::ExchangeManager * mpExchangeMgr = nullptr; diff --git a/src/app/MessageDef/CommandDataElement.cpp b/src/app/MessageDef/CommandDataIB.cpp similarity index 90% rename from src/app/MessageDef/CommandDataElement.cpp rename to src/app/MessageDef/CommandDataIB.cpp index 7b6be4bc8f8718..e42fe57ce85bab 100644 --- a/src/app/MessageDef/CommandDataElement.cpp +++ b/src/app/MessageDef/CommandDataIB.cpp @@ -17,11 +17,11 @@ */ /** * @file - * This file defines CommandDataElement parser and builder in CHIP interaction model + * This file defines CommandDataIB parser and builder in CHIP interaction model * */ -#include "CommandDataElement.h" +#include "CommandDataIB.h" #include "MessageDefHelper.h" @@ -36,7 +36,7 @@ using namespace chip::TLV; namespace chip { namespace app { -CHIP_ERROR CommandDataElement::Parser::Init(const chip::TLV::TLVReader & aReader) +CHIP_ERROR CommandDataIB::Parser::Init(const chip::TLV::TLVReader & aReader) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -52,7 +52,7 @@ CHIP_ERROR CommandDataElement::Parser::Init(const chip::TLV::TLVReader & aReader } CHIP_ERROR -CommandDataElement::Parser::ParseData(chip::TLV::TLVReader & aReader, int aDepth) const +CommandDataIB::Parser::ParseData(chip::TLV::TLVReader & aReader, int aDepth) const { CHIP_ERROR err = CHIP_NO_ERROR; @@ -223,14 +223,14 @@ CommandDataElement::Parser::ParseData(chip::TLV::TLVReader & aReader, int aDepth } #if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK -CHIP_ERROR CommandDataElement::Parser::CheckSchemaValidity() const +CHIP_ERROR CommandDataIB::Parser::CheckSchemaValidity() const { CHIP_ERROR err = CHIP_NO_ERROR; uint16_t TagPresenceMask = 0; chip::TLV::TLVReader reader; uint32_t tagNum = 0; - PRETTY_PRINT("CommandDataElement ="); + PRETTY_PRINT("CommandDataIB ="); PRETTY_PRINT("{"); // make a copy of the reader @@ -321,7 +321,7 @@ CHIP_ERROR CommandDataElement::Parser::CheckSchemaValidity() const } #endif // CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK -CHIP_ERROR CommandDataElement::Parser::GetCommandPath(CommandPathIB::Parser * const apCommandPath) const +CHIP_ERROR CommandDataIB::Parser::GetCommandPath(CommandPathIB::Parser * const apCommandPath) const { CHIP_ERROR err = CHIP_NO_ERROR; chip::TLV::TLVReader reader; @@ -340,7 +340,7 @@ CHIP_ERROR CommandDataElement::Parser::GetCommandPath(CommandPathIB::Parser * co return err; } -CHIP_ERROR CommandDataElement::Parser::GetData(chip::TLV::TLVReader * const apReader) const +CHIP_ERROR CommandDataIB::Parser::GetData(chip::TLV::TLVReader * const apReader) const { CHIP_ERROR err = CHIP_NO_ERROR; @@ -353,7 +353,7 @@ CHIP_ERROR CommandDataElement::Parser::GetData(chip::TLV::TLVReader * const apRe return err; } -CHIP_ERROR CommandDataElement::Parser::GetStatusIB(StatusIB::Parser * const apStatusIB) const +CHIP_ERROR CommandDataIB::Parser::GetStatusIB(StatusIB::Parser * const apStatusIB) const { CHIP_ERROR err = CHIP_NO_ERROR; chip::TLV::TLVReader reader; @@ -370,12 +370,12 @@ CHIP_ERROR CommandDataElement::Parser::GetStatusIB(StatusIB::Parser * const apSt return err; } -CHIP_ERROR CommandDataElement::Builder::Init(chip::TLV::TLVWriter * const apWriter) +CHIP_ERROR CommandDataIB::Builder::Init(chip::TLV::TLVWriter * const apWriter) { return InitAnonymousStructure(apWriter); } -CommandPathIB::Builder & CommandDataElement::Builder::CreateCommandPathBuilder() +CommandPathIB::Builder & CommandDataIB::Builder::CreateCommandPathBuilder() { // skip if error has already been set VerifyOrExit(CHIP_NO_ERROR == mError, mCommandPathBuilder.ResetError(mError)); @@ -387,7 +387,7 @@ CommandPathIB::Builder & CommandDataElement::Builder::CreateCommandPathBuilder() return mCommandPathBuilder; } -StatusIB::Builder & CommandDataElement::Builder::CreateStatusIBBuilder() +StatusIB::Builder & CommandDataIB::Builder::CreateStatusIBBuilder() { // skip if error has already been set VerifyOrExit(CHIP_NO_ERROR == mError, mStatusIBBuilder.ResetError(mError)); @@ -399,7 +399,7 @@ StatusIB::Builder & CommandDataElement::Builder::CreateStatusIBBuilder() return mStatusIBBuilder; } -CommandDataElement::Builder & CommandDataElement::Builder::EndOfCommandDataElement() +CommandDataIB::Builder & CommandDataIB::Builder::EndOfCommandDataIB() { EndOfContainer(); diff --git a/src/app/MessageDef/CommandDataElement.h b/src/app/MessageDef/CommandDataIB.h similarity index 93% rename from src/app/MessageDef/CommandDataElement.h rename to src/app/MessageDef/CommandDataIB.h index 9cc61c3a4cfc4b..f3175caef54b16 100644 --- a/src/app/MessageDef/CommandDataElement.h +++ b/src/app/MessageDef/CommandDataIB.h @@ -17,7 +17,7 @@ */ /** * @file - * This file defines CommandDataElement parser and builder in CHIP interaction model + * This file defines CommandDataIB parser and builder in CHIP interaction model * */ @@ -38,7 +38,7 @@ namespace chip { namespace app { -namespace CommandDataElement { +namespace CommandDataIB { enum { kCsTag_CommandPath = 0, @@ -52,7 +52,7 @@ class Parser : public chip::app::Parser /** * @brief Initialize the parser object with TLVReader * - * @param [in] aReader A pointer to a TLVReader, which should point to the beginning of this CommandDataElement + * @param [in] aReader A pointer to a TLVReader, which should point to the beginning of this CommandDataIB * * @return #CHIP_NO_ERROR on success */ @@ -139,16 +139,16 @@ class Builder : public chip::app::Builder StatusIB::Builder & CreateStatusIBBuilder(); /** - * @brief Mark the end of this CommandDataElement + * @brief Mark the end of this CommandDataIB * * @return A reference to *this */ - CommandDataElement::Builder & EndOfCommandDataElement(); + CommandDataIB::Builder & EndOfCommandDataIB(); private: CommandPathIB::Builder mCommandPathBuilder; StatusIB::Builder mStatusIBBuilder; }; -}; // namespace CommandDataElement +}; // namespace CommandDataIB }; // namespace app }; // namespace chip diff --git a/src/app/MessageDef/CommandList.cpp b/src/app/MessageDef/CommandList.cpp index 0885a47a7c8733..73f33c41f4f55a 100644 --- a/src/app/MessageDef/CommandList.cpp +++ b/src/app/MessageDef/CommandList.cpp @@ -55,7 +55,7 @@ CHIP_ERROR CommandList::Parser::CheckSchemaValidity() const VerifyOrExit(chip::TLV::kTLVType_Structure == reader.GetType(), err = CHIP_ERROR_WRONG_TLV_TYPE); { - CommandDataElement::Parser data; + CommandDataIB::Parser data; err = data.Init(reader); SuccessOrExit(err); @@ -90,16 +90,16 @@ CHIP_ERROR CommandList::Parser::CheckSchemaValidity() const } #endif // CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK -CommandDataElement::Builder & CommandList::Builder::CreateCommandDataElementBuilder() +CommandDataIB::Builder & CommandList::Builder::CreateCommandDataIBBuilder() { // skip if error has already been set - VerifyOrExit(CHIP_NO_ERROR == mError, mCommandDataElementBuilder.ResetError(mError)); + VerifyOrExit(CHIP_NO_ERROR == mError, mCommandDataIBBuilder.ResetError(mError)); - mError = mCommandDataElementBuilder.Init(mpWriter); + mError = mCommandDataIBBuilder.Init(mpWriter); exit: - // on error, mCommandDataElementBuilder would be un-/partial initialized and cannot be used to write anything - return mCommandDataElementBuilder; + // on error, mCommandDataIBBuilder would be un-/partial initialized and cannot be used to write anything + return mCommandDataIBBuilder; } CommandList::Builder & CommandList::Builder::EndOfCommandList() diff --git a/src/app/MessageDef/CommandList.h b/src/app/MessageDef/CommandList.h index d6ae732469608e..3422ffe43eccde 100644 --- a/src/app/MessageDef/CommandList.h +++ b/src/app/MessageDef/CommandList.h @@ -23,7 +23,7 @@ #pragma once -#include "CommandDataElement.h" +#include "CommandDataIB.h" #include "ListBuilder.h" #include "ListParser.h" @@ -62,16 +62,16 @@ class Builder : public ListBuilder { public: /** - * @brief Initialize a CommandDataElement::Builder for writing into the TLV stream + * @brief Initialize a CommandDataIB::Builder for writing into the TLV stream * - * @return A reference to CommandDataElement::Builder + * @return A reference to CommandDataIB::Builder */ - CommandDataElement::Builder & CreateCommandDataElementBuilder(); + CommandDataIB::Builder & CreateCommandDataIBBuilder(); /** - * @return A reference to CommandDataElement::Builder + * @return A reference to CommandDataIB::Builder */ - CommandDataElement::Builder & GetCommandDataElementBuilder() { return mCommandDataElementBuilder; }; + CommandDataIB::Builder & GetCommandDataIBBuilder() { return mCommandDataIBBuilder; }; /** * @brief Mark the end of this CommandList @@ -81,7 +81,7 @@ class Builder : public ListBuilder CommandList::Builder & EndOfCommandList(); private: - CommandDataElement::Builder mCommandDataElementBuilder; + CommandDataIB::Builder mCommandDataIBBuilder; }; }; // namespace CommandList }; // namespace app diff --git a/src/app/MessageDef/InvokeCommand.h b/src/app/MessageDef/InvokeCommand.h index 2b5d537b6ad104..763118aab8586f 100644 --- a/src/app/MessageDef/InvokeCommand.h +++ b/src/app/MessageDef/InvokeCommand.h @@ -31,7 +31,7 @@ #include #include "Builder.h" -#include "CommandDataElement.h" +#include "CommandDataIB.h" #include "CommandList.h" #include "Parser.h" diff --git a/src/app/clusters/account-login-server/account-login-server.cpp b/src/app/clusters/account-login-server/account-login-server.cpp index d56fd78ad6ec05..3ecc3ffd216712 100644 --- a/src/app/clusters/account-login-server/account-login-server.cpp +++ b/src/app/clusters/account-login-server/account-login-server.cpp @@ -42,7 +42,7 @@ void sendResponse(app::CommandHandler * command, const char * responseSetupPin) ZCL_GET_SETUP_PIN_RESPONSE_COMMAND_ID, (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = command->PrepareCommand(cmdParams)); - VerifyOrExit((writer = command->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = command->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->PutString(TLV::ContextTag(0), responseSetupPin)); SuccessOrExit(err = command->FinishCommand()); exit: diff --git a/src/app/clusters/application-launcher-server/application-launcher-server.cpp b/src/app/clusters/application-launcher-server/application-launcher-server.cpp index 7c7bbf5a133d6c..d47d2f41144387 100644 --- a/src/app/clusters/application-launcher-server/application-launcher-server.cpp +++ b/src/app/clusters/application-launcher-server/application-launcher-server.cpp @@ -53,7 +53,7 @@ void sendResponse(app::CommandHandler * command, ApplicationLauncherResponse res ZCL_LAUNCH_APP_RESPONSE_COMMAND_ID, (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = command->PrepareCommand(cmdParams)); - VerifyOrExit((writer = command->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = command->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), response.status)); SuccessOrExit(err = writer->PutString(TLV::ContextTag(1), reinterpret_cast(response.data))); SuccessOrExit(err = command->FinishCommand()); diff --git a/src/app/clusters/door-lock-server/door-lock-server-logging.cpp b/src/app/clusters/door-lock-server/door-lock-server-logging.cpp index 87b86654c71b97..df42d8d924b2e8 100644 --- a/src/app/clusters/door-lock-server/door-lock-server-logging.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server-logging.cpp @@ -145,7 +145,7 @@ bool emberAfDoorLockClusterGetLogRecordCallback(app::CommandHandler * commandObj (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), entry.logEntryId)); SuccessOrExit(err = writer->Put(TLV::ContextTag(1), entry.timestamp)); SuccessOrExit(err = writer->Put(TLV::ContextTag(2), entry.eventType)); diff --git a/src/app/clusters/door-lock-server/door-lock-server-schedule.cpp b/src/app/clusters/door-lock-server/door-lock-server-schedule.cpp index 0ecc396efeefe4..98ae5a56d09447 100644 --- a/src/app/clusters/door-lock-server/door-lock-server-schedule.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server-schedule.cpp @@ -165,7 +165,7 @@ bool emberAfDoorLockClusterSetWeekdayScheduleCallback(app::CommandHandler * comm (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), status)); SuccessOrExit(err = commandObj->FinishCommand()); } @@ -214,7 +214,7 @@ bool emberAfDoorLockClusterGetWeekdayScheduleCallback(app::CommandHandler * comm (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), scheduleId)); SuccessOrExit(err = writer->Put(TLV::ContextTag(1), userId)); SuccessOrExit(err = writer->Put(TLV::ContextTag(2), zclStatus)); @@ -256,7 +256,7 @@ bool emberAfDoorLockClusterClearWeekdayScheduleCallback(app::CommandHandler * co (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), zclStatus)); SuccessOrExit(err = commandObj->FinishCommand()); } @@ -298,7 +298,7 @@ bool emberAfDoorLockClusterSetYeardayScheduleCallback(app::CommandHandler * comm (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), status)); SuccessOrExit(err = commandObj->FinishCommand()); } @@ -344,7 +344,7 @@ bool emberAfDoorLockClusterGetYeardayScheduleCallback(app::CommandHandler * comm (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), scheduleId)); SuccessOrExit(err = writer->Put(TLV::ContextTag(1), userId)); SuccessOrExit(err = writer->Put(TLV::ContextTag(2), zclStatus)); @@ -386,7 +386,7 @@ bool emberAfDoorLockClusterClearYeardayScheduleCallback(app::CommandHandler * co (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), status)); SuccessOrExit(err = commandObj->FinishCommand()); } @@ -430,7 +430,7 @@ bool emberAfDoorLockClusterSetHolidayScheduleCallback(app::CommandHandler * comm (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), status)); SuccessOrExit(err = commandObj->FinishCommand()); } @@ -474,7 +474,7 @@ bool emberAfDoorLockClusterGetHolidayScheduleCallback(app::CommandHandler * comm (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), holidayScheduleId)); SuccessOrExit(err = writer->Put(TLV::ContextTag(1), zclStatus)); SuccessOrExit(err = writer->Put(TLV::ContextTag(2), entry->localStartTime)); @@ -514,7 +514,7 @@ bool emberAfDoorLockClusterClearHolidayScheduleCallback(app::CommandHandler * co (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), status)); SuccessOrExit(err = commandObj->FinishCommand()); } diff --git a/src/app/clusters/door-lock-server/door-lock-server-user.cpp b/src/app/clusters/door-lock-server/door-lock-server-user.cpp index a80a032bae0aa6..4cbfa249048be7 100644 --- a/src/app/clusters/door-lock-server/door-lock-server-user.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server-user.cpp @@ -240,7 +240,7 @@ bool emberAfDoorLockClusterGetUserTypeCallback(app::CommandHandler * commandObj, ZCL_GET_USER_TYPE_RESPONSE_COMMAND_ID, (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), userId)); SuccessOrExit(err = writer->Put(TLV::ContextTag(1), user->type)); SuccessOrExit(err = commandObj->FinishCommand()); @@ -271,7 +271,7 @@ bool emberAfDoorLockClusterSetUserTypeCallback(app::CommandHandler * commandObj, ZCL_SET_USER_TYPE_RESPONSE_COMMAND_ID, (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), status)); SuccessOrExit(err = commandObj->FinishCommand()); } @@ -317,7 +317,7 @@ bool emberAfDoorLockClusterSetPinCallback(app::CommandHandler * commandObj, cons ZCL_SET_PIN_RESPONSE_COMMAND_ID, (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), status)); SuccessOrExit(err = commandObj->FinishCommand()); } @@ -372,7 +372,7 @@ bool emberAfDoorLockClusterGetPinCallback(app::CommandHandler * commandObj, cons ZCL_GET_PIN_RESPONSE_COMMAND_ID, (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), userId)); SuccessOrExit(err = writer->Put(TLV::ContextTag(1), user.status)); SuccessOrExit(err = writer->Put(TLV::ContextTag(2), user.type)); @@ -420,7 +420,7 @@ bool emberAfDoorLockClusterClearPinCallback(app::CommandHandler * commandObj, co ZCL_CLEAR_PIN_RESPONSE_COMMAND_ID, (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), status)); SuccessOrExit(err = commandObj->FinishCommand()); } @@ -465,7 +465,7 @@ bool emberAfDoorLockClusterClearAllPinsCallback(app::CommandHandler * commandObj ZCL_CLEAR_ALL_PINS_RESPONSE_COMMAND_ID, (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), static_cast(0))); SuccessOrExit(err = commandObj->FinishCommand()); } @@ -497,7 +497,7 @@ bool emberAfDoorLockClusterSetRfidCallback(app::CommandHandler * commandObj, con ZCL_SET_RFID_RESPONSE_COMMAND_ID, (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), status)); SuccessOrExit(err = commandObj->FinishCommand()); } @@ -524,7 +524,7 @@ bool emberAfDoorLockClusterGetRfidCallback(app::CommandHandler * commandObj, con ZCL_GET_RFID_RESPONSE_COMMAND_ID, (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), userId)); SuccessOrExit(err = writer->Put(TLV::ContextTag(1), user.status)); SuccessOrExit(err = writer->Put(TLV::ContextTag(2), user.type)); @@ -562,7 +562,7 @@ bool emberAfDoorLockClusterClearRfidCallback(app::CommandHandler * commandObj, c ZCL_CLEAR_RFID_RESPONSE_COMMAND_ID, (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), status)); SuccessOrExit(err = commandObj->FinishCommand()); } @@ -589,7 +589,7 @@ bool emberAfDoorLockClusterClearAllRfidsCallback(app::CommandHandler * commandOb ZCL_CLEAR_ALL_RFIDS_RESPONSE_COMMAND_ID, (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), static_cast(0))); SuccessOrExit(err = commandObj->FinishCommand()); } @@ -687,7 +687,7 @@ bool emberAfDoorLockClusterLockDoorCallback(app::CommandHandler * commandObj, co ZCL_LOCK_DOOR_RESPONSE_COMMAND_ID, (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), doorLocked ? EMBER_ZCL_STATUS_SUCCESS : EMBER_ZCL_STATUS_FAILURE)); SuccessOrExit(err = commandObj->FinishCommand()); } @@ -754,7 +754,7 @@ bool emberAfDoorLockClusterUnlockDoorCallback(app::CommandHandler * commandObj, ZCL_UNLOCK_DOOR_RESPONSE_COMMAND_ID, (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), doorUnlocked ? EMBER_ZCL_STATUS_SUCCESS : EMBER_ZCL_STATUS_FAILURE)); SuccessOrExit(err = commandObj->FinishCommand()); } @@ -951,7 +951,7 @@ bool emberAfDoorLockClusterUnlockWithTimeoutCallback(app::CommandHandler * comma (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), status)); SuccessOrExit(err = commandObj->FinishCommand()); } diff --git a/src/app/clusters/groups-server/groups-server.cpp b/src/app/clusters/groups-server/groups-server.cpp index f98377ff88ed01..12422530369595 100644 --- a/src/app/clusters/groups-server/groups-server.cpp +++ b/src/app/clusters/groups-server/groups-server.cpp @@ -178,7 +178,7 @@ bool emberAfGroupsClusterAddGroupCallback(app::CommandHandler * commandObj, cons ZCL_ADD_GROUP_RESPONSE_COMMAND_ID, (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), status)); SuccessOrExit(err = writer->Put(TLV::ContextTag(1), groupId)); SuccessOrExit(err = commandObj->FinishCommand()); @@ -222,7 +222,7 @@ bool emberAfGroupsClusterViewGroupCallback(app::CommandHandler * commandObj, con ZCL_VIEW_GROUP_RESPONSE_COMMAND_ID, (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), status)); SuccessOrExit(err = writer->Put(TLV::ContextTag(1), groupId)); SuccessOrExit(err = writer->PutString(TLV::ContextTag(2), reinterpret_cast(&groupName[1]), groupName[0])); @@ -321,7 +321,7 @@ bool emberAfGroupsClusterGetGroupMembershipCallback(app::CommandHandler * comman (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), static_cast(0xff))); SuccessOrExit(err = writer->Put(TLV::ContextTag(1), count)); SuccessOrExit(err = writer->PutBytes(TLV::ContextTag(2), list, listLen)); @@ -373,7 +373,7 @@ bool emberAfGroupsClusterRemoveGroupCallback(app::CommandHandler * commandObj, c ZCL_REMOVE_GROUP_RESPONSE_COMMAND_ID, (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), status)); SuccessOrExit(err = writer->Put(TLV::ContextTag(1), groupId)); SuccessOrExit(err = commandObj->FinishCommand()); diff --git a/src/app/clusters/identify-server/identify-server.cpp b/src/app/clusters/identify-server/identify-server.cpp index 78e1762c7397a0..09680484d2ce46 100644 --- a/src/app/clusters/identify-server/identify-server.cpp +++ b/src/app/clusters/identify-server/identify-server.cpp @@ -263,7 +263,7 @@ bool emberAfIdentifyClusterIdentifyQueryCallback(CommandHandler * commandObj, co VerifyOrExit(commandObj != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), identifyTime)); SuccessOrExit(err = commandObj->FinishCommand()); } diff --git a/src/app/clusters/keypad-input-server/keypad-input-server.cpp b/src/app/clusters/keypad-input-server/keypad-input-server.cpp index 18fd2636438e67..a6c268d01d11ef 100644 --- a/src/app/clusters/keypad-input-server/keypad-input-server.cpp +++ b/src/app/clusters/keypad-input-server/keypad-input-server.cpp @@ -43,7 +43,7 @@ static void sendResponse(app::CommandHandler * command, EmberAfKeypadInputStatus VerifyOrExit(command != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = command->PrepareCommand(cmdParams)); - VerifyOrExit((writer = command->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = command->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), keypadInputStatus)); SuccessOrExit(err = command->FinishCommand()); diff --git a/src/app/clusters/media-playback-server/media-playback-server.cpp b/src/app/clusters/media-playback-server/media-playback-server.cpp index ec23fc2fbf3d98..cc4477398de35e 100644 --- a/src/app/clusters/media-playback-server/media-playback-server.cpp +++ b/src/app/clusters/media-playback-server/media-playback-server.cpp @@ -86,7 +86,7 @@ static void sendResponse(app::CommandHandler * command, const char * responseNam VerifyOrExit(command != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = command->PrepareCommand(cmdParams)); - VerifyOrExit((writer = command->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = command->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), mediaPlaybackStatus)); SuccessOrExit(err = command->FinishCommand()); diff --git a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp index cce24fc1fe4568..f9697a505a8b57 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -416,7 +416,7 @@ CHIP_ERROR SendNOCResponse(app::Command * commandObj, EmberAfNodeOperationalCert VerifyOrReturnError(commandObj != nullptr, CHIP_ERROR_INCORRECT_STATE); ReturnErrorOnFailure(commandObj->PrepareCommand(cmdParams)); - writer = commandObj->GetCommandDataElementTLVWriter(); + writer = commandObj->GetCommandDataIBTLVWriter(); ReturnErrorOnFailure(writer->Put(TLV::ContextTag(0), status)); if (status == EMBER_ZCL_NODE_OPERATIONAL_CERT_STATUS_SUCCESS) { diff --git a/src/app/clusters/scenes/scenes.cpp b/src/app/clusters/scenes/scenes.cpp index a69d8039323e84..9738091c4c1e19 100644 --- a/src/app/clusters/scenes/scenes.cpp +++ b/src/app/clusters/scenes/scenes.cpp @@ -284,7 +284,7 @@ bool emberAfScenesClusterRemoveSceneCallback(app::CommandHandler * commandObj, c ZCL_REMOVE_SCENE_RESPONSE_COMMAND_ID, (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), status)); SuccessOrExit(err = writer->Put(TLV::ContextTag(1), groupId)); SuccessOrExit(err = writer->Put(TLV::ContextTag(2), sceneId)); @@ -337,7 +337,7 @@ bool emberAfScenesClusterRemoveAllScenesCallback(app::CommandHandler * commandOb (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), status)); SuccessOrExit(err = writer->Put(TLV::ContextTag(1), groupId)); SuccessOrExit(err = commandObj->FinishCommand()); @@ -371,7 +371,7 @@ bool emberAfScenesClusterStoreSceneCallback(app::CommandHandler * commandObj, co ZCL_STORE_SCENE_RESPONSE_COMMAND_ID, (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), status)); SuccessOrExit(err = writer->Put(TLV::ContextTag(1), groupId)); SuccessOrExit(err = writer->Put(TLV::ContextTag(2), sceneId)); @@ -466,7 +466,7 @@ bool emberAfScenesClusterGetSceneMembershipCallback(app::CommandHandler * comman (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), status)); SuccessOrExit(err = writer->Put(TLV::ContextTag(1), static_cast(EMBER_AF_PLUGIN_SCENES_TABLE_SIZE - @@ -1070,7 +1070,7 @@ bool emberAfPluginScenesServerParseAddScene( } TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), status)); SuccessOrExit(err = writer->Put(TLV::ContextTag(1), groupId)); SuccessOrExit(err = writer->Put(TLV::ContextTag(2), sceneId)); @@ -1126,7 +1126,7 @@ bool emberAfPluginScenesServerParseViewScene(app::CommandHandler * commandObj, c } TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(cmdParams)); - VerifyOrExit((writer = commandObj->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), status)); SuccessOrExit(err = writer->Put(TLV::ContextTag(1), groupId)); SuccessOrExit(err = writer->Put(TLV::ContextTag(2), sceneId)); diff --git a/src/app/clusters/target-navigator-server/target-navigator-server.cpp b/src/app/clusters/target-navigator-server/target-navigator-server.cpp index 0bcc78f544f1f5..d471e7ec2817a5 100644 --- a/src/app/clusters/target-navigator-server/target-navigator-server.cpp +++ b/src/app/clusters/target-navigator-server/target-navigator-server.cpp @@ -44,7 +44,7 @@ void sendResponse(app::CommandHandler * command, TargetNavigatorResponse respons ZCL_NAVIGATE_TARGET_RESPONSE_COMMAND_ID, (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = command->PrepareCommand(cmdParams)); - VerifyOrExit((writer = command->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = command->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); SuccessOrExit(err = writer->Put(TLV::ContextTag(0), response.status)); SuccessOrExit(err = writer->PutString(TLV::ContextTag(1), reinterpret_cast(response.data))); SuccessOrExit(err = command->FinishCommand()); diff --git a/src/app/clusters/tv-channel-server/tv-channel-server.cpp b/src/app/clusters/tv-channel-server/tv-channel-server.cpp index 93ee7ed15d3b21..e0d373c962936c 100644 --- a/src/app/clusters/tv-channel-server/tv-channel-server.cpp +++ b/src/app/clusters/tv-channel-server/tv-channel-server.cpp @@ -60,7 +60,7 @@ void sendResponse(app::CommandHandler * command, ::TvChannelInfo channelInfo) ZCL_CHANGE_CHANNEL_RESPONSE_COMMAND_ID, (app::CommandPathFlags::kEndpointIdValid) }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = command->PrepareCommand(cmdParams)); - VerifyOrExit((writer = command->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = command->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // TODO: Enable this once struct as param is supported // SuccessOrExit(err = writer->Put(TLV::ContextTag(0), channelInfo)); // EmberAfTvChannelErrorType. errorType diff --git a/src/app/tests/TestCommandInteraction.cpp b/src/app/tests/TestCommandInteraction.cpp index 7dfbb74956163d..ae9f803d8a8351 100644 --- a/src/app/tests/TestCommandInteraction.cpp +++ b/src/app/tests/TestCommandInteraction.cpp @@ -94,7 +94,7 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, chip aCommandPath.mCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->PrepareCommand(responseParams); - chip::TLV::TLVWriter * writer = apCommandObj->GetCommandDataElementTLVWriter(); + chip::TLV::TLVWriter * writer = apCommandObj->GetCommandDataIBTLVWriter(); writer->PutBoolean(chip::TLV::ContextTag(1), true); apCommandObj->FinishCommand(); } @@ -190,8 +190,8 @@ class TestCommandInteraction static void GenerateReceivedCommand(nlTestSuite * apSuite, void * apContext, System::PacketBufferHandle & aPayload, bool aNeedCommandData, EndpointId aEndpointId = kTestEndpointId, ClusterId aClusterId = kTestClusterId, CommandId aCommandId = kTestCommandId); - static void AddCommandDataElement(nlTestSuite * apSuite, void * apContext, Command * apCommand, bool aNeedStatusCode, - CommandId aCommandId = kTestCommandId); + static void AddCommandDataIB(nlTestSuite * apSuite, void * apContext, Command * apCommand, bool aNeedStatusCode, + CommandId aCommandId = kTestCommandId); static void ValidateCommandHandlerWithSendCommand(nlTestSuite * apSuite, void * apContext, bool aNeedStatusCode); }; @@ -227,19 +227,20 @@ void TestCommandInteraction::GenerateReceivedCommand(nlTestSuite * apSuite, void CommandList::Builder commandList = invokeCommandBuilder.CreateCommandListBuilder(); NL_TEST_ASSERT(apSuite, invokeCommandBuilder.GetError() == CHIP_NO_ERROR); - CommandDataElement::Builder commandDataElementBuilder = commandList.CreateCommandDataElementBuilder(); + CommandDataIB::Builder commandDataIBBuilder = commandList.CreateCommandDataIBBuilder(); NL_TEST_ASSERT(apSuite, commandList.GetError() == CHIP_NO_ERROR); - CommandPathIB::Builder commandPathBuilder = commandDataElementBuilder.CreateCommandPathBuilder(); - NL_TEST_ASSERT(apSuite, commandDataElementBuilder.GetError() == CHIP_NO_ERROR); + + CommandPathIB::Builder commandPathBuilder = commandDataIBBuilder.CreateCommandPathBuilder(); + NL_TEST_ASSERT(apSuite, commandDataIBBuilder.GetError() == CHIP_NO_ERROR); + commandPathBuilder.EndpointId(aEndpointId).ClusterId(aClusterId).CommandId(aCommandId).EndOfCommandPath(); NL_TEST_ASSERT(apSuite, commandPathBuilder.GetError() == CHIP_NO_ERROR); if (aNeedCommandData) { - chip::TLV::TLVWriter * pWriter = commandDataElementBuilder.GetWriter(); + chip::TLV::TLVWriter * pWriter = commandDataIBBuilder.GetWriter(); chip::TLV::TLVType dummyType = chip::TLV::kTLVType_NotSpecified; - err = pWriter->StartContainer(chip::TLV::ContextTag(CommandDataElement::kCsTag_Data), chip::TLV::kTLVType_Structure, - dummyType); + err = pWriter->StartContainer(chip::TLV::ContextTag(CommandDataIB::kCsTag_Data), chip::TLV::kTLVType_Structure, dummyType); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); err = pWriter->PutBoolean(chip::TLV::ContextTag(1), true); @@ -249,8 +250,8 @@ void TestCommandInteraction::GenerateReceivedCommand(nlTestSuite * apSuite, void NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); } - commandDataElementBuilder.EndOfCommandDataElement(); - NL_TEST_ASSERT(apSuite, commandDataElementBuilder.GetError() == CHIP_NO_ERROR); + commandDataIBBuilder.EndOfCommandDataIB(); + NL_TEST_ASSERT(apSuite, commandDataIBBuilder.GetError() == CHIP_NO_ERROR); commandList.EndOfCommandList(); NL_TEST_ASSERT(apSuite, commandList.GetError() == CHIP_NO_ERROR); @@ -262,8 +263,8 @@ void TestCommandInteraction::GenerateReceivedCommand(nlTestSuite * apSuite, void NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); } -void TestCommandInteraction::AddCommandDataElement(nlTestSuite * apSuite, void * apContext, Command * apCommand, - bool aNeedStatusCode, CommandId aCommandId) +void TestCommandInteraction::AddCommandDataIB(nlTestSuite * apSuite, void * apContext, Command * apCommand, bool aNeedStatusCode, + CommandId aCommandId) { CHIP_ERROR err = CHIP_NO_ERROR; auto commandPathParams = MakeTestCommandPath(aCommandId); @@ -281,7 +282,7 @@ void TestCommandInteraction::AddCommandDataElement(nlTestSuite * apSuite, void * err = apCommand->PrepareCommand(commandPathParams); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - chip::TLV::TLVWriter * writer = apCommand->GetCommandDataElementTLVWriter(); + chip::TLV::TLVWriter * writer = apCommand->GetCommandDataIBTLVWriter(); err = writer->PutBoolean(chip::TLV::ContextTag(1), true); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -329,7 +330,7 @@ void TestCommandInteraction::TestCommandSenderWithSendCommand(nlTestSuite * apSu System::PacketBufferHandle buf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); - AddCommandDataElement(apSuite, apContext, &commandSender, false); + AddCommandDataIB(apSuite, apContext, &commandSender, false); err = commandSender.SendCommandRequest(kTestDeviceNodeId, gFabricIndex, Optional::Missing()); NL_TEST_ASSERT(apSuite, err == CHIP_ERROR_NOT_CONNECTED); @@ -384,7 +385,7 @@ void TestCommandInteraction::ValidateCommandHandlerWithSendCommand(nlTestSuite * TestExchangeDelegate delegate; commandHandler.mpExchangeCtx->SetDelegate(&delegate); - AddCommandDataElement(apSuite, apContext, &commandHandler, aNeedStatusCode); + AddCommandDataIB(apSuite, apContext, &commandHandler, aNeedStatusCode); err = commandHandler.Finalize(commandPacket); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -505,7 +506,7 @@ void TestCommandInteraction::TestCommandSenderCommandSuccessResponseFlow(nlTestS mockCommandSenderDelegate.ResetCounter(); app::CommandSender commandSender(&mockCommandSenderDelegate, gExchangeManager); - AddCommandDataElement(apSuite, apContext, &commandSender, false); + AddCommandDataIB(apSuite, apContext, &commandSender, false); err = commandSender.SendCommandRequest(0, 0, Optional(ctx.GetSessionBobToAlice())); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, @@ -524,7 +525,7 @@ void TestCommandInteraction::TestCommandSenderCommandSpecificResponseFlow(nlTest mockCommandSenderDelegate.ResetCounter(); app::CommandSender commandSender(&mockCommandSenderDelegate, gExchangeManager); - AddCommandDataElement(apSuite, apContext, &commandSender, false, kTestCommandIdCommandSpecificResponse); + AddCommandDataIB(apSuite, apContext, &commandSender, false, kTestCommandIdCommandSpecificResponse); err = commandSender.SendCommandRequest(0, 0, Optional(ctx.GetSessionBobToAlice())); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, @@ -543,7 +544,7 @@ void TestCommandInteraction::TestCommandSenderCommandFailureResponseFlow(nlTestS mockCommandSenderDelegate.ResetCounter(); app::CommandSender commandSender(&mockCommandSenderDelegate, gExchangeManager); - AddCommandDataElement(apSuite, apContext, &commandSender, false, kTestNonExistCommandId); + AddCommandDataIB(apSuite, apContext, &commandSender, false, kTestNonExistCommandId); err = commandSender.SendCommandRequest(0, 0, Optional(ctx.GetSessionBobToAlice())); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(apSuite, @@ -570,7 +571,7 @@ void TestCommandInteraction::TestCommandSenderAbruptDestruction(nlTestSuite * ap { app::CommandSender commandSender(&mockCommandSenderDelegate, gExchangeManager); - AddCommandDataElement(apSuite, apContext, &commandSender, false, kTestCommandIdCommandSpecificResponse); + AddCommandDataIB(apSuite, apContext, &commandSender, false, kTestCommandIdCommandSpecificResponse); err = commandSender.SendCommandRequest(0, 0, Optional(ctx.GetSessionBobToAlice())); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); diff --git a/src/app/tests/TestMessageDef.cpp b/src/app/tests/TestMessageDef.cpp index 7e4076fa52a596..891b6e29578d24 100644 --- a/src/app/tests/TestMessageDef.cpp +++ b/src/app/tests/TestMessageDef.cpp @@ -23,7 +23,7 @@ */ #include -#include +#include #include #include #include @@ -537,20 +537,19 @@ void ParseAttributeDataVersionList(nlTestSuite * apSuite, chip::TLV::TLVReader & attributeDataVersionListParser.GetVersion(&version); } -void BuildCommandDataElement(nlTestSuite * apSuite, CommandDataElement::Builder & aCommandDataElementBuilder) +void BuildCommandDataIB(nlTestSuite * apSuite, CommandDataIB::Builder & aCommandDataIBBuilder) { CHIP_ERROR err = CHIP_NO_ERROR; - CommandPathIB::Builder commandPathBuilder = aCommandDataElementBuilder.CreateCommandPathBuilder(); - NL_TEST_ASSERT(apSuite, aCommandDataElementBuilder.GetError() == CHIP_NO_ERROR); + CommandPathIB::Builder commandPathBuilder = aCommandDataIBBuilder.CreateCommandPathBuilder(); + NL_TEST_ASSERT(apSuite, aCommandDataIBBuilder.GetError() == CHIP_NO_ERROR); BuildCommandPath(apSuite, commandPathBuilder); // Construct command data { - chip::TLV::TLVWriter * pWriter = aCommandDataElementBuilder.GetWriter(); + chip::TLV::TLVWriter * pWriter = aCommandDataIBBuilder.GetWriter(); chip::TLV::TLVType dummyType = chip::TLV::kTLVType_NotSpecified; - err = pWriter->StartContainer(chip::TLV::ContextTag(CommandDataElement::kCsTag_Data), chip::TLV::kTLVType_Structure, - dummyType); + err = pWriter->StartContainer(chip::TLV::ContextTag(CommandDataIB::kCsTag_Data), chip::TLV::kTLVType_Structure, dummyType); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); err = pWriter->PutBoolean(chip::TLV::ContextTag(1), true); @@ -560,26 +559,26 @@ void BuildCommandDataElement(nlTestSuite * apSuite, CommandDataElement::Builder NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); } - aCommandDataElementBuilder.EndOfCommandDataElement(); - NL_TEST_ASSERT(apSuite, aCommandDataElementBuilder.GetError() == CHIP_NO_ERROR); + aCommandDataIBBuilder.EndOfCommandDataIB(); + NL_TEST_ASSERT(apSuite, aCommandDataIBBuilder.GetError() == CHIP_NO_ERROR); } -void ParseCommandDataElement(nlTestSuite * apSuite, CommandDataElement::Parser & aCommandDataElementParser) +void ParseCommandDataIB(nlTestSuite * apSuite, CommandDataIB::Parser & aCommandDataIBParser) { CHIP_ERROR err = CHIP_NO_ERROR; CommandPathIB::Parser commandPathParser; #if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK - err = aCommandDataElementParser.CheckSchemaValidity(); + err = aCommandDataIBParser.CheckSchemaValidity(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); #endif - err = aCommandDataElementParser.GetCommandPath(&commandPathParser); + err = aCommandDataIBParser.GetCommandPath(&commandPathParser); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); { chip::TLV::TLVReader reader; bool val = false; chip::TLV::TLVType container; - aCommandDataElementParser.GetData(&reader); + aCommandDataIBParser.GetData(&reader); err = reader.EnterContainer(container); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -594,41 +593,41 @@ void ParseCommandDataElement(nlTestSuite * apSuite, CommandDataElement::Parser & } } -void BuildCommandDataElementWithStatusCode(nlTestSuite * apSuite, CommandDataElement::Builder & aCommandDataElementBuilder) +void BuildCommandDataIBWithStatusCode(nlTestSuite * apSuite, CommandDataIB::Builder & aCommandDataIBBuilder) { - CommandPathIB::Builder commandPathBuilder = aCommandDataElementBuilder.CreateCommandPathBuilder(); - NL_TEST_ASSERT(apSuite, aCommandDataElementBuilder.GetError() == CHIP_NO_ERROR); + CommandPathIB::Builder commandPathBuilder = aCommandDataIBBuilder.CreateCommandPathBuilder(); + NL_TEST_ASSERT(apSuite, aCommandDataIBBuilder.GetError() == CHIP_NO_ERROR); BuildCommandPath(apSuite, commandPathBuilder); - StatusIB::Builder statusIBBuilder = aCommandDataElementBuilder.CreateStatusIBBuilder(); + StatusIB::Builder statusIBBuilder = aCommandDataIBBuilder.CreateStatusIBBuilder(); NL_TEST_ASSERT(apSuite, statusIBBuilder.GetError() == CHIP_NO_ERROR); BuildStatusIB(apSuite, statusIBBuilder); - aCommandDataElementBuilder.EndOfCommandDataElement(); - NL_TEST_ASSERT(apSuite, aCommandDataElementBuilder.GetError() == CHIP_NO_ERROR); + aCommandDataIBBuilder.EndOfCommandDataIB(); + NL_TEST_ASSERT(apSuite, aCommandDataIBBuilder.GetError() == CHIP_NO_ERROR); } -void ParseCommandDataElementWithStatusCode(nlTestSuite * apSuite, CommandDataElement::Parser & aCommandDataElementParser) +void ParseCommandDataIBWithStatusCode(nlTestSuite * apSuite, CommandDataIB::Parser & aCommandDataIBParser) { CHIP_ERROR err = CHIP_NO_ERROR; CommandPathIB::Parser commandPathParser; StatusIB::Parser StatusIBParser; #if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK - err = aCommandDataElementParser.CheckSchemaValidity(); + err = aCommandDataIBParser.CheckSchemaValidity(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); #endif - err = aCommandDataElementParser.GetCommandPath(&commandPathParser); + err = aCommandDataIBParser.GetCommandPath(&commandPathParser); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - err = aCommandDataElementParser.GetStatusIB(&StatusIBParser); + err = aCommandDataIBParser.GetStatusIB(&StatusIBParser); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); } void BuildCommandList(nlTestSuite * apSuite, CommandList::Builder & aCommandListBuilder) { - CommandDataElement::Builder commandDataElementBuilder = aCommandListBuilder.CreateCommandDataElementBuilder(); + CommandDataIB::Builder commandDataIBBuilder = aCommandListBuilder.CreateCommandDataIBBuilder(); NL_TEST_ASSERT(apSuite, aCommandListBuilder.GetError() == CHIP_NO_ERROR); - BuildCommandDataElement(apSuite, commandDataElementBuilder); + BuildCommandDataIB(apSuite, commandDataIBBuilder); aCommandListBuilder.EndOfCommandList(); NL_TEST_ASSERT(apSuite, aCommandListBuilder.GetError() == CHIP_NO_ERROR); @@ -1342,16 +1341,16 @@ void AttributeDataVersionListTest(nlTestSuite * apSuite, void * apContext) ParseAttributeDataVersionList(apSuite, reader); } -void CommandDataElementTest(nlTestSuite * apSuite, void * apContext) +void CommandDataIBTest(nlTestSuite * apSuite, void * apContext) { CHIP_ERROR err = CHIP_NO_ERROR; - CommandDataElement::Builder commandDataElementBuilder; - CommandDataElement::Parser commandDataElementParser; + CommandDataIB::Builder commandDataIBBuilder; + CommandDataIB::Parser commandDataIBParser; chip::System::PacketBufferTLVWriter writer; chip::System::PacketBufferTLVReader reader; writer.Init(chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSize)); - commandDataElementBuilder.Init(&writer); - BuildCommandDataElement(apSuite, commandDataElementBuilder); + commandDataIBBuilder.Init(&writer); + BuildCommandDataIB(apSuite, commandDataIBBuilder); chip::System::PacketBufferHandle buf; err = writer.Finalize(&buf); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -1362,20 +1361,20 @@ void CommandDataElementTest(nlTestSuite * apSuite, void * apContext) err = reader.Next(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - commandDataElementParser.Init(reader); - ParseCommandDataElement(apSuite, commandDataElementParser); + commandDataIBParser.Init(reader); + ParseCommandDataIB(apSuite, commandDataIBParser); } -void CommandDataElementWithStatusCodeTest(nlTestSuite * apSuite, void * apContext) +void CommandDataIBWithStatusCodeTest(nlTestSuite * apSuite, void * apContext) { CHIP_ERROR err = CHIP_NO_ERROR; - CommandDataElement::Builder commandDataElementBuilder; - CommandDataElement::Parser commandDataElementParser; + CommandDataIB::Builder commandDataIBBuilder; + CommandDataIB::Parser commandDataIBParser; chip::System::PacketBufferTLVWriter writer; chip::System::PacketBufferTLVReader reader; writer.Init(chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSize)); - commandDataElementBuilder.Init(&writer); - BuildCommandDataElementWithStatusCode(apSuite, commandDataElementBuilder); + commandDataIBBuilder.Init(&writer); + BuildCommandDataIBWithStatusCode(apSuite, commandDataIBBuilder); chip::System::PacketBufferHandle buf; err = writer.Finalize(&buf); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -1386,8 +1385,8 @@ void CommandDataElementWithStatusCodeTest(nlTestSuite * apSuite, void * apContex err = reader.Next(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - commandDataElementParser.Init(reader); - ParseCommandDataElementWithStatusCode(apSuite, commandDataElementParser); + commandDataIBParser.Init(reader); + ParseCommandDataIBWithStatusCode(apSuite, commandDataIBParser); } void CommandListTest(nlTestSuite * apSuite, void * apContext) @@ -1636,8 +1635,8 @@ const nlTest sTests[] = NL_TEST_DEF("AttributeDataElementTest", AttributeDataElementTest), NL_TEST_DEF("AttributeDataListTest", AttributeDataListTest), NL_TEST_DEF("AttributeDataVersionListTest", AttributeDataVersionListTest), - NL_TEST_DEF("CommandDataElementTest", CommandDataElementTest), - NL_TEST_DEF("CommandDataElementWithStatusCodeTest", CommandDataElementWithStatusCodeTest), + NL_TEST_DEF("CommandDataIBTest", CommandDataIBTest), + NL_TEST_DEF("CommandDataIBWithStatusCodeTest", CommandDataIBWithStatusCodeTest), NL_TEST_DEF("CommandListTest", CommandListTest), NL_TEST_DEF("ReportDataTest", ReportDataTest), NL_TEST_DEF("InvokeCommandTest", InvokeCommandTest), diff --git a/src/app/tests/integration/chip_im_initiator.cpp b/src/app/tests/integration/chip_im_initiator.cpp index c0e9f9888d5485..7404991ea657e9 100644 --- a/src/app/tests/integration/chip_im_initiator.cpp +++ b/src/app/tests/integration/chip_im_initiator.cpp @@ -233,7 +233,7 @@ CHIP_ERROR SendCommandRequest(std::unique_ptr && comma err = commandSender->PrepareCommand(commandPathParams); SuccessOrExit(err); - writer = commandSender->GetCommandDataElementTLVWriter(); + writer = commandSender->GetCommandDataIBTLVWriter(); err = writer->Put(chip::TLV::ContextTag(1), effectIdentifier); SuccessOrExit(err); diff --git a/src/app/tests/integration/chip_im_responder.cpp b/src/app/tests/integration/chip_im_responder.cpp index 2c4e3d467128cf..976a975cc9cbb7 100644 --- a/src/app/tests/integration/chip_im_responder.cpp +++ b/src/app/tests/integration/chip_im_responder.cpp @@ -91,7 +91,7 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, chip ReturnOnFailure(apCommandObj->PrepareCommand(commandPathParams)); - writer = apCommandObj->GetCommandDataElementTLVWriter(); + writer = apCommandObj->GetCommandDataIBTLVWriter(); ReturnOnFailure(writer->Put(chip::TLV::ContextTag(kTestFieldId1), kTestFieldValue1)); ReturnOnFailure(writer->Put(chip::TLV::ContextTag(kTestFieldId2), kTestFieldValue2)); diff --git a/src/app/zap-templates/templates/app/CHIPClusters-src.zapt b/src/app/zap-templates/templates/app/CHIPClusters-src.zapt index f829d38b53bb5c..43ba748e312238 100644 --- a/src/app/zap-templates/templates/app/CHIPClusters-src.zapt +++ b/src/app/zap-templates/templates/app/CHIPClusters-src.zapt @@ -61,7 +61,7 @@ CHIP_ERROR {{asUpperCamelCase clusterName}}Cluster::{{asUpperCamelCase name}}(Ca {{#chip_cluster_command_arguments_with_structs_expanded}} {{#first}} - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); {{/first}} // {{asLowerCamelCase label}}: {{asLowerCamelCase type}} {{#if (isCharString type)}} diff --git a/src/controller/python/chip/clusters/command.cpp b/src/controller/python/chip/clusters/command.cpp index 3bda2177984d23..0f282a95ae43aa 100644 --- a/src/controller/python/chip/clusters/command.cpp +++ b/src/controller/python/chip/clusters/command.cpp @@ -117,7 +117,7 @@ chip::ChipError::StorageType pychip_CommandSender_SendCommand(void * appContext, SuccessOrExit(err = sender->PrepareCommand(cmdParams)); { - auto writer = sender->GetCommandDataElementTLVWriter(); + auto writer = sender->GetCommandDataIBTLVWriter(); TLV::TLVReader reader; TLV::TLVType type; VerifyOrExit(writer != nullptr, err = CHIP_ERROR_INCORRECT_STATE); From 3aa05f4fbcbb62344f25b9d43c67a11b4464270d Mon Sep 17 00:00:00 2001 From: Yunhan Wang Date: Wed, 20 Oct 2021 17:29:21 -0700 Subject: [PATCH 2/2] run codegen --- .../zap-generated/CHIPClusters.cpp | 246 +++++++++--------- .../zap-generated/CHIPClusters.cpp | 6 +- .../zap-generated/CHIPClusters.cpp | 14 +- .../tv-app/zap-generated/CHIPClusters.cpp | 28 +- 4 files changed, 147 insertions(+), 147 deletions(-) diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp index 94213042613675..4596c560ddda34 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp @@ -73,7 +73,7 @@ CHIP_ERROR AccountLoginCluster::GetSetupPIN(Callback::Cancelable * onSuccessCall SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // tempAccountIdentifier: charString SuccessOrExit(err = writer->PutString( TLV::ContextTag(argSeqNumber++), @@ -116,7 +116,7 @@ CHIP_ERROR AccountLoginCluster::Login(Callback::Cancelable * onSuccessCallback, SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // tempAccountIdentifier: charString SuccessOrExit(err = writer->PutString( TLV::ContextTag(argSeqNumber++), @@ -189,7 +189,7 @@ CHIP_ERROR AdministratorCommissioningCluster::OpenBasicCommissioningWindow(Callb SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // commissioningTimeout: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), commissioningTimeout)); @@ -234,7 +234,7 @@ CHIP_ERROR AdministratorCommissioningCluster::OpenCommissioningWindow(Callback:: SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // commissioningTimeout: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), commissioningTimeout)); // PAKEVerifier: octetString @@ -356,7 +356,7 @@ CHIP_ERROR ApplicationBasicCluster::ChangeStatus(Callback::Cancelable * onSucces SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // status: applicationBasicStatus SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), status)); @@ -500,7 +500,7 @@ CHIP_ERROR ApplicationLauncherCluster::LaunchApp(Callback::Cancelable * onSucces SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // data: charString SuccessOrExit( err = writer->PutString(TLV::ContextTag(argSeqNumber++), Span(Uint8::to_const_char(data.data()), data.size()))); @@ -604,7 +604,7 @@ CHIP_ERROR AudioOutputCluster::RenameOutput(Callback::Cancelable * onSuccessCall SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // index: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), index)); // name: charString @@ -648,7 +648,7 @@ CHIP_ERROR AudioOutputCluster::SelectOutput(Callback::Cancelable * onSuccessCall SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // index: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), index)); @@ -738,7 +738,7 @@ CHIP_ERROR BarrierControlCluster::BarrierControlGoToPercent(Callback::Cancelable SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // percentOpen: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), percentOpen)); @@ -1326,7 +1326,7 @@ CHIP_ERROR BindingCluster::Bind(Callback::Cancelable * onSuccessCallback, Callba SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // nodeId: nodeId SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), nodeId)); // groupId: groupId @@ -1374,7 +1374,7 @@ CHIP_ERROR BindingCluster::Unbind(Callback::Cancelable * onSuccessCallback, Call SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // nodeId: nodeId SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), nodeId)); // groupId: groupId @@ -1645,7 +1645,7 @@ CHIP_ERROR ColorControlCluster::ColorLoopSet(Callback::Cancelable * onSuccessCal SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // updateFlags: colorLoopUpdateFlags SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), updateFlags)); // action: colorLoopAction @@ -1698,7 +1698,7 @@ CHIP_ERROR ColorControlCluster::EnhancedMoveHue(Callback::Cancelable * onSuccess SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // moveMode: hueMoveMode SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), moveMode)); // rate: int16u @@ -1746,7 +1746,7 @@ CHIP_ERROR ColorControlCluster::EnhancedMoveToHue(Callback::Cancelable * onSucce SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // enhancedHue: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), enhancedHue)); // direction: hueDirection @@ -1798,7 +1798,7 @@ CHIP_ERROR ColorControlCluster::EnhancedMoveToHueAndSaturation(Callback::Cancela SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // enhancedHue: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), enhancedHue)); // saturation: int8u @@ -1848,7 +1848,7 @@ CHIP_ERROR ColorControlCluster::EnhancedStepHue(Callback::Cancelable * onSuccess SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // stepMode: hueStepMode SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), stepMode)); // stepSize: int16u @@ -1897,7 +1897,7 @@ CHIP_ERROR ColorControlCluster::MoveColor(Callback::Cancelable * onSuccessCallba SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // rateX: int16s SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), rateX)); // rateY: int16s @@ -1946,7 +1946,7 @@ CHIP_ERROR ColorControlCluster::MoveColorTemperature(Callback::Cancelable * onSu SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // moveMode: hueMoveMode SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), moveMode)); // rate: int16u @@ -1997,7 +1997,7 @@ CHIP_ERROR ColorControlCluster::MoveHue(Callback::Cancelable * onSuccessCallback SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // moveMode: hueMoveMode SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), moveMode)); // rate: int8u @@ -2044,7 +2044,7 @@ CHIP_ERROR ColorControlCluster::MoveSaturation(Callback::Cancelable * onSuccessC SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // moveMode: saturationMoveMode SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), moveMode)); // rate: int8u @@ -2092,7 +2092,7 @@ CHIP_ERROR ColorControlCluster::MoveToColor(Callback::Cancelable * onSuccessCall SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // colorX: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), colorX)); // colorY: int16u @@ -2143,7 +2143,7 @@ CHIP_ERROR ColorControlCluster::MoveToColorTemperature(Callback::Cancelable * on SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // colorTemperature: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), colorTemperature)); // transitionTime: int16u @@ -2191,7 +2191,7 @@ CHIP_ERROR ColorControlCluster::MoveToHue(Callback::Cancelable * onSuccessCallba SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // hue: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), hue)); // direction: hueDirection @@ -2242,7 +2242,7 @@ CHIP_ERROR ColorControlCluster::MoveToHueAndSaturation(Callback::Cancelable * on SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // hue: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), hue)); // saturation: int8u @@ -2292,7 +2292,7 @@ CHIP_ERROR ColorControlCluster::MoveToSaturation(Callback::Cancelable * onSucces SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // saturation: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), saturation)); // transitionTime: int16u @@ -2340,7 +2340,7 @@ CHIP_ERROR ColorControlCluster::StepColor(Callback::Cancelable * onSuccessCallba SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // stepX: int16s SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), stepX)); // stepY: int16s @@ -2391,7 +2391,7 @@ CHIP_ERROR ColorControlCluster::StepColorTemperature(Callback::Cancelable * onSu SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // stepMode: hueStepMode SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), stepMode)); // stepSize: int16u @@ -2445,7 +2445,7 @@ CHIP_ERROR ColorControlCluster::StepHue(Callback::Cancelable * onSuccessCallback SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // stepMode: hueStepMode SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), stepMode)); // stepSize: int8u @@ -2495,7 +2495,7 @@ CHIP_ERROR ColorControlCluster::StepSaturation(Callback::Cancelable * onSuccessC SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // stepMode: saturationStepMode SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), stepMode)); // stepSize: int8u @@ -2544,7 +2544,7 @@ CHIP_ERROR ColorControlCluster::StopMoveStep(Callback::Cancelable * onSuccessCal SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // optionsMask: bitmap8 SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), optionsMask)); // optionsOverride: bitmap8 @@ -3632,7 +3632,7 @@ CHIP_ERROR ContentLauncherCluster::LaunchContent(Callback::Cancelable * onSucces SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // autoPlay: boolean SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), autoPlay)); // data: charString @@ -3676,7 +3676,7 @@ CHIP_ERROR ContentLauncherCluster::LaunchURL(Callback::Cancelable * onSuccessCal SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // contentURL: charString SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), Span(Uint8::to_const_char(contentURL.data()), contentURL.size()))); @@ -3835,7 +3835,7 @@ CHIP_ERROR DiagnosticLogsCluster::RetrieveLogsRequest(Callback::Cancelable * onS SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // intent: logsIntent SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), intent)); // requestedProtocol: logsTransferProtocol @@ -3964,7 +3964,7 @@ CHIP_ERROR DoorLockCluster::ClearHolidaySchedule(Callback::Cancelable * onSucces SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // scheduleId: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), scheduleId)); @@ -4005,7 +4005,7 @@ CHIP_ERROR DoorLockCluster::ClearPin(Callback::Cancelable * onSuccessCallback, C SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // userId: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), userId)); @@ -4046,7 +4046,7 @@ CHIP_ERROR DoorLockCluster::ClearRfid(Callback::Cancelable * onSuccessCallback, SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // userId: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), userId)); @@ -4087,7 +4087,7 @@ CHIP_ERROR DoorLockCluster::ClearWeekdaySchedule(Callback::Cancelable * onSucces SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // scheduleId: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), scheduleId)); // userId: int16u @@ -4130,7 +4130,7 @@ CHIP_ERROR DoorLockCluster::ClearYeardaySchedule(Callback::Cancelable * onSucces SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // scheduleId: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), scheduleId)); // userId: int16u @@ -4173,7 +4173,7 @@ CHIP_ERROR DoorLockCluster::GetHolidaySchedule(Callback::Cancelable * onSuccessC SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // scheduleId: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), scheduleId)); @@ -4214,7 +4214,7 @@ CHIP_ERROR DoorLockCluster::GetLogRecord(Callback::Cancelable * onSuccessCallbac SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // logIndex: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), logIndex)); @@ -4255,7 +4255,7 @@ CHIP_ERROR DoorLockCluster::GetPin(Callback::Cancelable * onSuccessCallback, Cal SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // userId: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), userId)); @@ -4296,7 +4296,7 @@ CHIP_ERROR DoorLockCluster::GetRfid(Callback::Cancelable * onSuccessCallback, Ca SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // userId: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), userId)); @@ -4337,7 +4337,7 @@ CHIP_ERROR DoorLockCluster::GetUserType(Callback::Cancelable * onSuccessCallback SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // userId: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), userId)); @@ -4378,7 +4378,7 @@ CHIP_ERROR DoorLockCluster::GetWeekdaySchedule(Callback::Cancelable * onSuccessC SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // scheduleId: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), scheduleId)); // userId: int16u @@ -4421,7 +4421,7 @@ CHIP_ERROR DoorLockCluster::GetYeardaySchedule(Callback::Cancelable * onSuccessC SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // scheduleId: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), scheduleId)); // userId: int16u @@ -4464,7 +4464,7 @@ CHIP_ERROR DoorLockCluster::LockDoor(Callback::Cancelable * onSuccessCallback, C SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // pin: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), pin)); @@ -4506,7 +4506,7 @@ CHIP_ERROR DoorLockCluster::SetHolidaySchedule(Callback::Cancelable * onSuccessC SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // scheduleId: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), scheduleId)); // localStartTime: int32u @@ -4553,7 +4553,7 @@ CHIP_ERROR DoorLockCluster::SetPin(Callback::Cancelable * onSuccessCallback, Cal SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // userId: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), userId)); // userStatus: doorLockUserStatus @@ -4600,7 +4600,7 @@ CHIP_ERROR DoorLockCluster::SetRfid(Callback::Cancelable * onSuccessCallback, Ca SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // userId: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), userId)); // userStatus: doorLockUserStatus @@ -4647,7 +4647,7 @@ CHIP_ERROR DoorLockCluster::SetUserType(Callback::Cancelable * onSuccessCallback SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // userId: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), userId)); // userType: doorLockUserType @@ -4691,7 +4691,7 @@ CHIP_ERROR DoorLockCluster::SetWeekdaySchedule(Callback::Cancelable * onSuccessC SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // scheduleId: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), scheduleId)); // userId: int16u @@ -4744,7 +4744,7 @@ CHIP_ERROR DoorLockCluster::SetYeardaySchedule(Callback::Cancelable * onSuccessC SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // scheduleId: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), scheduleId)); // userId: int16u @@ -4791,7 +4791,7 @@ CHIP_ERROR DoorLockCluster::UnlockDoor(Callback::Cancelable * onSuccessCallback, SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // pin: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), pin)); @@ -4832,7 +4832,7 @@ CHIP_ERROR DoorLockCluster::UnlockWithTimeout(Callback::Cancelable * onSuccessCa SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // timeoutInSeconds: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), timeoutInSeconds)); // pin: octetString @@ -5474,7 +5474,7 @@ CHIP_ERROR GeneralCommissioningCluster::ArmFailSafe(Callback::Cancelable * onSuc SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // expiryLengthSeconds: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), expiryLengthSeconds)); // breadcrumb: int64u @@ -5561,7 +5561,7 @@ CHIP_ERROR GeneralCommissioningCluster::SetRegulatoryConfig(Callback::Cancelable SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // location: regulatoryLocationType SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), location)); // countryCode: charString @@ -5798,7 +5798,7 @@ CHIP_ERROR GroupsCluster::AddGroup(Callback::Cancelable * onSuccessCallback, Cal SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // groupId: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); // groupName: charString @@ -5842,7 +5842,7 @@ CHIP_ERROR GroupsCluster::AddGroupIfIdentifying(Callback::Cancelable * onSuccess SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // groupId: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); // groupName: charString @@ -5886,7 +5886,7 @@ CHIP_ERROR GroupsCluster::GetGroupMembership(Callback::Cancelable * onSuccessCal SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // groupCount: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupCount)); // groupList: int16u @@ -5967,7 +5967,7 @@ CHIP_ERROR GroupsCluster::RemoveGroup(Callback::Cancelable * onSuccessCallback, SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // groupId: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); @@ -6008,7 +6008,7 @@ CHIP_ERROR GroupsCluster::ViewGroup(Callback::Cancelable * onSuccessCallback, Ca SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // groupId: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); @@ -6109,7 +6109,7 @@ CHIP_ERROR IdentifyCluster::Identify(Callback::Cancelable * onSuccessCallback, C SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // identifyTime: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), identifyTime)); @@ -6188,7 +6188,7 @@ CHIP_ERROR IdentifyCluster::TriggerEffect(Callback::Cancelable * onSuccessCallba SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // effectIdentifier: identifyEffectIdentifier SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), effectIdentifier)); // effectVariant: identifyEffectVariant @@ -6302,7 +6302,7 @@ CHIP_ERROR KeypadInputCluster::SendKey(Callback::Cancelable * onSuccessCallback, SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // keyCode: keypadInputCecKeyCode SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), keyCode)); @@ -6363,7 +6363,7 @@ CHIP_ERROR LevelControlCluster::Move(Callback::Cancelable * onSuccessCallback, C SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // moveMode: moveMode SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), moveMode)); // rate: int8u @@ -6410,7 +6410,7 @@ CHIP_ERROR LevelControlCluster::MoveToLevel(Callback::Cancelable * onSuccessCall SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // level: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), level)); // transitionTime: int16u @@ -6458,7 +6458,7 @@ CHIP_ERROR LevelControlCluster::MoveToLevelWithOnOff(Callback::Cancelable * onSu SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // level: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), level)); // transitionTime: int16u @@ -6501,7 +6501,7 @@ CHIP_ERROR LevelControlCluster::MoveWithOnOff(Callback::Cancelable * onSuccessCa SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // moveMode: moveMode SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), moveMode)); // rate: int8u @@ -6545,7 +6545,7 @@ CHIP_ERROR LevelControlCluster::Step(Callback::Cancelable * onSuccessCallback, C SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // stepMode: stepMode SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), stepMode)); // stepSize: int8u @@ -6594,7 +6594,7 @@ CHIP_ERROR LevelControlCluster::StepWithOnOff(Callback::Cancelable * onSuccessCa SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // stepMode: stepMode SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), stepMode)); // stepSize: int8u @@ -6639,7 +6639,7 @@ CHIP_ERROR LevelControlCluster::Stop(Callback::Cancelable * onSuccessCallback, C SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // optionMask: bitmap8 SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), optionMask)); // optionOverride: bitmap8 @@ -7174,7 +7174,7 @@ CHIP_ERROR MediaInputCluster::RenameInput(Callback::Cancelable * onSuccessCallba SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // index: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), index)); // name: charString @@ -7218,7 +7218,7 @@ CHIP_ERROR MediaInputCluster::SelectInput(Callback::Cancelable * onSuccessCallba SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // index: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), index)); @@ -7584,7 +7584,7 @@ CHIP_ERROR MediaPlaybackCluster::MediaSeek(Callback::Cancelable * onSuccessCallb SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // position: int64u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), position)); @@ -7625,7 +7625,7 @@ CHIP_ERROR MediaPlaybackCluster::MediaSkipBackward(Callback::Cancelable * onSucc SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // deltaPositionMilliseconds: int64u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), deltaPositionMilliseconds)); @@ -7666,7 +7666,7 @@ CHIP_ERROR MediaPlaybackCluster::MediaSkipForward(Callback::Cancelable * onSucce SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // deltaPositionMilliseconds: int64u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), deltaPositionMilliseconds)); @@ -7964,7 +7964,7 @@ CHIP_ERROR NetworkCommissioningCluster::AddThreadNetwork(Callback::Cancelable * SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // operationalDataset: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), operationalDataset)); // breadcrumb: int64u @@ -8011,7 +8011,7 @@ CHIP_ERROR NetworkCommissioningCluster::AddWiFiNetwork(Callback::Cancelable * on SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // ssid: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), ssid)); // credentials: octetString @@ -8060,7 +8060,7 @@ CHIP_ERROR NetworkCommissioningCluster::DisableNetwork(Callback::Cancelable * on SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // networkID: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), networkID)); // breadcrumb: int64u @@ -8106,7 +8106,7 @@ CHIP_ERROR NetworkCommissioningCluster::EnableNetwork(Callback::Cancelable * onS SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // networkID: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), networkID)); // breadcrumb: int64u @@ -8153,7 +8153,7 @@ CHIP_ERROR NetworkCommissioningCluster::GetLastNetworkCommissioningResult(Callba SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // timeoutMs: int32u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), timeoutMs)); @@ -8195,7 +8195,7 @@ CHIP_ERROR NetworkCommissioningCluster::RemoveNetwork(Callback::Cancelable * onS SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // networkID: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), networkID)); // breadcrumb: int64u @@ -8241,7 +8241,7 @@ CHIP_ERROR NetworkCommissioningCluster::ScanNetworks(Callback::Cancelable * onSu SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // ssid: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), ssid)); // breadcrumb: int64u @@ -8289,7 +8289,7 @@ CHIP_ERROR NetworkCommissioningCluster::UpdateThreadNetwork(Callback::Cancelable SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // operationalDataset: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), operationalDataset)); // breadcrumb: int64u @@ -8336,7 +8336,7 @@ CHIP_ERROR NetworkCommissioningCluster::UpdateWiFiNetwork(Callback::Cancelable * SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // ssid: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), ssid)); // credentials: octetString @@ -8473,7 +8473,7 @@ CHIP_ERROR OtaSoftwareUpdateProviderCluster::ApplyUpdateRequest(Callback::Cancel SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // updateToken: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), updateToken)); // newVersion: int32u @@ -8518,7 +8518,7 @@ CHIP_ERROR OtaSoftwareUpdateProviderCluster::NotifyUpdateApplied(Callback::Cance SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // updateToken: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), updateToken)); // softwareVersion: int32u @@ -8565,7 +8565,7 @@ CHIP_ERROR OtaSoftwareUpdateProviderCluster::QueryImage(Callback::Cancelable * o SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // vendorId: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), vendorId)); // productId: int16u @@ -8658,7 +8658,7 @@ CHIP_ERROR OtaSoftwareUpdateRequestorCluster::AnnounceOtaProvider(Callback::Canc SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // providerLocation: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), providerLocation)); // vendorId: int16u @@ -8872,7 +8872,7 @@ CHIP_ERROR OnOffCluster::OffWithEffect(Callback::Cancelable * onSuccessCallback, SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // effectId: onOffEffectIdentifier SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), effectId)); // effectVariant: onOffDelayedAllOffEffectVariant @@ -8991,7 +8991,7 @@ CHIP_ERROR OnOffCluster::OnWithTimedOff(Callback::Cancelable * onSuccessCallback SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // onOffControl: onOffControl SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), onOffControl)); // onTime: int16u @@ -9311,7 +9311,7 @@ CHIP_ERROR OperationalCredentialsCluster::AddNOC(Callback::Cancelable * onSucces SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // NOCValue: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), NOCValue)); // ICACValue: octetString @@ -9362,7 +9362,7 @@ CHIP_ERROR OperationalCredentialsCluster::AddTrustedRootCertificate(Callback::Ca SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // rootCertificate: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), rootCertificate)); @@ -9405,7 +9405,7 @@ CHIP_ERROR OperationalCredentialsCluster::AttestationRequest(Callback::Cancelabl SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // attestationNonce: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), attestationNonce)); @@ -9447,7 +9447,7 @@ CHIP_ERROR OperationalCredentialsCluster::CertificateChainRequest(Callback::Canc SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // certificateType: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), certificateType)); @@ -9489,7 +9489,7 @@ CHIP_ERROR OperationalCredentialsCluster::OpCSRRequest(Callback::Cancelable * on SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // CSRNonce: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), CSRNonce)); @@ -9531,7 +9531,7 @@ CHIP_ERROR OperationalCredentialsCluster::RemoveFabric(Callback::Cancelable * on SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // fabricIndex: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), fabricIndex)); @@ -9574,7 +9574,7 @@ CHIP_ERROR OperationalCredentialsCluster::RemoveTrustedRootCertificate(Callback: SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // trustedRootIdentifier: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), trustedRootIdentifier)); @@ -9616,7 +9616,7 @@ CHIP_ERROR OperationalCredentialsCluster::UpdateFabricLabel(Callback::Cancelable SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // label: charString SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), Span(Uint8::to_const_char(label.data()), label.size()))); @@ -9659,7 +9659,7 @@ CHIP_ERROR OperationalCredentialsCluster::UpdateNOC(Callback::Cancelable * onSuc SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // NOCValue: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), NOCValue)); // ICACValue: octetString @@ -10439,7 +10439,7 @@ CHIP_ERROR ScenesCluster::AddScene(Callback::Cancelable * onSuccessCallback, Cal SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // groupId: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); // sceneId: int8u @@ -10493,7 +10493,7 @@ CHIP_ERROR ScenesCluster::GetSceneMembership(Callback::Cancelable * onSuccessCal SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // groupId: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); @@ -10534,7 +10534,7 @@ CHIP_ERROR ScenesCluster::RecallScene(Callback::Cancelable * onSuccessCallback, SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // groupId: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); // sceneId: int8u @@ -10579,7 +10579,7 @@ CHIP_ERROR ScenesCluster::RemoveAllScenes(Callback::Cancelable * onSuccessCallba SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // groupId: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); @@ -10620,7 +10620,7 @@ CHIP_ERROR ScenesCluster::RemoveScene(Callback::Cancelable * onSuccessCallback, SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // groupId: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); // sceneId: int8u @@ -10663,7 +10663,7 @@ CHIP_ERROR ScenesCluster::StoreScene(Callback::Cancelable * onSuccessCallback, C SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // groupId: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); // sceneId: int8u @@ -10706,7 +10706,7 @@ CHIP_ERROR ScenesCluster::ViewScene(Callback::Cancelable * onSuccessCallback, Ca SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // groupId: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); // sceneId: int8u @@ -11015,7 +11015,7 @@ CHIP_ERROR TvChannelCluster::ChangeChannel(Callback::Cancelable * onSuccessCallb SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // match: charString SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), Span(Uint8::to_const_char(match.data()), match.size()))); @@ -11058,7 +11058,7 @@ CHIP_ERROR TvChannelCluster::ChangeChannelByNumber(Callback::Cancelable * onSucc SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // majorNumber: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), majorNumber)); // minorNumber: int16u @@ -11101,7 +11101,7 @@ CHIP_ERROR TvChannelCluster::SkipChannel(Callback::Cancelable * onSuccessCallbac SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // count: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), count)); @@ -11208,7 +11208,7 @@ CHIP_ERROR TargetNavigatorCluster::NavigateTarget(Callback::Cancelable * onSucce SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // target: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), target)); // data: charString @@ -11391,7 +11391,7 @@ CHIP_ERROR TestClusterCluster::TestAddArguments(Callback::Cancelable * onSuccess SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // arg1: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg1)); // arg2: int8u @@ -11435,7 +11435,7 @@ CHIP_ERROR TestClusterCluster::TestListInt8UArgumentRequest(Callback::Cancelable SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // arg1: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg1)); @@ -11477,7 +11477,7 @@ CHIP_ERROR TestClusterCluster::TestListInt8UReverseRequest(Callback::Cancelable SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // arg1: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg1)); @@ -11520,7 +11520,7 @@ CHIP_ERROR TestClusterCluster::TestListStructArgumentRequest(Callback::Cancelabl SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // a: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), a)); // b: boolean @@ -11650,7 +11650,7 @@ CHIP_ERROR TestClusterCluster::TestStructArgumentRequest(Callback::Cancelable * SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // a: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), a)); // b: boolean @@ -12555,7 +12555,7 @@ CHIP_ERROR ThermostatCluster::GetWeeklySchedule(Callback::Cancelable * onSuccess SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // daysToReturn: dayOfWeek SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), daysToReturn)); // modeToReturn: modeForSequence @@ -12599,7 +12599,7 @@ CHIP_ERROR ThermostatCluster::SetWeeklySchedule(Callback::Cancelable * onSuccess SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // numberOfTransitionsForSequence: enum8 SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), numberOfTransitionsForSequence)); // dayOfWeekForSequence: dayOfWeek @@ -12646,7 +12646,7 @@ CHIP_ERROR ThermostatCluster::SetpointRaiseLower(Callback::Cancelable * onSucces SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // mode: setpointAdjustMode SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), mode)); // amount: int8s @@ -14284,7 +14284,7 @@ CHIP_ERROR WindowCoveringCluster::GoToLiftPercentage(Callback::Cancelable * onSu SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // liftPercentageValue: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), liftPercentageValue)); // liftPercent100thsValue: int16u @@ -14327,7 +14327,7 @@ CHIP_ERROR WindowCoveringCluster::GoToLiftValue(Callback::Cancelable * onSuccess SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // liftValue: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), liftValue)); @@ -14369,7 +14369,7 @@ CHIP_ERROR WindowCoveringCluster::GoToTiltPercentage(Callback::Cancelable * onSu SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // tiltPercentageValue: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), tiltPercentageValue)); // tiltPercent100thsValue: int16u @@ -14412,7 +14412,7 @@ CHIP_ERROR WindowCoveringCluster::GoToTiltValue(Callback::Cancelable * onSuccess SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // tiltValue: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), tiltValue)); diff --git a/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.cpp b/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.cpp index 74f832e7349164..57df76f543afe9 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.cpp @@ -75,7 +75,7 @@ CHIP_ERROR OtaSoftwareUpdateProviderCluster::ApplyUpdateRequest(Callback::Cancel SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // updateToken: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), updateToken)); // newVersion: int32u @@ -120,7 +120,7 @@ CHIP_ERROR OtaSoftwareUpdateProviderCluster::NotifyUpdateApplied(Callback::Cance SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // updateToken: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), updateToken)); // softwareVersion: int32u @@ -167,7 +167,7 @@ CHIP_ERROR OtaSoftwareUpdateProviderCluster::QueryImage(Callback::Cancelable * o SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // vendorId: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), vendorId)); // productId: int16u diff --git a/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.cpp b/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.cpp index 542c5453746a89..67f97b634af157 100644 --- a/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.cpp @@ -141,7 +141,7 @@ CHIP_ERROR LevelControlCluster::Move(Callback::Cancelable * onSuccessCallback, C SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // moveMode: moveMode SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), moveMode)); // rate: int8u @@ -188,7 +188,7 @@ CHIP_ERROR LevelControlCluster::MoveToLevel(Callback::Cancelable * onSuccessCall SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // level: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), level)); // transitionTime: int16u @@ -236,7 +236,7 @@ CHIP_ERROR LevelControlCluster::MoveToLevelWithOnOff(Callback::Cancelable * onSu SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // level: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), level)); // transitionTime: int16u @@ -279,7 +279,7 @@ CHIP_ERROR LevelControlCluster::MoveWithOnOff(Callback::Cancelable * onSuccessCa SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // moveMode: moveMode SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), moveMode)); // rate: int8u @@ -323,7 +323,7 @@ CHIP_ERROR LevelControlCluster::Step(Callback::Cancelable * onSuccessCallback, C SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // stepMode: stepMode SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), stepMode)); // stepSize: int8u @@ -372,7 +372,7 @@ CHIP_ERROR LevelControlCluster::StepWithOnOff(Callback::Cancelable * onSuccessCa SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // stepMode: stepMode SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), stepMode)); // stepSize: int8u @@ -417,7 +417,7 @@ CHIP_ERROR LevelControlCluster::Stop(Callback::Cancelable * onSuccessCallback, C SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // optionMask: bitmap8 SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), optionMask)); // optionOverride: bitmap8 diff --git a/zzz_generated/tv-app/zap-generated/CHIPClusters.cpp b/zzz_generated/tv-app/zap-generated/CHIPClusters.cpp index 46b6b4c5507bf4..646cdf73baddd8 100644 --- a/zzz_generated/tv-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/tv-app/zap-generated/CHIPClusters.cpp @@ -74,7 +74,7 @@ CHIP_ERROR GeneralCommissioningCluster::ArmFailSafe(Callback::Cancelable * onSuc SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // expiryLengthSeconds: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), expiryLengthSeconds)); // breadcrumb: int64u @@ -161,7 +161,7 @@ CHIP_ERROR GeneralCommissioningCluster::SetRegulatoryConfig(Callback::Cancelable SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // location: regulatoryLocationType SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), location)); // countryCode: charString @@ -288,7 +288,7 @@ CHIP_ERROR NetworkCommissioningCluster::DisableNetwork(Callback::Cancelable * on SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // networkID: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), networkID)); // breadcrumb: int64u @@ -334,7 +334,7 @@ CHIP_ERROR NetworkCommissioningCluster::EnableNetwork(Callback::Cancelable * onS SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // networkID: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), networkID)); // breadcrumb: int64u @@ -381,7 +381,7 @@ CHIP_ERROR NetworkCommissioningCluster::GetLastNetworkCommissioningResult(Callba SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // timeoutMs: int32u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), timeoutMs)); @@ -423,7 +423,7 @@ CHIP_ERROR NetworkCommissioningCluster::RemoveNetwork(Callback::Cancelable * onS SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // networkID: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), networkID)); // breadcrumb: int64u @@ -469,7 +469,7 @@ CHIP_ERROR NetworkCommissioningCluster::ScanNetworks(Callback::Cancelable * onSu SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // ssid: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), ssid)); // breadcrumb: int64u @@ -563,7 +563,7 @@ CHIP_ERROR OperationalCredentialsCluster::AddNOC(Callback::Cancelable * onSucces SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // NOCValue: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), NOCValue)); // ICACValue: octetString @@ -614,7 +614,7 @@ CHIP_ERROR OperationalCredentialsCluster::AddTrustedRootCertificate(Callback::Ca SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // rootCertificate: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), rootCertificate)); @@ -657,7 +657,7 @@ CHIP_ERROR OperationalCredentialsCluster::AttestationRequest(Callback::Cancelabl SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // attestationNonce: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), attestationNonce)); @@ -699,7 +699,7 @@ CHIP_ERROR OperationalCredentialsCluster::CertificateChainRequest(Callback::Canc SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // certificateType: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), certificateType)); @@ -741,7 +741,7 @@ CHIP_ERROR OperationalCredentialsCluster::OpCSRRequest(Callback::Cancelable * on SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // CSRNonce: octetString SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), CSRNonce)); @@ -783,7 +783,7 @@ CHIP_ERROR OperationalCredentialsCluster::RemoveFabric(Callback::Cancelable * on SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // fabricIndex: int8u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), fabricIndex)); @@ -825,7 +825,7 @@ CHIP_ERROR OperationalCredentialsCluster::UpdateFabricLabel(Callback::Cancelable SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // label: charString SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), Span(Uint8::to_const_char(label.data()), label.size())));