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

merge branch develop (v2.4.0) #161

Merged
merged 84 commits into from
Jan 10, 2016
Merged

merge branch develop (v2.4.0) #161

merged 84 commits into from
Jan 10, 2016

Conversation

pan-
Copy link
Member

@pan- pan- commented Jan 10, 2016

No description provided.

pan- and others added 30 commits November 10, 2015 17:07
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
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.
Andres Amaya Garcia and others added 28 commits December 18, 2015 16:27
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
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.
pan- added a commit that referenced this pull request Jan 10, 2016
merge branch develop (v2.4.0)
@pan- pan- merged commit 17e3736 into master Jan 10, 2016
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.

2 participants