Linkloss service.
Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.
#include "link_loss.h"
Functions | |
void | init_linkloss_service (gatt_service_handler_t *linkloss_serv) |
Linkloss service initialization. More... | |
at_ble_status_t | lls_primary_service_define (gatt_service_handler_t *lls_service) |
linkloss service definition More... | |
uint8_t | lls_set_alert_value (at_ble_characteristic_changed_t *change_params, gatt_service_handler_t *lls_handler) |
Setting the alert value of linkloss service. More... | |
Variables | |
uint8_t | linkloss_initial_value = 0 |
static const char * | lls_gs_str [] = {"NO_ALERT", "MILD_ALERT", "HIGH_ALERT"} |
void init_linkloss_service | ( | gatt_service_handler_t * | linkloss_serv | ) |
Linkloss service initialization.
Initialize the linkloss service with default values.
References ALERT_LEVEL_CHAR_UUID, AT_BLE_ATTR_NO_PERMISSIONS, AT_BLE_ATTR_READABLE_NO_AUTHN_NO_AUTHR, AT_BLE_ATTR_READABLE_REQ_AUTHN_NO_AUTHR, AT_BLE_ATTR_WRITABLE_NO_AUTHN_NO_AUTHR, AT_BLE_ATTR_WRITABLE_REQ_AUTHN_NO_AUTHR, AT_BLE_CHAR_READ, AT_BLE_CHAR_WRITE, AT_BLE_UUID_16, LINK_LOSS_SERVICE_UUID, and linkloss_initial_value.
Referenced by pxp_service_init().
at_ble_status_t lls_primary_service_define | ( | gatt_service_handler_t * | lls_service | ) |
linkloss service definition
Defining linkloss service to the attribute data base.
References at_ble_primary_service_define(), LLS_CHARACTERISTIC_COUNT, and LLS_INCLUDED_SERVICE_COUNT.
Referenced by pxp_service_define().
uint8_t lls_set_alert_value | ( | at_ble_characteristic_changed_t * | change_params, |
gatt_service_handler_t * | lls_handler | ||
) |
Setting the alert value of linkloss service.
sets the alert value of the Linkloss service
References at_ble_characteristic_changed_t::char_handle, at_ble_characteristic_changed_t::char_new_value, DBG_LOG, INVALID_LLS_PARAM, lls_gs_str, and LLS_HIGH_ALERT.
Referenced by pxp_reporter_char_changed_handler().
uint8_t linkloss_initial_value = 0 |
Referenced by init_linkloss_service().
|
static |
Referenced by lls_set_alert_value().