![]() |
Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]
|
This service exposes glucose and other data from a personal Continuous Glucose Monitoring (CGM) sensor for use in consumer healthcare applications. More...
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) |
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_t * | cgms_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) |
#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.
#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.
#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.
#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.
CGM Feature CGM Type enumeration.
CGM Feature CGM Sample Location enumeration.
CGM Session Start Time DST-Offset enumeration.
Record Access Control Point Op Code enumeration.
Record Access Control Point Operator enumeration.
Record Access Control Point Operand enumeration.
Record Access Control Point Response Code enumeration.
Record Access Control Point Filtrer Type enumeration.
CGM Specific Ops Control Point Op Code enumeration.
CGM Specific Ops Control Point Op Code - Response Codes enumeration.
CGM Specific Ops Control Point Operand enumeration.
Continuous Glucose Monitoring characteristic Index.
enum e_ble_cgms_event_t |
Continuous Glucose Monitoring event type.
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.
[in] | conn_hdl | Connection handle. |
[in] | p_value | Characteristic value to send. |
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.
[in] | p_value | Descriptor value to set. |
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.
[in] | p_value | Output location for the acquired descriptor value. |
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.
[in] | p_value | Characteristic value to set. |
ble_status_t R_BLE_CGMS_GetFeat | ( | st_ble_cgms_feat_t * | p_value | ) |
Get CGM Feature characteristic value from the local GATT database.
[in] | p_value | Output location for the acquired descriptor value. |
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.
[in] | p_value | Characteristic value to set. |
ble_status_t R_BLE_CGMS_GetStatus | ( | st_ble_cgms_status_t * | p_value | ) |
Get CGM Status characteristic value from the local GATT database.
[in] | p_value | Output location for the acquired descriptor value. |
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.
[in] | p_value | Characteristic value to set. |
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.
[in] | p_value | Output location for the acquired descriptor value. |
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.
[in] | p_value | Characteristic value to set. |
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.
[in] | p_value | Output location for the acquired descriptor value. |
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.
[in] | conn_hdl | Connection handle. |
[in] | p_value | Characteristic value to send. |
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.
[in] | p_value | Descriptor value to set. |
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.
[in] | p_value | Output location for the acquired descriptor value. |
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.
[in] | conn_hdl | Connection handle. |
[in] | p_value | Characteristic value to send. |
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.
[in] | p_value | Descriptor value to set. |
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.
[in] | p_value | Output location for the acquired descriptor value. |
ble_status_t R_BLE_CGMS_Init | ( | ble_servs_app_cb_t | cb | ) |
Initialize Continuous Glucose Monitoring service.
[in] | cb | Service callback. |
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.
ble_status_t R_BLE_CGMS_AddNewRecord | ( | st_ble_cgms_meas_t * | p_meas | ) |
Adds a new record to the record database.
[in] | p_measurement | Glucose Measurement characteristic value |
[in] | p_context | Glucose Measurement context characteristic value |
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