Add OmnipodDashManager interface
This commit is contained in:
parent
a348cb74e7
commit
f32d605567
3 changed files with 41 additions and 1 deletions
|
@ -1,3 +1,28 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver
|
||||
|
||||
interface OmnipodDashManager
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.BasalProgram
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.event.PodEvent
|
||||
import io.reactivex.Observable
|
||||
|
||||
interface OmnipodDashManager {
|
||||
|
||||
fun activatePodPart1(): Observable<PodEvent>
|
||||
|
||||
fun activatePodPart2(): Observable<PodEvent>
|
||||
|
||||
fun getStatus(): Observable<PodEvent>
|
||||
|
||||
fun setBasalProgram(program: BasalProgram): Observable<PodEvent>
|
||||
|
||||
fun suspendDelivery(): Observable<PodEvent>
|
||||
|
||||
fun setTime(): Observable<PodEvent>
|
||||
|
||||
fun setTempBasal(rate: Double, durationInMinutes: Short): Observable<PodEvent>
|
||||
|
||||
fun cancelTempBasal(): Observable<PodEvent>
|
||||
|
||||
fun bolus(amount: Double): Observable<PodEvent>
|
||||
|
||||
fun cancelBolus(): Observable<PodEvent>
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.event
|
||||
|
||||
class PodEvent(
|
||||
val type: PodEventType,
|
||||
val data: Any?
|
||||
)
|
|
@ -0,0 +1,9 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.event
|
||||
|
||||
enum class PodEventType {
|
||||
CONNECTED,
|
||||
COMMAND_SENDING,
|
||||
COMMAND_SENT,
|
||||
RESPONSE_RECEIVED,
|
||||
// ...
|
||||
}
|
Loading…
Reference in a new issue