public SGIPUserReportMessage(byte buf[]) throws IllegalArgumentException { super.buf = new byte[63]; if (buf.length != 63) { throw new IllegalArgumentException(SGIPConstant.SMC_MESSAGE_ERROR); } else { System.arraycopy(buf, 0, super.buf, 0, 63); super.src_node_Id = TypeConvert.byte2int(super.buf, 0); super.time_Stamp = TypeConvert.byte2int(super.buf, 4); super.sequence_Id = TypeConvert.byte2int(super.buf, 8); } }
public SGIPDeliverMessage(byte buf[]) throws IllegalArgumentException { int len = TypeConvert.byte2int(buf, 57); len = 69 + len; if (buf.length != len) { throw new IllegalArgumentException(SGIPConstant.SMC_MESSAGE_ERROR); } else { super.buf = new byte[len]; System.arraycopy(buf, 0, super.buf, 0, buf.length); super.src_node_Id = TypeConvert.byte2int(super.buf, 0); super.time_Stamp = TypeConvert.byte2int(super.buf, 4); super.sequence_Id = TypeConvert.byte2int(super.buf, 8); return; } }
public int getMsgLength() { return TypeConvert.byte2int(super.buf, 57); }