Beispiel #1
0
        private void ExtractDataFromTrace(PsaTrace trace)
        {
            DateTime date = trace.Date;

            foreach (PsaParametersSet set in trace.ParametersSets)
            {
                PsaParameterData rpmData =
                    set.GetParameterOfType(PsaParameterType.EngineRpm);
                PsaParameterData waterData =
                    set.GetParameterOfType(
                        PsaParameterType.WaterTemperature);
                if (waterData == null)
                {
                    waterData = set.GetParameterOfType(
                        PsaParameterType.EngineCoolantTemperature);
                }

                if (rpmData != null && waterData != null)
                {
                    if (RpmDataFits(rpmData))
                    {
                        HelperRpmWaterDate result = new
                                                    HelperRpmWaterDate(rpmData, waterData, date);
                        ProcessHelper(result);
                    }
                }
            }
        }
Beispiel #2
0
 private void ProcessHelper(HelperRpmWaterDate helper)
 {
     if (helper.TemperatureClass == TemperatureClass.Cold)
     {
         result.ColdStartRpmDates.Add(helper.Date);
         result.ColdStartRpmValues.Add(helper.Value);
     }
     else if (helper.TemperatureClass == TemperatureClass.Medium)
     {
         result.MiddleStartRpmDates.Add(helper.Date);
         result.MiddleStartRpmValues.Add(helper.Value);
     }
     else
     {
         result.HotStartRpmDates.Add(helper.Date);
         result.HotStartRpmValues.Add(helper.Value);
     }
 }