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
Enumerations#
Typedefs#
OTS Object Client handle.
OTS Object Client instance type.
Object Action Control Point Features.
Object List Control Point Features.
Object Transfer Service features.
Object name.
Object size.
Object first created.
Object last modified.
Complete Object ID.
Object properties.
Metadata fields type.
OACP Create opcode parameters.
OACP Calculate Checksum opcode parameters.
OACP Execute opcode parameters.
OACP Read opcode parameters.
Object write mode flags.
OACP Write opcode parameters.
Data response credits.
OACP Message.
OACP response.
OLCP Go To opcode parameters.
OLCP Order opcode parameters.
OLCP message.
OLCP response message.
Name filter parameters.
Time filter parameters.
Size filter parameters.
Object List Filter content.
Object change flags.
Object Changed content.
OTS GATT database handles.
Datatype for object list item.
Datatype for object list.
Variables#
Array of OTS Characteristic UUIDs.
Functions#
Macros#
OTS Subscription status for no subscription.
OTS Characteristics.
Enumeration Documentation#
sl_bt_ots_client_status_t#
sl_bt_ots_client_status_t
Enumerator | |
---|---|
CLIENT_STATUS_BEGIN | |
CLIENT_STATUS_DISCOVERY | |
CLIENT_STATUS_SUBSCRIBE_OLCP | |
CLIENT_STATUS_SUBSCRIBE_OACP | |
CLIENT_STATUS_SUBSCRIBE_OBJECT_CHANGED | |
CLIENT_STATUS_READ_FEATURES | |
CLIENT_STATUS_PRIOR_CHANNEL | |
CLIENT_STATUS_INITIALIZED | |
CLIENT_STATUS_WAIT_READ | |
CLIENT_STATUS_WAIT_WRITE | |
CLIENT_STATUS_WAIT_OACP | |
CLIENT_STATUS_WAIT_OACP_INDICATION | |
CLIENT_STATUS_WAIT_OACP_TRANSFER | |
CLIENT_STATUS_WAIT_OLCP | |
CLIENT_STATUS_WAIT_OLCP_INDICATION | |
CLIENT_STATUS_ERROR | |
CLIENT_STATUS_DISCONNECTED |
sl_bt_ots_characteristic_uuid_index#
sl_bt_ots_characteristic_uuid_index
Enumerator | |
---|---|
SL_BT_OTS_CHARACTERISTIC_UUID_INDEX_OTS_FEATURE | |
SL_BT_OTS_CHARACTERISTIC_UUID_INDEX_OBJECT_NAME | |
SL_BT_OTS_CHARACTERISTIC_UUID_INDEX_OBJECT_TYPE | |
SL_BT_OTS_CHARACTERISTIC_UUID_INDEX_OBJECT_SIZE | |
SL_BT_OTS_CHARACTERISTIC_UUID_INDEX_OBJECT_FIRST_CREATED | |
SL_BT_OTS_CHARACTERISTIC_UUID_INDEX_OBJECT_LAST_MODIFIED | |
SL_BT_OTS_CHARACTERISTIC_UUID_INDEX_OBJECT_ID | |
SL_BT_OTS_CHARACTERISTIC_UUID_INDEX_OBJECT_PROPERTIES | |
SL_BT_OTS_CHARACTERISTIC_UUID_INDEX_OACP | |
SL_BT_OTS_CHARACTERISTIC_UUID_INDEX_OLCP | |
SL_BT_OTS_CHARACTERISTIC_UUID_INDEX_OBJECT_LIST_FILTER | |
SL_BT_OTS_CHARACTERISTIC_UUID_INDEX_OBJECT_CHANGED | |
SL_BT_OTS_CHARACTERISTIC_UUID_INDEX_SIZE | |
SL_BT_OTS_CHARACTERISTIC_UUID_INDEX_INVALID |
sl_bt_ots_object_metadata_write_event_type_t#
sl_bt_ots_object_metadata_write_event_type_t
Enumerator | |
---|---|
SL_BT_OTS_OBJECT_METADATA_WRITE_OBJECT_NAME | Write object name event type. |
SL_BT_OTS_OBJECT_METADATA_WRITE_OBJECT_FIRST_CREATED | Write Object First Created event type. |
SL_BT_OTS_OBJECT_METADATA_WRITE_OBJECT_LAST_MODIFIED | Write Object Last Modified Created event type. |
SL_BT_OTS_OBJECT_METADATA_WRITE_OBJECT_PROPERTIES | Write Object Properties event type. |
sl_bt_ots_object_metadata_write_response_code_t#
sl_bt_ots_object_metadata_write_response_code_t
Enumerator | |
---|---|
SL_BT_OTS_OBJECT_METADATA_WRITE_RESPONSE_CODE_SUCCESS | Successful write. |
SL_BT_OTS_OBJECT_METADATA_WRITE_RESPONSE_CODE_WRITE_REQUEST_REJECTED | Write rejected. |
SL_BT_OTS_OBJECT_METADATA_WRITE_RESPONSE_CODE_OBJECT_NOT_SELECTED | No object selected. |
SL_BT_OTS_OBJECT_METADATA_WRITE_RESPONSE_CODE_CONCURRENCY_LIMIT_EXCEEDED | Concurrency limit exceeded. |
SL_BT_OTS_OBJECT_METADATA_WRITE_RESPONSE_CODE_OBJECT_NAME_ALREADY_EXISTS | Object name already exists. |
SL_BT_OTS_OBJECT_METADATA_WRITE_RESPONSE_CODE_NOT_SUPPORTED | Not supported operation. |
sl_bt_ots_object_metadata_read_event_type_t#
sl_bt_ots_object_metadata_read_event_type_t
Enumerator | |
---|---|
SL_BT_OTS_OBJECT_METADATA_READ_OBJECT_NAME | Read Object Name event type. |
SL_BT_OTS_OBJECT_METADATA_READ_OBJECT_TYPE | Read Object Type event type. |
SL_BT_OTS_OBJECT_METADATA_READ_OBJECT_SIZE | Read Object Size event type. |
SL_BT_OTS_OBJECT_METADATA_READ_OBJECT_FIRST_CREATED | Read Object First Created event type. |
SL_BT_OTS_OBJECT_METADATA_READ_OBJECT_LAST_MODIFIED | Read Object Last Modified event type. |
SL_BT_OTS_OBJECT_METADATA_READ_OBJECT_ID | Read Object ID event type. |
SL_BT_OTS_OBJECT_METADATA_READ_OBJECT_PROPERTIES | Read Object Properties event type. |
sl_bt_ots_object_metadata_read_response_code_t#
sl_bt_ots_object_metadata_read_response_code_t
Enumerator | |
---|---|
SL_BT_OTS_OBJECT_METADATA_READ_RESPONSE_CODE_SUCCESS | Successful read. |
SL_BT_OTS_OBJECT_METADATA_READ_RESPONSE_CODE_OBJECT_NOT_SELECTED | Object is not selected. |
SL_BT_OTS_OBJECT_METADATA_READ_RESPONSE_CODE_CONCURRENCY_LIMIT_EXCEEDED | Concurrency limit exceeded. |
SL_BT_OTS_OBJECT_METADATA_READ_RESPONSE_CODE_NOT_SUPPORTED | Not supported operation. |
sl_bt_ots_oacp_opcode_t#
sl_bt_ots_oacp_opcode_t
Enumerator | |
---|---|
SL_BT_OTS_OACP_OPCODE_INVALID | Invalid OACP opcode. |
SL_BT_OTS_OACP_OPCODE_CREATE | OACP Create Object opcode. Client can create a new object by issuing this opcode with size and type parameters. After a successful creation, the object metadata should be set by the client. |
SL_BT_OTS_OACP_OPCODE_DELETE | OACP Delete Object opcode. Client can delete Current Object using this opcode. |
SL_BT_OTS_OACP_OPCODE_CALCULATE_CHECKSUM | OACP Calculate Checksum opcode. Client can start checksum calculation of the Current Object on the server by issuing this opcode with offset and length parameters. The result is sent in the server response. |
SL_BT_OTS_OACP_OPCODE_EXECUTE | OACP Execute object opcode. Client can execute the Current Object by issuing this opcode with optional user-defined parameters |
SL_BT_OTS_OACP_OPCODE_READ | OACP Read Object opcode. Client can read the Current Object by issuing this opcode with offset and length parameters. |
SL_BT_OTS_OACP_OPCODE_WRITE | OACP Write Object opcode. Client can write the Current object by issuing this opcode with offset, length and mode parameters. |
SL_BT_OTS_OACP_OPCODE_ABORT | OACP Abort opcode. Client can abort read operations using this opcode. |
SL_BT_OTS_OACP_OPCODE_RESPONSE_CODE | OACP Response opcode. It can contain checksum or execute object Parameters. |
sl_bt_ots_oacp_response_code_t#
sl_bt_ots_oacp_response_code_t
Enumerator | |
---|---|
SL_BT_OTS_OACP_RESPONSE_CODE_SUCCESS | Success. |
SL_BT_OTS_OACP_RESPONSE_CODE_OP_CODE_NOT_SUPPORTED | Opcode is not supported by the Server. |
SL_BT_OTS_OACP_RESPONSE_CODE_INVALID_PARAMETER | Invalid parameter sent by the Client. |
SL_BT_OTS_OACP_RESPONSE_CODE_INSUFFICIENT_RESOURCES | Insufficient resources. |
SL_BT_OTS_OACP_RESPONSE_CODE_INVALID_OBJECT | Current object is invalid. |
SL_BT_OTS_OACP_RESPONSE_CODE_CHANNEL_UNAVAILABLE | L2CAP channel is not available for use. |
SL_BT_OTS_OACP_RESPONSE_CODE_UNSUPPORTED_TYPE | Object Type is not supported by the server. |
SL_BT_OTS_OACP_RESPONSE_CODE_PROCEDURE_NOT_PERMITTED | Procedure is not permitted on the Current Object. |
SL_BT_OTS_OACP_RESPONSE_CODE_OBJECT_LOCKED | Object is locked by the Server. |
SL_BT_OTS_OACP_RESPONSE_CODE_OPERATION_FAILED | Operation failed due to other reason. |
sl_bt_ots_transfer_result_t#
sl_bt_ots_transfer_result_t
Enumerator | |
---|---|
SL_BT_OTS_TRANSFER_FINISHED_RESPONSE_CODE_SUCCESS | Successful data transfer. |
SL_BT_OTS_TRANSFER_FINISHED_RESPONSE_CODE_CHANNEL_ERROR | Channel error occurred. |
SL_BT_OTS_TRANSFER_FINISHED_RESPONSE_CODE_CONNECTION_LOST | Disconnected during transfer. |
SL_BT_OTS_TRANSFER_FINISHED_RESPONSE_CODE_TIMEOUT | Timeout occurred. |
SL_BT_OTS_TRANSFER_FINISHED_RESPONSE_CODE_ABORTED | Aborted. |
sl_bt_ots_olcp_opcode_t#
sl_bt_ots_olcp_opcode_t
Enumerator | |
---|---|
SL_BT_OTS_OLCP_OPCODE_FIRST | OACP First opcode. Mandatory opcode. Server selects the first object in the list as Current Object. Required opcode. Server can respond with:
|
SL_BT_OTS_OLCP_OPCODE_LAST | OACP Last opcode. Mandatory opcode. Server selects the last object in the list as Current Object. Required opcode. Server can respond with:
|
SL_BT_OTS_OLCP_OPCODE_PREVIOUS | OACP Previous opcode. Mandatory opcode. Server selects the previous object in the list as Current Object. Server can respond with:
|
SL_BT_OTS_OLCP_OPCODE_NEXT | OACP Next opcode. Mandatory opcode. Server selects the next object in the list as Current Object. Server can respond with:
|
SL_BT_OTS_OLCP_OPCODE_GO_TO | OACP Go To opcode. Optional opcode. Server selects object specified by the object ID parameter as Current Object. Server can respond with:
|
SL_BT_OTS_OLCP_OPCODE_ORDER | OACP Order opcode. Optional opcode. Server shall arrange the list of objects in order according to the value of the List Sort Order parameter. Server can respond with:
|
SL_BT_OTS_OLCP_OPCODE_REQUEST_NUMBER_OF_OBJECTS | OACP Request Number of Objects opcode. Optional opcode. The Server shall report the total number of objects found in the list of objects. Server can respond with:
|
SL_BT_OTS_OLCP_OPCODE_CLEAR_MARKING | OACP Clear Marking opcode. Optional opcode. Server shall update the marking of objects so that all objects in the list of objects become unmarked. Server can respond with:
|
SL_BT_OTS_OLCP_OPCODE_RESPONSE_CODE | OACP Response code opcode. Mandatory opcode. The Server indicates the response using this opcode. The response can contain parameters, like the Number of Objects. |
sl_bt_ots_olcp_response_code_t#
sl_bt_ots_olcp_response_code_t
Enumerator | |
---|---|
SL_BT_OTS_OLCP_RESPONSE_CODE_SUCCESS | Operation was successful. |
SL_BT_OTS_OLCP_RESPONSE_CODE_OP_CODE_NOT_SUPPORTED | Opcode is not supported. |
SL_BT_OTS_OLCP_RESPONSE_CODE_INVALID_PARAMETER | Invalid parameter. |
SL_BT_OTS_OLCP_RESPONSE_CODE_OPEATION_FAILED | Operation failed. |
SL_BT_OTS_OLCP_RESPONSE_CODE_OUT_OF_BOUNDS | Out of bounds (next or previous). |
SL_BT_OTS_OLCP_RESPONSE_CODE_TOO_MANY_OBJECTS | Too many objects in the list (resource limitation). |
SL_BT_OTS_OLCP_RESPONSE_CODE_NO_OBJECT | Zero objects in the current list. |
SL_BT_OTS_OLCP_RESPONSE_CODE_OBJECT_ID_NOT_FOUND | No object found with the requested Object ID. |
sl_bt_ots_list_sort_order_t#
sl_bt_ots_list_sort_order_t
Enumerator | |
---|---|
SL_BT_OTS_LIST_SORT_ORDER_NAME_ASC | Sort the list in ascending order by Object Name. |
SL_BT_OTS_LIST_SORT_ORDER_TYPE_ASC | Sort the list in ascending order by Object Type. |
SL_BT_OTS_LIST_SORT_ORDER_CURRENT_SIZE_ASC | Sort the list in ascending order by Current Size. |
SL_BT_OTS_LIST_SORT_ORDER_FIRST_CREATED_ASC | Sort the list in ascending order by First Created. |
SL_BT_OTS_LIST_SORT_ORDER_LAST_MODIFIED_ASC | Sort the list in ascending order by Last Modified. |
SL_BT_OTS_LIST_SORT_ORDER_NAME_DESC | Sort the list in descending order by Object Name. |
SL_BT_OTS_LIST_SORT_ORDER_TYPE_DESC | Sort the list in descending order by Object Type. |
SL_BT_OTS_LIST_SORT_ORDER_CURRENT_SIZE_DESC | Sort the list in descending order by Current Size. |
SL_BT_OTS_LIST_SORT_ORDER_FIRST_CREATED_DESC | Sort the list in descending order by First Created. |
SL_BT_OTS_LIST_SORT_ORDER_LAST_MODIFIED_DESC | Sort the list in descending order by Last Modified. |
sl_bt_ots_object_list_filter_type_t#
sl_bt_ots_object_list_filter_type_t
Enumerator | |
---|---|
SL_BT_OTS_OBJECT_LIST_FILTER_TYPE_NO_FILTER | No filter. |
SL_BT_OTS_OBJECT_LIST_FILTER_TYPE_NAME_STARTS_WITH | Name starts with the string specified in the parameter. |
SL_BT_OTS_OBJECT_LIST_FILTER_TYPE_NAME_ENDS_WITH | Name ends with the string specified in the parameter. |
SL_BT_OTS_OBJECT_LIST_FILTER_TYPE_NAME_CONTAINS | Name contains the string specified in the parameter. |
SL_BT_OTS_OBJECT_LIST_FILTER_TYPE_NAME_IS_EXACTLY | Name is exactly the string specified in the parameter. |
SL_BT_OTS_OBJECT_LIST_FILTER_TYPE_OBJECT_TYPE | The object type (UUID) is specified in the parameter. |
SL_BT_OTS_OBJECT_LIST_FILTER_TYPE_CREATED_BETWEEN | The object is created between the time values specified with the parameters (inclusive) |
SL_BT_OTS_OBJECT_LIST_FILTER_TYPE_MODIFIED_BETWEEN | The object is modified between the time values specified with the parameters (inclusive) |
SL_BT_OTS_OBJECT_LIST_FILTER_TYPE_CURRENT_SIZE_BETWEEN | The current size is between the size values specified with the parameters (inclusive) |
SL_BT_OTS_OBJECT_LIST_FILTER_TYPE_ALLOCATED_SIZE_BETWEEN | The allocated size is between the size values specified with the parameters (inclusive) |
SL_BT_OTS_OBJECT_LIST_FILTER_TYPE_MARKED_OBJECTS | List only marked objects. |
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_features_t#
typedef struct @23 sl_bt_ots_features_t
Object Transfer Service features.
< OACP feature flags OLCP feature flags
sl_bt_ots_object_name_t#
typedef struct @24 sl_bt_ots_object_name_t
Object name.
< Length of the object name field Object name string.
sl_bt_ots_object_size_t#
typedef struct @25 sl_bt_ots_object_size_t
Object size.
< Indicates the actual size of the object Contains the allocated size of the object
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_object_id_complete_t#
typedef struct @26 sl_bt_ots_object_id_complete_t
Complete Object ID.
< First byte is Reserved for Future Use Usable data for Object ID
sl_bt_ots_oacp_create_parameters_t#
typedef struct @27 sl_bt_ots_oacp_create_parameters_t
OACP Create opcode parameters.
< Required size of the object Required type of the object
sl_bt_ots_oacp_calculate_checksum_parameters_t#
typedef struct @28 sl_bt_ots_oacp_calculate_checksum_parameters_t
OACP Calculate Checksum opcode parameters.
< Offset to calculate checksum from. Length of the data from the offset.
sl_bt_ots_oacp_execute_parameters_t#
typedef uint8array sl_bt_ots_oacp_execute_parameters_t
OACP Execute opcode parameters.
sl_bt_ots_oacp_read_parameters_t#
typedef struct @29 sl_bt_ots_oacp_read_parameters_t
OACP Read opcode parameters.
< Offset to read data from. Length of the data to be read.
sl_bt_ots_oacp_write_parameters_t#
typedef struct @30 sl_bt_ots_oacp_write_parameters_t
OACP Write opcode parameters.
< Offset of the data to be written. Length of the data to be written. Mode of write: truncation can be selected.
sl_bt_ots_oacp_message_t#
typedef struct @31 sl_bt_ots_oacp_message_t
OACP Message.
< OACP opcode Response data
sl_bt_ots_oacp_response_message_t#
typedef struct @32 sl_bt_ots_oacp_response_message_t
OACP response.
< OACP response opcode OACP opcode Response parameters Response data
sl_bt_ots_olcp_go_to_parameters_t#
typedef struct @33 sl_bt_ots_olcp_go_to_parameters_t
OLCP Go To opcode parameters.
< ID parameter
sl_bt_ots_olcp_order_parameters_t#
typedef struct @34 sl_bt_ots_olcp_order_parameters_t
OLCP Order opcode parameters.
< List Sort Order parameter
sl_bt_ots_olcp_message_t#
typedef struct @35 sl_bt_ots_olcp_message_t
OLCP message.
< OLCP opcode OLCP opcode parameters
sl_bt_ots_olcp_response_message_t#
typedef struct @36 sl_bt_ots_olcp_response_message_t
OLCP response message.
< OLCP opcode OLCP opcode OLCP response OLCP Number of Objects in response (optional)
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_time_parameters_t#
typedef struct @37 sl_bt_ots_object_list_filter_time_parameters_t
Time filter parameters.
< Inclusive time to contain objects from Inclusive time to contain objects to
sl_bt_ots_object_list_filter_size_parameters_t#
typedef struct @38 sl_bt_ots_object_list_filter_size_parameters_t
Size filter parameters.
< Inclusive size to contain objects from Inclusive size to contain objects to
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_list_filter_content_t#
typedef struct @39 sl_bt_ots_object_list_filter_content_t
Object List Filter content.
< Filter type < Name based filter parameter Time based filter parameter Size filter parameter Size filter parameter Filter parameters
sl_bt_ots_object_changed_flags_t#
typedef uint8_t sl_bt_ots_object_changed_flags_t
Object change flags.
sl_bt_ots_object_changed_content_t#
typedef struct @40 sl_bt_ots_object_changed_content_t
Object Changed content.
< Flags to indicate the type of change Object ID
sl_bt_ots_gattdb_handles_t#
typedef struct @41 sl_bt_ots_gattdb_handles_t
OTS GATT database handles.
< GATT database handle for Object Transfer Service < GATT database handle for OTS Features characteristic GATT database handle for Object Name characteristic GATT database handle for Object Type characteristic GATT database handle for Object Size characteristic GATT database handle for Object Frist Created characteristic GATT database handle for Object Last Modified characteristic GATT database handle for Object ID characteristic GATT database handle for Object Properties characteristic GATT database handle for OACP characteristic GATT database handle for OLCP characteristic GATT database handle for Object List Filter characteristic GATT database handle for Object Changed characteristic
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.
sl_bt_ots_list_item_t#
typedef struct @42 sl_bt_ots_list_item_t
Datatype for object list item.
< List node field (pointer to next) Pointer to list key (order key) Pointer to value (the Object)
sl_bt_ots_list_t#
typedef struct @43 sl_bt_ots_list_t
Datatype for object list.
< Comparator function List header
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_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