Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]
Link Loss Service Server

This service uses the Alert Level characteristic to cause an alert in the device when the link is lost. More...

Detailed Description

This service uses the Alert Level characteristic to cause an alert in the device when the link is lost.

Enumerations

enum  e_ble_lls_alert_level_level_t {
  BLE_LLS_ALERT_LEVEL_LEVEL_NO_ALERT = 0,
  BLE_LLS_ALERT_LEVEL_LEVEL_MILD_ALERT = 1,
  BLE_LLS_ALERT_LEVEL_LEVEL_HIGH_ALERT = 2
}
 Alert Level Level enumeration. More...
 
enum  e_ble_lls_char_idx_t { BLE_LLS_ALERT_LEVEL_IDX }
 Link Loss characteristic Index. More...
 
enum  e_ble_lls_event_t {
  BLE_LLS_EVENT_ALERT_LEVEL_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_LLS_ALERT_LEVEL_IDX, BLE_SERVS_WRITE_REQ),
  BLE_LLS_EVENT_ALERT_LEVEL_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_LLS_ALERT_LEVEL_IDX, BLE_SERVS_WRITE_COMP),
  BLE_LLS_EVENT_ALERT_LEVEL_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_LLS_ALERT_LEVEL_IDX, BLE_SERVS_READ_REQ)
}
 Link Loss event type. More...
 

Functions

ble_status_t R_BLE_LLS_SetAlertLevel (const uint8_t *p_value)
 Set Alert Level characteristic value to the local GATT database. More...
 
ble_status_t R_BLE_LLS_GetAlertLevel (uint8_t *p_value)
 Get Alert Level characteristic value from the local GATT database. More...
 
ble_status_t R_BLE_LLS_Init (ble_servs_app_cb_t cb)
 Initialize Link Loss service. More...
 
ble_status_t R_BLE_LLS_Disconnect (uint8_t reason, uint8_t *alertlevel)
 Alert when Disconnected. More...
 

Enumeration Type Documentation

◆ e_ble_lls_alert_level_level_t

Alert Level Level enumeration.

Enumerator
BLE_LLS_ALERT_LEVEL_LEVEL_NO_ALERT 

No Alert

BLE_LLS_ALERT_LEVEL_LEVEL_MILD_ALERT 

Mild Alert

BLE_LLS_ALERT_LEVEL_LEVEL_HIGH_ALERT 

High Alert

◆ e_ble_lls_char_idx_t

Link Loss characteristic Index.

◆ e_ble_lls_event_t

Link Loss event type.

Function Documentation

◆ R_BLE_LLS_SetAlertLevel()

ble_status_t R_BLE_LLS_SetAlertLevel ( const uint8_t *  p_value)

Set Alert Level characteristic value to the local GATT database.

Parameters
[in]p_valueCharacteristic value to set.
Returns
ble_status_t

◆ R_BLE_LLS_GetAlertLevel()

ble_status_t R_BLE_LLS_GetAlertLevel ( uint8_t *  p_value)

Get Alert Level characteristic value from the local GATT database.

Parameters
[in]p_valueOutput location for the acquired descriptor value.
Returns
ble_status_t

◆ R_BLE_LLS_Init()

ble_status_t R_BLE_LLS_Init ( ble_servs_app_cb_t  cb)

Initialize Link Loss service.

Parameters
[in]cbService callback.
Returns
ble_status_t

◆ R_BLE_LLS_Disconnect()

ble_status_t R_BLE_LLS_Disconnect ( uint8_t  reason,
uint8_t *  alertlevel 
)

Alert when Disconnected.

Parameters
[in]reasonDisconnected reason.
[out]alertlevelOutput location of Alert Level characteristic value.
Returns
ble_status_t