# Class GlucoseRecordFilter

java.lang.Object
com.codename1.health.sensors.GlucoseRecordFilter

public final class GlucoseRecordFilter extends Object

Selects which stored records a glucose meter should replay, for `SensorSession.requestStoredRecords(GlucoseRecordFilter)`.

Glucose meters keep hundreds of readings and hand them over only on request, through the Record Access Control Point (`0x2A52`) -- a small request/response protocol layered on top of GATT. This class is the portable description of such a request; the session drives the protocol and delivers each retrieved record through the normal sample listener.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `GlucoseRecordFilter.Kind`
  What a filter selects on.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static GlucoseRecordFilter`
  `all()`
  Every stored record.
  `static GlucoseRecordFilter`
  `first()`
  The oldest record only.
  `int`
  `getFromSequence()`
  The lower sequence bound, for the sequence-based kinds.
  `GlucoseRecordFilter.Kind`
  `getKind()`
  What this filter selects on.
  `int`
  `getToSequence()`
  The upper sequence bound, for `GlucoseRecordFilter.Kind.SEQUENCE_RANGE`.
  `static GlucoseRecordFilter`
  `last()`
  The most recent record only.
  `static GlucoseRecordFilter`
  `sequenceRange(int from, int to)`
  Records with sequence numbers in `[from, to]`.
  `static GlucoseRecordFilter`
  `sinceSequence(int sequenceNumber)`
  Records at or after `sequenceNumber`.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### all

    public static GlucoseRecordFilter all()
    Every stored record. On a meter that has been in use for months this can be several hundred notifications, so prefer `sinceSequence(int)` once you have seen a record before.

  - ### sinceSequence

    public static GlucoseRecordFilter sinceSequence(int sequenceNumber)

    Records at or after `sequenceNumber`.

    This is the incremental-sync filter: remember the highest `GlucoseMeasurement.getSequenceNumber()` you have stored and ask for everything after it.

  - ### sequenceRange

    public static GlucoseRecordFilter sequenceRange(int from, int to)
    Records with sequence numbers in `[from, to]`.

  - ### last

    public static GlucoseRecordFilter last()
    The most recent record only.

  - ### first

    public static GlucoseRecordFilter first()
    The oldest record only.

  - ### getKind

    public GlucoseRecordFilter.Kind getKind()
    What this filter selects on.

  - ### getFromSequence

    public int getFromSequence()
    The lower sequence bound, for the sequence-based kinds.

  - ### getToSequence

    public int getToSequence()
    The upper sequence bound, for `GlucoseRecordFilter.Kind.SEQUENCE_RANGE`.