Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

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

adding vehicle container with all simulation components and cockpit elements

parent 240fc5e4
No related branches found
No related tags found
No related merge requests found
namespace TUGraz.VectoCore.Models.Simulation.Cockpit
{
public interface IEngineCockpit : ICockpitComponent
public interface IEngineCockpit
{
double EngineSpeed();
}
......
namespace TUGraz.VectoCore.Models.Simulation.Cockpit
{
public interface IGearboxCockpit : ICockpitComponent
public interface IGearboxCockpit
{
int Gear();
}
......
namespace TUGraz.VectoCore.Models.Simulation.Cockpit
{
public interface IVehicleCockpit : ICockpitComponent
public interface IVehicleCockpit
{
double VehicleSpeed();
}
......
......@@ -5,11 +5,7 @@ namespace TUGraz.VectoCore.Models.Simulation
{
public interface IVehicleContainer : ICockpit
{
void AddComponent<T>(T component) where T : VectoSimulationComponent, ICockpitComponent;
//void AddComponent<T>(T component) where T : VectoSimulationComponent, IEngineCockpit;
//void AddComponent<T>(T component) where T : VectoSimulationComponent, IGearboxCockpit;
void AddComponent(VectoSimulationComponent component);
}
}
\ No newline at end of file
......@@ -15,7 +15,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
private IEngineCockpit _engine = null;
private IGearboxCockpit _gearbox = null;
public virtual void AddComponent<T>(T component) where T : VectoSimulationComponent, ICockpitComponent
public virtual void AddComponent(VectoSimulationComponent component)
{
DoAddComponent(component);
// TODO: refactor the following to use polymorphism?
......
......@@ -5,7 +5,7 @@ using TUGraz.VectoCore.Models.Simulation.Data;
namespace TUGraz.VectoCore.Models.SimulationComponent
{
public abstract class VectoSimulationComponent : ICockpitComponent
public abstract class VectoSimulationComponent
{
protected ICockpit Cockpit;
......
......@@ -80,7 +80,6 @@
<Compile Include="Models\Connector\Ports\IOutPort.cs" />
<Compile Include="Models\SimulationComponent\IWheels.cs" />
<Compile Include="Models\SimulationComponent\VectoSimulationComponent.cs" />
<Compile Include="Models\Simulation\Cockpit\ICockpitComponent.cs" />
<Compile Include="Models\Simulation\Data\EngineOnlyDrivingCycle.cs" />
<Compile Include="Models\Simulation\Data\IModalDataWriter.cs" />
<Compile Include="Models\Simulation\Data\ModalResult.cs">
......
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