Object Transfer Service module. More...
Functions |
|
| uint32_t | ble_ots_l2cap_init ( ble_ots_l2cap_t *p_ots_l2cap, ble_ots_l2cap_init_t *p_ots_l2cap_init) |
|
Function for initializing the Object Transfer Service l2cap module.
More...
|
|
| void | ble_ots_l2cap_on_ble_evt ( ble_ots_l2cap_t *p_ots_l2cap, ble_evt_t const *p_ble_evt) |
|
Function for handling the Application's BLE Stack events.
More...
|
|
| 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.
More...
|
|
| 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.
More...
|
|
| bool | ble_ots_l2cap_is_channel_available ( ble_ots_l2cap_t *p_ots_l2cap) |
|
Function that checks if the channel is available for transmission.
More...
|
|
| uint32_t | ble_ots_l2cap_abort_transmission ( ble_ots_l2cap_t *p_ots_l2cap) |
|
Function starting to abort the current transmission.
More...
|
|
Detailed Description
Object Transfer Service module.
This module is responsible for handling the l2cap connection oriented channels.
Function Documentation
| uint32_t ble_ots_l2cap_abort_transmission | ( | ble_ots_l2cap_t * | p_ots_l2cap | ) |
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.
| uint32_t ble_ots_l2cap_init | ( | ble_ots_l2cap_t * | p_ots_l2cap , |
| ble_ots_l2cap_init_t * | p_ots_l2cap_init | ||
| ) |
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.
| bool ble_ots_l2cap_is_channel_available | ( | ble_ots_l2cap_t * | p_ots_l2cap | ) |
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.
| void ble_ots_l2cap_on_ble_evt | ( | ble_ots_l2cap_t * | p_ots_l2cap , |
| ble_evt_t const * | p_ble_evt | ||
| ) |
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.