Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 94534602 authored by Franz KOBER josef's avatar Franz KOBER josef
Browse files

added IEPC primary bus to reader

parent ebe4db7d
No related branches found
No related tags found
No related merge requests found
......@@ -25,11 +25,13 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
public const string XSD_HEV_P_TYPE = "AUX_HEV-P_PrimaryBusType";
public const string XSD_HEV_S_TYPE = "AUX_HEV-S_PrimaryBusType";
public const string XSD_PEV_E2_TYPE = "AUX_PEV_PrimaryBusType";
public const string XSD_IEPC_PRIMARY_BUS_TYPE = "AUX_IEPC_PrimaryBusType";
public static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public static readonly string QUALIFIED_XSD_HEV_P_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_HEV_P_TYPE);
public static readonly string QUALIFIED_XSD_HEV_S_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_HEV_S_TYPE);
public static readonly string QUALIFIED_XSD_PEV_E2_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_PEV_E2_TYPE);
public static readonly string QUALIFIED_XSD_IEPC_PRIMARY_BUS_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_IEPC_PRIMARY_BUS_TYPE);
public XMLDeclarationPrimaryBusAuxiliariesDataProviderV210(
IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile) : base(componentNode) { }
......
......@@ -479,4 +479,16 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
public XMLDeclarationIEPCHeavyLorryComponentDataV210(IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile)
: base(vehicle, componentNode, sourceFile) { }
}
// ---------------------------------------------------------------------------------------
public class XMLDeclarationIEPCPrimaryBusComponentDataV210 : XMLDeclarationPrimaryBusComponentsDataProviderV210
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS;
public new const string XSD_TYPE = "Components_IEPC_PrimaryBusType";
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLDeclarationIEPCPrimaryBusComponentDataV210(IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile)
: base(vehicle, componentNode, sourceFile) { }
}
}
\ No newline at end of file
......@@ -1497,4 +1497,23 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
#endregion
}
// ---------------------------------------------------------------------------------------
public class XMLDeclarationIEPCPrimaryBusDataProviderV210 : XMLDeclarationIEPCMediumLorryDataProviderV210
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS;
public new const string XSD_TYPE = "Vehicle_IEPC_PrimaryBusDeclarationType";
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLDeclarationIEPCPrimaryBusDataProviderV210(IXMLDeclarationJobInputData jobData, XmlNode xmlNode, string sourceFile)
: base(jobData, xmlNode, sourceFile) { }
#region Overrides of XMLDeclarationVehicleDataProviderV10
public override CubicMeter CargoVolume => null;
#endregion
}
}
\ No newline at end of file
......@@ -67,6 +67,10 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules
Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationIEPCMediumLorryDataProviderV210>()
.Named(XMLDeclarationIEPCMediumLorryDataProviderV210.QUALIFIED_XSD_TYPE);
Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationIEPCPrimaryBusDataProviderV210>()
.Named(XMLDeclarationIEPCPrimaryBusDataProviderV210.QUALIFIED_XSD_TYPE);
Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationCompletedBusComponentsDataProviderV210>()
.Named(XMLDeclarationCompletedBusComponentsDataProviderV210.QUALIFIED_XSD_TYPE);
......@@ -121,6 +125,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules
Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationIEPCHeavyLorryComponentDataV210>()
.Named(XMLDeclarationIEPCHeavyLorryComponentDataV210.QUALIFIED_XSD_TYPE);
Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationIEPCPrimaryBusComponentDataV210>()
.Named(XMLDeclarationIEPCPrimaryBusComponentDataV210.QUALIFIED_XSD_TYPE);
Bind<IXMLComponentReader>().To<XMLComponentReaderV210_CompletedBus>().Named(XMLComponentReaderV210_CompletedBus.QUALIFIED_XSD_TYPE);
Bind<IXMLComponentReader>().To<XMLComponentReaderV210_HEV_PxHeavyLorry>().Named(XMLComponentReaderV210_HEV_PxHeavyLorry.QUALIFIED_XSD_TYPE);
......@@ -170,12 +177,18 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules
Bind<IXMLComponentReader>().To<XMLIEPCHeavyLorryComponentReaderV201>()
.Named(XMLIEPCHeavyLorryComponentReaderV201.QUALIFIED_XSD_TYPE);
Bind<IXMLComponentReader>().To<XMLIEPCPrimaryBusComponentReaderV201>()
.Named(XMLIEPCPrimaryBusComponentReaderV201.QUALIFIED_XSD_TYPE);
Bind<IXMLGearboxReader>().To<XMLGearboxDeclarationComponentReaderV201>()
.Named(XMLGearboxDeclarationComponentReaderV201.GEARBOX_READER_QUALIFIED_XSD_TYPE);
Bind<IXMLAuxiliaryReader>().To<XMLAuxiliaryDeclarationComponentReaderV201>()
.Named(XMLAuxiliaryDeclarationComponentReaderV201.AUXILIARIES_READER_QUALIFIED_XSD_TYPE);
Bind<IXMLAuxiliaryReader>().To<XMLAuxiliaryDeclarationComponentReaderV201>()
.Named(XMLAuxiliaryDeclarationComponentReaderV201.AUXILIARIES_READER_IEPC_PRIMARY_QUALIFIED_XSD_TYPE);
Bind<IXMLElectricMachineSystemReader>().To<XMLElectricMachineSystemReaderV210>().Named(XMLElectricMachineSystemReaderV210.QUALIFIED_XSD_TYPE);
Bind<IXMLElectricMachineSystemReader>().To<XMLElectricMachineSystemReaderV210>().Named(XMLElectricMachineSystemReaderV210.QUALIFIED_GEN_XSD_TYPE);
......@@ -230,6 +243,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules
Bind<IXMLBusAuxiliariesDeclarationData>().To<XMLDeclarationPrimaryBusAuxiliariesDataProviderV210>()
.Named(XMLDeclarationPrimaryBusAuxiliariesDataProviderV210.QUALIFIED_XSD_PEV_E2_TYPE);
Bind<IXMLBusAuxiliariesDeclarationData>().To<XMLDeclarationPrimaryBusAuxiliariesDataProviderV210>()
.Named(XMLDeclarationPrimaryBusAuxiliariesDataProviderV210.QUALIFIED_XSD_IEPC_PRIMARY_BUS_TYPE);
Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationMediumLorryVehicleDataProviderV210>()
.Named(XMLDeclarationMediumLorryVehicleDataProviderV210.QUALIFIED_XSD_TYPE);
......
......@@ -978,7 +978,40 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl
#endregion
}
// ---------------------------------------------------------------------------------------
public class XMLIEPCPrimaryBusComponentReaderV201 : XMLIEPCHeavyLorryComponentReaderV201
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS;
public new const string XSD_TYPE = "Components_IEPC_PrimaryBusType";
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
private IBusAuxiliariesDeclarationData _busAuxInputData;
public XMLIEPCPrimaryBusComponentReaderV201(IXMLDeclarationVehicleData vehicle, XmlNode componentsNode)
: base(vehicle, componentsNode) { }
#region Overrides of XMLComponentReaderV10
public override IAuxiliariesDeclarationInputData AuxiliaryData => null;
#endregion
#region Overrides of XMLIEPCHeavyLorryComponentReaderV201
public override IBusAuxiliariesDeclarationData BusAuxiliariesInputData =>
_busAuxInputData ?? (_busAuxInputData = CreateComponent(XMLNames.Component_Auxiliaries, BusAuxCreator));
#endregion
protected virtual IBusAuxiliariesDeclarationData BusAuxCreator(string version, XmlNode componentNode, string sourceFile)
{
return Factory.CreateBusAuxiliaires(version, Vehicle, componentNode, sourceFile);
}
}
// ---------------------------------------------------------------------------------------
public class XMLGearboxDeclarationComponentReaderV201 : XMLComponentReaderV10
......@@ -997,7 +1030,12 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS;
public new const string AUX_READER_TYPE = "AUX_IEPC_LorryDataType";
public const string AUX_IEPC_READER_TYPE = "AUX_IEPC_PrimaryBusType";
public new static readonly string AUXILIARIES_READER_QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI, AUX_READER_TYPE);
public static readonly string AUXILIARIES_READER_IEPC_PRIMARY_QUALIFIED_XSD_TYPE =
XMLHelper.CombineNamespace(NAMESPACE_URI, AUX_IEPC_READER_TYPE);
public XMLAuxiliaryDeclarationComponentReaderV201(IXMLDeclarationVehicleData vehicle, XmlNode componentsNode)
: base(vehicle, componentsNode) { }
}
......
......@@ -1399,6 +1399,34 @@ namespace TUGraz.VectoCore.Tests.XML
}
[TestCase(@"PrimaryBus\IEPC_primaryBus.xml")]
public void TestIEPCPrimaryBus(string jobfile)
{
var filename = Path.Combine(BASE_DIR, jobfile);
var dataProvider = xmlInputReader.CreateDeclaration(XmlReader.Create(filename));
Assert.NotNull(dataProvider.JobInputData);
var vehicle = dataProvider.JobInputData.Vehicle;
Assert.NotNull(vehicle);
Assert.IsNull(vehicle.Components.EngineInputData);
Assert.IsNull(vehicle.Components.ElectricMachines);
Assert.IsNotNull(vehicle.Components.IEPC);
Assert.IsNull(vehicle.Components.GearboxInputData);
Assert.IsNull(vehicle.Components.TorqueConverterInputData);
Assert.IsNull(vehicle.Components.AngledriveInputData);
Assert.IsNotNull(vehicle.Components.RetarderInputData);
Assert.IsNotNull(vehicle.Components.AxleGearInputData);
Assert.IsNotNull(vehicle.Components.AxleWheels);
Assert.IsNull(vehicle.Components.AuxiliaryInputData);
Assert.IsNotNull(vehicle.Components.BusAuxiliaries);
Assert.IsNull(vehicle.Components.AirdragInputData);
Assert.IsNotNull(vehicle.Components.ElectricStorage);
Assert.IsNull(vehicle.Components.PTOTransmissionInputData);
Assert.IsNull(vehicle.CargoVolume);
Assert.IsNull(vehicle.TorqueLimits);
Assert.IsNull(vehicle.ElectricMotorTorqueLimits);
Assert.IsNull(vehicle.MaxPropulsionTorque);
}
#region Test existence of torque converter
private void TestTorqueConverter(IVehicleDeclarationInputData vehicle)
......
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