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

Skip to content
Snippets Groups Projects
Commit 5634c57d authored by Michael KRISPER's avatar Michael KRISPER
Browse files

added Source in ResponseSuccess

parent 6f8ac5e3
No related branches found
No related tags found
No related merge requests found
......@@ -164,6 +164,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdaper
if (gearCurve == null) {
return engineCurve;
}
// TODO MK-2016-04-18: also combine the curves at the intersection-points of line segments!
var entries =
gearCurve.FullLoadEntries.Concat(engineCurve.FullLoadEntries)
.OrderBy(x => x.EngineSpeed)
......
......@@ -81,7 +81,10 @@ namespace TUGraz.VectoCore.Models.Connector.Ports.Impl
/// <summary>
/// Response when a request was successful.
/// </summary>
public class ResponseSuccess : AbstractResponse {}
public class ResponseSuccess : AbstractResponse
{
public ResponseSuccess() {}
}
/// <summary>
/// Response when the request resulted in an engine or gearbox overload.
......
......@@ -258,7 +258,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
return new ResponseSuccess {
EnginePowerRequest = totalTorqueDemand * avgEngineSpeed,
AuxiliariesPowerDemand = auxTorqueDemand * avgEngineSpeed,
EngineSpeed = angularVelocity
EngineSpeed = angularVelocity,
Source = this
};
}
......
......@@ -91,7 +91,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
// = requestedEnginePower; //todo + _currentState.EnginePowerLoss;
CurrentState.EngineTorque = CurrentState.EnginePower / CurrentState.EngineSpeed;
return new ResponseSuccess();
return new ResponseSuccess() { Source = this };
}
protected NewtonMeter LimitEnginePower(NewtonMeter requestedEngineTorque, PerSecond avgEngineSpeed, Second AbsTime)
......
......@@ -133,7 +133,7 @@ namespace TUGraz.VectoCore.Tests.Utils
Velocity = targetVelocity;
Gradient = gradient;
Log.Debug("Request: absTime: {0}, ds: {1}, velocity: {2}, gradient: {3}", absTime, ds, targetVelocity, gradient);
return new ResponseSuccess();
return new ResponseSuccess() { Source = this};
}
public IResponse Request(Second absTime, Second dt, MeterPerSecond targetVelocity, Radian gradient)
......@@ -143,7 +143,7 @@ namespace TUGraz.VectoCore.Tests.Utils
Velocity = targetVelocity;
Gradient = gradient;
Log.Debug("Request: absTime: {0}, ds: {1}, velocity: {2}, gradient: {3}", absTime, dt, targetVelocity, gradient);
return new ResponseSuccess();
return new ResponseSuccess() { Source = this };
}
public IResponse Initialize(MeterPerSecond vehicleSpeed, Radian roadGradient)
......@@ -172,12 +172,12 @@ namespace TUGraz.VectoCore.Tests.Utils
Force = force;
Velocity = velocity;
Log.Debug("Request: abstime: {0}, dt: {1}, force: {2}, velocity: {3}", absTime, dt, force, velocity);
return new ResponseSuccess();
return new ResponseSuccess() { Source = this };
}
public IResponse Initialize(Newton vehicleForce, MeterPerSecond vehicleSpeed)
{
return new ResponseSuccess();
return new ResponseSuccess() { Source = this };
}
}
}
\ No newline at end of file
......@@ -96,7 +96,7 @@ namespace TUGraz.VectoCore.Tests.Utils
acceleration = acceleration,
gradient = gradient
};
return new ResponseSuccess();
return new ResponseSuccess() { Source = this};
}
public IResponse Initialize(MeterPerSecond vehicleSpeed, Radian roadGradient)
......
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