Commit graph

997 commits

Author SHA1 Message Date
Andres Amaya Garcia
0781293bda Add onShutdown to register callbacks
Add an onShutdown() function to Gap, GattClient, GattServer and
SecurityManager. The callbacks are added to a private callback chain in each of
the instances. The callbacks will be executed inside each object's reset()
function BEFORE the state of the instance is cleared. The developers of the
platform-specific implementation must call the parent class' reset() function
for the callbacks to be executed.

Finally, an onShutdown() function that returns the shutdown callchain is added
to allow detaching callbacks.
2015-12-16 09:44:52 +00:00
Rohit Grover
3c15a7dfcc minor re-organization 2015-12-16 09:09:38 +00:00
Rohit Grover
f30fe6bcda use an anonymous enum instead 2015-12-16 09:07:57 +00:00
Rohit Grover
2f527dbb7e transparenly support existing applications which may have used Gap::ADDR_TYPE_*. 2015-12-16 08:54:09 +00:00
Rohit Grover
022c37ce31 white space diffs 2015-12-16 07:00:50 +00:00
Rohit Grover
8b513a7ba2 add an interdependency to "ble-nrf51822": "^2.2.8" 2015-12-16 06:51:35 +00:00
Rohit Grover
1e448f8757 Merge pull request #141 from andresag01/develop
Improve API to facilitate full shutdown procedure
2015-12-16 06:46:01 +00:00
Rohit Grover
b8fde92814 update dependency for ble-nrf51822 to have version >=2.2.6 2015-12-15 13:06:52 +00:00
Rohit Grover
87ab48899d version v2.1.15 2015-12-15 13:04:25 +00:00
Rohit Grover
95541a1663 Merge pull request #142 from rgrover/develop
Extract Adress related types from Gap.h into BLEProtocol.h
2015-12-15 12:59:45 +00:00
Rohit Grover
1cab4222d5 replace uses of GapAddress_t with BLEProtocol::Address_t 2015-12-15 11:59:41 +00:00
Rohit Grover
4774e2cd84 Add an alias for BLEProtocol::AddressType::Type 2015-12-15 08:50:47 +00:00
Vincent Coubard
4dda9bf1b8 Fix function names:
- isCharacteristicDescriptorsDiscoveryActive => isCharacteristicDescriptorDiscoveryActive
  - terminateCharacteristicDescriptorsDiscovery =>terminateCharacteristicDescriptorDiscovery
2015-12-15 07:57:47 +00:00
Rohit Grover
05c42ffc31 had meant to use namespace for BLEProtocol instead of struct 2015-12-14 17:08:07 +00:00
Rohit Grover
17d6e5fe80 Extract Adress related types from Gap.h into BLEProtocol.h 2015-12-14 16:59:21 +00:00
Andres Amaya Garcia
cd809e2a2c Modify shutdown API and functionality
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.
2015-12-14 15:34:38 +00:00
Vincent Coubard
87d8941374 Remove setLastHandle member function, it does not belong here 2015-12-14 15:03:40 +00:00
Vincent Coubard
726a144eeb Fix whitespace and improve documentation of Descriptors discovery 2015-12-14 14:48:38 +00:00
Vincent Coubard
a56a875bbc Improve cross references for DiscoveredCharacteristicDescriptor docs 2015-12-14 14:33:31 +00:00
Vincent Coubard
e877d0b7c7 Improve and correct documentation of DiscoveredCharacteristic 2015-12-14 14:31:08 +00:00
Vincent Coubard
d7700bccb8 Improve documentation of DiscoveredCharacteristicDescriptor 2015-12-14 14:04:05 +00:00
Vincent Coubard
bb9cb988a2 Improve consistency of accessor naming 2015-12-14 13:44:30 +00:00
Vincent Coubard
6b6cf34b1d Improve description of class DiscoveredCharacteristicDescriptor 2015-12-14 13:40:23 +00:00
Vincent Coubard
e9d0a85643 Improve description of class DiscoveredCharacteristic 2015-12-14 13:39:28 +00:00
Vincent Coubard
325f52c7aa Add documentation for DiscoveredCharacteristic 2015-12-14 12:04:04 +00:00
Vincent Coubard
933f134872 Add documentation for CharacteristicDescriptorDiscovery 2015-12-14 12:03:45 +00:00
Vincent Coubard
a7b7118bd7 Merge branch 'develop' of https://github.com/ARMmbed/ble into descriptorDiscovery 2015-12-14 09:13:28 +00:00
Andres Amaya Garcia
b817cf3e57 Improve API to facilitate full shutdown procedure
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.
2015-12-11 18:14:14 +00:00
Rohit Grover
e513c189ec version v2.1.14 2015-12-11 09:38:20 +00:00
Rohit Grover
4274817f7d changing dependency for nucleo-idb0xa1 to use versioning 2015-12-11 09:38:12 +00:00
Rohit Grover
6c13ded25b version v2.1.13 2015-12-11 09:29:34 +00:00
Rohit Grover
21447dcf8a version v2.1.12 2015-12-11 09:27:59 +00:00
Rohit Grover
5eca22cd68 Merge pull request #140 from marcuschangarm/bond
Added SecurityManager::setLinkSecurity call for elevating security settings on a particular connection.
2015-12-11 09:13:43 +00:00
Joe Finney
7c1aa005d3 microbit: Added support for explicit notification
Introduce abality to explicitly perform a notify/indicate opertion on a characteristic.
This brings benefits of a reduce RAM footprint for storing GattCharacterisitics.

n.b. temporary measure until ARM mbed integrate more generic optimisations.
2015-12-10 16:52:41 +00:00
Joe Finney
cfbc9f3fad microbit: Disabled default instantiation of DFUService.
micro:bit operates its own custom service for this purpose.
2015-12-10 16:44:19 +00:00
Marcus Chang
372e20367c Added SecurityManager::setLinkSecurity call for elevating security settings on a particular connection. 2015-12-10 15:02:05 +00:00
Rohit Grover
d363d7ee8c Merge branch 'develop' 2015-12-10 09:12:45 +00:00
Rohit Grover
f3dd147b2b Release 2.1.11
==============

* Added byte ordering parameter to UUID construction for long UUIDs. The
  default remains as Big-Endian.

* Add a doxyfile that warns for undocumented elements.

* Minor fixes for some documentation.
2015-12-10 09:11:25 +00:00
Rohit Grover
12d317cc9f version v2.1.10 2015-12-07 15:45:06 +00:00
Rohit Grover
e8cf2c3999 Merge branch 'marcuschangarm-endian' into develop 2015-12-07 15:44:52 +00:00
Rohit Grover
694130ff18 use std::reverse_copy to switch byte-order 2015-12-07 15:44:28 +00:00
Rohit Grover
9ba091134d rename UUID::BitOrder_t to ByteOrder 2015-12-07 15:36:46 +00:00
Rohit Grover
9c648dc3c6 add comment header for UUID::char2int 2015-12-07 15:30:35 +00:00
Rohit Grover
aac3181548 Merge branch 'endian' of https://github.com/marcuschangarm/ble into marcuschangarm-endian 2015-12-07 15:26:04 +00:00
Marcus Chang
01eaeeeea2 Added bit ordering parameter to UUID construction. 2015-12-07 13:43:44 +00:00
Rohit Grover
ce4551ba6b remove an incorrect comment block 2015-12-04 13:14:01 +00:00
Rohit Grover
605519dc6e version v2.1.9 2015-12-04 13:07:06 +00:00
Rohit Grover
ae05cd7950 merge the options from Doxyfile into ble.doxyfile 2015-12-04 13:06:48 +00:00
Rohit Grover
1922b9a19f Merge pull request #134 from andresag01/develop
Fix documentation for advertising interval getters
2015-12-04 11:00:20 +00:00
Andres Amaya Garcia
d9faf10036 Fix documentation for getMinAdvertisingInterval and getMinNonConnectableAdvertisingInterval 2015-12-04 10:14:48 +00:00