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

.matter files should reflect codegen reality: mandatory global cluster list-typed attributes are always supported #24947

Closed
bzbarsky-apple opened this issue Feb 9, 2023 · 2 comments · Fixed by #24951
Assignees

Comments

@bzbarsky-apple
Copy link
Contributor

ZAP codegen ignores the "included" state for mandatory global cluster attributes, since that's not a valid configuration. So no matter what the .zap file says they are supported by servers.

It looks like .matter files reflect the contents of the .zap file for these attributes (at least based on what I am seeing in https://github.com/project-chip/connectedhomeip/pull/24937/files), not the actual reality that these are always supported.

@andy31415
Copy link
Contributor

Do we have a list of what mandatory global attributes are always included so I can match this in the IDL logic?
I may need to do the same in xml parsing logic ...

Is there a code location where this decision is made or is it already set up in the XML definitions somehow?

@bzbarsky-apple
Copy link
Contributor Author

The specific list of attributes involved here is:

  0xfff8, // GeneratedCommandList
  0xfff9, // AcceptedCommandList
  0xfffa, // EventList
  0xfffb, // AttributeList

On the server side, these are excluded from the metadata (because every cluster must have them) and the IM code special-cases them. See https://github.com/project-chip/zap/blob/fd7e0bfbc72c3821053352730f02c75de229d969/src-electron/generator/helper-endpointconfig.js#L965 and its callsites in that file, and

constexpr AttributeId GlobalAttributesNotInMetadata[] = {
and its consumers.

@bzbarsky-apple bzbarsky-apple changed the title .matter files should reflect codegen reality: mandatory global cluster attributes are always supported .matter files should reflect codegen reality: mandatory global cluster list-typed attributes are always supported Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants