Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]
Glucose Service Server

This service exposes glucose and other data from a glucose sensor for use in consumer and professional healthcare applications. More...

Detailed Description

This service exposes glucose and other data from a glucose sensor for use in consumer and professional healthcare applications.

This file provides APIs to interface Glucose Service Records.

Data Structures

struct  st_ble_gls_meas_flags_t
 Glucose Measurement Flags value structure. More...
 
struct  st_ble_gls_meas_sensor_status_annunciation_t
 Glucose Measurement Sensor Status Annunciation value structure. More...
 
struct  st_ble_gls_meas_t
 Glucose Measurement value structure. More...
 
struct  st_ble_gls_meas_context_flags_t
 Glucose Measurement Context Flags value structure. More...
 
struct  st_ble_gls_meas_context_t
 Glucose Measurement Context value structure. More...
 
struct  st_ble_gls_feat_t
 Glucose Feature value structure. More...
 
struct  st_ble_gls_ra_ctrl_pt_t
 Record Access Control Point value structure. More...
 
struct  st_ble_gls_record_t
 
struct  st_ble_uds_record_t
 

Macros

#define BLE_GLS_PROCEDURE_ALREADY_IN_PROGRESS_ERROR   (BLE_ERR_GROUP_GATT | 0x80)
 A Record Access Control Point request cannot be serviced because a previously triggered RACP operation is still in progress. More...
 
#define BLE_GLS_CLI_CNFG_IMPROPERLY_CONFIGURED_ERROR   (BLE_ERR_GROUP_GATT | 0x81)
 The Client Characteristic Configuration descriptor is not configured according to the requirements of the service. More...
 
#define BLE_GLS_DB_MAX_NUM_OF_RECORDS   (10)
 
#define BLE_GLS_DB_INVALID_INDEX   (0xFFFF)
 
#define BLE_UDS_DB_MAX_NUM_OF_RECORDS   (10)
 
#define BLE_UDS_DB_INVALID_INDEX   (0xFFFF)
 

Enumerations

enum  e_ble_gls_meas_type_t {
  BLE_GLS_MEAS_TYPE_CAPILLARY_WHOLE_BLOOD = 1,
  BLE_GLS_MEAS_TYPE_CAPILLARY_PLASMA = 2,
  BLE_GLS_MEAS_TYPE_VENOUS_WHOLE_BLOOD = 3,
  BLE_GLS_MEAS_TYPE_VENOUS_PLASMA = 4,
  BLE_GLS_MEAS_TYPE_ARTERIAL_WHOLE_BLOOD = 5,
  BLE_GLS_MEAS_TYPE_ARTERIAL_PLASMA = 6,
  BLE_GLS_MEAS_TYPE_UNDETERMINED_WHOLE_BLOOD = 7,
  BLE_GLS_MEAS_TYPE_UNDETERMINED_PLASMA = 8,
  BLE_GLS_MEAS_TYPE_INTERSTITIAL_FLUID = 9,
  BLE_GLS_MEAS_TYPE_CONTROL_SOLUTION = 10
}
 Glucose Measurement Type enumeration. More...
 
enum  e_ble_gls_meas_sample_location_t {
  BLE_GLS_MEAS_SAMPLE_LOCATION_FINGER = 1,
  BLE_GLS_MEAS_SAMPLE_LOCATION_ALTERNATE_SITE_TEST = 2,
  BLE_GLS_MEAS_SAMPLE_LOCATION_EARLOBE = 3,
  BLE_GLS_MEAS_SAMPLE_LOCATION_CONTROL_SOLUTION = 4,
  BLE_GLS_MEAS_SAMPLE_LOCATION_SAMPLE_LOCATION_VALUE_NOT_AVAILABLE = 15
}
 Glucose Measurement Sample Location enumeration. More...
 
enum  e_ble_gls_meas_context_carbohydrate_id_t {
  BLE_GLS_MEAS_CONTEXT_CARBOHYDRATE_ID_BREAKFAST = 1,
  BLE_GLS_MEAS_CONTEXT_CARBOHYDRATE_ID_LUNCH = 2,
  BLE_GLS_MEAS_CONTEXT_CARBOHYDRATE_ID_DINNER = 3,
  BLE_GLS_MEAS_CONTEXT_CARBOHYDRATE_ID_SNACK = 4,
  BLE_GLS_MEAS_CONTEXT_CARBOHYDRATE_ID_DRINK = 5,
  BLE_GLS_MEAS_CONTEXT_CARBOHYDRATE_ID_SUPPER = 6,
  BLE_GLS_MEAS_CONTEXT_CARBOHYDRATE_ID_BRUNCH = 7
}
 Glucose Measurement Context Carbohydrate ID enumeration. More...
 
enum  e_ble_gls_meas_context_meal_t {
  BLE_GLS_MEAS_CONTEXT_MEAL_PREPRANDIAL_BEFORE_MEAL = 1,
  BLE_GLS_MEAS_CONTEXT_MEAL_POSTPRANDIAL_AFTER_MEAL = 2,
  BLE_GLS_MEAS_CONTEXT_MEAL_FASTING = 3,
  BLE_GLS_MEAS_CONTEXT_MEAL_CASUAL = 4,
  BLE_GLS_MEAS_CONTEXT_MEAL_BEDTIME = 5
}
 Glucose Measurement Context Meal enumeration. More...
 
enum  e_ble_gls_meas_context_tester_t {
  BLE_GLS_MEAS_CONTEXT_TESTER_SELF = 1,
  BLE_GLS_MEAS_CONTEXT_TESTER_HEALTH_CARE_PROFESSIONAL = 2,
  BLE_GLS_MEAS_CONTEXT_TESTER_LAB_TEST = 3,
  BLE_GLS_MEAS_CONTEXT_TESTER_TESTER_VALUE_NOT_AVAILABLE = 15
}
 Glucose Measurement Context Tester enumeration. More...
 
enum  e_ble_gls_meas_context_health_t {
  BLE_GLS_MEAS_CONTEXT_HEALTH_MINOR_HEALTH_ISSUES = 1,
  BLE_GLS_MEAS_CONTEXT_HEALTH_MAJOR_HEALTH_ISSUES = 2,
  BLE_GLS_MEAS_CONTEXT_HEALTH_DURING_MENSES = 3,
  BLE_GLS_MEAS_CONTEXT_HEALTH_UNDER_STRESS = 4,
  BLE_GLS_MEAS_CONTEXT_HEALTH_NO_HEALTH_ISSUES = 5,
  BLE_GLS_MEAS_CONTEXT_HEALTH_HEALTH_VALUE_NOT_AVAILABLE = 15
}
 Glucose Measurement Context Health enumeration. More...
 
enum  e_ble_gls_meas_context_exercise_duration_t { BLE_GLS_MEAS_CONTEXT_EXERCISE_DURATION_OVERRUN = 65535 }
 Glucose Measurement Context Exercise Duration enumeration. More...
 
enum  e_ble_gls_meas_context_medication_id_t {
  BLE_GLS_MEAS_CONTEXT_MEDICATION_ID_RAPID_ACTING_INSULIN = 1,
  BLE_GLS_MEAS_CONTEXT_MEDICATION_ID_SHORT_ACTING_INSULIN = 2,
  BLE_GLS_MEAS_CONTEXT_MEDICATION_ID_INTERMEDIATE_ACTING_INSULIN = 3,
  BLE_GLS_MEAS_CONTEXT_MEDICATION_ID_LONG_ACTING_INSULIN = 4,
  BLE_GLS_MEAS_CONTEXT_MEDICATION_ID_PRE_MIXED_INSULIN = 5
}
 Glucose Measurement Context Medication ID enumeration. More...
 
enum  e_ble_gls_ra_ctrl_pt_op_code_t {
  BLE_GLS_RA_CTRL_PT_OP_CODE_REPORT_STORED_RECORDS = 1,
  BLE_GLS_RA_CTRL_PT_OP_CODE_DELETE_STORED_RECORDS = 2,
  BLE_GLS_RA_CTRL_PT_OP_CODE_ABORT_OPERATION = 3,
  BLE_GLS_RA_CTRL_PT_OP_CODE_REPORT_NUMBER_OF_STORED_RECORDS = 4,
  BLE_GLS_RA_CTRL_PT_OP_CODE_NUMBER_OF_STORED_RECORDS_RESPONSE = 5,
  BLE_GLS_RA_CTRL_PT_OP_CODE_RESPONSE_CODE = 6
}
 Record Access Control Point Op Code enumeration. More...
 
enum  e_ble_gls_ra_ctrl_pt_operator_t {
  BLE_GLS_RA_CTRL_PT_OPERATOR_NULL = 0,
  BLE_GLS_RA_CTRL_PT_OPERATOR_ALL_RECORDS = 1,
  BLE_GLS_RA_CTRL_PT_OPERATOR_LESS_THAN_OR_EQUAL_TO = 2,
  BLE_GLS_RA_CTRL_PT_OPERATOR_GREATER_THAN_OR_EQUAL_TO = 3,
  BLE_GLS_RA_CTRL_PT_OPERATOR_WITHIN_RANGE_OF = 4,
  BLE_GLS_RA_CTRL_PT_OPERATOR_FIRST_RECORD = 5,
  BLE_GLS_RA_CTRL_PT_OPERATOR_LAST_RECORD = 6
}
 Record Access Control Point Operator enumeration. More...
 
enum  e_ble_gls_ra_ctrl_pt_operand_t {
  BLE_GLS_RA_CTRL_PT_OPERAND_SUCCESS = 1,
  BLE_GLS_RA_CTRL_PT_OPERAND_OP_CODE_NOT_SUPPORTED = 2,
  BLE_GLS_RA_CTRL_PT_OPERAND_INVALID_OPERATOR = 3,
  BLE_GLS_RA_CTRL_PT_OPERAND_OPERATOR_NOT_SUPPORTED = 4,
  BLE_GLS_RA_CTRL_PT_OPERAND_INVALID_OPERAND = 5,
  BLE_GLS_RA_CTRL_PT_OPERAND_NO_RECORDS_FOUND = 6,
  BLE_GLS_RA_CTRL_PT_OPERAND_ABORT_UNSUCCESSFUL = 7,
  BLE_GLS_RA_CTRL_PT_OPERAND_PROCEDURE_NOT_COMPLETED = 8,
  BLE_GLS_RA_CTRL_PT_OPERAND_OPERAND_NOT_SUPPORTED = 9
}
 Record Access Control Point Operand enumeration. More...
 
enum  e_ble_gls_ra_ctrl_pt_filter_type_t {
  BLE_GLS_RA_CTRL_PT_FILTER_TYPE_SEQUENCE_NUMBER = 1,
  BLE_GLS_RA_CTRL_PT_FILTER_TYPE_USER_FACING_TIME = 2
}
 Record Access Control Point Filtrer Type enumeration. More...
 
enum  st_ble_gls_char_idx_t {
  BLE_GLS_MEAS_IDX,
  BLE_GLS_MEAS_CLI_CNFG_IDX,
  BLE_GLS_MEAS_CONTEXT_IDX,
  BLE_GLS_MEAS_CONTEXT_CLI_CNFG_IDX,
  BLE_GLS_FEAT_IDX,
  BLE_GLS_RA_CTRL_PT_IDX,
  BLE_GLS_RA_CTRL_PT_CLI_CNFG_IDX
}
 Glucose characteristic Index. More...
 
enum  e_ble_gls_event_t {
  BLE_GLS_EVENT_FEAT_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_GLS_FEAT_IDX, BLE_SERVS_READ_REQ),
  BLE_GLS_EVENT_RA_CTRL_PT_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_GLS_RA_CTRL_PT_IDX, BLE_SERVS_WRITE_REQ),
  BLE_GLS_EVENT_RA_CTRL_PT_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_GLS_RA_CTRL_PT_IDX, BLE_SERVS_WRITE_COMP),
  BLE_GLS_EVENT_RA_CTRL_PT_HDL_VAL_CNF = BLE_SERVS_ATTR_EVENT(BLE_GLS_RA_CTRL_PT_IDX, BLE_SERVS_HDL_VAL_CNF),
  BLE_GLS_EVENT_RA_CTRL_PT_CLI_CNFG_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_GLS_RA_CTRL_PT_CLI_CNFG_IDX, BLE_SERVS_WRITE_REQ),
  BLE_GLS_EVENT_RA_CTRL_PT_CLI_CNFG_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_GLS_RA_CTRL_PT_CLI_CNFG_IDX, BLE_SERVS_WRITE_COMP)
}
 Glucose event type. More...
 
enum  e_ble_gls_db_valid_t {
  BLE_GLS_DB_INVALID_RECORD = 0,
  BLE_GLS_DB_MEAS_VALID_RECORD,
  BLE_GLS_DB_MEAS_AND_CONTEXT_VALID_RECORD,
  BLE_GLS_DB_WILL_DELETE,
  BLE_OTS_DB_INVALID_OBJECT = 0,
  BLE_OTS_DB_VALID_OBJECT,
  BLE_OTS_DB_WILL_DELETE
}
 
enum  e_ble_uds_user_record_status_t {
  BLE_UDS_USER_RECORD_STATUS_FREE = 0,
  BLE_UDS_USER_RECORD_STATUS_USED = 1,
  BLE_UDS_USER_RECORD_STATUS_LOCKED = 2
}
 

Functions

ble_status_t R_BLE_GLS_SetMeasCliCnfg (uint16_t conn_hdl, const uint16_t *p_value)
 Set Glucose Measurement cli cnfg descriptor value to the local GATT database. More...
 
ble_status_t R_BLE_GLS_GetMeasCliCnfg (uint16_t conn_hdl, uint16_t *p_value)
 Get Glucose Measurement cli cnfg descriptor value from the local GATT database. More...
 
ble_status_t R_BLE_GLS_SetMeasContextCliCnfg (uint16_t conn_hdl, const uint16_t *p_value)
 Set Glucose Measurement Context cli cnfg descriptor value to the local GATT database. More...
 
ble_status_t R_BLE_GLS_GetMeasContextCliCnfg (uint16_t conn_hdl, uint16_t *p_value)
 Get Glucose Measurement Context cli cnfg descriptor value from the local GATT database. More...
 
ble_status_t R_BLE_GLS_SetFeat (const st_ble_gls_feat_t *p_value)
 Set Glucose Feature characteristic value to the local GATT database. More...
 
ble_status_t R_BLE_GLS_GetFeat (st_ble_gls_feat_t *p_value)
 Get Glucose Feature characteristic value from the local GATT database. More...
 
ble_status_t R_BLE_GLS_SetRaCtrlPtCliCnfg (uint16_t conn_hdl, const uint16_t *p_value)
 Set Record Access Control Point cli cnfg descriptor value to the local GATT database. More...
 
ble_status_t R_BLE_GLS_GetRaCtrlPtCliCnfg (uint16_t conn_hdl, uint16_t *p_value)
 Get Record Access Control Point cli cnfg descriptor value from the local GATT database. More...
 
ble_status_t R_BLE_GLS_Init (ble_servs_app_cb_t cb)
 Initialize Glucose service. More...
 
ble_status_t R_BLE_GLS_AddNewRecord (const st_ble_gls_meas_t *p_meas, const st_ble_gls_meas_context_t *p_context)
 Adds a new record to the record database. More...
 
ble_status_t R_BLE_GLS_IndicateRaCtrlPt (uint16_t conn_hdl, const st_ble_gls_ra_ctrl_pt_t *p_value)
 Send indication of Record Access Control Point value to the remote device. More...
 
ble_status_t R_BLE_GLS_NotifyMeas (uint16_t conn_hdl, const st_ble_gls_meas_t *p_value)
 Send notification of Glucose Measurement value to the remote device. More...
 
ble_status_t R_BLE_GLS_NotifyMeasContext (uint16_t conn_hdl, const st_ble_gls_meas_context_t *p_value)
 Send notification of Glucose Measurement Context value to the remote device. More...
 
void gls_db_init (void)
 
uint16_t gls_db_get_oldest_index (void)
 
uint16_t gls_db_get_newest_index (void)
 
uint16_t gls_db_get_next_index (uint16_t index)
 
st_ble_gls_record_tgls_db_get_record (uint16_t index)
 
void gls_db_store_record (const st_ble_gls_meas_t *p_meas, const st_ble_gls_meas_context_t *p_context)
 
void gls_db_mark_delete_record (uint16_t index)
 
void gls_db_delete_records (void)
 
void uds_db_init (void)
 
st_ble_uds_record_tuds_db_get_record (uint8_t index)
 
uint8_t uds_db_add_user (uint16_t consent_code)
 
ble_status_t uds_db_delete_user (uint8_t user_index)
 
ble_status_t uds_db_set_current_user (uint8_t user_index, uint16_t consent_code)
 
void uds_db_populate_current_user_data (uint8_t user_index)
 
void uds_db_update_current_user_data (uint8_t user_index, st_ble_uds_record_t *p_app_user_data)
 
void uds_db_unlock_user (uint8_t user_index)
 

Macro Definition Documentation

◆ BLE_GLS_PROCEDURE_ALREADY_IN_PROGRESS_ERROR

#define BLE_GLS_PROCEDURE_ALREADY_IN_PROGRESS_ERROR   (BLE_ERR_GROUP_GATT | 0x80)

A Record Access Control Point request cannot be serviced because a previously triggered RACP operation is still in progress.

◆ BLE_GLS_CLI_CNFG_IMPROPERLY_CONFIGURED_ERROR

#define BLE_GLS_CLI_CNFG_IMPROPERLY_CONFIGURED_ERROR   (BLE_ERR_GROUP_GATT | 0x81)

The Client Characteristic Configuration descriptor is not configured according to the requirements of the service.

Enumeration Type Documentation

◆ e_ble_gls_meas_type_t

Glucose Measurement Type enumeration.

Enumerator
BLE_GLS_MEAS_TYPE_CAPILLARY_WHOLE_BLOOD 

Capillary Whole blood

BLE_GLS_MEAS_TYPE_CAPILLARY_PLASMA 

Capillary Plasma

BLE_GLS_MEAS_TYPE_VENOUS_WHOLE_BLOOD 

Venous Whole blood

BLE_GLS_MEAS_TYPE_VENOUS_PLASMA 

Venous Plasma

BLE_GLS_MEAS_TYPE_ARTERIAL_WHOLE_BLOOD 

Arterial Whole blood

BLE_GLS_MEAS_TYPE_ARTERIAL_PLASMA 

Arterial Plasma

BLE_GLS_MEAS_TYPE_UNDETERMINED_WHOLE_BLOOD 

Undetermined Whole blood

BLE_GLS_MEAS_TYPE_UNDETERMINED_PLASMA 

Undetermined Plasma

BLE_GLS_MEAS_TYPE_INTERSTITIAL_FLUID 

Interstitial Fluid (ISF)

BLE_GLS_MEAS_TYPE_CONTROL_SOLUTION 

Control Solution

◆ e_ble_gls_meas_sample_location_t

Glucose Measurement Sample Location enumeration.

Enumerator
BLE_GLS_MEAS_SAMPLE_LOCATION_FINGER 

Finger

BLE_GLS_MEAS_SAMPLE_LOCATION_ALTERNATE_SITE_TEST 

Alternate Site Test

BLE_GLS_MEAS_SAMPLE_LOCATION_EARLOBE 

Earlobe

BLE_GLS_MEAS_SAMPLE_LOCATION_CONTROL_SOLUTION 

Control solution

BLE_GLS_MEAS_SAMPLE_LOCATION_SAMPLE_LOCATION_VALUE_NOT_AVAILABLE 

Sample Location value not available

◆ e_ble_gls_meas_context_carbohydrate_id_t

Glucose Measurement Context Carbohydrate ID enumeration.

Enumerator
BLE_GLS_MEAS_CONTEXT_CARBOHYDRATE_ID_BREAKFAST 

Breakfast

BLE_GLS_MEAS_CONTEXT_CARBOHYDRATE_ID_LUNCH 

Lunch

BLE_GLS_MEAS_CONTEXT_CARBOHYDRATE_ID_DINNER 

Dinner

BLE_GLS_MEAS_CONTEXT_CARBOHYDRATE_ID_SNACK 

Snack

BLE_GLS_MEAS_CONTEXT_CARBOHYDRATE_ID_DRINK 

Drink

BLE_GLS_MEAS_CONTEXT_CARBOHYDRATE_ID_SUPPER 

Supper

BLE_GLS_MEAS_CONTEXT_CARBOHYDRATE_ID_BRUNCH 

Brunch

◆ e_ble_gls_meas_context_meal_t

Glucose Measurement Context Meal enumeration.

Enumerator
BLE_GLS_MEAS_CONTEXT_MEAL_PREPRANDIAL_BEFORE_MEAL 

Preprandial (before meal)

BLE_GLS_MEAS_CONTEXT_MEAL_POSTPRANDIAL_AFTER_MEAL 

Postprandial (after meal)

BLE_GLS_MEAS_CONTEXT_MEAL_FASTING 

Fasting

BLE_GLS_MEAS_CONTEXT_MEAL_CASUAL 

Casual (snacks, drinks, etc.)

BLE_GLS_MEAS_CONTEXT_MEAL_BEDTIME 

Bedtime

◆ e_ble_gls_meas_context_tester_t

Glucose Measurement Context Tester enumeration.

Enumerator
BLE_GLS_MEAS_CONTEXT_TESTER_SELF 

Self

BLE_GLS_MEAS_CONTEXT_TESTER_HEALTH_CARE_PROFESSIONAL 

Health Care Professional

BLE_GLS_MEAS_CONTEXT_TESTER_LAB_TEST 

Lab test

BLE_GLS_MEAS_CONTEXT_TESTER_TESTER_VALUE_NOT_AVAILABLE 

Tester value not available

◆ e_ble_gls_meas_context_health_t

Glucose Measurement Context Health enumeration.

Enumerator
BLE_GLS_MEAS_CONTEXT_HEALTH_MINOR_HEALTH_ISSUES 

Minor health issues

BLE_GLS_MEAS_CONTEXT_HEALTH_MAJOR_HEALTH_ISSUES 

Major health issues

BLE_GLS_MEAS_CONTEXT_HEALTH_DURING_MENSES 

During menses

BLE_GLS_MEAS_CONTEXT_HEALTH_UNDER_STRESS 

Under stress

BLE_GLS_MEAS_CONTEXT_HEALTH_NO_HEALTH_ISSUES 

No health issues

BLE_GLS_MEAS_CONTEXT_HEALTH_HEALTH_VALUE_NOT_AVAILABLE 

Health value not available

◆ e_ble_gls_meas_context_exercise_duration_t

Glucose Measurement Context Exercise Duration enumeration.

Enumerator
BLE_GLS_MEAS_CONTEXT_EXERCISE_DURATION_OVERRUN 

Overrun

◆ e_ble_gls_meas_context_medication_id_t

Glucose Measurement Context Medication ID enumeration.

Enumerator
BLE_GLS_MEAS_CONTEXT_MEDICATION_ID_RAPID_ACTING_INSULIN 

Rapid acting insulin

BLE_GLS_MEAS_CONTEXT_MEDICATION_ID_SHORT_ACTING_INSULIN 

Short acting insulin

BLE_GLS_MEAS_CONTEXT_MEDICATION_ID_INTERMEDIATE_ACTING_INSULIN 

Intermediate acting insulin

BLE_GLS_MEAS_CONTEXT_MEDICATION_ID_LONG_ACTING_INSULIN 

Long acting insulin

BLE_GLS_MEAS_CONTEXT_MEDICATION_ID_PRE_MIXED_INSULIN 

Pre-mixed insulin

◆ e_ble_gls_ra_ctrl_pt_op_code_t

Record Access Control Point Op Code enumeration.

Enumerator
BLE_GLS_RA_CTRL_PT_OP_CODE_REPORT_STORED_RECORDS 

Report stored records (Operator: Value from Operator Table)

BLE_GLS_RA_CTRL_PT_OP_CODE_DELETE_STORED_RECORDS 

Delete stored records (Operator: Value from Operator Table)

BLE_GLS_RA_CTRL_PT_OP_CODE_ABORT_OPERATION 

Abort operation (Operator: Null 'value of 0x00 from Operator Table')

BLE_GLS_RA_CTRL_PT_OP_CODE_REPORT_NUMBER_OF_STORED_RECORDS 

Report number of stored records (Operator: Value from Operator Table)

BLE_GLS_RA_CTRL_PT_OP_CODE_NUMBER_OF_STORED_RECORDS_RESPONSE 

Number of stored records response (Operator: Null 'value of 0x00 from Operator Table')

BLE_GLS_RA_CTRL_PT_OP_CODE_RESPONSE_CODE 

Response Code (Operator: Null 'value of 0x00 from Operator Table')

◆ e_ble_gls_ra_ctrl_pt_operator_t

Record Access Control Point Operator enumeration.

Enumerator
BLE_GLS_RA_CTRL_PT_OPERATOR_NULL 

Null

BLE_GLS_RA_CTRL_PT_OPERATOR_ALL_RECORDS 

All records

BLE_GLS_RA_CTRL_PT_OPERATOR_LESS_THAN_OR_EQUAL_TO 

Less than or equal to

BLE_GLS_RA_CTRL_PT_OPERATOR_GREATER_THAN_OR_EQUAL_TO 

Greater than or equal to

BLE_GLS_RA_CTRL_PT_OPERATOR_WITHIN_RANGE_OF 

Within range of (inclusive)

BLE_GLS_RA_CTRL_PT_OPERATOR_FIRST_RECORD 

First record(i.e. oldest record)

BLE_GLS_RA_CTRL_PT_OPERATOR_LAST_RECORD 

Last record (i.e. most recent record)

◆ e_ble_gls_ra_ctrl_pt_operand_t

Record Access Control Point Operand enumeration.

Enumerator
BLE_GLS_RA_CTRL_PT_OPERAND_SUCCESS 

Normal response for successful operation

BLE_GLS_RA_CTRL_PT_OPERAND_OP_CODE_NOT_SUPPORTED 

Normal response if unsupported Op Code is received

BLE_GLS_RA_CTRL_PT_OPERAND_INVALID_OPERATOR 

Normal response if Operator received does not meet the requirements of the service (e.g. Null was expected)

BLE_GLS_RA_CTRL_PT_OPERAND_OPERATOR_NOT_SUPPORTED 

Normal response if unsupported Operator is received

BLE_GLS_RA_CTRL_PT_OPERAND_INVALID_OPERAND 

Normal response if Operand received does not meet the requirements of the service

BLE_GLS_RA_CTRL_PT_OPERAND_NO_RECORDS_FOUND 

Normal response if request to report stored records or request to delete stored records resulted in no records meeting criteria.

BLE_GLS_RA_CTRL_PT_OPERAND_ABORT_UNSUCCESSFUL 

Normal response if request for Abort cannot be completed

BLE_GLS_RA_CTRL_PT_OPERAND_PROCEDURE_NOT_COMPLETED 

Normal response if unable to complete a procedure for any reason

BLE_GLS_RA_CTRL_PT_OPERAND_OPERAND_NOT_SUPPORTED 

Normal response if unsupported Operand is received

◆ e_ble_gls_ra_ctrl_pt_filter_type_t

Record Access Control Point Filtrer Type enumeration.

◆ st_ble_gls_char_idx_t

Glucose characteristic Index.

◆ e_ble_gls_event_t

Glucose event type.

◆ e_ble_uds_user_record_status_t

Enumerator
BLE_UDS_USER_RECORD_STATUS_FREE 

Record is free to hold new user information

BLE_UDS_USER_RECORD_STATUS_USED 

Record is not free, has allocated to user

BLE_UDS_USER_RECORD_STATUS_LOCKED 

Record is locked for an user

Function Documentation

◆ R_BLE_GLS_SetMeasCliCnfg()

ble_status_t R_BLE_GLS_SetMeasCliCnfg ( uint16_t  conn_hdl,
const uint16_t *  p_value 
)

Set Glucose Measurement cli cnfg descriptor value to the local GATT database.

Parameters
[in]conn_hdlConnection handle.
[in]p_valueDescriptor value to set.
Returns
ble_status_t

◆ R_BLE_GLS_GetMeasCliCnfg()

ble_status_t R_BLE_GLS_GetMeasCliCnfg ( uint16_t  conn_hdl,
uint16_t *  p_value 
)

Get Glucose Measurement cli cnfg descriptor value from the local GATT database.

Parameters
[in]conn_hdlConnection handle.
[in]p_valueOutput location for the acquired descriptor value.
Returns
ble_status_t

◆ R_BLE_GLS_SetMeasContextCliCnfg()

ble_status_t R_BLE_GLS_SetMeasContextCliCnfg ( uint16_t  conn_hdl,
const uint16_t *  p_value 
)

Set Glucose Measurement Context cli cnfg descriptor value to the local GATT database.

Parameters
[in]conn_hdlConnection handle.
[in]p_valueDescriptor value to set.
Returns
ble_status_t

◆ R_BLE_GLS_GetMeasContextCliCnfg()

ble_status_t R_BLE_GLS_GetMeasContextCliCnfg ( uint16_t  conn_hdl,
uint16_t *  p_value 
)

Get Glucose Measurement Context cli cnfg descriptor value from the local GATT database.

Parameters
[in]conn_hdlConnection handle.
[in]p_valueOutput location for the acquired descriptor value.
Returns
ble_status_t

◆ R_BLE_GLS_SetFeat()

ble_status_t R_BLE_GLS_SetFeat ( const st_ble_gls_feat_t p_value)

Set Glucose Feature characteristic value to the local GATT database.

Parameters
[in]p_valueCharacteristic value to set.
Returns
ble_status_t

◆ R_BLE_GLS_GetFeat()

ble_status_t R_BLE_GLS_GetFeat ( st_ble_gls_feat_t p_value)

Get Glucose Feature characteristic value from the local GATT database.

Parameters
[in]p_valueOutput location for the acquired descriptor value.
Returns
ble_status_t

◆ R_BLE_GLS_SetRaCtrlPtCliCnfg()

ble_status_t R_BLE_GLS_SetRaCtrlPtCliCnfg ( uint16_t  conn_hdl,
const uint16_t *  p_value 
)

Set Record Access Control Point cli cnfg descriptor value to the local GATT database.

Parameters
[in]conn_hdlConnection handle.
[in]p_valueDescriptor value to set.
Returns
ble_status_t

◆ R_BLE_GLS_GetRaCtrlPtCliCnfg()

ble_status_t R_BLE_GLS_GetRaCtrlPtCliCnfg ( uint16_t  conn_hdl,
uint16_t *  p_value 
)

Get Record Access Control Point cli cnfg descriptor value from the local GATT database.

Parameters
[in]conn_hdlConnection handle.
[in]p_valueOutput location for the acquired descriptor value.
Returns
ble_status_t

◆ R_BLE_GLS_Init()

ble_status_t R_BLE_GLS_Init ( ble_servs_app_cb_t  cb)

Initialize Glucose service.

Parameters
[in]cbService callback.
Returns
ble_status_t

◆ R_BLE_GLS_AddNewRecord()

ble_status_t R_BLE_GLS_AddNewRecord ( const st_ble_gls_meas_t p_meas,
const st_ble_gls_meas_context_t p_context 
)

Adds a new record to the record database.

Parameters
[in]p_measurementGlucose Measurement characteristic value
[in]p_contextGlucose Measurement context characteristic value
Returns
ble_status_t

◆ R_BLE_GLS_IndicateRaCtrlPt()

ble_status_t R_BLE_GLS_IndicateRaCtrlPt ( uint16_t  conn_hdl,
const st_ble_gls_ra_ctrl_pt_t p_value 
)

Send indication of Record Access Control Point value to the remote device.

Parameters
[in]conn_hdlConnection handle.
[in]p_valueCharacteristic value to send.
Returns
ble_status_t

◆ R_BLE_GLS_NotifyMeas()

ble_status_t R_BLE_GLS_NotifyMeas ( uint16_t  conn_hdl,
const st_ble_gls_meas_t p_value 
)

Send notification of Glucose Measurement value to the remote device.

Parameters
[in]conn_hdlConnection handle.
[in]p_valueCharacteristic value to send.
Returns
ble_status_t

◆ R_BLE_GLS_NotifyMeasContext()

ble_status_t R_BLE_GLS_NotifyMeasContext ( uint16_t  conn_hdl,
const st_ble_gls_meas_context_t p_value 
)

Send notification of Glucose Measurement Context value to the remote device.

Parameters
[in]conn_hdlConnection handle.
[in]p_valueCharacteristic value to send.
Returns
ble_status_t