Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
|
OTS client callback structure. More...
#include <ots.h>
Data Fields | |
void(* | obj_selected )(struct bt_ots_client *ots_inst, struct bt_conn *conn, int err) |
Callback function when a new object is selected. | |
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. | |
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. | |
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. | |
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. | |
OTS client callback structure.
void(* bt_ots_client_cb::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.
Called when the oacp_ind_handler received response of OP BT_GATT_OTS_OACP_PROC_CHECKSUM_CALC.
ots_inst | Pointer to the OTC instance. |
conn | The connection to the peer device. |
err | Error code (bt_gatt_ots_oacp_res_code). |
checksum | Checksum if error code is BT_GATT_OTS_OACP_RES_SUCCESS, otherwise 0. |
int(* bt_ots_client_cb::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.
Called when the data of the selected object are read using bt_ots_client_read_object_data().
ots_inst | Pointer to the OTC instance. |
conn | The connection to the peer device. |
offset | Offset of the received data. |
len | Length of the received data. |
data_p | Pointer to the received data. |
is_complete | Indicate if the whole object has been received. |
void(* bt_ots_client_cb::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.
Called when the data of the selected object is written using bt_ots_client_write_object_data().
ots_inst | Pointer to the OTC instance. |
conn | The connection to the peer device. |
len | Length of the written data. |
void(* bt_ots_client_cb::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.
Called when metadata of the selected object are read using bt_ots_client_read_object_metadata(). Not all of the metadata may have been initialized.
ots_inst | Pointer to the OTC instance. |
conn | The connection to the peer device. |
err | Error value. 0 on success, GATT error or ERRNO on fail. |
metadata_read | Bitfield of the metadata that was successfully read. |
void(* bt_ots_client_cb::obj_selected) (struct bt_ots_client *ots_inst, struct bt_conn *conn, int err) |
Callback function when a new object is selected.
Called when the a new object is selected and the current object has changed. The cur_object
in ots_inst
will have been reset, and metadata should be read again with bt_ots_client_read_object_metadata().
ots_inst | Pointer to the OTC instance. |
conn | The connection to the peer device. |
err | Error code (bt_ots_olcp_res_code). |