Continuous Glucose Monitoring Service (CGMS)
This module implements a sensor for the Continuous Glucose Monitoring Service.
Overview
The sensor is a GATT Server that sends CGM measurements to a connected CGMS Collector. The CGMS Sensor stores records that can be accessed with the Record Access Control Point (RACP). The collector can access the features and status of the sensor. Session Run Time and Session Start Time can be used to convey timing information between the sensor and the collector. The Specific Operations Control Point is used to stop and start monitoring sessions, among other things.
Configuration
Set the CONFIG_BLE_CGMS Kconfig option to enable the service.
The CGMS service can be configured by using the following Kconfig options:
CONFIG_BLE_CGMS_DB_RECORDS_MAX- Sets the maximum number of records that can be stored in the database.
Initialization
The service instance is declared using the BLE_CGMS_DEF macro, specifying the name of the instance.
The service is initialized by calling the ble_cgms_init() function.
See the ble_cgms_config struct for configuration details, in addition to the CGMS specification.
Usage
Events from the service are forwarded through the event handler specified during initialization.
For a full list of events see the ble_cgms_evt_type enum.
The ble_cgms_conn_handle_assign() must be called to assign a connection handle to a CGMS instance.
The application can report a new measurement to the CGMS module by calling the ble_cgms_meas_create() function.
The new measurement is recorded in the RACP database.
The application can call the ble_cgms_update_status() function to update the CGM status characteristic value.
The ble_cgms_srt_set() function allows the application to set the Session Run Time characteristic value.
Dependencies
This service has the following Bare Metal dependencies:
SoftDevice (peripheral role) -
CONFIG_SOFTDEVICE_PERIPHERALSoftDevice handler (Bluetooth LE) -
CONFIG_NRF_SDH_BLERecord Access Control Point -
CONFIG_BLE_RACP
API documentation
include/bm/bluetooth/services/ble_cgms.hsubsys/bluetooth/services/ble_cgms/