Module for storing data on BLE connections. More...
Modules | |
BLE connection state functions | |
Data Structures | |
struct | ble_conn_state_conn_handle_list_t |
Type used to present a list of conn_handles. More... | |
Macros | |
#define | BLE_CONN_STATE_MAX_CONNECTIONS BLE_GAP_ROLE_COUNT_COMBINED_MAX |
#define | BLE_CONN_STATE_USER_FLAG_COUNT 24 |
Typedefs | |
typedef void(* | ble_conn_state_user_function_t )(uint16_t conn_handle, void *p_context) |
Function to be called when a flag ID is set. See ble_conn_state_for_each_set_user_flag. More... | |
Enumerations | |
enum | ble_conn_state_status_t { BLE_CONN_STATUS_INVALID, BLE_CONN_STATUS_DISCONNECTED, BLE_CONN_STATUS_CONNECTED } |
Connection handle statuses. More... | |
enum | ble_conn_state_user_flag_id_t { BLE_CONN_STATE_USER_FLAG0 = 0, BLE_CONN_STATE_USER_FLAG1, BLE_CONN_STATE_USER_FLAG2, BLE_CONN_STATE_USER_FLAG3, BLE_CONN_STATE_USER_FLAG4, BLE_CONN_STATE_USER_FLAG5, BLE_CONN_STATE_USER_FLAG6, BLE_CONN_STATE_USER_FLAG7, BLE_CONN_STATE_USER_FLAG8, BLE_CONN_STATE_USER_FLAG9, BLE_CONN_STATE_USER_FLAG10, BLE_CONN_STATE_USER_FLAG11, BLE_CONN_STATE_USER_FLAG12, BLE_CONN_STATE_USER_FLAG13, BLE_CONN_STATE_USER_FLAG14, BLE_CONN_STATE_USER_FLAG15, BLE_CONN_STATE_USER_FLAG16, BLE_CONN_STATE_USER_FLAG17, BLE_CONN_STATE_USER_FLAG18, BLE_CONN_STATE_USER_FLAG19, BLE_CONN_STATE_USER_FLAG20, BLE_CONN_STATE_USER_FLAG21, BLE_CONN_STATE_USER_FLAG22, BLE_CONN_STATE_USER_FLAG23, BLE_CONN_STATE_USER_FLAG_INVALID } |
One ID for each user flag collection. More... | |
Module for storing data on BLE connections.
This module stores certain states for each connection, which can be queried by connection handle. The module uses BLE events to keep the states updated.
In addition to the preprogrammed states, this module can also keep track of a number of binary user states, or user flags. These are reset to 0 for new connections, but otherwise not touched by this module.
This module uses the Atomic operations API module to make the flag operations thread-safe.
#define BLE_CONN_STATE_MAX_CONNECTIONS BLE_GAP_ROLE_COUNT_COMBINED_MAX |
The maximum number of connections supported.
#define BLE_CONN_STATE_USER_FLAG_COUNT 24 |
The number of available user flags.
typedef void(* ble_conn_state_user_function_t)(uint16_t conn_handle, void *p_context) |
Function to be called when a flag ID is set. See ble_conn_state_for_each_set_user_flag.
[in] | conn_handle | The connection the flag is set for. |
[in] | p_context | Arbitrary pointer provided by the caller of ble_conn_state_for_each_set_user_flag. |
Connection handle statuses.
One ID for each user flag collection.
These IDs are used to identify user flag collections in the API calls.