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

This is the client for the Immediate Alert Service. More...

Detailed Description

This is the client for the Immediate Alert Service.

Data Structures

struct  st_ble_iac_evt_data_t
 Immediate Alert Service Client event data. More...
 
struct  st_ble_iac_hdls_t
 Immediate Alert Service attribute handles. More...
 
struct  st_ble_iac_init_param_t
 Immediate Alert Service initialization parameters. More...
 
struct  st_ble_iac_connect_param_t
 Immediate Alert Service Client connection parameters. More...
 
struct  st_ble_iac_disconnect_param_t
 Immediate Alert Service disconnection parameters. More...
 

Macros

#define BLE_IAC_ALERT_LEVEL_LEN   (1)
 Alert Level characteristic value length. More...
 

Typedefs

typedef void(* ble_iac_app_cb_t) (uint16_t type, ble_status_t result, st_ble_iac_evt_data_t *p_data)
 Immediate Alert Service Client event callback. More...
 

Enumerations

enum  e_ble_iac_event_t { BLE_IAC_EVENT_ERROR_RSP }
 Immediate Alert Service Client event type. More...
 
enum  e_ble_iac_alert_level_t {
  BLE_IAC_ALERT_LEVEL_ALERT_LEVEL_NO_ALERT = 0,
  BLE_IAC_ALERT_LEVEL_ALERT_LEVEL_MILD_ALERT = 1,
  BLE_IAC_ALERT_LEVEL_ALERT_LEVEL_HIGH_ALERT = 2
}
 Alert Level enumeration. More...
 

Functions

ble_status_t R_BLE_IAC_Init (const st_ble_iac_init_param_t *p_param)
 Initialize Immediate Alert Service Client. More...
 
ble_status_t R_BLE_IAC_Connect (uint16_t conn_hdl, const st_ble_iac_connect_param_t *p_param)
 Perform Immediate Alert Service Client connection settings. More...
 
ble_status_t R_BLE_IAC_Disconnect (uint16_t conn_hdl, st_ble_iac_disconnect_param_t *p_param)
 Retrieve Immediate Alert Service Client connection specific settings before disconnection. More...
 
ble_status_t R_BLE_IAC_WriteWithoutRspAlertLevel (uint16_t conn_hdl, uint8_t app_value)
 Write Alert Level characteristic value without response to remote GATT database. More...
 
void R_BLE_IAC_ServDiscCb (uint16_t conn_hdl, uint8_t idx, uint16_t type, void *p_param)
 Callback function for the Immediate Alert Discovery events. More...
 
uint32_t R_BLE_IAC_GetVersion (void)
 Return version of the IAC service client. More...
 

Variables

const uint8_t BLE_IAC_UUID [BLE_GATT_16_BIT_UUID_SIZE]
 Immediate Alert Service UUID. More...
 
const uint8_t BLE_IAC_ALERT_LEVEL_UUID [BLE_GATT_16_BIT_UUID_SIZE]
 Alert Level characteristic UUID. More...
 

Macro Definition Documentation

◆ BLE_IAC_ALERT_LEVEL_LEN

#define BLE_IAC_ALERT_LEVEL_LEN   (1)

Alert Level characteristic value length.

Typedef Documentation

◆ ble_iac_app_cb_t

typedef void(* ble_iac_app_cb_t) (uint16_t type, ble_status_t result, st_ble_iac_evt_data_t *p_data)

Immediate Alert Service Client event callback.

Enumeration Type Documentation

◆ e_ble_iac_event_t

Immediate Alert Service Client event type.

Enumerator
BLE_IAC_EVENT_ERROR_RSP 

error response

◆ e_ble_iac_alert_level_t

Alert Level enumeration.

Enumerator
BLE_IAC_ALERT_LEVEL_ALERT_LEVEL_NO_ALERT 

Alert level no alert shall be done on the device

BLE_IAC_ALERT_LEVEL_ALERT_LEVEL_MILD_ALERT 

Alert level mild alert the device shall alert

BLE_IAC_ALERT_LEVEL_ALERT_LEVEL_HIGH_ALERT 

Alert level high alert the device shall alert the strongest possible

Function Documentation

◆ R_BLE_IAC_Init()

ble_status_t R_BLE_IAC_Init ( const st_ble_iac_init_param_t p_param)

Initialize Immediate Alert Service Client.

This function shall be called once at startup.

Parameters
[in]p_parampointer to Immediate Alert Service Client initialization parameters.
Returns
ble_status_t

◆ R_BLE_IAC_Connect()

ble_status_t R_BLE_IAC_Connect ( uint16_t  conn_hdl,
const st_ble_iac_connect_param_t p_param 
)

Perform Immediate Alert Service Client connection settings.

This function shall be called on each connection establishment.

Parameters
[in]conn_hdlConnection handle.
[in]p_paramPointer to Connection parameters.
Returns
ble_status_t

◆ R_BLE_IAC_Disconnect()

ble_status_t R_BLE_IAC_Disconnect ( uint16_t  conn_hdl,
st_ble_iac_disconnect_param_t p_param 
)

Retrieve Immediate Alert Service Client connection specific settings before disconnection.

This function shall be called on each disconnection.

Parameters
[in]conn_hdlConnection handle.
[in]p_paramPointer to Disconnection parameters.
Returns
ble_status_t

◆ R_BLE_IAC_WriteWithoutRspAlertLevel()

ble_status_t R_BLE_IAC_WriteWithoutRspAlertLevel ( uint16_t  conn_hdl,
uint8_t  app_value 
)

Write Alert Level characteristic value without response to remote GATT database.

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

◆ R_BLE_IAC_ServDiscCb()

void R_BLE_IAC_ServDiscCb ( uint16_t  conn_hdl,
uint8_t  idx,
uint16_t  type,
void *  p_param 
)

Callback function for the Immediate Alert Discovery events.

Parameters
[in]conn_hdlConnection handle.
[in]idxService index used to distiguish the multiple same UUID service.
[in]typeDiscovery event type
[out]p_paramPointer to GATTC event data.

◆ R_BLE_IAC_GetVersion()

uint32_t R_BLE_IAC_GetVersion ( void  )

Return version of the IAC service client.

Returns
version

Variable Documentation

◆ BLE_IAC_UUID

const uint8_t BLE_IAC_UUID[BLE_GATT_16_BIT_UUID_SIZE]

Immediate Alert Service UUID.

◆ BLE_IAC_ALERT_LEVEL_UUID

const uint8_t BLE_IAC_ALERT_LEVEL_UUID[BLE_GATT_16_BIT_UUID_SIZE]

Alert Level characteristic UUID.