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

This service exposes glucose and other data from a personal Continuous Glucose Monitoring (CGM) sensor for use in consumer healthcare applications. More...

Detailed Description

This service exposes glucose and other data from a personal Continuous Glucose Monitoring (CGM) sensor for use in consumer healthcare applications.

This file provides APIs to interface Glucose Service Records.

Data Structures

struct  st_ble_cgms_meas_flags_t
 CGM Measurement Flags value structure. More...
 
struct  st_ble_meas_sensor_status_annunciation_t
 CGM Measurement Sensor Status Annunciation value structure. More...
 
struct  st_ble_cgms_meas_t
 CGM Measurement value structure. More...
 
struct  st_ble_feat_cgm_feature_t
 CGM Feature CGM Feature value structure. More...
 
struct  st_ble_cgms_feat_t
 CGM Feature value structure. More...
 
struct  st_ble_cgms_status_t
 CGM Status value structure. More...
 
struct  st_ble_cgms_session_start_time_t
 CGM Session Start Time value structure. More...
 
struct  st_ble_cgms_session_run_time_t
 CGM Session Run Time value structure. More...
 
struct  st_ble_cgms_record_access_cp_t
 Record Access Control Point value structure. More...
 
struct  st_ble_specific_ops_cp_calibration_value_calibration_status_t
 CGM Specific Ops Control Point Calibration Value - Calibration Status value structure. More...
 
struct  st_ble_cgms_calibration_data_record_t
 CGM Specific Ops Control Point value structure. More...
 
struct  st_ble_cgms_specific_ops_cp_t
 CGM Specific Ops Control Point value structure. More...
 
struct  st_ble_cgms_record_t
 

Macros

#define BLE_CGMS_SESSION_START_TIMEINVALID_TIME_ZONE_ERROR   (BLE_ERR_GROUP_GATT | 0xFF)
 
#define BLE_CGMS_PROCEDURE_ALREADY_IN_PROGRESS_ERROR   (BLE_ERR_GROUP_GATT | 0xFE)
 A Record Access Control Point request cannot be serviced because a previously triggered RACP operation is still in progress. More...
 
#define BLE_CGMS_CLI_CNFG_IMPROPERLY_CONFIGURED_ERROR   (BLE_ERR_GROUP_GATT | 0xFD)
 The Client Characteristic Configuration descriptor is not configured according to the requirements of the service. More...
 
#define BLE_CGMS_MISSING_CRC_ERROR   (BLE_ERR_GROUP_GATT | 0x80)
 If E2E-CRC is supported and a Write procedure is processed without CRC attached. More...
 
#define BLE_CGMS_INVALID_CRC_ERROR   (BLE_ERR_GROUP_GATT | 0x81)
 If E2E-CRC is supported and a Write procedure is processed with incorrect or invalid CRC value attached. More...
 
#define BLE_CGMS_DB_MAX_NUM_OF_RECORDS   (10)
 
#define BLE_CGMS_DB_INVALID_INDEX   (0xFFFF)
 

Enumerations

enum  e_ble_cgms_feat_cgm_type_t {
  BLE_CGMS_FEAT_CGM_TYPE_CAPILLARY_WHOLE_BLOOD_1 = 1,
  BLE_CGMS_FEAT_CGM_TYPE_CAPILLARY_PLASMA = 2,
  BLE_CGMS_FEAT_CGM_TYPE_CAPILLARY_WHOLE_BLOOD_3 = 3,
  BLE_CGMS_FEAT_CGM_TYPE_VENOUS_PLASMA = 4,
  BLE_CGMS_FEAT_CGM_TYPE_ARTERIAL_WHOLE_BLOOD = 5,
  BLE_CGMS_FEAT_CGM_TYPE_ARTERIAL_PLASMA = 6,
  BLE_CGMS_FEAT_CGM_TYPE_UNDETERMINED_WHOLE_BLOOD = 7,
  BLE_CGMS_FEAT_CGM_TYPE_UNDETERMINED_PLASMA = 8,
  BLE_CGMS_FEAT_CGM_TYPE_INTERSTITIAL_FLUID = 9,
  BLE_CGMS_FEAT_CGM_TYPE_CONTROL_SOLUTION = 10
}
 CGM Feature CGM Type enumeration. More...
 
enum  e_ble_cgms_feat_cgm_sample_location_t {
  BLE_CGMS_FEAT_CGM_SAMPLE_LOCATION_FINGER = 1,
  BLE_CGMS_FEAT_CGM_SAMPLE_LOCATION_ALTERNATE_SITE_TEST = 2,
  BLE_CGMS_FEAT_CGM_SAMPLE_LOCATION_EARLOBE = 3,
  BLE_CGMS_FEAT_CGM_SAMPLE_LOCATION_CONTROL_SOLUTION = 4,
  BLE_CGMS_FEAT_CGM_SAMPLE_LOCATION_SUBCUTANEOUS_TISSUE = 5,
  BLE_CGMS_FEAT_CGM_SAMPLE_LOCATION_SAMPLE_LOCATION_VALUE_NOT_AVAILABLE = 15
}
 CGM Feature CGM Sample Location enumeration. More...
 
enum  e_ble_cgms_session_start_time_dst_offset_t {
  BLE_CGMS_SESSION_START_TIME_DST_OFFSET_STANDARD_TIME = 0,
  BLE_CGMS_SESSION_START_TIME_DST_OFFSET_HALF_AN_HOUR_DAYLIGHT_TIME = 2,
  BLE_CGMS_SESSION_START_TIME_DST_OFFSET_DAYLIGHT_TIME = 4,
  BLE_CGMS_SESSION_START_TIME_DST_OFFSET_DOUBLE_DAYLIGHT_TIME = 8
}
 CGM Session Start Time DST-Offset enumeration. More...
 
enum  e_ble_cgms_record_access_cp_op_code_t {
  BLE_CGMS_RECORD_ACCESS_CP_OP_CODE_REPORT_STORED_RECORDS = 1,
  BLE_CGMS_RECORD_ACCESS_CP_OP_CODE_DELETE_STORED_RECORDS = 2,
  BLE_CGMS_RECORD_ACCESS_CP_OP_CODE_ABORT_OPERATION = 3,
  BLE_CGMS_RECORD_ACCESS_CP_OP_CODE_REPORT_NUMBER_OF_STORED_RECORDS = 4,
  BLE_CGMS_RECORD_ACCESS_CP_OP_CODE_NUMBER_OF_STORED_RECORDS_RESPONSE = 5,
  BLE_CGMS_RECORD_ACCESS_CP_OP_CODE_RESPONSE_CODE = 6
}
 Record Access Control Point Op Code enumeration. More...
 
enum  e_ble_cgms_record_access_cp_operator_t {
  BLE_CGMS_RECORD_ACCESS_CP_OPERATOR_NULL = 0,
  BLE_CGMS_RECORD_ACCESS_CP_OPERATOR_ALL_RECORDS = 1,
  BLE_CGMS_RECORD_ACCESS_CP_OPERATOR_LESS_THAN_OR_EQUAL_TO = 2,
  BLE_CGMS_RECORD_ACCESS_CP_OPERATOR_GREATER_THAN_OR_EQUAL_TO = 3,
  BLE_CGMS_RECORD_ACCESS_CP_OPERATOR_WITHIN_RANGE_OF = 4,
  BLE_CGMS_RECORD_ACCESS_CP_OPERATOR_FIRST_RECORD = 5,
  BLE_CGMS_RECORD_ACCESS_CP_OPERATOR_LAST_RECORD = 6
}
 Record Access Control Point Operator enumeration. More...
 
enum  e_ble_cgms_record_access_cp_operand_t {
  BLE_CGMS_RECORD_ACCESS_CP_OPERAND_FILTER_PARAMETERS_1 = 1,
  BLE_CGMS_RECORD_ACCESS_CP_OPERAND_FILTER_PARAMETERS_2 = 2,
  BLE_CGMS_RECORD_ACCESS_CP_OPERAND_NOT_INCLUDED = 3,
  BLE_CGMS_RECORD_ACCESS_CP_OPERAND_FILTER_PARAMETERS_4 = 4,
  BLE_CGMS_RECORD_ACCESS_CP_OPERAND_NUMBER_OF_RECORDS = 5,
  BLE_CGMS_RECORD_ACCESS_CP_OPERAND_REQUEST_OP_CODE__RESPONSE_CODE_VALUE = 6
}
 Record Access Control Point Operand enumeration. More...
 
enum  e_ble_cgms_record_access_cp_response_code_t {
  BLE_CGMS_RECORD_ACCESS_CP_RESPONSE_CODE_SUCCESS = 1,
  BLE_CGMS_RECORD_ACCESS_CP_RESPONSE_CODE_OP_CODE_NOT_SUPPORTED = 2,
  BLE_CGMS_RECORD_ACCESS_CP_RESPONSE_CODE_INVALID_OPERATOR = 3,
  BLE_CGMS_RECORD_ACCESS_CP_RESPONSE_CODE_OPERATOR_NOT_SUPPORTED = 4,
  BLE_CGMS_RECORD_ACCESS_CP_RESPONSE_CODE_INVALID_OPERAND = 5,
  BLE_CGMS_RECORD_ACCESS_CP_RESPONSE_CODE_NO_RECORDS_FOUND = 6,
  BLE_CGMS_RECORD_ACCESS_CP_RESPONSE_CODE_ABORT_UNSUCCESSFUL = 7,
  BLE_CGMS_RECORD_ACCESS_CP_RESPONSE_CODE_PROCEDURE_NOT_COMPLETED = 8,
  BLE_CGMS_RECORD_ACCESS_CP_OP_CODE_RESPONSE_CODE_9 = 9
}
 Record Access Control Point Response Code enumeration. More...
 
enum  e_ble_cgms_cgm_ra_ctrl_pt_filter_type_t {
  BLE_CGMS_RA_CTRL_PT_FILTER_TYPE_TIME_OFFSET = 1,
  BLE_CGMS_RA_CTRL_PT_FILTER_TYPE_USER_FACING_TIME = 2
}
 Record Access Control Point Filtrer Type enumeration. More...
 
enum  e_ble_cgms_specific_ops_cp_op_code_t {
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_SET_CGM_COMMUNICATION_INTERVAL = 1,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_GET_CGM_COMMUNICATION_INTERVAL = 2,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_CGM_COMMUNICATION_INTERVAL_RESPONSE = 3,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_SET_GLUCOSE_CALIBRATION_VALUE = 4,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_GET_GLUCOSE_CALIBRATION_VALUE = 5,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_GLUCOSE_CALIBRATION_VALUE_RESPONSE = 6,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_SET_PATIENT_HIGH_ALERT_LEVEL = 7,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_GET_PATIENT_HIGH_ALERT_LEVEL = 8,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_PATIENT_HIGH_ALERT_LEVEL_RESPONSE = 9,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_SET_PATIENT_LOW_ALERT_LEVEL = 10,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_GET_PATIENT_LOW_ALERT_LEVEL = 11,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_PATIENT_LOW_ALERT_LEVEL_RESPONSE = 12,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_SET_HYPO_ALERT_LEVEL = 13,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_GET_HYPO_ALERT_LEVEL = 14,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_HYPO_ALERT_LEVEL_RESPONSE = 15,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_SET_HYPER_ALERT_LEVEL = 16,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_GET_HYPER_ALERT_LEVEL = 17,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_HYPER_ALERT_LEVEL_RESPONSE = 18,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_SET_RATE_OF_DECREASE_ALERT_LEVEL = 19,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_GET_RATE_OF_DECREASE_ALERT_LEVEL = 20,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_RATE_OF_DECREASE_ALERT_LEVEL_RESPONSE = 21,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_SET_RATE_OF_INCREASE_ALERT_LEVEL = 22,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_GET_RATE_OF_INCREASE_ALERT_LEVEL = 23,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_RATE_OF_INCREASE_ALERT_LEVEL_RESPONSE = 24,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_RESET_DEVICE_SPECIFIC_ALERT = 25,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_START_THE_SESSION = 26,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_STOP_THE_SESSION = 27,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_RESPONSE_CODE = 28
}
 CGM Specific Ops Control Point Op Code enumeration. More...
 
enum  e_ble_cgms_specific_ops_cp_op_code_response_codes_t {
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_RESPONSE_CODES_SUCCESS = 1,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_RESPONSE_CODES_OP_CODE_NOT_SUPPORTED = 2,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_RESPONSE_CODES_INVALID_OPERAND = 3,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_RESPONSE_CODES_PROCEDURE_NOT_COMPLETED = 4,
  BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_RESPONSE_CODES_PARAMETER_OUT_OF_RANGE = 5
}
 CGM Specific Ops Control Point Op Code - Response Codes enumeration. More...
 
enum  e_ble_cgms_specific_ops_cp_operand_t {
  BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_COMMUNICATION_INTERVAL_IN_MINUTES_1 = 1,
  BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_COMMUNICATION_INTERVAL_IN_MINUTES_3 = 3,
  BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_OPERAND_VALUE_AS_DEFINED_IN_THE_CALIBRATION_VALUE_FIELDS_ = 4,
  BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_CALIBRATION_DATA_RECORD_NUMBER = 5,
  BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_CALIBRATION_DATA = 6,
  BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_PATIENT_HIGH_BG_VALUE_IN_MG_DL_7 = 7,
  BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_PATIENT_HIGH_BG_VALUE_IN_MG_DL_9 = 9,
  BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_PATIENT_LOW_BG_VALUE_IN_MG_DL_10 = 10,
  BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_PATIENT_LOW_BG_VALUE_IN_MG_DL_12 = 12,
  BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_HYPO_ALERT_LEVEL_VALUE_IN_MG_DL_13 = 13,
  BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_HYPO_ALERT_LEVEL_VALUE_IN_MG_DL_15 = 15,
  BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_HYPER_ALERT_LEVEL_VALUE_IN_MG_DL_16 = 16,
  BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_HYPER_ALERT_LEVEL_VALUE_IN_MG_DL_18 = 18,
  BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_RATE_OF_DECREASE_ALERT_LEVEL_VALUE_IN_MG_DL_MIN_19 = 19,
  BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_RATE_OF_DECREASE_ALERT_LEVEL_VALUE_IN_MG_DL_MIN_21 = 21,
  BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_RATE_OF_INCREASE_ALERT_LEVEL_VALUE_IN_MG_DL_MIN_22 = 22,
  BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_RATE_OF_INCREASE_ALERT_LEVEL_VALUE_IN_MG_DL_MIN_24 = 24,
  BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_REQUEST_OP_CODE__RESPONSE_CODE_VALUE = 28
}
 CGM Specific Ops Control Point Operand enumeration. More...
 
enum  e_ble_cgms_char_idx_t {
  BLE_CGMS_MEAS_IDX,
  BLE_CGMS_MEAS_CLI_CNFG_IDX,
  BLE_CGMS_FEAT_IDX,
  BLE_CGMS_STATUS_IDX,
  BLE_CGMS_SESSION_START_TIME_IDX,
  BLE_CGMS_SESSION_RUN_TIME_IDX,
  BLE_CGMS_RECORD_ACCESS_CP_IDX,
  BLE_CGMS_RECORD_ACCESS_CP_CLI_CNFG_IDX,
  BLE_CGMS_SPECIFIC_OPS_CP_IDX,
  BLE_CGMS_SPECIFIC_OPS_CP_CLI_CNFG_IDX
}
 Continuous Glucose Monitoring characteristic Index. More...
 
enum  e_ble_cgms_event_t {
  BLE_CGMS_EVENT_MEAS_CLI_CNFG_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_CGMS_MEAS_CLI_CNFG_IDX, BLE_SERVS_WRITE_REQ),
  BLE_CGMS_EVENT_MEAS_CLI_CNFG_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_CGMS_MEAS_CLI_CNFG_IDX, BLE_SERVS_WRITE_COMP),
  BLE_CGMS_EVENT_MEAS_CLI_CNFG_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_CGMS_MEAS_CLI_CNFG_IDX, BLE_SERVS_READ_REQ),
  BLE_CGMS_EVENT_FEAT_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_CGMS_FEAT_IDX, BLE_SERVS_READ_REQ),
  BLE_CGMS_EVENT_STATUS_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_CGMS_STATUS_IDX, BLE_SERVS_READ_REQ),
  BLE_CGMS_EVENT_SESSION_START_TIME_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_CGMS_SESSION_START_TIME_IDX, BLE_SERVS_WRITE_REQ),
  BLE_CGMS_EVENT_SESSION_START_TIME_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_CGMS_SESSION_START_TIME_IDX, BLE_SERVS_WRITE_COMP),
  BLE_CGMS_EVENT_SESSION_START_TIME_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_CGMS_SESSION_START_TIME_IDX, BLE_SERVS_READ_REQ),
  BLE_CGMS_EVENT_SESSION_RUN_TIME_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_CGMS_SESSION_RUN_TIME_IDX, BLE_SERVS_READ_REQ),
  BLE_CGMS_EVENT_RECORD_ACCESS_CP_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_CGMS_RECORD_ACCESS_CP_IDX, BLE_SERVS_WRITE_REQ),
  BLE_CGMS_EVENT_RECORD_ACCESS_CP_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_CGMS_RECORD_ACCESS_CP_IDX, BLE_SERVS_WRITE_COMP),
  BLE_CGMS_EVENT_RECORD_ACCESS_CP_HDL_VAL_CNF = BLE_SERVS_ATTR_EVENT(BLE_CGMS_RECORD_ACCESS_CP_IDX, BLE_SERVS_HDL_VAL_CNF),
  BLE_CGMS_EVENT_RECORD_ACCESS_CP_CLI_CNFG_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_CGMS_RECORD_ACCESS_CP_CLI_CNFG_IDX, BLE_SERVS_WRITE_REQ),
  BLE_CGMS_EVENT_RECORD_ACCESS_CP_CLI_CNFG_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_CGMS_RECORD_ACCESS_CP_CLI_CNFG_IDX, BLE_SERVS_WRITE_COMP),
  BLE_CGMS_EVENT_RECORD_ACCESS_CP_CLI_CNFG_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_CGMS_RECORD_ACCESS_CP_CLI_CNFG_IDX, BLE_SERVS_READ_REQ),
  BLE_CGMS_EVENT_SPECIFIC_OPS_CP_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_CGMS_SPECIFIC_OPS_CP_IDX, BLE_SERVS_WRITE_REQ),
  BLE_CGMS_EVENT_SPECIFIC_OPS_CP_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_CGMS_SPECIFIC_OPS_CP_IDX, BLE_SERVS_WRITE_COMP),
  BLE_CGMS_EVENT_SPECIFIC_OPS_CP_HDL_VAL_CNF = BLE_SERVS_ATTR_EVENT(BLE_CGMS_SPECIFIC_OPS_CP_IDX, BLE_SERVS_HDL_VAL_CNF),
  BLE_CGMS_EVENT_SPECIFIC_OPS_CP_CLI_CNFG_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_CGMS_SPECIFIC_OPS_CP_CLI_CNFG_IDX, BLE_SERVS_WRITE_REQ),
  BLE_CGMS_EVENT_SPECIFIC_OPS_CP_CLI_CNFG_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_CGMS_SPECIFIC_OPS_CP_CLI_CNFG_IDX, BLE_SERVS_WRITE_COMP),
  BLE_CGMS_EVENT_SPECIFIC_OPS_CP_CLI_CNFG_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_CGMS_SPECIFIC_OPS_CP_CLI_CNFG_IDX, BLE_SERVS_READ_REQ)
}
 Continuous Glucose Monitoring event type. More...
 
enum  e_ble_cgms_db_valid_t {
  BLE_CGMS_DB_INVALID_RECORD = 0,
  BLE_CGMS_DB_MEAS_VALID_RECORD,
  BLE_CGMS_DB_MEAS_AND_CONTEXT_VALID_RECORD,
  BLE_CGMS_DB_WILL_DELETE
}
 

Functions

ble_status_t R_BLE_CGMS_NotifyMeas (uint16_t conn_hdl, const st_ble_cgms_meas_t *p_value)
 Send notification of CGM Measurement characteristic value to the remote device. More...
 
ble_status_t R_BLE_CGMS_SetMeasCliCnfg (uint16_t conn_hdl, const uint16_t *p_value)
 Set CGM Measurement cli cnfg descriptor value to the local GATT database. More...
 
ble_status_t R_BLE_CGMS_GetMeasCliCnfg (uint16_t conn_hdl, uint16_t *p_value)
 Get CGM Measurement cli cnfg descriptor value from the local GATT database. More...
 
ble_status_t R_BLE_CGMS_SetFeat (const st_ble_cgms_feat_t *p_value)
 Set CGM Feature characteristic value to the local GATT database. More...
 
ble_status_t R_BLE_CGMS_GetFeat (st_ble_cgms_feat_t *p_value)
 Get CGM Feature characteristic value from the local GATT database. More...
 
ble_status_t R_BLE_CGMS_SetStatus (const st_ble_cgms_status_t *p_value)
 Set CGM Status characteristic value to the local GATT database. More...
 
ble_status_t R_BLE_CGMS_GetStatus (st_ble_cgms_status_t *p_value)
 Get CGM Status characteristic value from the local GATT database. More...
 
ble_status_t R_BLE_CGMS_SetSessionStartTime (const st_ble_cgms_session_start_time_t *p_value)
 Set CGM Session Start Time characteristic value to the local GATT database. More...
 
ble_status_t R_BLE_CGMS_GetSessionStartTime (st_ble_cgms_session_start_time_t *p_value)
 Get CGM Session Start Time characteristic value from the local GATT database. More...
 
ble_status_t R_BLE_CGMS_SetSessionRunTime (const st_ble_cgms_session_run_time_t *p_value)
 Set CGM Session Run Time characteristic value to the local GATT database. More...
 
ble_status_t R_BLE_CGMS_GetSessionRunTime (st_ble_cgms_session_run_time_t *p_value)
 Get CGM Session Run Time characteristic value from the local GATT database. More...
 
ble_status_t R_BLE_CGMS_IndicateRecordAccessCp (uint16_t conn_hdl, const st_ble_cgms_record_access_cp_t *p_value)
 Send indication of Record Access Control Point characteristic value to the remote device. More...
 
ble_status_t R_BLE_CGMS_SetRecordAccessCpCliCnfg (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_CGMS_GetRecordAccessCpCliCnfg (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_CGMS_IndicateSpecificOpsCp (uint16_t conn_hdl, const st_ble_cgms_specific_ops_cp_t *p_value)
 Send indication of CGM Specific Ops Control Point characteristic value to the remote device. More...
 
ble_status_t R_BLE_CGMS_SetSpecificOpsCpCliCnfg (uint16_t conn_hdl, const uint16_t *p_value)
 Set CGM Specific Ops Control Point cli cnfg descriptor value to the local GATT database. More...
 
ble_status_t R_BLE_CGMS_GetSpecificOpsCpCliCnfg (uint16_t conn_hdl, uint16_t *p_value)
 Get CGM Specific Ops Control Point cli cnfg descriptor value from the local GATT database. More...
 
ble_status_t R_BLE_CGMS_Init (ble_servs_app_cb_t cb)
 Initialize Continuous Glucose Monitoring service. More...
 
ble_status_t R_BLE_CGMS_AddNewRecord (st_ble_cgms_meas_t *p_meas)
 Adds a new record to the record database. More...
 
void cgms_db_init (void)
 
uint16_t cgms_db_get_oldest_index (void)
 
uint16_t cgms_db_get_newest_index (void)
 
uint16_t cgms_db_get_next_index (uint16_t index)
 
st_ble_cgms_record_tcgms_db_get_record (uint16_t index)
 
void cgms_db_store_record (const st_ble_cgms_meas_t *p_meas)
 
void cgms_db_mark_delete_record (uint16_t index)
 
void cgms_db_delete_records (void)
 

Macro Definition Documentation

◆ BLE_CGMS_PROCEDURE_ALREADY_IN_PROGRESS_ERROR

#define BLE_CGMS_PROCEDURE_ALREADY_IN_PROGRESS_ERROR   (BLE_ERR_GROUP_GATT | 0xFE)

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

◆ BLE_CGMS_CLI_CNFG_IMPROPERLY_CONFIGURED_ERROR

#define BLE_CGMS_CLI_CNFG_IMPROPERLY_CONFIGURED_ERROR   (BLE_ERR_GROUP_GATT | 0xFD)

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

◆ BLE_CGMS_MISSING_CRC_ERROR

#define BLE_CGMS_MISSING_CRC_ERROR   (BLE_ERR_GROUP_GATT | 0x80)

If E2E-CRC is supported and a Write procedure is processed without CRC attached.

◆ BLE_CGMS_INVALID_CRC_ERROR

#define BLE_CGMS_INVALID_CRC_ERROR   (BLE_ERR_GROUP_GATT | 0x81)

If E2E-CRC is supported and a Write procedure is processed with incorrect or invalid CRC value attached.

Enumeration Type Documentation

◆ e_ble_cgms_feat_cgm_type_t

CGM Feature CGM Type enumeration.

Enumerator
BLE_CGMS_FEAT_CGM_TYPE_CAPILLARY_WHOLE_BLOOD_1 

Capillary Whole blood

BLE_CGMS_FEAT_CGM_TYPE_CAPILLARY_PLASMA 

Capillary Plasma

BLE_CGMS_FEAT_CGM_TYPE_CAPILLARY_WHOLE_BLOOD_3 

Capillary Whole blood

BLE_CGMS_FEAT_CGM_TYPE_VENOUS_PLASMA 

Venous Plasma

BLE_CGMS_FEAT_CGM_TYPE_ARTERIAL_WHOLE_BLOOD 

Arterial Whole blood

BLE_CGMS_FEAT_CGM_TYPE_ARTERIAL_PLASMA 

Arterial Plasma

BLE_CGMS_FEAT_CGM_TYPE_UNDETERMINED_WHOLE_BLOOD 

Undetermined Whole blood

BLE_CGMS_FEAT_CGM_TYPE_UNDETERMINED_PLASMA 

Undetermined Plasma

BLE_CGMS_FEAT_CGM_TYPE_INTERSTITIAL_FLUID 

Interstitial Fluid (ISF)

BLE_CGMS_FEAT_CGM_TYPE_CONTROL_SOLUTION 

Control Solution

◆ e_ble_cgms_feat_cgm_sample_location_t

CGM Feature CGM Sample Location enumeration.

Enumerator
BLE_CGMS_FEAT_CGM_SAMPLE_LOCATION_FINGER 

Finger

BLE_CGMS_FEAT_CGM_SAMPLE_LOCATION_ALTERNATE_SITE_TEST 

Alternate Site Test (AST)

BLE_CGMS_FEAT_CGM_SAMPLE_LOCATION_EARLOBE 

Earlobe

BLE_CGMS_FEAT_CGM_SAMPLE_LOCATION_CONTROL_SOLUTION 

Control solution

BLE_CGMS_FEAT_CGM_SAMPLE_LOCATION_SUBCUTANEOUS_TISSUE 

Subcutaneous tissue

BLE_CGMS_FEAT_CGM_SAMPLE_LOCATION_SAMPLE_LOCATION_VALUE_NOT_AVAILABLE 

Sample Location value not available

◆ e_ble_cgms_session_start_time_dst_offset_t

CGM Session Start Time DST-Offset enumeration.

Enumerator
BLE_CGMS_SESSION_START_TIME_DST_OFFSET_STANDARD_TIME 

Standard Time

BLE_CGMS_SESSION_START_TIME_DST_OFFSET_HALF_AN_HOUR_DAYLIGHT_TIME 

Half An Hour Daylight Time (+0.5h)

BLE_CGMS_SESSION_START_TIME_DST_OFFSET_DAYLIGHT_TIME 

Daylight Time (+1h)

BLE_CGMS_SESSION_START_TIME_DST_OFFSET_DOUBLE_DAYLIGHT_TIME 

Double Daylight Time (+2h)

◆ e_ble_cgms_record_access_cp_op_code_t

Record Access Control Point Op Code enumeration.

Enumerator
BLE_CGMS_RECORD_ACCESS_CP_OP_CODE_REPORT_STORED_RECORDS 

Report stored records (Operator: Value from Operator Table)

BLE_CGMS_RECORD_ACCESS_CP_OP_CODE_DELETE_STORED_RECORDS 

Delete stored records (Operator: Value from Operator Table)

BLE_CGMS_RECORD_ACCESS_CP_OP_CODE_ABORT_OPERATION 

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

BLE_CGMS_RECORD_ACCESS_CP_OP_CODE_REPORT_NUMBER_OF_STORED_RECORDS 

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

BLE_CGMS_RECORD_ACCESS_CP_OP_CODE_NUMBER_OF_STORED_RECORDS_RESPONSE 

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

BLE_CGMS_RECORD_ACCESS_CP_OP_CODE_RESPONSE_CODE 

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

◆ e_ble_cgms_record_access_cp_operator_t

Record Access Control Point Operator enumeration.

Enumerator
BLE_CGMS_RECORD_ACCESS_CP_OPERATOR_NULL 

Null

BLE_CGMS_RECORD_ACCESS_CP_OPERATOR_ALL_RECORDS 

All records

BLE_CGMS_RECORD_ACCESS_CP_OPERATOR_LESS_THAN_OR_EQUAL_TO 

Less than or equal to

BLE_CGMS_RECORD_ACCESS_CP_OPERATOR_GREATER_THAN_OR_EQUAL_TO 

Greater than or equal to

BLE_CGMS_RECORD_ACCESS_CP_OPERATOR_WITHIN_RANGE_OF 

Within range of (inclusive)

BLE_CGMS_RECORD_ACCESS_CP_OPERATOR_FIRST_RECORD 

First record(i.e. oldest record)

BLE_CGMS_RECORD_ACCESS_CP_OPERATOR_LAST_RECORD 

Last record (i.e. most recent record)

◆ e_ble_cgms_record_access_cp_operand_t

Record Access Control Point Operand enumeration.

Enumerator
BLE_CGMS_RECORD_ACCESS_CP_OPERAND_FILTER_PARAMETERS_1 

Filter parameters (as appropriate to Operator and Service)

BLE_CGMS_RECORD_ACCESS_CP_OPERAND_FILTER_PARAMETERS_2 

Filter parameters (as appropriate to Operator and Service)

BLE_CGMS_RECORD_ACCESS_CP_OPERAND_NOT_INCLUDED 

Not included

BLE_CGMS_RECORD_ACCESS_CP_OPERAND_FILTER_PARAMETERS_4 

Filter parameters (as appropriate to Operator and Service)

BLE_CGMS_RECORD_ACCESS_CP_OPERAND_NUMBER_OF_RECORDS 

Number of Records (Field size defined per service)

BLE_CGMS_RECORD_ACCESS_CP_OPERAND_REQUEST_OP_CODE__RESPONSE_CODE_VALUE 

Request Op Code, Response Code Value

◆ e_ble_cgms_record_access_cp_response_code_t

Record Access Control Point Response Code enumeration.

Enumerator
BLE_CGMS_RECORD_ACCESS_CP_RESPONSE_CODE_SUCCESS 

Normal response for successful operation

BLE_CGMS_RECORD_ACCESS_CP_RESPONSE_CODE_OP_CODE_NOT_SUPPORTED 

Normal response if unsupported Op Code is received

BLE_CGMS_RECORD_ACCESS_CP_RESPONSE_CODE_INVALID_OPERATOR 

Normal response if Operator received does not meet the requirements

of the service (e.g. Null was expected)

BLE_CGMS_RECORD_ACCESS_CP_RESPONSE_CODE_OPERATOR_NOT_SUPPORTED 

Normal response if unsupported Operator is received

BLE_CGMS_RECORD_ACCESS_CP_RESPONSE_CODE_INVALID_OPERAND 

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

BLE_CGMS_RECORD_ACCESS_CP_RESPONSE_CODE_NO_RECORDS_FOUND 

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

BLE_CGMS_RECORD_ACCESS_CP_RESPONSE_CODE_ABORT_UNSUCCESSFUL 

Normal response if request for Abort cannot be completed

BLE_CGMS_RECORD_ACCESS_CP_RESPONSE_CODE_PROCEDURE_NOT_COMPLETED 

Normal response if unable to complete a procedure for any reason

BLE_CGMS_RECORD_ACCESS_CP_OP_CODE_RESPONSE_CODE_9 

Normal response if unsupported Operand is received

◆ e_ble_cgms_cgm_ra_ctrl_pt_filter_type_t

Record Access Control Point Filtrer Type enumeration.

◆ e_ble_cgms_specific_ops_cp_op_code_t

CGM Specific Ops Control Point Op Code enumeration.

Enumerator
BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_SET_CGM_COMMUNICATION_INTERVAL 

Set CGM Communication Interval

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_GET_CGM_COMMUNICATION_INTERVAL 

Get CGM Communication Interval

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_CGM_COMMUNICATION_INTERVAL_RESPONSE 

CGM Communication Interval response

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_SET_GLUCOSE_CALIBRATION_VALUE 

Set Glucose Calibration Value

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_GET_GLUCOSE_CALIBRATION_VALUE 

Get Glucose Calibration Value

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_GLUCOSE_CALIBRATION_VALUE_RESPONSE 

Glucose Calibration Value response

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_SET_PATIENT_HIGH_ALERT_LEVEL 

Set Patient High Alert Level

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_GET_PATIENT_HIGH_ALERT_LEVEL 

Get Patient High Alert Level

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_PATIENT_HIGH_ALERT_LEVEL_RESPONSE 

Patient High Alert Level Response

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_SET_PATIENT_LOW_ALERT_LEVEL 

Set Patient Low Alert Level

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_GET_PATIENT_LOW_ALERT_LEVEL 

Get Patient Low Alert Level

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_PATIENT_LOW_ALERT_LEVEL_RESPONSE 

Patient Low Alert Level Response

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_SET_HYPO_ALERT_LEVEL 

Set Hypo Alert Level

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_GET_HYPO_ALERT_LEVEL 

Get Hypo Alert Level

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_HYPO_ALERT_LEVEL_RESPONSE 

Hypo Alert Level Response

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_SET_HYPER_ALERT_LEVEL 

Set Hyper Alert Level

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_GET_HYPER_ALERT_LEVEL 

Get Hyper Alert Level

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_HYPER_ALERT_LEVEL_RESPONSE 

Hyper Alert Level Response

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_SET_RATE_OF_DECREASE_ALERT_LEVEL 

Set Rate of Decrease Alert Level

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_GET_RATE_OF_DECREASE_ALERT_LEVEL 

Get Rate of Decrease Alert Level

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_RATE_OF_DECREASE_ALERT_LEVEL_RESPONSE 

Rate of Decrease Alert Level Response

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_SET_RATE_OF_INCREASE_ALERT_LEVEL 

Set Rate of Increase Alert Level

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_GET_RATE_OF_INCREASE_ALERT_LEVEL 

Get Rate of Increase Alert Level

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_RATE_OF_INCREASE_ALERT_LEVEL_RESPONSE 

Rate of Increase Alert Level Response

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_RESET_DEVICE_SPECIFIC_ALERT 

Reset Device Specific Alert

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_START_THE_SESSION 

Start the Session

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_STOP_THE_SESSION 

Stop the Session

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_RESPONSE_CODE 

Response Code

◆ e_ble_cgms_specific_ops_cp_op_code_response_codes_t

CGM Specific Ops Control Point Op Code - Response Codes enumeration.

Enumerator
BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_RESPONSE_CODES_SUCCESS 

Success

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_RESPONSE_CODES_OP_CODE_NOT_SUPPORTED 

Op Code not supported

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_RESPONSE_CODES_INVALID_OPERAND 

Invalid Operand

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_RESPONSE_CODES_PROCEDURE_NOT_COMPLETED 

Procedure not completed

BLE_CGMS_SPECIFIC_OPS_CP_OP_CODE_RESPONSE_CODES_PARAMETER_OUT_OF_RANGE 

Parameter out of range

◆ e_ble_cgms_specific_ops_cp_operand_t

CGM Specific Ops Control Point Operand enumeration.

Enumerator
BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_COMMUNICATION_INTERVAL_IN_MINUTES_1 

Communication interval in minutes

BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_COMMUNICATION_INTERVAL_IN_MINUTES_3 

Communication Interval in minutes

BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_OPERAND_VALUE_AS_DEFINED_IN_THE_CALIBRATION_VALUE_FIELDS_ 

Operand value as defined in the Calibration Value Fields.

BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_CALIBRATION_DATA_RECORD_NUMBER 

Calibration Data Record Number

BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_CALIBRATION_DATA 

Calibration Data

BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_PATIENT_HIGH_BG_VALUE_IN_MG_DL_7 

Patient High bG value in mg/dL

BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_PATIENT_HIGH_BG_VALUE_IN_MG_DL_9 

Patient High bG value in mg/dL

BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_PATIENT_LOW_BG_VALUE_IN_MG_DL_10 

Patient Low bG value in mg/dL

BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_PATIENT_LOW_BG_VALUE_IN_MG_DL_12 

Patient Low bG value in mg/dL

BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_HYPO_ALERT_LEVEL_VALUE_IN_MG_DL_13 

Hypo Alert Level value in mg/dL

BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_HYPO_ALERT_LEVEL_VALUE_IN_MG_DL_15 

Hypo Alert Level value in mg/dL

BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_HYPER_ALERT_LEVEL_VALUE_IN_MG_DL_16 

Hyper Alert Level value in mg/dL

BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_HYPER_ALERT_LEVEL_VALUE_IN_MG_DL_18 

Hyper Alert Level value in mg/dL

BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_RATE_OF_DECREASE_ALERT_LEVEL_VALUE_IN_MG_DL_MIN_19 

Rate of Decrease Alert Level value in mg/dL/min

BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_RATE_OF_DECREASE_ALERT_LEVEL_VALUE_IN_MG_DL_MIN_21 

Rate of Decrease Alert Level value in mg/dL/min

BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_RATE_OF_INCREASE_ALERT_LEVEL_VALUE_IN_MG_DL_MIN_22 

Rate of Increase Alert Level value in mg/dL/min

BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_RATE_OF_INCREASE_ALERT_LEVEL_VALUE_IN_MG_DL_MIN_24 

Rate of Increase Alert Level value in mg/dL/min

BLE_CGMS_SPECIFIC_OPS_CP_OPERAND_REQUEST_OP_CODE__RESPONSE_CODE_VALUE 

Request Op Code, Response Code Value

◆ e_ble_cgms_char_idx_t

Continuous Glucose Monitoring characteristic Index.

◆ e_ble_cgms_event_t

Continuous Glucose Monitoring event type.

Function Documentation

◆ R_BLE_CGMS_NotifyMeas()

ble_status_t R_BLE_CGMS_NotifyMeas ( uint16_t  conn_hdl,
const st_ble_cgms_meas_t p_value 
)

Send notification of CGM Measurement characteristic value to the remote device.

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

◆ R_BLE_CGMS_SetMeasCliCnfg()

ble_status_t R_BLE_CGMS_SetMeasCliCnfg ( uint16_t  conn_hdl,
const uint16_t *  p_value 
)

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

Parameters
[in]p_valueDescriptor value to set.
Returns
ble_status_t

◆ R_BLE_CGMS_GetMeasCliCnfg()

ble_status_t R_BLE_CGMS_GetMeasCliCnfg ( uint16_t  conn_hdl,
uint16_t *  p_value 
)

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

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

◆ R_BLE_CGMS_SetFeat()

ble_status_t R_BLE_CGMS_SetFeat ( const st_ble_cgms_feat_t p_value)

Set CGM Feature characteristic value to the local GATT database.

Parameters
[in]p_valueCharacteristic value to set.
Returns
ble_status_t

◆ R_BLE_CGMS_GetFeat()

ble_status_t R_BLE_CGMS_GetFeat ( st_ble_cgms_feat_t p_value)

Get CGM Feature characteristic value from the local GATT database.

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

◆ R_BLE_CGMS_SetStatus()

ble_status_t R_BLE_CGMS_SetStatus ( const st_ble_cgms_status_t p_value)

Set CGM Status characteristic value to the local GATT database.

Parameters
[in]p_valueCharacteristic value to set.
Returns
ble_status_t

◆ R_BLE_CGMS_GetStatus()

ble_status_t R_BLE_CGMS_GetStatus ( st_ble_cgms_status_t p_value)

Get CGM Status characteristic value from the local GATT database.

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

◆ R_BLE_CGMS_SetSessionStartTime()

ble_status_t R_BLE_CGMS_SetSessionStartTime ( const st_ble_cgms_session_start_time_t p_value)

Set CGM Session Start Time characteristic value to the local GATT database.

Parameters
[in]p_valueCharacteristic value to set.
Returns
ble_status_t

◆ R_BLE_CGMS_GetSessionStartTime()

ble_status_t R_BLE_CGMS_GetSessionStartTime ( st_ble_cgms_session_start_time_t p_value)

Get CGM Session Start Time characteristic value from the local GATT database.

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

◆ R_BLE_CGMS_SetSessionRunTime()

ble_status_t R_BLE_CGMS_SetSessionRunTime ( const st_ble_cgms_session_run_time_t p_value)

Set CGM Session Run Time characteristic value to the local GATT database.

Parameters
[in]p_valueCharacteristic value to set.
Returns
ble_status_t

◆ R_BLE_CGMS_GetSessionRunTime()

ble_status_t R_BLE_CGMS_GetSessionRunTime ( st_ble_cgms_session_run_time_t p_value)

Get CGM Session Run Time characteristic value from the local GATT database.

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

◆ R_BLE_CGMS_IndicateRecordAccessCp()

ble_status_t R_BLE_CGMS_IndicateRecordAccessCp ( uint16_t  conn_hdl,
const st_ble_cgms_record_access_cp_t p_value 
)

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

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

◆ R_BLE_CGMS_SetRecordAccessCpCliCnfg()

ble_status_t R_BLE_CGMS_SetRecordAccessCpCliCnfg ( 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]p_valueDescriptor value to set.
Returns
ble_status_t

◆ R_BLE_CGMS_GetRecordAccessCpCliCnfg()

ble_status_t R_BLE_CGMS_GetRecordAccessCpCliCnfg ( uint16_t  conn_hdl,
uint16_t *  p_value 
)

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

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

◆ R_BLE_CGMS_IndicateSpecificOpsCp()

ble_status_t R_BLE_CGMS_IndicateSpecificOpsCp ( uint16_t  conn_hdl,
const st_ble_cgms_specific_ops_cp_t p_value 
)

Send indication of CGM Specific Ops Control Point characteristic value to the remote device.

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

◆ R_BLE_CGMS_SetSpecificOpsCpCliCnfg()

ble_status_t R_BLE_CGMS_SetSpecificOpsCpCliCnfg ( uint16_t  conn_hdl,
const uint16_t *  p_value 
)

Set CGM Specific Ops Control Point cli cnfg descriptor value to the local GATT database.

Parameters
[in]p_valueDescriptor value to set.
Returns
ble_status_t

◆ R_BLE_CGMS_GetSpecificOpsCpCliCnfg()

ble_status_t R_BLE_CGMS_GetSpecificOpsCpCliCnfg ( uint16_t  conn_hdl,
uint16_t *  p_value 
)

Get CGM Specific Ops Control Point cli cnfg descriptor value from the local GATT database.

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

◆ R_BLE_CGMS_Init()

ble_status_t R_BLE_CGMS_Init ( ble_servs_app_cb_t  cb)

Initialize Continuous Glucose Monitoring service.

Parameters
[in]cbService callback.
Returns
ble_status_t

Function Name: R_BLE_CGMS_Init Description : This function initializes the GATTS Server and CGM Service, registers the callback function for GATTS. Arguments : cb - cal back to the initialization parameters data Return Value : BLE_SUCCESS - Success BLE_ERR_INVALID_PTR - The p_ntf_data parameter or the value field in the value field in the p_ntf_data parameter is NULL. BLE_ERR_INVALID_ARG - The value_len field in the value field in the p_ntf_data parameter is 0 or the attr_hdl field in the p_ntf_data parameters is 0.

◆ R_BLE_CGMS_AddNewRecord()

ble_status_t R_BLE_CGMS_AddNewRecord ( st_ble_cgms_meas_t p_meas)

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

Function Name: R_BLE_CGMS_AddNewRecord Description : This function adds the records of CGM characteristic. Arguments : p_meas - pointer to the CGM Characteristic Return Value : BLE_SUCCESS