From f4a76a1e24377dc5a8f966a6795fda234cc4ce53 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Wed, 31 Mar 2021 20:35:37 +0200 Subject: [PATCH] Document PumpInterface.deliverTreatment contract. --- .../info/nightscout/androidaps/interfaces/PumpInterface.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/main/java/info/nightscout/androidaps/interfaces/PumpInterface.kt b/core/src/main/java/info/nightscout/androidaps/interfaces/PumpInterface.kt index a57003433a..602acf6bba 100644 --- a/core/src/main/java/info/nightscout/androidaps/interfaces/PumpInterface.kt +++ b/core/src/main/java/info/nightscout/androidaps/interfaces/PumpInterface.kt @@ -38,6 +38,12 @@ interface PumpInterface { val reservoirLevel: Double val batteryLevel: Int // in percent as integer + /** + * Request a bolus to be delivered, carbs to be stored on pump or both. + * + * @param detailedBolusInfo it's the caller's responsibility to ensure the request can be satisfied by the pump, + * e.g. DBI will not contain carbs if the pump can't store carbs. + */ fun deliverTreatment(detailedBolusInfo: DetailedBolusInfo): PumpEnactResult fun stopBolusDelivering() fun setTempBasalAbsolute(absoluteRate: Double, durationInMinutes: Int, profile: Profile, enforceNew: Boolean): PumpEnactResult