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

Develop workaround in endpoint_config.zapt for "attribute accessor" storage class #12733

Closed
jonsmirl opened this issue Dec 8, 2021 · 2 comments

Comments

@jonsmirl
Copy link
Contributor

jonsmirl commented Dec 8, 2021

Zap does not currently support defining storage classes for attributes. While this is on the road map to get fixed in Zap, a temporary solution is needed.

The temporary solution is to add dedicated code in endpoint_config.zapt which will detect the Matter attributes implemented via the "attribute accessor" storage class and generate the correct code. (A way to flag this would be to look for type='ARRAY" and no length specified).

Later when Zap catches up this code can be removed.

@jonsmirl jonsmirl changed the title Develop work around in endpoint_config.zapt for "attribute accessor" storage class Develop workaround in endpoint_config.zapt for "attribute accessor" storage class Dec 8, 2021
@bzbarsky-apple bzbarsky-apple self-assigned this Dec 8, 2021
@bzbarsky-apple
Copy link
Contributor

Note to self: Need to do this for things with array and struct types.

@bzbarsky-apple
Copy link
Contributor

Update: This is done for lists in #13846.

For structs, code generation will fail at the moment for non-external structs, though the error will be a little inscrutable. A better fix is blocked on project-chip/zap#391

Furthermore, we have a way of flagging attributes as "must have external storage" in the SDK, in src/app/zap-templates/zcl/zcl.json.

So not sure how much is left to do here immediately.

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

No branches or pull requests

6 participants