Merge pull request #455 from jotomo/meallink+interface-iteration
Iterate on PumpInterface/PumpSync documentation.
This commit is contained in:
commit
9f66f88832
2 changed files with 19 additions and 0 deletions
|
@ -12,6 +12,9 @@ import info.nightscout.androidaps.utils.TimeChangeType
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* This interface defines the communication from AAPS-core to pump drivers.
|
||||||
|
* Pump drivers communicate data changes back to AAPS-core using {@link info.nightscout.androidaps.interfaces.PumpSync}.
|
||||||
|
*
|
||||||
* Created by mike on 04.06.2016.
|
* Created by mike on 04.06.2016.
|
||||||
*/
|
*/
|
||||||
interface PumpInterface {
|
interface PumpInterface {
|
||||||
|
|
|
@ -3,6 +3,22 @@ package info.nightscout.androidaps.interfaces
|
||||||
import info.nightscout.androidaps.data.DetailedBolusInfo
|
import info.nightscout.androidaps.data.DetailedBolusInfo
|
||||||
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType
|
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This interface allows pump drivers to push data changes (creation and update of treatments) back to AAPS-core.
|
||||||
|
*
|
||||||
|
* Intended use cases for handling bolus treatments:
|
||||||
|
*
|
||||||
|
* - for pumps that have a reliable history that can be read and which therefore issue a bolus on the pump,
|
||||||
|
* read the history back and add new bolus entries on the pump, the method [syncBolusWithPumpId]
|
||||||
|
* are used to inform AAPS-core of a new bolus.
|
||||||
|
* [VirtualPumpPlugin](info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin) is a pump driver that
|
||||||
|
* takes this approach.
|
||||||
|
* - for pumps that don't support history or take rather long to complete a bolus, the methods
|
||||||
|
* [addBolusWithTempId] and [syncBolusWithTempId] provide a mechanism to notify AAPS-core of a started
|
||||||
|
* bolus, so AAPS-core can operate under the assumption the bolus will be delivered and effect IOB until delivery
|
||||||
|
* completed. Upon completion, the pump driver will call the second method to turn a temporary bolus into a finished
|
||||||
|
* bolus.
|
||||||
|
*/
|
||||||
interface PumpSync {
|
interface PumpSync {
|
||||||
/**
|
/**
|
||||||
* Create bolus with temporary id
|
* Create bolus with temporary id
|
||||||
|
|
Loading…
Reference in a new issue