Object Transfer Service module. More...
Modules |
|
| Object Transfer Service, l2cap channel handling | |
|
Object Transfer Service module.
|
|
| Object Transfer Service, OACP handling | |
|
Object Transfer Service module.
|
|
| Object Transfer Service, Object characteristics | |
|
Object Transfer Service module.
|
|
| Object transfer service configuration | |
Data Structures |
|
| union | ble_ots_obj_properties_t |
|
Properties of an Object Transfer Service object.
More...
|
|
| struct | ble_ots_obj_type_t |
|
A structure representing the object type.
More...
|
|
| struct | ble_ots_object_t |
|
The structure representing one Object Transfer Service object.
More...
|
|
| struct | ble_ots_object_evt_t |
|
The definition of an event from the object characteristics.
More...
|
|
| struct | ble_ots_object_chars_init_t |
|
Initialization properties of the Object Transfer Service Object characteristics.
More...
|
|
| struct | ble_ots_object_chars_t |
|
The structure holding the state of the OTS object characteristics.
More...
|
|
| struct | ble_ots_l2cap_evt_t |
|
l2cap event.
More...
|
|
| struct | ble_ots_l2cap_s |
|
The structure holding the l2cap connection oriented channels state.
More...
|
|
| struct | ble_ots_l2cap_init_t |
|
The initialization structure of the l2cap module.
More...
|
|
| struct | ble_ots_oacp_proc_t |
| struct | ble_ots_oacp_evt_t |
|
Definition of an OACP event.
More...
|
|
| struct | ble_ots_oacp_init_t |
|
OACP initialization properties.
More...
|
|
| struct | ble_ots_oacp_s |
| struct | ble_ots_evt_t |
|
This structure represents the state of the Object Transfer Service.
More...
|
|
| struct | ble_ots_init_t |
|
Structure for initializing the OTS.
More...
|
|
| struct | ble_ots_s |
Macros |
|
| #define | BLE_OTS_DEF (_name) |
|
Macro for defining a ble_ots instance.
More...
|
|
| #define | NRF_BLE_OTS_SIZE_CHAR_LEN (2*sizeof(uint32_t)) |
| #define | BLE_OTS_FEATURE_LEN (2*sizeof(uint32_t)) |
| #define | BLE_OTS_NAME_MAX_SIZE 128 |
| #define | BLE_OTS_MAX_OBJ_SIZE 1028 |
| #define | BLE_OTS_INVALID_CID 0x0000 |
| #define | BLE_OTS_PSM 0x0025 |
| #define | BLE_OTS_MAX_OACP_SIZE 21 |
| #define | BLE_OTS_WRITE_MODE_TRUNCATE (1 << 1) |
| #define | BLE_OTS_WRITE_MODE_NO_TRUNCATE 0 |
Typedefs |
|
| typedef struct ble_ots_s | ble_ots_t |
| typedef struct ble_ots_oacp_s | ble_ots_oacp_t |
| typedef struct ble_ots_l2cap_s | ble_ots_l2cap_t |
| typedef void(* | ble_ots_l2cap_evt_handler_t )( ble_ots_l2cap_t *p_ots_l2cap, ble_ots_l2cap_evt_t *p_evt) |
|
L2CAP event handler.
|
|
| typedef void(* | ble_ots_evt_handler_t )( ble_ots_t *p_ots, ble_ots_evt_t *p_evt) |
|
OTS event handler.
|
|
Functions |
|
| uint32_t | ble_ots_init ( ble_ots_t *p_ots, ble_ots_init_t *p_ots_init) |
|
Function for initializing the Object Transfer Service.
More...
|
|
| void | ble_ots_on_ble_evt ( ble_evt_t const *p_ble_evt, void *p_context) |
|
Function for handling the Application's BLE Stack events.
More...
|
|
| uint32_t | ble_ots_object_set_name ( ble_ots_object_chars_t *p_ots_object_chars, ble_ots_object_t *p_object, char const *new_name) |
|
Function for setting the name of an object.
More...
|
|
| uint32_t | ble_ots_object_set_type ( ble_ots_object_chars_t *p_ots_object_chars, ble_ots_object_t *p_object, ble_ots_obj_type_t *p_new_type) |
|
Function for setting the type of an object.
More...
|
|
| uint32_t | ble_ots_object_set_current_size ( ble_ots_object_chars_t *p_ots_object_chars, ble_ots_object_t *p_object, uint32_t new_current_size) |
|
Function for setting the current size of an object.
More...
|
|
| uint32_t | ble_ots_object_set_properties ( ble_ots_object_chars_t *p_ots_object_chars, ble_ots_object_t *p_object, ble_ots_obj_properties_t *p_new_properties) |
|
Function for setting the properties of an object.
More...
|
|
Detailed Description
Object Transfer Service module.
This is the main module of the OTS service.
Macro Definition Documentation
| #define BLE_OTS_DEF | ( | _name | ) |
Macro for defining a ble_ots instance.
- Parameters
-
_name Name of the instance.
| #define BLE_OTS_INVALID_CID 0x0000 |
Invalid connection ID.
Enumeration Type Documentation
| enum ble_ots_evt_type_t |
< Types of Object Action Control Point Procedures.
Function Documentation
| uint32_t ble_ots_init | ( | ble_ots_t * | p_ots , |
| ble_ots_init_t * | p_ots_init | ||
| ) |
Function for initializing the Object Transfer Service.
- Parameters
-
[out] p_ots Object Transfer Service 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 service instance. [in] p_ots_init Information needed to initialize the service.
- Returns
- NRF_SUCCESS on successful initialization of service, otherwise an error code.
| uint32_t ble_ots_object_set_current_size | ( | ble_ots_object_chars_t * | p_ots_object_chars , |
| ble_ots_object_t * | p_object , | ||
| uint32_t | new_current_size | ||
| ) |
Function for setting the current size of an object.
If p_object is the current selected object, and the notifications is enabled, the client will be notified that the object has changed.
- Note
- If the new current size is smaller than the current size, the object will be truncated.
- Parameters
-
[in] p_ots_object_chars Object Transfer Service Object Characteristics structure. [in] p_object Pointer to the object where the current size will be changed. [in] new_current_size The new current size of the object.
- Returns
- NRF_SUCCESS On success, otherwise an error code.
| uint32_t ble_ots_object_set_name | ( | ble_ots_object_chars_t * | p_ots_object_chars , |
| ble_ots_object_t * | p_object , | ||
| char const * | new_name | ||
| ) |
Function for setting the name of an object.
If p_object is the current selected object, and the notifications is enabled, the client will be notified that the object has changed.
- Note
- If the name of the object is "" on disconnection, the object will be invalidated.
- Parameters
-
[in] p_ots_object_chars Object Transfer Service Object Characteristics structure. [in] p_object Pointer to the object where the name will be changed. [in] new_name The new name of the object.
- Returns
- NRF_SUCCESS On success, otherwise an error code.
| uint32_t ble_ots_object_set_properties | ( | ble_ots_object_chars_t * | p_ots_object_chars , |
| ble_ots_object_t * | p_object , | ||
| ble_ots_obj_properties_t * | p_new_properties | ||
| ) |
Function for setting the properties of an object.
If p_object is the current selected object, and the notifications is enabled, the client will be notified that the object has changed.
- Parameters
-
[in] p_ots_object_chars Object Transfer Service Object Characteristics structure. [in] p_object Pointer to the object where the properties will be changed. [in] p_new_properties The properties of the object.
- Returns
- NRF_SUCCESS On success, otherwise an error code.
| uint32_t ble_ots_object_set_type | ( | ble_ots_object_chars_t * | p_ots_object_chars , |
| ble_ots_object_t * | p_object , | ||
| ble_ots_obj_type_t * | p_new_type | ||
| ) |
Function for setting the type of an object.
If p_object is the current selected object, and the notifications is enabled, the client will be notified that the object has changed.
- Parameters
-
[in] p_ots_object_chars Object Transfer Service Object Characteristics structure. [in] p_object Pointer to the object where the type will be changed. [in] p_new_type Pointer to the new type of the object.
- Returns
- NRF_SUCCESS On success, otherwise an error code.
| void ble_ots_on_ble_evt | ( | ble_evt_t const * | p_ble_evt , |
| void * | p_context | ||
| ) |
Function for handling the Application's BLE Stack events.
Handles all events from the BLE stack of interest to the Object Transfer Service.
- Parameters
-
[in] p_ble_evt Event received from the BLE stack. [in] p_context Object Transfer Service structure.