Object Client#

The Object Transfer Service (OTS) Object Client provides an API for managing objects on the remote Object Server.

Modules#

sl_bt_ots_client_callbacks_t

sl_bt_ots_client

sl_bt_object_type_variant_t

sl_bt_ots_object_type_t

sl_bt_ots_time_t

sl_bt_ots_object_id_t

sl_bt_ots_object_metadata_write_parameters_t

sl_bt_ots_object_metadata_read_parameters_t

sl_bt_ots_oacp_parameters_t

sl_bt_ots_oacp_response_data_t

sl_bt_ots_olcp_parameters_t

sl_bt_ots_object_t

sl_bt_ots_subscription_status_t

Typedefs#

typedef struct sl_bt_ots_client *

OTS Object Client handle.

typedef void(*
sl_bt_ots_client_connection_callback_t)(sl_bt_ots_client_handle_t client)
typedef void(*
sl_bt_ots_client_subscription_callback_t)(sl_bt_ots_client_handle_t client, sl_bt_ots_subscription_status_t status)
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)
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)
typedef void(*
sl_bt_ots_client_list_filter_write_callback_t)(sl_bt_ots_client_handle_t client, uint16_t status)
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)
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)
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)
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)
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_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)
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)
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)
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)
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)
typedef struct sl_bt_ots_client

OTS Object Client instance type.

typedef uint32_t

Object Action Control Point Features.

typedef uint32_t

Object List Control Point Features.

typedef uint32_t
typedef uint8_t

Metadata fields type.

typedef sl_bt_ots_oacp_opcode_t
typedef uint8array

OACP Execute opcode parameters.

typedef uint8_t

Object write mode flags.

typedef uint16_t

Data response credits.

typedef sl_bt_ots_olcp_opcode_t
typedef sl_bt_ots_object_name_t
typedef uint8_t
typedef int(*
sl_bt_ots_compare_t)(uint8_t *key_1, uint8_t *key_2)

Variables#

const uint16_t

Array of OTS Characteristic UUIDs.

Functions#

SL_ENUM(sl_bt_ots_client_status_t)

OTS Object Client status.

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)
sl_status_t
sl_bt_ots_client_read_ots_features(sl_bt_ots_client_handle_t client)
sl_status_t
sl_bt_ots_client_read_object_name(sl_bt_ots_client_handle_t client)
sl_status_t
sl_bt_ots_client_read_object_type(sl_bt_ots_client_handle_t client)
sl_status_t
sl_bt_ots_client_read_object_size(sl_bt_ots_client_handle_t client)
sl_status_t
sl_bt_ots_client_read_object_first_created(sl_bt_ots_client_handle_t client)
sl_status_t
sl_bt_ots_client_read_object_last_modified(sl_bt_ots_client_handle_t client)
sl_status_t
sl_bt_ots_client_read_object_id(sl_bt_ots_client_handle_t client)
sl_status_t
sl_bt_ots_client_read_object_properties(sl_bt_ots_client_handle_t client)
sl_status_t
sl_bt_ots_client_write_name(sl_bt_ots_client_handle_t client, char *name, uint8_t size)
sl_status_t
sl_bt_ots_client_write_object_first_created(sl_bt_ots_client_handle_t client, sl_bt_ots_time_t *time)
sl_status_t
sl_bt_ots_client_write_object_last_modified(sl_bt_ots_client_handle_t client, sl_bt_ots_time_t *time)
sl_status_t
sl_bt_ots_client_write_object_properties(sl_bt_ots_client_handle_t client, sl_bt_ots_object_properties_t properties)
sl_status_t
sl_bt_ots_client_olcp_first(sl_bt_ots_client_handle_t client)
sl_status_t
sl_bt_ots_client_olcp_last(sl_bt_ots_client_handle_t client)
sl_status_t
sl_bt_ots_client_olcp_previous(sl_bt_ots_client_handle_t client)
sl_status_t
sl_bt_ots_client_olcp_next(sl_bt_ots_client_handle_t client)
sl_status_t
sl_bt_ots_client_olcp_go_to(sl_bt_ots_client_handle_t client, sl_bt_ots_object_id_t *object)
sl_status_t
sl_bt_ots_client_olcp_order(sl_bt_ots_client_handle_t client, sl_bt_ots_list_sort_order_t order)
sl_status_t
sl_bt_ots_client_olcp_request_number_of_objects(sl_bt_ots_client_handle_t client)
sl_status_t
sl_bt_ots_client_olcp_clear_marking(sl_bt_ots_client_handle_t client)
sl_status_t
sl_bt_ots_client_read_object_list_filter(sl_bt_ots_client_handle_t client)
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)
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)
sl_status_t
sl_bt_ots_client_oacp_delete_object(sl_bt_ots_client_handle_t client)
sl_status_t
sl_bt_ots_client_oacp_calculate_checksum(sl_bt_ots_client_handle_t client, uint32_t offset, uint32_t length)
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)
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)
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)
sl_status_t
sl_bt_ots_client_oacp_abort(sl_bt_ots_client_handle_t client)
sl_status_t
sl_bt_ots_client_increase_credit(sl_bt_ots_client_handle_t client, uint16_t credit)
sl_status_t
sl_bt_ots_client_abort(sl_bt_ots_client_handle_t client)
SL_ENUM(sl_bt_ots_characteristic_uuid_index)

OTS Characteristic UUID indices.

typedef(struct { sl_bt_ots_oacp_features_t oacp_features;sl_bt_ots_olcp_features_t olcp_features;}) sl_bt_ots_features_t

Object Transfer Service features.

typedef(struct { uint16_t length;char *name;}) sl_bt_ots_object_name_t

Object name.

typedef(struct { uint32_t current_size;uint32_t allocated_size;}) sl_bt_ots_object_size_t

Object size.

typedef(struct { uint8_t rfu;uint8_t usable[SL_BT_OTS_OBJECT_ID_USABLE_SIZE];}) sl_bt_ots_object_id_complete_t

Complete Object ID.

SL_ENUM(sl_bt_ots_object_metadata_write_event_type_t)

Object metadata write event type.

SL_ENUM(sl_bt_ots_object_metadata_write_response_code_t)

Object metadata write response codes.

SL_ENUM(sl_bt_ots_object_metadata_read_event_type_t)

Object metadata read event type.

SL_ENUM(sl_bt_ots_object_metadata_read_response_code_t)

Object metadata read response codes.

SL_ENUM(sl_bt_ots_oacp_opcode_t)

OACP opcode.

SL_ENUM(sl_bt_ots_oacp_response_code_t)

OACP response code.

typedef(struct { uint32_t size;uint8_t type[SL_BT_OTS_UUID_SIZE_128];}) sl_bt_ots_oacp_create_parameters_t

OACP Create opcode parameters.

typedef(struct { uint32_t offset;uint32_t length;}) sl_bt_ots_oacp_calculate_checksum_parameters_t

OACP Calculate Checksum opcode parameters.

typedef(struct { uint32_t offset;uint32_t length;sl_bt_ots_oacp_write_mode_t mode;}) sl_bt_ots_oacp_write_parameters_t

OACP Write opcode parameters.

SL_ENUM(sl_bt_ots_transfer_result_t)
typedef(struct { sl_bt_ots_oacp_opcode_t opcode;uint8_t data[];}) sl_bt_ots_oacp_message_t

OACP Message.

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[];}) sl_bt_ots_oacp_response_message_t

OACP response.

SL_ENUM(sl_bt_ots_olcp_opcode_t)

OACP opcode.

SL_ENUM(sl_bt_ots_olcp_response_code_t)

OLCP response code.

SL_ENUM(sl_bt_ots_list_sort_order_t)

List Sort Order.

typedef(struct { sl_bt_ots_object_id_t id;}) sl_bt_ots_olcp_go_to_parameters_t

OLCP Go To opcode parameters.

typedef(struct { sl_bt_ots_list_sort_order_t list_sort_order;}) sl_bt_ots_olcp_order_parameters_t

OLCP Order opcode parameters.

typedef(struct { sl_bt_ots_olcp_opcode_t opcode;uint8_t data[];}) sl_bt_ots_olcp_message_t

OLCP message.

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;}) sl_bt_ots_olcp_response_message_t

OLCP response message.

SL_ENUM(sl_bt_ots_object_list_filter_type_t)

Object List Filter.

typedef(struct { sl_bt_ots_time_t from;sl_bt_ots_time_t to;}) sl_bt_ots_object_list_filter_time_parameters_t

Time filter parameters.

typedef(struct { uint32_t min;uint32_t max;}) sl_bt_ots_object_list_filter_size_parameters_t

Size filter parameters.

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;}) sl_bt_ots_object_list_filter_content_t

Object List Filter content.

typedef(struct { sl_bt_ots_object_changed_flags_t flags;sl_bt_ots_object_id_t object;}) sl_bt_ots_object_changed_content_t

Object Changed content.

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;}) sl_bt_ots_gattdb_handles_t

OTS GATT database handles.

typedef(struct { sl_slist_node_t node;uint8_t *key;uint8_t *value;}) sl_bt_ots_list_item_t

Datatype for object list item.

typedef(struct { sl_bt_ots_compare_t compare;sl_bt_ots_list_item_t *list;}) sl_bt_ots_list_t

Datatype for object list.

Macros#

#define
SL_BT_OTS_CLIENT_CONFIG_READ_REQUEST_QUEUE_SIZE 5
#define
SL_BT_OTS_CLIENT_CONFIG_WRITE_REQUEST_QUEUE_SIZE 1
#define
SL_BT_OTS_CLIENT_CONFIG_WRITE_REQUEST_DATA_SIZE 255
#define
ATT_STATUS_MASK 0xFF
#define
ATT_ERR_SUCCESS 0x00
#define
ATT_ERR_INVALID_HANDLE (SL_STATUS_BT_ATT_INVALID_HANDLE & ATT_STATUS_MASK)
#define
ATT_ERR_READ_NOT_PERMITTED (SL_STATUS_BT_ATT_READ_NOT_PERMITTED & ATT_STATUS_MASK)
#define
ATT_ERR_WRITE_NOT_PERMITTED (SL_STATUS_BT_ATT_WRITE_NOT_PERMITTED & ATT_STATUS_MASK)
#define
ATT_ERR_INVALID_PDU (SL_STATUS_BT_ATT_INVALID_PDU & ATT_STATUS_MASK)
#define
ATT_ERR_AUTHENTICATION (SL_STATUS_BT_ATT_INSUFFICIENT_AUTHENTICATION & ATT_STATUS_MASK)
#define
ATT_ERR_NOT_SUPPORTED (SL_STATUS_BT_ATT_REQUEST_NOT_SUPPORTED & ATT_STATUS_MASK)
#define
ATT_ERR_INVALID_OFFSET (SL_STATUS_BT_ATT_INVALID_OFFSET & ATT_STATUS_MASK)
#define
ATT_ERR_AUTHORIZATION (SL_STATUS_BT_ATT_INSUFFICIENT_AUTHORIZATION & ATT_STATUS_MASK)
#define
ATT_ERR_PREPARE_QUEUE_FULL (SL_STATUS_BT_ATT_PREPARE_QUEUE_FULL & ATT_STATUS_MASK)
#define
ATT_ERR_ATTRIBUTE_NOT_FOUND (SL_STATUS_BT_ATT_ATT_NOT_FOUND & ATT_STATUS_MASK)
#define
ATT_ERR_ATTRIBUTE_NOT_LONG (SL_STATUS_BT_ATT_ATT_NOT_LONG & ATT_STATUS_MASK)
#define
ATT_ERR_ENCRYPTION_KEY_SIZE (SL_STATUS_BT_ATT_INSUFFICIENT_ENC_KEY_SIZE & ATT_STATUS_MASK)
#define
ATT_ERR_INVALID_ATTRIBUTE_LEN (SL_STATUS_BT_ATT_INVALID_ATT_LENGTH & ATT_STATUS_MASK)
#define
ATT_ERR_UNLIKELY (SL_STATUS_BT_ATT_UNLIKELY_ERROR & ATT_STATUS_MASK)
#define
ATT_ERR_INSUFFICIENT_ENCRYPTION (SL_STATUS_BT_ATT_INSUFFICIENT_ENCRYPTION & ATT_STATUS_MASK)
#define
ATT_ERR_UNSUPPORTED_GROUP_TYPE (SL_STATUS_BT_ATT_UNSUPPORTED_GROUP_TYPE & ATT_STATUS_MASK)
#define
ATT_ERR_INSUFFICIENT_RESOURCES (SL_STATUS_BT_ATT_INSUFFICIENT_RESOURCES & ATT_STATUS_MASK)
#define
ATT_ERR_DB_OUT_OF_SYNC (SL_STATUS_BT_ATT_OUT_OF_SYNC & ATT_STATUS_MASK)
#define
ATT_ERR_VALUE_NOT_ALLOWED (SL_STATUS_BT_ATT_VALUE_NOT_ALLOWED & ATT_STATUS_MASK)
#define
ATT_ERR_IMPORER_CCCD (SL_STATUS_BT_ATT_CLIENT_CHARACTERISTIC_CONFIGURATION_DESCRIPTOR_IMPROPERLY_CONFIGURED & ATT_STATUS_MASK)
#define
ATT_ERR_WRITE_REQUEST_REJECTED 0x80
#define
ATT_ERR_OBJECT_NOT_SELECTED 0x81
#define
ATT_ERR_CONCURRENCY_LIMIT_EXCEEDED 0x82
#define
ATT_ERR_OBJECT_NAME_ALREADY_EXISTS 0x83
#define
SL_BT_OTS_OACP_FEATURE_CREATE_OP_CODE_SUPPORTED_BIT_POS 0
#define
SL_BT_OTS_OACP_FEATURE_CREATE_OP_CODE_SUPPORTED_MASK (1 << SL_BT_OTS_OACP_FEATURE_CREATE_OP_CODE_SUPPORTED_BIT_POS)
#define
SL_BT_OTS_OACP_FEATURE_DELETE_OP_CODE_SUPPORTED_BIT_POS 1
#define
SL_BT_OTS_OACP_FEATURE_DELETE_OP_CODE_SUPPORTED_MASK (1 << SL_BT_OTS_OACP_FEATURE_DELETE_OP_CODE_SUPPORTED_BIT_POS)
#define
SL_BT_OTS_OACP_FEATURE_CALCULATE_CHECKSUM_OP_CODE_SUPPORTED_BIT_POS 2
#define
SL_BT_OTS_OACP_FEATURE_CALCULATE_CHECKSUM_OP_CODE_SUPPORTED_MASK (1 << SL_BT_OTS_OACP_FEATURE_CALCULATE_CHECKSUM_OP_CODE_SUPPORTED_BIT_POS)
#define
SL_BT_OTS_OACP_FEATURE_EXECUTE_OP_CODE_SUPPORTED_BIT_POS 3
#define
SL_BT_OTS_OACP_FEATURE_EXECUTE_OP_CODE_SUPPORTED_MASK (1 << SL_BT_OTS_OACP_FEATURE_EXECUTE_OP_CODE_SUPPORTED_BIT_POS)
#define
SL_BT_OTS_OACP_FEATURE_READ_OP_CODE_SUPPORTED_BIT_POS 4
#define
SL_BT_OTS_OACP_FEATURE_READ_OP_CODE_SUPPORTED_MASK (1 << SL_BT_OTS_OACP_FEATURE_READ_OP_CODE_SUPPORTED_BIT_POS)
#define
SL_BT_OTS_OACP_FEATURE_WRITE_OP_CODE_SUPPORTED_BIT_POS 5
#define
SL_BT_OTS_OACP_FEATURE_WRITE_OP_CODE_SUPPORTED_MASK (1 << SL_BT_OTS_OACP_FEATURE_WRITE_OP_CODE_SUPPORTED_BIT_POS)
#define
SL_BT_OTS_OACP_FEATURE_APPEND_ADDITIONAL_DATA_SUPPORTED_BIT_POS 6
#define
SL_BT_OTS_OACP_FEATURE_APPEND_ADDITIONAL_DATA_SUPPORTED_MASK (1 << SL_BT_OTS_OACP_FEATURE_APPEND_ADDITIONAL_DATA_SUPPORTED_BIT_POS)
#define
SL_BT_OTS_OACP_FEATURE_TRUNCATION_OF_OBJECTS_SUPPORTED_BIT_POS 7
#define
SL_BT_OTS_OACP_FEATURE_TRUNCATION_OF_OBJECTS_SUPPORTED_MASK (1 << SL_BT_OTS_OACP_FEATURE_TRUNCATION_OF_OBJECTS_SUPPORTED_BIT_POS)
#define
SL_BT_OTS_OACP_FEATURE_PATCHING_OF_OBJECTS_SUPPORTED_BIT_POS 8
#define
SL_BT_OTS_OACP_FEATURE_PATCHING_OF_OBJECTS_SUPPORTED_MASK (1 << SL_BT_OTS_OACP_FEATURE_PATCHING_OF_OBJECTS_SUPPORTED_BIT_POS)
#define
SL_BT_OTS_OACP_FEATURE_ABORT_OP_CODE_SUPPORTED_BIT_POS 9
#define
SL_BT_OTS_OACP_FEATURE_ABORT_OP_CODE_SUPPORTED_MASK (1 << SL_BT_OTS_OACP_FEATURE_ABORT_OP_CODE_SUPPORTED_BIT_POS)
#define
SL_BT_OTS_OLCP_FEATURE_GO_TO_OP_CODE_SUPPORTED_BIT_POS 0
#define
SL_BT_OTS_OLCP_FEATURE_GO_TO_OP_CODE_SUPPORTED_MASK (1 << SL_BT_OTS_OLCP_FEATURE_GO_TO_OP_CODE_SUPPORTED_BIT_POS)
#define
SL_BT_OTS_OLCP_FEATURE_ORDER_OP_CODE_SUPPORTED_BIT_POS 1
#define
SL_BT_OTS_OLCP_FEATURE_ORDER_OP_CODE_SUPPORTED_MASK (1 << SL_BT_OTS_OLCP_FEATURE_ORDER_OP_CODE_SUPPORTED_BIT_POS)
#define
SL_BT_OTS_OLCP_FEATURE_REQUEST_NUMBER_OF_OBJECTS_OP_CODE_SUPPORTED_BIT_POS 2
#define
SL_BT_OTS_OLCP_FEATURE_REQUEST_NUMBER_OF_OBJECTS_OP_CODE_SUPPORTED_MASK (1 << SL_BT_OTS_OLCP_FEATURE_REQUEST_NUMBER_OF_OBJECTS_OP_CODE_SUPPORTED_BIT_POS)
#define
SL_BT_OTS_OLCP_FEATURE_CLEAR_MARKING_OP_CODE_SUPPORTED_BIT_POS 3
#define
SL_BT_OTS_OLCP_FEATURE_CLEAR_MARKING_OP_CODE_SUPPORTED_MASK (1 << SL_BT_OTS_OLCP_FEATURE_CLEAR_MARKING_OP_CODE_SUPPORTED_BIT_POS)
#define
SL_BT_OTS_OBJECT_PROPERTY_DELETE_BIT_POS 0
#define
SL_BT_OTS_OBJECT_PROPERTY_DELETE_MASK (1 << SL_BT_OTS_OBJECT_PROPERTY_DELETE_BIT_POS)
#define
SL_BT_OTS_OBJECT_PROPERTY_EXECUTE_BIT_POS 1
#define
SL_BT_OTS_OBJECT_PROPERTY_EXECUTE_MASK (1 << SL_BT_OTS_OBJECT_PROPERTY_EXECUTE_BIT_POS)
#define
SL_BT_OTS_OBJECT_PROPERTY_READ_BIT_POS 2
#define
SL_BT_OTS_OBJECT_PROPERTY_READ_MASK (1 << SL_BT_OTS_OBJECT_PROPERTY_READ_BIT_POS)
#define
SL_BT_OTS_OBJECT_PROPERTY_WRITE_BIT_POS 3
#define
SL_BT_OTS_OBJECT_PROPERTY_WRITE_MASK (1 << SL_BT_OTS_OBJECT_PROPERTY_WRITE_BIT_POS)
#define
SL_BT_OTS_OBJECT_PROPERTY_APPEND_BIT_POS 4
#define
SL_BT_OTS_OBJECT_PROPERTY_APPEND_MASK (1 << SL_BT_OTS_OBJECT_PROPERTY_APPEND_BIT_POS)
#define
SL_BT_OTS_OBJECT_PROPERTY_TRUNCATE_BIT_POS 5
#define
SL_BT_OTS_OBJECT_PROPERTY_TRUNCATE_MASK (1 << SL_BT_OTS_OBJECT_PROPERTY_TRUNCATE_BIT_POS)
#define
SL_BT_OTS_OBJECT_PROPERTY_PATCH_BIT_POS 6
#define
SL_BT_OTS_OBJECT_PROPERTY_PATCH_MASK (1 << SL_BT_OTS_OBJECT_PROPERTY_PATCH_BIT_POS)
#define
SL_BT_OTS_OBJECT_PROPERTY_MARK_BIT_POS 7
#define
SL_BT_OTS_OBJECT_PROPERTY_MARK_MASK (1 << SL_BT_OTS_OBJECT_PROPERTY_MARK_BIT_POS)
#define
SL_BT_OTS_OBJECT_PROPERTY_RFU_MASK undefined
#define
SL_BT_OTS_WRITE_MODE_NONE 0
#define
SL_BT_OTS_WRITE_MODE_TRUNCATE_BIT_POS 1
#define
SL_BT_OTS_WRITE_MODE_TRUNCATE_MASK (1 << SL_BT_OTS_WRITE_MODE_TRUNCATE_BIT_POS)
#define
SL_BT_OTS_OBJECT_CHANGE_SOURCE_BIT_POS 0
#define
SL_BT_OTS_OBJECT_CHANGE_SOURCE_MASK (1 << SL_BT_OTS_OBJECT_CHANGE_SOURCE_BIT_POS)
#define
SL_BT_OTS_OBJECT_CHANGE_CONTENTS_BIT_POS 1
#define
SL_BT_OTS_OBJECT_CHANGE_CONTENTS_MASK (1 << SL_BT_OTS_OBJECT_CHANGE_CONTENTS_BIT_POS)
#define
SL_BT_OTS_OBJECT_CHANGE_METADATA_BIT_POS 2
#define
SL_BT_OTS_OBJECT_CHANGE_METADATA_MASK (1 << SL_BT_OTS_OBJECT_CHANGE_METADATA_BIT_POS)
#define
SL_BT_OTS_OBJECT_CHANGE_CREATION_BIT_POS 3
#define
SL_BT_OTS_OBJECT_CHANGE_CREATION_MASK (1 << SL_BT_OTS_OBJECT_CHANGE_CREATION_BIT_POS)
#define
SL_BT_OTS_OBJECT_CHANGE_DELETION_BIT_POS 4
#define
SL_BT_OTS_OBJECT_CHANGE_DELETION_MASK (1 << SL_BT_OTS_OBJECT_CHANGE_DELETION_BIT_POS)
#define
SL_BT_OTS_DLO_OBJECT_UUID_SIZE_BIT_POS 0
#define
SL_BT_OTS_DLO_OBJECT_UUID_SIZE_MASK (1 << SL_BT_OTS_DLO_OBJECT_UUID_SIZE_BIT_POS)
#define
SL_BT_OTS_DLO_OBJECT_FIRST_CREATED_PRESENT_BIT_POS 1
#define
SL_BT_OTS_DLO_OBJECT_FIRST_CREATED_PRESENT_MASK (1 << SL_BT_OTS_DLO_OBJECT_FIRST_CREATED_PRESENT_BIT_POS)
#define
SL_BT_OTS_DLO_OBJECT_LAST_MODIFIED_PRESENT_BIT_POS 2
#define
SL_BT_OTS_DLO_OBJECT_LAST_MODIFIED_PRESENT_MASK (1 << SL_BT_OTS_DLO_OBJECT_LAST_MODIFIED_PRESENT_BIT_POS)
#define
SL_BT_OTS_DLO_OBJECT_PROPERTIES_PRESENT_BIT_POS 3
#define
SL_BT_OTS_DLO_OBJECT_PROPERTIES_PRESENT_MASK (1 << SL_BT_OTS_DLO_OBJECT_PROPERTIES_PRESENT_BIT_POS)
#define
SL_BT_OTS_DLO_EXTENDED_FLAGS_PRESENT_BIT_POS 7
#define
SL_BT_OTS_DLO_EXTENDED_FLAGS_PRESENT_MASK (1 << SL_BT_OTS_DLO_EXTENDED_FLAGS_PRESENT_BIT_POS)
#define
METADATA_FIELD (X)
#define
SL_BT_OTS_METADATA_FIELD_ALL 0xFF
#define
SL_BT_OTS_METADATA_FIELD_NAME METADATA_FIELD(SL_BT_OTS_OBJECT_METADATA_READ_OBJECT_NAME)
#define
SL_BT_OTS_METADATA_FIELD_TYPE METADATA_FIELD(SL_BT_OTS_OBJECT_METADATA_READ_OBJECT_TYPE)
#define
SL_BT_OTS_METADATA_FIELD_SIZE METADATA_FIELD(SL_BT_OTS_OBJECT_METADATA_READ_OBJECT_SIZE)
#define
SL_BT_OTS_METADATA_FIELD_FIRST_CREATED METADATA_FIELD(SL_BT_OTS_OBJECT_METADATA_READ_OBJECT_FIRST_CREATED)
#define
SL_BT_OTS_METADATA_FIELD_LAST_MODIFIED METADATA_FIELD(SL_BT_OTS_OBJECT_METADATA_READ_OBJECT_LAST_MODIFIED)
#define
SL_BT_OTS_METADATA_FIELD_ID METADATA_FIELD(SL_BT_OTS_OBJECT_METADATA_READ_OBJECT_ID)
#define
SL_BT_OTS_METADATA_FIELD_PROPERTIES METADATA_FIELD(SL_BT_OTS_OBJECT_METADATA_READ_OBJECT_PROPERTIES)
#define
SL_BT_OTS_METADATA_FIELD_NONE 0x00
#define
SL_BT_OTS_OBJECT_ID_SIZE 6
#define
SL_BT_OTS_OBJECT_ID_USABLE_SIZE 5
#define
SL_BT_OTS_OBJECT_ID_RFU_MASK 0x0000000000FF
#define
SL_BT_OTS_INVALID_OBJECT_RFU 0xFF
#define
SL_BT_OTS_DIRECTORY_LIST_OBJECT_ID 0x000000000000
#define
SL_BT_OTS_TIME_SIZE 7
#define
SL_BT_OTS_UUID_SIZE_16 2
#define
SL_BT_OTS_UUID_SIZE_128 16
#define
SL_BT_OTS_SUBSCRIPTION_STATUS_NONE 0

OTS Subscription status for no subscription.

#define
SL_BT_OTS_CHARACTERISTIC_UUID_OTS_FEATURE 0x2ABD

OTS Characteristics.

#define
SL_BT_OTS_CHARACTERISTIC_UUID_OBJECT_NAME 0x2ABE
#define
SL_BT_OTS_CHARACTERISTIC_UUID_OBJECT_TYPE 0x2ABF
#define
SL_BT_OTS_CHARACTERISTIC_UUID_OBJECT_SIZE 0x2AC0
#define
SL_BT_OTS_CHARACTERISTIC_UUID_OBJECT_FIRST_CREATED 0x2AC1
#define
SL_BT_OTS_CHARACTERISTIC_UUID_OBJECT_LAST_MODIFIED 0x2AC2
#define
SL_BT_OTS_CHARACTERISTIC_UUID_OBJECT_ID 0x2AC3
#define
SL_BT_OTS_CHARACTERISTIC_UUID_OBJECT_PROPERTIES 0x2AC4
#define
SL_BT_OTS_CHARACTERISTIC_UUID_OACP 0x2AC5
#define
SL_BT_OTS_CHARACTERISTIC_UUID_OLCP 0x2AC6
#define
SL_BT_OTS_CHARACTERISTIC_UUID_OBJECT_LIST_FILTER 0x2AC7
#define
SL_BT_OTS_CHARACTERISTIC_UUID_OBJECT_CHANGED 0x2AC8
#define
SL_BT_OTS_CHARACTERISTIC_UUID_COUNT 12
#define
SL_BT_OTS_INDICATION_OVERHEAD 4
#define
SL_BT_OTS_INDICATION_HEADER 2
#define
SL_BT_OTS_INDICATION_SIZE_MAX 7

Typedef Documentation#

sl_bt_ots_client_handle_t#

typedef struct sl_bt_ots_client* sl_bt_ots_client_handle_t

OTS Object Client handle.


Definition at line 58 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[in]client

Client handle.

OTS Object Client callback function prototype for connection or disconnection


Definition at line 64 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[in]client

Client handle.

[in]status

Subscription status.

OTS Object Client callback function prototype for indication subscription status


Definition at line 72 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[in]client

Client handle.

[in]flags

Change flags. The following masks can be used to indicate the nature of change:

  • SL_BT_OTS_OBJECT_CHANGE_CONTENTS_MASK : object contents changed

  • SL_BT_OTS_OBJECT_CHANGE_METADATA_MASK : metadata changed

  • SL_BT_OTS_OBJECT_CHANGE_CREATION_MASK : object creation

  • SL_BT_OTS_OBJECT_CHANGE_DELETION_MASK : object deletion

[in]object

Object ID.

OTS Object Client callback function prototype to handle Object Change event


Definition at line 88 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[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


Definition at line 99 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[in]client

Client handle.

[in]status

GATT result of the write operation.

OTS Object Client callback function prototype List Filter Write response


Definition at line 109 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[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


Definition at line 119 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[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


Definition at line 133 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[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


Definition at line 150 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[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


Definition at line 164 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[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


Definition at line 178 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[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.


Definition at line 193 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[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


Definition at line 207 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[in]client

Client handle.

[in]object

Object ID.

[in]result

Status of the finish.

OTS Object Client callback function prototype to handle transmission status


Definition at line 219 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[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.


Definition at line 231 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[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.


Definition at line 243 of file common/ots/inc/sl_bt_ots_client.h

sl_bt_ots_client_t#

typedef struct sl_bt_ots_client sl_bt_ots_client_t

OTS Object Client instance type.


Definition at line 309 of file common/ots/inc/sl_bt_ots_client.h

sl_bt_ots_oacp_features_t#

typedef uint32_t sl_bt_ots_oacp_features_t

Object Action Control Point Features.


Definition at line 250 of file common/ots/inc/sl_bt_ots_datatypes.h

sl_bt_ots_olcp_features_t#

typedef uint32_t sl_bt_ots_olcp_features_t

Object List Control Point Features.


Definition at line 253 of file common/ots/inc/sl_bt_ots_datatypes.h

sl_bt_ots_object_first_created_t#

typedef sl_bt_ots_time_t sl_bt_ots_object_first_created_t

Object first created.


Definition at line 301 of file common/ots/inc/sl_bt_ots_datatypes.h

sl_bt_ots_object_last_modified_t#

typedef sl_bt_ots_time_t sl_bt_ots_object_last_modified_t

Object last modified.


Definition at line 304 of file common/ots/inc/sl_bt_ots_datatypes.h

sl_bt_ots_object_properties_t#

typedef uint32_t sl_bt_ots_object_properties_t

Object properties.


Definition at line 319 of file common/ots/inc/sl_bt_ots_datatypes.h

sl_bt_ots_metadata_fields_t#

typedef uint8_t sl_bt_ots_metadata_fields_t

Metadata fields type.


Definition at line 359 of file common/ots/inc/sl_bt_ots_datatypes.h

sl_bt_ots_oacp_event_t#

typedef sl_bt_ots_oacp_opcode_t sl_bt_ots_oacp_event_t

Definition at line 402 of file common/ots/inc/sl_bt_ots_datatypes.h

sl_bt_ots_oacp_execute_parameters_t#

typedef uint8array sl_bt_ots_oacp_execute_parameters_t

OACP Execute opcode parameters.


Definition at line 431 of file common/ots/inc/sl_bt_ots_datatypes.h

sl_bt_ots_oacp_write_mode_t#

typedef uint8_t sl_bt_ots_oacp_write_mode_t

Object write mode flags.


Definition at line 440 of file common/ots/inc/sl_bt_ots_datatypes.h

sl_bt_ots_l2cap_credit_t#

typedef uint16_t sl_bt_ots_l2cap_credit_t

Data response credits.


Definition at line 459 of file common/ots/inc/sl_bt_ots_datatypes.h

sl_bt_ots_olcp_event_t#

typedef sl_bt_ots_olcp_opcode_t sl_bt_ots_olcp_event_t

Definition at line 570 of file common/ots/inc/sl_bt_ots_datatypes.h

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.


Definition at line 644 of file common/ots/inc/sl_bt_ots_datatypes.h

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

Definition at line 658 of file common/ots/inc/sl_bt_ots_datatypes.h

sl_bt_ots_object_changed_flags_t#

typedef uint8_t sl_bt_ots_object_changed_flags_t

Object change flags.


Definition at line 672 of file common/ots/inc/sl_bt_ots_datatypes.h

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)
Parameters
[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.


Definition at line 735 of file common/ots/inc/sl_bt_ots_datatypes.h

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.


Definition at line 226 of file common/ots/inc/sl_bt_ots_datatypes.h

Function Documentation#

SL_ENUM#

SL_ENUM (sl_bt_ots_client_status_t )

OTS Object Client status.

Parameters
N/A

Definition at line 268 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[in]client

Client handle.

[in]connection

Client connection handle.

[in]service

GATT database handle for the OTS service.

[in]callbacks

Client callbacks' structure.

[in]gattdb_handles

GATT database handles or NULL if not present.

Initialize Object Client. Returns

  • Status code


Definition at line 320 of file common/ots/inc/sl_bt_ots_client.h

sl_bt_ots_client_read_ots_features#

sl_status_t sl_bt_ots_client_read_ots_features (sl_bt_ots_client_handle_t client)
Parameters
[in]client

Client handle.

Read Object Transfer Service Features supported by the Server.

Read response is given in callback. Returns

  • Status code


Definition at line 333 of file common/ots/inc/sl_bt_ots_client.h

sl_bt_ots_client_read_object_name#

sl_status_t sl_bt_ots_client_read_object_name (sl_bt_ots_client_handle_t client)
Parameters
[in]client

Client handle.

Read Object Name of the Current Object.

Read response is given in callback. Returns

  • Status code


Definition at line 342 of file common/ots/inc/sl_bt_ots_client.h

sl_bt_ots_client_read_object_type#

sl_status_t sl_bt_ots_client_read_object_type (sl_bt_ots_client_handle_t client)
Parameters
[in]client

Client handle.

Read Object Type of the Current Object.

Read response is given in callback. Returns

  • Status code


Definition at line 351 of file common/ots/inc/sl_bt_ots_client.h

sl_bt_ots_client_read_object_size#

sl_status_t sl_bt_ots_client_read_object_size (sl_bt_ots_client_handle_t client)
Parameters
[in]client

Client handle.

Read Object Size of the Current Object.

Read response is given in callback. Returns

  • Status code


Definition at line 360 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[in]client

Client handle.

Read Object First Created time of the Current Object.

Read response is given in callback. Returns

  • Status code


Definition at line 369 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[in]client

Client handle.

Read Object Last Modifed time of the Current Object.

Read response is given in callback. Returns

  • Status code


Definition at line 378 of file common/ots/inc/sl_bt_ots_client.h

sl_bt_ots_client_read_object_id#

sl_status_t sl_bt_ots_client_read_object_id (sl_bt_ots_client_handle_t client)
Parameters
[in]client

Client handle.

Read Object ID of the Current Object.

Read response is given in callback. Returns

  • Status code


Definition at line 387 of file common/ots/inc/sl_bt_ots_client.h

sl_bt_ots_client_read_object_properties#

sl_status_t sl_bt_ots_client_read_object_properties (sl_bt_ots_client_handle_t client)
Parameters
[in]client

Client handle.

Read Object Properties of the Current Object.

Read response is given in callback. Returns

  • Status code


Definition at line 396 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[in]client

Client handle.

[in]name

String containing the new name of the object.

[in]size

The size of the name argument.

Write Object Name of the Current Object.

Write response is given in callback. Returns

  • Status code


Definition at line 407 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[in]client

Client handle.

[in]time

Pointer to time structure.

Write Object First Created field of the Current Object.

Write response is given in callback. Returns

  • Status code


Definition at line 419 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[in]client

Client handle.

[in]time

Pointer to time structure.

Write Object Last Modifed field of the Current Object.

Write response is given in callback. Returns

  • Status code


Definition at line 430 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[in]client

Client handle.

[in]properties

Properties bitfield. Possible values:

  • SL_BT_OTS_OBJECT_PROPERTY_DELETE_MASK : Object is deletable

  • SL_BT_OTS_OBJECT_PROPERTY_EXECUTE_MASK : Object is executable

  • SL_BT_OTS_OBJECT_PROPERTY_READ_MASK : Object is readable

  • SL_BT_OTS_OBJECT_PROPERTY_WRITE_MASK : Object is writable

  • SL_BT_OTS_OBJECT_PROPERTY_APPEND_MASK : Object is appendable

  • SL_BT_OTS_OBJECT_PROPERTY_TRUNCATE_MASK : Object can be truncated

  • SL_BT_OTS_OBJECT_PROPERTY_PATCH_MASK : Object can be patched

  • SL_BT_OTS_OBJECT_PROPERTY_MARK_MASK : Object can be marked

Write Object Properties field of the Current Object.

Write response is given in callback. Returns

  • Status code


Definition at line 450 of file common/ots/inc/sl_bt_ots_client.h

sl_bt_ots_client_olcp_first#

sl_status_t sl_bt_ots_client_olcp_first (sl_bt_ots_client_handle_t client)
Parameters
[in]client

Client handle.

Select the first object as Current Object.

Returns

  • Status code


Definition at line 459 of file common/ots/inc/sl_bt_ots_client.h

sl_bt_ots_client_olcp_last#

sl_status_t sl_bt_ots_client_olcp_last (sl_bt_ots_client_handle_t client)
Parameters
[in]client

Client handle.

Select the last object as Current Object.

Returns

  • Status code


Definition at line 467 of file common/ots/inc/sl_bt_ots_client.h

sl_bt_ots_client_olcp_previous#

sl_status_t sl_bt_ots_client_olcp_previous (sl_bt_ots_client_handle_t client)
Parameters
[in]client

Client handle.

Select the previous object as Current Object.

Returns

  • Status code


Definition at line 475 of file common/ots/inc/sl_bt_ots_client.h

sl_bt_ots_client_olcp_next#

sl_status_t sl_bt_ots_client_olcp_next (sl_bt_ots_client_handle_t client)
Parameters
[in]client

Client handle.

Select the next object as Current Object.

Returns

  • Status code


Definition at line 483 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[in]client

Client handle.

[in]object

Object ID.

Select the specified object as Current Object.

Returns

  • Status code


Definition at line 492 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[in]client

Client handle.

[in]order

List sort order.

Select the List Sort Order.

Returns

  • Status code


Definition at line 502 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[in]client

Client handle.

Request total number of objects.

Returns

  • Status code


Definition at line 511 of file common/ots/inc/sl_bt_ots_client.h

sl_bt_ots_client_olcp_clear_marking#

sl_status_t sl_bt_ots_client_olcp_clear_marking (sl_bt_ots_client_handle_t client)
Parameters
[in]client

Client handle.

Clear marking of objects.

Returns

  • Status code


Definition at line 519 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[in]client

Client handle.

Read object list filter.

Read response is given in callback. Returns

  • Status code


Definition at line 528 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[in]client

Client handle.

[in]filter

Filter type and arguments to set.

Write/set object list filter.

Write response is given in callback. Returns

  • Status code


Definition at line 538 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[in]client

Client handle.

[in]size

Object size.

[in]type

Object type.

Create new object.

Write response is given in callback. Returns

  • Status code


Definition at line 550 of file common/ots/inc/sl_bt_ots_client.h

sl_bt_ots_client_oacp_delete_object#

sl_status_t sl_bt_ots_client_oacp_delete_object (sl_bt_ots_client_handle_t client)
Parameters
[in]client

Client handle.

Delete current object.

Write response is given in callback. Returns

  • Status code


Definition at line 561 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[in]client

Client handle.

[in]offset

Offset in bytes to calculate checksum from.

[in]length

Length of calculation in bytes.

Calculate checksum for Current Object.

Returns

  • Status code


Definition at line 571 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[in]client

Client handle.

[in]optional_data

Optional data content for execution.

[in]optional_data_size

Length of the optional data in bytes.

Execute Current Object.

Returns

  • Status code


Definition at line 583 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[in]client

Client handle.

[in]offset

Offset to read the object from in bytes.

[in]length

Length of data in bytes to be read.

[in]max_sdu

The Maximum Service Data Unit size the local channel endpoint can accept

Range: 23 to 65533.

[in]max_pdu

The maximum PDU payload size the local channel endpoint can accept

Range:23 to 252.

Read Current Object.

Returns

  • Status code


Definition at line 605 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[in]client

Client handle.

[in]offset

Offset to write the object from in bytes.

[in]length

Length of data in bytes to be written.

[in]mode

Write mode.

[in]max_sdu

The Maximum Service Data Unit size the local channel endpoint can accept

Range: 23 to 65533.

[in]max_pdu

The maximum PDU payload size the local channel endpoint can accept

Range:23 to 252.

Write Current Object.

Returns

  • Status code


Definition at line 630 of file common/ots/inc/sl_bt_ots_client.h

sl_bt_ots_client_oacp_abort#

sl_status_t sl_bt_ots_client_oacp_abort (sl_bt_ots_client_handle_t client)
Parameters
[in]client

Client handle.

Abort current read.

Returns

  • Status code


Definition at line 643 of file common/ots/inc/sl_bt_ots_client.h

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)
Parameters
[in]client

Client handle.

[in]credit

Number of credit to give (in packets).

Increase the credit for the L2CAP transfer that is in progress Returns

  • Response code


Definition at line 651 of file common/ots/inc/sl_bt_ots_client.h

sl_bt_ots_client_abort#

sl_status_t sl_bt_ots_client_abort (sl_bt_ots_client_handle_t client)
Parameters
[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


Definition at line 662 of file common/ots/inc/sl_bt_ots_client.h

SL_ENUM#

SL_ENUM (sl_bt_ots_characteristic_uuid_index )

OTS Characteristic UUID indices.

Parameters
N/A

Definition at line 232 of file common/ots/inc/sl_bt_ots_datatypes.h

typedef#

typedef (struct { sl_bt_ots_oacp_features_t oacp_features;sl_bt_ots_olcp_features_t olcp_features;} )

Object Transfer Service features.

Parameters
N/A

Definition at line 256 of file common/ots/inc/sl_bt_ots_datatypes.h

typedef#

typedef (struct { uint16_t length;char *name;} )

Object name.

Parameters
N/A

Definition at line 263 of file common/ots/inc/sl_bt_ots_datatypes.h

typedef#

typedef (struct { uint32_t current_size;uint32_t allocated_size;} )

Object size.

Parameters
N/A

Definition at line 282 of file common/ots/inc/sl_bt_ots_datatypes.h

typedef#

typedef (struct { uint8_t rfu;uint8_t usable[SL_BT_OTS_OBJECT_ID_USABLE_SIZE];} )

Complete Object ID.

Parameters
N/A

Definition at line 307 of file common/ots/inc/sl_bt_ots_datatypes.h

SL_ENUM#

SL_ENUM (sl_bt_ots_object_metadata_write_event_type_t )

Object metadata write event type.

Parameters
N/A

Definition at line 322 of file common/ots/inc/sl_bt_ots_datatypes.h

SL_ENUM#

SL_ENUM (sl_bt_ots_object_metadata_write_response_code_t )

Object metadata write response codes.

Parameters
N/A

Definition at line 338 of file common/ots/inc/sl_bt_ots_datatypes.h

SL_ENUM#

SL_ENUM (sl_bt_ots_object_metadata_read_event_type_t )

Object metadata read event type.

Parameters
N/A

Definition at line 348 of file common/ots/inc/sl_bt_ots_datatypes.h

SL_ENUM#

SL_ENUM (sl_bt_ots_object_metadata_read_response_code_t )

Object metadata read response codes.

Parameters
N/A

Definition at line 373 of file common/ots/inc/sl_bt_ots_datatypes.h

SL_ENUM#

SL_ENUM (sl_bt_ots_oacp_opcode_t )

OACP opcode.

Parameters
N/A

Definition at line 381 of file common/ots/inc/sl_bt_ots_datatypes.h

SL_ENUM#

SL_ENUM (sl_bt_ots_oacp_response_code_t )

OACP response code.

Parameters
N/A

Definition at line 405 of file common/ots/inc/sl_bt_ots_datatypes.h

typedef#

typedef (struct { uint32_t size;uint8_t type[SL_BT_OTS_UUID_SIZE_128];} )

OACP Create opcode parameters.

Parameters
N/A

Definition at line 419 of file common/ots/inc/sl_bt_ots_datatypes.h

typedef#

typedef (struct { uint32_t offset;uint32_t length;} )

OACP Calculate Checksum opcode parameters.

Parameters
N/A

OACP Read opcode parameters.


Definition at line 425 of file common/ots/inc/sl_bt_ots_datatypes.h

typedef#

typedef (struct { uint32_t offset;uint32_t length;sl_bt_ots_oacp_write_mode_t mode;} )

OACP Write opcode parameters.

Parameters
N/A

Definition at line 443 of file common/ots/inc/sl_bt_ots_datatypes.h

SL_ENUM#

SL_ENUM (sl_bt_ots_transfer_result_t )
Parameters
N/A

Definition at line 461 of file common/ots/inc/sl_bt_ots_datatypes.h

typedef#

typedef (struct { sl_bt_ots_oacp_opcode_t opcode;uint8_t data[];} )

OACP Message.

Parameters
N/A

Definition at line 470 of file common/ots/inc/sl_bt_ots_datatypes.h

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.

Parameters
N/A

Definition at line 485 of file common/ots/inc/sl_bt_ots_datatypes.h

SL_ENUM#

SL_ENUM (sl_bt_ots_olcp_opcode_t )

OACP opcode.

Parameters
N/A

Definition at line 493 of file common/ots/inc/sl_bt_ots_datatypes.h

SL_ENUM#

SL_ENUM (sl_bt_ots_olcp_response_code_t )

OLCP response code.

Parameters
N/A

Definition at line 573 of file common/ots/inc/sl_bt_ots_datatypes.h

SL_ENUM#

SL_ENUM (sl_bt_ots_list_sort_order_t )

List Sort Order.

Parameters
N/A

Definition at line 585 of file common/ots/inc/sl_bt_ots_datatypes.h

typedef#

typedef (struct { sl_bt_ots_object_id_t id;} )

OLCP Go To opcode parameters.

Parameters
N/A

Definition at line 599 of file common/ots/inc/sl_bt_ots_datatypes.h

typedef#

typedef (struct { sl_bt_ots_list_sort_order_t list_sort_order;} )

OLCP Order opcode parameters.

Parameters
N/A

Definition at line 604 of file common/ots/inc/sl_bt_ots_datatypes.h

typedef#

typedef (struct { sl_bt_ots_olcp_opcode_t opcode;uint8_t data[];} )

OLCP message.

Parameters
N/A

Definition at line 615 of file common/ots/inc/sl_bt_ots_datatypes.h

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.

Parameters
N/A

Definition at line 621 of file common/ots/inc/sl_bt_ots_datatypes.h

SL_ENUM#

SL_ENUM (sl_bt_ots_object_list_filter_type_t )

Object List Filter.

Parameters
N/A

Definition at line 629 of file common/ots/inc/sl_bt_ots_datatypes.h

typedef#

typedef (struct { sl_bt_ots_time_t from;sl_bt_ots_time_t to;} )

Time filter parameters.

Parameters
N/A

Definition at line 647 of file common/ots/inc/sl_bt_ots_datatypes.h

typedef#

typedef (struct { uint32_t min;uint32_t max;} )

Size filter parameters.

Parameters
N/A

Definition at line 653 of file common/ots/inc/sl_bt_ots_datatypes.h

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.

Parameters
N/A

Definition at line 661 of file common/ots/inc/sl_bt_ots_datatypes.h

typedef#

typedef (struct { sl_bt_ots_object_changed_flags_t flags;sl_bt_ots_object_id_t object;} )

Object Changed content.

Parameters
N/A

Definition at line 675 of file common/ots/inc/sl_bt_ots_datatypes.h

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.

Parameters
N/A

Definition at line 695 of file common/ots/inc/sl_bt_ots_datatypes.h

typedef#

typedef (struct { sl_slist_node_t node;uint8_t *key;uint8_t *value;} )

Datatype for object list item.

Parameters
N/A

Definition at line 739 of file common/ots/inc/sl_bt_ots_datatypes.h

typedef#

typedef (struct { sl_bt_ots_compare_t compare;sl_bt_ots_list_item_t *list;} )

Datatype for object list.

Parameters
N/A

Definition at line 746 of file common/ots/inc/sl_bt_ots_datatypes.h