Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit e449eda5 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

fix writing aux technologies: allow multiple elements for steering pump, correct code for writing

parent 90f6b1c6
No related branches found
No related tags found
No related merge requests found
......@@ -150,11 +150,14 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation
public override IList<XElement> GetElements(IDeclarationInputDataProvider inputData)
{
return new List<XElement>() {
new XElement(_cif + "SteeringPumpTechnology",
inputData.JobInputData.Vehicle.Components.AuxiliaryInputData.Auxiliaries
.Single(aux => aux.Type == AuxiliaryType.SteeringPump).Technology.Join())
};
return inputData.JobInputData.Vehicle.Components.AuxiliaryInputData.Auxiliaries
.Single(aux => aux.Type == AuxiliaryType.SteeringPump).Technology.Select(x =>
new XElement(_cif + "SteeringPumpTechnology", x)).ToList();
//return new List<XElement>() {
// new XElement(_cif + "SteeringPumpTechnology",
// inputData.JobInputData.Vehicle.Components.AuxiliaryInputData.Auxiliaries
// .Single(aux => aux.Type == AuxiliaryType.SteeringPump).Technology.Join())
//};
}
#endregion
......
......@@ -116,10 +116,6 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.
Vehicle.XPathSelectElement($"//*[local-name()='{XMLNames.VehicleGroupCO2}']").Value = DeclarationData
.GetVehicleGroupCO2StandardsGroup(Input).ToXMLFormat();
var stream = new MemoryStream();
var writer = new StreamWriter(stream);
......
......@@ -37,7 +37,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.
return new XElement(_mrf + XMLNames.Component_Auxiliaries,
new XElement(_mrf + "CoolingFanTechnology",
auxData.FanTechnology),
new XElement(_mrf + "SteeringPumpTechnology", string.Join("\n", steeringPumpData)),
steeringPumpData.Select(x => new XElement(_mrf + "SteeringPumpTechnology", x)),
_mrfFactory.GetPrimaryBusElectricSystemType_Conventional_HEV().GetElement(auxData),
......@@ -62,7 +62,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.
return new XElement(_mrf + XMLNames.Component_Auxiliaries,
new XElement(_mrf + "CoolingFanTechnology",
auxData.FanTechnology),
new XElement(_mrf + "SteeringPumpTechnology", string.Join("\n", steeringPumpData)),
steeringPumpData.Select(x => new XElement(_mrf + "SteeringPumpTechnology", x)),
_mrfFactory.GetPrimaryBusElectricSystemType_Conventional_HEV().GetElement(auxData),
_mrfFactory.GetPrimaryBusPneumaticSystemType_Conventional_HEV_Px().GetElement(auxData),
_mrfFactory.GetPrimaryBusHVACSystemType_Conventional_HEV().GetElement(auxData)
......@@ -84,7 +84,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.
return new XElement(_mrf + XMLNames.Component_Auxiliaries,
new XElement(_mrf + "CoolingFanTechnology",
auxData.FanTechnology),
new XElement(_mrf + "SteeringPumpTechnology", string.Join("\n", steeringPumpData)),
steeringPumpData.Select(x => new XElement(_mrf + "SteeringPumpTechnology", x)),
_mrfFactory.GetPrimaryBusElectricSystemType_Conventional_HEV().GetElement(auxData),
_mrfFactory.GetPrimaryBusPneumaticSystemType_HEV_S().GetElement(auxData),
......@@ -106,7 +106,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.
var steeringPumpData = auxData.SteeringPumpTechnology;
return new XElement(_mrf + XMLNames.Component_Auxiliaries,
new XElement(_mrf + "SteeringPumpTechnology", string.Join("\n", steeringPumpData)),
steeringPumpData.Select(x => new XElement(_mrf + "SteeringPumpTechnology", x)),
_mrfFactory.GetPrimaryBusElectricSystemType_PEV().GetElement(auxData),
_mrfFactory.GetPrimaryBusPneumaticSystemType_PEV_IEPC().GetElement(auxData)
//_mrfFactory.GetPrimaryBusHVACSystemType_PEV().GetXmlType(auxData)
......
......@@ -21,10 +21,9 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.
var pneumaticSystemData = auxData.Auxiliaries.Single(aux => aux.Type == AuxiliaryType.PneumaticSystem);
return new XElement(_mrf + XMLNames.Component_Auxiliaries,
new XElement(_mrf + "CoolingFanTechnology",
string.Join("\n", fanData.Technology)),
new XElement(_mrf + "SteeringPumpTechnology", string.Join("\n", steeringPumpData.Technology)),
new XElement(_mrf + XMLNames.BusAux_PneumaticSystem, new XElement(_mrf + XMLNames.Auxiliaries_Auxiliary_Technology, string.Join("\n", pneumaticSystemData.Technology))),
new XElement(_mrf + "CoolingFanTechnology", fanData.Technology.Single()),
steeringPumpData.Technology.Select(x => new XElement(_mrf + "SteeringPumpTechnology", x)),
new XElement(_mrf + XMLNames.BusAux_PneumaticSystem, new XElement(_mrf + XMLNames.Auxiliaries_Auxiliary_Technology, pneumaticSystemData.Technology.Single())),
new XElement(_mrf + XMLNames.BusAux_ElectricSystem, new XElement(_mrf + "LEDHeadLights", electricSystemData.Technology.Contains("Standard technology - LED headlights, all"))));
}
}
......@@ -50,8 +49,8 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.
var pneumaticSystemData = auxData.Auxiliaries.Single(aux => aux.Type == AuxiliaryType.PneumaticSystem);
return new XElement(_mrf + XMLNames.Component_Auxiliaries,
new XElement(_mrf + "SteeringPumpTechnology", string.Join("\n", steeringPumpData.Technology)),
new XElement(_mrf + XMLNames.BusAux_PneumaticSystem, new XElement(_mrf + XMLNames.Auxiliaries_Auxiliary_Technology, string.Join("\n", pneumaticSystemData.Technology))),
steeringPumpData.Technology.Select(x => new XElement(_mrf + "SteeringPumpTechnology", x)),
new XElement(_mrf + XMLNames.BusAux_PneumaticSystem, new XElement(_mrf + XMLNames.Auxiliaries_Auxiliary_Technology, pneumaticSystemData.Technology.Single())),
new XElement(_mrf + XMLNames.BusAux_ElectricSystem, new XElement(_mrf + "LEDHeadLights", electricSystemData.Technology.Contains("Standard technology - LED headlights, all"))));
}
......
......@@ -1217,7 +1217,7 @@
</xs:group>
<xs:group name="LorryAuxGroup">
<xs:sequence>
<xs:element name="SteeringPumpTechnology" type="v2.4:AuxSPTechnologyLorryType"/>
<xs:element name="SteeringPumpTechnology" type="v2.4:AuxSPTechnologyLorryType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:group>
<xs:group name="ConventionalCompletedBusAuxGroup">
......
......@@ -1475,7 +1475,7 @@
<xs:complexType name="ConventionalLorryAuxOutputType">
<xs:sequence>
<xs:element name="CoolingFanTechnology" type="v2.4:AuxFanTechnologyLorryType"/>
<xs:element name="SteeringPumpTechnology" type="v2.4:AuxSPTechnologyLorryType"/>
<xs:element name="SteeringPumpTechnology" type="v2.4:AuxSPTechnologyLorryType" maxOccurs="unbounded"/>
<xs:element name="PneumaticSystem" type="mrf:PneumaticSystemType_1"/>
<xs:element name="ElectricSystem" type="mrf:LorryElectricSystemType"/>
</xs:sequence>
......@@ -1483,14 +1483,14 @@
<xs:complexType name="HEVLorryAuxOutputType">
<xs:sequence>
<xs:element name="CoolingFanTechnology" type="v2.4:AuxFanTechnologyLorryType"/>
<xs:element name="SteeringPumpTechnology" type="v2.4:AuxSPTechnologyLorryType"/>
<xs:element name="SteeringPumpTechnology" type="v2.4:AuxSPTechnologyLorryType" maxOccurs="unbounded"/>
<xs:element name="PneumaticSystem" type="mrf:PneumaticSystemType_1"/>
<xs:element name="ElectricSystem" type="mrf:LorryElectricSystemType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PEVLorryAuxOutputType">
<xs:sequence>
<xs:element name="SteeringPumpTechnology" type="v2.4:AuxSPTechnologyLorryType"/>
<xs:element name="SteeringPumpTechnology" type="v2.4:AuxSPTechnologyLorryType" maxOccurs="unbounded"/>
<xs:element name="PneumaticSystem" type="mrf:PneumaticSystemType_1"/>
<xs:element name="ElectricSystem" type="mrf:LorryElectricSystemType"/>
</xs:sequence>
......@@ -1498,7 +1498,7 @@
<xs:complexType name="Conventional_HEV_Px_PrimaryBusAuxOutputType">
<xs:sequence>
<xs:element name="CoolingFanTechnology" type="v2.4:AuxFanTechnologyPrimaryBusType"/>
<xs:element name="SteeringPumpTechnology" type="v2.4:AuxSPTechnologyPrimaryBusType"/>
<xs:element name="SteeringPumpTechnology" type="v2.4:AuxSPTechnologyPrimaryBusType" maxOccurs="unbounded"/>
<xs:element name="ElectricSystem" type="mrf:PrimaryBusElectricSystemType_Conventional_HEV"/>
<xs:element name="PneumaticSystem" type="mrf:PneumaticSystemType_PrimaryBus_Conventional_HEV_P"/>
<xs:element name="HVACSystem" type="mrf:HVACSystemType"/>
......@@ -1507,7 +1507,7 @@
<xs:complexType name="HEVPrimaryBusAuxOutputType">
<xs:sequence>
<xs:element name="CoolingFanTechnology" type="v2.4:AuxFanTechnologyPrimaryBusType"/>
<xs:element name="SteeringPumpTechnology" type="v2.4:AuxSPTechnologyPrimaryBusType"/>
<xs:element name="SteeringPumpTechnology" type="v2.4:AuxSPTechnologyPrimaryBusType" maxOccurs="unbounded"/>
<xs:element name="ElectricSystem" type="mrf:PrimaryBusElectricSystemType_Conventional_HEV"/>
<xs:element name="PneumaticSystem" type="mrf:PneumaticSystemType_PrimaryBus_HEV_S"/>
<xs:element name="HVACSystem">
......@@ -1519,7 +1519,7 @@
</xs:complexType>
<xs:complexType name="PEVPrimaryBusAuxOutputType">
<xs:sequence>
<xs:element name="SteeringPumpTechnology" type="v2.4:AuxSPTechnologyPrimaryBusType"/>
<xs:element name="SteeringPumpTechnology" type="v2.4:AuxSPTechnologyPrimaryBusType" maxOccurs="unbounded"/>
<xs:element name="ElectricSystem" type="mrf:PrimaryBusElectricSystemType_PEV"/>
<xs:element name="PneumaticSystem" type="mrf:PneumaticSystemType_PrimaryBus_PEV_IEPC"/>
</xs:sequence>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment