Exemplo n.º 1
0
        public LogLine(ME7LoggerLog log, string group, int lineNumber, LogLine last, params string[] values)
        {
            this.Log        = log;
            this.LineNumber = lineNumber;
            this.TimeStamp  = decimal.Parse(values[0], VisualME7Logger.Log.ME7LoggerLog.CultureInfo);

            int i = 1;

            foreach (SessionVariable sv in Log.Session.Variables.Values)
            {
                string      value = "";
                LogVariable lv    = sv as LogVariable;

                if (lv != null && lv.Group == group)
                {
                    //set value from log
                    value = values[i++].Trim();
                }
                else if (last != null)
                {
                    value = last.variablesByName[sv.Name].Value.ToString();
                    //set value from last log line
                }
                Variable v = new Variable(this, sv, value);
                variables.Add(v);
                if (!variablesByName.ContainsKey(v.SessionVariable.Name))
                {
                    variablesByName.Add(v.SessionVariable.Name, v);
                }
                else if (lv.Group == group)
                {
                    variablesByName[v.SessionVariable.Name] = v;
                }
            }
        }
Exemplo n.º 2
0
        public LogLine(ME7LoggerLog log, string line, int lineNumber, LogLine last)
        {
            this.Log = log;
            if (this.Log.NewVCDSFormat)
            {
                this.timestampIndex = 1;
            }

            this.LineNumber = lineNumber;
            this.Parse(line, last);
        }
Exemplo n.º 3
0
 public LogLine(ME7LoggerLog log, string line, int lineNumber, LogLine last)
 {
     this.Log        = log;
     this.LineNumber = lineNumber;
     this.Parse(line, last);
 }