nRF5 SDK v17.1.0
Modules | Functions
Object Transfer Service Client

Object Transfer Service client module. More...

Modules

 OTS Client L2CAP configuration
 

Functions

void ots_c_l2cap_on_ble_evt (nrf_ble_ots_c_t *const p_ots_c, ble_evt_t const *const p_ble_evt)
 Function for handling the Application's BLE Stack events. More...
 
ret_code_t nrf_ble_ots_c_l2cap_obj_send (nrf_ble_ots_c_t *const p_ots_c, ble_data_t *p_obj)
 Function sending an object. More...
 
ret_code_t nrf_ble_ots_c_l2cap_obj_receive (nrf_ble_ots_c_t *const p_ots_c, ble_data_t *p_obj)
 Function for receiving an object. More...
 

Detailed Description

Object Transfer Service client module.

This is the main module of the Object Transfer Service (OTS) client.

Function Documentation

ret_code_t nrf_ble_ots_c_l2cap_obj_receive ( nrf_ble_ots_c_t *const  p_ots_c,
ble_data_t p_obj 
)

Function for receiving an object.

This Function will only succeed in receiving an object if the peer is in a state to send it. call nrf_ble_ots_c_oacp_read_object before this function.

Parameters
[in,out]p_ots_cPointer to Object Transfer client structure.
[in,out]p_objPointer to buffer where the received data will be stored.
ret_code_t nrf_ble_ots_c_l2cap_obj_send ( nrf_ble_ots_c_t *const  p_ots_c,
ble_data_t p_obj 
)

Function sending an object.

This Function will only succeed in sending an object if the peer is in a state to receive it. call nrf_ble_ots_c_oacp_write_object before this function.

Parameters
[in,out]p_ots_cPointer to Object Transfer client structure.
[in,out]p_objPointer to object that will be sent to the peer.
Return values
NRF_ERROR_INVALID_STATEif the Object Transfer module is not initialized.
NRF_ERROR_NULLif any of the input parameters are NULL.
void ots_c_l2cap_on_ble_evt ( nrf_ble_ots_c_t *const  p_ots_c,
ble_evt_t const *const  p_ble_evt 
)

Function for handling the Application's BLE Stack events.

Parameters
[in,out]p_ots_cPointer to Object Transfer client structure.
[in]p_ble_evtPointer to the BLE event received.

Documentation feedback | Developer Zone | Subscribe | Updated