diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/Components/VIFAuxiliaryType.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/Components/VIFAuxiliaryType.cs index 4c8afdea77f15f6e008d44792370819c6a8d18a4..788f99215903d8fcfe8dc4ad762d11e4f68a41e5 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/Components/VIFAuxiliaryType.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/Components/VIFAuxiliaryType.cs @@ -18,7 +18,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF #region Implementation of IXmlTypeWriter - public XElement GetElement(IDeclarationInputDataProvider inputData) + public virtual XElement GetElement(IDeclarationInputDataProvider inputData) { var aux = inputData.JobInputData.Vehicle.Components.BusAuxiliaries; if (aux != null) @@ -36,7 +36,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF )); } - private XElement GetSteeringPumpElement(IList<string> steeringPumps) + protected virtual XElement GetSteeringPumpElement(IList<string> steeringPumps) { var result = new List<XElement>(); for (int i = 0; i < steeringPumps.Count; i++) @@ -49,7 +49,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF } - private XElement GetElectricSystem(IElectricSupplyDeclarationData electricSupply) + protected virtual XElement GetElectricSystem(IElectricSupplyDeclarationData electricSupply) { var alternatorTech = new XElement(_vif + XMLNames.Bus_AlternatorTechnology, electricSupply.AlternatorTechnology.ToXMLFormat()); @@ -106,7 +106,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF } - private XElement GetPneumaticSystem(IPneumaticSupplyDeclarationData pSupply, IPneumaticConsumersDeclarationData pConsumer) + protected virtual XElement GetPneumaticSystem(IPneumaticSupplyDeclarationData pSupply, IPneumaticConsumersDeclarationData pConsumer) { return new XElement(_vif + XMLNames.BusAux_PneumaticSystem, @@ -121,7 +121,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF ); } - private string GetXMLAirsuspensionControl(ConsumerTechnology airsuspensionControl) + protected string GetXMLAirsuspensionControl(ConsumerTechnology airsuspensionControl) { switch (airsuspensionControl) { @@ -135,7 +135,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF } - private XElement GetHvac(IHVACBusAuxiliariesDeclarationData hvac) + protected virtual XElement GetHvac(IHVACBusAuxiliariesDeclarationData hvac) { return new XElement(new XElement(_vif + XMLNames.BusAux_HVAC, new XElement(_vif + XMLNames.Bus_AdjustableCoolantThermostat, hvac.AdjustableCoolantThermostat), @@ -144,4 +144,56 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF #endregion } + + public class VIFAuxiliaryHevSType : VIFAuxiliaryType + { + public VIFAuxiliaryHevSType(IVIFReportFactory vifFactory) : base(vifFactory) { } + + + #region Overrides of VIFAuxiliaryType + + public override XElement GetElement(IDeclarationInputDataProvider inputData) + { + var aux = inputData.JobInputData.Vehicle.Components.BusAuxiliaries; + if (aux != null) + return null; + + return new XElement(_vif + XMLNames.Component_Auxiliaries, + new XElement(_vif + XMLNames.ComponentDataWrapper, + new XAttribute(_xsi + "type", "vif:AUX_HEV-S_PrimaryBusType"), + new XElement(_vif + XMLNames.BusAux_Fan, + new XElement(_vif + XMLNames.Auxiliaries_Auxiliary_Technology, aux.FanTechnology)), + GetSteeringPumpElement(aux.SteeringPumpTechnology), + GetElectricSystem(aux.ElectricSupply), + GetPneumaticSystem(aux.PneumaticSupply, aux.PneumaticConsumers), + GetHvac(aux.HVACAux) + )); + } + + + protected override XElement GetElectricSystem(IElectricSupplyDeclarationData electricSupply) + { + return new XElement(_vif + XMLNames.BusAux_ElectricSystem, + new XElement(_vif + XMLNames.BusAux_ElectricSystem_AlternatorTechnology, + electricSupply.AlternatorTechnology.ToXMLFormat()), + new XElement(_vif + XMLNames.BusAux_ElectricSystem_SupplyFromHEVPossible, + electricSupply.ESSupplyFromHEVREESS)); + } + + + protected override XElement GetPneumaticSystem(IPneumaticSupplyDeclarationData pSupply, IPneumaticConsumersDeclarationData pConsumer) + { + return new XElement(_vif + XMLNames.BusAux_PneumaticSystem, + new XElement(_vif + XMLNames.Bus_SizeOfAirSupply, pSupply.CompressorSize), + new XElement(_vif + XMLNames.CompressorDrive, pSupply.CompressorDrive.GetLabel()), + new XElement(_vif + XMLNames.Vehicle_Clutch, pSupply.Clutch), + new XElement(_vif + XMLNames.Bus_CompressorRatio, pSupply.Ratio.ToXMLFormat(3)), + new XElement(_vif + XMLNames.Bus_SmartRegenerationSystem, pSupply.SmartRegeneration), + new XElement(_vif + XMLNames.Bus_AirsuspensionControl, GetXMLAirsuspensionControl(pConsumer.AirsuspensionControl)), + new XElement(_vif + XMLNames.BusAux_PneumaticSystem_SCRReagentDosing, pConsumer.AdBlueDosing == ConsumerTechnology.Pneumatically) + ); + } + + #endregion + } } \ No newline at end of file diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/IVIFReportFactory.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/IVIFReportFactory.cs index 3f6046cc4d62914b52e4cc0e1dd24a9e74111d71..d1f2dadf3ec70764bff32bbbf0164ecae7c00e3b 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/IVIFReportFactory.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/IVIFReportFactory.cs @@ -30,10 +30,11 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF #region Components - + IXmlTypeWriter GetAdasType(); IXmlTypeWriter GetAngelDriveType(); IXmlTypeWriter GetAuxiliaryType(); + IXmlTypeWriter GetAuxiliaryHevSType(); IXmlTypeWriter GetAxlegearType(); IXmlTypeWriter GetAxleWheelsType(); IXmlTypeWriter GetBoostingLimitationsType(); diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/VIFNinjectModule.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/VIFNinjectModule.cs index 0b9ef89dc9eb101e49f01b33ca76bfffa5a58b7e..8aa5affb21fb6f13d6f32cede5868f9c77482c18 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/VIFNinjectModule.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/VIFNinjectModule.cs @@ -85,6 +85,9 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF Bind<IXmlTypeWriter>().To<VIFAuxiliaryType>().When(AccessedViaVIFFactory) .NamedLikeFactoryMethod((IVIFReportFactory f) => f.GetAuxiliaryType()); + Bind<IXmlTypeWriter>().To<VIFAuxiliaryHevSType>().When(AccessedViaVIFFactory) + .NamedLikeFactoryMethod((IVIFReportFactory f) => f.GetAuxiliaryHevSType()); + Bind<IXmlTypeWriter>().To<VIFAxlegearType>().When(AccessedViaVIFFactory) .NamedLikeFactoryMethod((IVIFReportFactory f) => f.GetAxlegearType());