Mistake on this page?
Report an issue in GitHub or email us
CharacteristicDescriptorDiscovery.h
1 /* mbed Microcontroller Library
2  * Copyright (c) 2006-2015 ARM Limited
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef MBED_CHARACTERISTIC_DESCRIPTOR_DISCOVERY_H__
18 #define MBED_CHARACTERISTIC_DESCRIPTOR_DISCOVERY_H__
19 
21 
22 class DiscoveredCharacteristic; // forward declaration
23 class DiscoveredCharacteristicDescriptor; // forward declaration
24 
25 /**
26  * @addtogroup ble
27  * @{
28  * @addtogroup gatt
29  * @{
30  */
31 
32 /**
33  * Definitions of events and event handlers that the characteristic descriptor
34  * discovery procedure uses.
35  *
36  * This class acts like a namespace for characteristic descriptor discovery
37  * types. Like ServiceDiscovery, it provides callbacks and callbacks parameters
38  * types related to the characteristic descriptor discovery process, but contrary
39  * to the ServiceDiscovery class, it does not force the porter to use a specific
40  * interface for the characteristic descriptor discovery process.
41  */
43 public:
44  /**
45  * Characteristic descriptor discovered event.
46  *
47  * When a characteristic descriptor has been discovered, the callback
48  * registered for the discovery operation through
49  * GattClient::discoverCharacteristicDescriptors or
50  * DiscoveredCharacteristic::discoverDescriptors is called with an instance
51  * of this type.
52  *
53  * The values reported to the user are the descriptor discovered and the
54  * characteristic owning that descriptor.
55  *
56  * @see GattClient::discoverCharacteristicDescriptors
57  * DiscoveredCharacteristic::discoverDescriptors
58  */
60  /**
61  * Characteristic owning the descriptor discovered.
62  */
64 
65  /**
66  * Characteristic descriptor discovered.
67  */
69  };
70 
71  /**
72  * Characteristic descriptor discovery ended event.
73  *
74  * When the characteristic descriptor discovery process ends, the
75  * termination callback registered for the discovery operation through
76  * GattClient::discoverCharacteristicDescriptors or
77  * DiscoveredCharacteristic::discoverDescriptors will be called with an
78  * instance of this type.
79  *
80  * @see GattClient::discoverCharacteristicDescriptors
81  * DiscoveredCharacteristic::discoverDescriptors
82  */
84  /**
85  * Characteristic for which descriptors has been discovered.
86  */
88 
89  /**
90  * Status of the discovery operation.
91  */
93 
94  /**
95  * Error code associated with the status if any.
96  */
97  uint8_t error_code;
98  };
99 
100  /**
101  * Characteristic descriptor discovered event handler.
102  *
103  * As a parameter, it expects a pointer to a DiscoveryCallbackParams_t instance.
104  *
105  * @note The object passed in parameter will remain valid for the lifetime
106  * of the callback. The BLE_API eventing framework owns memory for this
107  * object. The application can safely make a persistent shallow-copy of
108  * this object to work with the service beyond the callback.
109  *
110  * @see DiscoveryCallbackParams_t
111  * GattClient::discoverCharacteristicDescriptors
112  * DiscoveredCharacteristic::discoverDescriptors
113  */
116 
117  /**
118  * Handler of Characteristic descriptor discovery ended event.
119  *
120  * As a parameter, it expects a pointer to a TerminationCallbackParams_t instance.
121  *
122  * @note The object passed in parameter will remain valid for the lifetime
123  * of the callback. The BLE_API eventing framework owns the memory for this
124  * object. The application can safely make a persistent shallow-copy of
125  * this object to work with the service beyond the callback.
126  *
127  * @see TerminationCallbackParams_t
128  * GattClient::discoverCharacteristicDescriptors
129  * DiscoveredCharacteristic::discoverDescriptors
130  */
133 };
134 
135 /**
136  * @}
137  * @}
138  */
139 
140 #endif // ifndef MBED_CHARACTERISTIC_DESCRIPTOR_DISCOVERY_H__
Function like object adapter over freestanding and member functions.
Representation of a characteristic discovered.
const DiscoveredCharacteristicDescriptor & descriptor
Characteristic descriptor discovered.
Representation of a characteristic descriptor discovered.
uint8_t error_code
Error code associated with the status if any.
const DiscoveredCharacteristic & characteristic
Characteristic for which descriptors has been discovered.
const DiscoveredCharacteristic & characteristic
Characteristic owning the descriptor discovered.
FunctionPointerWithContext< const TerminationCallbackParams_t * > TerminationCallback_t
Handler of Characteristic descriptor discovery ended event.
FunctionPointerWithContext< const DiscoveryCallbackParams_t * > DiscoveryCallback_t
Characteristic descriptor discovered event handler.
Definitions of events and event handlers that the characteristic descriptor discovery procedure uses...
ble_error_t
Error codes for the BLE API.
Definition: blecommon.h:147
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.