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
ConstructorsConstructorDescriptionCreates aSimulationSimulateStep
traci command, which can late be executed with a given time value. -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractSubscriptionResult
constructResult
(Status status, Object... objects) This method is called during reading the command response when all readers have been executed.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 Details
-
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 Details
-
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
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
-