public double calculatedGlucose() { if (calibrationSlope == 0 || sensorRaw == 0 || getState() != SensorState.Ok) return -1; return performCalculation(sensorRaw, calibrationSlope, calibrationIntercept); }
public CalibrateRx(byte[] packet) { if (packet == null || packet.length < 7) return; wrap(packet); status = getUnsignedByte(); opcode = getUnsignedByte(); replyStatus = getUnsignedShort(); // typically 0x0000 = received errorCode = getUnsignedByte(); // typically 0x00 or 0x01 = good, other = bad shortValue2 = getUnsignedShort(); // typically 0x0000 if (status == 0x82 && opcode == OPCODE_CALI_REPLY) { valid = true; } }
public ConnParamRx(byte[] packet) { if (packet == null || packet.length < 4) return; wrap(packet); status = getUnsignedByte(); opcode = getUnsignedByte(); shortValue = getUnsignedShort(); // typically 0x0000 if (status == 0x9a && opcode == OPCODE_CONN_REPLY) { valid = true; } } }
public TimeRx(byte[] packet) { if (packet == null || packet.length < 4) return; wrap(packet); status = getUnsignedByte(); opcode = getUnsignedByte(); shortValue = getUnsignedShort(); // typically 0x0000 if (status == 0x8d && opcode == OPCODE_TIME_REPLY) { valid = true; } } }
@Override public String toS() { final StringBuilder raws = new StringBuilder(" Raw: "); if (getRawList() != null) { for (Integer x : getRawList()) { raws.append(" ").append(x); } } else { raws.append("NULL LIST"); } return super.toS() + raws.toString(); }
public double getGlucose(int sensorRaw) { if (!valid || sensorFailed || slope == 0 || sensorRaw == 0) return -1; return performCalculation(sensorRaw, slope, intercept); }
public StatusTx() { init(opcode, length, true); } }
public InboundStream() { reset(); }
boolean statusBit(final int n) { return isBitSet(bitFieldArray, n); }
public CalibrateRx(byte[] packet) { if (packet == null || packet.length < 7) return; wrap(packet); status = getUnsignedByte(); opcode = getUnsignedByte(); replyStatus = getUnsignedShort(); // typically 0x0000 = received errorCode = getUnsignedByte(); // typically 0x00 or 0x01 = good, other = bad shortValue2 = getUnsignedShort(); // typically 0x0000 if (status == 0x82 && opcode == OPCODE_CALI_REPLY) { valid = true; } }
public ConnParamRx(byte[] packet) { if (packet == null || packet.length < 4) return; wrap(packet); status = getUnsignedByte(); opcode = getUnsignedByte(); shortValue = getUnsignedShort(); // typically 0x0000 if (status == 0x9a && opcode == OPCODE_CONN_REPLY) { valid = true; } } }
public TimeRx(byte[] packet) { if (packet == null || packet.length < 4) return; wrap(packet); status = getUnsignedByte(); opcode = getUnsignedByte(); shortValue = getUnsignedShort(); // typically 0x0000 if (status == 0x8d && opcode == OPCODE_TIME_REPLY) { valid = true; } } }
public double calculatedGlucose() { if (calibrationSlope == 0 || sensorRaw == 0 || getState() != SensorState.Ok) return -1; return performCalculation(sensorRaw, calibrationSlope, calibrationIntercept); }
@Override public String toS() { final StringBuilder raws = new StringBuilder(" Raw: "); if (getRawList() != null) { for (Integer x : getRawList()) { raws.append(" ").append(x); } } else { raws.append("NULL LIST"); } return super.toS() + raws.toString(); }
public double getGlucose(int sensorRaw) { if (!valid || sensorFailed || slope == 0 || sensorRaw == 0) return -1; return performCalculation(sensorRaw, slope, intercept); }
public StatusTx() { init(opcode, length, true); } }