Package 

Interface ContinuousGlucoseMeasurementCallback

  • All Implemented Interfaces:
    no.nordicsemi.android.ble.common.profile.cgm.CGMTypes , no.nordicsemi.android.ble.common.profile.glucose.GlucoseTypes

    
    public interface ContinuousGlucoseMeasurementCallback
     implements CGMTypes
                        
    • Method Detail

      • onContinuousGlucoseMeasurementReceived

         abstract void onContinuousGlucoseMeasurementReceived(@NonNull() BluetoothDevice device, @FloatRange(from = 0) float glucoseConcentration, @Nullable() Float cgmTrend, @Nullable() Float cgmQuality, @Nullable() CGMTypes.CGMStatus status, @IntRange(from = 0) int timeOffset, boolean secured)

        Callback called when a Continuous Glucose Measurement packet has been received.

        If the E2E CRC field was present in the CGM packet, the data has been verified against it.If CRC check has failed, the onContinuousGlucoseMeasurementReceivedWithCrcError will be called instead.

        The Glucose concentration is reported in mg/dL. To convert it to mmol/L use:

        value [mg/dL] = 18.02 * value [mmol/L]
        or simply call toMgPerDecilitre.

        Note that the conversion factor is compliant to the Continua blood glucose meter specification.

        Parameters:
        device - the target device.
        glucoseConcentration - the glucose concentration in mg/dL.
        cgmTrend - an optional CGM Trend information, in (mg/dL)/min.
        cgmQuality - an optional CGM Quality information in percent.
        status - the status of the measurement.
        timeOffset - the time offset in minutes since Session Start Time.
        secured - true if the packet was sent with E2E-CRC value that was verifiedto match the packet, false if the packet didn't contain CRC field.
      • toMgPerDecilitre

         static float toMgPerDecilitre(float value)

        Converts the value from mmol/L to mg/dL.

        Parameters:
        value - the glucose concentration value in given unit.