Add OmnipodDashManagerImpl
This commit is contained in:
parent
f32d605567
commit
97aac063ee
|
@ -11,6 +11,8 @@ import info.nightscout.androidaps.plugins.common.ManufacturerType
|
||||||
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction
|
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction
|
||||||
import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType
|
import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType
|
||||||
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType
|
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.OmnipodDashManager
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.OmnipodDashOverviewFragment
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.OmnipodDashOverviewFragment
|
||||||
import info.nightscout.androidaps.queue.commands.CustomCommand
|
import info.nightscout.androidaps.queue.commands.CustomCommand
|
||||||
import info.nightscout.androidaps.utils.TimeChangeType
|
import info.nightscout.androidaps.utils.TimeChangeType
|
||||||
|
@ -21,6 +23,8 @@ import javax.inject.Singleton
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
class OmnipodDashPumpPlugin @Inject constructor(
|
class OmnipodDashPumpPlugin @Inject constructor(
|
||||||
|
private val omnipodManager: OmnipodDashManager,
|
||||||
|
private val podStateManager: OmnipodDashPodStateManager,
|
||||||
injector: HasAndroidInjector,
|
injector: HasAndroidInjector,
|
||||||
aapsLogger: AAPSLogger,
|
aapsLogger: AAPSLogger,
|
||||||
resourceHelper: ResourceHelper,
|
resourceHelper: ResourceHelper,
|
||||||
|
|
|
@ -5,6 +5,8 @@ import dagger.Provides
|
||||||
import dagger.android.ContributesAndroidInjector
|
import dagger.android.ContributesAndroidInjector
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.dagger.ActivityScope
|
import info.nightscout.androidaps.plugins.pump.omnipod.common.dagger.ActivityScope
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.dagger.OmnipodWizardModule
|
import info.nightscout.androidaps.plugins.pump.omnipod.common.dagger.OmnipodWizardModule
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.OmnipodDashManager
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.OmnipodDashManagerImpl
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.BleManager
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.BleManager
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.OmnipodDashBleManager
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.OmnipodDashBleManager
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager
|
||||||
|
@ -42,5 +44,8 @@ abstract class OmnipodDashModule {
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
fun providesPodStateManager(podStateManager: OmnipodDashPodStateManagerImpl): OmnipodDashPodStateManager = podStateManager
|
fun providesPodStateManager(podStateManager: OmnipodDashPodStateManagerImpl): OmnipodDashPodStateManager = podStateManager
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
fun providesOmnipodManager(omnipodManager: OmnipodDashManagerImpl): OmnipodDashManager = omnipodManager
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,68 @@
|
||||||
|
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.logging.AAPSLogger
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.OmnipodDashBleManager
|
||||||
|
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 info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager
|
||||||
|
import io.reactivex.Observable
|
||||||
|
import javax.inject.Inject
|
||||||
|
import javax.inject.Singleton
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
class OmnipodDashManagerImpl @Inject constructor(
|
||||||
|
private val aapsLogger: AAPSLogger,
|
||||||
|
private val podStateManager: OmnipodDashPodStateManager,
|
||||||
|
private val bleManager: OmnipodDashBleManager
|
||||||
|
) : OmnipodDashManager {
|
||||||
|
|
||||||
|
override fun activatePodPart1(): Observable<PodEvent> {
|
||||||
|
// TODO
|
||||||
|
return Observable.empty()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun activatePodPart2(): Observable<PodEvent> {
|
||||||
|
// TODO
|
||||||
|
return Observable.empty()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getStatus(): Observable<PodEvent> {
|
||||||
|
// TODO
|
||||||
|
return Observable.empty()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun setBasalProgram(program: BasalProgram): Observable<PodEvent> {
|
||||||
|
// TODO
|
||||||
|
return Observable.empty()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun suspendDelivery(): Observable<PodEvent> {
|
||||||
|
// TODO
|
||||||
|
return Observable.empty()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun setTime(): Observable<PodEvent> {
|
||||||
|
// TODO
|
||||||
|
return Observable.empty()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun setTempBasal(rate: Double, durationInMinutes: Short): Observable<PodEvent> {
|
||||||
|
// TODO
|
||||||
|
return Observable.empty()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun cancelTempBasal(): Observable<PodEvent> {
|
||||||
|
// TODO
|
||||||
|
return Observable.empty()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun bolus(amount: Double): Observable<PodEvent> {
|
||||||
|
// TODO
|
||||||
|
return Observable.empty()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun cancelBolus(): Observable<PodEvent> {
|
||||||
|
// TODO
|
||||||
|
return Observable.empty()
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue