Zephyr Project API  3.3.0
A Scalable Open Source RTOS
ots.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020-2022 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_BLUETOOTH_SERVICES_OTS_H_
8#define ZEPHYR_INCLUDE_BLUETOOTH_SERVICES_OTS_H_
9
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#include <stdbool.h>
25#include <zephyr/types.h>
27#include <sys/types.h>
28#include <zephyr/sys/util.h>
29#include <zephyr/sys/crc.h>
33
35#define BT_OTS_OBJ_ID_SIZE 6
36
38#define BT_OTS_OBJ_ID_MIN 0x000000000100
39
41#define BT_OTS_OBJ_ID_MAX 0xFFFFFFFFFFFF
42
44#define OTS_OBJ_ID_DIR_LIST 0x000000000000
45
47#define BT_OTS_OBJ_ID_MASK BIT64_MASK(48)
48
50#define BT_OTS_OBJ_ID_STR_LEN 15
51
54 union {
55 /* Used to indicate UUID type */
56 struct bt_uuid uuid;
57
58 /* 16-bit UUID value */
60
61 /* 128-bit UUID value */
63 };
64};
65
67enum {
70
73
76
79
85
88
95
98};
99
104#define BT_OTS_OBJ_SET_PROP_DELETE(prop) \
105 WRITE_BIT(prop, BT_OTS_OBJ_PROP_DELETE, 1)
106
111#define BT_OTS_OBJ_SET_PROP_EXECUTE(prop) \
112 WRITE_BIT(prop, BT_OTS_OBJ_PROP_EXECUTE, 1)
113
118#define BT_OTS_OBJ_SET_PROP_READ(prop) \
119 WRITE_BIT(prop, BT_OTS_OBJ_PROP_READ, 1)
120
125#define BT_OTS_OBJ_SET_PROP_WRITE(prop) \
126 WRITE_BIT(prop, BT_OTS_OBJ_PROP_WRITE, 1)
127
132#define BT_OTS_OBJ_SET_PROP_APPEND(prop) \
133 WRITE_BIT(prop, BT_OTS_OBJ_PROP_APPEND, 1)
134
139#define BT_OTS_OBJ_SET_PROP_TRUNCATE(prop) \
140 WRITE_BIT(prop, BT_OTS_OBJ_PROP_TRUNCATE, 1)
141
146#define BT_OTS_OBJ_SET_PROP_PATCH(prop) \
147 WRITE_BIT(prop, BT_OTS_OBJ_PROP_PATCH, 1)
148
153#define BT_OTS_OBJ_SET_PROP_MARKED(prop) \
154 WRITE_BIT(prop, BT_OTS_OBJ_PROP_MARKED, 1)
155
160#define BT_OTS_OBJ_GET_PROP_DELETE(prop) \
161 ((prop) & BIT(BT_OTS_OBJ_PROP_DELETE))
162
167#define BT_OTS_OBJ_GET_PROP_EXECUTE(prop) \
168 ((prop) & BIT(BT_OTS_OBJ_PROP_EXECUTE))
169
174#define BT_OTS_OBJ_GET_PROP_READ(prop) \
175 ((prop) & BIT(BT_OTS_OBJ_PROP_READ))
176
181#define BT_OTS_OBJ_GET_PROP_WRITE(prop) \
182 ((prop) & BIT(BT_OTS_OBJ_PROP_WRITE))
183
188#define BT_OTS_OBJ_GET_PROP_APPEND(prop) \
189 ((prop) & BIT(BT_OTS_OBJ_PROP_APPEND))
190
195#define BT_OTS_OBJ_GET_PROP_TRUNCATE(prop) \
196 ((prop) & BIT(BT_OTS_OBJ_PROP_TRUNCATE))
197
202#define BT_OTS_OBJ_GET_PROP_PATCH(prop) \
203 ((prop) & BIT(BT_OTS_OBJ_PROP_PATCH))
204
209#define BT_OTS_OBJ_GET_PROP_MARKED(prop) \
210 ((prop) & BIT(BT_OTS_OBJ_PROP_MARKED))
211
216
219} __packed;
220
222enum {
225
228
231
234
237
240
243
246
249
252};
253
254/*
255 * @enum bt_ots_oacp_write_op_mode
256 * @brief Mode Parameter for OACP Write Op Code.
257 */
261};
262
267#define BT_OTS_OACP_SET_FEAT_CREATE(feat) \
268 WRITE_BIT(feat, BT_OTS_OACP_FEAT_CREATE, 1)
269
274#define BT_OTS_OACP_SET_FEAT_DELETE(feat) \
275 WRITE_BIT(feat, BT_OTS_OACP_FEAT_DELETE, 1)
276
281#define BT_OTS_OACP_SET_FEAT_CHECKSUM(feat) \
282 WRITE_BIT(feat, BT_OTS_OACP_FEAT_CHECKSUM, 1)
283
288#define BT_OTS_OACP_SET_FEAT_EXECUTE(feat) \
289 WRITE_BIT(feat, BT_OTS_OACP_FEAT_EXECUTE, 1)
290
295#define BT_OTS_OACP_SET_FEAT_READ(feat) \
296 WRITE_BIT(feat, BT_OTS_OACP_FEAT_READ, 1)
297
302#define BT_OTS_OACP_SET_FEAT_WRITE(feat) \
303 WRITE_BIT(feat, BT_OTS_OACP_FEAT_WRITE, 1)
304
309#define BT_OTS_OACP_SET_FEAT_APPEND(feat) \
310 WRITE_BIT(feat, BT_OTS_OACP_FEAT_APPEND, 1)
311
316#define BT_OTS_OACP_SET_FEAT_TRUNCATE(feat) \
317 WRITE_BIT(feat, BT_OTS_OACP_FEAT_TRUNCATE, 1)
318
323#define BT_OTS_OACP_SET_FEAT_PATCH(feat) \
324 WRITE_BIT(feat, BT_OTS_OACP_FEAT_PATCH, 1)
325
330#define BT_OTS_OACP_SET_FEAT_ABORT(feat) \
331 WRITE_BIT(feat, BT_OTS_OACP_FEAT_ABORT, 1)
332
337#define BT_OTS_OACP_GET_FEAT_CREATE(feat) \
338 ((feat) & BIT(BT_OTS_OACP_FEAT_CREATE))
339
344#define BT_OTS_OACP_GET_FEAT_DELETE(feat) \
345 ((feat) & BIT(BT_OTS_OACP_FEAT_DELETE))
346
351#define BT_OTS_OACP_GET_FEAT_CHECKSUM(feat) \
352 ((feat) & BIT(BT_OTS_OACP_FEAT_CHECKSUM))
353
358#define BT_OTS_OACP_GET_FEAT_EXECUTE(feat) \
359 ((feat) & BIT(BT_OTS_OACP_FEAT_EXECUTE))
360
365#define BT_OTS_OACP_GET_FEAT_READ(feat) \
366 ((feat) & BIT(BT_OTS_OACP_FEAT_READ))
367
372#define BT_OTS_OACP_GET_FEAT_WRITE(feat) \
373 ((feat) & BIT(BT_OTS_OACP_FEAT_WRITE))
374
379#define BT_OTS_OACP_GET_FEAT_APPEND(feat) \
380 ((feat) & BIT(BT_OTS_OACP_FEAT_APPEND))
381
386#define BT_OTS_OACP_GET_FEAT_TRUNCATE(feat) \
387 ((feat) & BIT(BT_OTS_OACP_FEAT_TRUNCATE))
388
393#define BT_OTS_OACP_GET_FEAT_PATCH(feat) \
394 ((feat) & BIT(BT_OTS_OACP_FEAT_PATCH))
395
400#define BT_OTS_OACP_GET_FEAT_ABORT(feat) \
401 ((feat) & BIT(BT_OTS_OACP_FEAT_ABORT))
402
404enum {
407
410
413
416};
417
422#define BT_OTS_OLCP_SET_FEAT_GO_TO(feat) \
423 WRITE_BIT(feat, BT_OTS_OLCP_FEAT_GO_TO, 1)
424
429#define BT_OTS_OLCP_SET_FEAT_ORDER(feat) \
430 WRITE_BIT(feat, BT_OTS_OLCP_FEAT_ORDER, 1)
431
436#define BT_OTS_OLCP_SET_FEAT_NUM_REQ(feat) \
437 WRITE_BIT(feat, BT_OTS_OLCP_FEAT_NUM_REQ, 1)
438
443#define BT_OTS_OLCP_SET_FEAT_CLEAR(feat) \
444 WRITE_BIT(feat, BT_OTS_OLCP_FEAT_CLEAR, 1)
445
450#define BT_OTS_OLCP_GET_FEAT_GO_TO(feat) \
451 ((feat) & BIT(BT_OTS_OLCP_FEAT_GO_TO))
452
457#define BT_OTS_OLCP_GET_FEAT_ORDER(feat) \
458 ((feat) & BIT(BT_OTS_OLCP_FEAT_ORDER))
459
464#define BT_OTS_OLCP_GET_FEAT_NUM_REQ(feat) \
465 ((feat) & BIT(BT_OTS_OLCP_FEAT_NUM_REQ))
466
471#define BT_OTS_OLCP_GET_FEAT_CLEAR(feat) \
472 ((feat) & BIT(BT_OTS_OLCP_FEAT_CLEAR))
473
476 /* OACP Features */
478
479 /* OLCP Features */
481} __packed;
482
484enum {
501};
502
511};
512#define BT_OTS_DATE_TIME_FIELD_SIZE 7
513
520
521#if defined(CONFIG_BT_OTS)
523 char *name;
524#endif /* CONFIG_BT_OTS */
525
526#if defined(CONFIG_BT_OTS_CLIENT)
527 /* TODO: Unify client/server name */
529 char name_c[CONFIG_BT_OTS_OBJ_MAX_NAME_LEN + 1];
530#endif /* CONFIG_BT_OTS_CLIENT */
531
534
537
538#if defined(CONFIG_BT_OTS_CLIENT)
540 struct bt_ots_date_time first_created;
541
543 struct bt_ots_date_time modified;
544
546 uint64_t id;
547#endif /* CONFIG_BT_OTS_CLIENT */
548
551};
552
554struct bt_ots;
555
560
563};
564
581 char *name;
582
593
596};
597
599struct bt_ots_cb {
622 int (*obj_created)(struct bt_ots *ots, struct bt_conn *conn, uint64_t id,
623 const struct bt_ots_obj_add_param *add_param,
624 struct bt_ots_obj_created_desc *created_desc);
625
647 int (*obj_deleted)(struct bt_ots *ots, struct bt_conn *conn,
648 uint64_t id);
649
658 void (*obj_selected)(struct bt_ots *ots, struct bt_conn *conn,
659 uint64_t id);
660
681 ssize_t (*obj_read)(struct bt_ots *ots, struct bt_conn *conn,
682 uint64_t id, void **data, size_t len,
683 off_t offset);
684
711 ssize_t (*obj_write)(struct bt_ots *ots, struct bt_conn *conn, uint64_t id,
712 const void *data, size_t len, off_t offset,
713 size_t rem);
714
727 void (*obj_name_written)(struct bt_ots *ots, struct bt_conn *conn,
728 uint64_t id, const char *cur_name, const char *new_name);
729
745 int (*obj_cal_checksum)(struct bt_ots *ots, struct bt_conn *conn, uint64_t id,
746 off_t offset, size_t len, void **data);
747};
748
751 /* OTS features */
753
754 /* Callbacks */
755 struct bt_ots_cb *cb;
756};
757
770int bt_ots_obj_add(struct bt_ots *ots, const struct bt_ots_obj_add_param *param);
771
784int bt_ots_obj_delete(struct bt_ots *ots, uint64_t id);
785
795void *bt_ots_svc_decl_get(struct bt_ots *ots);
796
804int bt_ots_init(struct bt_ots *ots, struct bt_ots_init *ots_init);
805
810struct bt_ots *bt_ots_free_instance_get(void);
811
812#define BT_OTS_STOP 0
813#define BT_OTS_CONTINUE 1
814
815/* TODO: Merge server and client instance as opaque type */
830
835
839
841
843};
844
858 void (*obj_selected)(struct bt_ots_client *ots_inst,
859 struct bt_conn *conn, int err);
860
861
878 int (*obj_data_read)(struct bt_ots_client *ots_inst,
879 struct bt_conn *conn, uint32_t offset,
880 uint32_t len, uint8_t *data_p, bool is_complete);
881
895 void (*obj_metadata_read)(struct bt_ots_client *ots_inst,
896 struct bt_conn *conn, int err,
897 uint8_t metadata_read);
898
908 void (*obj_data_written)(struct bt_ots_client *ots_inst,
909 struct bt_conn *conn, size_t len);
910
922 void (*obj_checksum_calculated)(struct bt_ots_client *ots_inst, struct bt_conn *conn,
923 int err, uint32_t checksum);
924};
925
937
950 struct bt_gatt_subscribe_params *params,
951 const void *data, uint16_t length);
952
961 struct bt_conn *conn);
962
972 struct bt_conn *conn,
973 uint64_t obj_id);
974
983 struct bt_conn *conn);
984
993 struct bt_conn *conn);
994
1003 struct bt_conn *conn);
1004
1013 struct bt_conn *conn);
1014
1027 struct bt_conn *conn,
1028 uint8_t metadata);
1029
1043 struct bt_conn *conn);
1044
1061int bt_ots_client_write_object_data(struct bt_ots_client *otc_inst, struct bt_conn *conn,
1062 const void *buf, size_t len, off_t offset,
1063 enum bt_ots_oacp_write_op_mode mode);
1064
1080int bt_ots_client_get_object_checksum(struct bt_ots_client *otc_inst, struct bt_conn *conn,
1081 off_t offset, size_t len);
1082
1094
1106
1118static inline int bt_ots_obj_id_to_str(uint64_t obj_id, char *str, size_t len)
1119{
1120 uint8_t id[6];
1121
1122 sys_put_le48(obj_id, id);
1123
1124 return snprintk(str, len, "0x%02X%02X%02X%02X%02X%02X",
1125 id[5], id[4], id[3], id[2], id[1], id[0]);
1126}
1127
1134 uint16_t count);
1135
1147static inline uint32_t bt_ots_client_calc_checksum(const uint8_t *data, size_t len)
1148{
1149 return crc32_ieee(data, len);
1150}
1151
1152#ifdef __cplusplus
1153}
1154#endif
1155
1160#endif /* ZEPHYR_INCLUDE_BLUETOOTH_SERVICES_OTS_H_ */
Byte order helpers.
static void sys_put_le48(uint64_t val, uint8_t dst[6])
Put a 48-bit integer as little-endian to arbitrary location.
Definition: byteorder.h:344
ZTEST_BMEM int count
Definition: main.c:33
Bluetooth connection handling.
CRC computation function.
Generic Attribute Profile handling.
int bt_ots_client_select_id(struct bt_ots_client *otc_inst, struct bt_conn *conn, uint64_t obj_id)
Select an object by its Object ID.
static uint32_t bt_ots_client_calc_checksum(const uint8_t *data, size_t len)
Generate IEEE conform CRC32 checksum.
Definition: ots.h:1147
int bt_ots_client_select_first(struct bt_ots_client *otc_inst, struct bt_conn *conn)
Select the first object.
int bt_ots_client_select_next(struct bt_ots_client *otc_inst, struct bt_conn *conn)
Select the next object.
void bt_ots_metadata_display(struct bt_ots_obj_metadata *metadata, uint16_t count)
Displays one or more object metadata as text with LOG_INF.
int bt_ots_obj_delete(struct bt_ots *ots, uint64_t id)
Delete an object from the OTS instance.
int bt_ots_client_select_last(struct bt_ots_client *otc_inst, struct bt_conn *conn)
Select the last object.
int bt_ots_client_read_object_data(struct bt_ots_client *otc_inst, struct bt_conn *conn)
Read the data of the current selected object.
int bt_ots_client_read_object_metadata(struct bt_ots_client *otc_inst, struct bt_conn *conn, uint8_t metadata)
Read the metadata of the current object.
int bt_ots_client_write_object_data(struct bt_ots_client *otc_inst, struct bt_conn *conn, const void *buf, size_t len, off_t offset, enum bt_ots_oacp_write_op_mode mode)
Write the data of the current selected object.
int bt_ots_client_get_object_checksum(struct bt_ots_client *otc_inst, struct bt_conn *conn, off_t offset, size_t len)
Get the checksum of the current selected object.
int(* bt_ots_client_dirlisting_cb)(struct bt_ots_obj_metadata *meta)
Directory listing object metadata callback.
Definition: ots.h:1093
int bt_ots_client_decode_dirlisting(uint8_t *data, uint16_t length, bt_ots_client_dirlisting_cb cb)
Decode Directory Listing object into object metadata.
void * bt_ots_svc_decl_get(struct bt_ots *ots)
Get the service declaration attribute.
int bt_ots_obj_add(struct bt_ots *ots, const struct bt_ots_obj_add_param *param)
Add an object to the OTS instance.
int bt_ots_init(struct bt_ots *ots, struct bt_ots_init *ots_init)
Initialize the OTS instance.
uint8_t bt_ots_client_indicate_handler(struct bt_conn *conn, struct bt_gatt_subscribe_params *params, const void *data, uint16_t length)
OTS Indicate Handler function.
int bt_ots_client_select_prev(struct bt_ots_client *otc_inst, struct bt_conn *conn)
Select the previous object.
static int bt_ots_obj_id_to_str(uint64_t obj_id, char *str, size_t len)
Converts binary OTS Object ID to string.
Definition: ots.h:1118
int bt_ots_client_register(struct bt_ots_client *ots_inst)
Register an Object Transfer Service Instance.
bt_ots_oacp_write_op_mode
Definition: ots.h:258
int bt_ots_client_read_feature(struct bt_ots_client *otc_inst, struct bt_conn *conn)
Read the OTS feature characteristic.
struct bt_ots * bt_ots_free_instance_get(void)
Get a free instance of OTS from the pool.
@ BT_OTS_METADATA_REQ_ALL
Request all object metadata.
Definition: ots.h:500
@ BT_OTS_METADATA_REQ_MODIFIED
Request object last modified time.
Definition: ots.h:494
@ BT_OTS_METADATA_REQ_ID
Request object ID.
Definition: ots.h:496
@ BT_OTS_METADATA_REQ_CREATED
Request object first created time.
Definition: ots.h:492
@ BT_OTS_METADATA_REQ_SIZE
Request object size.
Definition: ots.h:490
@ BT_OTS_METADATA_REQ_NAME
Request object name.
Definition: ots.h:486
@ BT_OTS_METADATA_REQ_PROPS
Request object properties.
Definition: ots.h:498
@ BT_OTS_METADATA_REQ_TYPE
Request object type.
Definition: ots.h:488
@ BT_OTS_OACP_FEAT_ABORT
Definition: ots.h:251
@ BT_OTS_OACP_FEAT_DELETE
Definition: ots.h:227
@ BT_OTS_OACP_FEAT_APPEND
Definition: ots.h:242
@ BT_OTS_OACP_FEAT_READ
Definition: ots.h:236
@ BT_OTS_OACP_FEAT_TRUNCATE
Definition: ots.h:245
@ BT_OTS_OACP_FEAT_CHECKSUM
Definition: ots.h:230
@ BT_OTS_OACP_FEAT_WRITE
Definition: ots.h:239
@ BT_OTS_OACP_FEAT_EXECUTE
Definition: ots.h:233
@ BT_OTS_OACP_FEAT_PATCH
Definition: ots.h:248
@ BT_OTS_OACP_FEAT_CREATE
Definition: ots.h:224
@ BT_OTS_OBJ_PROP_MARKED
Definition: ots.h:97
@ BT_OTS_OBJ_PROP_DELETE
Definition: ots.h:69
@ BT_OTS_OBJ_PROP_TRUNCATE
Definition: ots.h:87
@ BT_OTS_OBJ_PROP_APPEND
Bit 4 Appending data to this object is permitted.
Definition: ots.h:84
@ BT_OTS_OBJ_PROP_READ
Definition: ots.h:75
@ BT_OTS_OBJ_PROP_EXECUTE
Definition: ots.h:72
@ BT_OTS_OBJ_PROP_PATCH
Bit 6 Patching this object is permitted.
Definition: ots.h:94
@ BT_OTS_OBJ_PROP_WRITE
Definition: ots.h:78
@ BT_OTS_OLCP_FEAT_ORDER
Definition: ots.h:409
@ BT_OTS_OLCP_FEAT_NUM_REQ
Definition: ots.h:412
@ BT_OTS_OLCP_FEAT_CLEAR
Definition: ots.h:415
@ BT_OTS_OLCP_FEAT_GO_TO
Definition: ots.h:406
@ BT_OTS_OACP_WRITE_OP_MODE_NONE
Definition: ots.h:259
@ BT_OTS_OACP_WRITE_OP_MODE_TRUNCATE
Definition: ots.h:260
uint32_t crc32_ieee(const uint8_t *data, size_t len)
Generate IEEE conform CRC32 checksum.
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition: util_macro.h:44
__SIZE_TYPE__ ssize_t
Definition: types.h:28
__INTPTR_TYPE__ off_t
Definition: types.h:36
int snprintk(char *str, size_t size, const char *fmt,...)
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__UINT64_TYPE__ uint64_t
Definition: stdint.h:91
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
__UINT16_TYPE__ uint16_t
Definition: stdint.h:89
GATT Discover Attributes parameters.
Definition: gatt.h:1430
GATT Read parameters.
Definition: gatt.h:1518
GATT Subscribe parameters.
Definition: gatt.h:1802
GATT Write parameters.
Definition: gatt.h:1609
OTS callback structure.
Definition: ots.h:599
int(* obj_created)(struct bt_ots *ots, struct bt_conn *conn, uint64_t id, const struct bt_ots_obj_add_param *add_param, struct bt_ots_obj_created_desc *created_desc)
Object created callback.
Definition: ots.h:622
int(* obj_cal_checksum)(struct bt_ots *ots, struct bt_conn *conn, uint64_t id, off_t offset, size_t len, void **data)
Object Calculate checksum callback.
Definition: ots.h:745
int(* obj_deleted)(struct bt_ots *ots, struct bt_conn *conn, uint64_t id)
Object deleted callback.
Definition: ots.h:647
void(* obj_name_written)(struct bt_ots *ots, struct bt_conn *conn, uint64_t id, const char *cur_name, const char *new_name)
Object name written callback.
Definition: ots.h:727
ssize_t(* obj_read)(struct bt_ots *ots, struct bt_conn *conn, uint64_t id, void **data, size_t len, off_t offset)
Object read callback.
Definition: ots.h:681
ssize_t(* obj_write)(struct bt_ots *ots, struct bt_conn *conn, uint64_t id, const void *data, size_t len, off_t offset, size_t rem)
Object write callback.
Definition: ots.h:711
void(* obj_selected)(struct bt_ots *ots, struct bt_conn *conn, uint64_t id)
Object selected callback.
Definition: ots.h:658
Definition: ots.h:846
void(* obj_data_written)(struct bt_ots_client *ots_inst, struct bt_conn *conn, size_t len)
Callback function for the data of the write object.
Definition: ots.h:908
void(* obj_metadata_read)(struct bt_ots_client *ots_inst, struct bt_conn *conn, int err, uint8_t metadata_read)
Callback function for metadata of the selected object.
Definition: ots.h:895
void(* obj_selected)(struct bt_ots_client *ots_inst, struct bt_conn *conn, int err)
Callback function when a new object is selected.
Definition: ots.h:858
void(* obj_checksum_calculated)(struct bt_ots_client *ots_inst, struct bt_conn *conn, int err, uint32_t checksum)
Callback function when checksum indication is received.
Definition: ots.h:922
int(* obj_data_read)(struct bt_ots_client *ots_inst, struct bt_conn *conn, uint32_t offset, uint32_t len, uint8_t *data_p, bool is_complete)
Callback function for the data of the selected object.
Definition: ots.h:878
OTS client instance.
Definition: ots.h:817
struct bt_gatt_write_params write_params
Definition: ots.h:836
uint16_t start_handle
Definition: ots.h:818
struct bt_ots_client_cb * cb
Definition: ots.h:838
uint16_t feature_handle
Definition: ots.h:820
uint16_t obj_id_handle
Definition: ots.h:827
struct bt_gatt_subscribe_params olcp_sub_params
Definition: ots.h:833
uint16_t obj_size_handle
Definition: ots.h:823
uint16_t obj_modified_handle
Definition: ots.h:826
struct bt_gatt_read_params read_proc
Definition: ots.h:837
struct bt_gatt_discover_params oacp_sub_disc_params
Definition: ots.h:832
struct bt_ots_feat features
Definition: ots.h:840
struct bt_gatt_subscribe_params oacp_sub_params
Definition: ots.h:831
uint16_t end_handle
Definition: ots.h:819
uint16_t olcp_handle
Definition: ots.h:829
uint16_t obj_properties_handle
Definition: ots.h:824
struct bt_ots_obj_metadata cur_object
Definition: ots.h:842
struct bt_gatt_discover_params olcp_sub_disc_params
Definition: ots.h:834
uint16_t oacp_handle
Definition: ots.h:828
uint16_t obj_type_handle
Definition: ots.h:822
uint16_t obj_name_handle
Definition: ots.h:821
uint16_t obj_created_handle
Definition: ots.h:825
Date and Time structure.
Definition: ots.h:504
uint8_t day
Definition: ots.h:507
uint8_t seconds
Definition: ots.h:510
uint8_t month
Definition: ots.h:506
uint8_t minutes
Definition: ots.h:509
uint8_t hours
Definition: ots.h:508
uint16_t year
Definition: ots.h:505
Features of the OTS.
Definition: ots.h:475
uint32_t olcp
Definition: ots.h:480
uint32_t oacp
Definition: ots.h:477
Descriptor for OTS initialization.
Definition: ots.h:750
struct bt_ots_feat features
Definition: ots.h:752
struct bt_ots_cb * cb
Definition: ots.h:755
Descriptor for OTS object addition.
Definition: ots.h:557
uint32_t size
Object size to allocate.
Definition: ots.h:559
struct bt_ots_obj_type type
Object type.
Definition: ots.h:562
Descriptor for OTS created object.
Definition: ots.h:571
uint32_t props
Object properties.
Definition: ots.h:595
struct bt_ots_obj_size size
Object size.
Definition: ots.h:592
char * name
Object name.
Definition: ots.h:581
Metadata of an OTS object.
Definition: ots.h:519
uint32_t props
Object Properties.
Definition: ots.h:550
struct bt_ots_obj_type type
Object Type.
Definition: ots.h:533
struct bt_ots_obj_size size
Object Size.
Definition: ots.h:536
Descriptor for OTS Object Size parameter.
Definition: ots.h:213
uint32_t cur
Current Size.
Definition: ots.h:215
uint32_t alloc
Allocated Size.
Definition: ots.h:218
Type of an OTS object.
Definition: ots.h:53
struct bt_uuid uuid
Definition: ots.h:56
struct bt_uuid_16 uuid_16
Definition: ots.h:59
struct bt_uuid_128 uuid_128
Definition: ots.h:62
Definition: uuid.h:64
Definition: uuid.h:50
This is a 'tentative' type and should be used as a pointer only.
Definition: uuid.h:46
static fdata_t data[2]
Definition: test_fifo_contexts.c:15
static qdata_t data_p[2]
Definition: test_queue_contexts.c:19
Misc utilities.
Bluetooth UUID handling.