Blood Oxygen
Sets blood oxygen listener
_blePlugin.bloodOxygenEveStm.listen(
(BloodOxygenBean event) {
/// Do something with new state,for example:
switch (type) {
case BloodOxygenType.continueState:
_continueState = event.continueState!;
break;
case BloodOxygenType.timingMeasure:
_timingMeasure = event.timingMeasure!;
break;
case BloodOxygenType.bloodOxygen:
_bloodOxygen = event.bloodOxygen!;
break;
case BloodOxygenType.historyList:
_historyList = event.historyList!;
break;
case BloodOxygenType.continueBO:
_continueBo = event.continueBo!;
startTime = _continueBo!.startTime!;
timeInterval = _continueBo!.timeInterval!;
break;
default:
break;
}
});
Callback Description:
BloodOxygenBean:
callback value | callback value type | callback value description |
---|---|---|
type | int | Get the corresponding return value according to type, where type is the value corresponding to BloodOxygenType |
continueState | bool | Timed blood oxygen status |
timingMeasure | int | Timed oximetry status |
bloodOxygen | int | Measure blood oxygen results |
historyList | List< HistoryBloodOxygenBean > | Historical SpO2 information |
continueBO | BloodOxygenInfo | Timed blood oxygen information |
BloodOxygenType:
type | value | value description |
---|---|---|
continueState | 1 | Gets continue blood oxygen state |
timingMeasure | 2 | Gets timing measurement of blood oxygen status |
bloodOxygen | 3 | Gets blood oxygen measurement results |
historyList | 4 | Gets history once blood oxygen |
continueBO | 5 | Gets timing blood oxygen |
HistoryBloodOxygenBean:
callback value | callback value type | callback value description |
---|---|---|
date | String | date |
bo | int | blood oxygen |
BloodOxygenInfo:
callback value | callback value type | callback value description |
---|---|---|
startTime | int | Start measuring time |
timeInterval | int | time interval |
Measuring blood oxygen
_blePlugin.startMeasureBloodOxygen;
Stop measuring blood oxygen
When the blood oxygen measurement is stopped, if the measurement time is too short, there will be no measurement results.
The measurement results are monitored through the bloodOxygenEveStm data stream, and the value is stored in BloodOxygenBean.bloodOxygen,type is bloodOxygen.
_blePlugin.stopMeasureBloodOxygen;
Enable timing measure blood oxygen
measure period = interval * 5 (mins)
_blePlugin.enableTimingMeasureBloodOxygen(int interval);
Disable timing measure blood oxygen
_blePlugin.disableTimingMeasureBloodOxygen;
Gets timing measure blood oxygen state
The measurement results are monitored through the bloodOxygenEveStm data stream, and the value is stored in BloodOxygenBean.timingMeasure,type is timingMeasure.
_blePlugin.queryTimingBloodOxygenMeasureState;
Gets timing blood oxygen
The measurement results are monitored through the bloodOxygenEveStm data stream, and the value is stored in BloodOxygenBean.continueBO,type is continueBO.
_blePlugin.queryTimingBloodOxygen(BloodOxygenTimeType);
Parameter Description :
BloodOxygenTimeType:
value | value type | value description |
---|---|---|
today | String | today |
yesterday | String | yesterday |
Enable continue blood oxygen
_blePlugin.enableContinueBloodOxygen;
Disable continue blood oxygen
_blePlugin.disableContinueBloodOxygen;
Gets continue blood oxygen state
The measurement results are monitored through the bloodOxygenEveStm data stream, and the value is stored in BloodOxygenBean.continueState,type is continueState.
_blePlugin.queryContinueBloodOxygenState;
Gets last 24 hour blood oxygen
The measurement results are monitored through the bloodOxygenEveStm data stream, and the value is stored in BloodOxygenBean.continueBO,type is continueBO.
_blePlugin.queryLast24HourBloodOxygen;
Gets history once blood oxygen
The measurement results are monitored through the bloodOxygenEveStm data stream, and the value is stored in BloodOxygenBean.historyList,type is historyList.
_blePlugin.queryHistoryBloodOxygen;