Example #1
0
 public static OSCBundle New(string channelIdentifer, params string[] addressList)
 {
     OSCBundle bundle = new OSCBundle();
     foreach (var address in addressList)
         bundle.Append(OSCMessage.New(String.Format(address, channelIdentifer)));
     return bundle;
 }
Example #2
0
        public static new OSCBundle Unpack(byte[] bytes, ref int start, int end)
        {
            string address = UnpackString(bytes, ref start);
            if (!address.Equals(BUNDLE))
                return null;

            DateTime timestamp = UnpackTimeTag(bytes, ref start);
            OSCBundle bundle = new OSCBundle(timestamp);

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

            return bundle;
        }