Merge pull request #454 from jotomo/meallink+pumpinterface-contract

Document PumpInterface.deliverTreatment contract.
This commit is contained in:
Milos Kozak 2021-03-31 21:56:29 +02:00 committed by GitHub
commit 6af1beeea5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,6 +38,12 @@ interface PumpInterface {
val reservoirLevel: Double val reservoirLevel: Double
val batteryLevel: Int // in percent as integer 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 deliverTreatment(detailedBolusInfo: DetailedBolusInfo): PumpEnactResult
fun stopBolusDelivering() fun stopBolusDelivering()
fun setTempBasalAbsolute(absoluteRate: Double, durationInMinutes: Int, profile: Profile, enforceNew: Boolean): PumpEnactResult fun setTempBasalAbsolute(absoluteRate: Double, durationInMinutes: Int, profile: Profile, enforceNew: Boolean): PumpEnactResult