-
Notifications
You must be signed in to change notification settings - Fork 3k
Add GattUpdatesEnabledCallbackParams struct #14506
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@noonfom, thank you for your changes. |
0xc0170
previously approved these changes
Apr 7, 2021
pan-
previously requested changes
Apr 7, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @noonfom it is a good improvement. I left few comments that you can address.
connectivity/FEATURE_BLE/include/ble/gatt/GattCallbackParamTypes.h
Outdated
Show resolved
Hide resolved
connectivity/FEATURE_BLE/source/cordio/source/GattServerImpl.cpp
Outdated
Show resolved
Hide resolved
Pull request has been modified.
paul-szczepanek-arm
previously approved these changes
Apr 7, 2021
Pull request has been modified.
pan-
approved these changes
Apr 7, 2021
Jenkins CI Test : ✔️ SUCCESSBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
0xc0170
approved these changes
Apr 8, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of changes
Fixes #14454
The attHandle field of GattDataSentCallbackParams can be a source of confusion
for users. On the one hand, it is true that it represents the "Attribute Handle
to which the event applies". However, GattUpdatesEnabledCallbackParams and
GattUpdatesDisabledCallbackParams are defined as aliases of
GattDataSentCallbackParams, and the attHandle field does not represent the same
thing in both cases. In the case of GattDataSentCallbackParams, the attHandle
field represents the characteristic value handle. On the other hand, it
represents the characteristic's CCCD handle in GattUpdatesEnabledCallbackParams
and GattUpdatesDisabledCallbackParams. Nevertheless, access to the
characteristic value handle is often required in the onUpdatesEnabled and
onUpdatesDisabled event handlers.
This PR introduces a new POD: GattUpdatesEnabledCallbackParams that has a
charHandle field representing the value handle of the characteristic containing
the CCCD. The characteristic value handle is retrieved from the table of CCCD
handles using a new getter in the Gatt Server, which can be used for both
implicit and non-implicit CCCDs. GattUpdatesDisabledCallbackParams is defined
as an alias of GattUpdatesEnabledCallbackParams.
Documentation
None
Pull request type
Test results
Reviewers
@ARMmbed/mbed-os-connectivity