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

Skip to content
Snippets Groups Projects
Commit 9e71f04b authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

Merge pull request #776 in VECTO/vecto-sim from...

Merge pull request #776 in VECTO/vecto-sim from ~EMQUARIMA/vecto-sim:ReleaseCandidates/v3.3.3.1609 to master

* commit '4162506d': (21 commits)
  creating official release 3.3.3.1639
  compute hash of declaration xml
  adding testcase for checking hashes in reports
  surround loading files with try/catch, handle null validation argument
  xmlvalidator: in case the file to validate is not of a known schema, call the validation callback with null as arguments.
  hashing tool: adding expected document type in viewmodels
  header may be missing in case of invalid file
  fixing testcase...
  extend testcase
  XML Validation: check if schema-info is set, i.e. XML is according to a known schema
  remove schem version - use common include files
  adding xsd files that include valid versions of CIF, MRF and monitoring report schema
  correcting test-files to be syntactically correct, adapt hash value
  adding testcase for validating component xml
  refactor xml validation to use xsd type to load according schema
  handle the case that a gearshift may occur for AT transmissions during coast action. if this is the case, perform coast action once more.
  torque converter: in case an operating point could not be found, use the same lower limit (i.e. engine idling speed * 1.001) to avoid 'jumping' engine speeds (between idling speed in case no operating point is found) and idling speed * 1.001 in case the engine speed of the found operating point is too low
  add tolerance for equality comparison of extrapolated values
  adapt testcases regarding extrapolation
  insert intermediate points into extended loss-map
  ...
parents e1bbb5a1 4162506d
Branches
No related tags found
No related merge requests found
Showing
with 105 additions and 47 deletions
File added
File added
No preview for this file type
No preview for this file type
......@@ -2,6 +2,18 @@
**VECTO 3.3.3**
***Build 1639 (2019-06-27) OFFICIAL RELEASE***
- Bugfixes (compared to VECTO 3.3.3.1609-RC)
* [VECTO-1003] - Vecto Error: Loss-Map extrapolation in declaration mode required (issue VECTO-991)
* [VECTO-1006] - Failed to find torque converter operating point on UD cycle (issue VECTO-996)
* [VECTO-1010] - Unexpected Response: ResponseOverload in UD cycle (issue VECTO-996)
* [VECTO-1015] - XML Schema not correctly identified
* [VECTO-1019] - Error opening job in case a file is missing
* [VECTO-1020] - HashingTool Crashes
* [VECTO-1021] - Invalid hash of job data
***Build 1609 (2019-05-29) RELEASE CANDIDATE***
- Improvement
......
......@@ -7561,6 +7561,19 @@ CycleTime,UnknownCycleName,3600</code></pre>
<div id="changelog" class="section level1">
<h1>Changelog</h1>
<p><strong>VECTO 3.3.3</strong></p>
<p><strong><em>Build 1639 (2019-06-27) OFFICIAL RELEASE</em></strong></p>
<ul>
<li>Bugfixes (compared to VECTO 3.3.3.1609-RC)
<ul>
<li>[VECTO-1003] - Vecto Error: Loss-Map extrapolation in declaration mode required (issue VECTO-991)</li>
<li>[VECTO-1006] - Failed to find torque converter operating point on UD cycle (issue VECTO-996)</li>
<li>[VECTO-1010] - Unexpected Response: ResponseOverload in UD cycle (issue VECTO-996)</li>
<li>[VECTO-1015] - XML Schema not correctly identified</li>
<li>[VECTO-1019] - Error opening job in case a file is missing</li>
<li>[VECTO-1020] - HashingTool Crashes</li>
<li>[VECTO-1021] - Invalid hash of job data</li>
</ul></li>
</ul>
<p><strong><em>Build 1609 (2019-05-29) RELEASE CANDIDATE</em></strong></p>
<ul>
<li>Improvement
File added
......@@ -30,5 +30,5 @@
*/
using System.Reflection;
[assembly: AssemblyVersion("0.2.0.1609")]
[assembly: AssemblyFileVersion("0.2.0.1609")]
[assembly: AssemblyVersion("0.2.0.1639")]
[assembly: AssemblyFileVersion("0.2.0.1639")]
......@@ -43,6 +43,7 @@ using HashingTool.Helper;
using HashingTool.Util;
using HashingTool.ViewModel.UserControl;
using TUGraz.VectoHashing;
using XmlDocumentType = TUGraz.VectoCore.Utils.XmlDocumentType;
namespace HashingTool.ViewModel
{
......@@ -60,7 +61,7 @@ namespace HashingTool.ViewModel
private DateTime? _date;
public HashComponentDataViewModel()
: base("Hash Component Data", false, HashingHelper.IsComponentFile)
: base("Hash Component Data", false, HashingHelper.IsComponentFile, XmlDocumentType.DeclarationComponentData)
{
_xmlFile.PropertyChanged += SourceChanged;
_saveCommand = new RelayCommand(SaveDocument,
......
......@@ -34,6 +34,7 @@ using System.ComponentModel;
using System.Linq;
using System.Xml;
using TUGraz.VectoHashing;
using XmlDocumentType = TUGraz.VectoCore.Utils.XmlDocumentType;
namespace HashingTool.ViewModel.UserControl
{
......@@ -48,7 +49,7 @@ namespace HashingTool.ViewModel.UserControl
private bool _manufacturerReportDigestValid;
public CustomerReportXMLFile(string name, Func<XmlDocument, IErrorLogger, bool?> contentCheck,
Action<XmlDocument, VectoXMLFile> hashValidation = null) : base(name, contentCheck, hashValidation)
Action<XmlDocument, VectoXMLFile> hashValidation = null) : base(name, contentCheck, XmlDocumentType.CustomerReport, hashValidation)
{
}
......
......@@ -33,6 +33,7 @@ using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Xml;
using XmlDocumentType = TUGraz.VectoCore.Utils.XmlDocumentType;
namespace HashingTool.ViewModel.UserControl
{
......@@ -41,8 +42,10 @@ namespace HashingTool.ViewModel.UserControl
protected string _digestValueRead;
private DateTime? _date;
public HashedXMLFile(string name, Func<XmlDocument, IErrorLogger, bool?> contentCheck,
Action<XmlDocument, VectoXMLFile> hashValidation = null) : base(name, true, contentCheck, hashValidation) {}
public HashedXMLFile(
string name, Func<XmlDocument, IErrorLogger, bool?> contentCheck, XmlDocumentType xmlDocumentType,
Action<XmlDocument, VectoXMLFile> hashValidation = null) : base(
name, true, contentCheck, xmlDocumentType, hashValidation) { }
public string DigestValueRead
{
......
......@@ -40,6 +40,7 @@ using TUGraz.VectoCommon.Resources;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.InputData.FileIO.XML.Declaration;
using TUGraz.VectoHashing;
using XmlDocumentType = TUGraz.VectoCore.Utils.XmlDocumentType;
namespace HashingTool.ViewModel.UserControl
{
......@@ -48,7 +49,7 @@ namespace HashingTool.ViewModel.UserControl
private bool _manufacturerReportValid;
public ManufacturerReportXMLFile(string name, Func<XmlDocument, IErrorLogger, bool?> contentCheck,
Action<XmlDocument, VectoXMLFile> hashValidation = null) : base(name, contentCheck, hashValidation)
Action<XmlDocument, VectoXMLFile> hashValidation = null) : base(name, contentCheck, XmlDocumentType.ManufacturerReport, hashValidation)
{
_xmlFile.PropertyChanged += UpdateComponents;
}
......
......@@ -37,6 +37,7 @@ using System.Xml;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCore.InputData.FileIO.XML.Declaration;
using TUGraz.VectoHashing;
using XmlDocumentType = TUGraz.VectoCore.Utils.XmlDocumentType;
namespace HashingTool.ViewModel.UserControl
{
......@@ -52,9 +53,8 @@ namespace HashingTool.ViewModel.UserControl
protected VectoJobFile _jobData;
private string _reportVin;
public ReportXMLFile(string name, Func<XmlDocument, IErrorLogger, bool?> contentCheck,
Action<XmlDocument, VectoXMLFile> hashValidation = null)
: base(name, contentCheck, hashValidation)
public ReportXMLFile(string name, Func<XmlDocument, IErrorLogger, bool?> contentCheck, XmlDocumentType xmlDocumentType, Action<XmlDocument, VectoXMLFile> hashValidation = null)
: base(name, contentCheck, xmlDocumentType, hashValidation)
{
_xmlFile.PropertyChanged += ReportChanged;
}
......@@ -123,7 +123,8 @@ namespace HashingTool.ViewModel.UserControl
JobDigestMatchesReport = vinMatch
&& digestMatch;
} catch (Exception) {
} catch (Exception e) {
_xmlFile.LogError(e.Message);
JobDigestValueComputed = "";
JobDigestMatchesReport = false;
}
......
......@@ -38,6 +38,7 @@ using HashingTool.Helper;
using TUGraz.VectoCommon.Hashing;
using TUGraz.VectoCommon.Resources;
using TUGraz.VectoHashing;
using XmlDocumentType = TUGraz.VectoCore.Utils.XmlDocumentType;
namespace HashingTool.ViewModel.UserControl
{
......@@ -50,7 +51,7 @@ namespace HashingTool.ViewModel.UserControl
public VectoJobFile(string name, Func<XmlDocument, IErrorLogger, bool?> contentCheck,
Action<XmlDocument, VectoXMLFile> hashValidation = null) : base(name, true, contentCheck, hashValidation)
Action<XmlDocument, VectoXMLFile> hashValidation = null) : base(name, true, contentCheck, XmlDocumentType.DeclarationJobData, hashValidation)
{
_xmlFile.PropertyChanged += JobFilechanged;
Components = new ObservableCollection<ComponentEntry>();
......
......@@ -35,6 +35,7 @@ using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Xml;
using HashingTool.Helper;
using XmlDocumentType = TUGraz.VectoCore.Utils.XmlDocumentType;
namespace HashingTool.ViewModel.UserControl
{
......@@ -51,11 +52,10 @@ namespace HashingTool.ViewModel.UserControl
private string _digestMethod;
public VectoXMLFile(string name, bool validate, Func<XmlDocument, IErrorLogger, bool?> contentCheck,
Action<XmlDocument, VectoXMLFile> hashValidation = null)
public VectoXMLFile(string name, bool validate, Func<XmlDocument, IErrorLogger, bool?> contentCheck, XmlDocumentType xmlDocumentType, Action<XmlDocument, VectoXMLFile> hashValidation = null)
{
_validateHashes = hashValidation;
_xmlFile = new XMLFileSelector(IoService, name, validate, contentCheck);
_xmlFile = new XMLFileSelector(IoService, name, xmlDocumentType, validate, contentCheck);
_xmlFile.PropertyChanged += FileChanged;
Name = name;
CanonicalizationMethods = new ObservableCollection<string>();
......
......@@ -72,13 +72,15 @@ namespace HashingTool.ViewModel.UserControl
private bool? _contentValid;
private RelayCommand _browseFileCommand;
private string _prefix;
private XmlDocumentType _expectedDocumentType;
public XMLFileSelector(IOService ioservice, string prefix, bool validate = false,
public XMLFileSelector(IOService ioservice, string prefix, XmlDocumentType expectedDocumentType, bool validate = false,
Func<XmlDocument, IErrorLogger, bool?> contentCheck = null)
{
IoService = ioservice;
_validate = validate;
_prefix = prefix;
_expectedDocumentType = expectedDocumentType;
_browseFileCommand = new RelayCommand(BrowseXMLFile, () => !_busy);
XMLValidationErrors = new ObservableCollection<string>();
HasContentValidation = contentCheck != null;
......@@ -181,23 +183,31 @@ namespace HashingTool.ViewModel.UserControl
IsValid = XmlFileStatus.Unknown;
return;
}
try {
using (var stream = File.OpenRead(fileName)) {
await LoadXMLFile(stream);
}
} catch (Exception e) {
LogError(e.Message);
}
}
private async void BrowseXMLFile()
{
string filename;
try {
using (var stream = IoService.OpenFileDialog(null, ".xml", "VECTO XML file|*.xml", out filename)) {
if (stream == null) {
return;
}
await LoadXMLFile(stream);
Source = filename;
//await LoadXMLFile(stream);
}
} catch (Exception e) {
LogError(e.Message);
}
}
......@@ -274,16 +284,30 @@ namespace HashingTool.ViewModel.UserControl
var validator = new AsyncXMLValidator(xml, r => { valid = r; },
(s, e) => {
Application.Current.Dispatcher.Invoke(
() =>
LogError(string.Format("Validation {0} Line {2}: {1}",
() => {
if (e.ValidationEventArgs == null) {
LogError(
string.Format(
"XML file does not validate against a supported version of {0}",
_expectedDocumentType.ToString()));
} else {
LogError(
string.Format(
"Validation {0} Line {2}: {1}",
s == XmlSeverityType.Warning ? "WARNING" : "ERROR",
e.ValidationEventArgs == null
? e.Exception.Message +
(e.Exception.InnerException != null ? Environment.NewLine + e.Exception.InnerException.Message : "")
(e.Exception.InnerException != null
? Environment.NewLine + e.Exception.InnerException.Message
: "")
: e.ValidationEventArgs.Message,
e.ValidationEventArgs == null ? 0 : e.ValidationEventArgs.Exception.LineNumber)));
});
await validator.ValidateXML(XmlDocumentType.DeclarationComponentData | XmlDocumentType.DeclarationJobData | XmlDocumentType.CustomerReport | XmlDocumentType.ManufacturerReport);
e.ValidationEventArgs == null ? 0 : e.ValidationEventArgs.Exception.LineNumber));
}
}
);
}
);
valid = await validator.ValidateXML(_expectedDocumentType);
} catch (Exception e) {
LogError(e.Message);
}
......
......@@ -39,6 +39,7 @@ using System.Windows.Input;
using HashingTool.Helper;
using HashingTool.ViewModel.UserControl;
using TUGraz.VectoCommon.Hashing;
using TUGraz.VectoCore.Utils;
using TUGraz.VectoHashing;
namespace HashingTool.ViewModel
......@@ -49,7 +50,7 @@ namespace HashingTool.ViewModel
//private bool _componentDataValid;
public VerifyComponentInputDataViewModel()
: base("Verify Component Data", HashingHelper.IsComponentFile, HashingHelper.ValidateDocumentHash)
: base("Verify Component Data", HashingHelper.IsComponentFile, XmlDocumentType.DeclarationComponentData, HashingHelper.ValidateDocumentHash)
{
_xmlFile.PropertyChanged += ComponentFilechanged;
}
......
......@@ -30,5 +30,5 @@
*/
using System.Reflection;
[assembly: AssemblyVersion("3.3.3.1609")]
[assembly: AssemblyFileVersion("3.3.3.1609")]
\ No newline at end of file
[assembly: AssemblyVersion("3.3.3.1639")]
[assembly: AssemblyFileVersion("3.3.3.1639")]
\ No newline at end of file
......@@ -30,5 +30,5 @@
*/
using System.Reflection;
[assembly: AssemblyVersion("1.2.0.1609")]
[assembly: AssemblyFileVersion("1.2.0.1609")]
[assembly: AssemblyVersion("1.2.0.1639")]
[assembly: AssemblyFileVersion("1.2.0.1639")]
<?xml version="1.0" encoding="utf-8"?>
<tns:VectoInputDeclaration xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v0.8"
xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v0.8"
xmlns:di="http://www.w3.org/2000/09/xmldsig#" schemaVersion="0.6"
<tns:VectoInputDeclaration xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0"
xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v1.0"
xmlns:di="http://www.w3.org/2000/09/xmldsig#" schemaVersion="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v0.8 ../XSD/VectoComponent.xsd">
xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v1.0 https://webgate.ec.europa.eu/CITnet/svn/VECTO/trunk/Share/XML/XSD/VectoComponent.xsd">
<tns:Engine>
<Data id="ENG-c481b13b8dba4d3682c4">
<Manufacturer>Generic Engine Manufacturer</Manufacturer>
<Model>Generic 40t Long Haul Truck Engine</Model>
<TechnicalReportId>ENG-gooZah3D</TechnicalReportId>
<CertificationNumber>ENG-gooZah3D</CertificationNumber>
<Date>2017-02-15T11:00:00Z</Date>
<AppVersion>VectoEngine x.y</AppVersion>
<Displacement>12730</Displacement>
......@@ -158,7 +158,7 @@
<di:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
</di:Transforms>
<di:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
<di:DigestValue>BWAxs/2pGjQJdvn2GJE7X2lbNOBYSN3Xrrb+a+BfVUg=</di:DigestValue>
<di:DigestValue>bYGqZ5tcExIOHyNkH7HElRegtVqLcqBNzbTEWAKttsc=</di:DigestValue>
</di:Reference>
</Signature>
</tns:Engine>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment