AmericasCup.Data.YachtEventCode.Read C# (CSharp) Method

Read() public static method

public static Read ( byte buf, int c, YachtEventCode ye ) : int
buf byte
c int
ye YachtEventCode
return int
        public static int Read(byte[] buf, int c, YachtEventCode ye)
        {
            ye.MessageVersionNumber = buf[c++];
            ye.Time = new DateTime(1970, 1, 1).AddMilliseconds(BitConverter.ToUInt64(
                new byte[] { buf[c++], buf[c++], buf[c++], buf[c++], buf[c++], buf[c++], 0, 0 }, 0));
            ye.AckNumber = BitConverter.ToUInt16(buf, c);
            c += 2;
            ye.RaceId = BitConverter.ToUInt32(buf, c);
            c += 4;
            ye.DestinationBoatId = BitConverter.ToUInt32(buf, c);
            c += 4;

            ye.Event = (YachtEventEnum)buf[c++];

            return c;
        }

Same methods

YachtEventCode::Read ( byte buf ) : YachtEventCode
YachtEventCode