-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add DeviceLoadStatus Support to General Diagnostics Cluster #42235
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
base: master
Are you sure you want to change the base?
Conversation
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.
Code Review
This pull request introduces support for the DeviceLoadStatus attribute within the General Diagnostics Cluster. The implementation correctly integrates with InteractionModelEngine, ReportScheduler, and SessionManager to gather and expose relevant metrics such as subscription counts and Interaction Model message statistics. The changes are well-structured, and a dedicated unit test has been added to verify the new message counting functionality in SessionManager.
One potential area for improvement is the explicit casting of uint32_t values from GetNumActiveReadHandlers to uint16_t for currentSubscriptions and currentSubscriptionsForFabric in the DeviceLoadStruct. While these fields are defined as uint16 in the Matter specification, a runtime check or assertion could prevent potential data truncation if the number of active read handlers ever exceeds the maximum value of uint16_t.
src/app/clusters/general-diagnostics-server/GeneralDiagnosticsCluster.cpp
Outdated
Show resolved
Hide resolved
src/app/clusters/general-diagnostics-server/GeneralDiagnosticsCluster.cpp
Outdated
Show resolved
Hide resolved
|
PR #42235: Size comparison from 3aee644 to 9773474 Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
src/app/clusters/general-diagnostics-server/GeneralDiagnosticsCluster.cpp
Outdated
Show resolved
Hide resolved
|
PR #42235: Size comparison from 3aee644 to dc2e76d Full report (5 builds for cc32xx, realtek, stm32)
|
|
PR #42235: Size comparison from 3aee644 to 5f77101 Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
src/app/clusters/general-diagnostics-server/GeneralDiagnosticsCluster.cpp
Outdated
Show resolved
Hide resolved
src/app/clusters/general-diagnostics-server/GeneralDiagnosticsCluster.cpp
Outdated
Show resolved
Hide resolved
|
PR #42235: Size comparison from 078ba11 to 22321d6 Full report (5 builds for cc32xx, realtek, stm32)
|
|
PR #42235: Size comparison from 078ba11 to 7c29a55 Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
|
PR #42235: Size comparison from 3ced690 to 1218f16 Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
|
PR #42235: Size comparison from 3ced690 to cc8dbec Full report (3 builds for realtek, stm32)
|
|
PR #42235: Size comparison from 3ced690 to 4432d67 Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
|
PR #42235: Size comparison from 3ced690 to 264d024 Full report (5 builds for cc32xx, realtek, stm32)
|
Summary
This PR adds support for the new
DeviceLoadStatusattribute in the general diagnostics cluster. This attribute is protected behind theLOADfeature. A read request for this attribute encodes aDeviceLoadStructthat contains information about the current number of subscriptions, current number of subscriptions for the fabric, total number of subscriptions established, total number of interaction model messages sent, and total number of interaction model messages received. This PR contains changes to theReportSchedulerandSessionManagerto support reporting of these metrics.Related issues
Testing