Find Me Locator Profile declarations.
Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | DISCOVER_SUCCESS (10) |
#define | FMP_HIGH_ALERT_RANGE (-90) |
#define | FMP_LOW_ALERT_RANGE (-70) |
Typedefs | |
typedef enum fmp_locator_alert_level | fmp_locator_alert_level_t |
Enumerations | |
enum | fmp_locator_alert_level { FMP_NO_ALERT = 0, FMP_MID_ALERT, FMP_HIGH_ALERT } |
Functions | |
at_ble_status_t | fmp_locator_characteristic_found_handler (void *params) |
Handles all Discovered characteristics of a given handler in a connected device. More... | |
at_ble_status_t | fmp_locator_connected_state_handler (void *params) |
connection state handler called when device goes on connected state More... | |
at_ble_status_t | fmp_locator_disconnect_event_handler (void *params) |
disconnection event handler More... | |
at_ble_status_t | fmp_locator_discovery_complete_handler (void *params) |
Discover all Characteristics supported for Immediate alert Service of a connected device. More... | |
void | fmp_locator_init (void) |
Initialize the profile, includes all initializations and start up routines of the profiles. More... | |
at_ble_status_t | fmp_locator_pair_done_handler (void *params) |
at_ble_status_t | fmp_locator_service_discover (at_ble_handle_t handle) |
Discover all services. More... | |
at_ble_status_t | fmp_locator_service_found_handler (void *param) |
Service found handler invoked by ble manager. More... | |
#define DISCOVER_SUCCESS (10) |
#define FMP_HIGH_ALERT_RANGE (-90) |
Referenced by rssi_update().
#define FMP_LOW_ALERT_RANGE (-70) |
Referenced by rssi_update().
typedef enum fmp_locator_alert_level fmp_locator_alert_level_t |
at_ble_status_t fmp_locator_characteristic_found_handler | ( | void * | params | ) |
Handles all Discovered characteristics of a given handler in a connected device.
[in] | characteristic_found | Discovered characteristics params of a connected device |
References ALERT_LEVEL_CHAR_UUID, AT_BLE_FAILURE, AT_BLE_SUCCESS, ble_check_iscentral(), gatt_ias_char_handler::char_discovery, gatt_ias_char_handler::char_handle, at_ble_characteristic_found_t::char_handle, at_ble_characteristic_found_t::char_uuid, at_ble_characteristic_found_t::conn_handle, DBG_LOG_PTS, DISCOVER_SUCCESS, at_ble_characteristic_found_t::properties, at_ble_uuid_t::uuid, and at_ble_characteristic_found_t::value_handle.
at_ble_status_t fmp_locator_connected_state_handler | ( | void * | params | ) |
connection state handler called when device goes on connected state
[in] | at_ble_connected_t | which includes the connection parameters |
connection state handler called when device goes on connected state
References ALL_UNUSED, AT_BLE_SUCCESS, ble_check_iscentral(), fmp_locator_service_discover(), and status.
at_ble_status_t fmp_locator_disconnect_event_handler | ( | void * | params | ) |
disconnection event handler
[in] | at_ble_disconencted_t | which includes the connection parameters like handle,reason for disconnection |
disconnection event handler
References ALL_UNUSED, and AT_BLE_SUCCESS.
at_ble_status_t fmp_locator_discovery_complete_handler | ( | void * | params | ) |
Discover all Characteristics supported for Immediate alert Service of a connected device.
[in] | discover_status | discovery status of each handle |
References at_ble_characteristic_discover_all(), AT_BLE_DISC_ALL_CHAR, AT_BLE_DISC_ALL_SVC, at_ble_disconnect(), AT_BLE_FAILURE, AT_BLE_INVALID_PARAM, AT_BLE_SUCCESS, AT_BLE_TERMINATED_BY_USER, ble_check_iscentral(), gatt_ias_char_handler::char_discovery, DBG_LOG, DBG_LOG_DEV, DISCOVER_SUCCESS, gatt_ias_char_handler::end_handle, gatt_ias_char_handler::service_discovery, gatt_ias_char_handler::start_handle, and at_ble_discovery_complete_t::status.
void fmp_locator_init | ( | void | ) |
Initialize the profile, includes all initializations and start up routines of the profiles.
[in] | void |
Initialize the profile, includes all initializations and start up routines of the profiles.
References BLE_GAP_EVENT_TYPE, BLE_GATT_CLIENT_EVENT_TYPE, ble_mgr_events_callback_handler(), and REGISTER_CALL_BACK.
Referenced by main().
at_ble_status_t fmp_locator_pair_done_handler | ( | void * | params | ) |
at_ble_status_t fmp_locator_service_discover | ( | at_ble_handle_t | handle | ) |
Discover all services.
[in] | connection | handle. |
[in] | handle | connection handle |
References at_ble_primary_service_discover_all(), AT_BLE_SUCCESS, DBG_LOG, DBG_LOG_DEV, GATT_DISCOVERY_ENDING_HANDLE, GATT_DISCOVERY_STARTING_HANDLE, and status.
Referenced by fmp_locator_connected_state_handler(), and fmp_locator_pair_done_handler().
at_ble_status_t fmp_locator_service_found_handler | ( | void * | param | ) |
Service found handler invoked by ble manager.
References AT_BLE_SUCCESS, AT_BLE_UUID_16, DBG_LOG, DBG_LOG_PTS, DISCOVER_SUCCESS, gatt_ias_char_handler::end_handle, at_ble_primary_service_found_t::end_handle, IMMEDIATE_ALERT_SERVICE_UUID, gatt_ias_char_handler::service_discovery, at_ble_primary_service_found_t::service_uuid, gatt_ias_char_handler::start_handle, at_ble_primary_service_found_t::start_handle, at_ble_uuid_t::type, and at_ble_uuid_t::uuid.