Provide manufacter, model, SN for pump

This commit is contained in:
Milos Kozak 2019-06-08 22:39:26 +02:00
parent edb4844b7a
commit d2e7cc9041
9 changed files with 79 additions and 9 deletions

View file

@ -1312,10 +1312,20 @@ public class ComboPlugin extends PluginBase implements PumpInterface, Constraint
}
@Override
public String deviceID() {
public String manufacter() {
return "Roche";
}
@Override
public String model() {
return "Combo";
}
@Override
public String serialNumber() {
return "Unknown";
}
@Override
public PumpDescription getPumpDescription() {
return pumpDescription;

View file

@ -376,7 +376,12 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
}
@Override
public String deviceID() {
public String manufacter() {
return "SOOIL";
};
@Override
public String serialNumber() {
return DanaRPump.getInstance().serialNumber;
}

View file

@ -360,6 +360,11 @@ public class DanaRPlugin extends AbstractDanaRPlugin {
return result;
}
@Override
public String model() {
return "DanaR";
}
private PumpEnactResult cancelRealTempBasal() {
PumpEnactResult result = new PumpEnactResult();
TemporaryBasal runningTB = TreatmentsPlugin.getPlugin().getTempBasalFromHistory(System.currentTimeMillis());

View file

@ -364,6 +364,11 @@ public class DanaRKoreanPlugin extends AbstractDanaRPlugin {
return result;
}
@Override
public String model() {
return "DanaRKorean";
}
private PumpEnactResult cancelRealTempBasal() {
PumpEnactResult result = new PumpEnactResult();
TemporaryBasal runningTB = TreatmentsPlugin.getPlugin().getTempBasalFromHistory(System.currentTimeMillis());

View file

@ -769,7 +769,17 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
}
@Override
public String deviceID() {
public String manufacter() {
return "SOOIL";
}
@Override
public String model() {
return "DanaRS";
}
@Override
public String serialNumber() {
return DanaRPump.getInstance().serialNumber;
}

View file

@ -402,6 +402,11 @@ public class DanaRv2Plugin extends AbstractDanaRPlugin {
}
}
@Override
public String model() {
return "DanaRv2";
}
@Override
public PumpEnactResult loadEvents() {
return sExecutionService.loadEvents();

View file

@ -945,9 +945,19 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
}
@Override
public String deviceID() {
if (connectionService == null || alertService == null) return null;
return connectionService.getPumpSystemIdentification().getSerialNumber();
public String manufacter() {
return "Roche";
}
@Override
public String model() {
return "Insight";
}
@Override
public String serialNumber() {
if (connectionService == null || alertService == null) return "Unknown";
return connectionService.getPumpSystemIdentification().getSerialNumber();
}
public PumpEnactResult stopPump() {

View file

@ -236,10 +236,20 @@ public class MDIPlugin extends PluginBase implements PumpInterface {
}
@Override
public String deviceID() {
public String manufacter() {
return "AndroidAPS";
}
@Override
public String model() {
return "MDI";
}
@Override
public String serialNumber() {
return "Unknown";
}
@Override
public PumpDescription getPumpDescription() {
return pumpDescription;
@ -247,7 +257,7 @@ public class MDIPlugin extends PluginBase implements PumpInterface {
@Override
public String shortStatus(boolean veryShort) {
return deviceID();
return model();
}
@Override

View file

@ -437,10 +437,20 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
}
@Override
public String deviceID() {
public String manufacter() {
return "AndroidAPS";
}
@Override
public String model() {
return "VirtualPump";
}
@Override
public String serialNumber() {
return "Unknown";
}
@Override
public PumpDescription getPumpDescription() {
return pumpDescription;