Object Transfer Service client module. More...
Modules |
|
| Object Transfer Service Client configuration | |
| Object Transfer Service Client | |
|
Object Transfer Service client module.
|
|
| Object Transfer Service Client Object Action Control Point | |
|
Object Action Control Point module.
|
|
Data Structures |
|
| struct | nrf_ble_ots_c_feature_t |
|
Structure to hold the features of a server.
More...
|
|
| struct | nrf_ble_ots_c_service_t |
|
Structure used for holding the Apple Notification Center Service found during the discovery process.
More...
|
|
| struct | nrf_ble_ots_c_oacp_response_t |
| struct | nrf_ble_ots_c_obj_size |
| struct | nrf_ble_ots_c_evt_t |
|
Structure containing the event from the Object Transfer client module to the application.
More...
|
|
| struct | nrf_ble_ots_c_t |
|
Structure for holding the information related to the Object Transfer Service.
More...
|
|
| struct | nrf_ble_ots_c_init_t |
|
Initialization parameters, these must be supplied when calling
nrf_ble_ots_c_init
.
More...
|
|
Macros |
|
| #define | NRF_BLE_OTS_C_DEF (_name) |
|
Macro for defining a ble_ots instance.
More...
|
|
Typedefs |
|
| typedef void(* | nrf_ble_ots_c_evt_handler_t )( nrf_ble_ots_c_evt_t *p_evt) |
|
Object Transfer handler type.
|
|
Functions |
|
| ret_code_t | nrf_ble_ots_c_init ( nrf_ble_ots_c_t *p_ots_c, nrf_ble_ots_c_init_t *p_ots_c_init) |
|
Function for initializing the Object Transfer client module.
More...
|
|
| void | nrf_ble_ots_c_on_db_disc_evt ( nrf_ble_ots_c_t const *const p_ots_c, ble_db_discovery_evt_t *const p_evt) |
|
Function for handling events from the database discovery module.
More...
|
|
| ret_code_t | nrf_ble_ots_c_feature_read ( nrf_ble_ots_c_t *const p_ots_c) |
|
Function for reading the features characteristic (
BLE_UUID_OTS_FEATURES
) on the server.
More...
|
|
| ret_code_t | nrf_ble_ots_c_obj_size_read ( nrf_ble_ots_c_t *const p_ots_c) |
|
Function for reading the Object Size characteristic (
BLE_UUID_OTS_FEATURES
) on the server.
More...
|
|
| void | nrf_ble_ots_c_on_ble_evt (const ble_evt_t *const p_ble_evt, void *p_context) |
|
Function for handling the Application's BLE Stack events.
More...
|
|
| ret_code_t | nrf_ble_ots_c_obj_name_read ( nrf_ble_ots_c_t *const p_ots_c, ble_data_t *p_obj) |
| ret_code_t | nrf_ble_ots_c_obj_name_write ( nrf_ble_ots_c_t *const p_ots_c, ble_data_t *p_obj) |
| ret_code_t | nrf_ble_ots_c_obj_type_read ( nrf_ble_ots_c_t *const p_ots_c) |
| ret_code_t | nrf_ble_ots_c_obj_properties_read ( nrf_ble_ots_c_t *const p_ots_c) |
| ret_code_t | nrf_ble_ots_c_handles_assign ( nrf_ble_ots_c_t *const p_ots_c, uint16_t const conn_handle, nrf_ble_ots_c_service_t const *const p_peer_handles) |
|
Function for assigning handles to a Object Transfer Service client instance.
More...
|
|
Detailed Description
Object Transfer Service client module.
This is the main module of the Object Transfer Service (OTS) client.
Macro Definition Documentation
| #define NRF_BLE_OTS_C_DEF | ( | _name | ) |
Macro for defining a ble_ots instance.
- Parameters
-
_name Name of the instance.
Enumeration Type Documentation
Types of Object Action Control Point Procedures.
Object Action Control Point return codes.
Type of the Object Transfer Service client event.
Function Documentation
| ret_code_t nrf_ble_ots_c_feature_read | ( | nrf_ble_ots_c_t *const | p_ots_c | ) |
Function for reading the features characteristic ( BLE_UUID_OTS_FEATURES ) on the server.
- Parameters
-
[in,out] p_ots_c Pointer to Object Transfer client structure.
- Return values
-
NRF_SUCCESS Operation success.
- Returns
- If functions from other modules return errors to this function, the SoftDevice Global Error Codes are propagated.
| ret_code_t nrf_ble_ots_c_handles_assign | ( | nrf_ble_ots_c_t *const | p_ots_c , |
| uint16_t const | conn_handle , | ||
| nrf_ble_ots_c_service_t const *const | p_peer_handles | ||
| ) |
Function for assigning handles to a Object Transfer Service client instance.
Call this function when a link has been established with a peer to associate this link to an instance of the module. This makes it possible to handle several link and associate each link to a particular instance of the Object Transfer Service client module. The connection handle and attribute handles will be provided from the discovery event NRF_BLE_OTS_C_EVT_DISCOVERY_COMPLETE .
- Parameters
-
[in,out] p_ots_c Pointer to the Object Transfer Service client structure instance to associate with the handles. [in] conn_handle Connection handle to be associated with the given Object Transfer Service client Instance. [in] p_peer_handles Attribute handles on the Object Transfer Service server that you want this Object Transfer Service client to interact with.
- Return values
-
NRF_SUCCESS If the connection handle was successfully stored in the Object Transfer Service instance. NRF_ERROR_NULL If any of the input parameters are NULL.
| ret_code_t nrf_ble_ots_c_init | ( | nrf_ble_ots_c_t * | p_ots_c , |
| nrf_ble_ots_c_init_t * | p_ots_c_init | ||
| ) |
Function for initializing the Object Transfer client module.
- Parameters
-
[in,out] p_ots_c Pointer to the Object Transfer Service client structure instance. [in] p_ots_c_init Init parameters contraining the event handler that is called by the Object Transfer client module when any related event occurs.
- Return values
-
NRF_SUCCESS If the service was initialized successfully. NRF_ERROR_NULL If any of the input parameters are NULL.
- Returns
- If functions from other modules return errors to this function, the SoftDevice Global Error Codes are propagated.
| ret_code_t nrf_ble_ots_c_obj_size_read | ( | nrf_ble_ots_c_t *const | p_ots_c | ) |
Function for reading the Object Size characteristic ( BLE_UUID_OTS_FEATURES ) on the server.
- Parameters
-
[in,out] p_ots_c Pointer to Object Transfer client structure.
- Return values
-
NRF_SUCCESS Operation success.
- Returns
- NRF_ERROR_INVALID_STATE if the Object Size characteristic has not been discovered. If functions from other modules return errors to this function, the SoftDevice Global Error Codes are propagated.
| void nrf_ble_ots_c_on_ble_evt | ( | const ble_evt_t *const | p_ble_evt , |
| void * | p_context | ||
| ) |
Function for handling the Application's BLE Stack events.
- Parameters
-
[in] p_ble_evt Pointer to the BLE event received. [in,out] p_context Pointer to the Object Transfer Service client structure instance.
| void nrf_ble_ots_c_on_db_disc_evt | ( | nrf_ble_ots_c_t const *const | p_ots_c , |
| ble_db_discovery_evt_t *const | p_evt | ||
| ) |
Function for handling events from the database discovery module.
This function will handle an event from the database discovery module, and determine if it relates to the discovery of Object Transfer Service at the peer. If so, it will call the application's event handler indicating that Object Transfer Service has been discovered at the peer.
- Parameters
-
[in,out] p_ots_c Pointer to the Object Transfer Service client structure instance. [in] p_evt Pointer to the event received from the database discovery module.