-
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
[un-revert] Occupancy sensing updates for Matter 1.4 #34593
Conversation
…(all-clusters-app) implementation to Rev 5 (Matter 1.4) (project-chip#34293) * [occupancy-sensing]Updated occupancy sensing cluster SDK & Sample app(all-clusters-app) implementation to Rev 5 (Matter 1.4) Signed-off-by: Oliver Fan <[email protected]> * Restyled by whitespace * Restyled by clang-format * Apply suggestions from code review Update Copyright suggestions Co-authored-by: Boris Zbarsky <[email protected]> * Apply suggestions from code review, remove some dead code. Signed-off-by: Oliver Fan <[email protected]> * Restyled by clang-format * Apply suggestions from code review * Avoid mixing code-backed and Attribute-store-backed attributes * Avoid global singletons to maintain state * Initialize the cluster from the application * Report features based on code, not on ZAP-configured values Signed-off-by: Oliver Fan <[email protected]> * Restyled by whitespace * Restyled by clang-format * Restyled by clang-format * Restyled by clang-format * Restyled by clang-format * Update examples/all-clusters-app/all-clusters-common/src/occupancy-sensing-stub.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Apply suggestions from code review change mHoldTimeLimitsStructs and mHoldTime to sHoldTimeLimitsStructs and sHoldTime put above two variables in an anonymous namespace Signed-off-by: Oliver Fan <[email protected]> * Restyled by clang-format --------- Signed-off-by: Oliver Fan <[email protected]> Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Boris Zbarsky <[email protected]>
Review changes with SemanticDiff. Analyzed 1 of 9 files.
|
PR #34593: Size comparison from 3d9ada2 to 6971f61 Full report (85 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
…witch app. This app does not actually use occupancy-sensor-server, which means that ZAP-provided information the cluster server implementation needs is not available. And light-switch-app does not use occupancy sensor in any way.
Fast-tracking, since assuming CI passes this is just a clone of #34293 (which had approvals), with a CI fix. |
PR #34593: Size comparison from 3d9ada2 to d534299 Increases above 0.2%:
Full report (85 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #34593: Size comparison from 3d9ada2 to 4770b9f Increases above 0.2%:
Full report (85 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
static std::unique_ptr<OccupancySensingAttrAccess> | ||
gAttrAccess[MATTER_DM_OCCUPANCY_SENSING_CLUSTER_SERVER_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT]; | ||
|
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.
@OliverFan1 This should be mapped to the EndpointId and not the array index. If I have OccupancySensingCluster in endpoints 1, 2, and 5, the code will crash on endpoint 5.
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.
This will be fixed in the follow-up PR #34658
|
||
void emberAfOccupancySensingClusterInitCallback(EndpointId endpointId) | ||
{ | ||
VerifyOrDie(!gAttrAccess[endpointId]); |
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.
It's crashing for ESP over here because the array is mapped by the index and not by endpointId.
) * [occupancy-sensing]Updated occupancy sensing cluster SDK & Sample app(all-clusters-app) implementation to Rev 5 (Matter 1.4) (project-chip#34293) * [occupancy-sensing]Updated occupancy sensing cluster SDK & Sample app(all-clusters-app) implementation to Rev 5 (Matter 1.4) Signed-off-by: Oliver Fan <[email protected]> * Restyled by whitespace * Restyled by clang-format * Apply suggestions from code review Update Copyright suggestions Co-authored-by: Boris Zbarsky <[email protected]> * Apply suggestions from code review, remove some dead code. Signed-off-by: Oliver Fan <[email protected]> * Restyled by clang-format * Apply suggestions from code review * Avoid mixing code-backed and Attribute-store-backed attributes * Avoid global singletons to maintain state * Initialize the cluster from the application * Report features based on code, not on ZAP-configured values Signed-off-by: Oliver Fan <[email protected]> * Restyled by whitespace * Restyled by clang-format * Restyled by clang-format * Restyled by clang-format * Restyled by clang-format * Update examples/all-clusters-app/all-clusters-common/src/occupancy-sensing-stub.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Apply suggestions from code review change mHoldTimeLimitsStructs and mHoldTime to sHoldTimeLimitsStructs and sHoldTime put above two variables in an anonymous namespace Signed-off-by: Oliver Fan <[email protected]> * Restyled by clang-format --------- Signed-off-by: Oliver Fan <[email protected]> Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Boris Zbarsky <[email protected]> * Don't try to built occupancy-sensor-server as part of the ESP light-switch app. This app does not actually use occupancy-sensor-server, which means that ZAP-provided information the cluster server implementation needs is not available. And light-switch-app does not use occupancy sensor in any way. * Don't try to built occupancy-sensor-server as part of the ESP energy-management-app. --------- Signed-off-by: Oliver Fan <[email protected]> Co-authored-by: Oliver FAN <[email protected]> Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Boris Zbarsky <[email protected]>
) * [occupancy-sensing]Updated occupancy sensing cluster SDK & Sample app(all-clusters-app) implementation to Rev 5 (Matter 1.4) (project-chip#34293) * [occupancy-sensing]Updated occupancy sensing cluster SDK & Sample app(all-clusters-app) implementation to Rev 5 (Matter 1.4) Signed-off-by: Oliver Fan <[email protected]> * Restyled by whitespace * Restyled by clang-format * Apply suggestions from code review Update Copyright suggestions Co-authored-by: Boris Zbarsky <[email protected]> * Apply suggestions from code review, remove some dead code. Signed-off-by: Oliver Fan <[email protected]> * Restyled by clang-format * Apply suggestions from code review * Avoid mixing code-backed and Attribute-store-backed attributes * Avoid global singletons to maintain state * Initialize the cluster from the application * Report features based on code, not on ZAP-configured values Signed-off-by: Oliver Fan <[email protected]> * Restyled by whitespace * Restyled by clang-format * Restyled by clang-format * Restyled by clang-format * Restyled by clang-format * Update examples/all-clusters-app/all-clusters-common/src/occupancy-sensing-stub.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Apply suggestions from code review change mHoldTimeLimitsStructs and mHoldTime to sHoldTimeLimitsStructs and sHoldTime put above two variables in an anonymous namespace Signed-off-by: Oliver Fan <[email protected]> * Restyled by clang-format --------- Signed-off-by: Oliver Fan <[email protected]> Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Boris Zbarsky <[email protected]> * Don't try to built occupancy-sensor-server as part of the ESP light-switch app. This app does not actually use occupancy-sensor-server, which means that ZAP-provided information the cluster server implementation needs is not available. And light-switch-app does not use occupancy sensor in any way. * Don't try to built occupancy-sensor-server as part of the ESP energy-management-app. --------- Signed-off-by: Oliver Fan <[email protected]> Co-authored-by: Oliver FAN <[email protected]> Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Boris Zbarsky <[email protected]>
PR #34293 was merged by mistake with ESP32 break. This PR brings back the code to fix and land.
Updated occupancy sensing cluster SDK implementation based on XML changes(PR#34163) for Occupancy Sensing rev 5
Updated occupancy sensing cluster sample app(all-clusters-app) implementation to Rev 5 in the zap and matter file of all-clusters-app
Remove "occupancy-sensor-server" from "ClientDirectories" in zap_cluster_list.json to resolve a building issue found from rebuilding the chip-tool