public static int Read(byte[] buf, int c, YachtActionCode ya)
        {
            ya.MessageVersionNumber = buf[c++];
            ya.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));
            ya.AckNumber = BitConverter.ToUInt16(buf, c);
            c += 2;
            //ya.RaceId = BitConverter.ToUInt32(buf, c);
            //c += 4;
            ya.OriginatorBoatId = BitConverter.ToUInt32(buf, c);
            c += 4;

            ya.Event = (YachtActionEnum)buf[c++];

            return c;
        }
 public static YachtActionCode Read(byte[] buf)
 {
     var ya = new YachtActionCode();
     Read(buf, 0, ya);
     return ya;
 }