-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
extmod/nimble: Provide subscription information on subscribtion update. #7555
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
extmod/nimble: Provide subscription information on subscribtion update. #7555
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7555 +/- ##
==========================================
- Coverage 98.29% 98.27% -0.02%
==========================================
Files 154 154
Lines 19990 19992 +2
==========================================
- Hits 19649 19647 -2
- Misses 341 345 +4
Continue to review full report at Codecov.
|
This change transmits subscription info when a subscribe event is fired. This event initiates a new MP event and provides this information: - Connection handle of the connection subscribing/unsubscribing - Value handle of the characteristic being subscribed/unsubscribed to - Current subscription status to notifications (binary format 0 or 1) - Current subscription status to indications (binary format 0 or 1) This implementation is inspired from another solution. This solution uses such events to keep a list of subscribed connections. See: https://github.com/h2zero/esp-nimble-cpp/search?q=setSubscribe
60b7dd4
to
8a49dff
Compare
This change handles a new micropython event. This event is fired upon susbcription update. A characteristic now saves a list of subscribed connections. This change depends on this PR: micropython/micropython#7555
I'm happy to add support for the subscription status event, but I'm not sure I want to make management of subscription part of the application's responsibility (or aioble) as it should be possible to keep this entirely internal to the stack. See comments at #6848 (comment) -- is it sufficient to just be able to set update=True on your writes and have NimBLE send the notification/indication to the subscribed peers? |
See #7564 for adding |
This change transmits subscription info when a subscribe event is fired.
This event initiates a new MP event and provides this information:
This implementation is inspired from another solution.
This solution uses such events to keep a list of subscribed connections.
See: https://github.com/h2zero/esp-nimble-cpp/search?q=setSubscribe