Class SimulationSimulateStep
- java.lang.Object
-
- org.eclipse.mosaic.fed.sumo.bridge.traci.AbstractTraciCommand<AbstractSubscriptionResult>
-
- org.eclipse.mosaic.fed.sumo.bridge.traci.SimulationSimulateStep
-
- All Implemented Interfaces:
SimulationSimulateStep
public class SimulationSimulateStep extends AbstractTraciCommand<AbstractSubscriptionResult> implements SimulationSimulateStep
This class represents the SUMO command which allows to set the simulation step.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.mosaic.fed.sumo.bridge.traci.AbstractTraciCommand
AbstractTraciCommand.TraciCommandResultReaderBuilder, AbstractTraciCommand.TraciCommandWriterBuilder
-
-
Constructor Summary
Constructors Constructor Description SimulationSimulateStep()
Creates aSimulationSimulateStep
traci command, which can late be executed with a given time value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractSubscriptionResult
constructResult(Status status, Object... objects)
This method is called during reading the command response when all readers have been executed.List<AbstractSubscriptionResult>
execute(Bridge bridge, long time)
This method executes the command with the given arguments in order to set the simulation step.-
Methods inherited from class org.eclipse.mosaic.fed.sumo.bridge.traci.AbstractTraciCommand
execute, executeAndReturn, executeAndReturnList, read, write
-
-
-
-
Constructor Detail
-
SimulationSimulateStep
public SimulationSimulateStep()
Creates aSimulationSimulateStep
traci command, which can late be executed with a given time value. Access needs to be public, because command is called using Reflection.
-
-
Method Detail
-
execute
public List<AbstractSubscriptionResult> execute(Bridge bridge, long time) throws CommandException, InternalFederateException
This method executes the command with the given arguments in order to set the simulation step.- Specified by:
execute
in interfaceSimulationSimulateStep
- Parameters:
bridge
- Connection to SUMO.time
- Time step.- Returns:
- List of the results.
- Throws:
CommandException
- if the status code of the response is ERROR. The connection to SUMO is still available.InternalFederateException
- if some serious error occurs during writing or reading. The TraCI connection is shut down.
-
constructResult
protected AbstractSubscriptionResult constructResult(Status status, Object... objects)
Description copied from class:AbstractTraciCommand
This method is called during reading the command response when all readers have been executed. The results of the readers are passed to this method.- Specified by:
constructResult
in classAbstractTraciCommand<AbstractSubscriptionResult>
- Parameters:
status
- the status of the responseobjects
- the objects created by the configured readers- Returns:
- the final result constructed from the passed objects
-
-