From 9d7eca392b28261d51213237c6f4ea40e43a5543 Mon Sep 17 00:00:00 2001
From: Markus Quaritsch <markus.quaritsch@tugraz.at>
Date: Tue, 28 Jul 2015 09:11:45 +0200
Subject: [PATCH] renaming 'cockpit' interfaces to 'info', adjusting namespace
 introduce lookahead interface

---
 .../Models/Simulation/Cockpit/ICockpit.cs     |  7 ----
 .../Simulation/Cockpit/IGearboxCockpit.cs     | 14 --------
 .../Models/Simulation/DataBus/IDataBus.cs     |  7 ++++
 .../IEngineInfo.cs}                           |  4 +--
 .../Models/Simulation/DataBus/IGearboxInfo.cs | 14 ++++++++
 .../{Cockpit => DataBus}/IMileageCounter.cs   |  2 +-
 .../Simulation/DataBus/IRoadLookAhead.cs      | 13 ++++++++
 .../IVehicleInfo.cs}                          |  4 +--
 .../Models/Simulation/IVehicleContainer.cs    |  4 +--
 .../Simulation/Impl/VehicleContainer.cs       | 32 +++++++++++++++----
 .../SimulationComponent/ICombustionEngine.cs  |  4 +--
 .../Models/SimulationComponent/IGearbox.cs    |  4 +--
 .../Models/SimulationComponent/IVehicle.cs    |  4 +--
 .../Models/SimulationComponent/Impl/Clutch.cs |  2 +-
 .../Impl/CombustionEngine.cs                  | 14 +++++---
 .../Impl/DistanceBasedDrivingCycle.cs         | 13 ++++++--
 .../Models/SimulationComponent/Impl/Driver.cs |  4 +--
 .../Impl/EngineOnlyGearbox.cs                 |  4 +--
 .../SimulationComponent/Impl/Gearbox.cs       |  4 +--
 .../SimulationComponent/Impl/Vehicle.cs       |  2 +-
 .../VectoSimulationComponent.cs               | 12 +++----
 VectoCore/VectoCore.csproj                    | 11 ++++---
 22 files changed, 111 insertions(+), 68 deletions(-)
 delete mode 100644 VectoCore/Models/Simulation/Cockpit/ICockpit.cs
 delete mode 100644 VectoCore/Models/Simulation/Cockpit/IGearboxCockpit.cs
 create mode 100644 VectoCore/Models/Simulation/DataBus/IDataBus.cs
 rename VectoCore/Models/Simulation/{Cockpit/IEngineCockpit.cs => DataBus/IEngineInfo.cs} (73%)
 create mode 100644 VectoCore/Models/Simulation/DataBus/IGearboxInfo.cs
 rename VectoCore/Models/Simulation/{Cockpit => DataBus}/IMileageCounter.cs (64%)
 create mode 100644 VectoCore/Models/Simulation/DataBus/IRoadLookAhead.cs
 rename VectoCore/Models/Simulation/{Cockpit/IVehicleCockpit.cs => DataBus/IVehicleInfo.cs} (80%)

diff --git a/VectoCore/Models/Simulation/Cockpit/ICockpit.cs b/VectoCore/Models/Simulation/Cockpit/ICockpit.cs
deleted file mode 100644
index c243066733..0000000000
--- a/VectoCore/Models/Simulation/Cockpit/ICockpit.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace TUGraz.VectoCore.Models.Simulation.Cockpit
-{
-	/// <summary>
-	/// Defines interfaces for all different cockpits to access shared data of the powertrain.
-	/// </summary>
-	public interface ICockpit : IGearboxCockpit, IEngineCockpit, IVehicleCockpit, IMileageCounter {}
-}
\ No newline at end of file
diff --git a/VectoCore/Models/Simulation/Cockpit/IGearboxCockpit.cs b/VectoCore/Models/Simulation/Cockpit/IGearboxCockpit.cs
deleted file mode 100644
index 41fa13a72d..0000000000
--- a/VectoCore/Models/Simulation/Cockpit/IGearboxCockpit.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-namespace TUGraz.VectoCore.Models.Simulation.Cockpit
-{
-    /// <summary>
-    /// Defines a method to access shared data of the gearbox.
-    /// </summary>
-    public interface IGearboxCockpit
-    {
-        /// <summary>
-        /// Returns the current gear.
-        /// </summary>
-        /// <returns></returns>
-        uint Gear();
-    }
-}
\ No newline at end of file
diff --git a/VectoCore/Models/Simulation/DataBus/IDataBus.cs b/VectoCore/Models/Simulation/DataBus/IDataBus.cs
new file mode 100644
index 0000000000..f3c7bedf57
--- /dev/null
+++ b/VectoCore/Models/Simulation/DataBus/IDataBus.cs
@@ -0,0 +1,7 @@
+namespace TUGraz.VectoCore.Models.Simulation.DataBus
+{
+	/// <summary>
+	/// Defines interfaces for all different cockpits to access shared data of the powertrain.
+	/// </summary>
+	public interface IDataBus : IGearboxInfo, IEngineInfo, IVehicleInfo, IMileageCounter, IRoadLookAhead {}
+}
\ No newline at end of file
diff --git a/VectoCore/Models/Simulation/Cockpit/IEngineCockpit.cs b/VectoCore/Models/Simulation/DataBus/IEngineInfo.cs
similarity index 73%
rename from VectoCore/Models/Simulation/Cockpit/IEngineCockpit.cs
rename to VectoCore/Models/Simulation/DataBus/IEngineInfo.cs
index cbe86bb426..1bc16c29f9 100644
--- a/VectoCore/Models/Simulation/Cockpit/IEngineCockpit.cs
+++ b/VectoCore/Models/Simulation/DataBus/IEngineInfo.cs
@@ -1,11 +1,11 @@
 using TUGraz.VectoCore.Utils;
 
-namespace TUGraz.VectoCore.Models.Simulation.Cockpit
+namespace TUGraz.VectoCore.Models.Simulation.DataBus
 {
 	/// <summary>
 	/// Defines a method to access shared data of the engine.
 	/// </summary>
-	public interface IEngineCockpit
+	public interface IEngineInfo
 	{
 		/// <summary>
 		/// [rad/s] The current engine speed.
diff --git a/VectoCore/Models/Simulation/DataBus/IGearboxInfo.cs b/VectoCore/Models/Simulation/DataBus/IGearboxInfo.cs
new file mode 100644
index 0000000000..b559a1c04a
--- /dev/null
+++ b/VectoCore/Models/Simulation/DataBus/IGearboxInfo.cs
@@ -0,0 +1,14 @@
+namespace TUGraz.VectoCore.Models.Simulation.DataBus
+{
+	/// <summary>
+	/// Defines a method to access shared data of the gearbox.
+	/// </summary>
+	public interface IGearboxInfo
+	{
+		/// <summary>
+		/// Returns the current gear.
+		/// </summary>
+		/// <returns></returns>
+		uint Gear();
+	}
+}
\ No newline at end of file
diff --git a/VectoCore/Models/Simulation/Cockpit/IMileageCounter.cs b/VectoCore/Models/Simulation/DataBus/IMileageCounter.cs
similarity index 64%
rename from VectoCore/Models/Simulation/Cockpit/IMileageCounter.cs
rename to VectoCore/Models/Simulation/DataBus/IMileageCounter.cs
index de66b1d0c7..eedf4826fe 100644
--- a/VectoCore/Models/Simulation/Cockpit/IMileageCounter.cs
+++ b/VectoCore/Models/Simulation/DataBus/IMileageCounter.cs
@@ -1,6 +1,6 @@
 using TUGraz.VectoCore.Utils;
 
-namespace TUGraz.VectoCore.Models.Simulation.Cockpit
+namespace TUGraz.VectoCore.Models.Simulation.DataBus
 {
 	public interface IMileageCounter
 	{
diff --git a/VectoCore/Models/Simulation/DataBus/IRoadLookAhead.cs b/VectoCore/Models/Simulation/DataBus/IRoadLookAhead.cs
new file mode 100644
index 0000000000..6f5b189670
--- /dev/null
+++ b/VectoCore/Models/Simulation/DataBus/IRoadLookAhead.cs
@@ -0,0 +1,13 @@
+using System.Collections.Generic;
+using TUGraz.VectoCore.Models.SimulationComponent.Data;
+using TUGraz.VectoCore.Utils;
+
+namespace TUGraz.VectoCore.Models.Simulation.DataBus
+{
+	public interface IRoadLookAhead
+	{
+		IReadOnlyList<DrivingCycleData.DrivingCycleEntry> LookAhead(Meter distance);
+
+		IReadOnlyList<DrivingCycleData.DrivingCycleEntry> LookAhead(Second time);
+	}
+}
\ No newline at end of file
diff --git a/VectoCore/Models/Simulation/Cockpit/IVehicleCockpit.cs b/VectoCore/Models/Simulation/DataBus/IVehicleInfo.cs
similarity index 80%
rename from VectoCore/Models/Simulation/Cockpit/IVehicleCockpit.cs
rename to VectoCore/Models/Simulation/DataBus/IVehicleInfo.cs
index d0774b4c7a..73e0b9fac0 100644
--- a/VectoCore/Models/Simulation/Cockpit/IVehicleCockpit.cs
+++ b/VectoCore/Models/Simulation/DataBus/IVehicleInfo.cs
@@ -1,11 +1,11 @@
 using TUGraz.VectoCore.Utils;
 
-namespace TUGraz.VectoCore.Models.Simulation.Cockpit
+namespace TUGraz.VectoCore.Models.Simulation.DataBus
 {
 	/// <summary>
 	/// Defines a method to access shared data of the vehicle.
 	/// </summary>
-	public interface IVehicleCockpit
+	public interface IVehicleInfo
 	{
 		/// <summary>
 		/// Returns the current vehicle speed.
diff --git a/VectoCore/Models/Simulation/IVehicleContainer.cs b/VectoCore/Models/Simulation/IVehicleContainer.cs
index e7d4517f39..ae3d7cf8f9 100644
--- a/VectoCore/Models/Simulation/IVehicleContainer.cs
+++ b/VectoCore/Models/Simulation/IVehicleContainer.cs
@@ -1,5 +1,5 @@
 using TUGraz.VectoCore.Models.Connector.Ports;
-using TUGraz.VectoCore.Models.Simulation.Cockpit;
+using TUGraz.VectoCore.Models.Simulation.DataBus;
 using TUGraz.VectoCore.Models.SimulationComponent;
 using TUGraz.VectoCore.Utils;
 
@@ -9,7 +9,7 @@ namespace TUGraz.VectoCore.Models.Simulation
 	/// Defines Methods for adding components, commiting a simulation step and finishing the simulation.
 	/// Also defines interfaces for all cockpit access to data.
 	/// </summary>
-	public interface IVehicleContainer : ICockpit
+	public interface IVehicleContainer : IDataBus
 	{
 		ISimulationOutPort GetCycleOutPort();
 
diff --git a/VectoCore/Models/Simulation/Impl/VehicleContainer.cs b/VectoCore/Models/Simulation/Impl/VehicleContainer.cs
index 940f38f36e..a876e1b194 100644
--- a/VectoCore/Models/Simulation/Impl/VehicleContainer.cs
+++ b/VectoCore/Models/Simulation/Impl/VehicleContainer.cs
@@ -4,9 +4,10 @@ using System.Globalization;
 using Common.Logging;
 using TUGraz.VectoCore.Exceptions;
 using TUGraz.VectoCore.Models.Connector.Ports;
-using TUGraz.VectoCore.Models.Simulation.Cockpit;
 using TUGraz.VectoCore.Models.Simulation.Data;
+using TUGraz.VectoCore.Models.Simulation.DataBus;
 using TUGraz.VectoCore.Models.SimulationComponent;
+using TUGraz.VectoCore.Models.SimulationComponent.Data;
 using TUGraz.VectoCore.Utils;
 
 namespace TUGraz.VectoCore.Models.Simulation.Impl
@@ -14,12 +15,14 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
 	public class VehicleContainer : IVehicleContainer
 	{
 		internal readonly IList<VectoSimulationComponent> _components = new List<VectoSimulationComponent>();
-		internal IEngineCockpit _engine;
-		internal IGearboxCockpit _gearbox;
-		internal IVehicleCockpit _vehicle;
+		internal IEngineInfo _engine;
+		internal IGearboxInfo _gearbox;
+		internal IVehicleInfo _vehicle;
 
 		internal IMileageCounter _milageCounter;
 
+		internal IRoadLookAhead _road;
+
 		internal ISimulationOutPort _cycle;
 
 		internal ISummaryDataWriter _sumWriter;
@@ -93,17 +96,17 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
 		{
 			_components.Add(component);
 
-			var engine = component as IEngineCockpit;
+			var engine = component as IEngineInfo;
 			if (engine != null) {
 				_engine = engine;
 			}
 
-			var gearbox = component as IGearboxCockpit;
+			var gearbox = component as IGearboxInfo;
 			if (gearbox != null) {
 				_gearbox = gearbox;
 			}
 
-			var vehicle = component as IVehicleCockpit;
+			var vehicle = component as IVehicleInfo;
 			if (vehicle != null) {
 				_vehicle = vehicle;
 			}
@@ -117,6 +120,11 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
 			if (milage != null) {
 				_milageCounter = milage;
 			}
+
+			var road = component as IRoadLookAhead;
+			if (road != null) {
+				_road = road;
+			}
 		}
 
 
@@ -153,5 +161,15 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
 		{
 			return _milageCounter.Distance();
 		}
+
+		public IReadOnlyList<DrivingCycleData.DrivingCycleEntry> LookAhead(Meter distance)
+		{
+			return _road.LookAhead(distance);
+		}
+
+		public IReadOnlyList<DrivingCycleData.DrivingCycleEntry> LookAhead(Second time)
+		{
+			return _road.LookAhead(time);
+		}
 	}
 }
\ No newline at end of file
diff --git a/VectoCore/Models/SimulationComponent/ICombustionEngine.cs b/VectoCore/Models/SimulationComponent/ICombustionEngine.cs
index 6ea31f7b46..6626e33d7e 100644
--- a/VectoCore/Models/SimulationComponent/ICombustionEngine.cs
+++ b/VectoCore/Models/SimulationComponent/ICombustionEngine.cs
@@ -1,10 +1,10 @@
 using TUGraz.VectoCore.Models.Connector.Ports;
-using TUGraz.VectoCore.Models.Simulation.Cockpit;
+using TUGraz.VectoCore.Models.Simulation.DataBus;
 
 namespace TUGraz.VectoCore.Models.SimulationComponent
 {
 	/// <summary>
 	/// Defines Interfaces for a combustion engine.
 	/// </summary>
-	public interface ICombustionEngine : ITnOutProvider, IEngineCockpit {}
+	public interface ICombustionEngine : ITnOutProvider, IEngineInfo {}
 }
\ No newline at end of file
diff --git a/VectoCore/Models/SimulationComponent/IGearbox.cs b/VectoCore/Models/SimulationComponent/IGearbox.cs
index ed0c15b536..fbff913921 100644
--- a/VectoCore/Models/SimulationComponent/IGearbox.cs
+++ b/VectoCore/Models/SimulationComponent/IGearbox.cs
@@ -1,10 +1,10 @@
 using TUGraz.VectoCore.Models.Connector.Ports;
-using TUGraz.VectoCore.Models.Simulation.Cockpit;
+using TUGraz.VectoCore.Models.Simulation.DataBus;
 
 namespace TUGraz.VectoCore.Models.SimulationComponent
 {
 	/// <summary>
 	/// Defines interfaces for a gearbox.
 	/// </summary>
-	public interface IGearbox : IPowerTrainComponent, IGearboxCockpit {}
+	public interface IGearbox : IPowerTrainComponent, IGearboxInfo {}
 }
\ No newline at end of file
diff --git a/VectoCore/Models/SimulationComponent/IVehicle.cs b/VectoCore/Models/SimulationComponent/IVehicle.cs
index f2949fac5a..78b343126e 100644
--- a/VectoCore/Models/SimulationComponent/IVehicle.cs
+++ b/VectoCore/Models/SimulationComponent/IVehicle.cs
@@ -1,7 +1,7 @@
 using TUGraz.VectoCore.Models.Connector.Ports;
-using TUGraz.VectoCore.Models.Simulation.Cockpit;
+using TUGraz.VectoCore.Models.Simulation.DataBus;
 
 namespace TUGraz.VectoCore.Models.SimulationComponent
 {
-	public interface IVehicle : IFvInProvider, IDriverDemandOutProvider, IVehicleCockpit {}
+	public interface IVehicle : IFvInProvider, IDriverDemandOutProvider, IVehicleInfo {}
 }
\ No newline at end of file
diff --git a/VectoCore/Models/SimulationComponent/Impl/Clutch.cs b/VectoCore/Models/SimulationComponent/Impl/Clutch.cs
index 8f3688502e..d1a32f684d 100644
--- a/VectoCore/Models/SimulationComponent/Impl/Clutch.cs
+++ b/VectoCore/Models/SimulationComponent/Impl/Clutch.cs
@@ -63,7 +63,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
 			var torqueIn = torque;
 			var engineSpeedIn = angularVelocity;
 
-			if (Cockpit.Gear() == 0) {
+			if (DataBus.Gear() == 0) {
 				_clutchState = ClutchState.ClutchOpened;
 				engineSpeedIn = _idleSpeed;
 				torqueIn = 0.SI<NewtonMeter>();
diff --git a/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs b/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs
index bb1b5bebd7..99dd87b82e 100644
--- a/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs
+++ b/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs
@@ -5,8 +5,8 @@ using TUGraz.VectoCore.Exceptions;
 using TUGraz.VectoCore.Models.Connector.Ports;
 using TUGraz.VectoCore.Models.Connector.Ports.Impl;
 using TUGraz.VectoCore.Models.Simulation;
-using TUGraz.VectoCore.Models.Simulation.Cockpit;
 using TUGraz.VectoCore.Models.Simulation.Data;
+using TUGraz.VectoCore.Models.Simulation.DataBus;
 using TUGraz.VectoCore.Models.SimulationComponent.Data;
 using TUGraz.VectoCore.Utils;
 
@@ -55,7 +55,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
 
 		#region IEngineCockpit
 
-		PerSecond IEngineCockpit.EngineSpeed()
+		PerSecond IEngineInfo.EngineSpeed()
 		{
 			return _previousState.EngineSpeed;
 		}
@@ -95,11 +95,15 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
 
 			ValidatePowerDemand(requestedEnginePower);
 
-			requestedEnginePower = LimitEnginePower(requestedEnginePower);
+			_currentState.EnginePower = LimitEnginePower(requestedEnginePower);
 
-			UpdateEngineState(requestedEnginePower);
+			if (!_currentState.EnginePower.IsEqual(requestedEnginePower)) {
+				return new ResponseFailOverload() { Delta = (_currentState.EnginePower - requestedEnginePower).Value() };
+			}
+
+			UpdateEngineState(_currentState.EnginePower);
 
-			_currentState.EnginePower = requestedEnginePower; //todo + _currentState.EnginePowerLoss;
+			// = requestedEnginePower; //todo + _currentState.EnginePowerLoss;
 			_currentState.EngineTorque = Formulas.PowerToTorque(_currentState.EnginePower,
 				_currentState.EngineSpeed);
 
diff --git a/VectoCore/Models/SimulationComponent/Impl/DistanceBasedDrivingCycle.cs b/VectoCore/Models/SimulationComponent/Impl/DistanceBasedDrivingCycle.cs
index d9985eab92..9428d7b2b3 100644
--- a/VectoCore/Models/SimulationComponent/Impl/DistanceBasedDrivingCycle.cs
+++ b/VectoCore/Models/SimulationComponent/Impl/DistanceBasedDrivingCycle.cs
@@ -8,6 +8,7 @@ using TUGraz.VectoCore.Models.Connector.Ports;
 using TUGraz.VectoCore.Models.Connector.Ports.Impl;
 using TUGraz.VectoCore.Models.Simulation;
 using TUGraz.VectoCore.Models.Simulation.Data;
+using TUGraz.VectoCore.Models.Simulation.DataBus;
 using TUGraz.VectoCore.Models.SimulationComponent.Data;
 using TUGraz.VectoCore.Utils;
 
@@ -17,8 +18,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
 	///     Class representing one Distance Based Driving Cycle
 	/// </summary>
 	public class DistanceBasedDrivingCycle : VectoSimulationComponent, IDrivingCycle,
-		ISimulationOutPort,
-		IDrivingCycleInPort
+		ISimulationOutPort, IDrivingCycleInPort, IRoadLookAhead
 	{
 		protected DrivingCycleData Data;
 
@@ -193,8 +193,15 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
 
 		#endregion
 
-		protected void LookupCycle(Meter ds) {}
+		public IReadOnlyList<DrivingCycleData.DrivingCycleEntry> LookAhead(Meter distance)
+		{
+			throw new NotImplementedException();
+		}
 
+		public IReadOnlyList<DrivingCycleData.DrivingCycleEntry> LookAhead(Second time)
+		{
+			throw new NotImplementedException();
+		}
 
 		public class DrivingCycleEnumerator : IEnumerator<DrivingCycleData.DrivingCycleEntry>
 		{
diff --git a/VectoCore/Models/SimulationComponent/Impl/Driver.cs b/VectoCore/Models/SimulationComponent/Impl/Driver.cs
index 668ad9d984..d9fce57176 100644
--- a/VectoCore/Models/SimulationComponent/Impl/Driver.cs
+++ b/VectoCore/Models/SimulationComponent/Impl/Driver.cs
@@ -64,7 +64,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
 
 		protected IResponse DoHandleRequest(Second absTime, Meter ds, MeterPerSecond targetVelocity, Radian gradient)
 		{
-			var currentSpeed = Cockpit.VehicleSpeed();
+			var currentSpeed = DataBus.VehicleSpeed();
 
 			var requiredAverageSpeed = (targetVelocity + currentSpeed) / 2.0;
 			var requiredAcceleration =
@@ -107,7 +107,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
 
 		protected IResponse DoHandleRequest(Second absTime, Second dt, MeterPerSecond targetVelocity, Radian gradient)
 		{
-			if (!targetVelocity.IsEqual(0) || !Cockpit.VehicleSpeed().IsEqual(0)) {
+			if (!targetVelocity.IsEqual(0) || !DataBus.VehicleSpeed().IsEqual(0)) {
 				throw new NotImplementedException("TargetVelocity or VehicleVelocity is not zero!");
 			}
 			var retVal = Next.Request(absTime, dt, 0.SI<MeterPerSquareSecond>(), gradient);
diff --git a/VectoCore/Models/SimulationComponent/Impl/EngineOnlyGearbox.cs b/VectoCore/Models/SimulationComponent/Impl/EngineOnlyGearbox.cs
index b40fa433c4..c74658caf5 100644
--- a/VectoCore/Models/SimulationComponent/Impl/EngineOnlyGearbox.cs
+++ b/VectoCore/Models/SimulationComponent/Impl/EngineOnlyGearbox.cs
@@ -2,8 +2,8 @@ using System;
 using TUGraz.VectoCore.Exceptions;
 using TUGraz.VectoCore.Models.Connector.Ports;
 using TUGraz.VectoCore.Models.Simulation;
-using TUGraz.VectoCore.Models.Simulation.Cockpit;
 using TUGraz.VectoCore.Models.Simulation.Data;
+using TUGraz.VectoCore.Models.Simulation.DataBus;
 using TUGraz.VectoCore.Utils;
 
 namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
@@ -33,7 +33,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
 
 		#region IGearboxCockpit
 
-		uint IGearboxCockpit.Gear()
+		uint IGearboxInfo.Gear()
 		{
 			return 0;
 		}
diff --git a/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs b/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs
index 1716c90aaf..3c19239c75 100644
--- a/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs
+++ b/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs
@@ -1,8 +1,8 @@
 using System;
 using TUGraz.VectoCore.Models.Connector.Ports;
 using TUGraz.VectoCore.Models.Simulation;
-using TUGraz.VectoCore.Models.Simulation.Cockpit;
 using TUGraz.VectoCore.Models.Simulation.Data;
+using TUGraz.VectoCore.Models.Simulation.DataBus;
 using TUGraz.VectoCore.Models.SimulationComponent.Data;
 using TUGraz.VectoCore.Utils;
 
@@ -39,7 +39,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
 
 		#region IGearboxCockpit
 
-		uint IGearboxCockpit.Gear()
+		uint IGearboxInfo.Gear()
 		{
 			throw new NotImplementedException();
 		}
diff --git a/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs b/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs
index f04188756c..ed38bc0d5f 100644
--- a/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs
+++ b/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs
@@ -1,7 +1,7 @@
 using System;
 using TUGraz.VectoCore.Models.Connector.Ports;
-using TUGraz.VectoCore.Models.Simulation.Cockpit;
 using TUGraz.VectoCore.Models.Simulation.Data;
+using TUGraz.VectoCore.Models.Simulation.DataBus;
 using TUGraz.VectoCore.Models.Simulation.Impl;
 using TUGraz.VectoCore.Models.SimulationComponent.Data;
 using TUGraz.VectoCore.Utils;
diff --git a/VectoCore/Models/SimulationComponent/VectoSimulationComponent.cs b/VectoCore/Models/SimulationComponent/VectoSimulationComponent.cs
index 81008eb3d0..33bfc0070d 100644
--- a/VectoCore/Models/SimulationComponent/VectoSimulationComponent.cs
+++ b/VectoCore/Models/SimulationComponent/VectoSimulationComponent.cs
@@ -1,8 +1,8 @@
 using System;
 using Common.Logging;
 using TUGraz.VectoCore.Models.Simulation;
-using TUGraz.VectoCore.Models.Simulation.Cockpit;
 using TUGraz.VectoCore.Models.Simulation.Data;
+using TUGraz.VectoCore.Models.Simulation.DataBus;
 
 namespace TUGraz.VectoCore.Models.SimulationComponent
 {
@@ -11,19 +11,19 @@ namespace TUGraz.VectoCore.Models.SimulationComponent
 	/// </summary>
 	public abstract class VectoSimulationComponent
 	{
-		[NonSerialized] protected ICockpit Cockpit;
+		[NonSerialized] protected IDataBus DataBus;
 		[NonSerialized] protected ILog Log;
 
 		/// <summary>
 		/// Constructor. Registers the component in the cockpit.
 		/// </summary>
-		/// <param name="cockpit">The vehicle container</param>
-		protected VectoSimulationComponent(IVehicleContainer cockpit)
+		/// <param name="dataBus">The vehicle container</param>
+		protected VectoSimulationComponent(IVehicleContainer dataBus)
 		{
-			Cockpit = cockpit;
+			DataBus = dataBus;
 			Log = LogManager.GetLogger(GetType());
 
-			cockpit.AddComponent(this);
+			dataBus.AddComponent(this);
 		}
 
 		public void CommitSimulationStep(IModalDataWriter writer)
diff --git a/VectoCore/VectoCore.csproj b/VectoCore/VectoCore.csproj
index 6ac4f4abc9..e09a355801 100644
--- a/VectoCore/VectoCore.csproj
+++ b/VectoCore/VectoCore.csproj
@@ -153,7 +153,8 @@
     <Compile Include="Models\Declaration\MissionType.cs" />
     <Compile Include="Models\SimulationComponent\Data\Engine\PT1Curve.cs" />
     <Compile Include="Models\SimulationComponent\Data\GearFullLoadCurve.cs" />
-    <Compile Include="Models\Simulation\Cockpit\IMileageCounter.cs" />
+    <Compile Include="Models\Simulation\DataBus\IMileageCounter.cs" />
+    <Compile Include="Models\Simulation\DataBus\IRoadLookAhead.cs" />
     <Compile Include="Models\Simulation\Impl\DistanceRun.cs" />
     <Compile Include="Models\Simulation\Impl\PowertrainBuilder.cs" />
     <Compile Include="Models\Simulation\Impl\TimeRun.cs" />
@@ -225,10 +226,10 @@
     <Compile Include="Models\Simulation\Impl\VectoRun.cs" />
     <Compile Include="Models\Simulation\Impl\JobContainer.cs" />
     <Compile Include="Models\Simulation\Impl\VehicleContainer.cs" />
-    <Compile Include="Models\Simulation\Cockpit\ICockpit.cs" />
-    <Compile Include="Models\Simulation\Cockpit\IEngineCockpit.cs" />
-    <Compile Include="Models\Simulation\Cockpit\IGearboxCockpit.cs" />
-    <Compile Include="Models\Simulation\Cockpit\IVehicleCockpit.cs" />
+    <Compile Include="Models\Simulation\DataBus\IDataBus.cs" />
+    <Compile Include="Models\Simulation\DataBus\IEngineInfo.cs" />
+    <Compile Include="Models\Simulation\DataBus\IGearboxInfo.cs" />
+    <Compile Include="Models\Simulation\DataBus\IVehicleInfo.cs" />
     <Compile Include="Models\Simulation\IVehicleContainer.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Utils\StringExtensionMethods.cs" />
-- 
GitLab