-
Notifications
You must be signed in to change notification settings - Fork 75
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
merge branch develop (v2.4.0) #161
Merged
Conversation
This file contains 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
FunctionPointerWithContext<ContextType> instances.
CharacteristicDescriptorDiscovery::DiscoveryCallback_t take a DiscoveryCallBackParam instead of just the discovered descriptor DiscoveredCharacteristicDescriptor is now a plain type. DiscoveredCharacteristic support operator== DiscoveredCharacteristic::Properties-t support operator== DiscoveredCharacteristic now include the last Gatt handle of this characteristic FunctionPointer with context call() is now const, in order to mirror std::function and call a const FunctionPointerWithContext FunctionPointerWithContext support operator == GattClient support basic characteristic descriptor discovery operations The implementation of DiscoveredCharacteristic::discoverDescriptors is now fullfiled.
- all member of CharacteristicDescriptorDiscovery::DiscoveryCallbackParams_t are now const by default - CharacteristicDescriptorDiscovery::TerminationCallbackParams_t now accept a status parameter which indicate if the operation ends properly or not - Remove DiscoveredCharacteristicDescriptor declaration from DiscoveredCharacteristic.h file - Add comparison operation to DiscoveredCharacteristic::Properties_t type - Add lastHandle member to DiscoveredCharacteristic - Add equality operator to DiscoveredCharacteristic - make FunctionPointerWithContext call operation const, so that it mirror std::function and allow to call this kind of objects to be called when they are passed by const reference - Add primitive operations to GattClient for dicovering characteristic descriptors - Fullfil DiscoveredCharacteristic::discoverDescriptors function implementation
Fix operator== in DiscoveredCharacteristic. add DiscoveredOperator::operator!= add a function to set the last handle of a DiscoveredCharacteristic on the fly
mbed os FunctionPointer implementation does not allow, yet, to use a const member function This kind of workaround is needed to use FunctionPointerWithContext class in minar
…ttings on a particular connection.
Added SecurityManager::setLinkSecurity call for elevating security settings on a particular connection.
The BLE API exposes a shutdown() function in BLE.h. This function is meant to be overwridden by platform-specific sub-classes to clear all GAP and GATT state. However, from the platform-specific implementation it is dificult to achieve this because the Gap, GattClient, GattServer and SecurityManager components of the API do not expose any functionality to shutdown. This commit introduces the following changes: * Add a static member pointer to Gap, GattClient, GattServer and SecurityManager that is used to keep track of the initialized objects. * Add a function member cleanup() to Gap, GattClient, GattServer and SecurityManager to allow easy reset of the instance's state. This function is meant to be overriden and called from the derived classes to fully clear the state of the BLE API and the platform-specific implementation. * Add a static member function shutdown() to Gap, GattClient, GattServer and SecurityManager. This function shall be called from the shutdown() overriding BLE::shutdown() for Gap, GattClient, GattServer and SecurityManager that will in-turn clear the state of each of the components. **NOTE:** Platform-specific implementations of this API must be modified to this changes into account.
Modify the shutdown API to remove the static shutdown function in Gap, SecurityManager, GattClient and GattServer. Futhermore, remove the static references to Gap, SecurityManager, GattClient and GattServer objects inside their own classes. The cleanup method is renamed to `reset()` and made public. Finally, additional functionality is added to the reset implementation in Gap.
Add an additional error code to the ble_error_t enum to describe a failure state caused by the internal platform-specific stack. This state was not described by any of the existing error codes.
Add BLE_ERROR_INTERNAL_STACK_FAILURE error code
Clean up code in DiscoveredCharacteristic.cpp
Accumulate and update advertising payload now differ in their implementations. Accumulate updates the previous value, if it is UUID then the previously added values are kept and the new one is simple appended. In contrast, update replaces the previous value in all cases.
Modify functions that manipulate adv payload
for change from Gap:AddressType_t to BLEProtocol::AddressType_t
Hotfix for backward compatibility
Characteristic descriptor discovery
This is the finilised experimental API that introduces support for whitelisting. The changes are focused in Gap and introduces the following functions, that are expected to be implemented by each of the vendor specific glue code (e.g. ble-nrf51822 module): - getMaxWhitelistSize(): Get the maximum whitelist size, this can be set by using a yotta config definition. - getWhitelist(): Gets a copy of the internal whitelist containing BLE addresses. - setWhitelist(): Replace the whitelist with new addresses. - setAdvertisingPolicyMode(), setScanningPolicyMode() and setInitiatorPolicyMode(): Functions used to set the relevan policy filter mode as described in the BLE Specification v4.2 Vol 6, Part B, Section 4.2.1. - getAdvertisingPolicyMode(), getScanningPolicyMode() and getInitiatorPolicyMode(): Functions used to get the relevan policy filter mode as described in the BLE Specification v4.2 Vol 6, Part B, Section 4.2.1. The following enumerators were added to Gap to describe the desired policy filter mode: - AdvertisingPolicyMode_t - ScanningPolicyMode_t - InitiatorPolicyMode_t Finally, the following typedef was added to provide a view of the underlying implementation's internal whitelist: - Whitelist_t **NOTE:** Clearly, these API additions require changes to the underlying implementation!
Add an empty constructor to BLEProtocol::Address_t and fixed comments with regards to BLEProtocol::Address_t.
Whitelisting experimental API
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.
No description provided.