extendedInfo.set("archive", true);
int subtype = buf.readUnsignedShort();
if (subtype == MSG_ALARM) {
extendedInfo.set("alarm", true);
}
if (buf.readUnsignedShort() > buf.readableBytes()) {
lastIndex += 1;
break; // workaround for device bug
}
lastIndex = buf.readUnsignedInt();
extendedInfo.set("index", lastIndex);