@@ -50,6 +50,7 @@ namespace app {
5050namespace reporting {
5151namespace {
5252
53+ using DataModel::ReadFlags;
5354using Protocols::InteractionModel::Status;
5455
5556// / Returns the status of ACL validation.
@@ -148,7 +149,7 @@ std::optional<Status> ValidateAttributeIsReadable(DataModel::Provider * dataMode
148149}
149150
150151DataModel::ActionReturnStatus RetrieveClusterData (DataModel::Provider * dataModel, const SubjectDescriptor & subjectDescriptor,
151- bool isFabricFiltered , AttributeReportIBs::Builder & reportBuilder,
152+ BitFlags<ReadFlags> flags , AttributeReportIBs::Builder & reportBuilder,
152153 const ConcreteReadAttributePath & path, AttributeEncodeState * encoderState)
153154{
154155 ChipLogDetail (DataManagement, " <RE:Run> Cluster %" PRIx32 " , Attribute %" PRIx32 " is dirty" , path.mClusterId ,
@@ -158,7 +159,7 @@ DataModel::ActionReturnStatus RetrieveClusterData(DataModel::Provider * dataMode
158159
159160 DataModel::ReadAttributeRequest readRequest;
160161
161- readRequest.readFlags . Set (DataModel::ReadFlags:: kFabricFiltered , isFabricFiltered) ;
162+ readRequest.readFlags = flags ;
162163 readRequest.subjectDescriptor = &subjectDescriptor;
163164 readRequest.path = path;
164165
@@ -178,6 +179,7 @@ DataModel::ActionReturnStatus RetrieveClusterData(DataModel::Provider * dataMode
178179 reportBuilder.Checkpoint (checkpoint);
179180
180181 DataModel::ActionReturnStatus status (CHIP_NO_ERROR);
182+ bool isFabricFiltered = flags.Has (ReadFlags::kFabricFiltered );
181183 AttributeValueEncoder attributeValueEncoder (reportBuilder, subjectDescriptor, path, version, isFabricFiltered, encoderState);
182184
183185 // TODO: we explicitly DO NOT validate that path is a valid cluster path (even more, above serverClusterFinder
@@ -472,9 +474,12 @@ CHIP_ERROR Engine::BuildSingleReportDataAttributeReportIBs(ReportDataMessage::Bu
472474 ConcreteReadAttributePath pathForRetrieval (readPath);
473475 // Load the saved state from previous encoding session for chunking of one single attribute (list chunking).
474476 AttributeEncodeState encodeState = apReadHandler->GetAttributeEncodeState ();
477+ BitFlags<ReadFlags> flags;
478+ flags.Set (ReadFlags::kFabricFiltered , apReadHandler->IsFabricFiltered ());
479+ flags.Set (ReadFlags::kAllowsLargePayload , apReadHandler->AllowsLargePayload ());
475480 DataModel::ActionReturnStatus status =
476- RetrieveClusterData (mpImEngine->GetDataModelProvider (), apReadHandler->GetSubjectDescriptor (),
477- apReadHandler-> IsFabricFiltered (), attributeReportIBs, pathForRetrieval, &encodeState);
481+ RetrieveClusterData (mpImEngine->GetDataModelProvider (), apReadHandler->GetSubjectDescriptor (), flags,
482+ attributeReportIBs, pathForRetrieval, &encodeState);
478483 if (status.IsError ())
479484 {
480485 // Operation error set, since this will affect early return or override on status encoding
0 commit comments