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

How to read multiple attribute in darwin platform #25424

Closed
joonhaengHeo opened this issue Mar 2, 2023 · 5 comments · Fixed by #25840
Closed

How to read multiple attribute in darwin platform #25424

joonhaengHeo opened this issue Mar 2, 2023 · 5 comments · Fixed by #25840
Labels

Comments

@joonhaengHeo
Copy link
Contributor

Reproduction steps

There is no way to read multiple attributes at once from the Darwin platform.

We have confirmed that one attribute can be read using the readAttributeWithEndpointId of MTRBaseDeviceClass, and that endpointId, clusterId, attributeId can be used as null value(nil) parameter to read all attributes. However, it is impossible to deliver in List form like Android.

ReportCallback callback, long devicePtr, List<ChipAttributePath> attributePaths) {

Bug prevalence

always

GitHub hash of the SDK that was being used

1a1d0c3

Platform

darwin

Platform Version(s)

No response

Anything else?

No response

@joonhaengHeo joonhaengHeo changed the title [BUG] How to read multiple attribute in darwin platform How to read multiple attribute in darwin platform Mar 2, 2023
@bzbarsky-apple
Copy link
Contributor

bzbarsky-apple commented Mar 6, 2023

There is no way to read multiple attributes at once from the Darwin platform.

That is correct. That's not an API Matter.framework exposes at the moment.

Exposing such an API would require some thought about where the responsibility lies for dealing with "too large" reads (i.e. involving too many paths) and how those should be handled.

@joonhaengHeo
Copy link
Contributor Author

@bzbarsky-apple
Thank you for your answer.

As far as I know, up to 9 multiple attributes can be read. (I received an answer to Slack question before.) Wouldn't it be right to support Multiple Attribute Read even if there is a limit of 9 Reads?

@bzbarsky-apple
Copy link
Contributor

That would be one option. Another would be to accept reads of any length but break them up into 9-at-a-time, etc.

@joonhaengHeo
Copy link
Contributor Author

Do you have a plan to add multiple attribute reading API to darwin?

@bzbarsky-apple
Copy link
Contributor

Me personally, in the next few weeks, no. But I would not object to someone else doing it, as long as the API is reasonable.

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

Successfully merging a pull request may close this issue.

2 participants