Skip to content

Commit

Permalink
review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wqx6 committed Nov 11, 2024
1 parent 0d041f9 commit 9efb23c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ void CodegenDataModelProvider::Temporary_ReportAttributeChanged(const AttributeP
}
else
{
// If cluster Id is invalid, mark the endpoint dirty using the path. This can happen when enabling/disabling the endpoint.
change_listener.MarkDirty(path);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/data-model-provider/Provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class Provider : public ProviderMetadataTree
/// should be marked as `dirty` by the data model provider listener so that the reporter can notify the subscriber
/// of attribute changes.
/// This function should be invoked when attribute managed by attribute access interface is modified but not
/// through am actual Write interaction.
/// through an actual Write interaction.
/// For example, if the LastNetworkingStatus attribute changes because the NetworkCommissioning driver detects a
/// network connection status change and calls SetLastNetworkingStatusValue(). The data model provider can recognize
/// this change by invoking this function at the point of change.
Expand Down
9 changes: 9 additions & 0 deletions src/app/reporting/reporting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
using namespace chip;
using namespace chip::app;

#if defined(__GNUC__) || defined(__clang__)
// Disable the deprecated warning only for this file
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif

void MatterReportingAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId)
{
// Attribute writes have asserted this already, but this assert should catch
Expand Down Expand Up @@ -52,3 +58,6 @@ void MatterReportingAttributeChangeCallback(EndpointId endpoint)

InteractionModelEngine::GetInstance()->GetDataModelProvider()->Temporary_ReportAttributeChanged(AttributePathParams(endpoint));
}
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic pop
#endif

0 comments on commit 9efb23c

Please sign in to comment.