-
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
DataModelProvider: add mark dirty for WriteAttribute function #36988
base: master
Are you sure you want to change the base?
Conversation
PR #36988: Size comparison from dedef1f to 80145a3 Full report (70 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
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 needs some design considerations: data model providers should own the data and I am unsure about the syntax of control of when something is dirty: why is the write itself not able to determine dirtyness of things.
This feels like a workaround/hackish at a first glance: adding more things into parameters and we should stop that practice.
Worst case (and I am not sure we should) this kind of flag should be part of the WriteAttributeRequest
structure instead since that contains the write request parameters.
@wqx6 could you provide me with some code links and references about the behaviour that causes issues here? It seems like we want quiet reporting in LevelControl ... but then could we solve it at the cluster level using https://github.com/project-chip/connectedhomeip/blob/master/src/app/cluster-building-blocks/QuieterReporting.h ? |
https://github.com/project-chip/connectedhomeip/blob/master/src/app/clusters/level-control/level-control.cpp#L412 In level control or color control cluster, we are using AttributeAccessors(such as |
PR #36988: Size comparison from 5bd63d5 to ecea71f Full report (70 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
Why would you be replacing that with a WriteAttribute? Wouldn't you just update the cluster state as needed? |
Some write operations in data model provider should not mark the attribute as dirty.
For example, CurrentLevel attribute in LevelControl cluster should not be reported frequently during a transition after the device receives a LevelMove command. Some changes during the transition should be quiet and not reported to the subscriber. So we need to add a markDirty for the WriteAttribute function in DataModelProvider.
Testing
Unit test should pass