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

Consolidate methods and data onto characteristics #136

Open
petekubiak opened this issue Oct 10, 2024 · 1 comment
Open

Consolidate methods and data onto characteristics #136

petekubiak opened this issue Oct 10, 2024 · 1 comment

Comments

@petekubiak
Copy link

I believe characteristic actions can be simplified by adding methods and persistent data to each characteristic instead of requiring access through the AttributeTable. This has the potential to remove a layer of complexity from the library by removing the need for the AttributeServer and AttributeTable.

This follows on from the feature developed in #131 to define GATT services and characteristics through attribute procedural macros. The idea is to implement a model similar to nrf_softdevice where actions such as get(), set() and notify() are tied to the characteristics themselves rather than being called on the GattServer and AttributeTable types.

This work is closely linked with #135 as both require changes to the same area of the code. I will attempt to put together a draft propsal for this so that we can discuss further how this can be implemented in such a way that it incorporates the Matter BTP requirements outlined in #135.

@alexmoon
Copy link

That sounds like a pretty good idea to me. I think that should apply generally to Attributes (e.g. either characteristics or descriptors). I also think that they should come in two flavors: host managed or app managed. With a host-managed attribute, the host has the persistent data and updates or it when receiving requests from the remote. With an app-managed attribute, the host uses events/callbacks/whatever to notify the app of remote requests and the app is responsible for providing the response.

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

No branches or pull requests

2 participants