2016-06-14 23:45:55 +02:00
|
|
|
package info.nightscout.androidaps.interfaces;
|
|
|
|
|
2016-07-17 15:04:33 +02:00
|
|
|
import java.util.List;
|
|
|
|
|
2017-05-22 20:58:05 +02:00
|
|
|
import info.nightscout.androidaps.data.IobTotal;
|
2017-01-04 22:47:21 +01:00
|
|
|
import info.nightscout.androidaps.data.MealData;
|
2017-05-22 20:58:05 +02:00
|
|
|
import info.nightscout.androidaps.db.ExtendedBolus;
|
|
|
|
import info.nightscout.androidaps.db.TemporaryBasal;
|
2016-07-17 15:04:33 +02:00
|
|
|
import info.nightscout.androidaps.db.Treatment;
|
2017-05-22 20:58:05 +02:00
|
|
|
import info.nightscout.utils.OverlappingIntervals;
|
2016-06-14 23:45:55 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Created by mike on 14.06.2016.
|
|
|
|
*/
|
|
|
|
public interface TreatmentsInterface {
|
2016-06-19 13:17:16 +02:00
|
|
|
|
2017-05-11 18:54:50 +02:00
|
|
|
void updateTotalIOBTreatments();
|
2017-05-12 16:27:33 +02:00
|
|
|
void updateTotalIOBTempBasals();
|
|
|
|
|
2017-05-11 18:54:50 +02:00
|
|
|
IobTotal getLastCalculationTreatments();
|
|
|
|
IobTotal getCalculationToTimeTreatments(long time);
|
2017-05-12 16:27:33 +02:00
|
|
|
IobTotal getLastCalculationTempBasals();
|
|
|
|
IobTotal getCalculationToTimeTempBasals(long time);
|
|
|
|
|
2017-01-04 22:47:21 +01:00
|
|
|
MealData getMealData();
|
2017-05-12 16:27:33 +02:00
|
|
|
|
2016-07-17 15:04:33 +02:00
|
|
|
List<Treatment> getTreatments();
|
2017-04-26 23:45:40 +02:00
|
|
|
List<Treatment> getTreatments5MinBack(long time);
|
2017-05-12 16:27:33 +02:00
|
|
|
|
2017-05-16 09:46:09 +02:00
|
|
|
// real basals on pump
|
|
|
|
boolean isRealTempBasalInProgress();
|
2017-05-22 20:58:05 +02:00
|
|
|
TemporaryBasal getRealTempBasal (long time);
|
2017-05-16 09:46:09 +02:00
|
|
|
|
2017-05-22 20:58:05 +02:00
|
|
|
void tempBasalStart(TemporaryBasal tempBasal);
|
2017-05-16 09:46:09 +02:00
|
|
|
void tempBasalStop(long time);
|
|
|
|
|
|
|
|
// basal that can be faked by extended boluses
|
2017-05-12 21:07:29 +02:00
|
|
|
boolean isTempBasalInProgress();
|
2017-05-22 20:58:05 +02:00
|
|
|
TemporaryBasal getTempBasal (long time);
|
2017-05-12 21:21:31 +02:00
|
|
|
double getTempBasalAbsoluteRate();
|
|
|
|
double getTempBasalRemainingMinutes();
|
2017-05-22 20:58:05 +02:00
|
|
|
OverlappingIntervals<TemporaryBasal> getTemporaryBasals();
|
2017-05-12 21:21:31 +02:00
|
|
|
|
|
|
|
boolean isExtendedBoluslInProgress();
|
2017-05-22 20:58:05 +02:00
|
|
|
ExtendedBolus getExtendedBolus (long time);
|
|
|
|
void extendedBolusStart(ExtendedBolus extendedBolus);
|
2017-05-15 18:44:40 +02:00
|
|
|
void extendedBolusStop(long time);
|
2017-05-22 20:58:05 +02:00
|
|
|
OverlappingIntervals<ExtendedBolus> getExtendedBoluses();
|
2017-05-12 16:27:33 +02:00
|
|
|
|
|
|
|
long oldestDataAvaialable();
|
|
|
|
|
2016-06-14 23:45:55 +02:00
|
|
|
}
|