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

If device reports UNSUPPORTED_ATTRIBUTE then mark it unsupported #931

Open
cdjackson opened this issue Dec 26, 2019 · 2 comments
Open

If device reports UNSUPPORTED_ATTRIBUTE then mark it unsupported #931

cdjackson opened this issue Dec 26, 2019 · 2 comments
Labels
enhancement pinned Will not be closed, even if stale

Comments

@cdjackson
Copy link
Member

If we receive UNSUPPORTED_ATTRIBUTE during a read attribute request, we should mark this attribute unsupported so that applications can use this information.

@stale
Copy link

stale bot commented Feb 24, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Feb 24, 2020
@stale stale bot closed this as completed Mar 9, 2020
@cdjackson cdjackson reopened this Mar 9, 2020
@stale stale bot removed the wontfix label Mar 9, 2020
@cdjackson cdjackson added the pinned Will not be closed, even if stale label Mar 9, 2020
@cdjackson
Copy link
Member Author

I would like to implement this as it will make applications more mindful of unsupported attributes and we can avoid requesting them. However, despite the apparent simplicity, is may end up a breaking change to some extent.

There are currently a couple of systems in place for tracking supported attributes -:

  • The supportedAttributes list in ZclCluster. This is updated when the user explicitly requests the list from the remote device. This is not always implemented on remote devices though.
  • The ZclAttribute class has an isImplemented method.

There are a few options - all have drawbacks, but I propose the following -:

We change the ZclAttribute.isImplemented method (or add a new method) that returns "implemented", "unimplemented" and "unknown". This could be a Boolean returning TRUE, FALSE, and null. This state can be updated when either the list of supported attributes is requested, and also when the UNSUPPORTED_ATTRIBUTE` is returned to a read request.

The main downside to this is that it will have an impact on the ZclAttributeDao class since that will also need to change and it's probably not possible to support the current implementation which is boolean for the current implemented member. That means when restoring the state, we loose the three options.

I will leave this a few weeks before implementing this and welcome any thoughts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement pinned Will not be closed, even if stale
Projects
None yet
Development

No branches or pull requests

1 participant