2016-06-15 21:47:26 +02:00
|
|
|
package info.nightscout.androidaps.interfaces;
|
|
|
|
|
2018-03-20 22:09:22 +01:00
|
|
|
import info.nightscout.androidaps.data.Profile;
|
|
|
|
|
2016-06-15 21:47:26 +02:00
|
|
|
/**
|
|
|
|
* Created by mike on 15.06.2016.
|
|
|
|
*/
|
2016-06-20 20:45:55 +02:00
|
|
|
public interface ConstraintsInterface {
|
2016-06-19 13:17:16 +02:00
|
|
|
|
2018-06-09 22:07:41 +02:00
|
|
|
default Constraint<Boolean> isLoopInvocationAllowed(Constraint<Boolean> value) {
|
2018-03-22 21:31:32 +01:00
|
|
|
return value;
|
|
|
|
}
|
2016-06-27 18:48:48 +02:00
|
|
|
|
2018-03-22 21:31:32 +01:00
|
|
|
default Constraint<Boolean> isClosedLoopAllowed(Constraint<Boolean> value) {
|
|
|
|
return value;
|
|
|
|
}
|
2016-06-27 18:48:48 +02:00
|
|
|
|
2018-03-22 21:31:32 +01:00
|
|
|
default Constraint<Boolean> isAutosensModeEnabled(Constraint<Boolean> value) {
|
|
|
|
return value;
|
|
|
|
}
|
2016-06-27 18:48:48 +02:00
|
|
|
|
2018-03-22 21:31:32 +01:00
|
|
|
default Constraint<Boolean> isAMAModeEnabled(Constraint<Boolean> value) {
|
|
|
|
return value;
|
|
|
|
}
|
2016-06-27 18:48:48 +02:00
|
|
|
|
2018-03-22 21:31:32 +01:00
|
|
|
default Constraint<Boolean> isSMBModeEnabled(Constraint<Boolean> value) {
|
|
|
|
return value;
|
|
|
|
}
|
2017-12-31 12:24:51 +01:00
|
|
|
|
2018-06-29 22:43:54 +02:00
|
|
|
default Constraint<Boolean> isAdvancedFilteringEnabled(Constraint<Boolean> value) {
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2018-03-22 21:31:32 +01:00
|
|
|
default Constraint<Double> applyBasalConstraints(Constraint<Double> absoluteRate, Profile profile) {
|
|
|
|
return absoluteRate;
|
|
|
|
}
|
2016-06-27 18:48:48 +02:00
|
|
|
|
2018-03-22 21:31:32 +01:00
|
|
|
default Constraint<Integer> applyBasalPercentConstraints(Constraint<Integer> percentRate, Profile profile) {
|
|
|
|
return percentRate;
|
|
|
|
}
|
2016-06-20 21:43:29 +02:00
|
|
|
|
2018-03-22 21:31:32 +01:00
|
|
|
default Constraint<Double> applyBolusConstraints(Constraint<Double> insulin) {
|
|
|
|
return insulin;
|
|
|
|
}
|
2016-06-27 18:48:48 +02:00
|
|
|
|
2018-09-01 22:45:15 +02:00
|
|
|
default Constraint<Double> applyExtendedBolusConstraints(Constraint<Double> insulin) {
|
|
|
|
return insulin;
|
|
|
|
}
|
|
|
|
|
2018-03-22 21:31:32 +01:00
|
|
|
default Constraint<Integer> applyCarbsConstraints(Constraint<Integer> carbs) {
|
|
|
|
return carbs;
|
|
|
|
}
|
2016-06-27 18:48:48 +02:00
|
|
|
|
2018-03-22 21:13:26 +01:00
|
|
|
default Constraint<Double> applyMaxIOBConstraints(Constraint<Double> maxIob) {
|
|
|
|
return maxIob;
|
|
|
|
};
|
2016-06-27 18:48:48 +02:00
|
|
|
|
2016-06-15 21:47:26 +02:00
|
|
|
}
|