Microchip® Advanced Software Framework

find_me_locator.h File Reference

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().

Enumerator
FMP_NO_ALERT 
FMP_MID_ALERT 
FMP_HIGH_ALERT 

at_ble_status_t fmp_locator_characteristic_found_handler ( void *  params)
at_ble_status_t fmp_locator_connected_state_handler ( void *  params)

connection state handler called when device goes on connected state

Parameters
[in]at_ble_connected_twhich includes the connection parameters
Returns
AT_BLE_SUCCESS operation completed successfully
AT_BLE_FAILURE Generic error. me profile connected state handler function

connection state handler called when device goes on connected state

References ALL_UNUSED, AT_BLE_SUCCESS, ble_check_iscentral(), and fmp_locator_service_discover().

at_ble_status_t fmp_locator_disconnect_event_handler ( void *  params)

disconnection event handler

Parameters
[in]at_ble_disconencted_twhich includes the connection parameters like handle,reason for disconnection
Returns
AT_BLE_SUCCESS operation completed successfully
AT_BLE_FAILURE Generic error.

disconnection event handler

References ALL_UNUSED, and AT_BLE_SUCCESS.

void fmp_locator_init ( void  )

Initialize the profile, includes all initializations and start up routines of the profiles.

Parameters
[in]void
Precondition
Must be called after ble_init
Returns
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_service_discover ( at_ble_handle_t  handle)

Discover all services.

Parameters
[in]connectionhandle.
Returns
AT_BLE_SUCCESS operation programmed successfully.
AT_BLE_INVALID_PARAM incorrect parameter.
AT_BLE_FAILURE Generic error.
Parameters
[in]handleconnection handle
Returns
AT_BLE_SUCCESS operation programmed successfully.
AT_BLE_INVALID_PARAM incorrect parameter.
AT_BLE_FAILURE Generic error.

References at_ble_primary_service_discover_all(), AT_BLE_SUCCESS, DBG_LOG, DBG_LOG_DEV, GATT_DISCOVERY_ENDING_HANDLE, and GATT_DISCOVERY_STARTING_HANDLE.

Referenced by fmp_locator_connected_state_handler(), and fmp_locator_pair_done_handler().