Class GlucoseRecordFilter
java.lang.Object
com.codename1.health.sensors.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 Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic GlucoseRecordFilterall()Every stored record.static GlucoseRecordFilterfirst()The oldest record only.intThe lower sequence bound, for the sequence-based kinds.getKind()What this filter selects on.intThe upper sequence bound, forGlucoseRecordFilter.Kind.SEQUENCE_RANGE.static GlucoseRecordFilterlast()The most recent record only.static GlucoseRecordFiltersequenceRange(int from, int to) Records with sequence numbers in[from, to].static GlucoseRecordFiltersinceSequence(int sequenceNumber) Records at or aftersequenceNumber.
-
Method Details
-
all
Every stored record. On a meter that has been in use for months this can be several hundred notifications, so prefersinceSequence(int)once you have seen a record before. -
sinceSequence
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
Records with sequence numbers in[from, to]. -
last
The most recent record only. -
first
The oldest record only. -
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, forGlucoseRecordFilter.Kind.SEQUENCE_RANGE.
-