Lancaster University's fork of the mbed BLE API. Lives on github, https://github.com/lancaster-university/BLE_API

Dependents:   microbit-dal microbit-dal microbit-ble-open microbit-dal ... more

Fork of BLE_API by Bluetooth Low Energy

Committer:
vcoubard
Date:
Mon Jan 11 08:51:39 2016 +0000
Revision:
1068:704b281b4ba0
Parent:
1067:350b4b04eeda
Child:
1069:ec5549427b4a
Synchronized with git rev bb9cb988
Author: Vincent Coubard
Improve consistency of accessor naming

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vcoubard 1044:15e4bd5951ac 1 /* mbed Microcontroller Library
vcoubard 1044:15e4bd5951ac 2 * Copyright (c) 2006-2013 ARM Limited
vcoubard 1044:15e4bd5951ac 3 *
vcoubard 1044:15e4bd5951ac 4 * Licensed under the Apache License, Version 2.0 (the "License");
vcoubard 1044:15e4bd5951ac 5 * you may not use this file except in compliance with the License.
vcoubard 1044:15e4bd5951ac 6 * You may obtain a copy of the License at
vcoubard 1044:15e4bd5951ac 7 *
vcoubard 1044:15e4bd5951ac 8 * http://www.apache.org/licenses/LICENSE-2.0
vcoubard 1044:15e4bd5951ac 9 *
vcoubard 1044:15e4bd5951ac 10 * Unless required by applicable law or agreed to in writing, software
vcoubard 1044:15e4bd5951ac 11 * distributed under the License is distributed on an "AS IS" BASIS,
vcoubard 1044:15e4bd5951ac 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
vcoubard 1044:15e4bd5951ac 13 * See the License for the specific language governing permissions and
vcoubard 1044:15e4bd5951ac 14 * limitations under the License.
vcoubard 1044:15e4bd5951ac 15 */
vcoubard 1044:15e4bd5951ac 16
vcoubard 1044:15e4bd5951ac 17 #ifndef __DISCOVERED_CHARACTERISTIC_DESCRIPTOR_H__
vcoubard 1044:15e4bd5951ac 18 #define __DISCOVERED_CHARACTERISTIC_DESCRIPTOR_H__
vcoubard 1044:15e4bd5951ac 19
vcoubard 1044:15e4bd5951ac 20 #include "UUID.h"
vcoubard 1044:15e4bd5951ac 21 #include "Gap.h"
vcoubard 1044:15e4bd5951ac 22 #include "GattAttribute.h"
vcoubard 1044:15e4bd5951ac 23 #include "GattClient.h"
vcoubard 1044:15e4bd5951ac 24 #include "CharacteristicDescriptorDiscovery.h"
vcoubard 1044:15e4bd5951ac 25
vcoubard 1044:15e4bd5951ac 26 /**
vcoubard 1067:350b4b04eeda 27 *
vcoubard 1044:15e4bd5951ac 28 */
vcoubard 1044:15e4bd5951ac 29 class DiscoveredCharacteristicDescriptor {
vcoubard 1044:15e4bd5951ac 30
vcoubard 1044:15e4bd5951ac 31 public:
vcoubard 1044:15e4bd5951ac 32 DiscoveredCharacteristicDescriptor(
vcoubard 1067:350b4b04eeda 33 GattClient* client, Gap::Handle_t connectionHandle, GattAttribute::Handle_t gattHandle, const UUID& uuid) :
vcoubard 1044:15e4bd5951ac 34 _client(client), _connectionHandle(connectionHandle), _uuid(uuid), _gattHandle(gattHandle) {
vcoubard 1044:15e4bd5951ac 35
vcoubard 1044:15e4bd5951ac 36 }
vcoubard 1044:15e4bd5951ac 37
vcoubard 1068:704b281b4ba0 38 GattClient* getGattClient() {
vcoubard 1044:15e4bd5951ac 39 return _client;
vcoubard 1044:15e4bd5951ac 40 }
vcoubard 1044:15e4bd5951ac 41
vcoubard 1068:704b281b4ba0 42 const GattClient* getGattClient() const {
vcoubard 1044:15e4bd5951ac 43 return _client;
vcoubard 1044:15e4bd5951ac 44 }
vcoubard 1044:15e4bd5951ac 45
vcoubard 1068:704b281b4ba0 46 Gap::Handle_t getConnectionHandle() const {
vcoubard 1044:15e4bd5951ac 47 return _connectionHandle;
vcoubard 1044:15e4bd5951ac 48 }
vcoubard 1044:15e4bd5951ac 49
vcoubard 1068:704b281b4ba0 50 const UUID& getUUID(void) const {
vcoubard 1044:15e4bd5951ac 51 return _uuid;
vcoubard 1044:15e4bd5951ac 52 }
vcoubard 1044:15e4bd5951ac 53
vcoubard 1068:704b281b4ba0 54 GattAttribute::Handle_t getAttributeHandle() const {
vcoubard 1044:15e4bd5951ac 55 return _gattHandle;
vcoubard 1044:15e4bd5951ac 56 }
vcoubard 1044:15e4bd5951ac 57
vcoubard 1044:15e4bd5951ac 58 private:
vcoubard 1044:15e4bd5951ac 59 GattClient *_client;
vcoubard 1044:15e4bd5951ac 60 Gap::Handle_t _connectionHandle;
vcoubard 1044:15e4bd5951ac 61 UUID _uuid;
vcoubard 1044:15e4bd5951ac 62 GattAttribute::Handle_t _gattHandle;
vcoubard 1044:15e4bd5951ac 63 };
vcoubard 1044:15e4bd5951ac 64
vcoubard 1044:15e4bd5951ac 65 #endif /*__DISCOVERED_CHARACTERISTIC_DESCRIPTOR_H__*/