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;
|
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;
|
2018-04-09 19:52:01 +02:00
|
|
|
import info.nightscout.androidaps.data.Profile;
|
2017-05-22 20:58:05 +02:00
|
|
|
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;
|
2017-05-22 20:58:05 +02:00
|
|
|
import info.nightscout.androidaps.db.TemporaryBasal;
|
2018-04-05 09:39:18 +02:00
|
|
|
import info.nightscout.androidaps.plugins.Treatments.Treatment;
|
2017-07-15 11:19:27 +02:00
|
|
|
import info.nightscout.androidaps.data.Intervals;
|
2017-06-02 12:27:21 +02:00
|
|
|
import info.nightscout.androidaps.data.ProfileIntervals;
|
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();
|
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
|
|
|
|
2017-05-26 15:33:42 +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
|
|
|
|
2017-05-26 15:33:42 +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
|
|
|
|
|
|
|
// basal that can be faked by extended boluses
|
2017-05-12 21:07:29 +02:00
|
|
|
boolean isTempBasalInProgress();
|
2017-05-26 15:33:42 +02:00
|
|
|
TemporaryBasal getTempBasalFromHistory(long time);
|
2017-07-15 11:19:27 +02:00
|
|
|
Intervals<TemporaryBasal> getTemporaryBasalsFromHistory();
|
2017-05-26 15:33:42 +02:00
|
|
|
|
|
|
|
boolean isInHistoryExtendedBoluslInProgress();
|
|
|
|
ExtendedBolus getExtendedBolusFromHistory(long time);
|
2017-07-15 11:19:27 +02:00
|
|
|
Intervals<ExtendedBolus> getExtendedBolusesFromHistory();
|
2017-05-26 15:33:42 +02:00
|
|
|
|
2017-06-08 18:15:17 +02:00
|
|
|
boolean addToHistoryExtendedBolus(ExtendedBolus extendedBolus);
|
|
|
|
|
2017-06-07 00:11:33 +02:00
|
|
|
boolean addToHistoryTreatment(DetailedBolusInfo detailedBolusInfo);
|
2017-05-29 13:07:58 +02:00
|
|
|
|
2017-09-09 15:34:00 +02:00
|
|
|
TempTarget getTempTargetFromHistory();
|
2017-05-26 15:33:42 +02:00
|
|
|
TempTarget getTempTargetFromHistory(long time);
|
2017-07-15 11:19:27 +02:00
|
|
|
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);
|
|
|
|
ProfileIntervals<ProfileSwitch> getProfileSwitchesFromHistory();
|
|
|
|
void addToHistoryProfileSwitch(ProfileSwitch profileSwitch);
|
|
|
|
|
|
|
|
long oldestDataAvailable();
|
2017-05-12 16:27:33 +02:00
|
|
|
|
2016-06-14 23:45:55 +02:00
|
|
|
}
|