Class SimulationGetDepartedVehicleIds
java.lang.Object
org.eclipse.mosaic.fed.sumo.bridge.traci.AbstractTraciCommand<List<String>>
org.eclipse.mosaic.fed.sumo.bridge.traci.SimulationGetDepartedVehicleIds
- All Implemented Interfaces:
SimulationGetDepartedVehicleIds
public class SimulationGetDepartedVehicleIds
extends AbstractTraciCommand<List<String>>
implements SimulationGetDepartedVehicleIds
This class represents the SUMO command which allows to get the Id's of the vehicles departed the simulation.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.mosaic.fed.sumo.bridge.traci.AbstractTraciCommand
AbstractTraciCommand.TraciCommandResultReaderBuilder, AbstractTraciCommand.TraciCommandWriterBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newSimulationGetDepartedVehicleIds
traci command, which will return a list of all departed vehicles once executed. -
Method Summary
Modifier and TypeMethodDescriptionconstructResult
(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 get the vehicles Id's in the simulation, which departed the simulation.Methods inherited from class org.eclipse.mosaic.fed.sumo.bridge.traci.AbstractTraciCommand
execute, executeAndReturn, executeAndReturnList, read, write
-
Constructor Details
-
SimulationGetDepartedVehicleIds
public SimulationGetDepartedVehicleIds()Creates a newSimulationGetDepartedVehicleIds
traci command, which will return a list of all departed vehicles once executed. Access needs to be public, because command is called using Reflection.
-
-
Method Details
-
execute
This method executes the command with the given arguments in order to get the vehicles Id's in the simulation, which departed the simulation.- Specified by:
execute
in interfaceSimulationGetDepartedVehicleIds
- Parameters:
bridge
- Connection to SUMO.- Returns:
- List of vehicle Id's.
- 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<List<String>>
- Parameters:
status
- the status of the responseobjects
- the objects created by the configured readers- Returns:
- the final result constructed from the passed objects
-