diff --git a/src/app/AttributePathExpandIterator.cpp b/src/app/AttributePathExpandIterator.cpp index 505997e57d7133..02b09969a22f8a 100644 --- a/src/app/AttributePathExpandIterator.cpp +++ b/src/app/AttributePathExpandIterator.cpp @@ -117,6 +117,8 @@ bool AttributePathExpandIterator::Next() { for (; mpClusterInfo != nullptr; (mpClusterInfo = mpClusterInfo->mpNext, mEndpointIndex = UINT16_MAX)) { + mOutputPath.mExpanded = mpClusterInfo->HasAttributeWildcard(); + if (mEndpointIndex == UINT16_MAX) { // Special case: If this is a concrete path, we just return its value as-is. diff --git a/src/app/ConcreteAttributePath.h b/src/app/ConcreteAttributePath.h index 4ade1b173fc012..d1f46914fe7491 100644 --- a/src/app/ConcreteAttributePath.h +++ b/src/app/ConcreteAttributePath.h @@ -26,6 +26,9 @@ namespace app { /** * A representation of a concrete attribute path. This does not convey any list index specifiers. + * + * The expanded flag can be set to indicate that a concrete path was expanded from a wildcard + * or group path. */ struct ConcreteAttributePath { @@ -41,6 +44,7 @@ struct ConcreteAttributePath } EndpointId mEndpointId = 0; + bool mExpanded = false; // NOTE: in between larger members ClusterId mClusterId = 0; AttributeId mAttributeId = 0; }; @@ -54,9 +58,7 @@ struct ConcreteReadAttributePath : public ConcreteAttributePath { ConcreteReadAttributePath() {} - ConcreteReadAttributePath(const ConcreteAttributePath & path) : - ConcreteReadAttributePath(path.mEndpointId, path.mClusterId, path.mAttributeId) - {} + ConcreteReadAttributePath(const ConcreteAttributePath & path) : ConcreteAttributePath(path) {} ConcreteReadAttributePath(EndpointId aEndpointId, ClusterId aClusterId, AttributeId aAttributeId) : ConcreteAttributePath(aEndpointId, aClusterId, aAttributeId) @@ -90,6 +92,8 @@ struct ConcreteDataAttributePath : public ConcreteAttributePath ConcreteDataAttributePath() {} + ConcreteDataAttributePath(const ConcreteAttributePath & path) : ConcreteAttributePath(path) {} + ConcreteDataAttributePath(EndpointId aEndpointId, ClusterId aClusterId, AttributeId aAttributeId) : ConcreteAttributePath(aEndpointId, aClusterId, aAttributeId) {} diff --git a/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp index c32d439d5e9970..b178c78f081596 100644 --- a/src/app/util/ember-compatibility-functions.cpp +++ b/src/app/util/ember-compatibility-functions.cpp @@ -359,8 +359,9 @@ CHIP_ERROR ReadSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, c AttributeValueEncoder::AttributeEncodeState * apEncoderState) { ChipLogDetail(DataManagement, - "Reading attribute: Cluster=" ChipLogFormatMEI " Endpoint=%" PRIx16 " AttributeId=" ChipLogFormatMEI, - ChipLogValueMEI(aPath.mClusterId), aPath.mEndpointId, ChipLogValueMEI(aPath.mAttributeId)); + "Reading attribute: Cluster=" ChipLogFormatMEI " Endpoint=%" PRIx16 " AttributeId=" ChipLogFormatMEI + " (expanded=%d)", + ChipLogValueMEI(aPath.mClusterId), aPath.mEndpointId, ChipLogValueMEI(aPath.mAttributeId), aPath.mExpanded); if (aPath.mAttributeId == Clusters::Globals::Attributes::AttributeList::Id) {