GATT Database#

GATT Database.

These commands and events are used for managing the local GATT database.

Many commands in this class return the handles of created attributes. These handles may change during commit if attributes are not created in the order they present in the database. For example, when creating a new service using the sl_bt_gattdb_add_service command, the service declaration handle returned from this command becomes invalid later when an attribute is added or removed in front of this service. If the user requires that the attribute handles returned from these commands must remain valid after the database update has been committed, attributes must be created in the order they present in the database.

Modules#

GATT Service Property Flags

GATT Attribute Security Requirement Flags

GATT Database Flags

GATT Characteristic Property Flags

GATT Descriptor Property Flags

Enumerations#

enum
sl_bt_gattdb_primary_service = 0x0
sl_bt_gattdb_secondary_service = 0x1
}

This enum defines GATT service types.

enum
sl_bt_gattdb_fixed_length_value = 0x1
sl_bt_gattdb_variable_length_value = 0x2
sl_bt_gattdb_user_managed_value = 0x3
}

This enum defines characteristic and descriptor value types.

Functions#

sl_status_t
sl_bt_gattdb_new_session(uint16_t *session)
sl_status_t
sl_bt_gattdb_add_service(uint16_t session, uint8_t type, uint8_t property, size_t uuid_len, const uint8_t *uuid, uint16_t *service)
sl_status_t
sl_bt_gattdb_remove_service(uint16_t session, uint16_t service)
sl_status_t
sl_bt_gattdb_add_included_service(uint16_t session, uint16_t service, uint16_t included_service, uint16_t *attribute)
sl_status_t
sl_bt_gattdb_remove_included_service(uint16_t session, uint16_t attribute)
sl_status_t
sl_bt_gattdb_add_uuid16_characteristic(uint16_t session, uint16_t service, uint16_t property, uint16_t security, uint8_t flag, sl_bt_uuid_16_t uuid, uint8_t value_type, uint16_t maxlen, size_t value_len, const uint8_t *value, uint16_t *characteristic)
sl_status_t
sl_bt_gattdb_add_uuid128_characteristic(uint16_t session, uint16_t service, uint16_t property, uint16_t security, uint8_t flag, uuid_128 uuid, uint8_t value_type, uint16_t maxlen, size_t value_len, const uint8_t *value, uint16_t *characteristic)
sl_status_t
sl_bt_gattdb_remove_characteristic(uint16_t session, uint16_t characteristic)
sl_status_t
sl_bt_gattdb_add_uuid16_descriptor(uint16_t session, uint16_t characteristic, uint16_t property, uint16_t security, sl_bt_uuid_16_t uuid, uint8_t value_type, uint16_t maxlen, size_t value_len, const uint8_t *value, uint16_t *descriptor)
sl_status_t
sl_bt_gattdb_add_uuid128_descriptor(uint16_t session, uint16_t characteristic, uint16_t property, uint16_t security, uuid_128 uuid, uint8_t value_type, uint16_t maxlen, size_t value_len, const uint8_t *value, uint16_t *descriptor)
sl_status_t
sl_bt_gattdb_remove_descriptor(uint16_t session, uint16_t descriptor)
sl_status_t
sl_bt_gattdb_start_service(uint16_t session, uint16_t service)
sl_status_t
sl_bt_gattdb_stop_service(uint16_t session, uint16_t service)
sl_status_t
sl_bt_gattdb_start_characteristic(uint16_t session, uint16_t characteristic)
sl_status_t
sl_bt_gattdb_stop_characteristic(uint16_t session, uint16_t characteristic)
sl_status_t
sl_bt_gattdb_commit(uint16_t session)
sl_status_t
sl_bt_gattdb_abort(uint16_t session)

Macros#

#define
#define
#define
#define

Enumeration Documentation#

sl_bt_gattdb_service_type_t#

sl_bt_gattdb_service_type_t

This enum defines GATT service types.

Enumerator
sl_bt_gattdb_primary_service

(0x0) Primary service

sl_bt_gattdb_secondary_service

(0x1) Secondary service


Definition at line 8841 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_gattdb_value_type_t#

sl_bt_gattdb_value_type_t

This enum defines characteristic and descriptor value types.

Enumerator
sl_bt_gattdb_fixed_length_value

(0x1) A fixed-length value managed by the local GATT server for responding the read and write requests of remote GATT clients

sl_bt_gattdb_variable_length_value

(0x2) A variable-length value managed by the local GATT server for responding the read and write requests of remote GATT clients

sl_bt_gattdb_user_managed_value

(0x3) A value managed by the user application for responding the read and write requests of remote GATT clients.


Definition at line 8850 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

Function Documentation#

sl_bt_gattdb_new_session#

sl_status_t sl_bt_gattdb_new_session (uint16_t * session)
Parameters
[out]session

The database update session ID

Start a new GATT database update session. If the operation is successful, the Bluetooth stack returns a session ID, with which the GATT database can be updated by calling other database management APIs of this class. Changes in the database are not immediately saved. Unsaved changes are invisible to a connected remote GATT client.

After all changes were performed successfully, commit the changes using the sl_bt_gattdb_commit command. The Bluetooth stack will save the changes and handle GATT caching as needed. Unsaved database changes can also be canceled by calling the sl_bt_gattdb_abort command. In either case, after a commit or abort command is called, the current session is closed and the session ID becomes invalid.

Only one session is allowed at a time. Error SL_STATUS_ALREADY_EXISTS is returned if another session has been started already.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 9008 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_gattdb_add_service#

sl_status_t sl_bt_gattdb_add_service (uint16_t session, uint8_t type, uint8_t property, size_t uuid_len, const uint8_t * uuid, uint16_t * service)
Parameters
[in]session

The database update session ID

[in]type

Enum sl_bt_gattdb_service_type_t. The service type. Values:

  • sl_bt_gattdb_primary_service (0x0): Primary service

  • sl_bt_gattdb_secondary_service (0x1): Secondary service

[in]property

Service properties. Value: 0 or bit flag SL_BT_GATTDB_ADVERTISED_SERVICE

[in]uuid_len

Length of data in uuid

[in]uuid

The service UUID in little endian format

[out]service

The service declaration attribute handle. This handle is ensured valid in current session. It may change after the session if attributes have been inserted or deleted in front of it.

Add a service into the local GATT database. When successful, the service is appended to the service list and is in stopped state. Use sl_bt_gattdb_start_service command to set it visible to remote GATT clients.

You are not allowed to add the Generic Attribute Profile service. If the application needs GATT caching, enable the feature in the configuration of this component and the GATT server will handle GATT caching according to the procedures specified by the Bluetooth core specification.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 9037 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_gattdb_remove_service#

sl_status_t sl_bt_gattdb_remove_service (uint16_t session, uint16_t service)
Parameters
[in]session

The database update session ID

[in]service

The service declaration attribute handle of the service

Remove a service and its characteristics from the local GATT database.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 9054 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_gattdb_add_included_service#

sl_status_t sl_bt_gattdb_add_included_service (uint16_t session, uint16_t service, uint16_t included_service, uint16_t * attribute)
Parameters
[in]session

The database update session ID

[in]service

The service declaration attribute handle of the service which the included-service attribute is added to

[in]included_service

The service declaration attribute handle of the service to be included

[out]attribute

The included-service attribute handle. This handle is ensured valid in current session. It may change after the session if attributes have been inserted or deleted in front of it.

Add an included-service attribute to a service.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 9072 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_gattdb_remove_included_service#

sl_status_t sl_bt_gattdb_remove_included_service (uint16_t session, uint16_t attribute)
Parameters
[in]session

The database update session ID

[in]attribute

The included-service attribute handle

Remove an included-service attribute from a service.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 9087 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_gattdb_add_uuid16_characteristic#

sl_status_t sl_bt_gattdb_add_uuid16_characteristic (uint16_t session, uint16_t service, uint16_t property, uint16_t security, uint8_t flag, sl_bt_uuid_16_t uuid, uint8_t value_type, uint16_t maxlen, size_t value_len, const uint8_t * value, uint16_t * characteristic)
Parameters
[in]session

The database update session ID

[in]service

The service declaration attribute handle of the service which the characteristic is added to

[in]property

Characteristic value properties. Value: bitmask of GATT Characteristic Property Flags

[in]security

Security requirement. Value: 0 or bitmask of GATT Attribute Security Requirement Flags. A security requirement flag for a property is ignored if the property is not set for the characteristic value.

[in]flag

Option flags. Value: 0 or bitmask of GATT Database Flags.

[in]uuid

The 16-bits UUID in little endian format

[in]value_type

Enum sl_bt_gattdb_value_type_t. The value type. Values:

  • sl_bt_gattdb_fixed_length_value (0x1): A fixed-length value managed by the local GATT server for responding the read and write requests of remote GATT clients

  • sl_bt_gattdb_variable_length_value (0x2): A variable-length value managed by the local GATT server for responding the read and write requests of remote GATT clients

  • sl_bt_gattdb_user_managed_value (0x3): A value managed by the user application for responding the read and write requests of remote GATT clients.

[in]maxlen

The maximum length of the characteristic value. Ignored if value_type is sl_bt_gattdb_user_managed_value.

[in]value_len

Length of data in value

[in]value

The initial characteristic value. Length of this value must be less than or equal to maxlen. Ignored if value_type is sl_bt_gattdb_user_managed_value.

[out]characteristic

The characteristic value attribute handle. This handle is ensured valid in current session. It may change after the session if attributes have been inserted or deleted in front of it.

Add a 16-bits UUID characteristic to a service. On success, the characteristic is appended to the characteristic list of the service and it inherits the started or stopped state of the service. In addition, it can be started and stopped separately with the sl_bt_gattdb_start_characteristic and sl_bt_gattdb_stop_characteristic commands.

If the flag parameter does not set SL_BT_GATTDB_NO_AUTO_CCCD, the stack will automatically add a Client Characteristic Configuration descriptor to this characteristic when it has the notify or indicate property. If SL_BT_GATTDB_NO_AUTO_CCCD is set, the user application should add the descriptor separately as needed.

A Characteristic Extended Properties descriptor is automatically added if the reliable write property is set.

Use the sl_bt_gattdb_add_uuid128_characteristic command to add a 128-bits UUID characteristic.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 9146 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_gattdb_add_uuid128_characteristic#

sl_status_t sl_bt_gattdb_add_uuid128_characteristic (uint16_t session, uint16_t service, uint16_t property, uint16_t security, uint8_t flag, uuid_128 uuid, uint8_t value_type, uint16_t maxlen, size_t value_len, const uint8_t * value, uint16_t * characteristic)
Parameters
[in]session

The database update session ID

[in]service

The service declaration attribute handle of the service which the characteristic is added to

[in]property

Characteristic value properties. Value: bitmask of GATT Characteristic Property Flags

[in]security

Security requirement. Value: 0 or bitmask of GATT Attribute Security Requirement Flags. A security requirement flag for a property is ignored if the property is not set for the characteristic value.

[in]flag

Option flags. Value: 0 or bitmask of GATT Database Flags.

[in]uuid

The 128-bits UUID in little endian format

[in]value_type

Enum sl_bt_gattdb_value_type_t. The value type. Values:

  • sl_bt_gattdb_fixed_length_value (0x1): A fixed-length value managed by the local GATT server for responding the read and write requests of remote GATT clients

  • sl_bt_gattdb_variable_length_value (0x2): A variable-length value managed by the local GATT server for responding the read and write requests of remote GATT clients

  • sl_bt_gattdb_user_managed_value (0x3): A value managed by the user application for responding the read and write requests of remote GATT clients.

[in]maxlen

The maximum length of the characteristic value. Ignored if value_type is sl_bt_gattdb_user_managed_value.

[in]value_len

Length of data in value

[in]value

The initial characteristic value. Length of this value must be less than or equal to maxlen. Ignored if value_type is sl_bt_gattdb_user_managed_value.

[out]characteristic

The characteristic value attribute handle. This handle is ensured valid in current session. It may change after the session if attributes have been inserted or deleted in front of it.

Add a 128-bits UUID characteristic to a service. When successful, the characteristic is appended to the characteristic list of the service and inherits the started or stopped state of the service. Additionally, it can be started and stopped separately with the sl_bt_gattdb_start_characteristic and sl_bt_gattdb_stop_characteristic commands.

If the flag parameter does not set SL_BT_GATTDB_NO_AUTO_CCCD, the stack will automatically add a Client Characteristic Configuration descriptor to this characteristic when it has the notify or indicate property. If SL_BT_GATTDB_NO_AUTO_CCCD is set, the user application should add the descriptor separately as needed.

A Characteristic Extended Properties descriptor is automatically added if the reliable write property is set.

Use the sl_bt_gattdb_add_uuid16_characteristic command to add a 16-bits UUID characteristic.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 9214 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_gattdb_remove_characteristic#

sl_status_t sl_bt_gattdb_remove_characteristic (uint16_t session, uint16_t characteristic)
Parameters
[in]session

The database update session ID

[in]characteristic

The characteristic value attribute handle of the characteristic

Remove a characteristic and its descriptors from a service.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 9237 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_gattdb_add_uuid16_descriptor#

sl_status_t sl_bt_gattdb_add_uuid16_descriptor (uint16_t session, uint16_t characteristic, uint16_t property, uint16_t security, sl_bt_uuid_16_t uuid, uint8_t value_type, uint16_t maxlen, size_t value_len, const uint8_t * value, uint16_t * descriptor)
Parameters
[in]session

The database update session ID

[in]characteristic

The characteristic value attribute handle of the characteristic the descriptor is added to

[in]property

The descriptor properties. Value: bitmask of GATT Descriptor Property Flags

[in]security

Security requirement. Value: 0 or bitmask of GATT Attribute Security Requirement Flags. A security requirement flag for a property is ignored if the property is not set for the descriptor.

[in]uuid

The 16-bits UUID in little endian format

[in]value_type

Enum sl_bt_gattdb_value_type_t. The value type. Ignored if this is a Client Characteristic Configuration descriptor. Values:

  • sl_bt_gattdb_fixed_length_value (0x1): A fixed-length value managed by the local GATT server for responding the read and write requests of remote GATT clients

  • sl_bt_gattdb_variable_length_value (0x2): A variable-length value managed by the local GATT server for responding the read and write requests of remote GATT clients

  • sl_bt_gattdb_user_managed_value (0x3): A value managed by the user application for responding the read and write requests of remote GATT clients.

[in]maxlen

The maximum length of the descriptor value. Ignored if value_type is sl_bt_gattdb_user_managed_value, or if this is a Client Characteristic Configuration descriptor.

[in]value_len

Length of data in value

[in]value

The initial descriptor value. Length of this value must be less than or equal to maxlen. Ingored if value type is sl_bt_gattdb_user_managed_value, or if this is a Client Characteristic Configuration descriptor.

[out]descriptor

The descriptor attribute handle. This handle is ensured valid in current session. It may change after the session if attributes have been inserted or deleted in front of it.

Add a 16-bits UUID descriptor to a characteristic. When successful, the descriptor is appended to the descriptor list of the characteristic and inherits the started or stopped state of the characteristic.

This command does not support adding Characteristic Extended Properties descriptors. This descriptor is automatically added if the characteristic value has the reliable-write property or when a Characteristic User Description descriptor is added and the user description has the write property.

Use the sl_bt_gattdb_add_uuid128_descriptor command to add a 128-bits UUID descriptor.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 9291 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_gattdb_add_uuid128_descriptor#

sl_status_t sl_bt_gattdb_add_uuid128_descriptor (uint16_t session, uint16_t characteristic, uint16_t property, uint16_t security, uuid_128 uuid, uint8_t value_type, uint16_t maxlen, size_t value_len, const uint8_t * value, uint16_t * descriptor)
Parameters
[in]session

The database update session ID

[in]characteristic

The characteristic value attribute handle of the characteristic the descriptor is added to

[in]property

Bitmask of characteristic descriptor properties

[in]security

Security requirement. Value: 0 or bitmask of GATT Attribute Security Requirement Flags. A security requirement flag for a property is ignored if the property is not set for the descriptor.

[in]uuid

The 128-bits UUID in little endian format

[in]value_type

Enum sl_bt_gattdb_value_type_t. The value type. Ignored if this is a Client Characteristic Configuration descriptor. Values:

  • sl_bt_gattdb_fixed_length_value (0x1): A fixed-length value managed by the local GATT server for responding the read and write requests of remote GATT clients

  • sl_bt_gattdb_variable_length_value (0x2): A variable-length value managed by the local GATT server for responding the read and write requests of remote GATT clients

  • sl_bt_gattdb_user_managed_value (0x3): A value managed by the user application for responding the read and write requests of remote GATT clients.

[in]maxlen

The maximum length of the descriptor value. Ignored if value_type is sl_bt_gattdb_user_managed_value, or if this is a Client Characteristic Configuration descriptor.

[in]value_len

Length of data in value

[in]value

The initial descriptor value. Length of this value must be less than or equal to maxlen. Ignored if value type is sl_bt_gattdb_user_managed_value, or if this is a Client Characteristic Configuration descriptor.

[out]descriptor

The descriptor attribute handle. This handle is ensured valid in current session. It may change after the session if attributes have been inserted or deleted in front of it.

Add a 128-bits UUID descriptor to a characteristic. When successful, the descriptor is appended to the descriptor list of the characteristic and inherits the started or stopped state of the characteristic.

This command does not support adding Characteristic Extended Properties descriptors. This descriptor is automatically added if the characteristic value has the reliable-write property or when a Characteristic User Description descriptor is added and the user description has the write property.

Use the sl_bt_gattdb_add_uuid16_descriptor command to add a 16-bits UUID descriptor.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 9352 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_gattdb_remove_descriptor#

sl_status_t sl_bt_gattdb_remove_descriptor (uint16_t session, uint16_t descriptor)
Parameters
[in]session

The database update session ID

[in]descriptor

The descriptor handle

Remove a descriptor from a characteristic.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 9373 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_gattdb_start_service#

sl_status_t sl_bt_gattdb_start_service (uint16_t session, uint16_t service)
Parameters
[in]session

The database update session ID

[in]service

The service declaration attribute handle of the service

Start a service, so that the service and its attributes including characteristics and descriptors become visible to remote GATT clients after this change has been committed.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 9388 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_gattdb_stop_service#

sl_status_t sl_bt_gattdb_stop_service (uint16_t session, uint16_t service)
Parameters
[in]session

The database update session ID

[in]service

The service declaration attribute handle of the service

Stop a service, so that the service and its attributes including characteristics and descriptors become invisible to remote GATT clients after this change has been committed.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 9402 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_gattdb_start_characteristic#

sl_status_t sl_bt_gattdb_start_characteristic (uint16_t session, uint16_t characteristic)
Parameters
[in]session

The database update session ID

[in]characteristic

The characteristic value attribute handle of the characteristic

Start a characteristic, so that the characteristic and its attributes become visible to remote GATT clients after this change has been committed. SL_STATUS_INVALID_STATE error is returned if the parent service is not started.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 9418 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_gattdb_stop_characteristic#

sl_status_t sl_bt_gattdb_stop_characteristic (uint16_t session, uint16_t characteristic)
Parameters
[in]session

The database update session ID

[in]characteristic

The characteristic value attribute handle of the characteristic

Stop a characteristic, so that the characteristic and its attributes become invisible to remote GATT clients after this change has been committed.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 9433 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_gattdb_commit#

sl_status_t sl_bt_gattdb_commit (uint16_t session)
Parameters
[in]session

The database update session ID

Save all changes performed in the current session and close the session. The stack will assign final handles to new and affected attributes and handle GATT caching as needed. The stack removes the client characteristic configurations of non-connected GATT clients except the service-changed configuration. For connected GATT clients during this database change, the stack removes the configurations to the removed characteristics. The session ID, temporary attribute handles returned during this session, and other existing attribute handles that are after newly added or removed attributes are invalidated.

Some attribute handles returned in this session may become invalid if attributes are not created in the order they present in the database. In this case, attribute handle cache of the database in the user application must be refreshed to avoid accidentally using an invalidated handle in subsequent operations.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 9459 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_gattdb_abort#

sl_status_t sl_bt_gattdb_abort (uint16_t session)
Parameters
[in]session

The database update session ID

Cancel all changes performed in the current session and close the session. The database remains in the same state it was in just before the session was started. The session ID and all temporary attribute handles returned during this session are invalidated.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 9473 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

Macro Definition Documentation#

sl_bt_cmd_gattdb_new_session_id#

#define sl_bt_cmd_gattdb_new_session_id
Value:
0x00460020

Definition at line 8803 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_cmd_gattdb_add_service_id#

#define sl_bt_cmd_gattdb_add_service_id
Value:
0x01460020

Definition at line 8804 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_cmd_gattdb_remove_service_id#

#define sl_bt_cmd_gattdb_remove_service_id
Value:
0x02460020

Definition at line 8805 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_cmd_gattdb_add_included_service_id#

#define sl_bt_cmd_gattdb_add_included_service_id
Value:
0x03460020

Definition at line 8806 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_cmd_gattdb_remove_included_service_id#

#define sl_bt_cmd_gattdb_remove_included_service_id
Value:
0x04460020

Definition at line 8807 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_cmd_gattdb_add_uuid16_characteristic_id#

#define sl_bt_cmd_gattdb_add_uuid16_characteristic_id
Value:
0x05460020

Definition at line 8808 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_cmd_gattdb_add_uuid128_characteristic_id#

#define sl_bt_cmd_gattdb_add_uuid128_characteristic_id
Value:
0x06460020

Definition at line 8809 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_cmd_gattdb_remove_characteristic_id#

#define sl_bt_cmd_gattdb_remove_characteristic_id
Value:
0x07460020

Definition at line 8810 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_cmd_gattdb_add_uuid16_descriptor_id#

#define sl_bt_cmd_gattdb_add_uuid16_descriptor_id
Value:
0x08460020

Definition at line 8811 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_cmd_gattdb_add_uuid128_descriptor_id#

#define sl_bt_cmd_gattdb_add_uuid128_descriptor_id
Value:
0x09460020

Definition at line 8812 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_cmd_gattdb_remove_descriptor_id#

#define sl_bt_cmd_gattdb_remove_descriptor_id
Value:
0x0a460020

Definition at line 8813 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_cmd_gattdb_start_service_id#

#define sl_bt_cmd_gattdb_start_service_id
Value:
0x0b460020

Definition at line 8814 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_cmd_gattdb_stop_service_id#

#define sl_bt_cmd_gattdb_stop_service_id
Value:
0x0c460020

Definition at line 8815 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_cmd_gattdb_start_characteristic_id#

#define sl_bt_cmd_gattdb_start_characteristic_id
Value:
0x0d460020

Definition at line 8816 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_cmd_gattdb_stop_characteristic_id#

#define sl_bt_cmd_gattdb_stop_characteristic_id
Value:
0x0e460020

Definition at line 8817 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_cmd_gattdb_commit_id#

#define sl_bt_cmd_gattdb_commit_id
Value:
0x0f460020

Definition at line 8818 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_cmd_gattdb_abort_id#

#define sl_bt_cmd_gattdb_abort_id
Value:
0x10460020

Definition at line 8819 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_rsp_gattdb_new_session_id#

#define sl_bt_rsp_gattdb_new_session_id
Value:
0x00460020

Definition at line 8820 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_rsp_gattdb_add_service_id#

#define sl_bt_rsp_gattdb_add_service_id
Value:
0x01460020

Definition at line 8821 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_rsp_gattdb_remove_service_id#

#define sl_bt_rsp_gattdb_remove_service_id
Value:
0x02460020

Definition at line 8822 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_rsp_gattdb_add_included_service_id#

#define sl_bt_rsp_gattdb_add_included_service_id
Value:
0x03460020

Definition at line 8823 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_rsp_gattdb_remove_included_service_id#

#define sl_bt_rsp_gattdb_remove_included_service_id
Value:
0x04460020

Definition at line 8824 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_rsp_gattdb_add_uuid16_characteristic_id#

#define sl_bt_rsp_gattdb_add_uuid16_characteristic_id
Value:
0x05460020

Definition at line 8825 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_rsp_gattdb_add_uuid128_characteristic_id#

#define sl_bt_rsp_gattdb_add_uuid128_characteristic_id
Value:
0x06460020

Definition at line 8826 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_rsp_gattdb_remove_characteristic_id#

#define sl_bt_rsp_gattdb_remove_characteristic_id
Value:
0x07460020

Definition at line 8827 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_rsp_gattdb_add_uuid16_descriptor_id#

#define sl_bt_rsp_gattdb_add_uuid16_descriptor_id
Value:
0x08460020

Definition at line 8828 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_rsp_gattdb_add_uuid128_descriptor_id#

#define sl_bt_rsp_gattdb_add_uuid128_descriptor_id
Value:
0x09460020

Definition at line 8829 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_rsp_gattdb_remove_descriptor_id#

#define sl_bt_rsp_gattdb_remove_descriptor_id
Value:
0x0a460020

Definition at line 8830 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_rsp_gattdb_start_service_id#

#define sl_bt_rsp_gattdb_start_service_id
Value:
0x0b460020

Definition at line 8831 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_rsp_gattdb_stop_service_id#

#define sl_bt_rsp_gattdb_stop_service_id
Value:
0x0c460020

Definition at line 8832 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_rsp_gattdb_start_characteristic_id#

#define sl_bt_rsp_gattdb_start_characteristic_id
Value:
0x0d460020

Definition at line 8833 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_rsp_gattdb_stop_characteristic_id#

#define sl_bt_rsp_gattdb_stop_characteristic_id
Value:
0x0e460020

Definition at line 8834 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_rsp_gattdb_commit_id#

#define sl_bt_rsp_gattdb_commit_id
Value:
0x0f460020

Definition at line 8835 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_rsp_gattdb_abort_id#

#define sl_bt_rsp_gattdb_abort_id
Value:
0x10460020

Definition at line 8836 of file /mnt/raid/workspaces/ws.pY3F1RWXq/overlay/gsdk/protocol/bluetooth/build_release/bt_api/sw/bgapi/inc/sl_bt_api.h