-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide destination and endpoint while requesting for reports #9466
Conversation
* If the reportDestination is kUndefinedNodeId, the method uses binding table to identify | ||
* destination nodes and endpoints | ||
*/ | ||
static void conditionallySendReport(EndpointId endpoint, ClusterId clusterId, NodeId reportDestination, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the comment, It is confusing that the code works this way. Can it take a MessageSendDestination
argument instead of NodeId reportDestination
We can extract a function out of emberAfSendUnicastToBindingsWithCallback
:
MessageSendDestination emberAfGetDestinationByBinding(EmberApsFrame * apsFrame)
{
...
}
It can help to eliminate lots of if
condition tests inside conditionallySendReport
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -259,15 +268,17 @@ void emberAfPluginReportingTickEventHandler(void) | |||
{ | |||
emberAfReportingPrintln("Reporting Entry Full - creating new report"); | |||
} | |||
conditionallySendReport(apsFrame->sourceEndpoint, apsFrame->clusterId); | |||
conditionallySendReport(apsFrame->sourceEndpoint, apsFrame->clusterId, reportDestination, destinationEndpoint); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we have implemented emberAfGetDestinationByBinding
, here it can be:
conditionallySendReport(apsFrame->sourceEndpoint, apsFrame->clusterId, emberAfGetDestinationByBinding(apsFrame), destinationEndpoint);
@@ -354,17 +365,27 @@ void emberAfPluginReportingTickEventHandler(void) | |||
|
|||
if (apsFrame != NULL) | |||
{ | |||
conditionallySendReport(apsFrame->sourceEndpoint, apsFrame->clusterId); | |||
conditionallySendReport(apsFrame->sourceEndpoint, apsFrame->clusterId, reportDestination, destinationEndpoint); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little confused about why there is another if (apsFrame != NULL)
test, is it able to move this statement inside if (apsFrame == NULL)
branch ?
We are having discussion required regarding the PRs for subscriptions regarding usage or not usage of reporting. Marking this discussion required: I assume this is the PR (or part of the PR) that will be considered for a proposal for subscription implementation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking requested changes: please provide a complete PR for anything related to subscriptions, so we can compare approaches.
Size increase report for "gn_qpg-example-build" from 8f80988
Full report output
|
We should discuss and next week’s meeting about how to proceed here, however we’ll need to timebox this so as to unblock subscription work. |
Size increase report for "nrfconnect-example-build" from 8f80988
Full report output
|
Size increase report for "esp32-example-build" from 8f80988
Full report output
|
Per discussion today, closing this PR - given this is now covered here: #9510 |
Problem
Reporting should not require a client to setup a binding table entry.
Change overview
Add target destination (node and endpoint) to
ConfigureAttribute
commands. This command is used for turning on/off reporting for an attribute. The node generating the report will use the target information to dispatch the reports.Testing
Removed the binding steps from the current unit test, and ensure it continues to work (receive reports).