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

Consider having multiple paths for ServerClusterInterface #37928

Open
3 tasks
andy31415 opened this issue Mar 7, 2025 · 1 comment · May be fixed by #37931
Open
3 tasks

Consider having multiple paths for ServerClusterInterface #37928

andy31415 opened this issue Mar 7, 2025 · 1 comment · May be fixed by #37931

Comments

@andy31415
Copy link
Contributor

https://github.com/project-chip/connectedhomeip/blob/master/src/app/server-cluster/ServerClusterInterface.h#L51 currently is split into separate state restriction-wise:

  • GetPath - represents a SINGLE PATH
  • GetDataversion and GetClusterFlags are assumed to refer to the path in GetPath
  • all the rest (Write notification, attributes, read, write, invoke, accepted commands, generated commands) take in a full path.

This asymmetry is odd - some functions look like "can handle any path" where as a few are restricted to one path.

For implementing clusters, in some cases some clusters are tightly connected and implementing them in one class could be easier. In that case it seems desirable to allow a single "cluster interface" to handle multiple paths.

Suggested changes:

  • Getpath should actualy be GetPaths and return a Span<const ConcreteClusterPath>
  • GetDataVersion and GetClusterFlags should take in a ConcreteClusterPath (and the path MUST be one of the GetPaths values)
  • DefaultServerCluster still keeps the "one cluster implementation"
@tcarmelveilleux
Copy link
Contributor

Example case: RVC, Air purifier and nested appliances (e.g. refrigerator/cooktop) that have tight coupling within 1 endpoints or across a parent and some children endpoint.

Matter closures in 1.5 is another example where 1 ServerClusterInstance that can handle several <EndpoindId, ClusterId> cluster paths in 1 instance may make life easier for some products.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
2 participants