Search in sources :

Example 1 with Warning36TBRCancelled

use of sugar.free.sightparser.applayer.descriptors.alerts.Warning36TBRCancelled in project SightRemote by TebbeUbben.

the class AlertActivity method setAlertDescription.

private void setAlertDescription() {
    Alert alert = alertMessage.getAlert();
    if (alert instanceof Reminder1DeliverBolus)
        alertDescription.setText(R.string.alert_r1_description);
    else if (alert instanceof Reminder2MissedBolus)
        alertDescription.setText(R.string.alert_r2_description);
    else if (alert instanceof Reminder3AlarmClock)
        alertDescription.setText(R.string.alert_r3_description);
    else if (alert instanceof Reminder4ChangeInfusionSet)
        alertDescription.setText(R.string.alert_r4_description);
    else if (alert instanceof Reminder7TBRCompleted) {
        Reminder7TBRCompleted tbrCompleted = (Reminder7TBRCompleted) alert;
        alertDescription.setText(HTMLUtil.getHTML(R.string.alert_r7_description, tbrCompleted.getAmount(), UnitFormatter.formatDuration(tbrCompleted.getDuration())));
    } else if (alert instanceof Warning31CartridgeLow) {
        Warning31CartridgeLow cartridgeLow = (Warning31CartridgeLow) alert;
        alertDescription.setText(HTMLUtil.getHTML(R.string.alert_w31_description, UnitFormatter.formatUnits(cartridgeLow.getCartridgeAmount())));
    } else if (alert instanceof Warning32BatteryLow)
        alertDescription.setText(R.string.alert_w32_description);
    else if (alert instanceof Warning33InvalidDateTime)
        alertDescription.setText(R.string.alert_w33_description);
    else if (alert instanceof Warning34EndOfWarranty)
        alertDescription.setText(R.string.alert_w34_description);
    else if (alert instanceof Warning36TBRCancelled) {
        Warning36TBRCancelled tbrCancelled = (Warning36TBRCancelled) alert;
        alertDescription.setText(HTMLUtil.getHTML(R.string.alert_w36_description, tbrCancelled.getAmount(), UnitFormatter.formatDuration(tbrCancelled.getDuration())));
    } else if (alert instanceof Warning38BolusCancelled) {
        Warning38BolusCancelled bolusCancelled = (Warning38BolusCancelled) alert;
        alertDescription.setText(HTMLUtil.getHTML(R.string.alert_w38_description, UnitFormatter.formatUnits(bolusCancelled.getProgrammedAmount()), UnitFormatter.formatUnits(bolusCancelled.getDeliveredAmount())));
    } else if (alert instanceof Warning39LoantimeWarning)
        alertDescription.setText(R.string.alert_w39_description);
    else if (alert instanceof Maintenance20CartridgeNotInserted)
        alertDescription.setText(R.string.alert_m20_description);
    else if (alert instanceof Maintenance21CartridgeEmpty)
        alertDescription.setText(R.string.alert_m21_description);
    else if (alert instanceof Maintenance22BatteryEmpty)
        alertDescription.setText(R.string.alert_m22_description);
    else if (alert instanceof Maintenance23AutomaticOff)
        alertDescription.setText(R.string.alert_m23_description);
    else if (alert instanceof Maintenance24Occlusion)
        alertDescription.setText(R.string.alert_m24_description);
    else if (alert instanceof Maintenance25LoantimeOver)
        alertDescription.setText(R.string.alert_m25_description);
    else if (alert instanceof Maintenance26CartridgeChangeNotCompleted)
        alertDescription.setText(R.string.alert_m26_description);
    else if (alert instanceof Maintenance27DataDownloadFailed)
        alertDescription.setText(R.string.alert_m27_description);
    else if (alert instanceof Maintenance28PauseModeTimeout)
        alertDescription.setText(R.string.alert_m28_description);
    else if (alert instanceof Maintenance29BatteryTypeNotSet)
        alertDescription.setText(R.string.alert_m29_description);
    else if (alert instanceof Maintenance30CartridgeTypeNotSet)
        alertDescription.setText(R.string.alert_m30_description);
    else if (alert instanceof Error6MechanicalError)
        alertDescription.setText(R.string.alert_e6_description);
    else if (alert instanceof Error10RewindError)
        alertDescription.setText(R.string.alert_e10_description);
    else if (alert instanceof Error13LanguageError)
        alertDescription.setText(R.string.alert_e13_description);
}
Also used : Maintenance20CartridgeNotInserted(sugar.free.sightparser.applayer.descriptors.alerts.Maintenance20CartridgeNotInserted) Warning38BolusCancelled(sugar.free.sightparser.applayer.descriptors.alerts.Warning38BolusCancelled) Warning34EndOfWarranty(sugar.free.sightparser.applayer.descriptors.alerts.Warning34EndOfWarranty) Maintenance25LoantimeOver(sugar.free.sightparser.applayer.descriptors.alerts.Maintenance25LoantimeOver) Warning33InvalidDateTime(sugar.free.sightparser.applayer.descriptors.alerts.Warning33InvalidDateTime) Warning31CartridgeLow(sugar.free.sightparser.applayer.descriptors.alerts.Warning31CartridgeLow) Maintenance22BatteryEmpty(sugar.free.sightparser.applayer.descriptors.alerts.Maintenance22BatteryEmpty) Maintenance23AutomaticOff(sugar.free.sightparser.applayer.descriptors.alerts.Maintenance23AutomaticOff) Maintenance21CartridgeEmpty(sugar.free.sightparser.applayer.descriptors.alerts.Maintenance21CartridgeEmpty) Warning36TBRCancelled(sugar.free.sightparser.applayer.descriptors.alerts.Warning36TBRCancelled) Maintenance24Occlusion(sugar.free.sightparser.applayer.descriptors.alerts.Maintenance24Occlusion) Warning32BatteryLow(sugar.free.sightparser.applayer.descriptors.alerts.Warning32BatteryLow) Maintenance26CartridgeChangeNotCompleted(sugar.free.sightparser.applayer.descriptors.alerts.Maintenance26CartridgeChangeNotCompleted) Reminder1DeliverBolus(sugar.free.sightparser.applayer.descriptors.alerts.Reminder1DeliverBolus) Reminder2MissedBolus(sugar.free.sightparser.applayer.descriptors.alerts.Reminder2MissedBolus) Reminder4ChangeInfusionSet(sugar.free.sightparser.applayer.descriptors.alerts.Reminder4ChangeInfusionSet) Warning39LoantimeWarning(sugar.free.sightparser.applayer.descriptors.alerts.Warning39LoantimeWarning) Error10RewindError(sugar.free.sightparser.applayer.descriptors.alerts.Error10RewindError) Reminder7TBRCompleted(sugar.free.sightparser.applayer.descriptors.alerts.Reminder7TBRCompleted) Maintenance28PauseModeTimeout(sugar.free.sightparser.applayer.descriptors.alerts.Maintenance28PauseModeTimeout) Maintenance29BatteryTypeNotSet(sugar.free.sightparser.applayer.descriptors.alerts.Maintenance29BatteryTypeNotSet) Maintenance30CartridgeTypeNotSet(sugar.free.sightparser.applayer.descriptors.alerts.Maintenance30CartridgeTypeNotSet) Reminder3AlarmClock(sugar.free.sightparser.applayer.descriptors.alerts.Reminder3AlarmClock) Maintenance27DataDownloadFailed(sugar.free.sightparser.applayer.descriptors.alerts.Maintenance27DataDownloadFailed) Error6MechanicalError(sugar.free.sightparser.applayer.descriptors.alerts.Error6MechanicalError) Alert(sugar.free.sightparser.applayer.descriptors.alerts.Alert) Error13LanguageError(sugar.free.sightparser.applayer.descriptors.alerts.Error13LanguageError)

Aggregations

Alert (sugar.free.sightparser.applayer.descriptors.alerts.Alert)1 Error10RewindError (sugar.free.sightparser.applayer.descriptors.alerts.Error10RewindError)1 Error13LanguageError (sugar.free.sightparser.applayer.descriptors.alerts.Error13LanguageError)1 Error6MechanicalError (sugar.free.sightparser.applayer.descriptors.alerts.Error6MechanicalError)1 Maintenance20CartridgeNotInserted (sugar.free.sightparser.applayer.descriptors.alerts.Maintenance20CartridgeNotInserted)1 Maintenance21CartridgeEmpty (sugar.free.sightparser.applayer.descriptors.alerts.Maintenance21CartridgeEmpty)1 Maintenance22BatteryEmpty (sugar.free.sightparser.applayer.descriptors.alerts.Maintenance22BatteryEmpty)1 Maintenance23AutomaticOff (sugar.free.sightparser.applayer.descriptors.alerts.Maintenance23AutomaticOff)1 Maintenance24Occlusion (sugar.free.sightparser.applayer.descriptors.alerts.Maintenance24Occlusion)1 Maintenance25LoantimeOver (sugar.free.sightparser.applayer.descriptors.alerts.Maintenance25LoantimeOver)1 Maintenance26CartridgeChangeNotCompleted (sugar.free.sightparser.applayer.descriptors.alerts.Maintenance26CartridgeChangeNotCompleted)1 Maintenance27DataDownloadFailed (sugar.free.sightparser.applayer.descriptors.alerts.Maintenance27DataDownloadFailed)1 Maintenance28PauseModeTimeout (sugar.free.sightparser.applayer.descriptors.alerts.Maintenance28PauseModeTimeout)1 Maintenance29BatteryTypeNotSet (sugar.free.sightparser.applayer.descriptors.alerts.Maintenance29BatteryTypeNotSet)1 Maintenance30CartridgeTypeNotSet (sugar.free.sightparser.applayer.descriptors.alerts.Maintenance30CartridgeTypeNotSet)1 Reminder1DeliverBolus (sugar.free.sightparser.applayer.descriptors.alerts.Reminder1DeliverBolus)1 Reminder2MissedBolus (sugar.free.sightparser.applayer.descriptors.alerts.Reminder2MissedBolus)1 Reminder3AlarmClock (sugar.free.sightparser.applayer.descriptors.alerts.Reminder3AlarmClock)1 Reminder4ChangeInfusionSet (sugar.free.sightparser.applayer.descriptors.alerts.Reminder4ChangeInfusionSet)1 Reminder7TBRCompleted (sugar.free.sightparser.applayer.descriptors.alerts.Reminder7TBRCompleted)1