-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[Closures] Closure Control SecureState event generation code #39899
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
[Closures] Closure Control SecureState event generation code #39899
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
The pull request introduces the generation of a secure state event when the SecureState field in the OverallCurrentState attribute changes. The changes include adding a conditional block to check for changes in the secure state and generating the event accordingly. The code appears to correctly implement the desired functionality as per the specification.
src/app/clusters/closure-control-server/closure-control-cluster-logic.cpp
Show resolved
Hide resolved
PR #39899: Size comparison from 12de44c to 6696ef8 Full report (8 builds for cc32xx, nrfconnect, stm32, tizen)
|
PR #39899: Size comparison from 12de44c to 16fed1e Full report (67 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #39899: Size comparison from b12d678 to 958df35 Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #39899: Size comparison from b60ae1b to c08b912 Full report (72 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
…-chip#39899) * Securestate event changes * Restyled by whitespace * Restyled by clang-format * add secure state sette * Restyled by clang-format --------- Co-authored-by: Restyled.io <commits@restyled.io>
Summary
This PR implements the generation of secure state event when the Secure state value in OverallCurrent state changes from true to false and viceversa.
Spec reference : https://github.com/CHIP-Specifications/connectedhomeip-spec/blob/11577e0fefe8127aeafea19844edf85c6ae0280f/src/app_clusters/ClosureControl.adoc#84-securestatechanged-event
This event, if supported, SHALL be generated when the SecureState field in the OverallCurrentState attribute changes. It is used to indicate whether a closure is securing a space against possible unauthorized entry.
Testing
Validate across the TC_CLCTRL_6_1.py, which validate the secure state.
Readability checklist
The checklist below will help the reviewer finish PR review in time and keep the
code readable:
descriptive
“When in Rome…”
rule (coding style)
See: Pull Request Guidelines