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

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

added boostling limits attribute mapping,

parent ae7d82cd
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
using TUGraz.IVT.VectoXML;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Resources;
......@@ -81,10 +82,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider.v24
public override TableData BoostingLimitations
=> ElementExists(XMLNames.Vehicle_BoostingLimitation)
? ReadTableData(XMLNames.Vehicle_BoostingLimitation, XMLNames.BoostingLimitation_Entry,
new Dictionary<string, string> {
{XMLNames.BoostingLimitation_RotationalSpeed, XMLNames.BoostingLimitation_RotationalSpeed},
{XMLNames.BoostingLimitation_BoostingTorque, XMLNames.BoostingLimitation_BoostingTorque}
})
AttributeMappings.BoostingLimitsMapping)
: null;
#endregion
......
......@@ -163,6 +163,11 @@ namespace TUGraz.IVT.VectoXML
{ ElectricMotorMapReader.Fields.PowerElectrical, XMLNames.PowerMap_ElectricPower }
};
public static readonly Dictionary<string, string> BoostingLimitsMapping = new Dictionary<string, string> {
{MaxBoostingTorqueReader.Fields.MotorSpeed, XMLNames.BoostingLimitation_RotationalSpeed},
{MaxBoostingTorqueReader.Fields.DrivingTorque, XMLNames.BoostingLimitation_BoostingTorque}
};
//ElectricMotorMapReader
}
}
\ No newline at end of file
......@@ -7,6 +7,7 @@ using System.Threading.Tasks;
using System.Xml.Linq;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Resources;
using TUGraz.VectoCore.InputData.Reader.ComponentData;
namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.ManufacturerReport_0_9.ManufacturerReportXMLTypeWriter.Components
{
......@@ -31,8 +32,8 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.
foreach (DataRow row in boostingLimitations.Rows)
{
boostingLimitationsXElement.Add(new XElement(_mrf + XMLNames.BoostingLimitation_Entry,
new XAttribute(XMLNames.BoostingLimitation_BoostingTorque, row[XMLNames.BoostingLimitation_BoostingTorque]),
new XAttribute(XMLNames.BoostingLimitation_RotationalSpeed, row[XMLNames.BoostingLimitation_RotationalSpeed])));
new XAttribute(XMLNames.BoostingLimitation_BoostingTorque, row[MaxBoostingTorqueReader.Fields.DrivingTorque]),
new XAttribute(XMLNames.BoostingLimitation_RotationalSpeed, row[MaxBoostingTorqueReader.Fields.MotorSpeed])));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment