From 11571430388609f71f4076cddbd1b725698a01e7 Mon Sep 17 00:00:00 2001 From: yunhanw-google Date: Thu, 2 Dec 2021 19:59:44 -0800 Subject: [PATCH] Rename several IM IB in MessageDef (#12516) --Rename AttributeStatuses to AttributeStatusIBs --Rename EventFilters to EventFilterIBs --Rename EventPaths to EventPathIBs --Rename EventReports to EventReportIBs --Rename InvokeResponse to InvokeResponseIBs --- src/app/BUILD.gn | 16 ++--- src/app/CommandSender.cpp | 2 +- src/app/MessageDef/AttributePathIBs.cpp | 2 +- src/app/MessageDef/AttributePathIBs.h | 2 +- ...uteStatuses.cpp => AttributeStatusIBs.cpp} | 12 ++-- ...tributeStatuses.h => AttributeStatusIBs.h} | 8 +-- .../{EventFilters.cpp => EventFilterIBs.cpp} | 15 ++--- .../{EventFilters.h => EventFilterIBs.h} | 13 ++-- .../{EventPaths.cpp => EventPathIBs.cpp} | 17 ++--- .../{EventPaths.h => EventPathIBs.h} | 15 ++--- .../{EventReports.cpp => EventReportIBs.cpp} | 12 ++-- .../{EventReports.h => EventReportIBs.h} | 10 +-- ...okeResponses.cpp => InvokeResponseIBs.cpp} | 10 +-- ...{InvokeResponses.h => InvokeResponseIBs.h} | 8 +-- src/app/MessageDef/InvokeResponseMessage.cpp | 6 +- src/app/MessageDef/InvokeResponseMessage.h | 18 +++--- src/app/MessageDef/ReadRequestMessage.cpp | 12 ++-- src/app/MessageDef/ReadRequestMessage.h | 26 ++++---- src/app/MessageDef/ReportDataMessage.cpp | 38 +++++------ src/app/MessageDef/ReportDataMessage.h | 14 ++-- .../MessageDef/SubscribeRequestMessage.cpp | 12 ++-- src/app/MessageDef/SubscribeRequestMessage.h | 20 +++--- src/app/MessageDef/SubscribeResponseMessage.h | 2 +- src/app/MessageDef/WriteResponseMessage.cpp | 8 +-- src/app/MessageDef/WriteResponseMessage.h | 20 +++--- src/app/ReadClient.cpp | 18 +++--- src/app/ReadClient.h | 2 +- src/app/ReadHandler.cpp | 6 +- src/app/ReadHandler.h | 2 +- src/app/WriteClient.cpp | 2 +- src/app/WriteHandler.cpp | 4 +- src/app/reporting/Engine.cpp | 12 ++-- src/app/tests/TestCommandInteraction.cpp | 2 +- src/app/tests/TestMessageDef.cpp | 64 +++++++++---------- src/app/tests/TestReadInteraction.cpp | 10 +-- src/app/tests/TestReportingEngine.cpp | 4 +- src/app/tests/TestWriteInteraction.cpp | 2 +- 37 files changed, 213 insertions(+), 233 deletions(-) rename src/app/MessageDef/{AttributeStatuses.cpp => AttributeStatusIBs.cpp} (87%) rename src/app/MessageDef/{AttributeStatuses.h => AttributeStatusIBs.h} (92%) rename src/app/MessageDef/{EventFilters.cpp => EventFilterIBs.cpp} (85%) rename src/app/MessageDef/{EventFilters.h => EventFilterIBs.h} (89%) rename src/app/MessageDef/{EventPaths.cpp => EventPathIBs.cpp} (84%) rename src/app/MessageDef/{EventPaths.h => EventPathIBs.h} (88%) rename src/app/MessageDef/{EventReports.cpp => EventReportIBs.cpp} (87%) rename src/app/MessageDef/{EventReports.h => EventReportIBs.h} (89%) rename src/app/MessageDef/{InvokeResponses.cpp => InvokeResponseIBs.cpp} (87%) rename src/app/MessageDef/{InvokeResponses.h => InvokeResponseIBs.h} (92%) diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 545c53241f1281..67421b041c5d36 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -68,8 +68,8 @@ static_library("app") { "MessageDef/AttributeReportIBs.h", "MessageDef/AttributeStatusIB.cpp", "MessageDef/AttributeStatusIB.h", - "MessageDef/AttributeStatuses.cpp", - "MessageDef/AttributeStatuses.h", + "MessageDef/AttributeStatusIBs.cpp", + "MessageDef/AttributeStatusIBs.h", "MessageDef/Builder.cpp", "MessageDef/Builder.h", "MessageDef/CommandDataIB.cpp", @@ -78,22 +78,22 @@ static_library("app") { "MessageDef/EventDataIB.cpp", "MessageDef/EventDataIB.h", "MessageDef/EventFilterIB.cpp", - "MessageDef/EventFilters.cpp", + "MessageDef/EventFilterIBs.cpp", "MessageDef/EventPathIB.cpp", "MessageDef/EventPathIB.h", - "MessageDef/EventPaths.cpp", - "MessageDef/EventPaths.h", + "MessageDef/EventPathIBs.cpp", + "MessageDef/EventPathIBs.h", "MessageDef/EventReportIB.cpp", "MessageDef/EventReportIB.h", - "MessageDef/EventReports.cpp", - "MessageDef/EventReports.h", + "MessageDef/EventReportIBs.cpp", + "MessageDef/EventReportIBs.h", "MessageDef/EventStatusIB.cpp", "MessageDef/EventStatusIB.h", "MessageDef/InvokeRequestMessage.cpp", "MessageDef/InvokeRequests.cpp", "MessageDef/InvokeResponseIB.cpp", + "MessageDef/InvokeResponseIBs.cpp", "MessageDef/InvokeResponseMessage.cpp", - "MessageDef/InvokeResponses.cpp", "MessageDef/ListBuilder.cpp", "MessageDef/ListParser.cpp", "MessageDef/MessageDefHelper.cpp", diff --git a/src/app/CommandSender.cpp b/src/app/CommandSender.cpp index 9e3da0b7fae067..e7eaaaeeb6609e 100644 --- a/src/app/CommandSender.cpp +++ b/src/app/CommandSender.cpp @@ -130,7 +130,7 @@ CHIP_ERROR CommandSender::ProcessInvokeResponse(System::PacketBufferHandle && pa System::PacketBufferTLVReader reader; TLV::TLVReader invokeResponsesReader; InvokeResponseMessage::Parser invokeResponseMessage; - InvokeResponses::Parser invokeResponses; + InvokeResponseIBs::Parser invokeResponses; bool suppressResponse = false; reader.Init(std::move(payload)); diff --git a/src/app/MessageDef/AttributePathIBs.cpp b/src/app/MessageDef/AttributePathIBs.cpp index c78988ef80e628..30fc8480aae864 100644 --- a/src/app/MessageDef/AttributePathIBs.cpp +++ b/src/app/MessageDef/AttributePathIBs.cpp @@ -73,7 +73,7 @@ CHIP_ERROR AttributePathIBs::Parser::CheckSchemaValidity() const } #endif // CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK -AttributePathIB::Builder & AttributePathIBs::Builder::CreateAttributePath() +AttributePathIB::Builder & AttributePathIBs::Builder::CreatePath() { if (mError == CHIP_NO_ERROR) { diff --git a/src/app/MessageDef/AttributePathIBs.h b/src/app/MessageDef/AttributePathIBs.h index e8a4704e170eb2..ad6929f64b69a4 100644 --- a/src/app/MessageDef/AttributePathIBs.h +++ b/src/app/MessageDef/AttributePathIBs.h @@ -61,7 +61,7 @@ class Builder : public ArrayBuilder * * @return A reference to AttributePathIB::Builder */ - AttributePathIB::Builder & CreateAttributePath(); + AttributePathIB::Builder & CreatePath(); /** * @brief Mark the end of this AttributePathIB diff --git a/src/app/MessageDef/AttributeStatuses.cpp b/src/app/MessageDef/AttributeStatusIBs.cpp similarity index 87% rename from src/app/MessageDef/AttributeStatuses.cpp rename to src/app/MessageDef/AttributeStatusIBs.cpp index f814c0b837714f..c604a4bb2c2a00 100644 --- a/src/app/MessageDef/AttributeStatuses.cpp +++ b/src/app/MessageDef/AttributeStatusIBs.cpp @@ -16,7 +16,7 @@ * limitations under the License. */ -#include "AttributeStatuses.h" +#include "AttributeStatusIBs.h" #include "AttributeStatusIB.h" #include "MessageDefHelper.h" @@ -29,7 +29,7 @@ namespace chip { namespace app { -AttributeStatusIB::Builder & AttributeStatuses::Builder::CreateAttributeStatus() +AttributeStatusIB::Builder & AttributeStatusIBs::Builder::CreateAttributeStatus() { if (mError == CHIP_NO_ERROR) { @@ -38,23 +38,23 @@ AttributeStatusIB::Builder & AttributeStatuses::Builder::CreateAttributeStatus() return mAttributeStatus; } -AttributeStatuses::Builder & AttributeStatuses::Builder::EndOfAttributeStatuses() +AttributeStatusIBs::Builder & AttributeStatusIBs::Builder::EndOfAttributeStatuses() { EndOfContainer(); return *this; } #if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK -CHIP_ERROR AttributeStatuses::Parser::CheckSchemaValidity() const +CHIP_ERROR AttributeStatusIBs::Parser::CheckSchemaValidity() const { CHIP_ERROR err = CHIP_NO_ERROR; size_t NumAttributeStatus = 0; TLV::TLVReader reader; - PRETTY_PRINT("AttributeStatuses ="); + PRETTY_PRINT("AttributeStatusIBs ="); PRETTY_PRINT("["); - // make a copy of the EventReports reader + // make a copy of the AttributeStatusIBs reader reader.Init(mReader); while (CHIP_NO_ERROR == (err = reader.Next())) diff --git a/src/app/MessageDef/AttributeStatuses.h b/src/app/MessageDef/AttributeStatusIBs.h similarity index 92% rename from src/app/MessageDef/AttributeStatuses.h rename to src/app/MessageDef/AttributeStatusIBs.h index e183280347f37c..b6a70ab62c3a0e 100644 --- a/src/app/MessageDef/AttributeStatuses.h +++ b/src/app/MessageDef/AttributeStatusIBs.h @@ -31,7 +31,7 @@ namespace chip { namespace app { -namespace AttributeStatuses { +namespace AttributeStatusIBs { class Builder : public ArrayBuilder { public: @@ -43,11 +43,11 @@ class Builder : public ArrayBuilder AttributeStatusIB::Builder & CreateAttributeStatus(); /** - * @brief Mark the end of this AttributeStatuses + * @brief Mark the end of this AttributeStatusIBs * * @return A reference to *this */ - AttributeStatuses::Builder & EndOfAttributeStatuses(); + AttributeStatusIBs::Builder & EndOfAttributeStatuses(); private: AttributeStatusIB::Builder mAttributeStatus; @@ -73,6 +73,6 @@ class Parser : public ArrayParser CHIP_ERROR CheckSchemaValidity() const; #endif }; -} // namespace AttributeStatuses +} // namespace AttributeStatusIBs } // namespace app } // namespace chip diff --git a/src/app/MessageDef/EventFilters.cpp b/src/app/MessageDef/EventFilterIBs.cpp similarity index 85% rename from src/app/MessageDef/EventFilters.cpp rename to src/app/MessageDef/EventFilterIBs.cpp index ce72f0bdd45368..97cc23ed78f282 100644 --- a/src/app/MessageDef/EventFilters.cpp +++ b/src/app/MessageDef/EventFilterIBs.cpp @@ -13,13 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/** - * @file - * This file defines EventFilters parser and builder in CHIP interaction model - * - */ -#include "EventFilters.h" +#include "EventFilterIBs.h" #include "MessageDefHelper.h" @@ -32,13 +27,13 @@ namespace chip { namespace app { #if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK -CHIP_ERROR EventFilters::Parser::CheckSchemaValidity() const +CHIP_ERROR EventFilterIBs::Parser::CheckSchemaValidity() const { CHIP_ERROR err = CHIP_NO_ERROR; size_t numEventFilters = 0; TLV::TLVReader reader; - PRETTY_PRINT("EventFilters ="); + PRETTY_PRINT("EventFilterIBs ="); PRETTY_PRINT("["); // make a copy of the reader @@ -76,13 +71,13 @@ CHIP_ERROR EventFilters::Parser::CheckSchemaValidity() const } #endif // CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK -EventFilterIB::Builder & EventFilters::Builder::CreateEventFilter() +EventFilterIB::Builder & EventFilterIBs::Builder::CreateEventFilter() { mError = mEventFilter.Init(mpWriter); return mEventFilter; } -EventFilters::Builder & EventFilters::Builder::EndOfEventFilters() +EventFilterIBs::Builder & EventFilterIBs::Builder::EndOfEventFilters() { EndOfContainer(); return *this; diff --git a/src/app/MessageDef/EventFilters.h b/src/app/MessageDef/EventFilterIBs.h similarity index 89% rename from src/app/MessageDef/EventFilters.h rename to src/app/MessageDef/EventFilterIBs.h index fb67e7342bec26..4e86f5ca6cf7dd 100644 --- a/src/app/MessageDef/EventFilters.h +++ b/src/app/MessageDef/EventFilterIBs.h @@ -14,11 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/** - * @file - * This file defines EventFilters parser and builder in CHIP interaction model - * - */ #pragma once @@ -35,7 +30,7 @@ namespace chip { namespace app { -namespace EventFilters { +namespace EventFilterIBs { class Parser : public ArrayParser { public: @@ -73,15 +68,15 @@ class Builder : public ArrayBuilder EventFilterIB::Builder & GetEventFilter() { return mEventFilter; }; /** - * @brief Mark the end of this EventFilters + * @brief Mark the end of this EventFilterIBs * * @return A reference to *this */ - EventFilters::Builder & EndOfEventFilters(); + EventFilterIBs::Builder & EndOfEventFilters(); private: EventFilterIB::Builder mEventFilter; }; -}; // namespace EventFilters +}; // namespace EventFilterIBs }; // namespace app }; // namespace chip diff --git a/src/app/MessageDef/EventPaths.cpp b/src/app/MessageDef/EventPathIBs.cpp similarity index 84% rename from src/app/MessageDef/EventPaths.cpp rename to src/app/MessageDef/EventPathIBs.cpp index 08bb866f1b678f..2002f7d55c2776 100644 --- a/src/app/MessageDef/EventPaths.cpp +++ b/src/app/MessageDef/EventPathIBs.cpp @@ -15,13 +15,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/** - * @file - * This file defines EventPaths parser and builder in CHIP interaction model - * - */ -#include "EventPaths.h" +#include "EventPathIBs.h" #include "MessageDefHelper.h" @@ -34,16 +29,16 @@ namespace chip { namespace app { #if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK -CHIP_ERROR EventPaths::Parser::CheckSchemaValidity() const +CHIP_ERROR EventPathIBs::Parser::CheckSchemaValidity() const { CHIP_ERROR err = CHIP_NO_ERROR; size_t NumPath = 0; TLV::TLVReader reader; - PRETTY_PRINT("EventPaths ="); + PRETTY_PRINT("EventPathIBs ="); PRETTY_PRINT("["); - // make a copy of the EventPaths reader + // make a copy of the EventPathIBs reader reader.Init(mReader); while (CHIP_NO_ERROR == (err = reader.Next())) @@ -77,7 +72,7 @@ CHIP_ERROR EventPaths::Parser::CheckSchemaValidity() const } #endif // CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK -EventPathIB::Builder & EventPaths::Builder::CreatePath() +EventPathIB::Builder & EventPathIBs::Builder::CreatePath() { if (mError == CHIP_NO_ERROR) { @@ -86,7 +81,7 @@ EventPathIB::Builder & EventPaths::Builder::CreatePath() return mEventPath; } -EventPaths::Builder & EventPaths::Builder::EndOfEventPaths() +EventPathIBs::Builder & EventPathIBs::Builder::EndOfEventPaths() { EndOfContainer(); return *this; diff --git a/src/app/MessageDef/EventPaths.h b/src/app/MessageDef/EventPathIBs.h similarity index 88% rename from src/app/MessageDef/EventPaths.h rename to src/app/MessageDef/EventPathIBs.h index 632a8525b77218..14a909a91b5a4d 100644 --- a/src/app/MessageDef/EventPaths.h +++ b/src/app/MessageDef/EventPathIBs.h @@ -15,18 +15,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/** - * @file - * This file defines EventPaths parser and builder in CHIP interaction model - * - */ #pragma once #include "ArrayBuilder.h" #include "ArrayParser.h" #include "EventPathIB.h" -#include "EventPaths.h" +#include "EventPathIBs.h" #include #include @@ -37,7 +32,7 @@ namespace chip { namespace app { -namespace EventPaths { +namespace EventPathIBs { class Parser : public ArrayParser { public: @@ -70,15 +65,15 @@ class Builder : public ArrayBuilder EventPathIB::Builder & CreatePath(); /** - * @brief Mark the end of this EventPaths + * @brief Mark the end of this EventPathIBs * * @return A reference to *this */ - EventPaths::Builder & EndOfEventPaths(); + EventPathIBs::Builder & EndOfEventPaths(); private: EventPathIB::Builder mEventPath; }; -} // namespace EventPaths +} // namespace EventPathIBs } // namespace app } // namespace chip diff --git a/src/app/MessageDef/EventReports.cpp b/src/app/MessageDef/EventReportIBs.cpp similarity index 87% rename from src/app/MessageDef/EventReports.cpp rename to src/app/MessageDef/EventReportIBs.cpp index 379834a0640d9e..47d3fc16e65c36 100644 --- a/src/app/MessageDef/EventReports.cpp +++ b/src/app/MessageDef/EventReportIBs.cpp @@ -17,11 +17,11 @@ */ /** * @file - * This file defines EventReports parser and builder in CHIP interaction model + * This file defines EventReportIBs parser and builder in CHIP interaction model * */ -#include "EventReports.h" +#include "EventReportIBs.h" #include "MessageDefHelper.h" #include @@ -33,13 +33,13 @@ namespace chip { namespace app { #if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK -CHIP_ERROR EventReports::Parser::CheckSchemaValidity() const +CHIP_ERROR EventReportIBs::Parser::CheckSchemaValidity() const { CHIP_ERROR err = CHIP_NO_ERROR; size_t numEventReports = 0; TLV::TLVReader reader; - PRETTY_PRINT("EventReports ="); + PRETTY_PRINT("EventReportIBs ="); PRETTY_PRINT("["); // make a copy of the reader @@ -82,7 +82,7 @@ CHIP_ERROR EventReports::Parser::CheckSchemaValidity() const } #endif // CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK -EventReportIB::Builder & EventReports::Builder::CreateEventReport() +EventReportIB::Builder & EventReportIBs::Builder::CreateEventReport() { if (mError == CHIP_NO_ERROR) { @@ -91,7 +91,7 @@ EventReportIB::Builder & EventReports::Builder::CreateEventReport() return mEventReport; } -EventReports::Builder & EventReports::Builder::EndOfEventReports() +EventReportIBs::Builder & EventReportIBs::Builder::EndOfEventReports() { EndOfContainer(); return *this; diff --git a/src/app/MessageDef/EventReports.h b/src/app/MessageDef/EventReportIBs.h similarity index 89% rename from src/app/MessageDef/EventReports.h rename to src/app/MessageDef/EventReportIBs.h index 3e9e241dcf5b90..d7a25c71ede439 100644 --- a/src/app/MessageDef/EventReports.h +++ b/src/app/MessageDef/EventReportIBs.h @@ -17,7 +17,7 @@ */ /** * @file - * This file defines EventReports parser and builder in CHIP interaction model + * This file defines EventReportIBs parser and builder in CHIP interaction model * */ @@ -36,7 +36,7 @@ namespace chip { namespace app { -namespace EventReports { +namespace EventReportIBs { class Parser : public ArrayParser { public: @@ -69,15 +69,15 @@ class Builder : public ArrayBuilder EventReportIB::Builder & CreateEventReport(); /** - * @brief Mark the end of this EventReports + * @brief Mark the end of this EventReportIBs * * @return A reference to *this */ - EventReports::Builder & EndOfEventReports(); + EventReportIBs::Builder & EndOfEventReports(); private: EventReportIB::Builder mEventReport; }; -} // namespace EventReports +} // namespace EventReportIBs } // namespace app } // namespace chip diff --git a/src/app/MessageDef/InvokeResponses.cpp b/src/app/MessageDef/InvokeResponseIBs.cpp similarity index 87% rename from src/app/MessageDef/InvokeResponses.cpp rename to src/app/MessageDef/InvokeResponseIBs.cpp index 6380beacd8857a..a4c87174e73d2d 100644 --- a/src/app/MessageDef/InvokeResponses.cpp +++ b/src/app/MessageDef/InvokeResponseIBs.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "InvokeResponses.h" +#include "InvokeResponseIBs.h" #include "MessageDefHelper.h" @@ -27,13 +27,13 @@ namespace chip { namespace app { #if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK -CHIP_ERROR InvokeResponses::Parser::CheckSchemaValidity() const +CHIP_ERROR InvokeResponseIBs::Parser::CheckSchemaValidity() const { CHIP_ERROR err = CHIP_NO_ERROR; size_t numInvokeResponses = 0; TLV::TLVReader reader; - PRETTY_PRINT("InvokeResponses ="); + PRETTY_PRINT("InvokeResponseIBs ="); PRETTY_PRINT("["); // make a copy of the reader @@ -71,7 +71,7 @@ CHIP_ERROR InvokeResponses::Parser::CheckSchemaValidity() const } #endif // CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK -InvokeResponseIB::Builder & InvokeResponses::Builder::CreateInvokeResponse() +InvokeResponseIB::Builder & InvokeResponseIBs::Builder::CreateInvokeResponse() { if (mError == CHIP_NO_ERROR) { @@ -80,7 +80,7 @@ InvokeResponseIB::Builder & InvokeResponses::Builder::CreateInvokeResponse() return mInvokeResponse; } -InvokeResponses::Builder & InvokeResponses::Builder::EndOfInvokeResponses() +InvokeResponseIBs::Builder & InvokeResponseIBs::Builder::EndOfInvokeResponses() { EndOfContainer(); return *this; diff --git a/src/app/MessageDef/InvokeResponses.h b/src/app/MessageDef/InvokeResponseIBs.h similarity index 92% rename from src/app/MessageDef/InvokeResponses.h rename to src/app/MessageDef/InvokeResponseIBs.h index b4759c059575a7..5b625f88c112fe 100644 --- a/src/app/MessageDef/InvokeResponses.h +++ b/src/app/MessageDef/InvokeResponseIBs.h @@ -30,7 +30,7 @@ namespace chip { namespace app { -namespace InvokeResponses { +namespace InvokeResponseIBs { class Parser : public ArrayParser { public: @@ -68,15 +68,15 @@ class Builder : public ArrayBuilder InvokeResponseIB::Builder & GetInvokeResponse() { return mInvokeResponse; }; /** - * @brief Mark the end of this InvokeResponses + * @brief Mark the end of this InvokeResponseIBs * * @return A reference to *this */ - InvokeResponses::Builder & EndOfInvokeResponses(); + InvokeResponseIBs::Builder & EndOfInvokeResponses(); private: InvokeResponseIB::Builder mInvokeResponse; }; -} // namespace InvokeResponses +} // namespace InvokeResponseIBs } // namespace app } // namespace chip diff --git a/src/app/MessageDef/InvokeResponseMessage.cpp b/src/app/MessageDef/InvokeResponseMessage.cpp index 62d008d577f893..c7643f7964eb3c 100644 --- a/src/app/MessageDef/InvokeResponseMessage.cpp +++ b/src/app/MessageDef/InvokeResponseMessage.cpp @@ -61,7 +61,7 @@ CHIP_ERROR InvokeResponseMessage::Parser::CheckSchemaValidity() const VerifyOrReturnError(!(TagPresenceMask & (1 << to_underlying(Tag::kInvokeResponses))), CHIP_ERROR_INVALID_TLV_TAG); TagPresenceMask |= (1 << to_underlying(Tag::kInvokeResponses)); { - InvokeResponses::Parser invokeResponses; + InvokeResponseIBs::Parser invokeResponses; ReturnErrorOnFailure(invokeResponses.Init(reader)); PRETTY_PRINT_INCDEPTH(); @@ -103,7 +103,7 @@ CHIP_ERROR InvokeResponseMessage::Parser::GetSuppressResponse(bool * const apSup return GetSimpleValue(to_underlying(Tag::kSuppressResponse), TLV::kTLVType_Boolean, apSuppressResponse); } -CHIP_ERROR InvokeResponseMessage::Parser::GetInvokeResponses(InvokeResponses::Parser * const apStatus) const +CHIP_ERROR InvokeResponseMessage::Parser::GetInvokeResponses(InvokeResponseIBs::Parser * const apStatus) const { TLV::TLVReader reader; ReturnErrorOnFailure(mReader.FindElementWithTag(TLV::ContextTag(to_underlying(Tag::kInvokeResponses)), reader)); @@ -120,7 +120,7 @@ InvokeResponseMessage::Builder & InvokeResponseMessage::Builder::SuppressRespons return *this; } -InvokeResponses::Builder & InvokeResponseMessage::Builder::CreateInvokeResponses() +InvokeResponseIBs::Builder & InvokeResponseMessage::Builder::CreateInvokeResponses() { if (mError == CHIP_NO_ERROR) { diff --git a/src/app/MessageDef/InvokeResponseMessage.h b/src/app/MessageDef/InvokeResponseMessage.h index d9aa0adab0e6c5..7f7f87d6635c11 100644 --- a/src/app/MessageDef/InvokeResponseMessage.h +++ b/src/app/MessageDef/InvokeResponseMessage.h @@ -24,7 +24,7 @@ #include #include -#include "InvokeResponses.h" +#include "InvokeResponseIBs.h" #include "StructBuilder.h" #include "StructParser.h" @@ -73,7 +73,7 @@ class Parser : public StructParser * @return #CHIP_NO_ERROR on success * #CHIP_END_OF_TLV if there is no such element */ - CHIP_ERROR GetInvokeResponses(InvokeResponses::Parser * const apInvokeResponses) const; + CHIP_ERROR GetInvokeResponses(InvokeResponseIBs::Parser * const apInvokeResponses) const; }; class Builder : public StructBuilder @@ -86,18 +86,18 @@ class Builder : public StructBuilder InvokeResponseMessage::Builder & SuppressResponse(const bool aSuppressResponse); /** - * @brief Initialize a InvokeResponses::Builder for writing into the TLV stream + * @brief Initialize a InvokeResponseIBs::Builder for writing into the TLV stream * - * @return A reference to InvokeResponses::Builder + * @return A reference to InvokeResponseIBs::Builder */ - InvokeResponses::Builder & CreateInvokeResponses(); + InvokeResponseIBs::Builder & CreateInvokeResponses(); /** - * @brief Get reference to InvokeResponses::Builder + * @brief Get reference to InvokeResponseIBs::Builder * - * @return A reference to InvokeResponses::Builder + * @return A reference to InvokeResponseIBs::Builder */ - InvokeResponses::Builder & GetInvokeResponses() { return mInvokeResponses; } + InvokeResponseIBs::Builder & GetInvokeResponses() { return mInvokeResponses; } /** * @brief Mark the end of this InvokeResponseMessage @@ -107,7 +107,7 @@ class Builder : public StructBuilder InvokeResponseMessage::Builder & EndOfInvokeResponseMessage(); private: - InvokeResponses::Builder mInvokeResponses; + InvokeResponseIBs::Builder mInvokeResponses; }; } // namespace InvokeResponseMessage } // namespace app diff --git a/src/app/MessageDef/ReadRequestMessage.cpp b/src/app/MessageDef/ReadRequestMessage.cpp index 4fbec503a8f099..626a6e33b335b2 100644 --- a/src/app/MessageDef/ReadRequestMessage.cpp +++ b/src/app/MessageDef/ReadRequestMessage.cpp @@ -62,7 +62,7 @@ CHIP_ERROR ReadRequestMessage::Parser::CheckSchemaValidity() const VerifyOrReturnError(!(TagPresenceMask & (1 << to_underlying(Tag::kEventRequests))), CHIP_ERROR_INVALID_TLV_TAG); TagPresenceMask |= (1 << to_underlying(Tag::kEventRequests)); { - EventPaths::Parser eventRequests; + EventPathIBs::Parser eventRequests; ReturnErrorOnFailure(eventRequests.Init(reader)); PRETTY_PRINT_INCDEPTH(); @@ -75,7 +75,7 @@ CHIP_ERROR ReadRequestMessage::Parser::CheckSchemaValidity() const VerifyOrReturnError(!(TagPresenceMask & (1 << to_underlying(Tag::kEventFilters))), CHIP_ERROR_INVALID_TLV_TAG); TagPresenceMask |= (1 << to_underlying(Tag::kEventFilters)); { - EventFilters::Parser eventFilters; + EventFilterIBs::Parser eventFilters; ReturnErrorOnFailure(eventFilters.Init(reader)); PRETTY_PRINT_INCDEPTH(); @@ -130,14 +130,14 @@ CHIP_ERROR ReadRequestMessage::Parser::GetAttributeRequests(AttributePathIBs::Pa return apAttributeRequests->Init(reader); } -CHIP_ERROR ReadRequestMessage::Parser::GetEventRequests(EventPaths::Parser * const apEventRequests) const +CHIP_ERROR ReadRequestMessage::Parser::GetEventRequests(EventPathIBs::Parser * const apEventRequests) const { TLV::TLVReader reader; ReturnErrorOnFailure(mReader.FindElementWithTag(TLV::ContextTag(to_underlying(Tag::kEventRequests)), reader)); return apEventRequests->Init(reader); } -CHIP_ERROR ReadRequestMessage::Parser::GetEventFilters(EventFilters::Parser * const apEventFilters) const +CHIP_ERROR ReadRequestMessage::Parser::GetEventFilters(EventFilterIBs::Parser * const apEventFilters) const { TLV::TLVReader reader; ReturnErrorOnFailure(mReader.FindElementWithTag(TLV::ContextTag(to_underlying(Tag::kEventFilters)), reader)); @@ -159,7 +159,7 @@ AttributePathIBs::Builder & ReadRequestMessage::Builder::CreateAttributeRequests return mAttributeRequests; } -EventPaths::Builder & ReadRequestMessage::Builder::CreateEventRequests() +EventPathIBs::Builder & ReadRequestMessage::Builder::CreateEventRequests() { // skip if error has already been set if (mError == CHIP_NO_ERROR) @@ -169,7 +169,7 @@ EventPaths::Builder & ReadRequestMessage::Builder::CreateEventRequests() return mEventRequests; } -EventFilters::Builder & ReadRequestMessage::Builder::CreateEventFilters() +EventFilterIBs::Builder & ReadRequestMessage::Builder::CreateEventFilters() { // skip if error has already been set if (mError == CHIP_NO_ERROR) diff --git a/src/app/MessageDef/ReadRequestMessage.h b/src/app/MessageDef/ReadRequestMessage.h index b3fe54d71cc518..8e5e3a06524b85 100644 --- a/src/app/MessageDef/ReadRequestMessage.h +++ b/src/app/MessageDef/ReadRequestMessage.h @@ -19,8 +19,8 @@ #pragma once #include "AttributePathIBs.h" -#include "EventFilters.h" -#include "EventPaths.h" +#include "EventFilterIBs.h" +#include "EventPathIBs.h" #include #include @@ -79,15 +79,15 @@ class Parser : public StructParser * @return #CHIP_NO_ERROR on success * #CHIP_END_OF_TLV if there is no such element */ - CHIP_ERROR GetEventRequests(EventPaths::Parser * const apEventRequests) const; + CHIP_ERROR GetEventRequests(EventPathIBs::Parser * const apEventRequests) const; /** - * @brief Get a TLVReader for the EventFilters. Next() must be called before accessing them. + * @brief Get a TLVReader for the EventFilterIBs. Next() must be called before accessing them. * * @return #CHIP_NO_ERROR on success * #CHIP_END_OF_TLV if there is no such element */ - CHIP_ERROR GetEventFilters(EventFilters::Parser * const apEventFilters) const; + CHIP_ERROR GetEventFilters(EventFilterIBs::Parser * const apEventFilters) const; /** * @brief Get IsFabricFiltered boolean @@ -111,18 +111,18 @@ class Builder : public StructBuilder AttributePathIBs::Builder & CreateAttributeRequests(); /** - * @brief Initialize a EventPaths::Builder for writing into the TLV stream + * @brief Initialize a EventPathIBs::Builder for writing into the TLV stream * - * @return A reference to EventPaths::Builder + * @return A reference to EventPathIBs::Builder */ - EventPaths::Builder & CreateEventRequests(); + EventPathIBs::Builder & CreateEventRequests(); /** - * @brief Initialize a EventFilters::Builder for writing into the TLV stream + * @brief Initialize a EventFilterIBs::Builder for writing into the TLV stream * - * @return A reference to EventFilters::Builder + * @return A reference to EventFilterIBs::Builder */ - EventFilters::Builder & CreateEventFilters(); + EventFilterIBs::Builder & CreateEventFilters(); /** * @brief limits the data written within fabric-scoped lists to the accessing fabric @@ -139,8 +139,8 @@ class Builder : public StructBuilder private: AttributePathIBs::Builder mAttributeRequests; - EventPaths::Builder mEventRequests; - EventFilters::Builder mEventFilters; + EventPathIBs::Builder mEventRequests; + EventFilterIBs::Builder mEventFilters; }; } // namespace ReadRequestMessage } // namespace app diff --git a/src/app/MessageDef/ReportDataMessage.cpp b/src/app/MessageDef/ReportDataMessage.cpp index 1ba284f0671009..7beb73b9704e2a 100644 --- a/src/app/MessageDef/ReportDataMessage.cpp +++ b/src/app/MessageDef/ReportDataMessage.cpp @@ -40,10 +40,10 @@ namespace app { CHIP_ERROR ReportDataMessage::Parser::CheckSchemaValidity() const { CHIP_ERROR err = CHIP_NO_ERROR; - uint16_t TagPresenceMask = 0; + uint16_t tagPresenceMask = 0; chip::TLV::TLVReader reader; - AttributeReportIBs::Parser AttributeReportIBs; - EventReports::Parser EventReports; + AttributeReportIBs::Parser attributeReportIBs; + EventReportIBs::Parser eventReportIBs; PRETTY_PRINT("ReportDataMessage ="); PRETTY_PRINT("{"); @@ -58,8 +58,8 @@ CHIP_ERROR ReportDataMessage::Parser::CheckSchemaValidity() const switch (chip::TLV::TagNumFromTag(reader.GetTag())) { case kCsTag_SuppressResponse: - VerifyOrExit(!(TagPresenceMask & (1 << kCsTag_SuppressResponse)), err = CHIP_ERROR_INVALID_TLV_TAG); - TagPresenceMask |= (1 << kCsTag_SuppressResponse); + VerifyOrExit(!(tagPresenceMask & (1 << kCsTag_SuppressResponse)), err = CHIP_ERROR_INVALID_TLV_TAG); + tagPresenceMask |= (1 << kCsTag_SuppressResponse); VerifyOrExit(chip::TLV::kTLVType_Boolean == reader.GetType(), err = CHIP_ERROR_WRONG_TLV_TYPE); #if CHIP_DETAIL_LOGGING { @@ -71,8 +71,8 @@ CHIP_ERROR ReportDataMessage::Parser::CheckSchemaValidity() const #endif // CHIP_DETAIL_LOGGING break; case kCsTag_SubscriptionId: - VerifyOrExit(!(TagPresenceMask & (1 << kCsTag_SubscriptionId)), err = CHIP_ERROR_INVALID_TLV_TAG); - TagPresenceMask |= (1 << kCsTag_SubscriptionId); + VerifyOrExit(!(tagPresenceMask & (1 << kCsTag_SubscriptionId)), err = CHIP_ERROR_INVALID_TLV_TAG); + tagPresenceMask |= (1 << kCsTag_SubscriptionId); VerifyOrExit(chip::TLV::kTLVType_UnsignedInteger == reader.GetType(), err = CHIP_ERROR_WRONG_TLV_TYPE); #if CHIP_DETAIL_LOGGING { @@ -85,15 +85,15 @@ CHIP_ERROR ReportDataMessage::Parser::CheckSchemaValidity() const break; case kCsTag_AttributeReportIBs: // check if this tag has appeared before - VerifyOrExit(!(TagPresenceMask & (1 << kCsTag_AttributeReportIBs)), err = CHIP_ERROR_INVALID_TLV_TAG); - TagPresenceMask |= (1 << kCsTag_AttributeReportIBs); + VerifyOrExit(!(tagPresenceMask & (1 << kCsTag_AttributeReportIBs)), err = CHIP_ERROR_INVALID_TLV_TAG); + tagPresenceMask |= (1 << kCsTag_AttributeReportIBs); VerifyOrExit(chip::TLV::kTLVType_Array == reader.GetType(), err = CHIP_ERROR_WRONG_TLV_TYPE); #if CHIP_DETAIL_LOGGING { - AttributeReportIBs.Init(reader); + attributeReportIBs.Init(reader); PRETTY_PRINT_INCDEPTH(); - err = AttributeReportIBs.CheckSchemaValidity(); + err = attributeReportIBs.CheckSchemaValidity(); SuccessOrExit(err); PRETTY_PRINT_DECDEPTH(); } @@ -101,23 +101,23 @@ CHIP_ERROR ReportDataMessage::Parser::CheckSchemaValidity() const break; case kCsTag_EventReports: // check if this tag has appeared before - VerifyOrExit(!(TagPresenceMask & (1 << kCsTag_EventReports)), err = CHIP_ERROR_INVALID_TLV_TAG); - TagPresenceMask |= (1 << kCsTag_EventReports); + VerifyOrExit(!(tagPresenceMask & (1 << kCsTag_EventReports)), err = CHIP_ERROR_INVALID_TLV_TAG); + tagPresenceMask |= (1 << kCsTag_EventReports); VerifyOrExit(chip::TLV::kTLVType_Array == reader.GetType(), err = CHIP_ERROR_WRONG_TLV_TYPE); #if CHIP_DETAIL_LOGGING { - EventReports.Init(reader); + eventReportIBs.Init(reader); PRETTY_PRINT_INCDEPTH(); - err = EventReports.CheckSchemaValidity(); + err = eventReportIBs.CheckSchemaValidity(); SuccessOrExit(err); PRETTY_PRINT_DECDEPTH(); } #endif // CHIP_DETAIL_LOGGING break; case kCsTag_MoreChunkedMessages: - VerifyOrExit(!(TagPresenceMask & (1 << kCsTag_MoreChunkedMessages)), err = CHIP_ERROR_INVALID_TLV_TAG); - TagPresenceMask |= (1 << kCsTag_MoreChunkedMessages); + VerifyOrExit(!(tagPresenceMask & (1 << kCsTag_MoreChunkedMessages)), err = CHIP_ERROR_INVALID_TLV_TAG); + tagPresenceMask |= (1 << kCsTag_MoreChunkedMessages); VerifyOrExit(chip::TLV::kTLVType_Boolean == reader.GetType(), err = CHIP_ERROR_WRONG_TLV_TYPE); #if CHIP_DETAIL_LOGGING { @@ -178,7 +178,7 @@ CHIP_ERROR ReportDataMessage::Parser::GetAttributeReportIBs(AttributeReportIBs:: return err; } -CHIP_ERROR ReportDataMessage::Parser::GetEventReports(EventReports::Parser * const apEventReports) const +CHIP_ERROR ReportDataMessage::Parser::GetEventReports(EventReportIBs::Parser * const apEventReports) const { CHIP_ERROR err = CHIP_NO_ERROR; chip::TLV::TLVReader reader; @@ -236,7 +236,7 @@ AttributeReportIBs::Builder & ReportDataMessage::Builder::CreateAttributeReportI return mAttributeReportIBsBuilder; } -EventReports::Builder & ReportDataMessage::Builder::CreateEventReports() +EventReportIBs::Builder & ReportDataMessage::Builder::CreateEventReports() { // skip if error has already been set if (mError == CHIP_NO_ERROR) diff --git a/src/app/MessageDef/ReportDataMessage.h b/src/app/MessageDef/ReportDataMessage.h index 0bd4f8dbd45406..3b8d098925469d 100644 --- a/src/app/MessageDef/ReportDataMessage.h +++ b/src/app/MessageDef/ReportDataMessage.h @@ -31,7 +31,7 @@ #include #include "AttributeReportIBs.h" -#include "EventReports.h" +#include "EventReportIBs.h" #include "StructBuilder.h" #include "StructParser.h" @@ -100,7 +100,7 @@ class Parser : public StructParser CHIP_ERROR GetAttributeReportIBs(AttributeReportIBs::Parser * const apAttributeReportIBs) const; /** - * @brief Get a TLVReader for the EventReports. Next() must be called before accessing them. + * @brief Get a TLVReader for the EventReportIBs. Next() must be called before accessing them. * * @param [in] apEventReports A pointer to apEventReports * @@ -108,7 +108,7 @@ class Parser : public StructParser * #CHIP_ERROR_WRONG_TLV_TYPE if there is such element but it's not a Array * #CHIP_END_OF_TLV if there is no such element */ - CHIP_ERROR GetEventReports(EventReports::Parser * const apEventReports) const; + CHIP_ERROR GetEventReports(EventReportIBs::Parser * const apEventReports) const; /** * @brief Check whether there are more chunked messages in a transaction. Next() must be called before accessing them. @@ -155,11 +155,11 @@ class Builder : public StructBuilder AttributeReportIBs::Builder & CreateAttributeReportIBs(); /** - * @brief Initialize a EventReports::Builder for writing into the TLV stream + * @brief Initialize a EventReportIBs::Builder for writing into the TLV stream * - * @return A reference to EventReports::Builder + * @return A reference to EventReportIBs::Builder */ - EventReports::Builder & CreateEventReports(); + EventReportIBs::Builder & CreateEventReports(); /** * @brief This flag is set to ‘true’ when there are more chunked messages in a transaction. @@ -177,7 +177,7 @@ class Builder : public StructBuilder private: AttributeReportIBs::Builder mAttributeReportIBsBuilder; - EventReports::Builder mEventReportsBuilder; + EventReportIBs::Builder mEventReportsBuilder; }; }; // namespace ReportDataMessage diff --git a/src/app/MessageDef/SubscribeRequestMessage.cpp b/src/app/MessageDef/SubscribeRequestMessage.cpp index 6ba07eaff71e16..e01892f8b30db4 100644 --- a/src/app/MessageDef/SubscribeRequestMessage.cpp +++ b/src/app/MessageDef/SubscribeRequestMessage.cpp @@ -94,7 +94,7 @@ CHIP_ERROR SubscribeRequestMessage::Parser::CheckSchemaValidity() const VerifyOrReturnError(!(TagPresenceMask & (1 << to_underlying(Tag::kEventRequests))), CHIP_ERROR_INVALID_TLV_TAG); TagPresenceMask |= (1 << to_underlying(Tag::kEventRequests)); { - EventPaths::Parser eventRequests; + EventPathIBs::Parser eventRequests; ReturnErrorOnFailure(eventRequests.Init(reader)); PRETTY_PRINT_INCDEPTH(); @@ -107,7 +107,7 @@ CHIP_ERROR SubscribeRequestMessage::Parser::CheckSchemaValidity() const VerifyOrReturnError(!(TagPresenceMask & (1 << to_underlying(Tag::kEventFilters))), CHIP_ERROR_INVALID_TLV_TAG); TagPresenceMask |= (1 << to_underlying(Tag::kEventFilters)); { - EventFilters::Parser eventFilters; + EventFilterIBs::Parser eventFilters; ReturnErrorOnFailure(eventFilters.Init(reader)); PRETTY_PRINT_INCDEPTH(); @@ -190,14 +190,14 @@ CHIP_ERROR SubscribeRequestMessage::Parser::GetAttributeRequests(AttributePathIB return apAttributeRequests->Init(reader); } -CHIP_ERROR SubscribeRequestMessage::Parser::GetEventRequests(EventPaths::Parser * const apEventRequests) const +CHIP_ERROR SubscribeRequestMessage::Parser::GetEventRequests(EventPathIBs::Parser * const apEventRequests) const { TLV::TLVReader reader; ReturnErrorOnFailure(mReader.FindElementWithTag(TLV::ContextTag(to_underlying(Tag::kEventRequests)), reader)); return apEventRequests->Init(reader); } -CHIP_ERROR SubscribeRequestMessage::Parser::GetEventFilters(EventFilters::Parser * const apEventFilters) const +CHIP_ERROR SubscribeRequestMessage::Parser::GetEventFilters(EventFilterIBs::Parser * const apEventFilters) const { TLV::TLVReader reader; ReturnErrorOnFailure(mReader.FindElementWithTag(TLV::ContextTag(to_underlying(Tag::kEventFilters)), reader)); @@ -252,7 +252,7 @@ AttributePathIBs::Builder & SubscribeRequestMessage::Builder::CreateAttributeReq return mAttributeRequests; } -EventPaths::Builder & SubscribeRequestMessage::Builder::CreateEventRequests() +EventPathIBs::Builder & SubscribeRequestMessage::Builder::CreateEventRequests() { if (mError == CHIP_NO_ERROR) { @@ -261,7 +261,7 @@ EventPaths::Builder & SubscribeRequestMessage::Builder::CreateEventRequests() return mEventRequests; } -EventFilters::Builder & SubscribeRequestMessage::Builder::CreateEventFilters() +EventFilterIBs::Builder & SubscribeRequestMessage::Builder::CreateEventFilters() { if (mError == CHIP_NO_ERROR) { diff --git a/src/app/MessageDef/SubscribeRequestMessage.h b/src/app/MessageDef/SubscribeRequestMessage.h index 924060e9d8a6d3..b86ae5c59f16fb 100644 --- a/src/app/MessageDef/SubscribeRequestMessage.h +++ b/src/app/MessageDef/SubscribeRequestMessage.h @@ -19,8 +19,8 @@ #include "AttributeDataVersionList.h" #include "AttributePathIBs.h" -#include "EventFilters.h" -#include "EventPaths.h" +#include "EventFilterIBs.h" +#include "EventPathIBs.h" #include "StructBuilder.h" #include "StructParser.h" #include @@ -95,20 +95,20 @@ class Parser : public StructParser CHIP_ERROR GetAttributeRequests(AttributePathIBs::Parser * const apAttributeRequests) const; /** - * @brief Get a TLVReader for the EventPaths. Next() must be called before accessing them. + * @brief Get a TLVReader for the EventPathIBs. Next() must be called before accessing them. * * @return #CHIP_NO_ERROR on success * #CHIP_END_OF_TLV if there is no such element */ - CHIP_ERROR GetEventRequests(EventPaths::Parser * const apEventRequests) const; + CHIP_ERROR GetEventRequests(EventPathIBs::Parser * const apEventRequests) const; /** - * @brief Get a TLVReader for the EventFilters. Next() must be called before accessing them. + * @brief Get a TLVReader for the EventFilterIBs. Next() must be called before accessing them. * * @return #CHIP_NO_ERROR on success * #CHIP_END_OF_TLV if there is no such element */ - CHIP_ERROR GetEventFilters(EventFilters::Parser * const apEventFilters) const; + CHIP_ERROR GetEventFilters(EventFilterIBs::Parser * const apEventFilters) const; /** * @brief Get GetIsProxy boolean . @@ -139,8 +139,8 @@ class Builder : public StructBuilder SubscribeRequestMessage::Builder & MinIntervalFloorSeconds(const uint16_t aMinIntervalFloorSeconds); SubscribeRequestMessage::Builder & MaxIntervalCeilingSeconds(const uint16_t aMinIntervalFloorSeconds); AttributePathIBs::Builder & CreateAttributeRequests(); - EventPaths::Builder & CreateEventRequests(); - EventFilters::Builder & CreateEventFilters(); + EventPathIBs::Builder & CreateEventRequests(); + EventFilterIBs::Builder & CreateEventFilters(); /** * @brief This is set to true by the subscriber if it is a proxy-type device proxying for another client. This @@ -162,8 +162,8 @@ class Builder : public StructBuilder private: AttributePathIBs::Builder mAttributeRequests; - EventPaths::Builder mEventRequests; - EventFilters::Builder mEventFilters; + EventPathIBs::Builder mEventRequests; + EventFilterIBs::Builder mEventFilters; }; } // namespace SubscribeRequestMessage } // namespace app diff --git a/src/app/MessageDef/SubscribeResponseMessage.h b/src/app/MessageDef/SubscribeResponseMessage.h index 8484a67d4ad984..83c5739b14fa8f 100644 --- a/src/app/MessageDef/SubscribeResponseMessage.h +++ b/src/app/MessageDef/SubscribeResponseMessage.h @@ -16,7 +16,7 @@ */ #pragma once -#include "EventPaths.h" +#include "EventPathIBs.h" #include "StructBuilder.h" #include "StructParser.h" #include diff --git a/src/app/MessageDef/WriteResponseMessage.cpp b/src/app/MessageDef/WriteResponseMessage.cpp index a616783e761638..325a7a91573345 100644 --- a/src/app/MessageDef/WriteResponseMessage.cpp +++ b/src/app/MessageDef/WriteResponseMessage.cpp @@ -31,7 +31,7 @@ CHIP_ERROR WriteResponseMessage::Parser::CheckSchemaValidity() const CHIP_ERROR err = CHIP_NO_ERROR; int TagPresenceMask = 0; TLV::TLVReader reader; - AttributeStatuses::Parser writeResponses; + AttributeStatusIBs::Parser writeResponses; PRETTY_PRINT("WriteResponseMessage ="); PRETTY_PRINT("{"); @@ -82,14 +82,14 @@ CHIP_ERROR WriteResponseMessage::Parser::CheckSchemaValidity() const } #endif // CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK -CHIP_ERROR WriteResponseMessage::Parser::GetWriteResponses(AttributeStatuses::Parser * const apWriteResponses) const +CHIP_ERROR WriteResponseMessage::Parser::GetWriteResponses(AttributeStatusIBs::Parser * const apWriteResponses) const { TLV::TLVReader reader; ReturnErrorOnFailure(mReader.FindElementWithTag(TLV::ContextTag(to_underlying(Tag::kWriteResponses)), reader)); return apWriteResponses->Init(reader); } -AttributeStatuses::Builder & WriteResponseMessage::Builder::CreateWriteResponses() +AttributeStatusIBs::Builder & WriteResponseMessage::Builder::CreateWriteResponses() { // skip if error has already been set if (mError == CHIP_NO_ERROR) @@ -99,7 +99,7 @@ AttributeStatuses::Builder & WriteResponseMessage::Builder::CreateWriteResponses return mWriteResponses; } -AttributeStatuses::Builder & WriteResponseMessage::Builder::GetWriteResponses() +AttributeStatusIBs::Builder & WriteResponseMessage::Builder::GetWriteResponses() { return mWriteResponses; } diff --git a/src/app/MessageDef/WriteResponseMessage.h b/src/app/MessageDef/WriteResponseMessage.h index c777f2c7d566d8..632180ea11ced8 100644 --- a/src/app/MessageDef/WriteResponseMessage.h +++ b/src/app/MessageDef/WriteResponseMessage.h @@ -17,7 +17,7 @@ #pragma once -#include "AttributeStatuses.h" +#include "AttributeStatusIBs.h" #include "StructBuilder.h" #include "StructParser.h" @@ -52,32 +52,32 @@ class Parser : public StructParser CHIP_ERROR CheckSchemaValidity() const; /** - * @brief Get a TLVReader for the AttributeStatuses. Next() must be called before accessing them. + * @brief Get a TLVReader for the AttributeStatusIBs. Next() must be called before accessing them. * * @param [in] apWriteResponses A pointer to apWriteResponses * * @return #CHIP_NO_ERROR on success * #CHIP_END_OF_TLV if there is no such element */ - CHIP_ERROR GetWriteResponses(AttributeStatuses::Parser * const apWriteResponses) const; + CHIP_ERROR GetWriteResponses(AttributeStatusIBs::Parser * const apWriteResponses) const; }; class Builder : public StructBuilder { public: /** - * @brief Initialize a AttributeStatuses::Builder for writing into the TLV stream + * @brief Initialize a AttributeStatusIBs::Builder for writing into the TLV stream * - * @return A reference to AttributeStatuses::Builder + * @return A reference to AttributeStatusIBs::Builder */ - AttributeStatuses::Builder & CreateWriteResponses(); + AttributeStatusIBs::Builder & CreateWriteResponses(); /** - * @brief Get reference to AttributeStatuses::Builder + * @brief Get reference to AttributeStatusIBs::Builder * - * @return A reference to AttributeStatuses::Builder + * @return A reference to AttributeStatusIBs::Builder */ - AttributeStatuses::Builder & GetWriteResponses(); + AttributeStatusIBs::Builder & GetWriteResponses(); /** * @brief Mark the end of this WriteResponseMessage @@ -87,7 +87,7 @@ class Builder : public StructBuilder WriteResponseMessage::Builder & EndOfWriteResponseMessage(); private: - AttributeStatuses::Builder mWriteResponses; + AttributeStatusIBs::Builder mWriteResponses; }; } // namespace WriteResponseMessage } // namespace app diff --git a/src/app/ReadClient.cpp b/src/app/ReadClient.cpp index 40c4095169acc4..52dd3749ed6a11 100644 --- a/src/app/ReadClient.cpp +++ b/src/app/ReadClient.cpp @@ -142,7 +142,7 @@ CHIP_ERROR ReadClient::SendReadRequest(ReadPrepareParams & aReadPrepareParams) if (aReadPrepareParams.mEventPathParamsListSize != 0 && aReadPrepareParams.mpEventPathParamsList != nullptr) { - EventPaths::Builder & eventPathListBuilder = request.CreateEventRequests(); + EventPathIBs::Builder & eventPathListBuilder = request.CreateEventRequests(); SuccessOrExit(err = eventPathListBuilder.GetError()); err = GenerateEventPaths(eventPathListBuilder, aReadPrepareParams.mpEventPathParamsList, aReadPrepareParams.mEventPathParamsListSize); @@ -150,7 +150,7 @@ CHIP_ERROR ReadClient::SendReadRequest(ReadPrepareParams & aReadPrepareParams) if (aReadPrepareParams.mEventNumber != 0) { // EventFilter is optional - EventFilters::Builder eventFilters = request.CreateEventFilters(); + EventFilterIBs::Builder eventFilters = request.CreateEventFilters(); SuccessOrExit(err = request.GetError()); EventFilterIB::Builder eventFilter = eventFilters.CreateEventFilter(); eventFilter.EventMin(aReadPrepareParams.mEventNumber).EndOfEventFilterIB(); @@ -199,7 +199,7 @@ CHIP_ERROR ReadClient::SendReadRequest(ReadPrepareParams & aReadPrepareParams) return err; } -CHIP_ERROR ReadClient::GenerateEventPaths(EventPaths::Builder & aEventPathsBuilder, EventPathParams * apEventPathParamsList, +CHIP_ERROR ReadClient::GenerateEventPaths(EventPathIBs::Builder & aEventPathsBuilder, EventPathParams * apEventPathParamsList, size_t aEventPathParamsListSize) { for (size_t index = 0; index < aEventPathParamsListSize; ++index) @@ -219,7 +219,7 @@ CHIP_ERROR ReadClient::GenerateAttributePathList(AttributePathIBs::Builder & aAt for (size_t index = 0; index < aAttributePathParamsListSize; index++) { VerifyOrReturnError(apAttributePathParamsList[index].IsValidAttributePath(), CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH); - ReturnErrorOnFailure(aAttributePathIBsBuilder.CreateAttributePath().Encode(apAttributePathParamsList[index])); + ReturnErrorOnFailure(aAttributePathIBsBuilder.CreatePath().Encode(apAttributePathParamsList[index])); } aAttributePathIBsBuilder.EndOfAttributePathIBs(); return aAttributePathIBsBuilder.GetError(); @@ -298,7 +298,7 @@ CHIP_ERROR ReadClient::ProcessReportData(System::PacketBufferHandle && aPayload) bool isAttributeReportIBsPresent = false; bool suppressResponse = true; uint64_t subscriptionId = 0; - EventReports::Parser EventReports; + EventReportIBs::Parser eventReportIBs; AttributeReportIBs::Parser attributeReportIBs; System::PacketBufferTLVReader reader; @@ -354,7 +354,7 @@ CHIP_ERROR ReadClient::ProcessReportData(System::PacketBufferHandle && aPayload) } SuccessOrExit(err); - err = report.GetEventReports(&EventReports); + err = report.GetEventReports(&eventReportIBs); isEventReportsPresent = (err == CHIP_NO_ERROR); if (err == CHIP_END_OF_TLV) { @@ -365,7 +365,7 @@ CHIP_ERROR ReadClient::ProcessReportData(System::PacketBufferHandle && aPayload) if (isEventReportsPresent && nullptr != mpCallback) { chip::TLV::TLVReader EventReportsReader; - EventReports.GetReader(&EventReportsReader); + eventReportIBs.GetReader(&EventReportsReader); err = ProcessEventReportIBs(EventReportsReader); SuccessOrExit(err); } @@ -640,7 +640,7 @@ CHIP_ERROR ReadClient::SendSubscribeRequest(ReadPrepareParams & aReadPreparePara if (aReadPrepareParams.mEventPathParamsListSize != 0 && aReadPrepareParams.mpEventPathParamsList != nullptr) { - EventPaths::Builder & eventPathListBuilder = request.CreateEventRequests(); + EventPathIBs::Builder & eventPathListBuilder = request.CreateEventRequests(); SuccessOrExit(err = eventPathListBuilder.GetError()); err = GenerateEventPaths(eventPathListBuilder, aReadPrepareParams.mpEventPathParamsList, aReadPrepareParams.mEventPathParamsListSize); @@ -649,7 +649,7 @@ CHIP_ERROR ReadClient::SendSubscribeRequest(ReadPrepareParams & aReadPreparePara if (aReadPrepareParams.mEventNumber != 0) { // EventNumber is optional - EventFilters::Builder eventFilters = request.CreateEventFilters(); + EventFilterIBs::Builder eventFilters = request.CreateEventFilters(); SuccessOrExit(err = request.GetError()); EventFilterIB::Builder eventFilter = eventFilters.CreateEventFilter(); eventFilter.EventMin(aReadPrepareParams.mEventNumber).EndOfEventFilterIB(); diff --git a/src/app/ReadClient.h b/src/app/ReadClient.h index b7fb7557bcd2cc..af36cf31cdf94e 100644 --- a/src/app/ReadClient.h +++ b/src/app/ReadClient.h @@ -253,7 +253,7 @@ class ReadClient : public Messaging::ExchangeDelegate bool IsAwaitingInitialReport() const { return mState == ClientState::AwaitingInitialReport; } bool IsAwaitingSubscribeResponse() const { return mState == ClientState::AwaitingSubscribeResponse; } - CHIP_ERROR GenerateEventPaths(EventPaths::Builder & aEventPathsBuilder, EventPathParams * apEventPathParamsList, + CHIP_ERROR GenerateEventPaths(EventPathIBs::Builder & aEventPathsBuilder, EventPathParams * apEventPathParamsList, size_t aEventPathParamsListSize); CHIP_ERROR GenerateAttributePathList(AttributePathIBs::Builder & aAttributePathIBsBuilder, AttributePathParams * apAttributePathParamsList, size_t aAttributePathParamsListSize); diff --git a/src/app/ReadHandler.cpp b/src/app/ReadHandler.cpp index 5772ad18691d96..6587d56c5effd4 100644 --- a/src/app/ReadHandler.cpp +++ b/src/app/ReadHandler.cpp @@ -271,7 +271,7 @@ CHIP_ERROR ReadHandler::ProcessReadRequest(System::PacketBufferHandle && aPayloa System::PacketBufferTLVReader reader; ReadRequestMessage::Parser readRequestParser; - EventPaths::Parser eventPathListParser; + EventPathIBs::Parser eventPathListParser; AttributePathIBs::Parser attributePathListParser; @@ -410,7 +410,7 @@ CHIP_ERROR ReadHandler::ProcessAttributePathList(AttributePathIBs::Parser & aAtt return err; } -CHIP_ERROR ReadHandler::ProcessEventPaths(EventPaths::Parser & aEventPathsParser) +CHIP_ERROR ReadHandler::ProcessEventPaths(EventPathIBs::Parser & aEventPathsParser) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVReader reader; @@ -590,7 +590,7 @@ CHIP_ERROR ReadHandler::ProcessSubscribeRequest(System::PacketBufferHandle && aP } ReturnErrorOnFailure(err); - EventPaths::Parser eventPathListParser; + EventPathIBs::Parser eventPathListParser; err = subscribeRequestParser.GetEventRequests(&eventPathListParser); if (err == CHIP_END_OF_TLV) { diff --git a/src/app/ReadHandler.h b/src/app/ReadHandler.h index c020f73cb52089..6b640e418ab8c0 100644 --- a/src/app/ReadHandler.h +++ b/src/app/ReadHandler.h @@ -170,7 +170,7 @@ class ReadHandler : public Messaging::ExchangeDelegate CHIP_ERROR ProcessSubscribeRequest(System::PacketBufferHandle && aPayload); CHIP_ERROR ProcessReadRequest(System::PacketBufferHandle && aPayload); CHIP_ERROR ProcessAttributePathList(AttributePathIBs::Parser & aAttributePathListParser); - CHIP_ERROR ProcessEventPaths(EventPaths::Parser & aEventPathsParser); + CHIP_ERROR ProcessEventPaths(EventPathIBs::Parser & aEventPathsParser); CHIP_ERROR OnStatusResponse(Messaging::ExchangeContext * apExchangeContext, System::PacketBufferHandle && aPayload); CHIP_ERROR OnMessageReceived(Messaging::ExchangeContext * apExchangeContext, const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload) override; diff --git a/src/app/WriteClient.cpp b/src/app/WriteClient.cpp index ab48f1022919fa..52842c52b2aac7 100644 --- a/src/app/WriteClient.cpp +++ b/src/app/WriteClient.cpp @@ -93,7 +93,7 @@ CHIP_ERROR WriteClient::ProcessWriteResponseMessage(System::PacketBufferHandle & System::PacketBufferTLVReader reader; TLV::TLVReader attributeStatusesReader; WriteResponseMessage::Parser writeResponse; - AttributeStatuses::Parser attributeStatusesParser; + AttributeStatusIBs::Parser attributeStatusesParser; reader.Init(std::move(payload)); err = reader.Next(); diff --git a/src/app/WriteHandler.cpp b/src/app/WriteHandler.cpp index ff3ffcfcdb040d..e1b551862968f2 100644 --- a/src/app/WriteHandler.cpp +++ b/src/app/WriteHandler.cpp @@ -40,7 +40,7 @@ CHIP_ERROR WriteHandler::Init(InteractionModelDelegate * apDelegate) mMessageWriter.Init(std::move(packet)); ReturnLogErrorOnFailure(mWriteResponseBuilder.Init(&mMessageWriter)); - AttributeStatuses::Builder attributeStatusesBuilder = mWriteResponseBuilder.CreateWriteResponses(); + AttributeStatusIBs::Builder attributeStatusesBuilder = mWriteResponseBuilder.CreateWriteResponses(); ReturnLogErrorOnFailure(attributeStatusesBuilder.GetError()); MoveToState(State::Initialized); @@ -80,7 +80,7 @@ Status WriteHandler::OnWriteRequest(Messaging::ExchangeContext * apExchangeConte CHIP_ERROR WriteHandler::FinalizeMessage(System::PacketBufferHandle & packet) { CHIP_ERROR err = CHIP_NO_ERROR; - AttributeStatuses::Builder attributeStatuses; + AttributeStatusIBs::Builder attributeStatuses; VerifyOrExit(mState == State::AddStatus, err = CHIP_ERROR_INCORRECT_STATE); attributeStatuses = mWriteResponseBuilder.GetWriteResponses().EndOfAttributeStatuses(); err = attributeStatuses.GetError(); diff --git a/src/app/reporting/Engine.cpp b/src/app/reporting/Engine.cpp index ed0a3f1115fa07..f1f6b050e666f8 100644 --- a/src/app/reporting/Engine.cpp +++ b/src/app/reporting/Engine.cpp @@ -220,7 +220,7 @@ CHIP_ERROR Engine::BuildSingleReportDataEventReports(ReportDataMessage::Builder ClusterInfo * clusterInfoList = apReadHandler->GetEventClusterInfolist(); EventNumber * eventNumberList = apReadHandler->GetVendedEventNumberList(); EventManagement & eventManager = EventManagement::GetInstance(); - EventReports::Builder EventReports; + EventReportIBs::Builder EventReportIBs; bool hasMoreChunks = false; aReportDataBuilder.Checkpoint(backup); @@ -231,8 +231,8 @@ CHIP_ERROR Engine::BuildSingleReportDataEventReports(ReportDataMessage::Builder // skip the rest of processing VerifyOrExit(eventManager.IsValid(), ChipLogError(DataManagement, "EventManagement has not yet initialized")); - EventReports = aReportDataBuilder.CreateEventReports(); - SuccessOrExit(err = EventReports.GetError()); + EventReportIBs = aReportDataBuilder.CreateEventReports(); + SuccessOrExit(err = EventReportIBs.GetError()); memcpy(initialEvents, eventNumberList, sizeof(initialEvents)); @@ -256,7 +256,7 @@ CHIP_ERROR Engine::BuildSingleReportDataEventReports(ReportDataMessage::Builder while (apReadHandler->GetCurrentPriority() != PriorityLevel::Invalid) { uint8_t priorityIndex = static_cast(apReadHandler->GetCurrentPriority()); - err = eventManager.FetchEventsSince(*(EventReports.GetWriter()), clusterInfoList, apReadHandler->GetCurrentPriority(), + err = eventManager.FetchEventsSince(*(EventReportIBs.GetWriter()), clusterInfoList, apReadHandler->GetCurrentPriority(), eventNumberList[priorityIndex], eventCount); if ((err == CHIP_END_OF_TLV) || (err == CHIP_ERROR_TLV_UNDERRUN) || (err == CHIP_NO_ERROR)) @@ -301,8 +301,8 @@ CHIP_ERROR Engine::BuildSingleReportDataEventReports(ReportDataMessage::Builder } } - EventReports.EndOfEventReports(); - SuccessOrExit(err = EventReports.GetError()); + EventReportIBs.EndOfEventReports(); + SuccessOrExit(err = EventReportIBs.GetError()); ChipLogDetail(DataManagement, "Fetched %zu events", eventCount); diff --git a/src/app/tests/TestCommandInteraction.cpp b/src/app/tests/TestCommandInteraction.cpp index 3842f1b429a200..34a27058176aa9 100644 --- a/src/app/tests/TestCommandInteraction.cpp +++ b/src/app/tests/TestCommandInteraction.cpp @@ -286,7 +286,7 @@ void TestCommandInteraction::GenerateInvokeResponse(nlTestSuite * apSuite, void NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); invokeResponseMessageBuilder.SuppressResponse(true); - InvokeResponses::Builder invokeResponses = invokeResponseMessageBuilder.CreateInvokeResponses(); + InvokeResponseIBs::Builder invokeResponses = invokeResponseMessageBuilder.CreateInvokeResponses(); NL_TEST_ASSERT(apSuite, invokeResponseMessageBuilder.GetError() == CHIP_NO_ERROR); InvokeResponseIB::Builder invokeResponseIBBuilder = invokeResponses.CreateInvokeResponse(); diff --git a/src/app/tests/TestMessageDef.cpp b/src/app/tests/TestMessageDef.cpp index e3781a92dc9da7..db547413706b3f 100644 --- a/src/app/tests/TestMessageDef.cpp +++ b/src/app/tests/TestMessageDef.cpp @@ -23,7 +23,7 @@ */ #include -#include +#include #include #include #include @@ -126,7 +126,7 @@ void ParseEventFilterIB(nlTestSuite * apSuite, chip::TLV::TLVReader & aReader) NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR && eventMin == 2); } -void BuildEventFilters(nlTestSuite * apSuite, EventFilters::Builder & aEventFiltersBuilder) +void BuildEventFilters(nlTestSuite * apSuite, EventFilterIBs::Builder & aEventFiltersBuilder) { EventFilterIB::Builder eventFilterBuilder = aEventFiltersBuilder.CreateEventFilter(); NL_TEST_ASSERT(apSuite, aEventFiltersBuilder.GetError() == CHIP_NO_ERROR); @@ -138,7 +138,7 @@ void BuildEventFilters(nlTestSuite * apSuite, EventFilters::Builder & aEventFilt void ParseEventFilters(nlTestSuite * apSuite, chip::TLV::TLVReader & aReader) { CHIP_ERROR err = CHIP_NO_ERROR; - EventFilters::Parser eventFiltersParser; + EventFilterIBs::Parser eventFiltersParser; err = eventFiltersParser.Init(aReader); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -201,7 +201,7 @@ void ParseAttributePathIB(nlTestSuite * apSuite, chip::TLV::TLVReader & aReader) void BuildAttributePathList(nlTestSuite * apSuite, AttributePathIBs::Builder & aAttributePathListBuilder) { - AttributePathIB::Builder attributePathBuilder = aAttributePathListBuilder.CreateAttributePath(); + AttributePathIB::Builder attributePathBuilder = aAttributePathListBuilder.CreatePath(); NL_TEST_ASSERT(apSuite, attributePathBuilder.GetError() == CHIP_NO_ERROR); BuildAttributePathIB(apSuite, attributePathBuilder); @@ -261,7 +261,7 @@ void ParseEventPath(nlTestSuite * apSuite, EventPathIB::Parser & aEventPathParse NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR && isUrgent == true); } -void BuildEventPaths(nlTestSuite * apSuite, EventPaths::Builder & aEventPathsBuilder) +void BuildEventPaths(nlTestSuite * apSuite, EventPathIBs::Builder & aEventPathsBuilder) { EventPathIB::Builder eventPathBuilder = aEventPathsBuilder.CreatePath(); NL_TEST_ASSERT(apSuite, eventPathBuilder.GetError() == CHIP_NO_ERROR); @@ -274,7 +274,7 @@ void BuildEventPaths(nlTestSuite * apSuite, EventPaths::Builder & aEventPathsBui void ParseEventPaths(nlTestSuite * apSuite, chip::TLV::TLVReader & aReader) { CHIP_ERROR err = CHIP_NO_ERROR; - EventPaths::Parser eventPathListParser; + EventPathIBs::Parser eventPathListParser; err = eventPathListParser.Init(aReader); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -453,7 +453,7 @@ void ParseEventReportIB(nlTestSuite * apSuite, EventReportIB::Parser & aEventRep NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); } -void BuildEventReports(nlTestSuite * apSuite, EventReports::Builder & aEventReportsBuilder) +void BuildEventReports(nlTestSuite * apSuite, EventReportIBs::Builder & aEventReportsBuilder) { EventReportIB::Builder eventReportIBBuilder = aEventReportsBuilder.CreateEventReport(); NL_TEST_ASSERT(apSuite, aEventReportsBuilder.GetError() == CHIP_NO_ERROR); @@ -466,7 +466,7 @@ void BuildEventReports(nlTestSuite * apSuite, EventReports::Builder & aEventRepo void ParseEventReports(nlTestSuite * apSuite, chip::TLV::TLVReader & aReader) { CHIP_ERROR err = CHIP_NO_ERROR; - EventReports::Parser eventReportsParser; + EventReportIBs::Parser eventReportsParser; err = eventReportsParser.Init(aReader); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -507,7 +507,7 @@ void ParseAttributeStatusIB(nlTestSuite * apSuite, AttributeStatusIB::Parser & a NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); } -void BuildAttributeStatuses(nlTestSuite * apSuite, AttributeStatuses::Builder & aAttributeStatusesBuilder) +void BuildAttributeStatuses(nlTestSuite * apSuite, AttributeStatusIBs::Builder & aAttributeStatusesBuilder) { AttributeStatusIB::Builder aAttributeStatusIBBuilder = aAttributeStatusesBuilder.CreateAttributeStatus(); NL_TEST_ASSERT(apSuite, aAttributeStatusesBuilder.GetError() == CHIP_NO_ERROR); @@ -520,7 +520,7 @@ void BuildAttributeStatuses(nlTestSuite * apSuite, AttributeStatuses::Builder & void ParseAttributeStatuses(nlTestSuite * apSuite, chip::TLV::TLVReader & aReader) { CHIP_ERROR err = CHIP_NO_ERROR; - AttributeStatuses::Parser attributeStatusParser; + AttributeStatusIBs::Parser attributeStatusParser; err = attributeStatusParser.Init(aReader); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -864,7 +864,7 @@ void ParseInvokeRequests(nlTestSuite * apSuite, chip::TLV::TLVReader & aReader) #endif } -void BuildInvokeResponses(nlTestSuite * apSuite, InvokeResponses::Builder & aInvokeResponsesBuilder) +void BuildInvokeResponses(nlTestSuite * apSuite, InvokeResponseIBs::Builder & aInvokeResponsesBuilder) { InvokeResponseIB::Builder invokeResponseIBBuilder = aInvokeResponsesBuilder.CreateInvokeResponse(); NL_TEST_ASSERT(apSuite, aInvokeResponsesBuilder.GetError() == CHIP_NO_ERROR); @@ -877,7 +877,7 @@ void BuildInvokeResponses(nlTestSuite * apSuite, InvokeResponses::Builder & aInv void ParseInvokeResponses(nlTestSuite * apSuite, chip::TLV::TLVReader & aReader) { CHIP_ERROR err = CHIP_NO_ERROR; - InvokeResponses::Parser invokeResponsesParser; + InvokeResponseIBs::Parser invokeResponsesParser; err = invokeResponsesParser.Init(aReader); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -930,7 +930,7 @@ void BuildInvokeResponseMessage(nlTestSuite * apSuite, chip::TLV::TLVWriter & aW err = invokeResponseMessageBuilder.Init(&aWriter); invokeResponseMessageBuilder.SuppressResponse(true); - InvokeResponses::Builder invokeResponsesBuilder = invokeResponseMessageBuilder.CreateInvokeResponses(); + InvokeResponseIBs::Builder invokeResponsesBuilder = invokeResponseMessageBuilder.CreateInvokeResponses(); NL_TEST_ASSERT(apSuite, invokeResponseMessageBuilder.GetError() == CHIP_NO_ERROR); BuildInvokeResponses(apSuite, invokeResponsesBuilder); @@ -970,9 +970,9 @@ void BuildReportDataMessage(nlTestSuite * apSuite, chip::TLV::TLVWriter & aWrite NL_TEST_ASSERT(apSuite, reportDataMessageBuilder.GetError() == CHIP_NO_ERROR); BuildAttributeReportIBs(apSuite, AttributeReportIBs); - EventReports::Builder EventReports = reportDataMessageBuilder.CreateEventReports(); + EventReportIBs::Builder EventReportIBs = reportDataMessageBuilder.CreateEventReports(); NL_TEST_ASSERT(apSuite, reportDataMessageBuilder.GetError() == CHIP_NO_ERROR); - BuildEventReports(apSuite, EventReports); + BuildEventReports(apSuite, EventReportIBs); reportDataMessageBuilder.MoreChunkedMessages(true); NL_TEST_ASSERT(apSuite, reportDataMessageBuilder.GetError() == CHIP_NO_ERROR); @@ -989,7 +989,7 @@ void ParseReportDataMessage(nlTestSuite * apSuite, chip::TLV::TLVReader & aReade bool suppressResponse = false; uint64_t subscriptionId = 0; AttributeReportIBs::Parser attributeReportIBsParser; - EventReports::Parser eventReportsParser; + EventReportIBs::Parser eventReportsParser; bool moreChunkedMessages = false; reportDataParser.Init(aReader); @@ -1025,11 +1025,11 @@ void BuildReadRequestMessage(nlTestSuite * apSuite, chip::TLV::TLVWriter & aWrit NL_TEST_ASSERT(apSuite, readRequestBuilder.GetError() == CHIP_NO_ERROR); BuildAttributePathList(apSuite, AttributePathIBs); - EventPaths::Builder eventPathList = readRequestBuilder.CreateEventRequests(); + EventPathIBs::Builder eventPathList = readRequestBuilder.CreateEventRequests(); NL_TEST_ASSERT(apSuite, readRequestBuilder.GetError() == CHIP_NO_ERROR); BuildEventPaths(apSuite, eventPathList); - EventFilters::Builder eventFilters = readRequestBuilder.CreateEventFilters(); + EventFilterIBs::Builder eventFilters = readRequestBuilder.CreateEventFilters(); NL_TEST_ASSERT(apSuite, readRequestBuilder.GetError() == CHIP_NO_ERROR); BuildEventFilters(apSuite, eventFilters); @@ -1046,8 +1046,8 @@ void ParseReadRequestMessage(nlTestSuite * apSuite, chip::TLV::TLVReader & aRead ReadRequestMessage::Parser readRequestParser; AttributePathIBs::Parser attributePathListParser; - EventPaths::Parser eventPathListParser; - EventFilters::Parser eventFiltersParser; + EventPathIBs::Parser eventPathListParser; + EventFilterIBs::Parser eventFiltersParser; bool isFabricFiltered = false; err = readRequestParser.Init(aReader); @@ -1138,7 +1138,7 @@ void BuildWriteResponseMessage(nlTestSuite * apSuite, chip::TLV::TLVWriter & aWr err = writeResponseBuilder.Init(&aWriter); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - AttributeStatuses::Builder attributeStatuses = writeResponseBuilder.CreateWriteResponses(); + AttributeStatusIBs::Builder attributeStatuses = writeResponseBuilder.CreateWriteResponses(); NL_TEST_ASSERT(apSuite, writeResponseBuilder.GetError() == CHIP_NO_ERROR); BuildAttributeStatuses(apSuite, attributeStatuses); @@ -1151,7 +1151,7 @@ void ParseWriteResponseMessage(nlTestSuite * apSuite, chip::TLV::TLVReader & aRe CHIP_ERROR err = CHIP_NO_ERROR; WriteResponseMessage::Parser writeResponseParser; - AttributeStatuses::Parser attributeStatusesParser; + AttributeStatusIBs::Parser attributeStatusesParser; err = writeResponseParser.Init(aReader); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); #if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK @@ -1174,11 +1174,11 @@ void BuildSubscribeRequestMessage(nlTestSuite * apSuite, chip::TLV::TLVWriter & NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); BuildAttributePathList(apSuite, attributePathIBs); - EventPaths::Builder eventPathList = subscribeRequestBuilder.CreateEventRequests(); + EventPathIBs::Builder eventPathList = subscribeRequestBuilder.CreateEventRequests(); NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); BuildEventPaths(apSuite, eventPathList); - EventFilters::Builder eventFilters = subscribeRequestBuilder.CreateEventFilters(); + EventFilterIBs::Builder eventFilters = subscribeRequestBuilder.CreateEventFilters(); NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); BuildEventFilters(apSuite, eventFilters); @@ -1207,8 +1207,8 @@ void ParseSubscribeRequestMessage(nlTestSuite * apSuite, chip::TLV::TLVReader & SubscribeRequestMessage::Parser subscribeRequestParser; AttributePathIBs::Parser attributePathListParser; - EventPaths::Parser eventPathListParser; - EventFilters::Parser eventFiltersParser; + EventPathIBs::Parser eventPathListParser; + EventFilterIBs::Parser eventFiltersParser; uint16_t MinIntervalFloorSeconds = 0; uint16_t MaxIntervalCeilingSeconds = 0; bool keepExistingSubscription = false; @@ -1346,8 +1346,8 @@ void EventFiltersTest(nlTestSuite * apSuite, void * apContext) CHIP_ERROR err = CHIP_NO_ERROR; chip::System::PacketBufferTLVWriter writer; chip::System::PacketBufferTLVReader reader; - EventFilters::Builder eventFiltersBuilder; - EventFilters::Parser eventFiltersParser; + EventFilterIBs::Builder eventFiltersBuilder; + EventFilterIBs::Parser eventFiltersParser; writer.Init(chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSize)); err = eventFiltersBuilder.Init(&writer); @@ -1442,7 +1442,7 @@ void EventPathsTest(nlTestSuite * apSuite, void * apContext) CHIP_ERROR err = CHIP_NO_ERROR; chip::System::PacketBufferTLVWriter writer; chip::System::PacketBufferTLVReader reader; - EventPaths::Builder eventPathListBuilder; + EventPathIBs::Builder eventPathListBuilder; writer.Init(chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSize)); @@ -1540,7 +1540,7 @@ void EventReportsTest(nlTestSuite * apSuite, void * apContext) CHIP_ERROR err = CHIP_NO_ERROR; chip::System::PacketBufferTLVWriter writer; chip::System::PacketBufferTLVReader reader; - EventReports::Builder eventReportsBuilder; + EventReportIBs::Builder eventReportsBuilder; writer.Init(chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSize)); eventReportsBuilder.Init(&writer); BuildEventReports(apSuite, eventReportsBuilder); @@ -1679,7 +1679,7 @@ void AttributeStatusesTest(nlTestSuite * apSuite, void * apContext) chip::System::PacketBufferTLVWriter writer; chip::System::PacketBufferTLVReader reader; writer.Init(chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSize)); - AttributeStatuses::Builder attributeStatusesBuilder; + AttributeStatusIBs::Builder attributeStatusesBuilder; err = attributeStatusesBuilder.Init(&writer); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); BuildAttributeStatuses(apSuite, attributeStatusesBuilder); @@ -1907,7 +1907,7 @@ void InvokeResponsesTest(nlTestSuite * apSuite, void * apContext) CHIP_ERROR err = CHIP_NO_ERROR; chip::System::PacketBufferTLVWriter writer; chip::System::PacketBufferTLVReader reader; - InvokeResponses::Builder invokeResponsesBuilder; + InvokeResponseIBs::Builder invokeResponsesBuilder; writer.Init(chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSize)); invokeResponsesBuilder.Init(&writer); BuildInvokeResponses(apSuite, invokeResponsesBuilder); diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index fe6b10ee57660f..3617cf01abbcff 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -411,7 +411,7 @@ void TestReadInteraction::TestReadHandler(nlTestSuite * apSuite, void * apContex AttributePathIBs::Builder attributePathListBuilder = readRequestBuilder.CreateAttributeRequests(); NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); - AttributePathIB::Builder attributePathBuilder = attributePathListBuilder.CreateAttributePath(); + AttributePathIB::Builder attributePathBuilder = attributePathListBuilder.CreatePath(); NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); attributePathBuilder.Node(1).Endpoint(2).Cluster(3).Attribute(4).ListIndex(5).EndOfAttributePathIB(); @@ -540,7 +540,7 @@ void TestReadInteraction::TestReadHandlerInvalidAttributePath(nlTestSuite * apSu AttributePathIBs::Builder attributePathListBuilder = readRequestBuilder.CreateAttributeRequests(); NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); - AttributePathIB::Builder attributePathBuilder = attributePathListBuilder.CreateAttributePath(); + AttributePathIB::Builder attributePathBuilder = attributePathListBuilder.CreatePath(); NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); attributePathBuilder.Node(1).Endpoint(2).Cluster(3).ListIndex(5).EndOfAttributePathIB(); @@ -584,7 +584,7 @@ void TestReadInteraction::TestReadClientGenerateOneEventPaths(nlTestSuite * apSu eventPathParams[0].mClusterId = 3; eventPathParams[0].mEventId = 4; - EventPaths::Builder & eventPathListBuilder = request.CreateEventRequests(); + EventPathIBs::Builder & eventPathListBuilder = request.CreateEventRequests(); err = readClient.GenerateEventPaths(eventPathListBuilder, eventPathParams, 1 /*aEventPathParamsListSize*/); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -636,7 +636,7 @@ void TestReadInteraction::TestReadClientGenerateTwoEventPaths(nlTestSuite * apSu eventPathParams[1].mClusterId = 3; eventPathParams[1].mEventId = 5; - EventPaths::Builder & eventPathListBuilder = request.CreateEventRequests(); + EventPathIBs::Builder & eventPathListBuilder = request.CreateEventRequests(); err = readClient.GenerateEventPaths(eventPathListBuilder, eventPathParams, 2 /*aEventPathParamsListSize*/); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -933,7 +933,7 @@ void TestReadInteraction::TestProcessSubscribeRequest(nlTestSuite * apSuite, voi AttributePathIBs::Builder attributePathListBuilder = subscribeRequestBuilder.CreateAttributeRequests(); NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); - AttributePathIB::Builder attributePathBuilder = attributePathListBuilder.CreateAttributePath(); + AttributePathIB::Builder attributePathBuilder = attributePathListBuilder.CreatePath(); NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); attributePathBuilder.Node(1).Endpoint(2).Cluster(3).Attribute(4).ListIndex(5).EndOfAttributePathIB(); diff --git a/src/app/tests/TestReportingEngine.cpp b/src/app/tests/TestReportingEngine.cpp index c3776b596166e4..16070422c5b386 100644 --- a/src/app/tests/TestReportingEngine.cpp +++ b/src/app/tests/TestReportingEngine.cpp @@ -87,7 +87,7 @@ void TestReportingEngine::TestBuildAndSendSingleReportData(nlTestSuite * apSuite NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); attributePathListBuilder = readRequestBuilder.CreateAttributeRequests(); NL_TEST_ASSERT(apSuite, readRequestBuilder.GetError() == CHIP_NO_ERROR); - attributePathBuilder = attributePathListBuilder.CreateAttributePath(); + attributePathBuilder = attributePathListBuilder.CreatePath(); NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); attributePathBuilder = attributePathBuilder.Node(1) .Endpoint(kTestEndpointId) @@ -96,7 +96,7 @@ void TestReportingEngine::TestBuildAndSendSingleReportData(nlTestSuite * apSuite .EndOfAttributePathIB(); NL_TEST_ASSERT(apSuite, attributePathBuilder.GetError() == CHIP_NO_ERROR); - attributePathBuilder = attributePathListBuilder.CreateAttributePath(); + attributePathBuilder = attributePathListBuilder.CreatePath(); NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); attributePathBuilder = attributePathBuilder.Node(1) .Endpoint(kTestEndpointId) diff --git a/src/app/tests/TestWriteInteraction.cpp b/src/app/tests/TestWriteInteraction.cpp index 5ac7c28b7ad9f8..05960015d2fba1 100644 --- a/src/app/tests/TestWriteInteraction.cpp +++ b/src/app/tests/TestWriteInteraction.cpp @@ -173,7 +173,7 @@ void TestWriteInteraction::GenerateWriteResponse(nlTestSuite * apSuite, void * a WriteResponseMessage::Builder writeResponseBuilder; err = writeResponseBuilder.Init(&writer); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - AttributeStatuses::Builder attributeStatusesBuilder = writeResponseBuilder.CreateWriteResponses(); + AttributeStatusIBs::Builder attributeStatusesBuilder = writeResponseBuilder.CreateWriteResponses(); NL_TEST_ASSERT(apSuite, attributeStatusesBuilder.GetError() == CHIP_NO_ERROR); AttributeStatusIB::Builder attributeStatusIBBuilder = attributeStatusesBuilder.CreateAttributeStatus(); NL_TEST_ASSERT(apSuite, attributeStatusIBBuilder.GetError() == CHIP_NO_ERROR);