AndroidAPS/app/src/main/java/info/nightscout/androidaps/interfaces/TreatmentsInterface.java

114 lines
2.5 KiB
Java
Raw Normal View History

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-29 21:45:59 +02:00
import info.nightscout.androidaps.data.DetailedBolusInfo;
import info.nightscout.androidaps.data.Intervals;
import info.nightscout.androidaps.data.IobTotal;
2017-01-04 22:47:21 +01:00
import info.nightscout.androidaps.data.MealData;
2018-04-09 19:52:01 +02:00
import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.data.ProfileIntervals;
import info.nightscout.androidaps.db.ExtendedBolus;
2017-06-02 10:25:49 +02:00
import info.nightscout.androidaps.db.ProfileSwitch;
2017-05-23 23:56:53 +02:00
import info.nightscout.androidaps.db.TempTarget;
import info.nightscout.androidaps.db.TemporaryBasal;
2019-02-28 23:16:50 +01:00
import info.nightscout.androidaps.plugins.treatments.Treatment;
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();
2017-05-11 18:54:50 +02:00
IobTotal getCalculationToTimeTreatments(long time);
2017-05-12 16:27:33 +02:00
IobTotal getLastCalculationTempBasals();
2018-04-09 19:52:01 +02:00
IobTotal getCalculationToTimeTempBasals(long time, Profile profile);
2017-05-12 16:27:33 +02:00
2017-01-04 22:47:21 +01:00
MealData getMealData();
2017-05-12 16:27:33 +02:00
List<Treatment> getTreatmentsFromHistory();
List<Treatment> getTreatments5MinBackFromHistory(long time);
2017-10-26 22:12:15 +02:00
long getLastBolusTime();
2017-05-12 16:27:33 +02:00
// real basals (not faked by extended bolus)
boolean isInHistoryRealTempBasalInProgress();
TemporaryBasal getRealTempBasalFromHistory(long time);
2017-05-16 09:46:09 +02:00
2017-06-08 18:15:17 +02:00
boolean addToHistoryTempBasal(TemporaryBasal tempBasal);
2017-05-16 09:46:09 +02:00
2017-05-16 09:46:09 +02:00
// basal that can be faked by extended boluses
boolean isTempBasalInProgress();
TemporaryBasal getTempBasalFromHistory(long time);
Intervals<TemporaryBasal> getTemporaryBasalsFromHistory();
boolean isInHistoryExtendedBoluslInProgress();
ExtendedBolus getExtendedBolusFromHistory(long time);
Intervals<ExtendedBolus> getExtendedBolusesFromHistory();
2017-06-08 18:15:17 +02:00
boolean addToHistoryExtendedBolus(ExtendedBolus extendedBolus);
boolean addToHistoryTreatment(DetailedBolusInfo detailedBolusInfo, boolean allowUpdate);
TempTarget getTempTargetFromHistory();
TempTarget getTempTargetFromHistory(long time);
Intervals<TempTarget> getTempTargetsFromHistory();
2018-04-12 10:17:59 +02:00
void addToHistoryTempTarget(TempTarget tempTarget);
2017-05-23 23:56:53 +02:00
2017-06-02 10:25:49 +02:00
ProfileSwitch getProfileSwitchFromHistory(long time);
2017-06-02 10:25:49 +02:00
ProfileIntervals<ProfileSwitch> getProfileSwitchesFromHistory();
2017-06-02 10:25:49 +02:00
void addToHistoryProfileSwitch(ProfileSwitch profileSwitch);
2017-06-02 10:25:49 +02:00
long oldestDataAvailable();
2017-05-12 16:27:33 +02:00
List<Treatment> getTreatmentsFromHistoryXMinutesAgo(int minutesAgo);
2016-06-14 23:45:55 +02:00
}