This section defines the database of Immediate Alert Service and manages the write event of Alert Level Characteristic from a peer device.
More...
This section defines the database of Immediate Alert Service and manages the write event of Alert Level Characteristic from a peer device.
Terms and Acronyms
| Terms | Details |
| IAS | Immediate Alert Service. This service exposes a control point to allow a peer device to cause the device to immediately alert. |
How to use this module
- Step 1. Add IAS service to the application's GATT service database. And then return the bt_gatts_service_t pointer to GATTS stack by implementing the user-defined callback bt_get_gatt_server().
- Sample Code:
&ble_gap_service,
&ble_gatt_service,
&ble_ias_service,
NULL
};
{
return ble_gatt_server;
}
- Step 2. Implement the user-defined callback ble_ias_alert_level_write_callback() to listen to the write event of the Alert Level Characteristic.
|
| void | ble_ias_alert_level_write_callback (uint16_t conn_handle, uint8_t alert_level) |
| | This function is a user-defined callback for the application to listen to the write event of Alert Level Characteristic. More...
|
| |
| void ble_ias_alert_level_write_callback |
( |
uint16_t |
conn_handle, |
|
|
uint8_t |
alert_level |
|
) |
| |
This function is a user-defined callback for the application to listen to the write event of Alert Level Characteristic.
- Parameters
-
| [in] | conn_handle | is the connection handle. |
| [in] | alert_level | is the alert level value written by the remote device. |
- Returns
- void.