Example #1
0
 public LapCrossing(string[] pars)
 {
     CarIdx    = int.Parse(pars[0]);
     LapNum    = int.Parse(pars[1]);
     Flags     = (eLapCrossingFlags)int.Parse(pars[2]);
     CrossedAt = Analyser.DblParse(pars[3]);
 }
Example #2
0
        public static TelemetryEvent Create(string data)
        {
            Contract.Requires(data != null && data.Length > 0);

            TelemetryEvent ret = Analyser.DecodeLine(data);

            return(ret);
        }
 public StandingsEntry(string [] pars)
 {
     CarIdx    = int.Parse(pars[0]);
     Time      = Analyser.DblParse(pars[1]);
     Lap       = int.Parse(pars[2]);
     LapsLead  = int.Parse(pars[3]);
     ReasonOut = (eReasonsOut)int.Parse(pars[4]);
     Incidents = int.Parse(pars[5]);
 }
 public SessionInfo(string [] pars)
 {
     SessionNum    = int.Parse(pars[0]);
     SessionCookie = int.Parse(pars[1]);
     SessionType   = (eSessionType)int.Parse(pars[2]);
     SessionState  = (eSessionState)int.Parse(pars[3]);
     SessionFlag   = (eSessionFlag)int.Parse(pars[4]);
     CurrentTime   = Analyser.DblParse(pars[5]);
     TimeRemaining = Analyser.DblParse(pars[6]);
     LapsRemaining = int.Parse(pars[7]);
 }
Example #5
0
        public Standings(string [] pars)
        {
            Positions = new List <StandingsEntry>();

            Flags           = (eStandingsFlags)int.Parse(pars[0]);
            SessionNum      = int.Parse(pars[1]);
            AverageLapTime  = Analyser.DblParse(pars[2]);
            LapsCompleted   = int.Parse(pars[3]);
            NumCautionFlags = int.Parse(pars[4]);
            NumCautionLaps  = int.Parse(pars[5]);
            NumLeadChanges  = int.Parse(pars[6]);

            FastestLap = (StandingsEntry)Analyser.DecodeLine(pars[7]);

            for (int i = 8; i < pars.Length; i++)
            {
                Positions.Add((StandingsEntry)Analyser.DecodeLine(pars[i]));
            }
        }
Example #6
0
        public TelemetryEvent Read()
        {
            TelemetryEvent ret = null;

            if (previousItem != null)
            {
                ret          = previousItem;
                previousItem = null;
            }
            else
            {
                string line = rdr.ReadLine();
                if (line == null)
                {
                    isAtTheEnd = true;
                }
                else
                {
                    ret = Analyser.DecodeLine(line);
                }
            }

            return(ret);
        }