-
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
Closure control cluster server code implementation #37561
base: master
Are you sure you want to change the base?
Closure control cluster server code implementation #37561
Conversation
Changed Files
|
PR #37561: Size comparison from 1b3f616 to 651fb3b Full report (3 builds for cc32xx, stm32)
|
src/app/clusters/closure-control-server/closure-control-server.cpp
Outdated
Show resolved
Hide resolved
|
||
// ------------------------------------------------------------------ | ||
// Get attribute methods | ||
virtual DataModel::Nullable<uint32_t> GetCountdownTime() = 0; |
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 is very likely to lead to buggy implementations that do not properly report attribute changes.
Small bits of state like the countdown time, overall state, resting procedure, etc should be owned by the cluster instance and pushed to it by the application. The cluster instance can then make sure to do the dirty-marking needed for subscriptions to work properly, implement the Q bits for CountdownTime, etc, etc.
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.
thanks for your input.
Sure will change the implementation to add Qbits for CountDownTime and change the Mainstate implementation to enable getter and setter for the attribute. Overall state and Target state will be handled by application as they are feature speicfic like (positioning, latching,speed and extra info).
Resting procedure and others are being part of the fallback feature, which is now being removed in spec. so will take it up after the spec changes.(https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/10879)
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.
They can be handled by the application, but stored in the cluster, by the way, if the copying of the data is not too much of a problem.
PR #37561: Size comparison from 7c1d6f7 to 236a68b Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #37561: Size comparison from 5621ff6 to 5c130df Full report (3 builds for cc32xx, stm32)
|
CHIP_ERROR Instance::SetOverallTarget(const DataModel::Nullable<Structs::OverallTargetStruct::Type> & aOverallTarget) | ||
{ | ||
mOverallTarget = aOverallTarget; | ||
MatterReportingAttributeChangeCallback(mDelegate.GetEndpointId(), mClusterId, Attributes::OverallTarget::Id); |
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.
Should we not check if it was really a different value before reporting calling MatterReportingAttributeChangeCallback
? For SetMainState you do add the check
Testing
Enabled the cluster in all clusters app and build the server code locally.