Skip to content
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

Make metadata that combines flags and access privileges more compact #37140

Open
2 tasks
andy31415 opened this issue Jan 21, 2025 · 0 comments
Open
2 tasks

Make metadata that combines flags and access privileges more compact #37140

andy31415 opened this issue Jan 21, 2025 · 0 comments

Comments

@andy31415
Copy link
Contributor

https://github.com/project-chip/connectedhomeip/blob/master/src/app/data-model-provider/MetadataTypes.h defines several classes that combine some BitFlags (which are generally not as many) and access privileges.

Since these structures will be stored in structs, making the structures smaller will result in resource saving. We would want storage to be combined to use 3 bits for access privileges (available list at https://github.com/project-chip/connectedhomeip/blob/master/src/access/Privilege.h) and the rest for actual flags.

As an external interface, we should have getter-style operations like Access::Privilege GetInvokePrivilege() and BitFlags<CommandQualityFlags> GetQualities() as examples and the actual storage of things should be internal implementation details.

Structures to change:

  • AcceptedCommandEntry
  • AttributeEntry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant