| 
    Zephyr Project API
    3.2.0
    
   A Scalable Open Source RTOS 
   | 
 
#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.  More... | |
| 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.  More... | |
| 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.  More... | |
| 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.  More... | |
OTS client callback structure
| 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). |