예제 #1
0
        public static EvcQARun RunTranslationForExport(Instrument instrument)
        {
            var verificationTests = new List <EvcQARun.VerificationTest>();

            foreach (var vt in instrument.VerificationTests)
            {
                verificationTests.Add(TranslateVerificationTest(vt));
            }

            var qaRun = new EvcQARun
            {
                CompanyNumber         = instrument.SiteNumber2.ToString(),
                DateTime              = instrument.TestDateTime,
                DriveType             = "Rotary",
                ConfirmedStatus       = instrument.HasPassed ? "PASS" : "FAIL",
                FirmwareVersion       = instrument.FirmwareVersion,
                InstrumentType        = instrument.InstrumentTypeString,
                SerialNumber          = instrument.SerialNumber.ToString(),
                InstrumentData        = instrument.InstrumentData,
                InstrumentComposition = instrument.CompositionType.ToString(),

                //PressureInfo = new EvcQARun.PressureHeader
                //{
                //    BasePressure = instrument.EvcBasePressure().Value,
                //    PressureRange = instrument.EvcPressureRange().Value,
                //    PressureUnits = instrument.PressureUnits(),
                //    TransducerType = instrument.GetTransducerType().ToString(),
                //    ProgrammedAtmosphericPressure = instrument.EvcAtmosphericPressure().Value
                //},

                TemperatureInfo = new EvcQARun.TemperatureHeader
                {
                    BaseTemperature  = instrument.EvcBaseTemperature().Value,
                    TemperatureRange = "-40 to 170 C",
                    TemperatureUnits = instrument.TemperatureUnits()
                },

                SuperFactorInfo = new EvcQARun.SuperFactorHeader
                {
                    CO2      = instrument.CO2().Value,
                    SpecGr   = instrument.SpecGr().Value,
                    N2       = instrument.N2().Value,
                    FPVTable = "NX19"
                },

                VolumeInfo = new EvcQARun.VolumeHeader
                {
                    CorrectedMultiplierDescription = instrument.CorrectedMultiplierDescription(),
                    CorrectedMultiplierValue       = (int)instrument.CorrectedMultiplier(),

                    UncorrectedMultiplierDescription = instrument.UnCorrectedMultiplierDescription(),
                    UncorrectedMultiplierValue       = (int)instrument.CorrectedMultiplier(),

                    DriveRateDescription = instrument.DriveRateDescription(),

                    PulseASelect = instrument.PulseASelect(),
                    PulseBSelect = instrument.PulseBSelect()
                },

                VerificationTests = verificationTests
            };

            return(qaRun);
        }