Immediate Alert Service Client module.
More...
Immediate Alert Service Client module.
This module implements the Immediate Alert Service client - locator role of the Find Me profile. On BLE_GAP_EVT_CONNECTED event, this module starts discovery of the Immediate Alert Service with Alert Level characteristic at the peer. This module will indicate the application about a successful service & characteristic discovery using BLE_IAS_C_EVT_CHAR_DISCOVERED event. The application can use ble_ias_c_send_alert_level function to signal alerts to the peer.
- Note
- The application must propagate BLE stack events to this module by calling ble_ias_c_on_ble_evt() from the from the ble_stack_handler callback function.
Immediate Alert Service client event type.
Enumerator |
---|
BLE_IAS_C_EVT_SRV_DISCOVERED |
Event indicating that the Immediate Alert Service is found at the peer.
|
BLE_IAS_C_EVT_SRV_NOT_FOUND |
Event indicating that the Immediate Alert Service is not found at the peer.
|
BLE_IAS_C_EVT_DISCONN_COMPLETE |
Event indicating that the Immediate Alert Service client module has completed the processing of BLE_GAP_EVT_DISCONNECTED event. This event is raised only if a valid instance of IAS was found at the peer during the discovery phase. This event can be used the application to do clean up related to the IAS Client.
|
Function for initializing the Immediate Alert Service client.
This call allows the application to initialize the Immediate Alert Service client.
- Parameters
-
[out] | p_ias_c | Immediate Alert Service client structure. This structure will have to be supplied by the application. It will be initialized by this function, and will later be used to identify this particular client instance. |
[in] | p_ias_c_init | Information needed to initialize the Immediate Alert Service client. |
- Returns
- NRF_SUCCESS on successful initialization of service.
Function for handling the Application's BLE Stack events for Immediate Alert Service client.
Handles all events from the BLE stack of interest to the Immediate Alert Service client.
- Parameters
-
[in] | p_ias_c | Immediate Alert Service client structure. |
[in] | p_ble_evt | Event received from the BLE stack. |
uint32_t ble_ias_c_send_alert_level |
( |
const ble_ias_c_t * |
p_ias_c, |
|
|
uint8_t |
alert_level |
|
) |
| |
Function for sending alert level to the peer.
This function allows the application to send an alert to the peer.
- Parameters
-
[in] | p_ias_c | Immediate Alert Service client structure. |
[in] | alert_level | Required alert level to be sent to the peer. |
- Returns
- NRF_SUCCESS on success, otherwise an error code.
uint16_t ble_ias_c_s::alert_level_handle |
Handle of Alert Level characteristic at peer (as provided by the BLE stack).
uint16_t ble_ias_c_s::conn_handle |
Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection).
Function to be called in case of an error.
Function to be called in case of an error.
Event handler to be called for handling events in the Immediate Alert Service client.
Event handler to be called for handling events from the Immediate Alert Service client.