Nordic stack and drivers for the mbed BLE API Modified for HRM1017 for library 0.1.0
Fork of nRF51822 by
Immediate Alert Service Client
Immediate Alert Service Client module. More...
Data Structures | |
struct | ble_ias_c_evt_t |
Immediate Alert Service client event. More... | |
struct | ble_ias_c_s |
IAS Client structure. More... | |
struct | ble_ias_c_init_t |
IAS Client init structure. More... | |
Typedefs | |
typedef struct ble_ias_c_s | ble_ias_c_t |
IAS Client structure. | |
typedef void(* | ble_ias_c_evt_handler_t )(ble_ias_c_t *p_ias_c, ble_ias_c_evt_t *p_evt) |
Immediate Alert Service client event handler type. | |
Enumerations | |
enum | ble_ias_c_evt_type_t { BLE_IAS_C_EVT_SRV_DISCOVERED, BLE_IAS_C_EVT_SRV_NOT_FOUND, BLE_IAS_C_EVT_DISCONN_COMPLETE } |
Immediate Alert Service client event type. More... | |
Functions | |
uint32_t | ble_ias_c_init (ble_ias_c_t *p_ias_c, const ble_ias_c_init_t *p_ias_c_init) |
Function for initializing the Immediate Alert Service client. | |
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. | |
void | ble_ias_c_on_ble_evt (ble_ias_c_t *p_ias_c, const ble_evt_t *p_ble_evt) |
Function for handling the Application's BLE Stack events for Immediate Alert Service client. | |
static __INLINE bool | ble_ias_c_is_ias_discovered (const ble_ias_c_t *p_ias_c) |
Function for checking whether the peer's Immediate Alert Service instance and the alert level characteristic have been discovered. | |
Variables | |
ble_srv_error_handler_t | error_handler |
Function to be called in case of an error. | |
uint16_t | alert_level_handle |
Handle of Alert Level characteristic at peer (as provided by the BLE stack). | |
uint16_t | conn_handle |
Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). | |
ble_srv_error_handler_t | error_handler |
Function to be called in case of an error. |
Detailed Description
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.
Typedef Documentation
typedef void(* ble_ias_c_evt_handler_t)(ble_ias_c_t *p_ias_c, ble_ias_c_evt_t *p_evt) |
Immediate Alert Service client event handler type.
Definition at line 57 of file ble_ias_c.h.
typedef struct ble_ias_c_s ble_ias_c_t |
IAS Client structure.
This contains various status information for the client.
Definition at line 40 of file ble_ias_c.h.
Enumeration Type Documentation
enum ble_ias_c_evt_type_t |
Immediate Alert Service client event type.
- Enumerator:
Definition at line 43 of file ble_ias_c.h.
Function Documentation
uint32_t ble_ias_c_init | ( | ble_ias_c_t * | p_ias_c, |
const ble_ias_c_init_t * | p_ias_c_init | ||
) |
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.
static __INLINE bool ble_ias_c_is_ias_discovered | ( | const ble_ias_c_t * | p_ias_c ) | [static] |
Function for checking whether the peer's Immediate Alert Service instance and the alert level characteristic have been discovered.
- Parameters:
-
[in] p_ias_c Immediate Alert Service client structure.
Definition at line 114 of file ble_ias_c.h.
void ble_ias_c_on_ble_evt | ( | ble_ias_c_t * | p_ias_c, |
const ble_evt_t * | p_ble_evt | ||
) |
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.
Variable Documentation
uint16_t alert_level_handle [inherited] |
Handle of Alert Level characteristic at peer (as provided by the BLE stack).
Definition at line 64 of file ble_ias_c.h.
uint16_t conn_handle [inherited] |
Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection).
Definition at line 65 of file ble_ias_c.h.
ble_srv_error_handler_t error_handler [inherited] |
Function to be called in case of an error.
Definition at line 73 of file ble_ias_c.h.
ble_srv_error_handler_t error_handler [inherited] |
Function to be called in case of an error.
Definition at line 63 of file ble_ias_c.h.
Generated on Tue Jul 12 2022 14:11:59 by 1.7.2