diff --git a/src/app/clusters/descriptor/descriptor.cpp b/src/app/clusters/descriptor/descriptor.cpp index 96dbeb00996152..43c4bf4dc5e089 100644 --- a/src/app/clusters/descriptor/descriptor.cpp +++ b/src/app/clusters/descriptor/descriptor.cpp @@ -44,7 +44,7 @@ class DescriptorAttrAccess : public AttributeAccessInterface // Register for the Descriptor cluster on all endpoints. DescriptorAttrAccess() : AttributeAccessInterface(Optional::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); @@ -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; 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 99be301163669c..9e50751fd335cd 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -68,7 +68,7 @@ class OperationalCredentialsAttrAccess : public AttributeAccessInterface AttributeAccessInterface(Optional::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); @@ -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; diff --git a/src/app/clusters/test-cluster-server/test-cluster-server.cpp b/src/app/clusters/test-cluster-server/test-cluster-server.cpp index 79679eee04d783..53c5eca918a37e 100644 --- a/src/app/clusters/test-cluster-server/test-cluster-server.cpp +++ b/src/app/clusters/test-cluster-server/test-cluster-server.cpp @@ -54,7 +54,7 @@ class TestAttrAccess : public AttributeAccessInterface // Register for the Test Cluster cluster on all endpoints. TestAttrAccess() : AttributeAccessInterface(Optional::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); @@ -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); diff --git a/src/controller/tests/data_model/TestCommands.cpp b/src/controller/tests/data_model/TestCommands.cpp index 4edd8597d11d85..5526d0b787eedc 100644 --- a/src/controller/tests/data_model/TestCommands.cpp +++ b/src/controller/tests/data_model/TestCommands.cpp @@ -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; }