8000 Extensions to Basic Information Cluster; AttrId is now `u32`; report more global elements (Was: Chip tool tests) by ivmarkov · Pull Request #232 · project-chip/rs-matter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Extensions to Basic Information Cluster; AttrId is now u32; report more global elements (Was: Chip tool tests) #232

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 s 8000 ervice and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 22, 2025

Conversation

ivmarkov
Copy link
Contributor
@ivmarkov ivmarkov commented Apr 17, 2025

This PR addresses 3 problems I found while performing initial testing with the chip-tool YAML tests:

AttrId was u16

For some reason, our Attribute ID was type AttrId = u16, while I really believe it should be type AttrId = u32 or else we
(a) Cannot properly parse and process attribute paths containing 32-bit attribute IDs
(b) Cannot declare and process attributes extended with MEIs (Manufacturer Extensible Identifier) which really wants attribute IDs (and command IDs and cluster IDs) to be 32 bit.

Weirdly, we already have CmdId correctly declared as u32 (while in non-MEI world it is just a u8) and ClusterId as u32 (while it needs to be only u16 for non-MEI use-cases).

A bunch of Global Elements (attributes) were not reported

We did report FeatureMap and AttributeList, but we did not report:

  • ClusterRevision (0xfffd)
  • AcceptedCmdList (0xfff9)
  • GeneratedCmdList (0xfff8)

We might need to also report EventList but I'll figure this out in a subsequent PR, once I hit this problem during testing.

Furthermore, we were reporting these attributes as the first ones, while some chip-tool tests expect these to be the last ones, after all "normal" attributes. The new cluster_attrs macro taces care of this now.

Basic Information Cluster

  • It was missing the Location parameter and a few other mandatory ones. Some of these are since > Matter Spec 1.0, but not all.
  • NodeLabel and Location do need to be persisted in non-volatile storage - just like fabrics - or else the Basic Info test of chip-tool is failing

=====

Now, these fixes are just the beginning.
Also, there is a bit of an infrastructure work necessary to enable the chip-tool tests to run during the night in our CI.

However, I think it is actually more important if I can first extend our IDL support so that it can output more elements. As in all enums, bitsets and most importantly - structures associated with a cluster, as well as the cluster callable API itself.

Main reason driving this is the so called UnitTest cluster, which is used by many of the chip-tool YAML tests.

However it is so large, that I think implementing it "by hand" would be a giant waste of time, so I better improve our IDL generator instead.

@ivmarkov ivmarkov force-pushed the chip-tool-tests branch 5 times, most recently from b81bd6d to 3f2bf23 Compare April 18, 2025 14:10
@ivmarkov ivmarkov changed the title Chip tool tests Extensions to Basic Information Cluster; AttrId is now u32; report more global elements (Was: Chip tool tests) Apr 18, 2025
@ivmarkov ivmarkov marked this pull request as ready for review April 18, 2025 14:31
@ivmarkov ivmarkov requested a review from kedars April 18, 2025 14:32
@ivmarkov ivmarkov mentioned this pull request Apr 20, 2025
@ivmarkov
Copy link
Contributor Author

@kedars Shall we review and possibly merge this? I.e. to make room for #233

Copy link
Collaborator
@kedars kedars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one minor comment, rest looks good to me

@ivmarkov ivmarkov merged commit c1f62b0 into project-chip:main Apr 22, 2025
12 checks passed
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 this pull request may close these issues.

2 participants
0