Heart Rate Service declarations.
Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | hr_gatt_service_handler |
hr_gatt_service_handler is the service handler function More... | |
Macros | |
#define | BLOOD_PRESSURE_FEATURE_CHAR_UUID (0x2A49) |
Blood Pressure Feature characteristic UUID. More... | |
#define | BLOOD_PRESSURE_MEASUREMENT_CHAR_UUID (0x2A35) |
Blood Pressure service UUID. More... | |
#define | BLP_DIASTOLIC_VAL_SIZE (2) |
maximum size of diastolic field of blp mm characteristic in bytes More... | |
#define | BLP_INDICATION (2) |
Disabling the Indication. More... | |
#define | BLP_INDICATION_DISABLE (4) |
#define | BLP_INDICATION_ENABLE (3) |
#define | BLP_MAP_VAL_SIZE (2) |
maximum size of map field of blp mm characteristic in bytes More... | |
#define | BLP_MAX_MM_STATUS_SIZE (2) |
maximum size of measurement status in characteristic in bytes More... | |
#define | BLP_MAX_PULSE_RATE_SIZE (2) |
maximum size of pulse rate in characteristic in bytes More... | |
#define | BLP_MAX_TIME_STAMP_SIZE (7) |
maximum size of time stamp field of blp mm characteristic in bytes More... | |
#define | BLP_MAX_USER_ID_SIZE (1) |
maximum size of user id in characteristic in bytes More... | |
#define | BLP_MM_FLAGS_SIZE (1) |
maximum size of flags field of bp mm characteristic in bytes More... | |
#define | BLP_NOTIFICATION (1) |
Notification Mask. More... | |
#define | BLP_NOTIFICATION_DISABLE (2) |
#define | BLP_NOTIFICATION_ENABLE (1) |
notification enable More... | |
#define | BLP_SYSTOLIC_VAL_SIZE (2) |
maximum size of systolic field of blp mm characteristic in bytes More... | |
#define | BLP_TOTAL_CHARATERISTIC_NUM (3) |
Total no of characteristics in Blood Pressure service. More... | |
#define | DEFAULT_VALUE (0) |
#define | INTERMEDIATE_CUFF_PRESSURE_CHAR_UUID (0x2A36) |
Intermediate Cuff Pressure characteristic UUID. More... | |
Typedefs | |
typedef struct hr_gatt_service_handler | blp_gatt_service_handler_t |
hr_gatt_service_handler is the service handler function More... | |
Functions | |
uint8_t | blp_char_change_handler (blp_gatt_service_handler_t *blp_primary_service, at_ble_characteristic_changed_t *params) |
handler for characteristic write called by profile More... | |
void | blp_init_service (blp_gatt_service_handler_t *blood_pressure_serv) |
Blood Pressure service and characteristic initialization(Called only once by user). More... | |
at_ble_status_t | blp_primary_service_define (blp_gatt_service_handler_t *blp_primary_service) |
Register a blp service instance inside stack. More... | |
#define BLOOD_PRESSURE_FEATURE_CHAR_UUID (0x2A49) |
Blood Pressure Feature characteristic UUID.
Referenced by blp_init_service().
#define BLOOD_PRESSURE_MEASUREMENT_CHAR_UUID (0x2A35) |
Blood Pressure service UUID.
Blood Pressure measurement characteristic UUID
Referenced by blp_init_service().
#define BLP_DIASTOLIC_VAL_SIZE (2) |
maximum size of diastolic field of blp mm characteristic in bytes
Referenced by blp_init_service().
#define BLP_INDICATION (2) |
Disabling the Indication.
Referenced by blp_char_change_handler().
#define BLP_INDICATION_DISABLE (4) |
Referenced by blp_char_change_handler(), and blp_sensor_char_changed_handler().
#define BLP_INDICATION_ENABLE (3) |
Referenced by blp_char_change_handler(), and blp_sensor_char_changed_handler().
#define BLP_MAP_VAL_SIZE (2) |
maximum size of map field of blp mm characteristic in bytes
Referenced by blp_init_service().
#define BLP_MAX_MM_STATUS_SIZE (2) |
maximum size of measurement status in characteristic in bytes
Referenced by blp_init_service().
#define BLP_MAX_PULSE_RATE_SIZE (2) |
maximum size of pulse rate in characteristic in bytes
Referenced by blp_init_service().
#define BLP_MAX_TIME_STAMP_SIZE (7) |
maximum size of time stamp field of blp mm characteristic in bytes
Referenced by blp_init_service().
#define BLP_MAX_USER_ID_SIZE (1) |
maximum size of user id in characteristic in bytes
Referenced by blp_init_service().
#define BLP_MM_FLAGS_SIZE (1) |
maximum size of flags field of bp mm characteristic in bytes
Referenced by blp_init_service().
#define BLP_NOTIFICATION (1) |
Notification Mask.
Referenced by blp_char_change_handler().
#define BLP_NOTIFICATION_DISABLE (2) |
Referenced by blp_char_change_handler(), and blp_sensor_char_changed_handler().
#define BLP_NOTIFICATION_ENABLE (1) |
notification enable
Referenced by blp_char_change_handler(), and blp_sensor_char_changed_handler().
#define BLP_SYSTOLIC_VAL_SIZE (2) |
maximum size of systolic field of blp mm characteristic in bytes
Referenced by blp_init_service().
#define BLP_TOTAL_CHARATERISTIC_NUM (3) |
Total no of characteristics in Blood Pressure service.
Referenced by blp_primary_service_define().
#define DEFAULT_VALUE (0) |
#define INTERMEDIATE_CUFF_PRESSURE_CHAR_UUID (0x2A36) |
Intermediate Cuff Pressure characteristic UUID.
Referenced by blp_init_service().
typedef struct hr_gatt_service_handler blp_gatt_service_handler_t |
hr_gatt_service_handler is the service handler function
uint8_t blp_char_change_handler | ( | blp_gatt_service_handler_t * | blp_primary_service, |
at_ble_characteristic_changed_t * | params | ||
) |
handler for characteristic write called by profile
[in] | hr_gatt_service_handler_t | servcie handler |
[in] | blp_gatt_service_handler_t | service handler |
References BLP_INDICATION, BLP_INDICATION_DISABLE, BLP_INDICATION_ENABLE, BLP_NOTIFICATION, BLP_NOTIFICATION_DISABLE, BLP_NOTIFICATION_ENABLE, at_ble_characteristic_changed_t::char_handle, at_ble_characteristic_changed_t::char_new_value, at_ble_characteristic_t::client_config_handle, and hr_gatt_service_handler::serv_chars.
Referenced by blp_sensor_char_changed_handler().
void blp_init_service | ( | blp_gatt_service_handler_t * | blood_pressure_serv | ) |
Blood Pressure service and characteristic initialization(Called only once by user).
[in] | Blood | Pressure service instance |
References AT_BLE_ATTR_NO_PERMISSIONS, AT_BLE_ATTR_READABLE_REQ_AUTHN_NO_AUTHR, AT_BLE_ATTR_WRITABLE_REQ_AUTHN_NO_AUTHR, AT_BLE_CHAR_INDICATE, AT_BLE_CHAR_NOTIFY, AT_BLE_CHAR_READ, AT_BLE_UUID_16, BLOOD_PRESSURE_FEATURE_CHAR_UUID, blood_pressure_feature_value, BLOOD_PRESSURE_MEASUREMENT_CHAR_UUID, BLOOD_PRESSURE_SERVICE_UUID, BLP_DIASTOLIC_VAL_SIZE, BLP_MAP_VAL_SIZE, BLP_MAX_MM_STATUS_SIZE, BLP_MAX_PULSE_RATE_SIZE, BLP_MAX_TIME_STAMP_SIZE, BLP_MAX_USER_ID_SIZE, blp_measurement_value, BLP_MM_FLAGS_SIZE, BLP_SYSTOLIC_VAL_SIZE, at_ble_characteristic_t::char_val_handle, at_ble_characteristic_t::client_config_handle, at_ble_characteristic_t::client_config_permissions, at_ble_characteristic_t::init_value, INTERMEDIATE_CUFF_PRESSURE_CHAR_UUID, intermediate_cuff_pressure_value, NULL, at_ble_characteristic_t::presentation_format, at_ble_characteristic_t::properties, hr_gatt_service_handler::serv_chars, hr_gatt_service_handler::serv_handle, hr_gatt_service_handler::serv_uuid, at_ble_characteristic_t::server_config_handle, at_ble_characteristic_t::server_config_permissions, at_ble_uuid_t::type, at_ble_characteristic_t::user_desc, at_ble_characteristic_t::user_desc_handle, at_ble_characteristic_t::user_desc_len, at_ble_characteristic_t::user_desc_max_len, at_ble_characteristic_t::user_desc_permissions, at_ble_uuid_t::uuid, at_ble_characteristic_t::uuid, at_ble_characteristic_t::value_init_len, at_ble_characteristic_t::value_max_len, and at_ble_characteristic_t::value_permissions.
Referenced by blp_sensor_service_init().
at_ble_status_t blp_primary_service_define | ( | blp_gatt_service_handler_t * | blp_primary_service | ) |
Register a blp service instance inside stack.
[in] | dis_primary_service | blp service instance |
Register a blp service instance inside stack.
[in] | blp_primary_service | blp service instance |
References at_ble_primary_service_define(), BLP_TOTAL_CHARATERISTIC_NUM, NULL, hr_gatt_service_handler::serv_chars, hr_gatt_service_handler::serv_handle, and hr_gatt_service_handler::serv_uuid.
Referenced by blp_sensor_service_define().