Skip to content

Commit

Permalink
Fix build failures due to merge conflicts. (#10572)
Browse files Browse the repository at this point in the history
#10397 modified
APIs that were being used in new places at the same time in
#10459,
#10362,
#10464, and
#10374, so now the
tree does not compile.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Oct 26, 2021
1 parent 0bf3594 commit 8ff9d83
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
16 changes: 8 additions & 8 deletions src/app/clusters/descriptor/descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class DescriptorAttrAccess : public AttributeAccessInterface
// Register for the Descriptor cluster on all endpoints.
DescriptorAttrAccess() : AttributeAccessInterface(Optional<EndpointId>::Missing(), Descriptor::Id) {}

CHIP_ERROR Read(ClusterInfo & aClusterInfo, AttributeValueEncoder & aEncoder) override;
CHIP_ERROR Read(const ConcreteAttributePath & aPath, AttributeValueEncoder & aEncoder) override;

private:
CHIP_ERROR ReadPartsAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder);
Expand Down Expand Up @@ -115,23 +115,23 @@ CHIP_ERROR DescriptorAttrAccess::ReadClientServerAttribute(EndpointId endpoint,

DescriptorAttrAccess gAttrAccess;

CHIP_ERROR DescriptorAttrAccess::Read(ClusterInfo & aClusterInfo, AttributeValueEncoder & aEncoder)
CHIP_ERROR DescriptorAttrAccess::Read(const ConcreteAttributePath & aPath, AttributeValueEncoder & aEncoder)
{
VerifyOrDie(aClusterInfo.mClusterId == Descriptor::Id);
VerifyOrDie(aPath.mClusterId == Descriptor::Id);

switch (aClusterInfo.mFieldId)
switch (aPath.mAttributeId)
{
case DeviceList::Id: {
return ReadDeviceAttribute(aClusterInfo.mEndpointId, aEncoder);
return ReadDeviceAttribute(aPath.mEndpointId, aEncoder);
}
case ServerList::Id: {
return ReadClientServerAttribute(aClusterInfo.mEndpointId, aEncoder, true);
return ReadClientServerAttribute(aPath.mEndpointId, aEncoder, true);
}
case ClientList::Id: {
return ReadClientServerAttribute(aClusterInfo.mEndpointId, aEncoder, false);
return ReadClientServerAttribute(aPath.mEndpointId, aEncoder, false);
}
case PartsList::Id: {
return ReadPartsAttribute(aClusterInfo.mEndpointId, aEncoder);
return ReadPartsAttribute(aPath.mEndpointId, aEncoder);
}
default: {
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class OperationalCredentialsAttrAccess : public AttributeAccessInterface
AttributeAccessInterface(Optional<EndpointId>::Missing(), Clusters::OperationalCredentials::Id)
{}

CHIP_ERROR Read(ClusterInfo & aClusterInfo, AttributeValueEncoder & aEncoder) override;
CHIP_ERROR Read(const ConcreteAttributePath & aPath, AttributeValueEncoder & aEncoder) override;

private:
CHIP_ERROR ReadFabricsList(EndpointId endpoint, AttributeValueEncoder & aEncoder);
Expand Down Expand Up @@ -103,14 +103,14 @@ CHIP_ERROR OperationalCredentialsAttrAccess::ReadFabricsList(EndpointId endpoint

OperationalCredentialsAttrAccess gAttrAccess;

CHIP_ERROR OperationalCredentialsAttrAccess::Read(ClusterInfo & aClusterInfo, AttributeValueEncoder & aEncoder)
CHIP_ERROR OperationalCredentialsAttrAccess::Read(const ConcreteAttributePath & aPath, AttributeValueEncoder & aEncoder)
{
VerifyOrDie(aClusterInfo.mClusterId == Clusters::OperationalCredentials::Id);
VerifyOrDie(aPath.mClusterId == Clusters::OperationalCredentials::Id);

switch (aClusterInfo.mFieldId)
switch (aPath.mAttributeId)
{
case Attributes::FabricsList::Id: {
return ReadFabricsList(aClusterInfo.mEndpointId, aEncoder);
return ReadFabricsList(aPath.mEndpointId, aEncoder);
}
default:
break;
Expand Down
6 changes: 3 additions & 3 deletions src/app/clusters/test-cluster-server/test-cluster-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class TestAttrAccess : public AttributeAccessInterface
// Register for the Test Cluster cluster on all endpoints.
TestAttrAccess() : AttributeAccessInterface(Optional<EndpointId>::Missing(), TestCluster::Id) {}

CHIP_ERROR Read(ClusterInfo & aClusterInfo, AttributeValueEncoder & aEncoder) override;
CHIP_ERROR Read(const ConcreteAttributePath & aPath, AttributeValueEncoder & aEncoder) override;

private:
CHIP_ERROR ReadListInt8uAttribute(AttributeValueEncoder & aEncoder);
Expand All @@ -64,9 +64,9 @@ class TestAttrAccess : public AttributeAccessInterface

TestAttrAccess gAttrAccess;

CHIP_ERROR TestAttrAccess::Read(ClusterInfo & aClusterInfo, AttributeValueEncoder & aEncoder)
CHIP_ERROR TestAttrAccess::Read(const ConcreteAttributePath & aPath, AttributeValueEncoder & aEncoder)
{
switch (aClusterInfo.mFieldId)
switch (aPath.mAttributeId)
{
case ListInt8u::Id: {
return ReadListInt8uAttribute(aEncoder);
Expand Down
2 changes: 1 addition & 1 deletion src/controller/tests/data_model/TestCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ bool ServerClusterCommandExists(const ConcreteCommandPath & aCommandPath)
return (aCommandPath.mEndpointId == kTestEndpointId && aCommandPath.mClusterId == TestCluster::Id);
}

CHIP_ERROR ReadSingleClusterData(ClusterInfo & aClusterInfo, TLV::TLVWriter * apWriter, bool * apDataExists)
CHIP_ERROR ReadSingleClusterData(const ConcreteAttributePath & aPath, TLV::TLVWriter * apWriter, bool * apDataExists)
{
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}
Expand Down

0 comments on commit 8ff9d83

Please sign in to comment.