added danar history messages
This commit is contained in:
parent
cd5f9f44a4
commit
1a90746bed
15 changed files with 228 additions and 3 deletions
|
@ -36,6 +36,16 @@ public class MessageHashTable {
|
||||||
put(new MsgOcclusion()); // 0x0601 CMD_PUMPOWAY_SYSTEM_STATUS
|
put(new MsgOcclusion()); // 0x0601 CMD_PUMPOWAY_SYSTEM_STATUS
|
||||||
put(new MsgPCCommStart()); // 0x3001 CMD_CONNECT
|
put(new MsgPCCommStart()); // 0x3001 CMD_CONNECT
|
||||||
put(new MsgPCCommStop()); // 0x3002 CMD_DISCONNECT
|
put(new MsgPCCommStop()); // 0x3002 CMD_DISCONNECT
|
||||||
|
put(new MsgHistoryBolus()); // 0x3101 CMD_HISTORY_MEAL_INS
|
||||||
|
put(new MsgHistoryDailyInsulin()); // 0x3102 CMD_HISTORY_DAY_INS
|
||||||
|
put(new MsgHistoryGlucose()); // 0x3104 CMD_HISTORY_GLUCOSE
|
||||||
|
put(new MsgHistoryAlarm()); // 0x3105 CMD_HISTORY_ALARM
|
||||||
|
put(new MsgHistoryError()); // 0x3106 CMD_HISTORY_ERROR
|
||||||
|
put(new MsgHistoryCarbo()); // 0x3107 CMD_HISTORY_CARBOHY
|
||||||
|
put(new MsgHistoryRefill()); // 0x3108 CMD_HISTORY_REFILL
|
||||||
|
put(new MsgHistorySuspend()); // 0x3109 CMD_HISTORY_SUSPEND
|
||||||
|
put(new MsgHistoryBasalHour()); // 0x310A CMD_HISTORY_BASAL_HOUR
|
||||||
|
put(new MsgHistoryDone()); // 0x31F1 CMD_HISTORY_DONT_USED
|
||||||
put(new MsgSettingBasal()); // 0x3202 CMD_SETTING_V_BASAL_INS_I
|
put(new MsgSettingBasal()); // 0x3202 CMD_SETTING_V_BASAL_INS_I
|
||||||
put(new MsgSettingProfileRatios()); // 0x3204 CMD_SETTING_V_CCC_I
|
put(new MsgSettingProfileRatios()); // 0x3204 CMD_SETTING_V_CCC_I
|
||||||
put(new MsgSettingMaxValues()); // 0x3205 CMD_SETTING_V_MAX_VALUE_I
|
put(new MsgSettingMaxValues()); // 0x3205 CMD_SETTING_V_MAX_VALUE_I
|
||||||
|
@ -48,8 +58,10 @@ public class MessageHashTable {
|
||||||
put(new MsgSettingProfileRatiosAll()); // 0x320D CMD_SETTING_V_CIR_CF_VALUE
|
put(new MsgSettingProfileRatiosAll()); // 0x320D CMD_SETTING_V_CIR_CF_VALUE
|
||||||
put(new MsgSetBasalProfile()); // 0x3306 CMD_SETTING_BASAL_PROFILE_S
|
put(new MsgSetBasalProfile()); // 0x3306 CMD_SETTING_BASAL_PROFILE_S
|
||||||
put(new MsgSetActivateBasalProfile()); // 0x330C CMD_SETTING_PROFILE_NUMBER_S
|
put(new MsgSetActivateBasalProfile()); // 0x330C CMD_SETTING_PROFILE_NUMBER_S
|
||||||
put(new MsgHistoryAll()); // 0x41F2 CMD_HISTORY_ALL
|
|
||||||
put(new MsgHistoryAllDone()); // 0x41F1 CMD_HISTORY_ALL_DONE
|
put(new MsgHistoryAllDone()); // 0x41F1 CMD_HISTORY_ALL_DONE
|
||||||
|
put(new MsgHistoryAll()); // 0x41F2 CMD_HISTORY_ALL
|
||||||
|
put(new MsgHistoryNewDone()); // 0x42F1 CMD_HISTORY_NEW_DONE
|
||||||
|
put(new MsgHistoryNew()); // 0x42F2 CMD_HISTORY_NEW
|
||||||
put(new MsgCheckValue()); // 0xF0F1 CMD_PUMP_CHECK_VALUE
|
put(new MsgCheckValue()); // 0xF0F1 CMD_PUMP_CHECK_VALUE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class MessageOriginalNames {
|
||||||
messageNames.put(0x050d, "CMD_HISPAGE_TB");
|
messageNames.put(0x050d, "CMD_HISPAGE_TB");
|
||||||
|
|
||||||
messageNames.put(0x3201, "CMD_SETTING_V_MEAL_INS_I");
|
messageNames.put(0x3201, "CMD_SETTING_V_MEAL_INS_I");
|
||||||
messageNames.put(0x3202, "CMD_SETTING_V_Based_INS_I");
|
messageNames.put(0x3202, "CMD_SETTING_V_BASAL_INS_I");
|
||||||
messageNames.put(0x3203, "CMD_SETTING_V_MEAL_SETTING_I");
|
messageNames.put(0x3203, "CMD_SETTING_V_MEAL_SETTING_I");
|
||||||
messageNames.put(0x3204, "CMD_SETTING_V_CCC_I");
|
messageNames.put(0x3204, "CMD_SETTING_V_CCC_I");
|
||||||
messageNames.put(0x3205, "CMD_SETTING_V_MAX_VALUE_I");
|
messageNames.put(0x3205, "CMD_SETTING_V_MAX_VALUE_I");
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
package info.nightscout.androidaps.plugins.DanaR.comm;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mike on 20.07.2016.
|
||||||
|
*/
|
||||||
|
public class MsgHistoryAlarm extends MsgHistoryAll {
|
||||||
|
private static Logger log = LoggerFactory.getLogger(MsgHistoryAlarm.class);
|
||||||
|
public MsgHistoryAlarm() {
|
||||||
|
SetCommand(0x3105);
|
||||||
|
}
|
||||||
|
// Handle message taken from MsgHistoryAll
|
||||||
|
}
|
|
@ -1,13 +1,23 @@
|
||||||
package info.nightscout.androidaps.plugins.DanaR.comm;
|
package info.nightscout.androidaps.plugins.DanaR.comm;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.Config;
|
||||||
|
|
||||||
public class MsgHistoryAllDone extends MessageBase {
|
public class MsgHistoryAllDone extends MessageBase {
|
||||||
|
private static Logger log = LoggerFactory.getLogger(MsgHistoryAllDone.class);
|
||||||
|
public static boolean received = false;
|
||||||
|
|
||||||
public MsgHistoryAllDone() {
|
public MsgHistoryAllDone() {
|
||||||
SetCommand(0x41F1);
|
SetCommand(0x41F1);
|
||||||
|
received = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleMessage(byte[] bytes) {
|
public void handleMessage(byte[] bytes) {
|
||||||
|
received = true;
|
||||||
|
if (Config.logDanaMessageDetail)
|
||||||
|
log.debug("History all done received");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
package info.nightscout.androidaps.plugins.DanaR.comm;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mike on 20.07.2016.
|
||||||
|
*/
|
||||||
|
public class MsgHistoryBasalHour extends MsgHistoryAll {
|
||||||
|
private static Logger log = LoggerFactory.getLogger(MsgHistoryBasalHour.class);
|
||||||
|
public MsgHistoryBasalHour() {
|
||||||
|
SetCommand(0x310A);
|
||||||
|
}
|
||||||
|
// Handle message taken from MsgHistoryAll
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package info.nightscout.androidaps.plugins.DanaR.comm;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mike on 20.07.2016.
|
||||||
|
*/
|
||||||
|
public class MsgHistoryBolus extends MsgHistoryAll {
|
||||||
|
private static Logger log = LoggerFactory.getLogger(MsgHistoryBolus.class);
|
||||||
|
public MsgHistoryBolus() {
|
||||||
|
SetCommand(0x3101);
|
||||||
|
}
|
||||||
|
// Handle message taken from MsgHistoryAll
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package info.nightscout.androidaps.plugins.DanaR.comm;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mike on 20.07.2016.
|
||||||
|
*/
|
||||||
|
public class MsgHistoryCarbo extends MsgHistoryAll {
|
||||||
|
private static Logger log = LoggerFactory.getLogger(MsgHistoryCarbo.class);
|
||||||
|
public MsgHistoryCarbo() {
|
||||||
|
SetCommand(0x3107);
|
||||||
|
}
|
||||||
|
// Handle message taken from MsgHistoryAll
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package info.nightscout.androidaps.plugins.DanaR.comm;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mike on 20.07.2016.
|
||||||
|
*/
|
||||||
|
public class MsgHistoryDailyInsulin extends MsgHistoryAll {
|
||||||
|
private static Logger log = LoggerFactory.getLogger(MsgHistoryDailyInsulin.class);
|
||||||
|
public MsgHistoryDailyInsulin() {
|
||||||
|
SetCommand(0x3102);
|
||||||
|
}
|
||||||
|
// Handle message taken from MsgHistoryAll
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
package info.nightscout.androidaps.plugins.DanaR.comm;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mike on 20.07.2016.
|
||||||
|
*/
|
||||||
|
public class MsgHistoryDone extends MessageBase {
|
||||||
|
private static Logger log = LoggerFactory.getLogger(MsgHistoryDone.class);
|
||||||
|
public static boolean received = false;
|
||||||
|
|
||||||
|
MsgHistoryDone() {
|
||||||
|
SetCommand(0x31F1);
|
||||||
|
received = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleMessage(byte[] bytes) {
|
||||||
|
received = true;
|
||||||
|
if (Config.logDanaMessageDetail)
|
||||||
|
log.debug("History done received");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package info.nightscout.androidaps.plugins.DanaR.comm;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mike on 20.07.2016.
|
||||||
|
*/
|
||||||
|
public class MsgHistoryError extends MsgHistoryAll {
|
||||||
|
private static Logger log = LoggerFactory.getLogger(MsgHistoryError.class);
|
||||||
|
public MsgHistoryError() {
|
||||||
|
SetCommand(0x3106);
|
||||||
|
}
|
||||||
|
// Handle message taken from MsgHistoryAll
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package info.nightscout.androidaps.plugins.DanaR.comm;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mike on 20.07.2016.
|
||||||
|
*/
|
||||||
|
public class MsgHistoryGlucose extends MsgHistoryAll {
|
||||||
|
private static Logger log = LoggerFactory.getLogger(MsgHistoryGlucose.class);
|
||||||
|
public MsgHistoryGlucose() {
|
||||||
|
SetCommand(0x3104);
|
||||||
|
}
|
||||||
|
// Handle message taken from MsgHistoryAll
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package info.nightscout.androidaps.plugins.DanaR.comm;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mike on 20.07.2016.
|
||||||
|
*/
|
||||||
|
public class MsgHistoryNew extends MsgHistoryAll {
|
||||||
|
private static Logger log = LoggerFactory.getLogger(MsgHistoryNew.class);
|
||||||
|
public MsgHistoryNew() {
|
||||||
|
SetCommand(0x42F2);
|
||||||
|
}
|
||||||
|
// Handle message taken from MsgHistoryAll
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
package info.nightscout.androidaps.plugins.DanaR.comm;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mike on 20.07.2016.
|
||||||
|
*/
|
||||||
|
public class MsgHistoryNewDone extends MessageBase {
|
||||||
|
private static Logger log = LoggerFactory.getLogger(MsgHistoryNewDone.class);
|
||||||
|
public static boolean received = false;
|
||||||
|
|
||||||
|
public MsgHistoryNewDone() {
|
||||||
|
SetCommand(0x42F1);
|
||||||
|
received = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleMessage(byte[] bytes) {
|
||||||
|
received = true;
|
||||||
|
if (Config.logDanaMessageDetail)
|
||||||
|
log.debug("History new done received");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package info.nightscout.androidaps.plugins.DanaR.comm;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mike on 20.07.2016.
|
||||||
|
*/
|
||||||
|
public class MsgHistoryRefill extends MsgHistoryAll {
|
||||||
|
private static Logger log = LoggerFactory.getLogger(MsgHistoryRefill.class);
|
||||||
|
public MsgHistoryRefill() {
|
||||||
|
SetCommand(0x3108);
|
||||||
|
}
|
||||||
|
// Handle message taken from MsgHistoryAll
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package info.nightscout.androidaps.plugins.DanaR.comm;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mike on 20.07.2016.
|
||||||
|
*/
|
||||||
|
public class MsgHistorySuspend extends MsgHistoryAll {
|
||||||
|
private static Logger log = LoggerFactory.getLogger(MsgHistorySuspend.class);
|
||||||
|
public MsgHistorySuspend() {
|
||||||
|
SetCommand(0x3109);
|
||||||
|
}
|
||||||
|
// Handle message taken from MsgHistoryAll
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue