Object Transfer Service module.
More...
Object Transfer Service module.
This module is responsible for handling the l2cap connection oriented channels.
Function starting to abort the current transmission.
- Parameters
-
[in] | p_ots_l2cap | Object transfer service l2cap module structure. |
- Returns
- NRF_SUCCESS If the transmission was aborted.
-
NRF_ERROR_INVALID_STATE When in an invalid state. Otherwise an other error code.
Function for initializing the Object Transfer Service l2cap module.
- Parameters
-
[out] | p_ots_l2cap | Object Transfer Service l2cap structure. This structure will have to be supplied by the application. It will be initialized by this function, and will later be used to identify this particular instance. |
[in] | p_ots_l2cap_init | Information needed to initialize the module. |
- Returns
- NRF_SUCCESS on successful initialization, otherwise an error code.
Function that checks if the channel is available for transmission.
- Parameters
-
[in] | p_ots_l2cap | Object transfer service l2cap module structure. |
- Returns
- true if the channel is available.
uint32_t ble_ots_l2cap_obj_send |
( |
ble_ots_l2cap_t * |
p_ots_l2cap, |
|
|
uint8_t * |
p_data, |
|
|
uint16_t |
data_len |
|
) |
| |
Function starting to send the data in the transfer buffer.
- Parameters
-
[in] | p_ots_l2cap | Object transfer service l2cap module structure. |
[in] | p_data | Pointer to the data to be sent. |
[in] | data_len | The length of the data to be sent. |
- Returns
- NRF_SUCCESS If the transmission was started.
-
NRF_ERROR_INVALID_STATE When in an invalid state. Otherwise an other error code.
Function for handling the Application's BLE Stack events.
Handles all events from the BLE stack of interest to the l2cap module.
- Parameters
-
[in] | p_ots_l2cap | Object transfer service l2cap module structure. |
[in] | p_ble_evt | Event received from the BLE stack. |
uint32_t ble_ots_l2cap_start_recv |
( |
ble_ots_l2cap_t * |
p_ots_l2cap, |
|
|
uint16_t |
len |
|
) |
| |
Function starting to receive data to the transfer buffer.
- Parameters
-
[in] | p_ots_l2cap | Object transfer service l2cap module structure. |
[in] | len | The length of the data to be received. |
- Returns
- NRF_SUCCESS If the transmission was started.
-
NRF_ERROR_INVALID_STATE When in an invalid state. Otherwise an other error code.