Repository navigation
GH-30: Add an attribute store flag to control supervision - #30
Open
silabs-borisl wants to merge 1 commit into
Open
silabs-borisl wants to merge 1 commit into
silabs-borisl wants to merge 1 commit into
Conversation
Forwarded: SiliconLabs#30 Bug-SiliconLabs: UIC-3181 Bug-Github: SiliconLabs#30
nobriot
reviewed
Mar 23, 2024
| return true; | ||
| } | ||
|
|
||
| return (supervision_flag == 1); |
There was a problem hiding this comment.
I would also suggest here to send on any non-zero value
Suggested change
| return (supervision_flag == 1); | |
| return (supervision_flag != 0); |
| = attribute_store_get_first_parent_with_type(updated_node, | ||
| ATTRIBUTE_ENDPOINT_ID); | ||
|
|
||
| attribute_store_node_t supervision_version_node |
There was a problem hiding this comment.
Here instead of add + set you could shortcut like this:
Suggested change
| attribute_store_node_t supervision_version_node | |
| attribute_store_set_child_reported(endpoint_node, | |
| ATTRIBUTE_COMMAND_CLASS_SUPERVISION_ENABLED, | |
| &supervision_enabled_flag, | |
| sizeof(supervision_enabled_flag)); |
Because adding here unconditionally may just get the system to add it on restarts. Just test to restart the ZPC and see if the ATTRIBUTE_COMMAND_CLASS_SUPERVISION_ENABLED are not appearing in duplicates.
Also I would suggest to set that no matter the version of the Supervision attribute.
Also note that restart will always flip this setting back to 1, so if you do not have an active UAM map setting it it would re-activate itself on restart.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introducing a new flag that can control supervision frames. This should be compatible with other version as if the flag doesn't exist ZPC still send the supervision frame.
If device supports supervision ZPC will do an additional check :
This attribute could for example controlled from an .uam file for a specific device.
Forwarded: #30
Bug-SiliconLabs: UIC-3181
Bug-Github: #30