diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportXMLTypeWriter/Components/MRFElectricMachinesType.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportXMLTypeWriter/Components/MRFElectricMachinesType.cs index 2995252474eb2e5c0ebd4631b2b71a8c4fe0377e..0f4cafc0f8e72b2bf4208e48ef6fa7590d18aef5 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportXMLTypeWriter/Components/MRFElectricMachinesType.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportXMLTypeWriter/Components/MRFElectricMachinesType.cs @@ -25,9 +25,9 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport. var electricMachines = inputData.JobInputData.Vehicle.Components.ElectricMachines.Entries; var result = new XElement(_mrf + "ElectricMachines"); - foreach (var electricMachine in electricMachines) { - var electricMachineElement = new XElement(_mrf + XMLNames.Component_ElectricMachine, new XElement(_mrf + "CountAtPosition", electricMachine.Count), - new XElement(_mrf + XMLNames.ElectricMachine_Position, electricMachine.Position.ToXmlFormat())); + foreach (var electricMachine in electricMachines.OrderBy((entry => entry.Position))) { + var electricMachineElement = new XElement(_mrf + XMLNames.Component_ElectricMachine, + new XElement(_mrf + XMLNames.ElectricMachine_Position, electricMachine.Position.ToXmlFormat()), new XElement(_mrf + "CountAtPosition", electricMachine.Count)); result.Add(electricMachineElement); var electricMachineSystem = new XElement(_mrf + XMLNames.ElectricMachineSystem); @@ -35,9 +35,24 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport. new XElement(_mrf + XMLNames.Component_CertificationNumber, electricMachine.ElectricMachine.CertificationNumber), new XElement(_mrf + XMLNames.DI_Signature_Reference_DigestValue, electricMachine.ElectricMachine.DigestValue.DigestValue), new XElement(_mrf + XMLNames.ElectricMachine_ElectricMachineType, electricMachine.ElectricMachine.ElectricMachineType), - new XElement(_mrf + XMLNames.Component_CertificationMethod, electricMachine.ElectricMachine.CertificationMethod)); - //new XElement(_mrf + "RatedPower", electricMachine.ElectricMachine.R85RatedPower.ToXMLFormat(0)), - //new XElement(_mrf + "MaxContinuousPower", (electricMachine.ElectricMachine.ContinuousTorque * electricMachine.ElectricMachine.ContinuousTorqueSpeed).ToXMLFormat(0)); + new XElement(_mrf + XMLNames.Component_CertificationMethod, electricMachine.ElectricMachine.CertificationMethod), + new XElement(_mrf + "RatedPower", electricMachine.ElectricMachine.R85RatedPower.ToXMLFormat(0))); + + var voltageLevels = new XElement(_mrf + "VoltageLevels"); + electricMachineSystem.Add(voltageLevels); + + foreach (var electricMotorVoltageLevel in electricMachine.ElectricMachine.VoltageLevels) + { + var voltageLevel = new XElement(_mrf + XMLNames.ElectricMachine_VoltageLevel, + new XAttribute(XMLNames.VoltageLevel_Voltage, electricMotorVoltageLevel.VoltageLevel.ToXMLFormat(0)), + new XElement(_mrf + "MaxContinousPower", + (electricMotorVoltageLevel.ContinuousTorque * electricMotorVoltageLevel.ContinuousTorqueSpeed) + .ToXMLFormat(0))); + + + voltageLevels.Add(voltageLevel); + } + electricMachineElement.Add(electricMachineSystem); if (electricMachine.ADC != null) { var adc = electricMachine.ADC; diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportXMLTypeWriter/Components/MRFIEPCSpecificationsType.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportXMLTypeWriter/Components/MRFIEPCSpecificationsType.cs index 4e1674408e817ea814f75b31deff6581a0728f9b..9e226bd19ffbc101ca3e2e561c4e371c5b447596 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportXMLTypeWriter/Components/MRFIEPCSpecificationsType.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportXMLTypeWriter/Components/MRFIEPCSpecificationsType.cs @@ -19,18 +19,39 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport. public XElement GetElement(IDeclarationInputDataProvider inputData) { var iepcData = inputData.JobInputData.Vehicle.Components.IEPC; - return new XElement(_mrf + "IEPCSpecifications", + + + var iepcXElement = new XElement(_mrf + "IEPCSpecifications", new XElement(_mrf + XMLNames.Component_Model, iepcData.Model), new XElement(_mrf + XMLNames.Component_CertificationNumber, iepcData.CertificationNumber), new XElement(_mrf + XMLNames.DI_Signature_Reference_DigestValue, iepcData.DigestValue.DigestValue), - new XElement(_mrf + XMLNames.Engine_RatedPower, iepcData.R85RatedPower.ToXMLFormat()), + new XElement(_mrf + XMLNames.Engine_RatedPower, iepcData.R85RatedPower.ToXMLFormat())); //new XElement(_mrf + "MaxContinuousPower",(iepcData.ContinuousTorque*iepcData.ContinuousTorqueSpeed).ToXMLFormat()), + + var voltageLevels = new XElement(_mrf + "VoltageLevels"); + iepcXElement.Add(voltageLevels); + + foreach (var electricMotorVoltageLevel in iepcData.VoltageLevels) { + var voltageLevel = new XElement(_mrf + XMLNames.ElectricMachine_VoltageLevel, + new XAttribute(XMLNames.VoltageLevel_Voltage, electricMotorVoltageLevel.VoltageLevel.ToXMLFormat(0)), + new XElement(_mrf + "MaxContinousPower", + (electricMotorVoltageLevel.ContinuousTorque * electricMotorVoltageLevel.ContinuousTorqueSpeed) + .ToXMLFormat(0))); + + + voltageLevels.Add(voltageLevel); + } + + iepcXElement.Add( new XElement(_mrf + "NrOfGears", iepcData.Gears.Count), new XElement(_mrf + "LowestTotalTransmissionRatio", (iepcData.Gears.OrderByDescending(g => g.GearNumber).First().Ratio * inputData.JobInputData.Vehicle.Components.AxleGearInputData.Ratio).ToXMLFormat()), new XElement(_mrf + XMLNames.IEPC_DifferentialIncluded, iepcData.DifferentialIncluded), new XElement(_mrf + XMLNames.Component_CertificationMethod, iepcData.CertificationMethod) ); + + + return iepcXElement; } #endregion diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportXMLTypeWriter/Components/MRFIepcSpecificationsType.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportXMLTypeWriter/Components/MRFIepcSpecificationsType.cs index 4e1674408e817ea814f75b31deff6581a0728f9b..9e226bd19ffbc101ca3e2e561c4e371c5b447596 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportXMLTypeWriter/Components/MRFIepcSpecificationsType.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportXMLTypeWriter/Components/MRFIepcSpecificationsType.cs @@ -19,18 +19,39 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport. public XElement GetElement(IDeclarationInputDataProvider inputData) { var iepcData = inputData.JobInputData.Vehicle.Components.IEPC; - return new XElement(_mrf + "IEPCSpecifications", + + + var iepcXElement = new XElement(_mrf + "IEPCSpecifications", new XElement(_mrf + XMLNames.Component_Model, iepcData.Model), new XElement(_mrf + XMLNames.Component_CertificationNumber, iepcData.CertificationNumber), new XElement(_mrf + XMLNames.DI_Signature_Reference_DigestValue, iepcData.DigestValue.DigestValue), - new XElement(_mrf + XMLNames.Engine_RatedPower, iepcData.R85RatedPower.ToXMLFormat()), + new XElement(_mrf + XMLNames.Engine_RatedPower, iepcData.R85RatedPower.ToXMLFormat())); //new XElement(_mrf + "MaxContinuousPower",(iepcData.ContinuousTorque*iepcData.ContinuousTorqueSpeed).ToXMLFormat()), + + var voltageLevels = new XElement(_mrf + "VoltageLevels"); + iepcXElement.Add(voltageLevels); + + foreach (var electricMotorVoltageLevel in iepcData.VoltageLevels) { + var voltageLevel = new XElement(_mrf + XMLNames.ElectricMachine_VoltageLevel, + new XAttribute(XMLNames.VoltageLevel_Voltage, electricMotorVoltageLevel.VoltageLevel.ToXMLFormat(0)), + new XElement(_mrf + "MaxContinousPower", + (electricMotorVoltageLevel.ContinuousTorque * electricMotorVoltageLevel.ContinuousTorqueSpeed) + .ToXMLFormat(0))); + + + voltageLevels.Add(voltageLevel); + } + + iepcXElement.Add( new XElement(_mrf + "NrOfGears", iepcData.Gears.Count), new XElement(_mrf + "LowestTotalTransmissionRatio", (iepcData.Gears.OrderByDescending(g => g.GearNumber).First().Ratio * inputData.JobInputData.Vehicle.Components.AxleGearInputData.Ratio).ToXMLFormat()), new XElement(_mrf + XMLNames.IEPC_DifferentialIncluded, iepcData.DifferentialIncluded), new XElement(_mrf + XMLNames.Component_CertificationMethod, iepcData.CertificationMethod) ); + + + return iepcXElement; } #endregion