InPlay API
in_ble_gatt_evt.h
1 
13 #ifndef IN_BLE_GATT_EVT_H
14 #define IN_BLE_GATT_EVT_H
15 
16 #include "./ble/in_ble_evt.h"
17 
27 /*
28  * Enumerations
29  ****************************************************************************************
30  */
31 
33 enum ble_gatt_evt{
35  GATT_EVT_MTU_XCHG_IND = GATT_EVT_CODE +1,
36 
38  GATT_EVT_DISC_SVC,
39 
41  GATT_EVT_DISC_INCL_SVC,
42 
44  GATT_EVT_DISC_CHAR,
45 
47  GATT_EVT_DISC_CHAR_DESC,
48 
50  GATT_EVT_NTF,
51 
53  GATT_EVT_IND,
54 
56  GATT_EVT_CCC_CHG_IND,
57 
59  GATT_EVT_RD_REQ,
60 
62  GATT_EVT_WRT_REQ,
63 
65  GATT_EVT_ATT_INFO_REQ,
66 
68  GATT_EVT_SDP_SVC,
69 
71  GATT_EVT_RD_RSP_IND,
72 };
73 
75 typedef struct
76 {
78  uint8_t conidx;
80  uint16_t mtu;
82 
83 
85 typedef struct
86 {
88  uint8_t conidx;
90  uint16_t start_hdl;
92  uint16_t end_hdl;
94  uint8_t uuid_len;
96  uint8_t uuid[];
98 
100 typedef struct
101 {
103  uint8_t conidx;
105  uint16_t attr_hdl;
107  uint16_t start_hdl;
109  uint16_t end_hdl;
111  uint8_t uuid_len;
113  uint8_t uuid[];
115 
117 typedef struct
118 {
120  uint8_t conidx;
122  uint16_t attr_hdl;
124  uint16_t pointer_hdl;
126  uint8_t prop;
128  uint8_t uuid_len;
130  uint8_t uuid[];
132 
134 typedef struct
135 {
137  uint8_t conidx;
139  uint16_t attr_hdl;
141  uint8_t uuid_len;
143  uint8_t uuid[];
145 
147 typedef struct
148 {
150  uint8_t conidx;
152  uint16_t length;
154  uint16_t handle;
156  uint8_t value[];
158 
160 typedef struct
161 {
163  uint8_t conidx;
165  uint16_t length;
167  uint16_t handle;
169  uint8_t value[];
171 
173 typedef struct
174 {
176  uint8_t conidx;
179  uint16_t ind_cfg;
181 
182 
184 typedef struct
185 {
187  uint8_t conidx;
189  uint16_t handle;
191 
193 typedef struct
194 {
196  uint8_t conidx;
198  uint16_t handle;
200  uint16_t offset;
202  uint16_t length;
204  uint8_t value[];
206 
208 typedef struct
209 {
211  uint8_t conidx;
213  uint16_t handle;
215 
217 typedef struct
218 {
220  uint8_t att_type;
222  uint8_t attr_hdl;
224  uint8_t prop;
226  uint16_t handle;
228 
229 
231 typedef struct
232 {
234  uint8_t att_type;
236  uint8_t attr_hdl;
238  uint8_t uuid_len;
240  uint8_t uuid[BLE_UUID_128_LEN];
242  uint16_t start_hdl;
244  uint16_t end_hdl;
246 
247 
249 typedef struct
250 {
252  uint8_t att_type;
254  uint8_t attr_hdl;
256  uint8_t uuid_len;
258  uint8_t uuid[BLE_UUID_128_LEN];
259 } sdp_att_t;
260 
262 typedef union
263 {
265  uint8_t att_type;
266 
274 
275 
277 typedef struct
278 {
280  uint8_t conidx;
282  uint8_t uuid_len;
284  uint8_t uuid[BLE_UUID_128_LEN];
286  uint16_t start_hdl;
288  uint16_t end_hdl;
290  uint16_t nb_info;
294 
295 
297 typedef struct
298 {
300  uint8_t conidx;
302  uint16_t handle;
304  uint16_t offset;
306  uint16_t length;
308  uint8_t value[];
310 
312 
313 #endif
314 
uint8_t uuid_len
UUID length.
Definition: in_ble_gatt_evt.h:141
Discover Service Include indication Structure.
Definition: in_ble_gatt_evt.h:100
uint16_t attr_hdl
element handle
Definition: in_ble_gatt_evt.h:105
Attribute information.
Definition: in_ble_gatt_evt.h:262
uint8_t conidx
Connection index.
Definition: in_ble_gatt_evt.h:78
uint16_t nb_info
number of attribute information present in the service
Definition: in_ble_gatt_evt.h:290
sdp_att_t att
Information about attribute.
Definition: in_ble_gatt_evt.h:272
Service Discovery indicate that a service has been found.
Definition: in_ble_gatt_evt.h:277
uint8_t conidx
Connection index.
Definition: in_ble_gatt_evt.h:211
uint16_t end_hdl
end handle
Definition: in_ble_gatt_evt.h:109
uint8_t conidx
Connection index.
Definition: in_ble_gatt_evt.h:163
sdp_att_char_t att_char
Information about attribute characteristic.
Definition: in_ble_gatt_evt.h:268
uint8_t uuid_len
Included service UUID Length.
Definition: in_ble_gatt_evt.h:238
uint16_t handle
Handle of the attribute that has to be read.
Definition: in_ble_gatt_evt.h:189
uint8_t uuid_len
UUID length.
Definition: in_ble_gatt_evt.h:94
uint8_t conidx
Connection index.
Definition: in_ble_gatt_evt.h:137
Information about attribute.
Definition: in_ble_gatt_evt.h:249
uint16_t start_hdl
start handle
Definition: in_ble_gatt_evt.h:107
uint8_t conidx
Connection index.
Definition: in_ble_gatt_evt.h:150
uint8_t att_type
Attribute Type.
Definition: in_ble_gatt_evt.h:234
uint16_t start_hdl
Service start handle.
Definition: in_ble_gatt_evt.h:286
Request Attribute info to upper layer - could be trigger during prepare write.
Definition: in_ble_gatt_evt.h:208
uint8_t prop
Value property.
Definition: in_ble_gatt_evt.h:224
Client Characteristic Configuration descriptor written by peer device indication. ...
Definition: in_ble_gatt_evt.h:173
uint16_t length
Data length to be written.
Definition: in_ble_gatt_evt.h:202
sdp_include_svc_t inc_svc
Information about included service.
Definition: in_ble_gatt_evt.h:270
uint8_t att_type
Attribute Type.
Definition: in_ble_gatt_evt.h:252
Information about included service.
Definition: in_ble_gatt_evt.h:231
uint16_t handle
Value Handle.
Definition: in_ble_gatt_evt.h:226
uint16_t end_hdl
Included service End Handle.
Definition: in_ble_gatt_evt.h:244
Inform that a write request by peer device.
Definition: in_ble_gatt_evt.h:193
uint8_t conidx
Connection index.
Definition: in_ble_gatt_evt.h:196
uint8_t att_type
Attribute Type.
Definition: in_ble_gatt_evt.h:265
uint8_t uuid_len
UUID length.
Definition: in_ble_gatt_evt.h:111
uint16_t attr_hdl
database element handle
Definition: in_ble_gatt_evt.h:122
uint8_t conidx
Connection index.
Definition: in_ble_gatt_evt.h:176
Discovery All Characteristic indication Structure.
Definition: in_ble_gatt_evt.h:117
uint16_t length
Read length.
Definition: in_ble_gatt_evt.h:306
uint16_t length
Data length.
Definition: in_ble_gatt_evt.h:165
Discovery Characteristic Descriptor indication Structure.
Definition: in_ble_gatt_evt.h:134
uint8_t attr_hdl
Attribute handle.
Definition: in_ble_gatt_evt.h:222
uint8_t conidx
Connection index.
Definition: in_ble_gatt_evt.h:280
uint16_t handle
Handle of the attribute that has to be written.
Definition: in_ble_gatt_evt.h:198
uint16_t handle
Attribute handle.
Definition: in_ble_gatt_evt.h:154
Inform that a read request by peer deivce.
Definition: in_ble_gatt_evt.h:184
uint16_t end_hdl
Service end handle.
Definition: in_ble_gatt_evt.h:288
uint8_t conidx
Connection index.
Definition: in_ble_gatt_evt.h:120
uint8_t conidx
Connection index.
Definition: in_ble_gatt_evt.h:187
Peer device triggers notification.
Definition: in_ble_gatt_evt.h:147
Discover Service indication Structure.
Definition: in_ble_gatt_evt.h:85
uint16_t offset
Read offset.
Definition: in_ble_gatt_evt.h:304
Information about attribute characteristic.
Definition: in_ble_gatt_evt.h:217
uint8_t conidx
Connection index.
Definition: in_ble_gatt_evt.h:300
uint8_t att_type
Attribute Type.
Definition: in_ble_gatt_evt.h:220
Discover Service indication Structure.
Definition: in_ble_gatt_evt.h:75
Peer device triggers an indication.
Definition: in_ble_gatt_evt.h:160
uint16_t ind_cfg
Definition: in_ble_gatt_evt.h:179
uint8_t conidx
Connection index.
Definition: in_ble_gatt_evt.h:103
uint16_t handle
Attribute handle.
Definition: in_ble_gatt_evt.h:302
GATT event code start with 0x0300.
Definition: in_ble_evt.h:32
uint16_t offset
offset at which the data has to be written
Definition: in_ble_gatt_evt.h:200
uint8_t uuid_len
Attribute UUID Length.
Definition: in_ble_gatt_evt.h:256
Gatt read response indicator.
Definition: in_ble_gatt_evt.h:297
uint8_t prop
properties
Definition: in_ble_gatt_evt.h:126
uint8_t conidx
Connection index.
Definition: in_ble_gatt_evt.h:88
uint8_t uuid_len
Service UUID Length.
Definition: in_ble_gatt_evt.h:282
uint8_t uuid_len
UUID length.
Definition: in_ble_gatt_evt.h:128
uint16_t pointer_hdl
pointer attribute handle to UUID
Definition: in_ble_gatt_evt.h:124
uint16_t mtu
exchange mtu value
Definition: in_ble_gatt_evt.h:80
uint16_t start_hdl
Included service Start Handle.
Definition: in_ble_gatt_evt.h:242
uint16_t handle
Attribute handle.
Definition: in_ble_gatt_evt.h:167
uint16_t handle
Handle of the attribute for which info are requested.
Definition: in_ble_gatt_evt.h:213
uint16_t length
Data length.
Definition: in_ble_gatt_evt.h:152
uint16_t end_hdl
end handle
Definition: in_ble_gatt_evt.h:92
uint16_t start_hdl
start handle
Definition: in_ble_gatt_evt.h:90
uint8_t attr_hdl
Attribute handle.
Definition: in_ble_gatt_evt.h:254
uint8_t attr_hdl
Attribute handle.
Definition: in_ble_gatt_evt.h:236
uint16_t attr_hdl
database element handle
Definition: in_ble_gatt_evt.h:139