Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public final class GlucoseRecordFilter
- Object
- GlucoseRecordFilter
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 types
enum GlucoseRecordFilter.Kind | What a filter selects on. |
Methods
public static GlucoseRecordFilter all() | Every stored record. |
public static GlucoseRecordFilter sinceSequence(int sequenceNumber) | Records at or after sequenceNumber. |
public static GlucoseRecordFilter sequenceRange(int from, int to) | Records with sequence numbers in [from, to]. |
public static GlucoseRecordFilter last() | The most recent record only. |
public static GlucoseRecordFilter first() | The oldest record only. |
public GlucoseRecordFilter.Kind getKind() | What this filter selects on. |
public int getFromSequence() | The lower sequence bound, for the sequence-based kinds. |
public int getToSequence() | The upper sequence bound, for Kind.SEQUENCE_RANGE. |
Inherited methods
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
Kind.SEQUENCE_RANGE.