Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit ae809ebf authored by Harald Martini's avatar Harald Martini
Browse files

Merge branch 'feature/VECTO-1410-multistage-tool-buses' of...

Merge branch 'feature/VECTO-1410-multistage-tool-buses' of git+ssh://129.27.107.191:2211/vecto-dev into feature/VECTO-1410-multistage-tool-buses
parents 44731022 aa73e15f
No related branches found
No related tags found
No related merge requests found
Showing
with 238 additions and 43 deletions
......@@ -619,6 +619,7 @@ Public Class DummyVehicle
Public Property Identifier As String Implements IVehicleDeclarationInputData.Identifier
Public Property ExemptedVehicle As Boolean Implements IVehicleDeclarationInputData.ExemptedVehicle
Public Property VIN As String Implements IVehicleDeclarationInputData.VIN
Public ReadOnly Property LegislativeCategory As String Implements IVehicleDeclarationInputData.LegislativeCategory
Public Property LegislativeClass As LegislativeClass? Implements IVehicleDeclarationInputData.LegislativeClass
Public Property VehicleCategory As VehicleCategory Implements IVehicleDeclarationInputData.VehicleCategory
Public Property AxleConfiguration As AxleConfiguration Implements IVehicleDeclarationInputData.AxleConfiguration
......
......@@ -801,6 +801,7 @@ Public Class MockEngineeringVehicle
Public Property Identifier As String Implements IVehicleDeclarationInputData.Identifier
Public Property ExemptedVehicle As Boolean Implements IVehicleDeclarationInputData.ExemptedVehicle
Public Property VIN As String Implements IVehicleDeclarationInputData.VIN
Public ReadOnly Property LegislativeCategory As String Implements IVehicleDeclarationInputData.LegislativeCategory
Public Property LegislativeClass As LegislativeClass? Implements IVehicleDeclarationInputData.LegislativeClass
Public Property VehicleCategory As VehicleCategory Implements IVehicleDeclarationInputData.VehicleCategory
Public Property AxleConfiguration As AxleConfiguration Implements IVehicleDeclarationInputData.AxleConfiguration
......
......@@ -19,6 +19,7 @@ Public Class MockVehicleInputData
Public Property Identifier As String Implements IVehicleDeclarationInputData.Identifier
Public Property ExemptedVehicle As Boolean Implements IVehicleDeclarationInputData.ExemptedVehicle
Public Property VIN As String Implements IVehicleDeclarationInputData.VIN
Public ReadOnly Property LegislativeCategory As String Implements IVehicleDeclarationInputData.LegislativeCategory
Public Property LegislativeClass As LegislativeClass? Implements IVehicleDeclarationInputData.LegislativeClass
Public Property VehicleCategory As VehicleCategory Implements IVehicleDeclarationInputData.VehicleCategory
Public Property AxleConfiguration As AxleConfiguration Implements IVehicleDeclarationInputData.AxleConfiguration
......
......@@ -362,6 +362,8 @@ Public Class Vehicle
End Get
End Property
Public ReadOnly Property LegislativeCategory As String Implements IVehicleDeclarationInputData.LegislativeCategory
Public ReadOnly Property LegislativeClass As LegislativeClass? Implements IVehicleEngineeringInputData.LegislativeClass
Get
Return legClass
......@@ -406,6 +408,9 @@ Public Class Vehicle
End Get
End Property
Public ReadOnly Property TransferredAirDragArea As SquareMeter Implements IAirdragDeclarationInputData.TransferredAirDragArea
Public ReadOnly Property AirDragArea_0 As SquareMeter Implements IAirdragDeclarationInputData.AirDragArea_0
Public ReadOnly Property IVehicleEngineeringInputData_Axles As IList(Of IAxleEngineeringInputData) _
Implements IAxlesEngineeringInputData.AxlesEngineering
Get
......
......@@ -232,7 +232,7 @@ namespace TUGraz.VectoCommon.BusAuxiliaries
}
}
public static string GetLabel(this HeatPumpType type)
public static string GetLabel(this HeatPumpType? type)
{
switch (type) {
case HeatPumpType.none: return NONE;
......@@ -244,15 +244,6 @@ namespace TUGraz.VectoCommon.BusAuxiliaries
default: return null;
}
}
public static string GetLabel(this HeatPumpType? type)
{
if (type.HasValue) {
return type.Value.GetLabel();
} else {
return null;
}
}
}
......@@ -287,7 +278,7 @@ namespace TUGraz.VectoCommon.BusAuxiliaries
}
}
public static string GetLabel(this HeatPumpMode type)
public static string GetLabel(this HeatPumpMode? type)
{
switch (type)
{
......
......@@ -47,7 +47,8 @@ namespace TUGraz.VectoCommon.Hashing
Vehicle,
VectoOutput,
VectoCustomerInformation,
VectoPrimaryVehicleInformation
VectoPrimaryVehicleInformation,
VectoManufacturingStage
}
public static class VectoComponentsExtensionMethods
......@@ -79,6 +80,8 @@ namespace TUGraz.VectoCommon.Hashing
return "VectoCustomerInformation";
case VectoComponents.VectoPrimaryVehicleInformation:
return "VectoOutputPrimaryVehicle";
case VectoComponents.VectoManufacturingStage:
return "ManufacturingStage";
default:
throw new ArgumentOutOfRangeException("VectoComponents", component, null);
}
......@@ -109,6 +112,10 @@ namespace TUGraz.VectoCommon.Hashing
return "COC-";
case VectoComponents.VectoPrimaryVehicleInformation:
return "PIF-";
case VectoComponents.Vehicle:
return "VEH-";
case VectoComponents.VectoManufacturingStage:
return "MST-";
default:
throw new ArgumentOutOfRangeException("VectoComponents", component, null);
}
......
......@@ -99,6 +99,8 @@ namespace TUGraz.VectoCommon.InputData
string VIN { get; }
string LegislativeCategory { get; }
LegislativeClass? LegislativeClass { get; }
/// <summary>
......@@ -280,7 +282,7 @@ namespace TUGraz.VectoCommon.InputData
public static string ToXMLFormat(this PredictiveCruiseControlType pcc)
{
return pcc.ToString().ToLowerInvariant().Replace(Prefix, "").Replace(SeparatorEnum, SeparatorXML);
return pcc.ToString().ToLowerInvariant().Replace(Prefix.ToLowerInvariant(), "").Replace(SeparatorEnum, SeparatorXML);
}
public static string GetName(this PredictiveCruiseControlType pcc)
......@@ -853,6 +855,7 @@ namespace TUGraz.VectoCommon.InputData
public interface IPneumaticSupplyDeclarationData
{
CompressorDrive CompressorDrive { get; }
string Clutch { get; }
double Ratio { get; }
......@@ -984,4 +987,37 @@ namespace TUGraz.VectoCommon.InputData
}
}
}
public enum CompressorDrive
{
electrically,
mechanically
}
public static class CompressorDriveHelper
{
public static CompressorDrive Parse(string parse)
{
switch (parse)
{
case nameof(CompressorDrive.electrically):
return CompressorDrive.electrically;
case nameof(CompressorDrive.mechanically):
return CompressorDrive.mechanically;
default:
throw new ArgumentOutOfRangeException();
}
}
public static string GetLabel(this CompressorDrive type)
{
switch (type)
{
case CompressorDrive.electrically: return nameof(CompressorDrive.electrically);
case CompressorDrive.mechanically: return nameof(CompressorDrive.electrically);
default: return null;
}
}
}
}
\ No newline at end of file
......@@ -115,7 +115,7 @@ namespace TUGraz.VectoCommon.InputData
public interface IMultistageVIFInputData : IInputDataProvider
{
IVehicleDeclarationInputData VehicleInputData { get; }
IMultistageBusInputDataProvider MultistageInputData { get; }
IMultistageBusInputDataProvider MultistageJobInputData { get; }
}
}
......
......@@ -627,6 +627,15 @@ namespace TUGraz.VectoCommon.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to DoorDriveTechnology.
/// </summary>
public static string Bus_DoorDriveTechnology {
get {
return ResourceManager.GetString("Bus_DoorDriveTechnology", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to DoubleGlazing.
/// </summary>
......@@ -906,6 +915,15 @@ namespace TUGraz.VectoCommon.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to VehicleDeclarationType.
/// </summary>
public static string Bus_VehicleDeclarationType {
get {
return ResourceManager.GetString("Bus_VehicleDeclarationType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to VehicleLength.
/// </summary>
......@@ -978,6 +996,24 @@ namespace TUGraz.VectoCommon.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to HVAC.
/// </summary>
public static string BusAux_HVAC {
get {
return ResourceManager.GetString("BusAux_HVAC", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to LEDLights.
/// </summary>
public static string BusAux_LEDLights {
get {
return ResourceManager.GetString("BusAux_LEDLights", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to PneumaticSystem.
/// </summary>
......@@ -1032,6 +1068,15 @@ namespace TUGraz.VectoCommon.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to SCRReagentDosing.
/// </summary>
public static string BusAux_PneumaticSystem_SCRReagentDosing {
get {
return ResourceManager.GetString("BusAux_PneumaticSystem_SCRReagentDosing", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to SmartCompressionSystem.
/// </summary>
......@@ -1329,6 +1374,15 @@ namespace TUGraz.VectoCommon.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to CompressorDrive.
/// </summary>
public static string CompressorDrive {
get {
return ResourceManager.GetString("CompressorDrive", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Signature.
/// </summary>
......@@ -3696,6 +3750,15 @@ namespace TUGraz.VectoCommon.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to BodyworkCode.
/// </summary>
public static string Vehicle_BodyworkCode {
get {
return ResourceManager.GetString("Vehicle_BodyworkCode", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to CargoVolume.
/// </summary>
......
......@@ -1488,7 +1488,28 @@
<data name="VehicleAttr_VehicleDeclarationType" xml:space="preserve">
<value>VehicleDeclarationType</value>
</data>
<data name="BusAux_PneumaticSystem_SCRReagentDosing" xml:space="preserve">
<value>SCRReagentDosing</value>
</data>
<data name="AirDragArea_TransferredCdxA" xml:space="preserve">
<value>TransferredCdxA</value>
</data>
<data name="Bus_VehicleDeclarationType" xml:space="preserve">
<value>VehicleDeclarationType</value>
</data>
<data name="Vehicle_BodyworkCode" xml:space="preserve">
<value>BodyworkCode</value>
</data>
<data name="BusAux_LEDLights" xml:space="preserve">
<value>LEDLights</value>
</data>
<data name="Bus_DoorDriveTechnology" xml:space="preserve">
<value>DoorDriveTechnology</value>
</data>
<data name="BusAux_HVAC" xml:space="preserve">
<value>HVAC</value>
</data>
<data name="CompressorDrive" xml:space="preserve">
<value>CompressorDrive</value>
</data>
</root>
\ No newline at end of file
......@@ -223,6 +223,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
get { return VehicleData.VIN; }
}
public string LegislativeCategory
{
get { return null; }
}
public LegislativeClass? LegislativeClass
{
get { return VehicleData.LegislativeClass; }
......
......@@ -608,6 +608,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
#region Implementation of IPneumaticSupplyDeclarationData
public CompressorDrive CompressorDrive { get; }
public string Clutch { get; }
public virtual double Ratio { get { return Body["Aux"]?["PneumaticSupply"]?.GetEx<double>("Ratio") ?? 0.0; } }
public virtual string CompressorSize
......
......@@ -238,6 +238,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
get { return Constants.NOT_AVailABLE; }
}
public string LegislativeCategory
{
get { return null; }
}
public virtual LegislativeClass? LegislativeClass
{
get {
......
......@@ -107,4 +107,26 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
get { return NAMESPACE_URI; }
}
}
// ---------------------------------------------------------------------------------------
public class XMLDeclarationAxlesDataProviderV01 : XMLDeclarationAxlesDataProviderV10
{
public new static XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_MULTISTAGE_BUS_VEHICLE_NAMESPACE_VO1;
public new const string XSD_TYPE = "AxleWheelsDataPIFType";
public new static readonly string QUALIFIED_XSD_TYPE =
XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLDeclarationAxlesDataProviderV01(
IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile) : base(
vehicle, componentNode, sourceFile) { }
protected override XNamespace SchemaNamespace
{
get { return NAMESPACE_URI; }
}
}
}
......@@ -128,7 +128,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
get
{
return GetBool(
new[] { XMLNames.BusAux_PneumaticSystem, XMLNames.BusAux_PneumaticSystem_AdBlueDosing })
new[] { XMLNames.BusAux_PneumaticSystem, XMLNames.BusAux_PneumaticSystem_SCRReagentDosing })
? ConsumerTechnology.Pneumatically
: ConsumerTechnology.Electrically;
}
......@@ -138,6 +138,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
#region Implementation of IPneumaticSupplyDeclarationData
public CompressorDrive CompressorDrive
{
get { return CompressorDriveHelper.Parse(GetString(XMLNames.CompressorDrive)); }
}
public virtual string Clutch { get { return GetString(new[] { XMLNames.BusAux_PneumaticSystem, "Clutch" }); } }
public virtual double Ratio
......@@ -242,6 +247,24 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
#endregion
}
public class XMLDeclarationPrimaryBusAuxiliariesDataProviderV01 : XMLDeclarationPrimaryBusAuxiliariesDataProviderV26
{
public new static XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_MULTISTAGE_BUS_VEHICLE_NAMESPACE_VO1;
public new const string XSD_TYPE = "AuxiliaryDataPIFType";
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLDeclarationPrimaryBusAuxiliariesDataProviderV01(IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile)
: base(vehicle, componentNode, sourceFile) { }
public override XmlNode XMLSource
{
get { return BaseNode; }
}
}
public class XMLDeclarationCompleteBusAuxiliariesDataProviderV26 : XMLDeclarationPrimaryBusAuxiliariesDataProviderV26, IElectricConsumersDeclarationData
{
public new static XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V26;
......
......@@ -291,33 +291,26 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
public class XMLDeclarationVIFInputData : IMultistageVIFInputData
{
private readonly IMultistageBusInputDataProvider _multistageJobInputData;
private readonly IVehicleDeclarationInputData _vehicleInput;
private readonly IXMLInputDataReader _xmlInputReader;
public XMLDeclarationVIFInputData(string vifFileName, IVehicleDeclarationInputData vehicleInput)
public XMLDeclarationVIFInputData(IMultistageBusInputDataProvider multistageJobInputData,
IVehicleDeclarationInputData vehicleInput)
{
var kernel = new StandardKernel(new VectoNinjectModule());
_xmlInputReader = kernel.Get<IXMLInputDataReader>();
VehicleInputData = vehicleInput;
MultistageInputData = CreateMultistageReader(vifFileName);
_multistageJobInputData = multistageJobInputData;
_vehicleInput = vehicleInput;
}
private IMultistageBusInputDataProvider CreateMultistageReader(string vifFileName)
public IVehicleDeclarationInputData VehicleInputData
{
var reader = XmlReader.Create(vifFileName);
return _xmlInputReader.Create(reader) as IMultistageBusInputDataProvider;
get { return _vehicleInput; }
}
public DataSource DataSource
public IMultistageBusInputDataProvider MultistageJobInputData
{
get { return null; }
get { return _multistageJobInputData; }
}
public IVehicleDeclarationInputData VehicleInputData { get; }
public IMultistageBusInputDataProvider MultistageInputData { get; }
public DataSource DataSource { get; }
}
}
\ No newline at end of file
......@@ -70,6 +70,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
string.Format(".//*[local-name()='{0}' and @unit='MJ/km']", XMLNames.Report_Result_EnergyConsumption))?.InnerText
.ToDouble().SI(Unit.SI.Mega.Joule.Per.Kilo.Meter).Cast<JoulePerMeter>())).ToDictionary(x => x.Key, x => x.Value);
return new Result
{
ResultStatus = resultStatus,
......
......@@ -120,6 +120,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
get { return GetString(XMLNames.Vehicle_VIN); }
}
public virtual string LegislativeCategory
{
get { return null; }
}
public virtual LegislativeClass? LegislativeClass
{
get { return GetString(XMLNames.Vehicle_LegislativeClass).ParseEnum<LegislativeClass>(); }
......@@ -956,6 +961,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
get { return GetString(XMLNames.Vehicle_VIN); }
}
public string LegislativeCategory
{
get { return GetString(XMLNames.Bus_LegislativeCategory); }
}
public VehicleCategory VehicleCategory
{
get { return VehicleCategoryHelper.Parse(GetString(XMLNames.Vehicle_VehicleCategory)); }
......@@ -1233,8 +1243,8 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
{
get
{
return ElementExists(XMLNames.Vehicle_VehicleCode)
? GetString(XMLNames.Vehicle_VehicleCode).ParseEnum<VehicleCode>()
return ElementExists(XMLNames.Vehicle_BodyworkCode)
? GetString(XMLNames.Vehicle_BodyworkCode).ParseEnum<VehicleCode>()
: (VehicleCode?)null;
}
}
......@@ -1301,7 +1311,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
public override VehicleDeclarationType VehicleDeclarationType
{
get { return VehicleDeclarationTypeHelper.Parse(GetString(XMLNames.Bus_DeclarationType)); }
get { return VehicleDeclarationTypeHelper.Parse(GetString(XMLNames.Bus_VehicleDeclarationType)); }
}
......@@ -1468,8 +1478,8 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
{
get
{
return ElementExists(XMLNames.Vehicle_VehicleCode)
? GetString(XMLNames.Vehicle_VehicleCode).ParseEnum<VehicleCode>()
return ElementExists(XMLNames.Vehicle_BodyworkCode)
? GetString(XMLNames.Vehicle_BodyworkCode).ParseEnum<VehicleCode>()
: (VehicleCode?)null;
}
}
......
......@@ -30,11 +30,12 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules
Bind<IXMLPrimaryVehicleBusInputData>().To<XMLDeclarationMultistagePrimaryVehicleInputDataV01>()
.Named(XMLDeclarationMultistagePrimaryVehicleInputDataV01.QUALIFIED_XSD_TYPE);
Bind<IXMLBusAuxiliariesDeclarationData>().To<XMLDeclarationPrimaryBusAuxiliariesDataProviderV01>()
.Named(XMLDeclarationPrimaryBusAuxiliariesDataProviderV01.QUALIFIED_XSD_TYPE);
Bind<IXMLDeclarationPrimaryVehicleBusInputDataReader>().To<XMLMultistagePrimaryVehicleReaderV01>()
.Named(XMLMultistagePrimaryVehicleReaderV01.QUALIFIED_XSD_TYPE);
Bind<IXMLPrimaryVehicleBusJobInputData>().To<XMLDeclarationMultistagePrimaryVehicleBusJobInputDataProviderV01>()
.Named(XMLDeclarationMultistagePrimaryVehicleBusJobInputDataProviderV01.QUALIFIED_XSD_TYPE);
......@@ -54,6 +55,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules
Bind<IXMLGearboxReader>().To<XMLMultistagePrimaryVehicleBusComponentReaderV01>()
.Named(XMLMultistagePrimaryVehicleBusComponentReaderV01.GEARBOX_READER_QUALIFIED_XSD_TYPE);
Bind<IXMLAxlesReader>().To<XMLMultistagePrimaryVehicleBusComponentReaderV01>()
.Named(XMLMultistagePrimaryVehicleBusComponentReaderV01.AXLES_READER_QUALIFIED_XSD_TYPE);
Bind<IXMLVehicleComponentsDeclaration>()
.To<XMLDeclarationComponentsMultistagePrimaryVehicleBusDataProviderV01>()
.Named(XMLDeclarationComponentsMultistagePrimaryVehicleBusDataProviderV01.QUALIFIED_XSD_TYPE);
......@@ -79,6 +83,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules
Bind<IXMLAxleGearInputData>().To<XMLDeclarationMultistagePrimaryVehicleBusAxlegearDataProviderV01>().Named(
XMLDeclarationMultistagePrimaryVehicleBusAxlegearDataProviderV01.QUALIFIED_XSD_TYPE);
Bind<IXMLAxlesDeclarationInputData>().To<XMLDeclarationAxlesDataProviderV01>().Named(
XMLDeclarationAxlesDataProviderV01.QUALIFIED_XSD_TYPE);
Bind<IXMLApplicationInformationData>().To<XMLDeclarationMultistagePrimaryVehicleBusApplicationInformationDataProviderV01>()
.Named(XMLDeclarationMultistagePrimaryVehicleBusApplicationInformationDataProviderV01.QUALIFIED_XSD_TYPE);
......
......@@ -369,9 +369,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl
public new const string XSD_TYPE = "VehicleComponentsPIFType";
public new const string GEARBOX_READER_TYPE = "TransmissionDataPIFType";
public new const string AXLES_READER_TYPE = "AxleWheelsDataPIFType";
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public new static readonly string GEARBOX_READER_QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI, GEARBOX_READER_TYPE);
public new static readonly string AXLES_READER_QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI, AXLES_READER_TYPE);
protected IBusAuxiliariesDeclarationData _busAuxInputData;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment