Object Client#
The Object Transfer Service (OTS) Object Client provides an API for managing objects on the remote Object Server.
Modules#
sl_bt_ots_object_metadata_write_parameters_t
sl_bt_ots_object_metadata_read_parameters_t
sl_bt_ots_oacp_response_data_t
sl_bt_ots_subscription_status_t
Typedefs#
OTS Object Client handle.
OTS Object Client instance type.
Object Action Control Point Features.
Object List Control Point Features.
Object first created.
Object last modified.
Object properties.
Metadata fields type.
OACP Execute opcode parameters.
Object write mode flags.
Data response credits.
Name filter parameters.
Object change flags.
Variables#
Array of OTS Characteristic UUIDs.
Functions#
OTS Object Client status.
OTS Characteristic UUID indices.
Object Transfer Service features.
Object name.
Object size.
Complete Object ID.
Object metadata write event type.
Object metadata write response codes.
Object metadata read event type.
Object metadata read response codes.
OACP opcode.
OACP response code.
OACP Create opcode parameters.
OACP Calculate Checksum opcode parameters.
OACP Write opcode parameters.
OACP Message.
OACP response.
OACP opcode.
OLCP response code.
List Sort Order.
OLCP Go To opcode parameters.
OLCP Order opcode parameters.
OLCP message.
OLCP response message.
Object List Filter.
Time filter parameters.
Size filter parameters.
Object List Filter content.
Object Changed content.
OTS GATT database handles.
Datatype for object list item.
Datatype for object list.
Macros#
OTS Subscription status for no subscription.
OTS Characteristics.
Typedef Documentation#
sl_bt_ots_client_handle_t#
typedef struct sl_bt_ots_client* sl_bt_ots_client_handle_t
OTS Object Client handle.
sl_bt_ots_client_connection_callback_t#
typedef void(* sl_bt_ots_client_connection_callback_t) (sl_bt_ots_client_handle_t client) )(sl_bt_ots_client_handle_t client)
Type | Direction | Argument Name | Description |
---|---|---|---|
[in] | client | Client handle. |
OTS Object Client callback function prototype for connection or disconnection
sl_bt_ots_client_subscription_callback_t#
typedef void(* sl_bt_ots_client_subscription_callback_t) (sl_bt_ots_client_handle_t client, sl_bt_ots_subscription_status_t status) )(sl_bt_ots_client_handle_t client, sl_bt_ots_subscription_status_t status)
Type | Direction | Argument Name | Description |
---|---|---|---|
[in] | client | Client handle. | |
[in] | status | Subscription status. |
OTS Object Client callback function prototype for indication subscription status
sl_bt_ots_client_object_changed_callback_t#
typedef void(* sl_bt_ots_client_object_changed_callback_t) (sl_bt_ots_client_handle_t client, sl_bt_ots_object_changed_flags_t flags, sl_bt_ots_object_id_t *object) )(sl_bt_ots_client_handle_t client, sl_bt_ots_object_changed_flags_t flags, sl_bt_ots_object_id_t *object)
Type | Direction | Argument Name | Description |
---|---|---|---|
[in] | client | Client handle. | |
[in] | flags | Change flags. The following masks can be used to indicate the nature of change:
| |
[in] | object | Object ID. |
OTS Object Client callback function prototype to handle Object Change event
sl_bt_ots_client_features_callback_t#
typedef void(* sl_bt_ots_client_features_callback_t) (sl_bt_ots_client_handle_t client, sl_status_t status, sl_bt_ots_features_t features) )(sl_bt_ots_client_handle_t client, sl_status_t status, sl_bt_ots_features_t features)
Type | Direction | Argument Name | Description |
---|---|---|---|
[in] | client | Client handle. | |
[in] | status | Result of the read. | |
[in] | features | Features supported by the Server. |
OTS Object Client callback function prototype for OTS Feature read status
sl_bt_ots_client_list_filter_write_callback_t#
typedef void(* sl_bt_ots_client_list_filter_write_callback_t) (sl_bt_ots_client_handle_t client, uint16_t status) )(sl_bt_ots_client_handle_t client, uint16_t status)
Type | Direction | Argument Name | Description |
---|---|---|---|
[in] | client | Client handle. | |
[in] | status | GATT result of the write operation. |
OTS Object Client callback function prototype List Filter Write response
sl_bt_ots_client_list_filter_read_callback_t#
typedef void(* sl_bt_ots_client_list_filter_read_callback_t) (sl_bt_ots_client_handle_t client, sl_status_t status, sl_bt_ots_object_list_filter_content_t filter) )(sl_bt_ots_client_handle_t client, sl_status_t status, sl_bt_ots_object_list_filter_content_t filter)
Type | Direction | Argument Name | Description |
---|---|---|---|
[in] | client | Client handle. | |
[in] | status | Result of the write operation. | |
[in] | filter | Filter data. |
OTS Object Client callback function prototype List Filter Write response
sl_bt_ots_client_olcp_callback_t#
typedef void(* sl_bt_ots_client_olcp_callback_t) (sl_bt_ots_client_handle_t client, sl_bt_ots_object_id_t *object, sl_bt_ots_olcp_opcode_t opcode, uint16_t status, sl_bt_ots_olcp_response_code_t response, uint32_t number_of_objects) )(sl_bt_ots_client_handle_t client, sl_bt_ots_object_id_t *object, sl_bt_ots_olcp_opcode_t opcode, uint16_t status, sl_bt_ots_olcp_response_code_t response, uint32_t number_of_objects)
Type | Direction | Argument Name | Description |
---|---|---|---|
[in] | client | Client handle. | |
[in] | object | Object ID. | |
[in] | opcode | OLCP Opcode. | |
[in] | status | GATT result of the operation. | |
[in] | parameters | OLCP response parameters. | |
[in] | number_of_objects | Number of objects |
OTS Object Client callback function prototype to handle OLCP responses
sl_bt_ots_client_oacp_callback_t#
typedef void(* sl_bt_ots_client_oacp_callback_t) (sl_bt_ots_client_handle_t client, sl_bt_ots_object_id_t *object, sl_bt_ots_oacp_opcode_t opcode, uint16_t status, sl_bt_ots_oacp_response_code_t response, sl_bt_ots_oacp_response_data_t *data) )(sl_bt_ots_client_handle_t client, sl_bt_ots_object_id_t *object, sl_bt_ots_oacp_opcode_t opcode, uint16_t status, sl_bt_ots_oacp_response_code_t response, sl_bt_ots_oacp_response_data_t *data)
Type | Direction | Argument Name | Description |
---|---|---|---|
[in] | client | Client handle. | |
[in] | object | Object ID. | |
[in] | opcode | OACP Opcode. | |
[in] | status | GATT result of the operation. | |
[in] | event | OACP response. | |
[in] | event | OACP response parameter. |
OTS Object Client callback function prototype to handle OACP responses
sl_bt_ots_client_object_metadata_write_callback_t#
typedef void(* sl_bt_ots_client_object_metadata_write_callback_t) (sl_bt_ots_client_handle_t client, sl_bt_ots_object_id_t *object, sl_bt_ots_object_metadata_write_event_type_t event, uint16_t status) )(sl_bt_ots_client_handle_t client, sl_bt_ots_object_id_t *object, sl_bt_ots_object_metadata_write_event_type_t event, uint16_t status)
Type | Direction | Argument Name | Description |
---|---|---|---|
[in] | client | Client handle. | |
[in] | object | Object ID. | |
[in] | event | Metadata type. | |
[in] | status | GATT status of the write request. 0 means success. |
OTS Object Server callback function prototype to handle metadata writes
sl_bt_ots_client_object_metadata_read_callback_t#
typedef void(* sl_bt_ots_client_object_metadata_read_callback_t) (sl_bt_ots_client_handle_t client, sl_bt_ots_object_id_t *object, uint16_t status, sl_bt_ots_object_metadata_read_event_type_t event, sl_bt_ots_object_metadata_read_parameters_t *parameters) )(sl_bt_ots_client_handle_t client, sl_bt_ots_object_id_t *object, uint16_t status, sl_bt_ots_object_metadata_read_event_type_t event, sl_bt_ots_object_metadata_read_parameters_t *parameters)
Type | Direction | Argument Name | Description |
---|---|---|---|
[in] | client | Client handle. | |
[in] | object | Object ID. | |
[in] | status | GATT status. 0 means success. | |
[in] | event | Metadata read event. | |
[in] | parameters | Metadata event parameters. NULL, if status differs from 0 (success). |
OTS Object Client callback function prototype to handle metadata reads
sl_bt_ots_client_data_receive_callback_t#
typedef sl_bt_ots_l2cap_credit_t(* sl_bt_ots_client_data_receive_callback_t) (sl_bt_ots_client_handle_t client, sl_bt_ots_object_id_t *object, uint32_t current_offset, uint8_t *data, uint32_t size) )(sl_bt_ots_client_handle_t client, sl_bt_ots_object_id_t *object, uint32_t current_offset, uint8_t *data, uint32_t size)
Type | Direction | Argument Name | Description |
---|---|---|---|
[in] | client | Client handle. | |
[in] | object | Object ID. | |
[in] | current_offset | Current offset from the beginning of the object. | |
[in] | data | Pointer to the received data. | |
[in] | size | Size of the received data. |
OTS Object Client callback function prototype to handle data reception Returns
Credits to give to the transmitter.
sl_bt_ots_client_data_transmit_callback_t#
typedef void(* sl_bt_ots_client_data_transmit_callback_t) (sl_bt_ots_client_handle_t client, sl_bt_ots_object_id_t *object, uint32_t current_offset, uint32_t size, uint8_t **data, uint32_t *data_size) )(sl_bt_ots_client_handle_t client, sl_bt_ots_object_id_t *object, uint32_t current_offset, uint32_t size, uint8_t **data, uint32_t *data_size)
Type | Direction | Argument Name | Description |
---|---|---|---|
[in] | client | Client handle. | |
[in] | object | Object ID reference. | |
[in] | offset | Current offset of requested data | |
[in] | size | Maximum size of requested data | |
[out] | data | Pointer of pointer to data | |
[out] | data_size | Size of the provided data |
OTS Object Client callback function prototype to handle data transmission
sl_bt_ots_client_data_transfer_finished_t#
typedef void(* sl_bt_ots_client_data_transfer_finished_t) (sl_bt_ots_client_handle_t client, sl_bt_ots_object_id_t *object, sl_bt_ots_transfer_result_t result) )(sl_bt_ots_client_handle_t client, sl_bt_ots_object_id_t *object, sl_bt_ots_transfer_result_t result)
Type | Direction | Argument Name | Description |
---|---|---|---|
[in] | client | Client handle. | |
[in] | object | Object ID. | |
[in] | result | Status of the finish. |
OTS Object Client callback function prototype to handle transmission status
sl_bt_ots_client_group_metadata_read_t#
typedef void(* sl_bt_ots_client_group_metadata_read_t) (sl_bt_ots_client_handle_t client, sl_bt_ots_object_t *object, sl_bt_ots_metadata_fields_t remaining_fields, sl_status_t result) )(sl_bt_ots_client_handle_t client, sl_bt_ots_object_t *object, sl_bt_ots_metadata_fields_t remaining_fields, sl_status_t result)
Type | Direction | Argument Name | Description |
---|---|---|---|
[in] | client | Client handle. | |
[in] | object | Object reference that passed to read metadata. | |
[in] | remaining_fields | Bitfield of remaining fields. The value is 0 if all the fields was read successfully. | |
[in] | result | Status of the read operation. |
OTS Object Client callback function prototype to handle metadata read.
sl_bt_ots_client_init_callback_t#
typedef void(* sl_bt_ots_client_init_callback_t) (sl_bt_ots_client_handle_t client, sl_status_t result, sl_bt_ots_gattdb_handles_t *gattdb_handles) )(sl_bt_ots_client_handle_t client, sl_status_t result, sl_bt_ots_gattdb_handles_t *gattdb_handles)
Type | Direction | Argument Name | Description |
---|---|---|---|
[in] | client | Client handle. | |
[in] | result | Status of the initialization. | |
[in] | gattdb_handles | GATT database handles. |
OTS Object Client callback function prototype to handle initialization status.
sl_bt_ots_client_t#
typedef struct sl_bt_ots_client sl_bt_ots_client_t
OTS Object Client instance type.
sl_bt_ots_oacp_features_t#
typedef uint32_t sl_bt_ots_oacp_features_t
Object Action Control Point Features.
sl_bt_ots_olcp_features_t#
typedef uint32_t sl_bt_ots_olcp_features_t
Object List Control Point Features.
sl_bt_ots_object_first_created_t#
typedef sl_bt_ots_time_t sl_bt_ots_object_first_created_t
Object first created.
sl_bt_ots_object_last_modified_t#
typedef sl_bt_ots_time_t sl_bt_ots_object_last_modified_t
Object last modified.
sl_bt_ots_oacp_execute_parameters_t#
typedef uint8array sl_bt_ots_oacp_execute_parameters_t
OACP Execute opcode parameters.
sl_bt_ots_object_list_filter_name_parameters_t#
typedef sl_bt_ots_object_name_t sl_bt_ots_object_list_filter_name_parameters_t
Name filter parameters.
sl_bt_ots_object_list_filter_type_parameters_t#
typedef sl_bt_ots_object_type_t sl_bt_ots_object_list_filter_type_parameters_t
sl_bt_ots_object_changed_flags_t#
typedef uint8_t sl_bt_ots_object_changed_flags_t
Object change flags.
sl_bt_ots_compare_t#
typedef int(* sl_bt_ots_compare_t) (uint8_t *key_1, uint8_t *key_2) )(uint8_t *key_1, uint8_t *key_2)
Type | Direction | Argument Name | Description |
---|---|---|---|
[in] | key_1 | Pointer to key 1 | |
[in] | key_2 | Pointer to key 2 |
Function prototype to compare keys (for list ordering) Returns
0 if key_1 is equal to key_2, less than 0 if key_2 < key_1 and more than 0 otherwise.
Variable Documentation#
sl_bt_ots_characteristic_uuids#
const uint16_t sl_bt_ots_characteristic_uuids[SL_BT_OTS_CHARACTERISTIC_UUID_COUNT]
Array of OTS Characteristic UUIDs.
Function Documentation#
SL_ENUM#
SL_ENUM (sl_bt_ots_client_status_t )
OTS Object Client status.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_status_t | N/A |
sl_bt_ots_client_init#
sl_status_t sl_bt_ots_client_init (sl_bt_ots_client_handle_t client, uint8_t connection, uint32_t service, sl_bt_ots_client_callbacks_t * callbacks, sl_bt_ots_gattdb_handles_t * gattdb_handles)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
uint8_t | [in] | connection | Client connection handle. |
uint32_t | [in] | service | GATT database handle for the OTS service. |
sl_bt_ots_client_callbacks_t * | [in] | callbacks | Client callbacks' structure. |
sl_bt_ots_gattdb_handles_t * | [in] | gattdb_handles | GATT database handles or NULL if not present. |
Initialize Object Client. Returns
Status code
sl_bt_ots_client_read_ots_features#
sl_status_t sl_bt_ots_client_read_ots_features (sl_bt_ots_client_handle_t client)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
Read Object Transfer Service Features supported by the Server.
Read response is given in callback. Returns
Status code
sl_bt_ots_client_read_object_name#
sl_status_t sl_bt_ots_client_read_object_name (sl_bt_ots_client_handle_t client)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
Read Object Name of the Current Object.
Read response is given in callback. Returns
Status code
sl_bt_ots_client_read_object_type#
sl_status_t sl_bt_ots_client_read_object_type (sl_bt_ots_client_handle_t client)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
Read Object Type of the Current Object.
Read response is given in callback. Returns
Status code
sl_bt_ots_client_read_object_size#
sl_status_t sl_bt_ots_client_read_object_size (sl_bt_ots_client_handle_t client)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
Read Object Size of the Current Object.
Read response is given in callback. Returns
Status code
sl_bt_ots_client_read_object_first_created#
sl_status_t sl_bt_ots_client_read_object_first_created (sl_bt_ots_client_handle_t client)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
Read Object First Created time of the Current Object.
Read response is given in callback. Returns
Status code
sl_bt_ots_client_read_object_last_modified#
sl_status_t sl_bt_ots_client_read_object_last_modified (sl_bt_ots_client_handle_t client)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
Read Object Last Modifed time of the Current Object.
Read response is given in callback. Returns
Status code
sl_bt_ots_client_read_object_id#
sl_status_t sl_bt_ots_client_read_object_id (sl_bt_ots_client_handle_t client)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
Read Object ID of the Current Object.
Read response is given in callback. Returns
Status code
sl_bt_ots_client_read_object_properties#
sl_status_t sl_bt_ots_client_read_object_properties (sl_bt_ots_client_handle_t client)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
Read Object Properties of the Current Object.
Read response is given in callback. Returns
Status code
sl_bt_ots_client_write_name#
sl_status_t sl_bt_ots_client_write_name (sl_bt_ots_client_handle_t client, char * name, uint8_t size)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
char * | [in] | name | String containing the new name of the object. |
uint8_t | [in] | size | The size of the name argument. |
Write Object Name of the Current Object.
Write response is given in callback. Returns
Status code
sl_bt_ots_client_write_object_first_created#
sl_status_t sl_bt_ots_client_write_object_first_created (sl_bt_ots_client_handle_t client, sl_bt_ots_time_t * time)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
sl_bt_ots_time_t * | [in] | time | Pointer to time structure. |
Write Object First Created field of the Current Object.
Write response is given in callback. Returns
Status code
sl_bt_ots_client_write_object_last_modified#
sl_status_t sl_bt_ots_client_write_object_last_modified (sl_bt_ots_client_handle_t client, sl_bt_ots_time_t * time)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
sl_bt_ots_time_t * | [in] | time | Pointer to time structure. |
Write Object Last Modifed field of the Current Object.
Write response is given in callback. Returns
Status code
sl_bt_ots_client_write_object_properties#
sl_status_t sl_bt_ots_client_write_object_properties (sl_bt_ots_client_handle_t client, sl_bt_ots_object_properties_t properties)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
sl_bt_ots_object_properties_t | [in] | properties | Properties bitfield. Possible values:
|
Write Object Properties field of the Current Object.
Write response is given in callback. Returns
Status code
sl_bt_ots_client_olcp_first#
sl_status_t sl_bt_ots_client_olcp_first (sl_bt_ots_client_handle_t client)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
Select the first object as Current Object.
Returns
Status code
sl_bt_ots_client_olcp_last#
sl_status_t sl_bt_ots_client_olcp_last (sl_bt_ots_client_handle_t client)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
Select the last object as Current Object.
Returns
Status code
sl_bt_ots_client_olcp_previous#
sl_status_t sl_bt_ots_client_olcp_previous (sl_bt_ots_client_handle_t client)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
Select the previous object as Current Object.
Returns
Status code
sl_bt_ots_client_olcp_next#
sl_status_t sl_bt_ots_client_olcp_next (sl_bt_ots_client_handle_t client)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
Select the next object as Current Object.
Returns
Status code
sl_bt_ots_client_olcp_go_to#
sl_status_t sl_bt_ots_client_olcp_go_to (sl_bt_ots_client_handle_t client, sl_bt_ots_object_id_t * object)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
sl_bt_ots_object_id_t * | [in] | object | Object ID. |
Select the specified object as Current Object.
Returns
Status code
sl_bt_ots_client_olcp_order#
sl_status_t sl_bt_ots_client_olcp_order (sl_bt_ots_client_handle_t client, sl_bt_ots_list_sort_order_t order)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
sl_bt_ots_list_sort_order_t | [in] | order | List sort order. |
Select the List Sort Order.
Returns
Status code
sl_bt_ots_client_olcp_request_number_of_objects#
sl_status_t sl_bt_ots_client_olcp_request_number_of_objects (sl_bt_ots_client_handle_t client)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
Request total number of objects.
Returns
Status code
sl_bt_ots_client_olcp_clear_marking#
sl_status_t sl_bt_ots_client_olcp_clear_marking (sl_bt_ots_client_handle_t client)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
Clear marking of objects.
Returns
Status code
sl_bt_ots_client_read_object_list_filter#
sl_status_t sl_bt_ots_client_read_object_list_filter (sl_bt_ots_client_handle_t client)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
Read object list filter.
Read response is given in callback. Returns
Status code
sl_bt_ots_client_write_object_list_filter#
sl_status_t sl_bt_ots_client_write_object_list_filter (sl_bt_ots_client_handle_t client, sl_bt_ots_object_list_filter_content_t filter)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
sl_bt_ots_object_list_filter_content_t | [in] | filter | Filter type and arguments to set. |
Write/set object list filter.
Write response is given in callback. Returns
Status code
sl_bt_ots_client_oacp_create_object#
sl_status_t sl_bt_ots_client_oacp_create_object (sl_bt_ots_client_handle_t client, uint32_t size, sl_bt_ots_object_type_t type)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
uint32_t | [in] | size | Object size. |
sl_bt_ots_object_type_t | [in] | type | Object type. |
Create new object.
Write response is given in callback. Returns
Status code
sl_bt_ots_client_oacp_delete_object#
sl_status_t sl_bt_ots_client_oacp_delete_object (sl_bt_ots_client_handle_t client)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
Delete current object.
Write response is given in callback. Returns
Status code
sl_bt_ots_client_oacp_calculate_checksum#
sl_status_t sl_bt_ots_client_oacp_calculate_checksum (sl_bt_ots_client_handle_t client, uint32_t offset, uint32_t length)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
uint32_t | [in] | offset | Offset in bytes to calculate checksum from. |
uint32_t | [in] | length | Length of calculation in bytes. |
Calculate checksum for Current Object.
Returns
Status code
sl_bt_ots_client_oacp_execute#
sl_status_t sl_bt_ots_client_oacp_execute (sl_bt_ots_client_handle_t client, uint8_t * optional_data, uint8_t optional_data_size)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
uint8_t * | [in] | optional_data | Optional data content for execution. |
uint8_t | [in] | optional_data_size | Length of the optional data in bytes. |
Execute Current Object.
Returns
Status code
sl_bt_ots_client_oacp_read#
sl_status_t sl_bt_ots_client_oacp_read (sl_bt_ots_client_handle_t client, uint32_t offset, uint32_t length, uint16_t max_sdu, uint16_t max_pdu)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
uint32_t | [in] | offset | Offset to read the object from in bytes. |
uint32_t | [in] | length | Length of data in bytes to be read. |
uint16_t | [in] | max_sdu | The Maximum Service Data Unit size the local channel endpoint can accept Range: 23 to 65533. |
uint16_t | [in] | max_pdu | The maximum PDU payload size the local channel endpoint can accept Range:23 to 252. |
Read Current Object.
Returns
Status code
sl_bt_ots_client_oacp_write#
sl_status_t sl_bt_ots_client_oacp_write (sl_bt_ots_client_handle_t client, uint32_t offset, uint32_t length, sl_bt_ots_oacp_write_mode_t mode, uint16_t max_sdu, uint16_t max_pdu)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
uint32_t | [in] | offset | Offset to write the object from in bytes. |
uint32_t | [in] | length | Length of data in bytes to be written. |
sl_bt_ots_oacp_write_mode_t | [in] | mode | Write mode. |
uint16_t | [in] | max_sdu | The Maximum Service Data Unit size the local channel endpoint can accept Range: 23 to 65533. |
uint16_t | [in] | max_pdu | The maximum PDU payload size the local channel endpoint can accept Range:23 to 252. |
Write Current Object.
Returns
Status code
sl_bt_ots_client_oacp_abort#
sl_status_t sl_bt_ots_client_oacp_abort (sl_bt_ots_client_handle_t client)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
Abort current read.
Returns
Status code
sl_bt_ots_client_increase_credit#
sl_status_t sl_bt_ots_client_increase_credit (sl_bt_ots_client_handle_t client, uint16_t credit)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
uint16_t | [in] | credit | Number of credit to give (in packets). |
Increase the credit for the L2CAP transfer that is in progress Returns
Response code
sl_bt_ots_client_abort#
sl_status_t sl_bt_ots_client_abort (sl_bt_ots_client_handle_t client)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_client_handle_t | [in] | client | Client handle. |
Abort current write or read operation. Close the L2CAP channel in case of Write operation is in progress or execute OACP Abort in case of Read operation is in progress.
Returns
Status code
SL_ENUM#
SL_ENUM (sl_bt_ots_characteristic_uuid_index )
OTS Characteristic UUID indices.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_characteristic_uuid_index | N/A |
typedef#
typedef (struct { sl_bt_ots_oacp_features_t oacp_features;sl_bt_ots_olcp_features_t olcp_features;} )
Object Transfer Service features.
Type | Direction | Argument Name | Description |
---|---|---|---|
struct { sl_bt_ots_oacp_features_t oacp_features;sl_bt_ots_olcp_features_t olcp_features;} | N/A |
typedef#
typedef (struct { uint16_t length;char *name;} )
Object name.
Type | Direction | Argument Name | Description |
---|---|---|---|
struct { uint16_t length;char *name;} | N/A |
typedef#
typedef (struct { uint32_t current_size;uint32_t allocated_size;} )
Object size.
Type | Direction | Argument Name | Description |
---|---|---|---|
struct { uint32_t current_size;uint32_t allocated_size;} | N/A |
typedef#
typedef (struct { uint8_t rfu;uint8_t usable[SL_BT_OTS_OBJECT_ID_USABLE_SIZE];} )
Complete Object ID.
Type | Direction | Argument Name | Description |
---|---|---|---|
struct { uint8_t rfu;uint8_t usable[SL_BT_OTS_OBJECT_ID_USABLE_SIZE];} | N/A |
SL_ENUM#
SL_ENUM (sl_bt_ots_object_metadata_write_event_type_t )
Object metadata write event type.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_object_metadata_write_event_type_t | N/A |
SL_ENUM#
SL_ENUM (sl_bt_ots_object_metadata_write_response_code_t )
Object metadata write response codes.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_object_metadata_write_response_code_t | N/A |
SL_ENUM#
SL_ENUM (sl_bt_ots_object_metadata_read_event_type_t )
Object metadata read event type.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_object_metadata_read_event_type_t | N/A |
SL_ENUM#
SL_ENUM (sl_bt_ots_object_metadata_read_response_code_t )
Object metadata read response codes.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_object_metadata_read_response_code_t | N/A |
SL_ENUM#
SL_ENUM (sl_bt_ots_oacp_opcode_t )
OACP opcode.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_oacp_opcode_t | N/A |
SL_ENUM#
SL_ENUM (sl_bt_ots_oacp_response_code_t )
OACP response code.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_oacp_response_code_t | N/A |
typedef#
typedef (struct { uint32_t size;uint8_t type[SL_BT_OTS_UUID_SIZE_128];} )
OACP Create opcode parameters.
Type | Direction | Argument Name | Description |
---|---|---|---|
struct { uint32_t size;uint8_t type[SL_BT_OTS_UUID_SIZE_128];} | N/A |
typedef#
typedef (struct { uint32_t offset;uint32_t length;} )
OACP Calculate Checksum opcode parameters.
Type | Direction | Argument Name | Description |
---|---|---|---|
struct { uint32_t offset;uint32_t length;} | N/A |
OACP Read opcode parameters.
typedef#
typedef (struct { uint32_t offset;uint32_t length;sl_bt_ots_oacp_write_mode_t mode;} )
OACP Write opcode parameters.
Type | Direction | Argument Name | Description |
---|---|---|---|
struct { uint32_t offset;uint32_t length;sl_bt_ots_oacp_write_mode_t mode;} | N/A |
SL_ENUM#
SL_ENUM (sl_bt_ots_transfer_result_t )
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_transfer_result_t | N/A |
typedef#
typedef (struct { sl_bt_ots_oacp_opcode_t opcode;uint8_t data[];} )
OACP Message.
Type | Direction | Argument Name | Description |
---|---|---|---|
struct { sl_bt_ots_oacp_opcode_t opcode;uint8_t data[];} | N/A |
typedef#
typedef (struct { sl_bt_ots_oacp_opcode_t response_opcode;sl_bt_ots_oacp_opcode_t opcode;sl_bt_ots_oacp_response_code_t response;uint8_t data[];} )
OACP response.
Type | Direction | Argument Name | Description |
---|---|---|---|
struct { sl_bt_ots_oacp_opcode_t response_opcode;sl_bt_ots_oacp_opcode_t opcode;sl_bt_ots_oacp_response_code_t response;uint8_t data[];} | N/A |
SL_ENUM#
SL_ENUM (sl_bt_ots_olcp_opcode_t )
OACP opcode.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_olcp_opcode_t | N/A |
SL_ENUM#
SL_ENUM (sl_bt_ots_olcp_response_code_t )
OLCP response code.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_olcp_response_code_t | N/A |
SL_ENUM#
SL_ENUM (sl_bt_ots_list_sort_order_t )
List Sort Order.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_list_sort_order_t | N/A |
typedef#
typedef (struct { sl_bt_ots_object_id_t id;} )
OLCP Go To opcode parameters.
Type | Direction | Argument Name | Description |
---|---|---|---|
struct { sl_bt_ots_object_id_t id;} | N/A |
typedef#
typedef (struct { sl_bt_ots_list_sort_order_t list_sort_order;} )
OLCP Order opcode parameters.
Type | Direction | Argument Name | Description |
---|---|---|---|
struct { sl_bt_ots_list_sort_order_t list_sort_order;} | N/A |
typedef#
typedef (struct { sl_bt_ots_olcp_opcode_t opcode;uint8_t data[];} )
OLCP message.
Type | Direction | Argument Name | Description |
---|---|---|---|
struct { sl_bt_ots_olcp_opcode_t opcode;uint8_t data[];} | N/A |
typedef#
typedef (struct { sl_bt_ots_olcp_opcode_t response_opcode;sl_bt_ots_olcp_opcode_t opcode;sl_bt_ots_olcp_response_code_t response;uint32_t number_of_objects;} )
OLCP response message.
Type | Direction | Argument Name | Description |
---|---|---|---|
struct { sl_bt_ots_olcp_opcode_t response_opcode;sl_bt_ots_olcp_opcode_t opcode;sl_bt_ots_olcp_response_code_t response;uint32_t number_of_objects;} | N/A |
SL_ENUM#
SL_ENUM (sl_bt_ots_object_list_filter_type_t )
Object List Filter.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_ots_object_list_filter_type_t | N/A |
typedef#
typedef (struct { sl_bt_ots_time_t from;sl_bt_ots_time_t to;} )
Time filter parameters.
Type | Direction | Argument Name | Description |
---|---|---|---|
struct { sl_bt_ots_time_t from;sl_bt_ots_time_t to;} | N/A |
typedef#
typedef (struct { uint32_t min;uint32_t max;} )
Size filter parameters.
Type | Direction | Argument Name | Description |
---|---|---|---|
struct { uint32_t min;uint32_t max;} | N/A |
typedef#
typedef (struct { sl_bt_ots_object_list_filter_type_t filter_type;union { sl_bt_ots_object_list_filter_name_parameters_t name;sl_bt_ots_object_list_filter_time_parameters_t time;sl_bt_ots_object_list_filter_size_parameters_t size;sl_bt_ots_object_list_filter_type_parameters_t type;} parameters;} )
Object List Filter content.
Type | Direction | Argument Name | Description |
---|---|---|---|
struct { sl_bt_ots_object_list_filter_type_t filter_type;union { sl_bt_ots_object_list_filter_name_parameters_t name;sl_bt_ots_object_list_filter_time_parameters_t time;sl_bt_ots_object_list_filter_size_parameters_t size;sl_bt_ots_object_list_filter_type_parameters_t type;} parameters;} | N/A |
typedef#
typedef (struct { sl_bt_ots_object_changed_flags_t flags;sl_bt_ots_object_id_t object;} )
Object Changed content.
Type | Direction | Argument Name | Description |
---|---|---|---|
struct { sl_bt_ots_object_changed_flags_t flags;sl_bt_ots_object_id_t object;} | N/A |
typedef#
typedef (struct { uint32_t service;union { uint16_t array[12];1(struct { uint16_t ots_feature;uint16_t object_name;uint16_t object_type;uint16_t object_size;uint16_t object_first_created;uint16_t object_last_modified;uint16_t object_id;uint16_t object_properties;uint16_t object_action_control_point;uint16_t object_list_control_point;uint16_t object_list_filter;uint16_t object_changed;}) handles;} characteristics;} )
OTS GATT database handles.
Type | Direction | Argument Name | Description |
---|---|---|---|
struct { uint32_t service;union { uint16_t array[12];1(struct { uint16_t ots_feature;uint16_t object_name;uint16_t object_type;uint16_t object_size;uint16_t object_first_created;uint16_t object_last_modified;uint16_t object_id;uint16_t object_properties;uint16_t object_action_control_point;uint16_t object_list_control_point;uint16_t object_list_filter;uint16_t object_changed;}) handles;} characteristics;} | N/A |
typedef#
typedef (struct { sl_slist_node_t node;uint8_t *key;uint8_t *value;} )
Datatype for object list item.
Type | Direction | Argument Name | Description |
---|---|---|---|
struct { sl_slist_node_t node;uint8_t *key;uint8_t *value;} | N/A |
typedef#
typedef (struct { sl_bt_ots_compare_t compare;sl_bt_ots_list_item_t *list;} )
Datatype for object list.
Type | Direction | Argument Name | Description |
---|---|---|---|
struct { sl_bt_ots_compare_t compare;sl_bt_ots_list_item_t *list;} | N/A |