diff --git a/CHANGES.md b/CHANGES.md index d2f5a3bdc9d29e035e26827e5d88beb512a24731..e002dcaa6dc2f94b1a6070d96af12487f89b644e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,20 @@ +**VECTO v4.3.3 Official Release (03-03-2025)** + + +- Bug Fixes + + * CodeEU #950: Check if XML element is signed (#950) (vecto/vecto!314) + * CodeEU #954: NgTankSystem optional for HEV lorries MRF XSD (vecto/vecto!315) + * fix: monitoring report for dual fuel vehicles (vecto/vecto!318) + * fix: secure XML loading against external entity injection (vecto/vecto!319) + * fix: correct interim supercap reader type (vecto/vecto!320) + * fix: parameter IDs for XSDs v2.3 and v2.6 (vecto/vecto!322) + + + **VECTO v4.3.2-RC (06-02-2025)** - Features diff --git a/Directory.Build.props b/Directory.Build.props index 58ba0ee8054ed2abc224ce85f6df0920a505d75a..c3b174e29b83f9f95893220e0a38a97ad3019345 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -16,7 +16,7 @@ <Deterministic>true</Deterministic> <!-- Set to true for VectoCore to fix Ninject version conflicts--> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> - <Version>4.3.2</Version> + <Version>4.3.3</Version> <DefineTrace>false</DefineTrace> <DisableDiagnosticTracing>true</DisableDiagnosticTracing> <RemoveIntegerChecks>true</RemoveIntegerChecks> diff --git a/Documentation/User Manual Source/Release Notes Vecto4.x.pdf b/Documentation/User Manual Source/Release Notes Vecto4.x.pdf index 594c956154450eeb28474d14e34abdec0aa3d19f..c0e90587628612667dd1f2f2d689a7aee4efd10f 100644 Binary files a/Documentation/User Manual Source/Release Notes Vecto4.x.pdf and b/Documentation/User Manual Source/Release Notes Vecto4.x.pdf differ diff --git a/Documentation/User Manual Source/ReleaseNotesMDs/ReleaseNotesVecto4x.md b/Documentation/User Manual Source/ReleaseNotesMDs/ReleaseNotesVecto4x.md index 5dee5c63af92f805b82b3aac2e571d0fbb929c94..769a8d206a7e9e967c7a5b4eb1a6ee2562407a95 100644 --- a/Documentation/User Manual Source/ReleaseNotesMDs/ReleaseNotesVecto4x.md +++ b/Documentation/User Manual Source/ReleaseNotesMDs/ReleaseNotesVecto4x.md @@ -6,6 +6,26 @@ +# VECTO v4.3.3 Official Release (03-03-2025) + + +## Bug Fixes + +- Check if XML element is signed (#950) (vecto/vecto!314) + +- NgTankSystem optional for HEV lorries MRF XSD (vecto/vecto!315) + +- fix: monitoring report for dual fuel vehicles (vecto/vecto!318) + +- fix: secure XML loading against external entity injection (vecto/vecto!319) + +- fix: correct interim supercap reader type (vecto/vecto!320) + +- fix: parameter IDs for XSDs v2.3 and v2.6 (vecto/vecto!322) + + + + # VECTO v4.3.2-RC (06-02-2025) ## Features diff --git a/Documentation/User Manual Source/ReleaseNotesMDs/release_notes.md b/Documentation/User Manual Source/ReleaseNotesMDs/release_notes.md index cc7c24318b73efb8a8d061cf7ab796bf890c7456..5d66ec565caa4e724d1393085e88821f28b0f9ee 100644 --- a/Documentation/User Manual Source/ReleaseNotesMDs/release_notes.md +++ b/Documentation/User Manual Source/ReleaseNotesMDs/release_notes.md @@ -1,18 +1,18 @@ -## VECTO v4.3.2-RC (06-02-2025) +## VECTO v4.3.3 Official Release (03-03-2025) -### Features - -- New battery and supercap readers (vecto/vecto!309) ### Bug Fixes -- ATShiftStrategyOptimized - No UpshiftFomL if not locked (vecto/vecto!301) +- Check if XML element is signed (#950) (vecto/vecto!314) + +- NgTankSystem optional for HEV lorries MRF XSD (vecto/vecto!315) + +- fix: monitoring report for dual fuel vehicles (vecto/vecto!318) -- Forbid downshift to locked gear in APT-S if it generates direct upshift condition (vecto/vecto!307) +- fix: secure XML loading against external entity injection (vecto/vecto!319) -- Add condition to write BusAuxiliaries output data in vsum (vecto/vecto!306) +- fix: correct interim supercap reader type (vecto/vecto!320) -- Allow old XMLs for battery and supercap in development only (vecto/vecto!311) +- fix: parameter IDs for XSDs v2.3 and v2.6 (vecto/vecto!322) -- Correct binding for supercap input data class; use correct xml data type in xml component reader for supercap (vecto/vecto!310) \ No newline at end of file diff --git a/Documentation/User Manual/6-changelog/changelog.md b/Documentation/User Manual/6-changelog/changelog.md index d2f5a3bdc9d29e035e26827e5d88beb512a24731..e002dcaa6dc2f94b1a6070d96af12487f89b644e 100644 --- a/Documentation/User Manual/6-changelog/changelog.md +++ b/Documentation/User Manual/6-changelog/changelog.md @@ -2,6 +2,20 @@ +**VECTO v4.3.3 Official Release (03-03-2025)** + + +- Bug Fixes + + * CodeEU #950: Check if XML element is signed (#950) (vecto/vecto!314) + * CodeEU #954: NgTankSystem optional for HEV lorries MRF XSD (vecto/vecto!315) + * fix: monitoring report for dual fuel vehicles (vecto/vecto!318) + * fix: secure XML loading against external entity injection (vecto/vecto!319) + * fix: correct interim supercap reader type (vecto/vecto!320) + * fix: parameter IDs for XSDs v2.3 and v2.6 (vecto/vecto!322) + + + **VECTO v4.3.2-RC (06-02-2025)** - Features diff --git a/Documentation/User Manual/help.html b/Documentation/User Manual/help.html index 7321bdabbfba37f865de72a62a698c79eefd7625..85c6b51e1e8bc5e3543afd5005cf1498c59bd4ee 100644 --- a/Documentation/User Manual/help.html +++ b/Documentation/User Manual/help.html @@ -11000,6 +11000,21 @@ stored as LOG_backup.txt.</p> </section> <section id="changelog" class="level1"> <h1>Changelog</h1> +<p><strong>VECTO v4.3.3 Official Release (03-03-2025)</strong></p> +<ul> +<li><p>Bug Fixes</p> +<ul> +<li>CodeEU #950: Check if XML element is signed (#950) +(vecto/vecto!314)</li> +<li>CodeEU #954: NgTankSystem optional for HEV lorries MRF XSD +(vecto/vecto!315)</li> +<li>fix: monitoring report for dual fuel vehicles (vecto/vecto!318)</li> +<li>fix: secure XML loading against external entity injection +(vecto/vecto!319)</li> +<li>fix: correct interim supercap reader type (vecto/vecto!320)</li> +<li>fix: parameter IDs for XSDs v2.3 and v2.6 (vecto/vecto!322)</li> +</ul></li> +</ul> <p><strong>VECTO v4.3.2-RC (06-02-2025)</strong></p> <ul> <li><p>Features</p> diff --git a/VectoCommon/VectoCommon/Resources/XMLNames.Designer.cs b/VectoCommon/VectoCommon/Resources/XMLNames.Designer.cs index 72f6cc145b777f97286a05962cbb1db4167588f2..20e32a59223e9ae9ed24e7243d8ccf8a5febd714 100644 --- a/VectoCommon/VectoCommon/Resources/XMLNames.Designer.cs +++ b/VectoCommon/VectoCommon/Resources/XMLNames.Designer.cs @@ -3768,6 +3768,15 @@ namespace TUGraz.VectoCommon.Resources { } } + /// <summary> + /// Looks up a localized string similar to FuelType. + /// </summary> + public static string MonitoringFuelType { + get { + return ResourceManager.GetString("MonitoringFuelType", resourceCulture); + } + } + /// <summary> /// Looks up a localized string similar to Gearbox. /// </summary> diff --git a/VectoCommon/VectoCommon/Resources/XMLNames.resx b/VectoCommon/VectoCommon/Resources/XMLNames.resx index 00afee75412017168fa81739f4975ff4027bc7fb..b431cbcd5b0c5a9a8df9a2bfd0d8cb10e380505d 100644 --- a/VectoCommon/VectoCommon/Resources/XMLNames.resx +++ b/VectoCommon/VectoCommon/Resources/XMLNames.resx @@ -1,17 +1,17 @@ <?xml version="1.0" encoding="utf-8"?> <root> - <!-- - Microsoft ResX Schema - + <!-- + Microsoft ResX Schema + Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes associated with the data types. - + Example: - + ... ado.net/XML headers & schema ... <resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="version">2.0</resheader> @@ -26,36 +26,36 @@ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <comment>This is a comment</comment> </data> - - There are any number of "resheader" rows that contain simple + + There are any number of "resheader" rows that contain simple name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can read any of the formats listed below. - + mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with + value : The object must be serialized with : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. - + mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with + value : The object must be serialized with : System.Runtime.Serialization.Formatters.Soap.SoapFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array + value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> @@ -2196,4 +2196,7 @@ <data name="Component_FuelCell" xml:space="preserve"> <value>FuelCell</value> </data> + <data name="MonitoringFuelType" xml:space="preserve"> + <value>FuelType</value> + </data> </root> \ No newline at end of file diff --git a/VectoCommon/VectoHashing/VectoHash.cs b/VectoCommon/VectoHashing/VectoHash.cs index f7f838f3a00fd9ed94adbe9ed3e657a0c96a19f8..631b808151f5c8b591f3b14563279362dfe7a055 100644 --- a/VectoCommon/VectoHashing/VectoHash.cs +++ b/VectoCommon/VectoHashing/VectoHash.cs @@ -434,13 +434,8 @@ namespace TUGraz.VectoHashing throw new Exception("Invalid structure of input XML!"); } - if (nodes[index].Attributes[XMLNames.Component_ID_Attr] == null) { - return false; - } + var nodesDV = parent.SelectNodes("./*[local-name()='Signature']"); - var elementToHash = nodes[index].Attributes[XMLNames.Component_ID_Attr].Value; - var nodesDV = parent.SelectNodes(".//*[@URI='#" + elementToHash + "']/*[local-name() = 'DigestValue']"); - return (nodesDV != null && nodesDV.Count > 0); } diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs index 4c23345405693ada1879da380d16be7ed5da9a5c..20fe7fe7de42e3834676ecbe90cfa1dc7abbd644 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs @@ -774,10 +774,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON public void ValidateSimulationToolVersion() { - var xmlDoc = new XmlDocument(); - xmlDoc.Load(Path.Combine(Path.GetFullPath(BasePath), Body["ManufacturerRecord"].Value<string>())); - - string simToolVersionStr = XMLManufacturerReportReader.ReadElementValue(xmlDoc, "SimulationToolVersion"); + var xmlDoc = XMLHelper.SecureLoadXML(Path.Combine(Path.GetFullPath(BasePath), Body["ManufacturerRecord"].Value<string>())); + + string simToolVersionStr = XMLManufacturerReportReader.ReadElementValue(xmlDoc, "SimulationToolVersion"); string vectoVersionStr = VectoSimulationCore.VersionNumber; bool xmlVersionNewer = VersioningUtil.CompareVersions(simToolVersionStr, vectoVersionStr) > 0; @@ -789,10 +788,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON public void ValidateHash() { - var xmlDoc = new XmlDocument(); - xmlDoc.Load(Path.Combine(Path.GetFullPath(BasePath), Body["ManufacturerRecord"].Value<string>())); - - var signatureNode = xmlDoc.SelectSingleNode("//*[local-name()='Signature']"); + var xmlDoc = XMLHelper.SecureLoadXML(Path.Combine(Path.GetFullPath(BasePath), Body["ManufacturerRecord"].Value<string>())); + + var signatureNode = xmlDoc.SelectSingleNode("//*[local-name()='Signature']"); var signatureDigest = new DigestData(signatureNode); var hash = XMLHashProvider.ComputeHash(xmlDoc, signatureDigest.Reference.Remove(0, 1), signatureDigest.CanonicalizationMethods, @@ -807,8 +805,8 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON private void ReadManufacturerReport() { - var xmlDoc = new XmlDocument(); - xmlDoc.Load(Path.Combine(Path.GetFullPath(BasePath), Body["ManufacturerRecord"].Value<string>())); + var xmlDoc = XMLHelper.SecureLoadXML(Path.Combine(Path.GetFullPath(BasePath), Body["ManufacturerRecord"].Value<string>())); + var components = XMLManufacturerReportReader.GetContainingComponents(xmlDoc).GroupBy(s => s) .Select(g => new { Entry = g.Key, Count = g.Count() }); _componentDigests = new Dictionary<VectoComponents, IList<string>>(); diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLElectricStorageSystemDeclarationInputData.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLElectricStorageSystemDeclarationInputData.cs index c288a4a01ead6d909071a3d19d80eec9d49919a0..16f5710ecabc47d80f4a99d8c72a76042889ea76 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLElectricStorageSystemDeclarationInputData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLElectricStorageSystemDeclarationInputData.cs @@ -481,7 +481,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider public class XMLSuperCapDeclarationInputDataV01 : XMLSuperCapDeclarationInputDataV23 { public static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_MULTISTAGE_BUS_VEHICLE_NAMESPACE_VO1; - public const string XSD_TYPE = "REESSCapacitorType"; + public const string XSD_TYPE = "CapacitorSystemDataType"; public static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE); diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/MonitoringReport/XMLMonitoringReport.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/MonitoringReport/XMLMonitoringReport.cs index f7d5c3ec01d91591b0c14b0563d18542bbb9ba43..c209c4cc07e0b6858bca55fddc9a279b388664d9 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/MonitoringReport/XMLMonitoringReport.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/MonitoringReport/XMLMonitoringReport.cs @@ -470,21 +470,36 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.MonitoringReport } protected object[] GetEngineData() - { - return new object[] { - GetStandardFields(PlaceHolder.ENGINE.ToString()), - new XElement( - _tns + XMLNames.MonitoringWHTC, - new XElement(_tns + XMLNames.MonitoringCO2, double.NaN.ValueAsUnit(XMLNames.GramsPerKWattHour, 0)), - new XElement(_tns + XMLNames.MonitoringFuelConsumption, double.NaN.ValueAsUnit(XMLNames.GramsPerKWattHour, 0)) - ), - new XElement( - _tns + XMLNames.MonitoringWHSC, - new XElement(_tns + XMLNames.MonitoringCO2, double.NaN.ValueAsUnit(XMLNames.GramsPerKWattHour, 0)), - new XElement(_tns + XMLNames.MonitoringFuelConsumption, double.NaN.ValueAsUnit(XMLNames.GramsPerKWattHour, 0)) - ), - new XElement(_tns + XMLNames.MonitoringTypeApprovalNumber, GetPlaceholder(PlaceHolder.TYPE_APPROVAL_NUMBER)) - }; + { + var elements = new List<object>() { GetStandardFields(PlaceHolder.ENGINE.ToString()) }; + + foreach (var fuel in _modelData.EngineData.Fuels) + { + elements.Add( + new XElement( + _tns + XMLNames.MonitoringWHTC, + new XElement(_tns + XMLNames.MonitoringFuelType, fuel.FuelData.FuelType.ToXMLFormat()), + new XElement(_tns + XMLNames.MonitoringCO2, double.NaN.ValueAsUnit(XMLNames.GramsPerKWattHour, 0)), + new XElement(_tns + XMLNames.MonitoringFuelConsumption, double.NaN.ValueAsUnit(XMLNames.GramsPerKWattHour, 0)) + ) + ); + } + + foreach (var fuel in _modelData.EngineData.Fuels) + { + elements.Add( + new XElement( + _tns + XMLNames.MonitoringWHSC, + new XElement(_tns + XMLNames.MonitoringFuelType, fuel.FuelData.FuelType.ToXMLFormat()), + new XElement(_tns + XMLNames.MonitoringCO2, double.NaN.ValueAsUnit(XMLNames.GramsPerKWattHour, 0)), + new XElement(_tns + XMLNames.MonitoringFuelConsumption, double.NaN.ValueAsUnit(XMLNames.GramsPerKWattHour, 0)) + ) + ); + } + + elements.Add(new XElement(_tns + XMLNames.MonitoringTypeApprovalNumber, GetPlaceholder(PlaceHolder.TYPE_APPROVAL_NUMBER))); + + return elements.ToArray(); } protected object[] GetAxleData() diff --git a/VectoCore/VectoCore/Resources/XSD/VectoDeclarationDefinitions.2.3.xsd b/VectoCore/VectoCore/Resources/XSD/VectoDeclarationDefinitions.2.3.xsd index ad90c58961a0d02b3343995e5dd209c628a97cc8..61a677928387b269b77e04e278e45172200d96db 100644 --- a/VectoCore/VectoCore/Resources/XSD/VectoDeclarationDefinitions.2.3.xsd +++ b/VectoCore/VectoCore/Resources/XSD/VectoDeclarationDefinitions.2.3.xsd @@ -191,7 +191,7 @@ Changelog: </xs:element> <xs:element name="CertificationMethod"> <xs:annotation> - <xs:documentation>P516 - enum</xs:documentation> + <xs:documentation>P517 - enum</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="v2.3:CertificationMethodType"> @@ -201,12 +201,12 @@ Changelog: </xs:element> <xs:element name="BatteryType" type="v2.3:BatteryTypeType"> <xs:annotation> - <xs:documentation>P517 - enum</xs:documentation> + <xs:documentation>P518 - enum</xs:documentation> </xs:annotation> </xs:element> <xs:element name="RatedCapacity"> <xs:annotation> - <xs:documentation>P518 - [Ah]</xs:documentation> + <xs:documentation>P519 - [Ah]</xs:documentation> <xs:appinfo> <vectoParam:description> <vectoParam:parameterId component="BatterySystem">518</vectoParam:parameterId> @@ -222,7 +222,7 @@ Changelog: </xs:element> <xs:element name="ConnectorsSubsystemsIncluded" type="xs:boolean"> <xs:annotation> - <xs:documentation>P519 - bool</xs:documentation> + <xs:documentation>P520 - bool</xs:documentation> <xs:appinfo> <vectoParam:description> <vectoParam:parameterId component="BatterySystem">519</vectoParam:parameterId> @@ -236,7 +236,7 @@ Changelog: <xs:documentation>P516 - bool</xs:documentation> <xs:appinfo> <vectoParam:description> - <vectoParam:parameterId component="BatterySystem">520</vectoParam:parameterId> + <vectoParam:parameterId component="BatterySystem">516</vectoParam:parameterId> <vectoParam:unit>-</vectoParam:unit> </vectoParam:description> </xs:appinfo> @@ -244,7 +244,7 @@ Changelog: </xs:element> <xs:element name="TestingTemperature" type="xs:int"> <xs:annotation> - <xs:documentation>P537 - [°C]</xs:documentation> + <xs:documentation>P521 - [°C]</xs:documentation> <xs:appinfo> <vectoParam:description> <vectoParam:parameterId component="BatterySystem">521</vectoParam:parameterId> @@ -339,7 +339,7 @@ Changelog: </xs:element> <xs:element name="CertificationMethod"> <xs:annotation> - <xs:documentation>P516 - enum</xs:documentation> + <xs:documentation>P517 - enum</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="v2.3:CertificationMethodType"> @@ -349,12 +349,12 @@ Changelog: </xs:element> <xs:element name="BatteryType" type="v2.3:BatteryTypeType"> <xs:annotation> - <xs:documentation>P517 - enum</xs:documentation> + <xs:documentation>P518 - enum</xs:documentation> </xs:annotation> </xs:element> <xs:element name="RatedCapacity"> <xs:annotation> - <xs:documentation>P518 - [Ah]</xs:documentation> + <xs:documentation>P519 - [Ah]</xs:documentation> <xs:appinfo> <vectoParam:description> <vectoParam:parameterId component="BatterySystem">518</vectoParam:parameterId> @@ -499,10 +499,10 @@ Changelog: </xs:element> <xs:element name="CertificationMethod" type="v2.3:CertificationMethodType"> <xs:annotation> - <xs:documentation>P537 - enum</xs:documentation> + <xs:documentation>P538 - enum</xs:documentation> <xs:appinfo> <vectoParam:description> - <vectoParam:parameterId component="CapacitorSystem">537</vectoParam:parameterId> + <vectoParam:parameterId component="CapacitorSystem">538</vectoParam:parameterId> <vectoParam:unit>-</vectoParam:unit> </vectoParam:description> </xs:appinfo> @@ -510,10 +510,10 @@ Changelog: </xs:element> <xs:element name="Capacitance" type="v2.3:CapacitanceType"> <xs:annotation> - <xs:documentation>P538 - [F]</xs:documentation> + <xs:documentation>P539 - [F]</xs:documentation> <xs:appinfo> <vectoParam:description> - <vectoParam:parameterId component="CapacitorSystem">538</vectoParam:parameterId> + <vectoParam:parameterId component="CapacitorSystem">539</vectoParam:parameterId> <vectoParam:unit>F</vectoParam:unit> </vectoParam:description> </xs:appinfo> @@ -521,10 +521,10 @@ Changelog: </xs:element> <xs:element name="InternalResistance" type="v2.3:InternalResistanceSuperCapType"> <xs:annotation> - <xs:documentation>P539 - [Ohm]</xs:documentation> + <xs:documentation>P540 - [Ohm]</xs:documentation> <xs:appinfo> <vectoParam:description> - <vectoParam:parameterId component="CapacitorSystem">539</vectoParam:parameterId> + <vectoParam:parameterId component="CapacitorSystem">540</vectoParam:parameterId> <vectoParam:unit>mOhm</vectoParam:unit> </vectoParam:description> </xs:appinfo> @@ -532,10 +532,10 @@ Changelog: </xs:element> <xs:element name="MinVoltage" type="v2.3:CapacitorVoltageType"> <xs:annotation> - <xs:documentation>P540 - [V]</xs:documentation> + <xs:documentation>P541 - [V]</xs:documentation> <xs:appinfo> <vectoParam:description> - <vectoParam:parameterId component="CapacitorSystem">540</vectoParam:parameterId> + <vectoParam:parameterId component="CapacitorSystem">541</vectoParam:parameterId> <vectoParam:unit>V</vectoParam:unit> </vectoParam:description> </xs:appinfo> @@ -543,17 +543,17 @@ Changelog: </xs:element> <xs:element name="MaxVoltage" type="v2.3:CapacitorVoltageType"> <xs:annotation> - <xs:documentation>P541 - [V]</xs:documentation> + <xs:documentation>P542 - [V]</xs:documentation> </xs:annotation> </xs:element> <xs:element name="MaxChargingCurrent" type="v2.3:CapacitorMaxCurrentType"> <xs:annotation> - <xs:documentation>P542 - [A]</xs:documentation> + <xs:documentation>P543 - [A]</xs:documentation> </xs:annotation> </xs:element> <xs:element name="MaxDischargingCurrent" type="v2.3:CapacitorMaxCurrentType"> <xs:annotation> - <xs:documentation>P543 - [A]</xs:documentation> + <xs:documentation>P544 - [A]</xs:documentation> </xs:annotation> </xs:element> <xs:element name="TestingTemperature" type="xs:int" minOccurs="0"> @@ -561,7 +561,7 @@ Changelog: <xs:documentation>P537 - [°C]</xs:documentation> <xs:appinfo> <vectoParam:description> - <vectoParam:parameterId component="CapacitorSystem">544</vectoParam:parameterId> + <vectoParam:parameterId component="CapacitorSystem">537</vectoParam:parameterId> <vectoParam:unit>°C</vectoParam:unit> </vectoParam:description> </xs:appinfo> @@ -1877,7 +1877,7 @@ Changelog: <xs:annotation> <xs:appinfo> <vectoParam:description> - <vectoParam:parameterId component="BatterySystem">517</vectoParam:parameterId> + <vectoParam:parameterId component="BatterySystem">518</vectoParam:parameterId> <vectoParam:unit>-</vectoParam:unit> </vectoParam:description> </xs:appinfo> diff --git a/VectoCore/VectoCore/Resources/XSD/VectoDeclarationDefinitions.2.6.xsd b/VectoCore/VectoCore/Resources/XSD/VectoDeclarationDefinitions.2.6.xsd index 15b9aff84f6204443f0872c73b84ef3dd6795200..245141932d0bd422fee98c79986e1592245e29d3 100644 --- a/VectoCore/VectoCore/Resources/XSD/VectoDeclarationDefinitions.2.6.xsd +++ b/VectoCore/VectoCore/Resources/XSD/VectoDeclarationDefinitions.2.6.xsd @@ -261,10 +261,10 @@ </xs:element> <xs:element name="CertificationMethod" type="v2.3:CertificationMethodType"> <xs:annotation> - <xs:documentation>P537 - enum</xs:documentation> + <xs:documentation>P538 - enum</xs:documentation> <xs:appinfo> <vectoParam:description> - <vectoParam:parameterId component="CapacitorSystem">537</vectoParam:parameterId> + <vectoParam:parameterId component="CapacitorSystem">538</vectoParam:parameterId> <vectoParam:unit>-</vectoParam:unit> </vectoParam:description> </xs:appinfo> @@ -272,10 +272,10 @@ </xs:element> <xs:element name="Capacitance" type="v2.3:CapacitanceType"> <xs:annotation> - <xs:documentation>P538 - [F]</xs:documentation> + <xs:documentation>P539 - [F]</xs:documentation> <xs:appinfo> <vectoParam:description> - <vectoParam:parameterId component="CapacitorSystem">538</vectoParam:parameterId> + <vectoParam:parameterId component="CapacitorSystem">539</vectoParam:parameterId> <vectoParam:unit>F</vectoParam:unit> </vectoParam:description> </xs:appinfo> @@ -283,10 +283,10 @@ </xs:element> <xs:element name="InternalResistance" type="v2.3:InternalResistanceSuperCapType"> <xs:annotation> - <xs:documentation>P539 - [mOhm]</xs:documentation> + <xs:documentation>P540 - [mOhm]</xs:documentation> <xs:appinfo> <vectoParam:description> - <vectoParam:parameterId component="CapacitorSystem">539</vectoParam:parameterId> + <vectoParam:parameterId component="CapacitorSystem">540</vectoParam:parameterId> <vectoParam:unit>mOhm</vectoParam:unit> </vectoParam:description> </xs:appinfo> @@ -294,10 +294,10 @@ </xs:element> <xs:element name="MinVoltage" type="v2.3:CapacitorVoltageType"> <xs:annotation> - <xs:documentation>P540 - [V]</xs:documentation> + <xs:documentation>P541 - [V]</xs:documentation> <xs:appinfo> <vectoParam:description> - <vectoParam:parameterId component="CapacitorSystem">540</vectoParam:parameterId> + <vectoParam:parameterId component="CapacitorSystem">541</vectoParam:parameterId> <vectoParam:unit>V</vectoParam:unit> </vectoParam:description> </xs:appinfo> @@ -305,17 +305,17 @@ </xs:element> <xs:element name="MaxVoltage" type="v2.3:CapacitorVoltageType"> <xs:annotation> - <xs:documentation>P541 - [V]</xs:documentation> + <xs:documentation>P542 - [V]</xs:documentation> </xs:annotation> </xs:element> <xs:element name="MaxChargingCurrent" type="v2.3:CapacitorMaxCurrentType"> <xs:annotation> - <xs:documentation>P542 - [A]</xs:documentation> + <xs:documentation>P543 - [A]</xs:documentation> </xs:annotation> </xs:element> <xs:element name="MaxDischargingCurrent" type="v2.3:CapacitorMaxCurrentType"> <xs:annotation> - <xs:documentation>P543 - [A]</xs:documentation> + <xs:documentation>P544 - [A]</xs:documentation> </xs:annotation> </xs:element> <xs:element name="TestingTemperature" type="xs:int" minOccurs="0"> @@ -323,7 +323,7 @@ <xs:documentation>P537 - [°C]</xs:documentation> <xs:appinfo> <vectoParam:description> - <vectoParam:parameterId component="CapacitorSystem">544</vectoParam:parameterId> + <vectoParam:parameterId component="CapacitorSystem">537</vectoParam:parameterId> <vectoParam:unit>°C</vectoParam:unit> </vectoParam:description> </xs:appinfo> @@ -394,7 +394,7 @@ </xs:element> <xs:element name="CertificationMethod"> <xs:annotation> - <xs:documentation>P516 - enum</xs:documentation> + <xs:documentation>P517 - enum</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="v2.3:CertificationMethodType"> @@ -404,15 +404,15 @@ </xs:element> <xs:element name="BatteryType" type="v2.3:BatteryTypeType"> <xs:annotation> - <xs:documentation>P517 - enum</xs:documentation> + <xs:documentation>P518 - enum</xs:documentation> </xs:annotation> </xs:element> <xs:element name="RatedCapacity"> <xs:annotation> - <xs:documentation>P518 - [Ah]</xs:documentation> + <xs:documentation>P519 - [Ah]</xs:documentation> <xs:appinfo> <vectoParam:description> - <vectoParam:parameterId component="BatterySystem">518</vectoParam:parameterId> + <vectoParam:parameterId component="BatterySystem">519</vectoParam:parameterId> <vectoParam:unit>Ah</vectoParam:unit> </vectoParam:description> </xs:appinfo> diff --git a/VectoCore/VectoCore/Resources/XSD/VectoMonitoring.1.1.xsd b/VectoCore/VectoCore/Resources/XSD/VectoMonitoring.1.1.xsd new file mode 100644 index 0000000000000000000000000000000000000000..fc1d3c70d6a7db87632db969f1af7ede5a31c04f --- /dev/null +++ b/VectoCore/VectoCore/Resources/XSD/VectoMonitoring.1.1.xsd @@ -0,0 +1,870 @@ +<?xml version="1.0" encoding="utf-8"?> + +<xs:schema + xmlns="urn:tugraz:ivt:VectoAPI:MonitoringOutput:v1.1" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:v1.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0" + xmlns:mrf="urn:tugraz:ivt:VectoAPI:DeclarationOutput:v0.9" + targetNamespace="urn:tugraz:ivt:VectoAPI:MonitoringOutput:v1.1" + elementFormDefault="qualified" + attributeFormDefault="unqualified" + > + + <xs:import namespace="urn:tugraz:ivt:VectoAPI:DeclarationOutput:v0.9" schemaLocation="VectoOutputManufacturer.0.9.xsd"/> + <xs:import namespace="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0" schemaLocation="VectoDeclarationDefinitions.1.0.xsd"/> + + <xs:element name="VectoMonitoring" type="VectoMonitoringOutputType"/> + + <xs:complexType name="VectoMonitoringOutputType" abstract="true"> + <xs:attribute name="schemaVersion" type="xs:decimal" use="required"/> + </xs:complexType> + + <!-- VectoMonitoring Output Types--> + <xs:complexType name="ConventionalLorryDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:ConventionalLorryManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="Conventional_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="ConventionalPrimaryBusDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:ConventionalPrimaryBusManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="Conventional_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="ConventionalCompletedBusDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:ConventionalCompletedBusManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="Completed_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="HEV-Px_IHPCLorryDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:HEV-Px_IHPCLorryManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="HEV-Px_IHPC_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="HEV-Px_IHPCPrimaryBusDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:HEV-Px_IHPCPrimaryBusManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="HEV-Px_IHPC_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="HEV-S2_LorryDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:HEV-S2_LorryManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="HEV-S2_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="HEV-S2_PrimaryBusDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:HEV-S2_PrimaryBusManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="HEV-S2_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="HEV-S3_LorryDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:HEV-S3_LorryManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="HEV-S3_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="HEV-S3_PrimaryBusDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:HEV-S3_PrimaryBusManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="HEV-S3_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="HEV-S4_LorryDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:HEV-S4_LorryManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="HEV-S4_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="HEV-S4_PrimaryBusDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:HEV-S4_PrimaryBusManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="HEV-S4_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="HEV-IEPC-S_LorryDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:HEV-IEPC-S_LorryManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="HEV-IEPC-S_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="HEV-IEPC-S_PrimaryBusDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:HEV-IEPC-S_PrimaryBusManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="HEV-IEPC-S_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="HEVCompletedBusDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:HEVCompletedBusManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="Completed_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="PEV-E2_LorryDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:PEV-E2_LorryManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="PEV-E2_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="PEV-E2_PrimaryBusDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:PEV-E2_PrimaryBusManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="PEV-E2_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="PEV-E3_LorryDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:PEV-E3_LorryManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="PEV-E3_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="PEV-E3_PrimaryBusDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:PEV-E3_PrimaryBusManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="PEV-E3_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="PEV-E4_LorryDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:PEV-E4_LorryManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="PEV-E4_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="PEV-E4_PrimaryBusDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:PEV-E4_PrimaryBusManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="PEV-E4_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="PEV-IEPC_LorryDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:PEV-IEPC_LorryManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="PEV-IEPC_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="PEV-IEPC_PrimaryBusDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:PEV-IEPC_PrimaryBusManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="PEV-IEPC_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="PEVCompletedBusDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:PEVCompletedBusManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="Completed_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="ExemptedLorryDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:ExemptedLorryManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="Exempted_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="ExemptedPrimaryBusDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:ExemptedPrimaryBusManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="Exempted_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="ExemptedCompletedBusDataType"> + <xs:complexContent> + <xs:extension base="VectoMonitoringOutputType"> + <xs:sequence> + <xs:element name="ManufacturerRecord"> + <xs:complexType> + <xs:sequence> + <xs:element name="Data" type="mrf:ExemptedCompletedBusManufacturerOutputDataType"/> + <xs:element name="Signature" type="v1.0:SignatureType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AdditionalData" type="Exempted_DataType"></xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <!-- MonitoringData Vehicle Data Types--> + <xs:complexType name="Completed_DataType"> + <xs:sequence> + <xs:group ref="BaseVehicleData"/> + <xs:element name="AdvancedReducingTechnologies" type="AdvReducingTechDataType"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="Exempted_DataType"> + <xs:sequence> + <xs:group ref="BaseVehicleData"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="Conventional_DataType"> + <xs:sequence> + <xs:group ref="BaseVehicleData"/> + <xs:group ref="FullConventionalComponents"/> + <xs:element name="AdvancedReducingTechnologies" type="AdvReducingTechDataType"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="HEV-Px_IHPC_DataType"> + <xs:sequence> + <xs:group ref="BaseVehicleData"/> + <xs:group ref="FullConventionalComponents"/> + <xs:group ref="xEV-ElectricComponents"/> + <xs:element name="AdvancedReducingTechnologies" type="AdvReducingTechDataType"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="HEV-S2_DataType"> + <xs:sequence> + <xs:group ref="BaseVehicleData"/> + <xs:group ref="FullConventionalComponents"/> + <xs:group ref="HEV-Sx-ElectricComponents"/> + <xs:element name="AdvancedReducingTechnologies" type="AdvReducingTechDataType"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="HEV-S3_DataType"> + <xs:sequence> + <xs:group ref="BaseVehicleData"/> + <xs:group ref="NoGearboxConventionalComponents"/> + <xs:group ref="HEV-Sx-ElectricComponents"/> + <xs:element name="AdvancedReducingTechnologies" type="AdvReducingTechDataType"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="HEV-S4_DataType"> + <xs:sequence> + <xs:group ref="BaseVehicleData"/> + <xs:group ref="NoGearboxNoAxlegearConventionalComponents"/> + <xs:group ref="HEV-Sx-ElectricComponents"/> + <xs:element name="AdvancedReducingTechnologies" type="AdvReducingTechDataType"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="HEV-IEPC-S_DataType"> + <xs:sequence> + <xs:group ref="BaseVehicleData"/> + <xs:group ref="NoGearboxOptionalAxlegearConventionalComponents"/> + <xs:group ref="HEV-Sx-ElectricComponents"/> + <xs:element name="AdvancedReducingTechnologies" type="AdvReducingTechDataType"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="PEV-E2_DataType"> + <xs:sequence> + <xs:group ref="BaseVehicleData"/> + <xs:group ref="NoEngineConventionalComponents"/> + <xs:group ref="xEV-ElectricComponents"/> + <xs:element name="AdvancedReducingTechnologies" type="AdvReducingTechDataType"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="PEV-E3_DataType"> + <xs:sequence> + <xs:group ref="BaseVehicleData"/> + <xs:group ref="NoEngineNoGearboxConventionalComponents"/> + <xs:group ref="xEV-ElectricComponents"/> + <xs:element name="AdvancedReducingTechnologies" type="AdvReducingTechDataType"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="PEV-E4_DataType"> + <xs:sequence> + <xs:group ref="BaseVehicleData"/> + <xs:group ref="AxleWheelsConventionalComponents"/> + <xs:group ref="xEV-ElectricComponents"/> + <xs:element name="AdvancedReducingTechnologies" type="AdvReducingTechDataType"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="PEV-IEPC_DataType"> + <xs:sequence> + <xs:group ref="BaseVehicleData"/> + <xs:group ref="OptionalAxlegearConventionalComponents"/> + <xs:group ref="xEV-ElectricComponents"/> + <xs:element name="AdvancedReducingTechnologies" type="AdvReducingTechDataType"/> + </xs:sequence> + </xs:complexType> + <!-- MonitoringData Component Groups--> + <xs:group name="FullConventionalComponents"> + <xs:sequence> + <xs:element name="Engine" type="EngineDataType"/> + <xs:element name="Gearbox" type="GearboxDataType"/> + <xs:element name="Axlegear" type="AxlegearDataType"/> + <xs:element name="AxleWheels" type="AxleWheelsDataType"/> + </xs:sequence> + </xs:group> + <xs:group name="NoEngineConventionalComponents"> + <xs:sequence> + <xs:element name="Gearbox" type="GearboxDataType"/> + <xs:element name="Axlegear" type="AxlegearDataType"/> + <xs:element name="AxleWheels" type="AxleWheelsDataType"/> + </xs:sequence> + </xs:group> + <xs:group name="NoGearboxConventionalComponents"> + <xs:sequence> + <xs:element name="Engine" type="EngineDataType"/> + <xs:element name="Axlegear" type="AxlegearDataType"/> + <xs:element name="AxleWheels" type="AxleWheelsDataType"/> + </xs:sequence> + </xs:group> + <xs:group name="NoGearboxNoAxlegearConventionalComponents"> + <xs:sequence> + <xs:element name="Engine" type="EngineDataType"/> + <xs:element name="AxleWheels" type="AxleWheelsDataType"/> + </xs:sequence> + </xs:group> + <xs:group name="NoGearboxOptionalAxlegearConventionalComponents"> + <xs:sequence> + <xs:element name="Engine" type="EngineDataType"/> + <xs:element name="Axlegear" type="AxlegearDataType" minOccurs="0"/> + <xs:element name="AxleWheels" type="AxleWheelsDataType"/> + </xs:sequence> + </xs:group> + <xs:group name="NoEngineNoGearboxConventionalComponents"> + <xs:sequence> + <xs:element name="Axlegear" type="AxlegearDataType"/> + <xs:element name="AxleWheels" type="AxleWheelsDataType"/> + </xs:sequence> + </xs:group> + <xs:group name="OptionalAxlegearConventionalComponents"> + <xs:sequence> + <xs:element name="Axlegear" type="AxlegearDataType" minOccurs="0"/> + <xs:element name="AxleWheels" type="AxleWheelsDataType"/> + </xs:sequence> + </xs:group> + <xs:group name="AxleWheelsConventionalComponents"> + <xs:sequence> + <xs:element name="AxleWheels" type="AxleWheelsDataType"/> + </xs:sequence> + </xs:group> + <xs:group name="BaseVehicleData"> + <xs:sequence> + <xs:element name="VectoLicenseNbr" type="xs:string"> + <xs:annotation> + <xs:documentation>#72</xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="Vehicle" type="VehicleDataType"/> + </xs:sequence> + </xs:group> + <xs:group name="xEV-ElectricComponents"> + <xs:sequence> + <xs:element name="ElectricMachine" type="ElectricMachineDataType"/> + <xs:element name="ElectricEnergyStorage" type="ElectricEnergyStorageDataType"/> + </xs:sequence> + </xs:group> + <xs:group name="HEV-Sx-ElectricComponents"> + <xs:sequence> + <xs:group ref="xEV-ElectricComponents"/> + <xs:element name="ElectricMachineGEN" type="ElectricMachineGENDataType" /> + </xs:sequence> + </xs:group> + <!-- MonitoringData Component Types--> + <xs:complexType name="VehicleDataType"> + <xs:sequence> + <xs:element name="Make" type="xs:string"> + <xs:annotation> + <xs:documentation>#15</xs:documentation> + </xs:annotation> + </xs:element> + </xs:sequence> + </xs:complexType> + <xs:complexType name="EngineDataType"> + <xs:sequence> + <xs:element name="Manufacturer" type="xs:string"/> + <xs:element name="ManufacturerAddress" type="xs:string"/> + <xs:element name="Make" type="xs:string"/> + <xs:element name="WHTC" maxOccurs="2"> + <xs:complexType> + <xs:sequence> + <xs:element name="FuelType" type="v1.0:FuelTypeType"> + <xs:annotation> + <xs:documentation>P193</xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="CO2"> + <xs:annotation> + <xs:documentation>#75</xs:documentation> + </xs:annotation> + <xs:complexType> + <xs:simpleContent> + <xs:extension base="xs:double"> + <xs:attribute name="unit" use="required"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="g/kWh"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:element> + <xs:element name="FuelConsumption"> + <xs:annotation> + <xs:documentation>#76</xs:documentation> + </xs:annotation> + <xs:complexType> + <xs:simpleContent> + <xs:extension base="xs:double"> + <xs:attribute name="unit" use="required"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="g/kWh"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="WHSC" maxOccurs="2"> + <xs:complexType> + <xs:sequence> + <xs:element name="FuelType" type="v1.0:FuelTypeType"> + <xs:annotation> + <xs:documentation>P193</xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="CO2"> + <xs:annotation> + <xs:documentation>#77</xs:documentation> + </xs:annotation> + <xs:complexType> + <xs:simpleContent> + <xs:extension base="xs:double"> + <xs:attribute name="unit" use="required"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="g/kWh"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:element> + <xs:element name="FuelConsumption"> + <xs:annotation> + <xs:documentation>#78</xs:documentation> + </xs:annotation> + <xs:complexType> + <xs:simpleContent> + <xs:extension base="xs:double"> + <xs:attribute name="unit" use="required"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="g/kWh"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="TypeApprovalNumber" type="xs:string"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="GearboxDataType"> + <xs:sequence> + <xs:element name="Manufacturer" type="xs:string"> + <xs:annotation> + <xs:documentation>#24</xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="ManufacturerAddress" type="xs:string"> + <xs:annotation> + <xs:documentation>#24</xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="Make" type="xs:string"> + <xs:annotation> + <xs:documentation>#25</xs:documentation> + </xs:annotation> + </xs:element> + </xs:sequence> + </xs:complexType> + <xs:complexType name="AxlegearDataType"> + <xs:sequence> + <xs:element name="Manufacturer" type="xs:string"> + <xs:annotation> + <xs:documentation>#32</xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="ManufacturerAddress" type="xs:string"> + <xs:annotation> + <xs:documentation>#32</xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="Make" type="xs:string"> + <xs:annotation> + <xs:documentation>#33</xs:documentation> + </xs:annotation> + </xs:element> + </xs:sequence> + </xs:complexType> + <xs:complexType name="AxleWheelsDataType"> + <xs:sequence> + <xs:element name="Axle" minOccurs="2" maxOccurs="4"> + <xs:complexType> + <xs:sequence> + <xs:element name="Tyre"> + <xs:complexType> + <xs:sequence> + <xs:element name="Manufacturer" type="xs:string"> + <xs:annotation> + <xs:documentation>#39</xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="ManufacturerAddress" type="xs:string"> + <xs:annotation> + <xs:documentation>#39</xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="Make" type="xs:string"> + <xs:annotation> + <xs:documentation>#40</xs:documentation> + </xs:annotation> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + <xs:attribute name="axleNumber" use="required"> + <xs:simpleType> + <xs:restriction base="xs:int"> + <xs:minInclusive value="1"/> + <xs:maxInclusive value="4"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + <xs:complexType name="AdvReducingTechDataType"> + <xs:annotation> + <xs:documentation>#74</xs:documentation> + </xs:annotation> + <xs:sequence> + <xs:element name="Entry" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute name="category" use="required"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="advanced aerodynamic measures"/> + <xs:enumeration value="advanced rolling resistance measures"/> + <xs:enumeration value="advanced drivetrain technologies"/> + <xs:enumeration value="advanced engine technologies"/> + <xs:enumeration value="advanced auxiliary technologies"/> + <xs:enumeration value="additional ADAS technologies"/> + <xs:enumeration value="advanced powertrain integration and hybridisation"/> + <xs:enumeration value="other"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + <xs:complexType name="ElectricMachineDataType"> + <xs:sequence> + <xs:element name="Manufacturer" type="xs:string"/> + <xs:element name="ManufacturerAddress" type="xs:string"/> + <xs:element name="Make" type="xs:string"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="ElectricEnergyStorageDataType"> + <xs:sequence> + <xs:element name="Manufacturer" type="xs:string"/> + <xs:element name="ManufacturerAddress" type="xs:string"/> + <xs:element name="Make" type="xs:string"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="ElectricMachineGENDataType"> + <xs:sequence> + <xs:element name="Manufacturer" type="xs:string"/> + <xs:element name="ManufacturerAddress" type="xs:string"/> + <xs:element name="Make" type="xs:string"/> + </xs:sequence> + </xs:complexType> +</xs:schema> \ No newline at end of file diff --git a/VectoCore/VectoCore/Resources/XSD/VectoMonitoring.xsd b/VectoCore/VectoCore/Resources/XSD/VectoMonitoring.xsd index 1f038fc2e26d50ee3707eda2523ae759ead34f6c..962edfc821525d649927ee39cc67747893520c29 100644 --- a/VectoCore/VectoCore/Resources/XSD/VectoMonitoring.xsd +++ b/VectoCore/VectoCore/Resources/XSD/VectoMonitoring.xsd @@ -3,12 +3,13 @@ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:all_mon="urn:tugraz:ivt:VectoAPI:MonitoringOutput" xmlns:mon0.7="urn:tugraz:ivt:VectoAPI:MonitoringOutput:v0.7" targetNamespace="urn:tugraz:ivt:VectoAPI:MonitoringOutput" elementFormDefault="qualified" attributeFormDefault="unqualified" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:ParameterDocumentation ParameterDocumentation.xsd"> <!-- - This is a convienience file that imports the schema for all supported versions of customer information file and all supported declaration definitions + This is a convienience file that imports the schema for all supported versions of monitoring report file and all supported declaration definitions --> <xs:import namespace="urn:tugraz:ivt:VectoAPI:MonitoringOutput:v0.7" schemaLocation="VectoMonitoring.0.7.xsd"/> <xs:import namespace="urn:tugraz:ivt:VectoAPI:MonitoringOutput:v0.7.1" schemaLocation="VectoMonitoring.0.7.1.xsd"/> <xs:import namespace="urn:tugraz:ivt:VectoAPI:MonitoringOutput:v0.8" schemaLocation="VectoMonitoring.0.8.xsd"/> <xs:import namespace="urn:tugraz:ivt:VectoAPI:MonitoringOutput:v1.0" schemaLocation="VectoMonitoring.1.0.xsd"/> + <xs:import namespace="urn:tugraz:ivt:VectoAPI:MonitoringOutput:v1.1" schemaLocation="VectoMonitoring.1.1.xsd"/> <xs:import namespace="urn:tugraz:ivt:VectoAPI:DeclarationOutput" schemaLocation="VectoOutputManufacturer.xsd"/> </xs:schema> diff --git a/VectoCore/VectoCore/Resources/XSD/VectoOutputManufacturer.0.9.xsd b/VectoCore/VectoCore/Resources/XSD/VectoOutputManufacturer.0.9.xsd index 73355d065ef6f102d6f00bae1a375bc0ce935f53..b9047836b273cedda64814acdfd21c89719522b9 100644 --- a/VectoCore/VectoCore/Resources/XSD/VectoOutputManufacturer.0.9.xsd +++ b/VectoCore/VectoCore/Resources/XSD/VectoOutputManufacturer.0.9.xsd @@ -7,6 +7,7 @@ Changelog 2.10.2023: make Airdrag component in output mandatory (provide standard values in case no Airdrag is provided in input). make Model and DigestValue optional (only in output for measured component) 10.04.2024: change "Fuel cell vehicle" to "FCV Article 9 exempted" according to regulation 19.04.2024: restore wrong exempt techs along with the correct ones. + 11.02.2025: made ngTankSystem optional for HEV lorries. --> <!-- Imports_______________________________________________ --> <xs:import namespace="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0" schemaLocation="VectoDeclarationDefinitions.1.0.xsd"/> @@ -1086,7 +1087,7 @@ Changelog <xs:documentation>I.1.1.13.</xs:documentation> </xs:annotation> </xs:element> - <xs:element name="NgTankSystem" type="v1.0:NgTankSystemType"> + <xs:element name="NgTankSystem" type="v1.0:NgTankSystemType" minOccurs="0"> <xs:annotation> <xs:documentation>I.1.1.29</xs:documentation> </xs:annotation> diff --git a/VectoCore/VectoCore/Utils/XMLDefinitions.cs b/VectoCore/VectoCore/Utils/XMLDefinitions.cs index 7c6d79f032837406f2afb54a09c33fb38f77aefc..c00e927e7e1d402dd7fd7b7b6fc42b3eb1ccda0e 100644 --- a/VectoCore/VectoCore/Utils/XMLDefinitions.cs +++ b/VectoCore/VectoCore/Utils/XMLDefinitions.cs @@ -123,7 +123,7 @@ namespace TUGraz.VectoCore.Utils public const string MONITORING_NAMESPACE = "urn:tugraz:ivt:VectoAPI:MonitoringOutput"; - public const string MONITORING_SCHEMA_VERSION = "1.0"; + public const string MONITORING_SCHEMA_VERSION = "1.1"; public const string MONITORING_NAMESPACE_URI = MONITORING_NAMESPACE + ":v" + MONITORING_SCHEMA_VERSION; diff --git a/VectoCore/VectoCore/Utils/XMLHelper.cs b/VectoCore/VectoCore/Utils/XMLHelper.cs index 8bc2b75e7956abf19434491412ae1b42ec8d5e72..e7269fb600ae1548d0abade8c7bb7b4d2f38dede 100644 --- a/VectoCore/VectoCore/Utils/XMLHelper.cs +++ b/VectoCore/VectoCore/Utils/XMLHelper.cs @@ -33,6 +33,7 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Text; using System.Xml; using System.Xml.Linq; using System.Xml.Schema; @@ -436,7 +437,20 @@ namespace TUGraz.VectoCore.Utils return type; } + public static XmlDocument SecureLoadXML(string filePath) + { + var document = new XmlDocument(); + MemoryStream stream = new MemoryStream(File.ReadAllBytes(filePath)); + + XmlReaderSettings settings = new XmlReaderSettings() { DtdProcessing = DtdProcessing.Ignore, XmlResolver = null }; + + document.Load(XmlReader.Create(stream, settings)); + stream.Close(); + stream.Dispose(); + + return document; + } } } \ No newline at end of file diff --git a/VectoCore/VectoCoreTest/XML/Reports/MonitoringReportWriterTest.cs b/VectoCore/VectoCoreTest/XML/Reports/MonitoringReportWriterTest.cs index dec64c93e010d5b51336a1cb522dbdfd92ac9676..3460a9ceea468800115254d957e4bbfaaba5aff0 100644 --- a/VectoCore/VectoCoreTest/XML/Reports/MonitoringReportWriterTest.cs +++ b/VectoCore/VectoCoreTest/XML/Reports/MonitoringReportWriterTest.cs @@ -109,13 +109,44 @@ namespace TUGraz.VectoCore.Tests.XML.Reports : null : null; - return new VectoRunData() { + var engineData = (dataProvider is IMultistepBusInputDataProvider) + ? null + : (dataProvider.JobInputData.Vehicle.Components != null) + ? (dataProvider.JobInputData.Vehicle.Components.EngineInputData != null) + ? new CombustionEngineData() + : null + : null; + + if (engineData != null) + { + var fuelTypes = new List<FuelType>(); + + foreach (var mode in dataProvider.JobInputData.Vehicle.Components.EngineInputData.EngineModes) + { + var types = mode.Fuels.Select(x => x.FuelType); + + foreach (var type in types) + { + if (!fuelTypes.Contains(type)) + { + fuelTypes.Add(type); + } + } + } + + engineData.Fuels = fuelTypes.Select(x => new CombustionEngineFuelData() { + FuelData = DeclarationData.FuelData.Lookup(x, dataProvider.JobInputData.Vehicle.TankSystem) + } ).ToList(); + } + + return new VectoRunData() { InputData = dataProvider, VehicleData = new VehicleData() { OffVehicleCharging = false, AxleData = axleData }, - AxleGearData = axleGearData + AxleGearData = axleGearData, + EngineData = engineData }; }