-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Re-implement Identify Cluster as CodeDriven #41232
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
Conversation
|
PR #41232: Size comparison from 471d46b to ffb2c69 Full report (3 builds for realtek, stm32)
|
|
PR #41232: Size comparison from 471d46b to 497b706 Full report (5 builds for cc32xx, realtek, stm32)
|
src/app/clusters/identify-server/app_config_dependent_sources.gni
Outdated
Show resolved
Hide resolved
|
PR #41232: Size comparison from 62c795a to cf2dc44 Full report (5 builds for cc32xx, realtek, stm32)
|
for more information, see https://pre-commit.ci
|
PR #41232: Size comparison from 14ca7a1 to de9594a Full report (12 builds for cc13x4_26x4, cc32xx, nrfconnect, qpg, realtek, stm32)
|
|
PR #41232: Size comparison from 14ca7a1 to c75be6b Full report (34 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, psoc6, qpg, realtek, stm32, telink)
|
|
PR #41232: Size comparison from 14ca7a1 to 565acdf Full report (34 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, psoc6, qpg, realtek, stm32, telink)
|
|
PR #41232: Size comparison from 14ca7a1 to 4381c52 Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
src/app/clusters/identify-server/tests/TestIdentifyClusterHelpers.h
Outdated
Show resolved
Hide resolved
|
PR #41232: Size comparison from 14ca7a1 to 78791a6 Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
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.
shouldn't zap file be updated too to reflect the attributes now being external?
You can do scripts/tools/zap_convert_all.py to update them all. This pr is large already so It can be a follow-up
Oh, I haven't used |
Summary
This PR contains a code-driven C++ implementation of the Matter Identify cluster server. This implementation (
IdentifyCluster.h) is designed for flexibility avoiding the the tight coupling present in older ZAP/Ember based implementations.It uses a delegate pattern (chip::app::Clusters::IdentifyDelegate) to notify the application about cluster-related events, such as when identification starts, stops, or an effect is triggered.
Documentation
Added a README.md with documentation.
Testing
Added a comprehensive set of unit tests.
Backwards compatibility tests:
Code Size Overhead (300 bytes or 600 bytes)
The average code size overhead is in the order of ~600 bytes if the application uses the legacy API.
I've updated the
all-clusters-appfor ESP32 to use the new CodeDriven API and instantiate the cluster directly, removing the CodegenIntegration (backwards compatibility layer) overhead. This makes the code size go down to ~300 bytes.I also added a readme file describing how to migrate legacy apps to the new API and avoid the overhead.
Here's a size diff demonstrating the 300 bytes overhead: