add "LE Device Address" 0x1B to advertising data types
Fork of BLE_API by
Revision 1044:15e4bd5951ac, committed 2016-01-11
- Comitter:
- vcoubard
- Date:
- Mon Jan 11 08:51:26 2016 +0000
- Parent:
- 1043:18094711b012
- Child:
- 1045:b9d15970040f
- Commit message:
- Synchronized with git rev c9261773
Author: Vincent Coubard
Improve interface for CharacteristicDescriptorDiscovery:
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.
Changed in this revision
ble/DiscoveredCharacteristicDescriptor.h | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ble/DiscoveredCharacteristicDescriptor.h Mon Jan 11 08:51:26 2016 +0000 @@ -0,0 +1,66 @@ +/* mbed Microcontroller Library + * Copyright (c) 2006-2013 ARM Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __DISCOVERED_CHARACTERISTIC_DESCRIPTOR_H__ +#define __DISCOVERED_CHARACTERISTIC_DESCRIPTOR_H__ + +#include "UUID.h" +#include "Gap.h" +#include "GattAttribute.h" +#include "GattClient.h" +#include "CharacteristicDescriptorDiscovery.h" + + +/** + * + */ +class DiscoveredCharacteristicDescriptor { + +public: + DiscoveredCharacteristicDescriptor( + GattClient* client, Gap::Handle_t connectionHandle, GattAttribute::Handle_t gattHandle, const UUID& uuid) : + _client(client), _connectionHandle(connectionHandle), _uuid(uuid), _gattHandle(gattHandle) { + + } + + GattClient* client() { + return _client; + } + + const GattClient* client() const { + return _client; + } + + Gap::Handle_t connectionHandle() const { + return _connectionHandle; + } + + const UUID& uuid(void) const { + return _uuid; + } + + GattAttribute::Handle_t gattHandle() const { + return _gattHandle; + } + +private: + GattClient *_client; + Gap::Handle_t _connectionHandle; + UUID _uuid; + GattAttribute::Handle_t _gattHandle; +}; + +#endif /*__DISCOVERED_CHARACTERISTIC_DESCRIPTOR_H__*/ \ No newline at end of file