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

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

refactoring of input data provider structure: components are accesible via vehicle, not job

parent 600dad81
No related branches found
No related tags found
No related merge requests found
...@@ -261,11 +261,6 @@ namespace TUGraz.VectoCommon.InputData ...@@ -261,11 +261,6 @@ namespace TUGraz.VectoCommon.InputData
/// </summary> /// </summary>
double Efficiency { get; } double Efficiency { get; }
///// <summary>
///// P145
///// cf. VECTO Input Parameters.xlsx
///// </summary>
//DataTable FullLoadCurve { get; } // deprecated
/// <summary> /// <summary>
/// P157 /// P157
...@@ -280,12 +275,6 @@ namespace TUGraz.VectoCommon.InputData ...@@ -280,12 +275,6 @@ namespace TUGraz.VectoCommon.InputData
/// cf. VECTO Input Parameters.xlsx /// cf. VECTO Input Parameters.xlsx
/// </summary> /// </summary>
TableData ShiftPolygon { get; } TableData ShiftPolygon { get; }
///// <summary>
///// P077
///// cf. VECTO Input Parameters.xlsx
///// </summary>
//bool HasTorqueConverter { get; } // DEPRECATED
} }
public interface IAxleGearInputData : IComponentInputData public interface IAxleGearInputData : IComponentInputData
...@@ -409,8 +398,6 @@ namespace TUGraz.VectoCommon.InputData ...@@ -409,8 +398,6 @@ namespace TUGraz.VectoCommon.InputData
public interface IDriverDeclarationInputData public interface IDriverDeclarationInputData
{ {
bool SavedInDeclarationMode { get; } bool SavedInDeclarationMode { get; }
//IOverSpeedEcoRollDeclarationInputData OverSpeedEcoRoll { get; }
} }
public interface IOverSpeedEcoRollDeclarationInputData public interface IOverSpeedEcoRollDeclarationInputData
......
...@@ -40,28 +40,6 @@ namespace TUGraz.VectoCommon.InputData ...@@ -40,28 +40,6 @@ namespace TUGraz.VectoCommon.InputData
{ {
IDeclarationJobInputData JobInputData { get; } IDeclarationJobInputData JobInputData { get; }
//IVehicleDeclarationInputData VehicleInputData { get; }
//IAirdragDeclarationInputData AirdragInputData { get; }
//IGearboxDeclarationInputData GearboxInputData { get; }
//ITorqueConverterDeclarationInputData TorqueConverterInputData { get; }
//IAxleGearInputData AxleGearInputData { get; }
//IAngledriveInputData AngledriveInputData { get; }
//IEngineDeclarationInputData EngineInputData { get; }
//IAuxiliariesDeclarationInputData AuxiliaryInputData();
//IRetarderInputData RetarderInputData { get; }
//IDriverDeclarationInputData DriverInputData { get; }
//IPTOTransmissionInputData PTOTransmissionInputData { get; }
XElement XMLHash { get; } XElement XMLHash { get; }
} }
...@@ -69,27 +47,7 @@ namespace TUGraz.VectoCommon.InputData ...@@ -69,27 +47,7 @@ namespace TUGraz.VectoCommon.InputData
{ {
IEngineeringJobInputData JobInputData { get; } IEngineeringJobInputData JobInputData { get; }
//IVehicleEngineeringInputData VehicleInputData { get; }
//IAirdragEngineeringInputData AirdragInputData { get; }
//IGearboxEngineeringInputData GearboxInputData { get; }
//ITorqueConverterEngineeringInputData TorqueConverterInputData { get; }
//IAxleGearInputData AxleGearInputData { get; }
//IAngledriveInputData AngledriveInputData { get; }
//IEngineEngineeringInputData EngineInputData { get; }
//IAuxiliariesEngineeringInputData AuxiliaryInputData();
//IRetarderInputData RetarderInputData { get; }
IDriverEngineeringInputData DriverInputData { get; } IDriverEngineeringInputData DriverInputData { get; }
//IPTOTransmissionInputData PTOTransmissionInputData { get; }
} }
public interface IEPTPInputDataProvider : IInputDataProvider public interface IEPTPInputDataProvider : IInputDataProvider
......
...@@ -85,106 +85,20 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON ...@@ -85,106 +85,20 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
get { throw new NotImplementedException(); } get { throw new NotImplementedException(); }
} }
public XElement XMLHash { get { return new XElement(XMLNames.DI_Signature); } } public XElement XMLHash
{
get { return new XElement(XMLNames.DI_Signature); }
//IVehicleDeclarationInputData IDeclarationJobInputData.Vehicle }
//{
// get { return VehicleData; }
//}
//IAirdragDeclarationInputData IDeclarationInputDataProvider.AirdragInputData
//{
// get { return AirdragInputData; }
//}
//public IAirdragEngineeringInputData AirdragInputData
//{
// get { return AirdragData; }
//}
//IGearboxDeclarationInputData IDeclarationInputDataProvider.GearboxInputData
//{
// get { return GearboxInputData; }
//}
//ITorqueConverterDeclarationInputData IDeclarationInputDataProvider.TorqueConverterInputData
//{
// get { return TorqueConverterInputData; }
//}
IDeclarationJobInputData IDeclarationInputDataProvider.JobInputData IDeclarationJobInputData IDeclarationInputDataProvider.JobInputData
{ {
get { get { throw new NotImplementedException(); }
throw new NotImplementedException();
}
} }
//public IVehicleEngineeringInputData VehicleInputData
//{
// get { return VehicleData; }
//}
//public IGearboxEngineeringInputData GearboxInputData
//{
// get { return Gearbox; }
//}
//public ITorqueConverterEngineeringInputData TorqueConverterInputData
//{
// get { return TorqueConverter; }
//}
//public IAxleGearInputData AxleGearInputData
//{
// get { return AxleGear; }
//}
//public IAngledriveInputData AngledriveInputData
//{
// get { return Angledrive; }
//}
//IEngineDeclarationInputData IDeclarationInputDataProvider.EngineInputData
//{
// get { return EngineInputData; }
//}
//public IEngineEngineeringInputData EngineInputData
//{
// get { return Engine; }
//}
//public IAuxiliariesEngineeringInputData AuxiliaryInputData()
//{
// throw new NotImplementedException();
//}
//IAuxiliariesDeclarationInputData IDeclarationInputDataProvider.AuxiliaryInputData()
//{
// throw new NotImplementedException();
//}
//public IRetarderInputData RetarderInputData
//{
// get { return Retarder; }
//}
//IDriverDeclarationInputData IDeclarationInputDataProvider.DriverInputData
//{
// get { throw new NotImplementedException(); }
//}
public IDriverEngineeringInputData DriverInputData public IDriverEngineeringInputData DriverInputData
{ {
get { throw new NotImplementedException(); } get { throw new NotImplementedException(); }
} }
//public IPTOTransmissionInputData PTOTransmissionInputData
//{
// get { return PTOTransmission; }
//}
} }
} }
...@@ -129,11 +129,8 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON ...@@ -129,11 +129,8 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
public IGearboxEngineeringInputData Gearbox { get; internal set; } public IGearboxEngineeringInputData Gearbox { get; internal set; }
public IAxleGearInputData AxleGear { get; internal set; } public IAxleGearInputData AxleGear { get; internal set; }
public ITorqueConverterEngineeringInputData TorqueConverter { get; internal set; } public ITorqueConverterEngineeringInputData TorqueConverter { get; internal set; }
//public IAngledriveInputData Angledrive { get; internal set; }
public IEngineEngineeringInputData Engine { get; internal set; } public IEngineEngineeringInputData Engine { get; internal set; }
//public IRetarderInputData Retarder { get; internal set; }
//public IPTOTransmissionInputData PTOTransmission { get; internal set; }
//public IAirdragEngineeringInputData AirdragData { get; internal set; }
protected readonly IVehicleEngineeringInputData VehicleData; protected readonly IVehicleEngineeringInputData VehicleData;
...@@ -156,10 +153,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON ...@@ -156,10 +153,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
TorqueConverter = Gearbox as ITorqueConverterEngineeringInputData; TorqueConverter = Gearbox as ITorqueConverterEngineeringInputData;
VehicleData = ReadVehicle(); VehicleData = ReadVehicle();
//Angledrive = VehicleData as IAngledriveInputData;
//Retarder = VehicleData as IRetarderInputData;
//PTOTransmission = VehicleData as IPTOTransmissionInputData;
//AirdragData = VehicleData as IAirdragEngineeringInputData;
} }
private IVehicleEngineeringInputData ReadVehicle() private IVehicleEngineeringInputData ReadVehicle()
...@@ -204,7 +197,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON ...@@ -204,7 +197,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
throw new VectoException("JobFile: Failed to read Engine file '{0}': {1}", e, Body[JsonKeys.Vehicle_EngineFile], throw new VectoException("JobFile: Failed to read Engine file '{0}': {1}", e, Body[JsonKeys.Vehicle_EngineFile],
e.Message); e.Message);
} }
//JToken.FromObject(New Dictionary(Of String, Object) From {{"Header", header}, {"Body", body}})
return return
new JSONEngineDataV3(GetDummyJSONStructure(), new JSONEngineDataV3(GetDummyJSONStructure(),
Path.Combine(BasePath, Body.GetEx(JsonKeys.Vehicle_EngineFile).Value<string>()) + MissingFileSuffix); Path.Combine(BasePath, Body.GetEx(JsonKeys.Vehicle_EngineFile).Value<string>()) + MissingFileSuffix);
...@@ -218,37 +211,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON ...@@ -218,37 +211,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
get { return VehicleInputData; } get { return VehicleInputData; }
} }
//IAirdragDeclarationInputData IDeclarationInputDataProvider.AirdragInputData
//{
// get { return AirdragInputData; }
//}
//public IAirdragEngineeringInputData AirdragInputData
//{
// get { return AirdragData; }
//}
//IGearboxDeclarationInputData IDeclarationInputDataProvider.GearboxInputData
//{
// get { return GearboxInputData; }
//}
//ITorqueConverterDeclarationInputData IDeclarationInputDataProvider.TorqueConverterInputData
//{
// get { return TorqueConverterInputData; }
//}
//public ITorqueConverterEngineeringInputData TorqueConverterInputData
//{
// get
// {
// if (TorqueConverter == null) {
// throw new InvalidFileFormatException("TorqueConverterData not found");
// }
// return TorqueConverter;
// }
//}
public virtual IEngineeringJobInputData JobInputData public virtual IEngineeringJobInputData JobInputData
{ {
get { return this; } get { return this; }
...@@ -276,42 +238,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON ...@@ -276,42 +238,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
} }
} }
//public virtual IGearboxEngineeringInputData GearboxInputData
//{
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design",
// "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")]
// get
// {
// if (Gearbox == null) {
// throw new InvalidFileFormatException("GearboxData not found");
// }
// return Gearbox;
// }
//}
//public virtual IAxleGearInputData AxleGearInputData
//{
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design",
// "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")]
// get
// {
// if (AxleGear == null) {
// throw new InvalidFileFormatException("AxleGearData not found");
// }
// return AxleGear;
// }
//}
//public IAngledriveInputData AngledriveInputData
//{
// get { return Angledrive; }
//}
//IEngineDeclarationInputData IDeclarationInputDataProvider.EngineInputData
//{
// get { return EngineInputData; }
//}
public virtual IEngineEngineeringInputData EngineOnly public virtual IEngineEngineeringInputData EngineOnly
{ {
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design",
...@@ -324,49 +250,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON ...@@ -324,49 +250,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
} }
} }
//public virtual IAuxiliariesEngineeringInputData AuxiliaryInputData()
//{
// return this;
//}
IDriverEngineeringInputData IEngineeringInputDataProvider.DriverInputData IDriverEngineeringInputData IEngineeringInputDataProvider.DriverInputData
{ {
get { return this; } get { return this; }
} }
//public IPTOTransmissionInputData PTOTransmissionInputData
//{
// get { return PTOTransmission; }
//}
//public XElement XMLHash
//{
// get { return null; }
//}
//IAuxiliariesDeclarationInputData IDeclarationInputDataProvider.AuxiliaryInputData()
//{
// return this;
//}
//public virtual IRetarderInputData RetarderInputData
//{
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design",
// "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")]
// get
// {
// if (Retarder == null) {
// throw new InvalidFileFormatException("RetarderData not found");
// }
// return Retarder;
// }
//}
//public virtual IDriverDeclarationInputData DriverInputData
//{
// get { return this; }
//}
#endregion #endregion
#region IJobInputData #region IJobInputData
...@@ -418,11 +306,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON ...@@ -418,11 +306,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
get { return Body.GetEx(JsonKeys.Job_EngineOnlyMode).Value<bool>(); } get { return Body.GetEx(JsonKeys.Job_EngineOnlyMode).Value<bool>(); }
} }
//IVehicleDeclarationInputData IDeclarationJobInputData.Vehicle
//{
// get { return Vehicle; }
//}
public virtual string JobName public virtual string JobName
{ {
get { return _jobname; } get { return _jobname; }
...@@ -432,17 +315,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON ...@@ -432,17 +315,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
#region DriverInputData #region DriverInputData
//IOverSpeedEcoRollDeclarationInputData IDriverDeclarationInputData.OverSpeedEcoRoll
//{
// get
// {
// var overspeed = Body.GetEx(JsonKeys.DriverData_OverspeedEcoRoll);
// return new OverSpeedEcoRollInputData() {
// Mode = DriverData.ParseDriverMode(overspeed.GetEx<string>(JsonKeys.DriverData_OverspeedEcoRoll_Mode))
// };
// }
//}
public virtual ILookaheadCoastingInputData Lookahead public virtual ILookaheadCoastingInputData Lookahead
{ {
get { get {
......
...@@ -45,10 +45,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration ...@@ -45,10 +45,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration
{ {
internal readonly XPathDocument Document; internal readonly XPathDocument Document;
//private readonly IAuxiliariesDeclarationInputData XMLAuxiliaryData;
//private readonly IDriverDeclarationInputData XMLDriverData;
private readonly XMLDeclarationJobInputDataProvider _xmlJobData; private readonly XMLDeclarationJobInputDataProvider _xmlJobData;
//protected internal readonly XMLDeclarationVehicleDataProvider _vehicleInputData;
public XMLDeclarationInputDataProvider(XmlReader inputData, bool verifyXml) public XMLDeclarationInputDataProvider(XmlReader inputData, bool verifyXml)
{ {
...@@ -76,17 +73,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration ...@@ -76,17 +73,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration
//CheckInputDocument(); //CheckInputDocument();
_xmlJobData = new XMLDeclarationJobInputDataProvider(this); _xmlJobData = new XMLDeclarationJobInputDataProvider(this);
//_vehicleInputData = new XMLDeclarationVehicleDataProvider(this);
//AirdragInputData = new XMLDeclarationAirdragDataProvider(this);
//AxleGearInputData = new XMLDeclarationAxlegearDataProvider(this);
//AngledriveInputData = new XMLDeclarationAngledriveDataProvider(this);
//EngineInputData = new XMLDeclarationEngineDataProvider(this);
//GearboxInputData = new XMLDeclarationGearboxDataProvider(this);
//TorqueConverterInputData = new XMLDeclarationTorqueConverterDataProvider(this);
//RetarderInputData = new XMLDeclarationRetarderDataProvider(this);
//XMLDriverData = new XMLDeclarationDriverDataProvider(this);
//XMLAuxiliaryData = new XMLDeclarationAuxiliaryDataProvider(this);
//PTOTransmissionInputData = _vehicleInputData.GetPTOData();
} }
private static void ValidationCallBack(object sender, ValidationEventArgs args) private static void ValidationCallBack(object sender, ValidationEventArgs args)
...@@ -117,37 +103,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration ...@@ -117,37 +103,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration
get { return _xmlJobData; } get { return _xmlJobData; }
} }
//public IVehicleDeclarationInputData VehicleInputData
//{
// get { return _vehicleInputData; }
//}
//public IAirdragDeclarationInputData AirdragInputData { get; private set; }
//public IGearboxDeclarationInputData GearboxInputData { get; private set; }
//public ITorqueConverterDeclarationInputData TorqueConverterInputData { get; private set; }
//public IAxleGearInputData AxleGearInputData { get; private set; }
//public IAngledriveInputData AngledriveInputData { get; private set; }
//public IEngineDeclarationInputData EngineInputData { get; private set; }
//public IAuxiliariesDeclarationInputData AuxiliaryInputData()
//{
// return XMLAuxiliaryData;
//}
//public IRetarderInputData RetarderInputData { get; private set; }
//public IDriverDeclarationInputData DriverInputData
//{
// get { return XMLDriverData; }
//}
//public IPTOTransmissionInputData PTOTransmissionInputData { get; private set; }
public XElement XMLHash { get; private set; } public XElement XMLHash { get; private set; }
} }
} }
...@@ -55,9 +55,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering ...@@ -55,9 +55,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering
public XmlReaderSettings Settings { get; private set; } public XmlReaderSettings Settings { get; private set; }
//protected internal XMLEngineeringAuxiliaryDataProvider XMLEngineeringAuxiliaryData;
//protected internal XMLEngineeringAxlegearDataProvider AxlegearData;
public XMLEngineeringInputDataProvider(string filename, bool verifyXml) public XMLEngineeringInputDataProvider(string filename, bool verifyXml)
{ {
FileName = filename; FileName = filename;
...@@ -136,15 +133,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering ...@@ -136,15 +133,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering
ReadVehicle(Settings); ReadVehicle(Settings);
XMLEngineeringDriverData = XMLEngineeringJobData.GetDriverData(); XMLEngineeringDriverData = XMLEngineeringJobData.GetDriverData();
//AxlegearData = VehicleData.GetAxleGearInputData(settings);
//AngledriveInputData = VehicleData.GetAngularGearInputData();
//EngineInputData = VehicleData.GetEngineInputData(settings);
//RetarderInputData = VehicleData.GetRetarderInputData(settings);
//XMLEngineeringAuxiliaryData = VehicleData.GetAuxiliaryData(settings);
//GearboxInputData = VehicleData.GetGearboxData(settings);
//TorqueConverterInputData = GearboxInputData.TorqueConverter;
//PTOTransmissionInputData = VehicleData.GetPTOData();
//AirdragInputData = VehicleData.GetAirdragInputData(settings);
} }
private static void ValidationCallBack(object sender, ValidationEventArgs args) private static void ValidationCallBack(object sender, ValidationEventArgs args)
...@@ -216,34 +204,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering ...@@ -216,34 +204,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering
get { return VehicleData; } get { return VehicleData; }
} }
//public IAirdragEngineeringInputData AirdragInputData { get; private set; }
//public IGearboxEngineeringInputData GearboxInputData { get; private set; }
//public ITorqueConverterEngineeringInputData TorqueConverterInputData { get; private set; }
//public IAxleGearInputData AxleGearInputData
//{
// get { return AxlegearData; }
//}
//public IAngledriveInputData AngledriveInputData { get; private set; }
public IEngineEngineeringInputData EngineOnlyInputData { get; private set; } public IEngineEngineeringInputData EngineOnlyInputData { get; private set; }
//public IAuxiliariesEngineeringInputData AuxiliaryInputData()
//{
// return XMLEngineeringAuxiliaryData;
//}
//public IRetarderInputData RetarderInputData { get; private set; }
public IDriverEngineeringInputData DriverInputData public IDriverEngineeringInputData DriverInputData
{ {
get { return XMLEngineeringDriverData; } get { return XMLEngineeringDriverData; }
} }
//public IPTOTransmissionInputData PTOTransmissionInputData { get; private set; }
} }
} }
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