Skip to content

Commit

Permalink
Update/Rename attributePath/AttributePaths/AttributeStatus/WriteRespo…
Browse files Browse the repository at this point in the history
…nse with latest encoding spec
  • Loading branch information
yunhanw-google committed Nov 4, 2021
1 parent ee7682d commit fe9d52d
Show file tree
Hide file tree
Showing 31 changed files with 833 additions and 1,064 deletions.
12 changes: 6 additions & 6 deletions src/app/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ static_library("app") {
"MessageDef/AttributeDataList.h",
"MessageDef/AttributeDataVersionList.cpp",
"MessageDef/AttributeDataVersionList.h",
"MessageDef/AttributePath.cpp",
"MessageDef/AttributePath.h",
"MessageDef/AttributePathList.cpp",
"MessageDef/AttributePathList.h",
"MessageDef/AttributePathIB.cpp",
"MessageDef/AttributePathIB.h",
"MessageDef/AttributePaths.cpp",
"MessageDef/AttributePaths.h",
"MessageDef/AttributeStatusIB.cpp",
"MessageDef/AttributeStatusIB.h",
"MessageDef/AttributeStatusList.cpp",
"MessageDef/AttributeStatusList.h",
"MessageDef/AttributeStatuses.cpp",
"MessageDef/AttributeStatuses.h",
"MessageDef/Builder.cpp",
"MessageDef/Builder.h",
"MessageDef/CommandDataIB.cpp",
Expand Down
6 changes: 3 additions & 3 deletions src/app/MessageDef/AttributeDataElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ CHIP_ERROR AttributeDataElement::Parser::CheckSchemaValidity() const
VerifyOrExit(chip::TLV::kTLVType_List == reader.GetType(), err = CHIP_ERROR_WRONG_TLV_TYPE);

{
AttributePath::Parser path;
AttributePathIB::Parser path;
err = path.Init(reader);
SuccessOrExit(err);

Expand Down Expand Up @@ -348,7 +348,7 @@ CHIP_ERROR AttributeDataElement::Parser::CheckSchemaValidity() const
}
#endif // CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK

CHIP_ERROR AttributeDataElement::Parser::GetAttributePath(AttributePath::Parser * const apAttributePath) const
CHIP_ERROR AttributeDataElement::Parser::GetAttributePath(AttributePathIB::Parser * const apAttributePath) const
{
CHIP_ERROR err = CHIP_NO_ERROR;
chip::TLV::TLVReader reader;
Expand Down Expand Up @@ -403,7 +403,7 @@ CHIP_ERROR AttributeDataElement::Builder::Init(chip::TLV::TLVWriter * const apWr
return InitAnonymousStructure(apWriter);
}

AttributePath::Builder & AttributeDataElement::Builder::CreateAttributePathBuilder()
AttributePathIB::Builder & AttributeDataElement::Builder::CreateAttributePath()
{
// skip if error has already been set
VerifyOrExit(CHIP_NO_ERROR == mError, mAttributePathBuilder.ResetError(mError));
Expand Down
14 changes: 7 additions & 7 deletions src/app/MessageDef/AttributeDataElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#pragma once

#include "AttributePath.h"
#include "AttributePathIB.h"
#include "Builder.h"
#include "Parser.h"

Expand Down Expand Up @@ -76,15 +76,15 @@ class Parser : public chip::app::Parser
#endif

/**
* @brief Get a TLVReader for the AttributePath. Next() must be called before accessing them.
* @brief Get a TLVReader for the AttributePathIB. Next() must be called before accessing them.
*
* @param [in] apAttributePath A pointer to apAttributePath
*
* @return #CHIP_NO_ERROR on success
* #CHIP_ERROR_WRONG_TLV_TYPE if there is such element but it's not a Path
* #CHIP_END_OF_TLV if there is no such element
*/
CHIP_ERROR GetAttributePath(AttributePath::Parser * const apAttributePath) const;
CHIP_ERROR GetAttributePath(AttributePathIB::Parser * const apAttributePath) const;

/**
* @brief Get a TLVReader for the DataVersion. Next() must be called before accessing them.
Expand Down Expand Up @@ -145,11 +145,11 @@ class Builder : public chip::app::Builder
CHIP_ERROR Init(chip::TLV::TLVWriter * const apWriter);

/**
* @brief Initialize a AttributePath::Builder for writing into the TLV stream
* @brief Initialize a AttributePathIB::Builder for writing into the TLV stream
*
* @return A reference to AttributePath::Builder
* @return A reference to AttributePathIB::Builder
*/
AttributePath::Builder & CreateAttributePathBuilder();
AttributePathIB::Builder & CreateAttributePath();

/**
* @brief Inject DataVersion into the TLV stream to indicate the numerical data version associated with
Expand Down Expand Up @@ -180,7 +180,7 @@ class Builder : public chip::app::Builder
AttributeDataElement::Builder & EndOfAttributeDataElement();

private:
AttributePath::Builder mAttributePathBuilder;
AttributePathIB::Builder mAttributePathBuilder;
};
}; // namespace AttributeDataElement

Expand Down
272 changes: 0 additions & 272 deletions src/app/MessageDef/AttributePath.cpp

This file was deleted.

Loading

0 comments on commit fe9d52d

Please sign in to comment.