Class HealthSensorProfile
java.lang.Object
com.codename1.health.sensors.HealthSensorProfile
A standard Bluetooth SIG health sensor profile -- the service a device advertises and the measurements it produces.
These are the adopted profiles, so any conforming device works without
per-vendor code: a heart-rate strap from any manufacturer speaks
0x180D.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HealthSensorProfileBlood Pressure, service0x1810.static final HealthSensorProfileCycling Power, service0x1818.static final HealthSensorProfileCycling Speed and Cadence, service0x1816.static final HealthSensorProfileGlucose, service0x1808.static final HealthSensorProfileHealth Thermometer, service0x1809.static final HealthSensorProfileHeart Rate, service0x180D.static final HealthSensorProfileRunning Speed and Cadence, service0x1814.static final HealthSensorProfileWeight Scale, service0x181D. -
Method Summary
Modifier and TypeMethodDescriptionThe characteristic carrying this profile's measurements.getName()The profile's human-readable name.The health data types a session with this profile can produce.The GATT service UUID a conforming device advertises.booleantruefor profiles that notify continuously -- heart rate, power, cadence.toString()Returns a string representation of the object.static List<HealthSensorProfile> values()Every profile this framework understands.
-
Field Details
-
HEART_RATE
Heart Rate, service0x180D. Streams heart rate and, on most straps, RR intervals for heart-rate variability. -
CYCLING_POWER
Cycling Power, service0x1818. Streams power and, when the meter reports crank data, cadence. -
CYCLING_SPEED_CADENCE
Cycling Speed and Cadence, service0x1816. Streams derived speed and cadence -- the raw characteristic carries cumulative counters, whichSensorSessiondifferences for you. -
RUNNING_SPEED_CADENCE
Running Speed and Cadence, service0x1814. Streams speed and step cadence from a foot pod. -
HEALTH_THERMOMETER
Health Thermometer, service0x1809. Reports one measurement at a time rather than streaming. -
WEIGHT_SCALE
Weight Scale, service0x181D. Reports one measurement per weighing. -
BLOOD_PRESSURE
Blood Pressure, service0x1810. Reports one measurement per inflation cycle. -
GLUCOSE
Glucose, service0x1808. Reports a measurement when the user tests, and can replay stored records -- seeSensorSession.requestStoredRecords(GlucoseRecordFilter).
-
-
Method Details
-
getName
The profile's human-readable name. -
getServiceUuid
The GATT service UUID a conforming device advertises. -
getMeasurementUuid
The characteristic carrying this profile's measurements. -
getProducedTypes
The health data types a session with this profile can produce. -
isStreaming
public boolean isStreaming()truefor profiles that notify continuously -- heart rate, power, cadence.falsefor episodic ones that report a single reading per measurement, such as a scale or a blood-pressure cuff.Worth branching on in UI: a streaming sensor should show a live value, while an episodic one should show "waiting for a measurement" until the user actually takes one.
-
values
Every profile this framework understands. -
toString
Description copied from class:ObjectReturns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method. The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of: getClass().getName() + '@' + Integer.toHexString(hashCode())
-