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

[BREAKING] Refactor NimBLEServer #763

Merged
merged 3 commits into from
Nov 29, 2024
Merged

[BREAKING] Refactor NimBLEServer #763

merged 3 commits into from
Nov 29, 2024

Conversation

h2zero
Copy link
Owner

@h2zero h2zero commented Nov 27, 2024

  • General code cleanup
  • NimBLEServerCallbacks::onMTUChanged renamed to NimBLEServerCallbacks::onMTUChange to be consistent with the client callback.
  • NimBLEServer::getPeerIDInfo renamed to NimBLEServer::getPeerInfoByHandle to better describe it's use.
  • Use a std::array to store client connection handles instead of std::vector to reduce memory allocation.
  • NimBLEServer::disconnect now returns bool, true = success, instead of int to be consistent with the rest of the library.
  • Removes tracking of client characteristic subscription status from NimBLEServer and NimBLECharacteristic and instead uses the functions and tracking in the host stack.
  • NimBLECharacteristic::notify and NimBLECharacteristic::indicate now return a bool, true = success.
  • Make the services changed notification more accurate by waiting until the changes have taken effect and the server re-started before indicating the change.

* General code cleanup
* `NimBLEServerCallbacks::onMTUChanged` renamed to `NimBLEServerCallbacks::onMTUChange` to be consistent with the client callback.
* `NimBLEServer::getPeerIDInfo` renamed to `NimBLEServer::getPeerInfoByHandle` to better describe it's use.
* Use a std::array to store client connection handles instead of std::vector to reduce memory allocation.
* `NimBLEServer::disconnect` now returns `bool`, true = success,  instead of `int` to be consistent with the rest of the library.
Removes tracking of client characteristic subscription status from `NimBLEServer` and `NimBLECharacteristic` and instead uses
the functions and tracking in the host stack.

* `NimBLECharacteristic::notify` and `NimBLECharacteristic::indicate` now return a `bool`, true = success.
This makes the services changes notification more accurate by waiting until the changes have taken effect and the server re-started before indicating the change.
@h2zero h2zero merged commit cadacbc into master Nov 29, 2024
31 checks passed
@h2zero h2zero deleted the refactor-server branch November 29, 2024 00:17
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

Successfully merging this pull request may close these issues.

1 participant