Beispiel #1
0
        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);
        }
Beispiel #2
0
        private MoveVRMsg MVRMSGVars(byte[] from)
        {
            MoveVRMsg msg = new MoveVRMsg(ByteInt32(from));

            return(msg);
        }
Beispiel #3
0
 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));
 }