use of sugar.free.sightparser.pipeline.ByteBuf in project SightRemote by TebbeUbben.
the class ExtendedBolusMessage method getData.
@Override
protected byte[] getData() throws Exception {
ByteBuf data = new ByteBuf(22);
data.putShort((short) 0x2503);
data.putShort((short) 0xE300);
data.putShort((short) 0x1F00);
data.putShort((short) 0x0000);
data.putShort((short) 0x0000);
data.putUInt16LE(Helpers.roundDoubleToInt(amount * 100D));
data.putUInt16LE(duration);
data.putShort((short) 0x0000);
data.putShort((short) 0x0000);
data.putUInt16LE(Helpers.roundDoubleToInt(amount * 100D));
data.putUInt16LE(duration);
return data.getBytes();
}
use of sugar.free.sightparser.pipeline.ByteBuf in project SightRemote by TebbeUbben.
the class MultiwaveBolusMessage method getData.
@Override
protected byte[] getData() throws Exception {
ByteBuf data = new ByteBuf(22);
data.putShort((short) 0x2503);
data.putShort((short) 0xFC00);
data.putShort((short) 0x1F00);
data.putShort((short) 0x0000);
data.putUInt16LE(Helpers.roundDoubleToInt(amount * 100D));
data.putUInt16LE(Helpers.roundDoubleToInt(delayedAmount * 100D));
data.putUInt16LE(duration);
data.putShort((short) 0x0000);
data.putUInt16LE(Helpers.roundDoubleToInt(amount * 100D));
data.putUInt16LE(Helpers.roundDoubleToInt(delayedAmount * 100D));
data.putUInt16LE(duration);
return data.getBytes();
}
use of sugar.free.sightparser.pipeline.ByteBuf in project SightRemote by TebbeUbben.
the class MuteAlertMessage method getData.
@Override
protected byte[] getData() throws Exception {
ByteBuf byteBuf = new ByteBuf(2);
byteBuf.putUInt16LE(alertID);
return byteBuf.getBytes();
}
use of sugar.free.sightparser.pipeline.ByteBuf in project SightRemote by TebbeUbben.
the class SetPumpStatusMessage method getData.
@Override
protected byte[] getData() throws Exception {
ByteBuf byteBuf = new ByteBuf(2);
byteBuf.putShort(pumpStatus.getValue());
return byteBuf.getBytes();
}
use of sugar.free.sightparser.pipeline.ByteBuf in project SightRemote by TebbeUbben.
the class SetTBRMessage method getData.
@Override
protected byte[] getData() throws Exception {
ByteBuf byteBuf = new ByteBuf(6);
byteBuf.putUInt16LE(amount);
byteBuf.putUInt16LE(duration);
byteBuf.putShort((short) 0x1F00);
return byteBuf.getBytes();
}
Aggregations