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

Object Action Control Point module. More...

Modules

 OTS Client Object Action Control Point configuration
 

Functions

ret_code_t nrf_ble_ots_c_indication_enable (nrf_ble_ots_c_t *const p_ots_c, bool const enable)
 Function for enabling remote indication. More...
 
ret_code_t nrf_ble_ots_c_oacp_write_object (nrf_ble_ots_c_t *const p_ots_c, uint32_t offset, uint32_t len, bool truncate)
 Function for requesting a write of an object. More...
 
ret_code_t nrf_ble_ots_c_oacp_read_object (nrf_ble_ots_c_t *const p_ots_c, uint32_t offset, uint32_t len)
 Function for requesting a read of an object. More...
 
void ots_c_oacp_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...
 

Detailed Description

Object Action Control Point module.

This is the Object Action Control Point module of the Object Transfer Service (OTS) Client.

Function Documentation

ret_code_t nrf_ble_ots_c_indication_enable ( nrf_ble_ots_c_t *const  p_ots_c,
bool const  enable 
)

Function for enabling remote indication.

Parameters
[in,out]p_ots_cPointer to Object Transfer Client structure.
[in]enableTrue to enable Object Action Control Point (OACP) indication; false to disable.
Return values
NRF_SUCCESSOperation success.
err_codeIf functions from other modules return errors to this function, the SoftDevice Global Error Codes are propagated.
ret_code_t nrf_ble_ots_c_oacp_read_object ( nrf_ble_ots_c_t *const  p_ots_c,
uint32_t  offset,
uint32_t  len 
)

Function for requesting a read of an object.

Parameters
[in,out]p_ots_cPointer to Object Transfer Client structure.
[in]offsetOffset of the read.
[in]lenLength of the read.
Return values
NRF_SUCCESSOperation success.
Returns
Otherwise this API propagates the error code returned by functions: nrf_ble_gq_item_add.
ret_code_t nrf_ble_ots_c_oacp_write_object ( nrf_ble_ots_c_t *const  p_ots_c,
uint32_t  offset,
uint32_t  len,
bool  truncate 
)

Function for requesting a write of an object.

This function informs the peer about the length of the object to write. (The object itself is not written by this function.) The peer indicates a response on the Object Action Control Point. If the write is accepted (the event NRF_BLE_OTS_C_OACP_RES_SUCCESS ), an object can be transfered with nrf_ble_ots_c_l2cap_obj_send.

Parameters
[in,out]p_ots_cPointer to Object Transfer Client structure.
[in]offsetOffset of the write.
[in]lenLength of the object to write.
[in]truncateTrue to let the write truncate on the object.
Return values
NRF_SUCCESSOperation success.
NRF_ERROR_INVALID_STATEModule is not initialized, or the handles of the peer OACP are invalid.
err_codeOtherwise, this API propagates the error code returned by functions: nrf_ble_gq_item_add.
void ots_c_oacp_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