prova invio BLE
Dependents: BLE_HeartRate_IDB04A1
Fork of BLE_API by
ble/CharacteristicDescriptorDiscovery.h@1063:187f9929cb60, 2016-01-11 (annotated)
- Committer:
- vcoubard
- Date:
- Mon Jan 11 08:51:37 2016 +0000
- Revision:
- 1063:187f9929cb60
- Child:
- 1064:17f8e6339e57
Synchronized with git rev a7b7118b
Author: Vincent Coubard
Merge branch 'develop' of https://github.com/ARMmbed/ble into descriptorDiscovery
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
vcoubard | 1063:187f9929cb60 | 1 | /* mbed Microcontroller Library |
vcoubard | 1063:187f9929cb60 | 2 | * Copyright (c) 2006-2015 ARM Limited |
vcoubard | 1063:187f9929cb60 | 3 | * |
vcoubard | 1063:187f9929cb60 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
vcoubard | 1063:187f9929cb60 | 5 | * you may not use this file except in compliance with the License. |
vcoubard | 1063:187f9929cb60 | 6 | * You may obtain a copy of the License at |
vcoubard | 1063:187f9929cb60 | 7 | * |
vcoubard | 1063:187f9929cb60 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
vcoubard | 1063:187f9929cb60 | 9 | * |
vcoubard | 1063:187f9929cb60 | 10 | * Unless required by applicable law or agreed to in writing, software |
vcoubard | 1063:187f9929cb60 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
vcoubard | 1063:187f9929cb60 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
vcoubard | 1063:187f9929cb60 | 13 | * See the License for the specific language governing permissions and |
vcoubard | 1063:187f9929cb60 | 14 | * limitations under the License. |
vcoubard | 1063:187f9929cb60 | 15 | */ |
vcoubard | 1063:187f9929cb60 | 16 | |
vcoubard | 1063:187f9929cb60 | 17 | #ifndef __CHARACTERISTIC_DESCRIPTOR_DISCOVERY_H__ |
vcoubard | 1063:187f9929cb60 | 18 | #define __CHARACTERISTIC_DESCRIPTOR_DISCOVERY_H__ |
vcoubard | 1063:187f9929cb60 | 19 | |
vcoubard | 1063:187f9929cb60 | 20 | #include "FunctionPointerWithContext.h" |
vcoubard | 1063:187f9929cb60 | 21 | |
vcoubard | 1063:187f9929cb60 | 22 | class DiscoveredCharacteristic; |
vcoubard | 1063:187f9929cb60 | 23 | class DiscoveredCharacteristicDescriptor; |
vcoubard | 1063:187f9929cb60 | 24 | |
vcoubard | 1063:187f9929cb60 | 25 | class CharacteristicDescriptorDiscovery { |
vcoubard | 1063:187f9929cb60 | 26 | public: |
vcoubard | 1063:187f9929cb60 | 27 | /* |
vcoubard | 1063:187f9929cb60 | 28 | * Exposed application callback types. |
vcoubard | 1063:187f9929cb60 | 29 | */ |
vcoubard | 1063:187f9929cb60 | 30 | struct DiscoveryCallbackParams_t { |
vcoubard | 1063:187f9929cb60 | 31 | const DiscoveredCharacteristic& characteristic; |
vcoubard | 1063:187f9929cb60 | 32 | const DiscoveredCharacteristicDescriptor& descriptor; |
vcoubard | 1063:187f9929cb60 | 33 | }; |
vcoubard | 1063:187f9929cb60 | 34 | |
vcoubard | 1063:187f9929cb60 | 35 | struct TerminationCallbackParams_t { |
vcoubard | 1063:187f9929cb60 | 36 | const DiscoveredCharacteristic& characteristic; |
vcoubard | 1063:187f9929cb60 | 37 | ble_error_t status; |
vcoubard | 1063:187f9929cb60 | 38 | }; |
vcoubard | 1063:187f9929cb60 | 39 | |
vcoubard | 1063:187f9929cb60 | 40 | /** |
vcoubard | 1063:187f9929cb60 | 41 | * Callback type for when a matching characteristic descriptor is found during |
vcoubard | 1063:187f9929cb60 | 42 | * characteristic descriptor discovery. The receiving function is passed in a |
vcoubard | 1063:187f9929cb60 | 43 | * pointer to a DiscoveryCallbackParams_t object which will remain |
vcoubard | 1063:187f9929cb60 | 44 | * valid for the lifetime of the callback. Memory for this object is owned by |
vcoubard | 1063:187f9929cb60 | 45 | * the BLE_API eventing framework. The application can safely make a persistent |
vcoubard | 1063:187f9929cb60 | 46 | * shallow-copy of this object in order to work with the service beyond the |
vcoubard | 1063:187f9929cb60 | 47 | * callback. |
vcoubard | 1063:187f9929cb60 | 48 | */ |
vcoubard | 1063:187f9929cb60 | 49 | typedef FunctionPointerWithContext<const DiscoveryCallbackParams_t*> DiscoveryCallback_t; |
vcoubard | 1063:187f9929cb60 | 50 | |
vcoubard | 1063:187f9929cb60 | 51 | /** |
vcoubard | 1063:187f9929cb60 | 52 | * Callback type for when characteristic descriptor discovery terminates. |
vcoubard | 1063:187f9929cb60 | 53 | */ |
vcoubard | 1063:187f9929cb60 | 54 | typedef FunctionPointerWithContext<const TerminationCallbackParams_t*> TerminationCallback_t; |
vcoubard | 1063:187f9929cb60 | 55 | }; |
vcoubard | 1063:187f9929cb60 | 56 | |
vcoubard | 1063:187f9929cb60 | 57 | #endif // ifndef __CHARACTERISTIC_DESCRIPTOR_DISCOVERY_H__ |