Skip to content

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 4 commits into from Apr 8, 2021
Merged

Add GattUpdatesEnabledCallbackParams struct #14506

merged 4 commits into from Apr 8, 2021

Conversation

ghost
Copy link

@ghost ghost commented Apr 6, 2021

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

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[ ] Feature update (New feature / Functionality change / New API)
[ ] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[ ] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[ ] Tests / results supplied as part of this PR

Reviewers

@ARMmbed/mbed-os-connectivity


@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Apr 6, 2021
@ciarmcom ciarmcom requested a review from a team April 6, 2021 19:00
@ciarmcom
Copy link
Member

ciarmcom commented Apr 6, 2021

@noonfom, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

0xc0170
0xc0170 previously approved these changes Apr 7, 2021
@mergify mergify bot added needs: CI and removed needs: review labels Apr 7, 2021
pan-
pan- previously requested changes Apr 7, 2021
Copy link
Member

@pan- pan- left a 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.

@mergify mergify bot added needs: work and removed needs: CI labels Apr 7, 2021
@mergify mergify bot dismissed stale reviews from 0xc0170 and pan- April 7, 2021 11:35

Pull request has been modified.

@mergify mergify bot added needs: CI and removed needs: work labels Apr 7, 2021
@mergify mergify bot dismissed paul-szczepanek-arm’s stale review April 7, 2021 17:09

Pull request has been modified.

@mbed-ci
Copy link

mbed-ci commented Apr 7, 2021

Jenkins CI Test : ✔️ SUCCESS

Build Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-test ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️

@0xc0170 0xc0170 merged commit 9bbc8c9 into ARMmbed:master Apr 8, 2021
@mergify mergify bot removed the ready for merge label Apr 8, 2021
@mbedmain mbedmain removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

attHandle in GattUpdatesDisabledCallbackParams of onUpdatesEnabled handler is always not matched with characteristic->getValueHandle()
6 participants