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

This is the client for the Link Loss Service. More...

Detailed Description

This is the client for the Link Loss Service.

Data Structures

struct  st_ble_llc_alert_level_attr_hdl_t
 Alert Level attribute handle value. More...
 
struct  st_ble_llc_evt_data_t
 Link Loss client event data. More...
 

Macros

#define BLE_LLC_ALERT_LEVEL_UUID   (0x2A06)
 
#define BLE_LLC_ALERT_LEVEL_LEN   (1)
 

Enumerations

enum  e_ble_llc_alert_level_level_t {
  BLE_LLC_ALERT_LEVEL_LEVEL_NO_ALERT = 0,
  BLE_LLC_ALERT_LEVEL_LEVEL_MILD_ALERT = 1,
  BLE_LLC_ALERT_LEVEL_LEVEL_HIGH_ALERT = 2
}
 Alert Level Level enumeration. More...
 
enum  e_ble_llc_char_idx_t { BLE_LLC_ALERT_LEVEL_IDX }
 Link Loss characteristic ID. More...
 
enum  e_ble_llc_event_t {
  BLE_LLC_EVENT_ALERT_LEVEL_READ_RSP = BLE_SERVC_ATTR_EVENT(BLE_LLC_ALERT_LEVEL_IDX, BLE_SERVC_READ_RSP),
  BLE_LLC_EVENT_ALERT_LEVEL_WRITE_RSP = BLE_SERVC_ATTR_EVENT(BLE_LLC_ALERT_LEVEL_IDX, BLE_SERVC_WRITE_RSP)
}
 Link Loss client event type. More...
 

Functions

ble_status_t R_BLE_LLC_ReadAlertLevel (uint16_t conn_hdl)
 Read Alert Level characteristic value from the remote GATT database. More...
 
ble_status_t R_BLE_LLC_WriteAlertLevel (uint16_t conn_hdl, const uint8_t *p_value)
 Write Alert Level characteristic value to remote GATT database. More...
 
void R_BLE_LLC_GetAlertLevelAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_llc_alert_level_attr_hdl_t *p_hdl)
 Get Alert Level attribute handles. More...
 
ble_status_t R_BLE_LLC_Init (ble_servc_app_cb_t cb)
 Initialize Link Loss client. More...
 
void R_BLE_LLC_ServDiscCb (uint16_t conn_hdl, uint8_t serv_idx, uint16_t type, void *p_param)
 Link Loss client discovery callback. More...
 
void R_BLE_LLC_GetServAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_gatt_hdl_range_t *p_hdl)
 Get Link Loss client attribute handle. More...
 
ble_status_t R_BLE_LLC_Disconnect (uint16_t conn_hdl, uint8_t reason, uint8_t *alertlevel)
 Alert when Disconnected. More...
 

Enumeration Type Documentation

◆ e_ble_llc_alert_level_level_t

Alert Level Level enumeration.

Enumerator
BLE_LLC_ALERT_LEVEL_LEVEL_NO_ALERT 

No Alert

BLE_LLC_ALERT_LEVEL_LEVEL_MILD_ALERT 

Mild Alert

BLE_LLC_ALERT_LEVEL_LEVEL_HIGH_ALERT 

High Alert

◆ e_ble_llc_char_idx_t

Link Loss characteristic ID.

◆ e_ble_llc_event_t

Link Loss client event type.

Function Documentation

◆ R_BLE_LLC_ReadAlertLevel()

ble_status_t R_BLE_LLC_ReadAlertLevel ( uint16_t  conn_hdl)

Read Alert Level characteristic value from the remote GATT database.

Parameters
[in]conn_hdlConnection handle.
Returns
ble_status_t

◆ R_BLE_LLC_WriteAlertLevel()

ble_status_t R_BLE_LLC_WriteAlertLevel ( uint16_t  conn_hdl,
const uint8_t *  p_value 
)

Write Alert Level characteristic value to remote GATT database.

Parameters
[in]conn_hdlConnection handle.
[in]p_valueAlert Level characteristic value to write.
Returns
ble_status_t

◆ R_BLE_LLC_GetAlertLevelAttrHdl()

void R_BLE_LLC_GetAlertLevelAttrHdl ( const st_ble_dev_addr_t p_addr,
st_ble_llc_alert_level_attr_hdl_t p_hdl 
)

Get Alert Level attribute handles.

Parameters
[in]p_addrBluetooth device address for the attribute handles.
[out]p_hdlThe pointer to store the retrieved attribute handles.
Returns
ble_status_t

◆ R_BLE_LLC_Init()

ble_status_t R_BLE_LLC_Init ( ble_servc_app_cb_t  cb)

Initialize Link Loss client.

Parameters
[in]cbClient callback.
Returns
ble_status_t

◆ R_BLE_LLC_ServDiscCb()

void R_BLE_LLC_ServDiscCb ( uint16_t  conn_hdl,
uint8_t  serv_idx,
uint16_t  type,
void *  p_param 
)

Link Loss client discovery callback.

Parameters
[in]conn_hdlConnection handle
[in]serv_idxService instance index.
[in]typeService discovery event type.
[in]p_paramService discovery event parameter.
Returns
ble_status_t

◆ R_BLE_LLC_GetServAttrHdl()

void R_BLE_LLC_GetServAttrHdl ( const st_ble_dev_addr_t p_addr,
st_ble_gatt_hdl_range_t p_hdl 
)

Get Link Loss client attribute handle.

Parameters
[in]p_addrBluetooth device address for the attribute handles.
[out]p_hdlThe pointer to store the retrieved attribute handles.

◆ R_BLE_LLC_Disconnect()

ble_status_t R_BLE_LLC_Disconnect ( uint16_t  conn_hdl,
uint8_t  reason,
uint8_t *  alertlevel 
)

Alert when Disconnected.

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