private MoveVRMsg GetMVRMSG(byte[] msg, Int64 msgSize) { Int32 type = ByteInt32(msg[8]); byte[] seq_num = new byte[4]; byte[] vars = new byte[msgSize - 13]; Array.Copy(msg, 9, seq_num, 0, 4); Array.Copy(msg, 13, vars, 0, msgSize - 13); MoveVRMsg MVRMSG = MVRMSGVars(vars); MVRMSG.msgType = type; return(MVRMSG); }
private MoveVRMsg MVRMSGVars(byte[] from) { MoveVRMsg msg = new MoveVRMsg(ByteInt32(from)); return(msg); }
public byte[] SerializeMSG(MoveVRMsg msg) { byte[] header = Header(msg.msgType); byte[] body = BuildMSG(msg.from); return(Combine(IntByte((Int64)8 + header.Length + body.Length), header, body)); }