Skip to content
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

[ReadHandler] Synchronized report scheduler #27943

Conversation

lpbeliveau-silabs
Copy link
Contributor

@lpbeliveau-silabs lpbeliveau-silabs commented Jul 13, 2023

Added a Synchronised Implementation of the Report Scheduler to reduce the number of time a device would have to wake up to emit reports by making all handlers emit reports at the same wake event if they are above their minimal interval.

Tested in TestReportScheduler for up to 4 handlers to confirm logic.

behavior on the scheduler with up to 4 ReadHandlers as well logging
mechanism to find out what handler fires at what time.
@lpbeliveau-silabs lpbeliveau-silabs force-pushed the feature/synchronized_report_scheduler branch from 66d6ab5 to 35f7d41 Compare July 18, 2023 13:06
@mkardous-silabs mkardous-silabs added the icd Intermittently Connected Devices label Jul 18, 2023
@mkardous-silabs mkardous-silabs added this to the 1.2 milestone Jul 18, 2023
src/app/reporting/ReportScheduler.h Outdated Show resolved Hide resolved
src/app/reporting/ReportScheduler.h Outdated Show resolved Hide resolved
src/app/reporting/ReportScheduler.h Outdated Show resolved Hide resolved
src/app/reporting/ReportSchedulerImpl.cpp Show resolved Hide resolved
src/app/reporting/SynchronizedReportSchedulerImpl.cpp Outdated Show resolved Hide resolved
@mergify mergify bot merged commit d44f789 into project-chip:master Jul 19, 2023
erwinpan1 pushed a commit to erwinpan1/connectedhomeip that referenced this pull request Jul 21, 2023
* Added a Synchronized ReportScheduler along with test to confirm the
behavior on the scheduler with up to 4 ReadHandlers as well logging
mechanism to find out what handler fires at what time.

* Added a quick fix because TestDecoding won't compile otherwise, this doesn't belong here

* Apply suggestions from code review

Co-authored-by: Boris Zbarsky <[email protected]>

* Refactored ReportScheduler Impls to better take advantage of inheritance, removed bloat, excluded test for platform in which problems are caused due to unprocessed engine runs

* Apply suggestions from code review

Co-authored-by: Boris Zbarsky <[email protected]>

* Applied comment review and refactoed next timeout calculation logic

* Completed unit test and logic

* Passing a ReportSchedulerPointer instead of an std::function to avoid dynamical memory allocation

* undid ReadHandler changes

* Update src/app/reporting/ReportScheduler.h

Co-authored-by: Boris Zbarsky <[email protected]>

* Removed un-necessary nullptr check, addressed comments regarding tests and added doc on unclear behavior

* Addressed redundant test

---------

Co-authored-by: Boris Zbarsky <[email protected]>
doru91 added a commit to NXP/matter that referenced this pull request Aug 4, 2023
@lpbeliveau-silabs lpbeliveau-silabs deleted the feature/synchronized_report_scheduler branch December 10, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app icd Intermittently Connected Devices review - approved tests
Development

Successfully merging this pull request may close these issues.

5 participants