diff --git a/VECTO/Input Files/Engine.vb b/VECTO/Input Files/Engine.vb index 7409bec3491748a2be4be9e4dd1f928015081b71..2b223da3394db683aca3b6cbc59e0fa72da89429 100644 --- a/VECTO/Input Files/Engine.vb +++ b/VECTO/Input Files/Engine.vb @@ -12,6 +12,7 @@ Imports System.Collections.Generic Imports System.ComponentModel.DataAnnotations Imports System.IO Imports System.Linq +Imports System.Xml Imports Newtonsoft.Json.Linq Imports TUGraz.VECTO.Input_Files Imports TUGraz.VectoCommon.BusAuxiliaries @@ -272,7 +273,13 @@ Public Class Engine End Get End Property - Public ReadOnly Property CertificationMethod As CertificationMethod Implements IComponentInputData.CertificationMethod + Public ReadOnly Property AppVersion As String Implements IComponentInputData.AppVersion + get + Return "VECTO-GUI" + End Get + End Property + + Public ReadOnly Property CertificationMethod As CertificationMethod Implements IComponentInputData.CertificationMethod Get Return CertificationMethod.NotCertified End Get @@ -602,7 +609,8 @@ Public Class DummyVehicle Public Property Manufacturer As String Implements IComponentInputData.Manufacturer Public Property Model As String Implements IComponentInputData.Model Public Property [Date] As DateTime Implements IComponentInputData.[Date] - Public Property CertificationMethod As CertificationMethod Implements IComponentInputData.CertificationMethod + Public ReadOnly Property AppVersion As String Implements IComponentInputData.AppVersion + Public Property CertificationMethod As CertificationMethod Implements IComponentInputData.CertificationMethod Public Property CertificationNumber As String Implements IComponentInputData.CertificationNumber Public Property DigestValue As DigestData Implements IComponentInputData.DigestValue Public Property Identifier As String Implements IVehicleDeclarationInputData.Identifier @@ -655,7 +663,9 @@ Public Class DummyVehicle End Get End Property - Public Property AirdragInputData As IAirdragDeclarationInputData Implements IVehicleComponentsDeclaration.AirdragInputData + Public ReadOnly Property XMLSource As XmlNode Implements IVehicleDeclarationInputData.XMLSource + + Public Property AirdragInputData As IAirdragDeclarationInputData Implements IVehicleComponentsDeclaration.AirdragInputData Public Property IVehicleComponentsEngineering_GearboxInputData As IGearboxEngineeringInputData Implements IVehicleComponentsEngineering.GearboxInputData Public Property IVehicleComponentsEngineering_AirdragInputData As IAirdragEngineeringInputData Implements IVehicleComponentsEngineering.AirdragInputData Public Property GearboxInputData As IGearboxDeclarationInputData Implements IVehicleComponentsDeclaration.GearboxInputData diff --git a/VECTO/Input Files/Gearbox.vb b/VECTO/Input Files/Gearbox.vb index 118191f60d2209e34987fbd22aee12667d1f3d24..51a0779770eb994d87b39bcde5eb1cda0906f70d 100644 --- a/VECTO/Input Files/Gearbox.vb +++ b/VECTO/Input Files/Gearbox.vb @@ -12,6 +12,7 @@ Imports System.Collections.Generic Imports System.ComponentModel.DataAnnotations Imports System.IO Imports System.Linq +Imports System.Xml Imports TUGraz.VECTO.Input_Files Imports TUGraz.VectoCommon.BusAuxiliaries Imports TUGraz.VectoCommon.InputData @@ -360,6 +361,12 @@ Public Class Gearbox End Get End Property + Public ReadOnly Property AppVersion As String Implements IComponentInputData.AppVersion + get + Return "VECTO-GUI" + End Get + End Property + Public ReadOnly Property CertificationMethod As CertificationMethod _ Implements IComponentInputData.CertificationMethod Get @@ -784,6 +791,7 @@ Public Class MockEngineeringVehicle Public Property Manufacturer As String Implements IComponentInputData.Manufacturer Public Property Model As String Implements IComponentInputData.Model Public Property [Date] As DateTime Implements IComponentInputData.[Date] + Public ReadOnly Property AppVersion As String Implements IComponentInputData.AppVersion Public Property CertificationMethod As CertificationMethod Implements IComponentInputData.CertificationMethod Public Property CertificationNumber As String Implements IComponentInputData.CertificationNumber Public Property DigestValue As DigestData Implements IComponentInputData.DigestValue @@ -834,6 +842,7 @@ Public Class MockEngineeringVehicle Public ReadOnly Property Length As Meter Implements IVehicleDeclarationInputData.Length Public ReadOnly Property Width As Meter Implements IVehicleDeclarationInputData.Width Public Property Components As IVehicleComponentsDeclaration Implements IVehicleDeclarationInputData.Components + Public ReadOnly Property XMLSource As XmlNode Implements IVehicleDeclarationInputData.XMLSource Public Property AirdragInputData As IAirdragEngineeringInputData _ Implements IVehicleComponentsEngineering.AirdragInputData diff --git a/VECTO/Input Files/MockVehicleInputData.vb b/VECTO/Input Files/MockVehicleInputData.vb index 45a1760f115ae73ea1849d5aa11e864d0c97b928..71ea965995f0b56faf381932759ae45dae710644 100644 --- a/VECTO/Input Files/MockVehicleInputData.vb +++ b/VECTO/Input Files/MockVehicleInputData.vb @@ -1,4 +1,5 @@ Imports System.Collections.Generic +Imports System.Xml Imports TUGraz.VectoCommon.BusAuxiliaries Imports TUGraz.VectoCommon.InputData Imports TUGraz.VectoCommon.Models @@ -11,6 +12,7 @@ Public Class MockVehicleInputData Public Property Manufacturer As String Implements IComponentInputData.Manufacturer Public Property Model As String Implements IComponentInputData.Model Public Property [Date] As DateTime Implements IComponentInputData.[Date] + Public ReadOnly Property AppVersion As String Implements IComponentInputData.AppVersion Public Property CertificationMethod As CertificationMethod Implements IComponentInputData.CertificationMethod Public Property CertificationNumber As String Implements IComponentInputData.CertificationNumber Public Property DigestValue As DigestData Implements IComponentInputData.DigestValue @@ -47,4 +49,5 @@ Public Class MockVehicleInputData Public ReadOnly Property Length As Meter Implements IVehicleDeclarationInputData.Length Public ReadOnly Property Width As Meter Implements IVehicleDeclarationInputData.Width Public Property Components As IVehicleComponentsDeclaration Implements IVehicleDeclarationInputData.Components + Public ReadOnly Property XMLSource As XmlNode Implements IVehicleDeclarationInputData.XMLSource End Class \ No newline at end of file diff --git a/VECTO/Input Files/Vehicle.vb b/VECTO/Input Files/Vehicle.vb index 2e12598fd4095d3387240081b21e85cec1219a26..fe1e092c124cac910014dc725ffaf422d8cf2a8c 100644 --- a/VECTO/Input Files/Vehicle.vb +++ b/VECTO/Input Files/Vehicle.vb @@ -292,7 +292,13 @@ Public Class Vehicle End Get End Property - Public ReadOnly Property CertificationMethod As CertificationMethod Implements IComponentInputData.CertificationMethod + Public ReadOnly Property AppVersion As String Implements IComponentInputData.AppVersion + get + Return "VECTO-GUI" + End Get + End Property + + Public ReadOnly Property CertificationMethod As CertificationMethod Implements IComponentInputData.CertificationMethod Get Return CertificationMethod.NotCertified End Get @@ -763,7 +769,9 @@ Public Class Vehicle End Get End Property - Public ReadOnly Property EngineStopStart As Boolean Implements IAdvancedDriverAssistantSystemDeclarationInputData.EngineStopStart + Public ReadOnly Property IVehicleDeclarationInputData_XMLSource As XmlNode Implements IVehicleDeclarationInputData.XMLSource + + Public ReadOnly Property EngineStopStart As Boolean Implements IAdvancedDriverAssistantSystemDeclarationInputData.EngineStopStart get return EngineStop End Get @@ -805,4 +813,5 @@ Public Class Vehicle Public Property EcoRollReleaseLockupClutch As Boolean + Public ReadOnly Property IAxlesDeclarationInputData_XMLSource As XmlNode Implements IAxlesDeclarationInputData.XMLSource End Class diff --git a/VectoCommon/VectoCommon/Hashing/VectoComponents.cs b/VectoCommon/VectoCommon/Hashing/VectoComponents.cs index aac5c2436fe3afe77d3d05a7d6fa249fa813a3b6..795fc93239528cb0c997d45f7563df9b10dfd30c 100644 --- a/VectoCommon/VectoCommon/Hashing/VectoComponents.cs +++ b/VectoCommon/VectoCommon/Hashing/VectoComponents.cs @@ -78,7 +78,7 @@ namespace TUGraz.VectoCommon.Hashing case VectoComponents.VectoCustomerInformation: return "VectoCustomerInformation"; case VectoComponents.VectoPrimaryVehicleInformation: - return "VectoPrimaryVehicleInformation"; + return "VectoOutputPrimaryVehicle"; default: throw new ArgumentOutOfRangeException("VectoComponents", component, null); } @@ -113,5 +113,17 @@ namespace TUGraz.VectoCommon.Hashing throw new ArgumentOutOfRangeException("VectoComponents", component, null); } } + + public static bool IsReport(this VectoComponents component) + { + switch (component) { + case VectoComponents.VectoCustomerInformation: + case VectoComponents.VectoOutput: + case VectoComponents.VectoPrimaryVehicleInformation: + return true; + default: + return false; + } + } } } \ No newline at end of file diff --git a/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs b/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs index d710139aded70d31eb08ef2b17a23b23b60dec7f..ae9bacd87674405edb1fcc2cadad4e5e8967dd53 100644 --- a/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs +++ b/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs @@ -67,6 +67,8 @@ namespace TUGraz.VectoCommon.InputData DateTime Date { get; } + String AppVersion { get; } + CertificationMethod CertificationMethod { get; } string CertificationNumber { get; } @@ -182,7 +184,7 @@ namespace TUGraz.VectoCommon.InputData // components IVehicleComponentsDeclaration Components { get; } - + XmlNode XMLSource { get; } } public interface IVehicleComponentsDeclaration @@ -220,6 +222,8 @@ namespace TUGraz.VectoCommon.InputData /// cf. VECTO Input Parameters.xlsx /// </summary> IList<IAxleDeclarationInputData> AxlesDeclaration { get; } + + XmlNode XMLSource { get; } } public interface IAdvancedDriverAssistantSystemDeclarationInputData @@ -529,6 +533,7 @@ namespace TUGraz.VectoCommon.InputData IList<IEngineModeDeclarationInputData> EngineModes { get; } WHRType WHRType{ get; } + } public interface IEngineModeDeclarationInputData diff --git a/VectoCommon/VectoCommon/Models/VehicleCategory.cs b/VectoCommon/VectoCommon/Models/VehicleCategory.cs index 0732fd4f7b4310f0c9300596af910abf89d43d01..9e31bc7ebba1f697e05796ce0a3c268b136d8148 100644 --- a/VectoCommon/VectoCommon/Models/VehicleCategory.cs +++ b/VectoCommon/VectoCommon/Models/VehicleCategory.cs @@ -98,6 +98,8 @@ namespace TUGraz.VectoCommon.Models // return "Interurban Bus"; case VehicleCategory.RigidTruck: return "Rigid Lorry"; + case VehicleCategory.HeavyBusPrimaryVehicle: + return "Bus"; default: throw new ArgumentOutOfRangeException("vehicleCategory", vehicleCategory, null); } diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs index a35b3ce1ebb86bb7982a9208ebfeeb711435d295..c4ea9883e30376d7739e9d6beabe2e8dabf7c769 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs @@ -62,7 +62,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON private string _filename; private IAxlesDeclarationInputData _axleWheelsDecl; private IAxlesEngineeringInputData _axleWheelsEng; - + public JSONComponentInputData(string filename, IJSONVehicleComponents job, bool tolerateMissing = false) { @@ -136,6 +136,8 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON get { return new DataSource { SourceType = DataSourceType.JSONFile, SourceFile = _filename }; } } + public string AppVersion { get { return "VECTO-JSON"; } } + public string Source { get { return _filename; } @@ -252,6 +254,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON get { return this; } } + XmlNode IVehicleDeclarationInputData.XMLSource + { + get { return null; } + } + IAdvancedDriverAssistantSystemsEngineering IVehicleEngineeringInputData.ADAS { get { return this; } diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs index 8e19de132b3960145e6c5dc1a0a68b04647ed5fc..4bcbfa8db4e81d15e3b44ce09fd3be8af03ffc46 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs @@ -94,6 +94,8 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON get { return Body.GetEx(JsonKeys.SavedInDeclMode).Value<bool>(); } } + public string AppVersion { get { return "VECTO-JSON"; } } + internal string BasePath { get { return Path.GetDirectoryName(_sourceFile); } diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs index 1fff399a3e97564ba0b675a13d1b8afe8257a633..c4a57b07259df5c4341e0851de9c6b5c42f25078 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs @@ -378,6 +378,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON get { return this; } } + XmlNode IVehicleDeclarationInputData.XMLSource + { + get { return null; } + } + IAdvancedDriverAssistantSystemsEngineering IVehicleEngineeringInputData.ADAS { get { return this; } @@ -429,6 +434,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON SourceVersion = Version, }, Source = Source, + AppVersion = AppVersion, Inertia = axle.GetEx<double>(JsonKeys.Vehicle_Axles_Inertia).SI<KilogramSquareMeter>(), Dimension = axle.GetEx<string>(JsonKeys.Vehicle_Axles_Wheels), RollResistanceCoefficient = axle.GetEx<double>(JsonKeys.Vehicle_Axles_RollResistanceCoefficient), diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/AbstractCommonComponentType.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/AbstractCommonComponentType.cs index c381b833f478eafdd9ef361bc66d64aaf48de607..71580c0d4b50febce0cb4e2c6ecb225f6dbc5619 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/AbstractCommonComponentType.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/AbstractCommonComponentType.cs @@ -1,5 +1,6 @@ using System; using System.Xml; +using System.Xml.Linq; using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Resources; @@ -31,6 +32,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider { get { return XmlConvert.ToDateTime(GetString(XMLNames.Component_Date), XmlDateTimeSerializationMode.Utc); } } + public virtual string AppVersion + { + get { return GetString(XMLNames.Component_AppVersion); } + } + public virtual CertificationMethod CertificationMethod { get { @@ -48,5 +54,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider { { get { return new DigestData(GetNode(XMLNames.DI_Signature, required:false)); } } + + public virtual XmlNode XMLSource { get { return BaseNode; } } } } \ No newline at end of file diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationADASDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationADASDataProvider.cs index 42f1ac9ca52043225d8465e490e249c53838a3ca..d07deadab4b7e2b28b8682526e3373d80c84e009 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationADASDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationADASDataProvider.cs @@ -55,7 +55,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider } public virtual bool? ATEcoRollReleaseLockupClutch { get { return null; } } - public virtual XmlNode XMLSource { get { return BaseNode; } } + #endregion } diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationAxlesDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationAxlesDataProvider.cs index 8037014097af1768cfcf061dec0721905a26d387..8e5d7ef6efa3798d6e34d691642db336387c51c8 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationAxlesDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationAxlesDataProvider.cs @@ -64,6 +64,8 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider } } + public XmlNode XMLSource { get { return BaseNode; } } + #endregion #region Implementation of IXMLResource diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/AbstractCommonComponentType.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/AbstractCommonComponentType.cs index e5468dde8ca8bdd1c58cb6054600363f75efa472..e9b25c0d2fee29306e02e3ba5c2887204236c28a 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/AbstractCommonComponentType.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/AbstractCommonComponentType.cs @@ -34,6 +34,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.DataProvider get { return XmlConvert.ToDateTime(GetString(XMLNames.Component_Date), XmlDateTimeSerializationMode.Utc); } } + public virtual string AppVersion + { + get { return GetString(XMLNames.Component_AppVersion); } + } + public virtual CertificationMethod CertificationMethod { get { return CertificationMethod.NotCertified; } @@ -48,5 +53,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.DataProvider { get { return null; } } + + public virtual XmlNode XMLSource { get { return BaseNode; } } } } diff --git a/VectoCore/VectoCore/InputData/Impl/InputData.cs b/VectoCore/VectoCore/InputData/Impl/InputData.cs index 89826912d9687590fc56e04d2ccf58c5eb1fc4f0..e636829275d12a412dc28ae41d19f3763178b7af 100644 --- a/VectoCore/VectoCore/InputData/Impl/InputData.cs +++ b/VectoCore/VectoCore/InputData/Impl/InputData.cs @@ -133,6 +133,7 @@ namespace TUGraz.VectoCore.InputData.Impl public string Model { get; internal set; } public DateTime Date { get; internal set; } + public string AppVersion { get; internal set; } public CertificationMethod CertificationMethod { get; internal set; } diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/AbstractSimulationDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/AbstractSimulationDataAdapter.cs index 0e26856b33c5ed5a1a87caaccacb89442a6a8113..6a1a8f3085a7eed743bcaa40b051d92fe57eafa3 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/AbstractSimulationDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/AbstractSimulationDataAdapter.cs @@ -51,6 +51,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter internal VehicleData SetCommonVehicleData(IVehicleDeclarationInputData data) { var retVal = new VehicleData { + InputData = data, SavedInDeclarationMode = data.SavedInDeclarationMode, Manufacturer = data.Manufacturer, ModelName = data.Model, @@ -133,6 +134,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter internal CombustionEngineData SetCommonCombustionEngineData(IEngineDeclarationInputData data, TankSystem? tankSystem) { var retVal = new CombustionEngineData { + InputData = data, SavedInDeclarationMode = data.SavedInDeclarationMode, Manufacturer = data.Manufacturer, ModelName = data.Model, @@ -156,6 +158,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter internal GearboxData SetCommonGearboxData(IGearboxDeclarationInputData data) { return new GearboxData { + InputData = data, SavedInDeclarationMode = data.SavedInDeclarationMode, Manufacturer = data.Manufacturer, ModelName = data.Model, @@ -222,6 +225,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter internal AxleGearData SetCommonAxleGearData(IAxleGearInputData data) { return new AxleGearData { + InputData = data, SavedInDeclarationMode = data.SavedInDeclarationMode, Manufacturer = data.Manufacturer, ModelName = data.Model, @@ -251,6 +255,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter return null; case AngledriveType.SeparateAngledrive: var angledriveData = new AngledriveData { + InputData = data, SavedInDeclarationMode = data.SavedInDeclarationMode, Manufacturer = data.Manufacturer, ModelName = data.Model, diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapterTruck.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapterTruck.cs index 007f1a55ed252e477dc006ba0af3addf478c81de..d6f0baaefdb14787622e0b62288905de61b6d2dc 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapterTruck.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapterTruck.cs @@ -367,6 +367,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter var gearData = new GearData { ShiftPolygon = shiftPolygon, MaxSpeed = gear.MaxInputSpeed, + MaxTorque = gear.MaxTorque, Ratio = gear.Ratio, LossMap = lossMap, }; diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/AngledriveData.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/AngledriveData.cs index 087e8b8c8f0f4fba626b1f80861c0ca420ee7c7b..b6f6142129f254f37b4c23fffc72ad9784f0797f 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Data/AngledriveData.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/AngledriveData.cs @@ -29,6 +29,7 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ +using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Utils; using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; @@ -40,5 +41,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data [ValidateObject] public TransmissionData Angledrive; public AngledriveType Type; + + public IAngledriveInputData InputData { get; internal set; } } } \ No newline at end of file diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/AxleGearData.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/AxleGearData.cs index ab4f0026e88a42db41d48ebbf43340d6d49cd307..f8dbec7ed455cbb34f13b3a1f33631a5c6c39b26 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Data/AxleGearData.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/AxleGearData.cs @@ -29,18 +29,21 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ -using TUGraz.VectoCommon.Models; -using TUGraz.VectoCommon.Utils; -using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; - -namespace TUGraz.VectoCore.Models.SimulationComponent.Data -{ - public class AxleGearData : SimulationComponentData - { - [ValidateObject] public TransmissionData AxleGear; - - public AxleLineType LineType; - } - - +using TUGraz.VectoCommon.InputData; +using TUGraz.VectoCommon.Models; +using TUGraz.VectoCommon.Utils; +using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; + +namespace TUGraz.VectoCore.Models.SimulationComponent.Data +{ + public class AxleGearData : SimulationComponentData + { + [ValidateObject] public TransmissionData AxleGear; + + public AxleLineType LineType; + + public IAxleGearInputData InputData { get; internal set; } + } + + } \ No newline at end of file diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/CombustionEngineData.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/CombustionEngineData.cs index fcb3c00174b630d9882c90cedca7fcc7e6bccd23..387528dc93001d4cc93cd62d587f9f83a9572273 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Data/CombustionEngineData.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/CombustionEngineData.cs @@ -32,6 +32,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using TUGraz.VectoCommon.BusAuxiliaries; +using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Utils; using TUGraz.VectoCore.Configuration; @@ -72,6 +73,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data [Required, ValidateObject] public List<CombustionEngineFuelData> Fuels { get; internal set; } + public IEngineDeclarationInputData InputData { get; set; } + public WHRData ElectricalWHR; public WHRData MechanicalWHR; diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/Gearbox/GearData.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/Gearbox/GearData.cs index c6e40a5bcadcf148cafee9d86119430da5c35802..50e05fa133dd5060b5941d2d23e09f5c20a96e49 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Data/Gearbox/GearData.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/Gearbox/GearData.cs @@ -72,6 +72,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox public PerSecond MaxSpeed { get; internal set; } + public NewtonMeter MaxTorque { get; internal set; } + public ShiftPolygon TorqueConverterShiftPolygon { get; set; } // ReSharper disable once UnusedMember.Global -- used via validation diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/GearboxData.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/GearboxData.cs index 3caac431668a79e493932b4d2d04f7a79faef259..39bf4aa8f2bb2fd6c4903cdd11cf8a344b0aa4b1 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Data/GearboxData.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/GearboxData.cs @@ -35,6 +35,7 @@ using System.ComponentModel.DataAnnotations; using System.Diagnostics; using System.Linq; using System.Runtime.Serialization; +using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Utils; using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; @@ -100,6 +101,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data public Second PowershiftShiftTime { get; internal set; } public bool ATEcoRollReleaseLockupClutch { get; internal set; } + public IGearboxDeclarationInputData InputData { get; internal set; } // ReSharper disable once UnusedMember.Global -- used via Validation diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs index 6fa0fa81229a58c0ae73ff9ff6ff3ebf85892644..1912165551f1b50731f75d60c6d1652ab4e3ebd1 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs @@ -242,7 +242,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data public IAdvancedDriverAssistantSystemDeclarationInputData InputData { get; internal set; } } -#region "Bus Parameters" + public IVehicleDeclarationInputData InputData { get; internal set; } + + + #region "Bus Parameters" public double PassengerCount { get; internal set; } public FloorType FloorType { get; internal set; } diff --git a/VectoCore/VectoCore/OutputData/XML/AbstractXMLManufacturerReport.cs b/VectoCore/VectoCore/OutputData/XML/AbstractXMLManufacturerReport.cs index 59bcf37df8c9b9b2813c802b849e333c8bd32a42..aa59d0eed6f7c0a8be4f15435e7d2af44a77a980 100644 --- a/VectoCore/VectoCore/OutputData/XML/AbstractXMLManufacturerReport.cs +++ b/VectoCore/VectoCore/OutputData/XML/AbstractXMLManufacturerReport.cs @@ -331,7 +331,7 @@ namespace TUGraz.VectoCore.OutputData.XML return new XElement( tns + XMLNames.Component_Angledrive, GetCommonDescription(angledriveData), - new XElement(tns + XMLNames.AngleDrive_Ratio, angledriveData.Angledrive.Ratio)); + new XElement(tns + XMLNames.AngleDrive_Ratio, angledriveData.Angledrive.Ratio.ToXMLFormat(3))); } protected virtual XElement GetAxlegearDescription(AxleGearData axleGearData) diff --git a/VectoCore/VectoCore/OutputData/XML/XMLPrimaryVehicleReport.cs b/VectoCore/VectoCore/OutputData/XML/XMLPrimaryVehicleReport.cs index 6d85b170e5f36c5a55b6bdd32be274b5aac4ed83..b6ed2f93d53c776adfe6a7cf6b8fd499e1ea2fac 100644 --- a/VectoCore/VectoCore/OutputData/XML/XMLPrimaryVehicleReport.cs +++ b/VectoCore/VectoCore/OutputData/XML/XMLPrimaryVehicleReport.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Data; using System.IO; using System.Linq; using System.Xml; @@ -9,6 +10,7 @@ using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Resources; using TUGraz.VectoCommon.Utils; +using TUGraz.VectoCore.InputData.Reader.ComponentData; using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.SimulationComponent.Data; @@ -19,7 +21,7 @@ namespace TUGraz.VectoCore.OutputData.XML { public class XMLPrimaryVehicleReport { - protected XNamespace tns = "urn:tugraz:ivt:VectoAPI:DeclarationOutput:PrimaryBusInformation:HeavyBus:v0.1"; + protected XNamespace tns = "urn:tugraz:ivt:VectoAPI:DeclarationOutput:PrimaryVehicleInformation:HeavyBus:v0.1"; protected XNamespace di = "http://www.w3.org/2000/09/xmldsig#"; protected XNamespace xsi = XNamespace.Get("http://www.w3.org/2001/XMLSchema-instance"); @@ -47,21 +49,27 @@ namespace TUGraz.VectoCore.OutputData.XML var results = new XElement(Results); //retVal.Add(new XProcessingInstruction("xml-stylesheet", "href=\"https://webgate.ec.europa.eu/CITnet/svn/VECTO/trunk/Share/XML/CSS/VectoReports.css\"")); - retVal.Add(new XElement(RootNS + XMLNames.VectoPrimaryVehicleReport, - //new XAttribute("schemaVersion", CURRENT_SCHEMA_VERSION), - new XAttribute(XNamespace.Xmlns + "xsi", xsi.NamespaceName), - new XAttribute("xmlns", tns), - new XAttribute(XNamespace.Xmlns + "pif", RootNS), - new XAttribute(XNamespace.Xmlns + "di", di), - new XAttribute(xsi + "schemaLocation", - string.Format("{0} {1}VectoOutputPrimaryVehicleInformation.xsd", tns, AbstractXMLWriter.SchemaLocationBaseUrl)), - new XElement(RootNS + XMLNames.Report_DataWrap, - new XAttribute(xsi + "type", "PrimaryVehicleHeavyBusDataType"), - VehiclePart, - new XElement(tns + XMLNames.Report_ResultData_Signature, resultSignature), - results, - GetApplicationInfo()) - ) + retVal.Add( + new XElement( + RootNS + XMLNames.VectoPrimaryVehicleReport, + + //new XAttribute("schemaVersion", CURRENT_SCHEMA_VERSION), + new XAttribute(XNamespace.Xmlns + "xsi", xsi.NamespaceName), + new XAttribute("xmlns", tns), + //new XAttribute(XNamespace.Xmlns + "pbus", tns), + new XAttribute(XNamespace.Xmlns + "pif", RootNS), + new XAttribute(XNamespace.Xmlns + "di", di), + new XAttribute( + xsi + "schemaLocation", + string.Format("{0} {1}VectoOutputPrimaryVehicleInformation.xsd", tns, AbstractXMLWriter.SchemaLocationBaseUrl)), + new XElement( + RootNS + XMLNames.Report_DataWrap, + new XAttribute(xsi + "type", "PrimaryVehicleHeavyBusDataType"), + VehiclePart, + new XElement(tns + XMLNames.Report_ResultData_Signature, resultSignature), + results, + GetApplicationInfo()) + ) ); var stream = new MemoryStream(); var writer = new StreamWriter(stream); @@ -75,128 +83,261 @@ namespace TUGraz.VectoCore.OutputData.XML private XElement GetApplicationInfo() { var versionNumber = VectoSimulationCore.VersionNumber; -#if CERTIFICATION_RELEASE -// add nothing to version number +#if CERTIFICATION_RELEASE // add nothing to version number #else versionNumber += " !!NOT FOR CERTIFICATION!!"; #endif - return new XElement(tns + XMLNames.Report_ApplicationInfo_ApplicationInformation, - new XElement(tns + XMLNames.Report_ApplicationInfo_SimulationToolVersion, versionNumber), - new XElement(tns + XMLNames.Report_ApplicationInfo_Date, - XmlConvert.ToString(DateTime.Now, XmlDateTimeSerializationMode.Utc))); + return new XElement( + tns + XMLNames.Report_ApplicationInfo_ApplicationInformation, + new XElement(tns + XMLNames.Report_ApplicationInfo_SimulationToolVersion, versionNumber), + new XElement( + tns + XMLNames.Report_ApplicationInfo_Date, + XmlConvert.ToString(DateTime.Now, XmlDateTimeSerializationMode.Utc))); } + public virtual void Initialize(VectoRunData modelData, List<List<FuelData.Entry>> fuelModes) { VehiclePart.Add( + new XAttribute(xsi + "type", "VehiclePIFType"), new XElement(tns + XMLNames.ManufacturerPrimaryVehicle, modelData.VehicleData.Manufacturer), new XElement(tns + XMLNames.ManufacturerAddressPrimaryVehicle, modelData.VehicleData.ManufacturerAddress), new XElement(tns + XMLNames.Component_Model, modelData.VehicleData.ModelName), new XElement(tns + XMLNames.Vehicle_VIN, modelData.VehicleData.VIN), - new XElement(tns + XMLNames.Component_Date, XmlConvert.ToString(modelData.VehicleData.Date, XmlDateTimeSerializationMode.Utc)), - new XElement(tns + XMLNames.Vehicle_LegislativeClass, modelData.VehicleData.LegislativeClass.ToXMLFormat()), new XElement( - tns + XMLNames.Vehicle_GrossVehicleMass, - XMLHelper.ValueAsUnit(modelData.VehicleData.GrossVehicleMass, XMLNames.Unit_t, 1)), + tns + XMLNames.Component_Date, XmlConvert.ToString(modelData.VehicleData.Date, XmlDateTimeSerializationMode.Utc)), + new XElement(tns + XMLNames.Vehicle_VehicleCategory, modelData.VehicleData.VehicleCategory.ToXMLFormat()), + new XElement(tns + XMLNames.Vehicle_AxleConfiguration, modelData.VehicleData.AxleConfiguration.GetName()), + new XElement(tns + XMLNames.TPMLM, modelData.VehicleData.GrossVehicleMass.ToXMLFormat(0)), + new XElement(tns + XMLNames.Vehicle_IdlingSpeed, modelData.EngineData.IdleSpeed.AsRPM.ToXMLFormat(0)), + new XElement(tns + XMLNames.Vehicle_RetarderType, modelData.Retarder.Type.ToXMLFormat()), + modelData.Retarder.Type.IsDedicatedComponent() + ? new XElement(tns + XMLNames.Vehicle_RetarderRatio, modelData.Retarder.Ratio.ToXMLFormat(3)) + : null, new XElement( - tns + XMLNames.Vehicle_CurbMassChassis, XMLHelper.ValueAsUnit(modelData.VehicleData.CurbMass, XMLNames.Unit_kg)), + tns + XMLNames.Vehicle_AngledriveType, (modelData.AngledriveData?.Type ?? AngledriveType.None).ToXMLFormat()), new XElement(tns + XMLNames.Vehicle_ZeroEmissionVehicle, modelData.VehicleData.ZeroEmissionVehicle), - new XElement(tns + XMLNames.Vehicle_HybridElectricHDV, modelData.VehicleData.HybridElectricHDV), - new XElement(tns + XMLNames.Vehicle_DualFuelVehicle, modelData.VehicleData.DualFuelVehicle), - new[] { - new XElement(tns + XMLNames.Vehicle_AxleConfiguration, modelData.VehicleData.AxleConfiguration.GetName()), - new XElement(tns + XMLNames.Report_Vehicle_VehicleGroup, modelData.VehicleData.VehicleClass.GetClassNumber()), - new XElement(tns + XMLNames.Vehicle_VocationalVehicle, modelData.VehicleData.VocationalVehicle), - new XElement(tns + XMLNames.Vehicle_SleeperCab, modelData.VehicleData.SleeperCab), - new XElement(tns + XMLNames.Vehicle_PTO, modelData.PTO != null), - GetADAS(modelData.VehicleData.ADAS), - GetTorqueLimits(modelData.EngineData), - VehicleComponents(modelData, fuelModes) - } + GetADAS(modelData.VehicleData.ADAS), + GetTorqueLimits(modelData), + VehicleComponents(modelData, fuelModes) ); } private XElement GetADAS(VehicleData.ADASData adasData) { - return new XElement(tns + XMLNames.Vehicle_ADAS, - new XElement(tns + XMLNames.Vehicle_ADAS_EngineStopStart, adasData.EngineStopStart), - new XElement(tns + XMLNames.Vehicle_ADAS_EcoRollWithoutEngineStop, adasData.EcoRoll.WithoutEngineStop()), - new XElement(tns + XMLNames.Vehicle_ADAS_EcoRollWithEngineStopStart, adasData.EcoRoll.WithEngineStop()), - new XElement(tns + XMLNames.Vehicle_ADAS_PCC, adasData.PredictiveCruiseControl != PredictiveCruiseControlType.None) + var ns = XNamespace.Get(adasData.InputData.XMLSource.SchemaInfo.SchemaType.QualifiedName.Namespace); + const string adasPrefix = "adas"; + return new XElement( + tns + XMLNames.Vehicle_ADAS, + new XAttribute(XNamespace.Xmlns + adasPrefix, ns.NamespaceName), + new XAttribute( + xsi + "type", + string.Format("{0}:{1}", adasPrefix, adasData.InputData.XMLSource.SchemaInfo.SchemaType.QualifiedName.Name)), + XElement.Parse(adasData.InputData.XMLSource.OuterXml).Elements() ); } - private XElement GetTorqueLimits(CombustionEngineData modelData) + private XElement GetTorqueLimits(VectoRunData modelData) { - var limits = new List<XElement>(); - var maxTorque = modelData.FullLoadCurves[0].MaxTorque; - for (uint i = 1; i < modelData.FullLoadCurves.Count; i++) { - if (!maxTorque.IsEqual(modelData.FullLoadCurves[i].MaxTorque, 1e-3.SI<NewtonMeter>())) { - limits.Add( - new XElement( - tns + XMLNames.Vehicle_TorqueLimits_Entry, - new XAttribute(XMLNames.Vehicle_TorqueLimits_Entry_Gear_Attr, i), - new XAttribute( - XMLNames.XMLManufacturerReport_torqueLimit, - modelData.FullLoadCurves[i].MaxTorque.ToXMLFormat(0)), - new XAttribute(XMLNames.Report_Results_Unit_Attr, XMLNames.Unit_Nm), - new XAttribute( - XMLNames.XMLManufacturerReport_torqueLimitPercent, - (modelData.FullLoadCurves[i].MaxTorque / maxTorque * 100).ToXMLFormat(1)))); - } + var inputData = modelData.VehicleData.InputData.XMLSource; + var tcLimits = inputData.SelectSingleNode(XMLHelper.QueryLocalName(XMLNames.Vehicle_TorqueLimits)); + if (tcLimits == null) { + return null; } - return limits.Count == 0 - ? null - : new XElement(tns + XMLNames.Vehicle_TorqueLimits, limits.Cast<object>().ToArray()); + var ns = XNamespace.Get(tcLimits.SchemaInfo.SchemaType.QualifiedName.Namespace); + const string adasPrefix = "tcl"; + return new XElement( + tns + XMLNames.Vehicle_TorqueLimits, + new XAttribute(XNamespace.Xmlns + adasPrefix, ns.NamespaceName), + new XAttribute( + xsi + "type", string.Format("{0}:{1}", adasPrefix, tcLimits.SchemaInfo.SchemaType.QualifiedName.Name)), + XElement.Parse(tcLimits.OuterXml).Elements() + ); } private XElement VehicleComponents(VectoRunData modelData, List<List<FuelData.Entry>> fuelModes) { - return new XElement(tns + XMLNames.Vehicle_Components, - GetEngineDescription(modelData.EngineData, fuelModes) - //GetGearboxDescription(modelData.GearboxData), - //GetAngledriveDescription(modelData.AngledriveData), - //GetAxlegearDescription(modelData.AxleGearData), - //GetAxleWheelsDescription(modelData.VehicleData), - //GetAuxiliariesDescription(modelData.Aux) + return new XElement( + tns + XMLNames.Vehicle_Components, + new XAttribute(xsi + "type", "VehicleComponentsPIFType"), + GetEngineDescription(modelData.EngineData, fuelModes), + GetGearboxDescription(modelData.GearboxData), + GetAngledriveDescription(modelData.AngledriveData), + GetAxlegearDescription(modelData.AxleGearData), + GetAxleWheelsDescription(modelData), + GetAuxiliariesDescription(modelData) ); } + protected virtual XElement GetAxleWheelsDescription(VectoRunData modeldData) + { + var axles = modeldData.VehicleData.InputData.Components.AxleWheels.XMLSource; + + var ns = XNamespace.Get(axles.SchemaInfo.SchemaType.QualifiedName.Namespace); + //const string adasPrefix = "axl"; + return new XElement( + tns + XMLNames.Component_AxleWheels, + //new XAttribute(XNamespace.Xmlns + adasPrefix, ns.NamespaceName), + new XAttribute(XNamespace.Xmlns + "pbus", tns), + new XAttribute("xmlns", ns.NamespaceName), + new XAttribute( + xsi + "type", axles.SchemaInfo.SchemaType.QualifiedName.Name), + XElement.Parse(axles.OuterXml).Elements() + ); + } + + + + private XElement GetAuxiliariesDescription(VectoRunData modelData) + { + var busAuxiliaries = modelData.BusAuxiliaries; + var busAuxXML = busAuxiliaries.InputData.XMLSource; + var ns = XNamespace.Get(busAuxXML.FirstChild.SchemaInfo.SchemaType.QualifiedName.Namespace); + const string auxPrefix = "aux"; + return new XElement(tns + XMLNames.Component_Auxiliaries, + new XElement(tns + XMLNames.ComponentDataWrapper, + new XAttribute(XNamespace.Xmlns + auxPrefix, ns.NamespaceName), + new XAttribute(xsi + "type", string.Format("{0}:{1}", auxPrefix, busAuxXML.FirstChild.SchemaInfo.SchemaType.QualifiedName.Name)), + XElement.Parse(busAuxXML.InnerXml).Elements() + )); + } + + private XElement GetAxlegearDescription(AxleGearData axleGearData) + { + return WrapComponent(XMLNames.Component_Axlegear, "AxlegearDataPIFType", + GetCommonDescription(axleGearData), + new XElement(tns + XMLNames.Component_AppVersion, axleGearData.InputData.AppVersion), + new XElement(tns + XMLNames.Axlegear_LineType, axleGearData.LineType.ToXMLFormat()), + new XElement(tns + XMLNames.Axlegear_Ratio, axleGearData.AxleGear.Ratio.ToXMLFormat(3))); + } + + private XElement GetAngledriveDescription(AngledriveData angledriveData) + { + if (angledriveData == null) { + return null; + } + + return new XElement( + tns + XMLNames.Component_Angledrive, + GetCommonDescription(angledriveData), + new XElement(tns + XMLNames.Component_AppVersion, angledriveData.InputData.AppVersion), + new XElement(tns + XMLNames.AngleDrive_Ratio, angledriveData.Angledrive.Ratio.ToXMLFormat(3))); + } + + private XElement GetGearboxDescription(GearboxData gearboxData) + { + var retVal = WrapComponent( + "Transmission", "TransmissionDataPIFType", + GetCommonDescription(gearboxData), + new XElement(tns + XMLNames.Gearbox_TransmissionType, gearboxData.Type.ToXMLFormat()), + new XElement(tns + XMLNames.Gearbox_Gears, + new XAttribute(xsi + "type", "TransmissionGearsPIFType"), + gearboxData.Gears.Select(x => + new XElement(tns + XMLNames.Gearbox_Gears_Gear, + new XAttribute(XMLNames.Gearbox_Gear_GearNumber_Attr, x.Key), + new XElement(tns + XMLNames.Gearbox_Gear_Ratio, x.Value.Ratio.ToXMLFormat(3)), + x.Value.MaxTorque != null ? new XElement(tns + XMLNames.Gearbox_Gears_MaxTorque, x.Value.MaxTorque.ToXMLFormat(0)) : null, + x.Value.MaxSpeed != null ? new XElement(tns + XMLNames.Gearbox_Gear_MaxSpeed, x.Value.MaxSpeed.ToXMLFormat(0)) : null))) + ); + return retVal; + + } + private XElement GetEngineDescription(CombustionEngineData engineData, List<List<FuelData.Entry>> fuelModes) { XNamespace v23 = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V23; - return WrapComponent(XMLNames.Component_Engine, "EngineDataPIFType", + + var fuels = new List<XElement>(); + foreach (var mode in engineData.InputData.EngineModes) { + fuels.Add( + new XElement( + tns + XMLNames.Engine_FuelModes, + new XElement(tns + XMLNames.Engine_IdlingSpeed, mode.IdleSpeed.AsRPM.ToXMLFormat(0)), + new XElement( + tns + XMLNames.Engine_FullLoadAndDragCurve, + FullLoadCurveReader.Create(mode.FullLoadCurve, true).FullLoadEntries.Select( + x => new XElement( + tns + XMLNames.Engine_FullLoadCurve_Entry, + new XAttribute(XMLNames.Engine_EngineFullLoadCurve_EngineSpeed_Attr, x.EngineSpeed.AsRPM.ToXMLFormat(2)), + new XAttribute(XMLNames.Engine_FullLoadCurve_MaxTorque_Attr, x.TorqueFullLoad.ToXMLFormat(2)), + new XAttribute(XMLNames.Engine_FullLoadCurve_DragTorque_Attr, x.TorqueDrag.ToXMLFormat(2))) + )), + new XElement( + tns + "Fuels", + mode.Fuels.Select(x => new XElement(tns + "FuelType", x.FuelType.ToXMLFormat()))) + ) + ); + } + + var retVal = WrapComponent( + XMLNames.Component_Engine, "EngineDataPIFType", GetCommonDescription(engineData), - new XElement(tns + XMLNames.Component_AppVersion, "TODO!"), new XElement(tns + XMLNames.Engine_Displacement, engineData.Displacement.ConvertToCubicDeziMeter().ToXMLFormat(0)), new XElement(tns + XMLNames.Engine_RatedSpeed, engineData.RatedSpeedDeclared.AsRPM.ToXMLFormat(0)), new XElement(tns + XMLNames.Engine_RatedPower, engineData.RatedPowerDeclared.ToXMLFormat(0)), - new XElement(tns + "MaxEngineTorque", "TODO!"), - new XElement(tns + XMLNames.Engine_WHRType, - new XElement(v23 + XMLNames.Engine_WHR_MechanicalOutputICE, (engineData.WHRType & WHRType.MechanicalOutputICE) != 0), - new XElement(v23 + XMLNames.Engine_WHR_MechanicalOutputIDrivetrain, (engineData.WHRType & WHRType.MechanicalOutputDrivetrain) != 0), + new XElement(tns + XMLNames.Engine_MaxTorque, engineData.InputData.MaxTorqueDeclared.ToXMLFormat(0)), + new XElement( + tns + XMLNames.Engine_WHRType, + new XElement( + v23 + XMLNames.Engine_WHR_MechanicalOutputICE, (engineData.WHRType & WHRType.MechanicalOutputICE) != 0), + new XElement( + v23 + XMLNames.Engine_WHR_MechanicalOutputIDrivetrain, + (engineData.WHRType & WHRType.MechanicalOutputDrivetrain) != 0), new XElement(v23 + XMLNames.Engine_WHR_ElectricalOutput, (engineData.WHRType & WHRType.ElectricalOutput) != 0) - ) - ); + ), + fuels + ); + return retVal; } - private XElement WrapComponent(string elementName, string dataType, object[] commonElements, params object[] specificElements) + private XElement WrapComponent( + string elementName, string dataType, object[] commonElements, params object[] specificElements) { - return new XElement(tns + elementName, - new XElement(tns + XMLNames.ComponentDataWrapper, - new XAttribute(xsi + "type", dataType), - commonElements, - specificElements)); + return new XElement( + tns + elementName, + new XElement( + tns + XMLNames.ComponentDataWrapper, + new XAttribute(xsi + "type", dataType), + commonElements, + specificElements)); } private object[] GetCommonDescription(CombustionEngineData data) { return new object[] { - new XElement(tns + XMLNames.Component_Manufacturer, data.Manufacturer), + new XElement(tns + XMLNames.Component_Manufacturer, data.Manufacturer), new XElement(tns + XMLNames.Component_Model, data.ModelName), new XElement(tns + XMLNames.Report_Component_CertificationNumber, data.CertificationNumber), - new XElement(tns + XMLNames.Component_Date, XmlConvert.ToString(data.Date, XmlDateTimeSerializationMode.Utc)) + new XElement(tns + XMLNames.Component_Date, XmlConvert.ToString(data.Date, XmlDateTimeSerializationMode.Utc)), + new XElement(tns + XMLNames.Component_AppVersion, data.InputData.AppVersion) + }; + } + + protected virtual object[] GetCommonDescription(GearboxData data) + { + return new object[] { + new XElement(tns + XMLNames.Component_Manufacturer, data.Manufacturer), + new XElement(tns + XMLNames.Component_Model, data.ModelName), + new XElement(tns + XMLNames.Component_Gearbox_CertificationMethod, data.CertificationMethod.ToXMLFormat()), + data.CertificationMethod == CertificationMethod.StandardValues + ? null + : new XElement(tns + XMLNames.Report_Component_CertificationNumber, data.CertificationNumber), + new XElement(tns + XMLNames.Component_Date, XmlConvert.ToString(data.Date, XmlDateTimeSerializationMode.Utc)), + new XElement(tns + XMLNames.Component_AppVersion, data.InputData.AppVersion) + }; + } + + protected virtual object[] GetCommonDescription(SimulationComponentData data) + { + return new object[] { + new XElement(tns + XMLNames.Component_Manufacturer, data.Manufacturer), + new XElement(tns + XMLNames.Component_Model, data.ModelName), + new XElement(tns + XMLNames.Report_Component_CertificationMethod, data.CertificationMethod.ToXMLFormat()), + data.CertificationMethod == CertificationMethod.StandardValues + ? null + : new XElement(tns + XMLNames.Report_Component_CertificationNumber, data.CertificationNumber), + new XElement(tns + XMLNames.Component_Date, XmlConvert.ToString(data.Date, XmlDateTimeSerializationMode.Utc)), }; } } diff --git a/VectoCore/VectoCore/Resources/XSD/VectoOutputPrimaryBus.xsd b/VectoCore/VectoCore/Resources/XSD/VectoOutputPrimaryBus.xsd index 450b40b9cac97e21da4169c8cac6d3e603785351..6deb35b2c4b9546a61b7c9a36f4e074e6e7d00f5 100644 --- a/VectoCore/VectoCore/Resources/XSD/VectoOutputPrimaryBus.xsd +++ b/VectoCore/VectoCore/Resources/XSD/VectoOutputPrimaryBus.xsd @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- edited with XMLSpy v2016 rel. 2 sp1 (x64) (http://www.altova.com) by Helmut Eichlseder (TU Graz/Inst. f. VKM und THD) --> -<xs:schema xmlns="urn:tugraz:ivt:VectoAPI:DeclarationOutput:PrimaryBusInformation:HeavyBus:v0.1" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:v1.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0" xmlns:v2.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0" xmlns:v2.1="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.1" xmlns:v2.3="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.3" xmlns:v2.6="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.6" xmlns:common="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions" xmlns:pif="urn:tugraz:ivt:VectoAPI:PrimaryVehicleInformation" targetNamespace="urn:tugraz:ivt:VectoAPI:DeclarationOutput:PrimaryBusInformation:HeavyBus:v0.1" elementFormDefault="qualified" attributeFormDefault="unqualified"> - <xs:import namespace="urn:tugraz:ivt:VectoAPI:PrimaryVehicleInformation" schemaLocation="VectoOutputPrimaryVehicleInformation.xsd"/> +<xs:schema xmlns="urn:tugraz:ivt:VectoAPI:DeclarationOutput:PrimaryVehicleInformation:HeavyBus:v0.1" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:v1.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0" xmlns:v2.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0" xmlns:v2.1="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.1" xmlns:v2.3="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.3" xmlns:v2.6="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.6" xmlns:common="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions" xmlns:pif="urn:tugraz:ivt:VectoAPI:DeclarationOutput:PrimaryVehicleInformation" targetNamespace="urn:tugraz:ivt:VectoAPI:DeclarationOutput:PrimaryVehicleInformation:HeavyBus:v0.1" elementFormDefault="qualified" attributeFormDefault="unqualified"> + <xs:import namespace="urn:tugraz:ivt:VectoAPI:DeclarationOutput:PrimaryVehicleInformation" schemaLocation="VectoOutputPrimaryVehicleInformation.xsd"/> <xs:import namespace="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions" schemaLocation="VectoDeclarationDefinitions.xsd"/> <xs:import namespace="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0" schemaLocation="VectoDeclarationDefinitions.1.0.xsd"/> <xs:import namespace="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0" schemaLocation="VectoDeclarationDefinitions.2.0.xsd"/> @@ -29,7 +29,12 @@ <xs:documentation>P221</xs:documentation> </xs:annotation> </xs:element> - <xs:element name="CertificationNumber" type="v1.0:CertificationNumberType"> + <xs:element name="CertificationMethod" type="v1.0:AngledriveCertificationOptionType"> + <xs:annotation> + <xs:documentation>P258 - [-]</xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="CertificationNumber" type="v1.0:CertificationNumberType" minOccurs="0"> <xs:annotation> <xs:documentation>P265</xs:documentation> </xs:annotation> @@ -45,11 +50,6 @@ </xs:annotation> </xs:element> <xs:element name="Ratio"/> - <xs:element name="CertificationMethod" type="v1.0:AngledriveCertificationOptionType"> - <xs:annotation> - <xs:documentation>P258 - [-]</xs:documentation> - </xs:annotation> - </xs:element> </xs:sequence> </xs:extension> </xs:complexContent> @@ -78,7 +78,12 @@ <xs:documentation>P216</xs:documentation> </xs:annotation> </xs:element> - <xs:element name="CertificationNumber" type="v1.0:CertificationNumberType"> + <xs:element name="CertificationMethod" type="v1.0:AxlegearCertificationOptionType"> + <xs:annotation> + <xs:documentation>P256 - [-]</xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="CertificationNumber" type="v1.0:CertificationNumberType" minOccurs="0"> <xs:annotation> <xs:documentation>P264</xs:documentation> </xs:annotation> @@ -95,11 +100,6 @@ </xs:element> <xs:element name="LineType"/> <xs:element name="Ratio"/> - <xs:element name="CertificationMethod" type="v1.0:AxlegearCertificationOptionType"> - <xs:annotation> - <xs:documentation>P256 - [-]</xs:documentation> - </xs:annotation> - </xs:element> </xs:sequence> </xs:extension> </xs:complexContent> @@ -373,7 +373,12 @@ <xs:documentation>P206</xs:documentation> </xs:annotation> </xs:element> - <xs:element name="CertificationNumber" type="v1.0:CertificationNumberType"> + <xs:element name="MainCertificationMethod" type="v1.0:GearboxCertificationOptionType"> + <xs:annotation> + <xs:documentation>P254 - [-]</xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="CertificationNumber" type="v1.0:CertificationNumberType" minOccurs="0"> <xs:annotation> <xs:documentation>P262</xs:documentation> </xs:annotation> @@ -389,11 +394,6 @@ </xs:annotation> </xs:element> <xs:element name="TransmissionType"/> - <xs:element name="MainCertificationMethod" type="v1.0:GearboxCertificationOptionType"> - <xs:annotation> - <xs:documentation>P254 - [-]</xs:documentation> - </xs:annotation> - </xs:element> <xs:element name="Gears" type="AbstractTransmissionGearsPIFType"/> </xs:sequence> </xs:extension> diff --git a/VectoCore/VectoCore/Resources/XSD/VectoOutputPrimaryVehicleInformation.xsd b/VectoCore/VectoCore/Resources/XSD/VectoOutputPrimaryVehicleInformation.xsd index 4f8d03f6921a7f40886929f9388a523c7b2f6a69..08ca618e518b5e73b281fd53cf7dcd2a4912b650 100644 --- a/VectoCore/VectoCore/Resources/XSD/VectoOutputPrimaryVehicleInformation.xsd +++ b/VectoCore/VectoCore/Resources/XSD/VectoOutputPrimaryVehicleInformation.xsd @@ -1,7 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- edited with XMLSpy v2016 rel. 2 sp1 (x64) (http://www.altova.com) by Helmut Eichlseder (TU Graz/Inst. f. VKM und THD) --> -<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:tugraz:ivt:VectoAPI:PrimaryVehicleInformation" xmlns:v1.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0" targetNamespace="urn:tugraz:ivt:VectoAPI:PrimaryVehicleInformation" elementFormDefault="qualified" attributeFormDefault="unqualified"> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationOutput:PrimaryVehicleInformation" xmlns:v1.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0" targetNamespace="urn:tugraz:ivt:VectoAPI:DeclarationOutput:PrimaryVehicleInformation" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:import namespace="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0" schemaLocation="VectoDeclarationDefinitions.1.0.xsd"/> +<xs:import namespace="urn:tugraz:ivt:VectoAPI:DeclarationOutput:PrimaryVehicleInformation:HeavyBus:v0.1" schemaLocation="VectoOutputPrimaryBus.xsd"/> <xs:element name="VectoOutputPrimaryVehicle" type="tns:PrimaryVehicleHeavyBusType"> <xs:annotation> <xs:documentation>Comment describing your root element</xs:documentation> diff --git a/VectoCore/VectoCoreTest/Models/SimulationComponentData/ValidationTest.cs b/VectoCore/VectoCoreTest/Models/SimulationComponentData/ValidationTest.cs index dc66b3e92a51da6daaf4cebe1e5b48ab776f924f..1e725e61575e57b5e77503254501b3d73bc0d774 100644 --- a/VectoCore/VectoCoreTest/Models/SimulationComponentData/ValidationTest.cs +++ b/VectoCore/VectoCoreTest/Models/SimulationComponentData/ValidationTest.cs @@ -634,6 +634,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponentData public string Model { get; set; } public string Creator { get; set; } public DateTime Date { get; set; } + public string AppVersion { get; set; } public string TechnicalReportId { get; set; } public CertificationMethod CertificationMethod diff --git a/VectoCore/VectoCoreTest/TestData/XML/XMLReaderDeclaration/SchemaVersion2.6_Buses/example_heavyBus_PIF.xml b/VectoCore/VectoCoreTest/TestData/XML/XMLReaderDeclaration/SchemaVersion2.6_Buses/example_heavyBus_PIF.xml index 095197109b9003ef2ec6bda2bf4437ef5be632b4..829662658b35541597d43c1456da8c2c050c0407 100644 --- a/VectoCore/VectoCoreTest/TestData/XML/XMLReaderDeclaration/SchemaVersion2.6_Buses/example_heavyBus_PIF.xml +++ b/VectoCore/VectoCoreTest/TestData/XML/XMLReaderDeclaration/SchemaVersion2.6_Buses/example_heavyBus_PIF.xml @@ -1,22 +1,22 @@ <?xml version="1.0" encoding="UTF-8"?> <tns:VectoOutputPrimaryVehicle xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns="urn:tugraz:ivt:VectoAPI:PrimaryVehicleInformation" - xmlns:tns="urn:tugraz:ivt:VectoAPI:PrimaryVehicleInformation" + xmlns="urn:tugraz:ivt:VectoAPI:DeclarationOutput:PrimaryVehicleInformation" + xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationOutput:PrimaryVehicleInformation" xmlns:v2.6="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.6" xmlns:v2.3="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.3" xmlns:v2.1="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.1" xmlns:v2.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0" xmlns:pif="urn:tugraz:ivt:VectoAPI:PrimaryVehicleInformation" - xmlns:pbus="urn:tugraz:ivt:VectoAPI:DeclarationOutput:PrimaryBusInformation:HeavyBus:v0.1" + xmlns:pbus="urn:tugraz:ivt:VectoAPI:DeclarationOutput:PrimaryVehicleInformation:HeavyBus:v0.1" xmlns:di="http://www.w3.org/2000/09/xmldsig#" -xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:PrimaryVehicleInformation E:\QUAM\Workspace\VECTO_DEV_Buses\VectoCore\VectoCore\Resources\XSD/VectoOutputPrimaryVehicleInformation.xsd -urn:tugraz:ivt:VectoAPI:DeclarationOutput:PrimaryBusInformation:HeavyBus:v0.1 E:\QUAM\Workspace\VECTO_DEV_Buses\VectoCore\VectoCore\Resources\XSD/VectoOutputPrimaryBus.xsd -urn:tugraz:ivt:VectoAPI:DeclarationDefinitions E:\QUAM\Workspace\VECTO_DEV_Buses\VectoCore\VectoCore\Resources\XSD/VectoDeclarationDefinitions.xsd -urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.1 E:\QUAM\Workspace\VECTO_DEV_Buses\VectoCore\VectoCore\Resources\XSD/VectoDeclarationDefinitions.2.1.xsd"> +xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationOutput:PrimaryVehicleInformation E:\QUAM\Workspace\VECTO_DEV_Buses\VectoCore\VectoCore\Resources\XSD/VectoOutputPrimaryVehicleInformation.xsd urn:tugraz:ivt:VectoAPI:DeclarationOutput:PrimaryVehicleInformation:HeavyBus:v0.1 E:\QUAM\Workspace\VECTO_DEV_Buses\VectoCore\VectoCore\Resources\XSD/VectoOutputPrimaryBus.xsd urn:tugraz:ivt:VectoAPI:DeclarationDefinitions E:\QUAM\Workspace\VECTO_DEV_Buses\VectoCore\VectoCore\Resources\XSD/VectoDeclarationDefinitions.xsd urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.1 E:\QUAM\Workspace\VECTO_DEV_Buses\VectoCore\VectoCore\Resources\XSD/VectoDeclarationDefinitions.2.1.xsd"> - <tns:Data id="PIFHB-VEH-1234567890" xsi:type="PrimaryVehicleHeavyBusDataType" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationOutput:PrimaryBusInformation:HeavyBus:v0.1"> +<!-- +xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:PrimaryVehicleInformation E:\QUAM\Workspace\VECTO_DEV_Buses\VectoCore\VectoCore\Resources\XSD/VectoOutputPrimaryVehicleInformation.xsd urn:tugraz:ivt:VectoAPI:DeclarationOutput:PrimaryVehicleInformation:HeavyBus:v0.1 E:\QUAM\Workspace\VECTO_DEV_Buses\VectoCore\VectoCore\Resources\XSD/VectoOutputPrimaryBus.xsd" +--> + <tns:Data id="PIFHB-VEH-1234567890" xsi:type="pbus:PrimaryVehicleHeavyBusDataType" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationOutput:PrimaryVehicleInformation:HeavyBus:v0.1"> <Vehicle xsi:type="VehiclePIFType"> <ManufacturerPrimaryVehicle>Generic Truck Manufacturer</ManufacturerPrimaryVehicle> @@ -84,11 +84,11 @@ urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.1 E:\QUAM\Workspace\VECTO_DEV_ <Data xsi:type="pbus:TransmissionDataPIFType"> <Manufacturer>Generic Gearbox Manufacturer</Manufacturer> <Model>Generic 40t Long Haul Truck Gearbox</Model> + <MainCertificationMethod>Standard values</MainCertificationMethod> <CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber> <Date>2017-01-11T11:00:00Z</Date> <AppVersion>3.0.1</AppVersion> <TransmissionType>AMT</TransmissionType> - <MainCertificationMethod>Standard values</MainCertificationMethod> <Gears xsi:type="TransmissionGearsPIFType"> <Gear number="1"> <Ratio>14.930</Ratio> @@ -147,11 +147,11 @@ urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.1 E:\QUAM\Workspace\VECTO_DEV_ <Data xsi:type="pbus:AngledriveDataPIFType"> <Manufacturer>Generic Gearbox Manufacturer</Manufacturer> <Model>Generic 40t Long Haul Truck Gearbox</Model> + <CertificationMethod>Standard values</CertificationMethod> <CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber> <Date>2017-01-11T11:00:00Z</Date> <AppVersion>3.0.1</AppVersion> <Ratio>2.345</Ratio> - <CertificationMethod>Standard values</CertificationMethod> </Data> </Angledrive> <!-- Retarder --> @@ -159,12 +159,12 @@ urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.1 E:\QUAM\Workspace\VECTO_DEV_ <Data xsi:type="pbus:AxlegearDataPIFType"> <Manufacturer>Generic Gearbox Manufacturer</Manufacturer> <Model>Generic 40t Long Haul Truck AxleGear</Model> + <CertificationMethod>Standard values</CertificationMethod> <CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber> <Date>2017-01-11T11:00:00Z</Date> <AppVersion>3.0.1</AppVersion> <LineType>Single portal axle</LineType> <Ratio>2.590</Ratio> - <CertificationMethod>Standard values</CertificationMethod> </Data> </Axlegear> <AxleWheels xsi:type="v2.0:AxleWheelsComponentDeclarationType"> diff --git a/VectoCore/VectoCoreTest/Utils/MockDeclarationVehicleInputData.cs b/VectoCore/VectoCoreTest/Utils/MockDeclarationVehicleInputData.cs index cad231eee0b183ddce3758e3f6c57edb861ea0c1..1932a1e8da8cbb357459e416ed8e08d85a79b8f0 100644 --- a/VectoCore/VectoCoreTest/Utils/MockDeclarationVehicleInputData.cs +++ b/VectoCore/VectoCoreTest/Utils/MockDeclarationVehicleInputData.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Xml; using TUGraz.VectoCommon.BusAuxiliaries; using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Models; @@ -15,6 +16,7 @@ namespace TUGraz.VectoCore.Tests.Utils { public string Manufacturer { get; } public string Model { get; } public DateTime Date { get; } + public string AppVersion { get { return "Mock-Class"; } } public CertificationMethod CertificationMethod { get; } public string CertificationNumber { get; } public DigestData DigestValue { get; } @@ -53,6 +55,7 @@ namespace TUGraz.VectoCore.Tests.Utils { public Meter Length { get; set; } public Meter Width { get; set; } public IVehicleComponentsDeclaration Components { get { return this; } } + public XmlNode XMLSource { get; } #endregion @@ -85,6 +88,7 @@ namespace TUGraz.VectoCore.Tests.Utils { public string Manufacturer { get; } public string Model { get; } public DateTime Date { get; } + public string AppVersion { get { return "Mock-Class"; } } public CertificationMethod CertificationMethod { get; } public string CertificationNumber { get; } public DigestData DigestValue { get; } @@ -112,6 +116,8 @@ namespace TUGraz.VectoCore.Tests.Utils { get { return _components; } } + public XmlNode XMLSource { get; } + public IVehicleComponentsEngineering Components { get { return this; } } public string Identifier { get; } public bool ExemptedVehicle { get; } diff --git a/VectoCore/VectoCoreTest/Utils/MockEngineDataProvider.cs b/VectoCore/VectoCoreTest/Utils/MockEngineDataProvider.cs index ac55fccee0ce442b54c85eda5425a5b3b6806591..fb3f5a8dba2f1401a7d1201cfa880600e0e649f2 100644 --- a/VectoCore/VectoCoreTest/Utils/MockEngineDataProvider.cs +++ b/VectoCore/VectoCoreTest/Utils/MockEngineDataProvider.cs @@ -50,6 +50,7 @@ namespace TUGraz.VectoCore.Tests.Utils public string Model { get; set; } public string Creator { get; set; } public DateTime Date { get; set; } + public string AppVersion { get { return "Mock-Class"; } } public string TechnicalReportId { get; set; } public CertificationMethod CertificationMethod { get{return CertificationMethod.NotCertified;} } public string CertificationNumber { get; set; }