예제 #1
0
        public static new OSCBundle Unpack(byte[] bytes, ref int start, int end, bool extendedMode = false)
        {
            string address = unpackString(bytes, ref start);

            //Console.WriteLine("bundle: " + address);
            if (!address.Equals(BUNDLE))
            {
                return(null);                                    // TODO
            }
            DateTime  timestamp = unpackTimeTag(bytes, ref start);
            OSCBundle bundle    = new OSCBundle(timestamp, extendedMode);

            while (start < end)
            {
                int length  = unpackInt(bytes, ref start);
                int sub_end = start + length;
                bundle.Append(OSCPacket.Unpack(bytes, ref start, sub_end, extendedMode));
            }

            return(bundle);
        }
예제 #2
0
파일: OSCBundle.cs 프로젝트: you8/vvvv-sdk
        public static new OSCBundle Unpack(byte[] bytes, ref int start, int end)
        {
            string address = unpackString(bytes, ref start);

            //Console.WriteLine("bundle: " + address);
            if (!address.Equals(BUNDLE))
            {
                return(null);                                    // TODO
            }
            long      timestamp = unpackLong(bytes, ref start);
            OSCBundle bundle    = new OSCBundle(timestamp);

            while (start < end)
            {
                int length  = unpackInt(bytes, ref start);
                int sub_end = start + length;
                //Console.WriteLine(bytes.Length +" "+ start+" "+length+" "+sub_end);
                bundle.Append(OSCPacket.Unpack(bytes, ref start, sub_end));
            }

            return(bundle);
        }