Class VehicleTypeGetTau
java.lang.Object
org.eclipse.mosaic.fed.sumo.bridge.traci.AbstractTraciCommand<Double>
org.eclipse.mosaic.fed.sumo.bridge.traci.VehicleTypeGetTau
- All Implemented Interfaces:
VehicleTypeGetTau
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.mosaic.fed.sumo.bridge.traci.AbstractTraciCommand
AbstractTraciCommand.TraciCommandResultReaderBuilder, AbstractTraciCommand.TraciCommandWriterBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Double
constructResult
(Status status, Object... objects) This method is called during reading the command response when all readers have been executed.double
This method executes the command with the given arguments in order to get the tau value of a specific vehicle type.Methods inherited from class org.eclipse.mosaic.fed.sumo.bridge.traci.AbstractTraciCommand
execute, executeAndReturn, executeAndReturnList, read, write
-
Constructor Details
-
VehicleTypeGetTau
public VehicleTypeGetTau()Creates a newVehicleTypeGetTau
traci command. Access needs to be public, because command is called using Reflection.- See Also:
-
-
Method Details
-
execute
public double execute(Bridge bridge, String vehicleTypeId) throws CommandException, InternalFederateException Description copied from interface:VehicleTypeGetTau
This method executes the command with the given arguments in order to get the tau value of a specific vehicle type.- Specified by:
execute
in interfaceVehicleTypeGetTau
- Parameters:
bridge
- Connection to SUMO.vehicleTypeId
- Id of the vehicle type.- Returns:
- the value of the parameter, or
null
if not present - 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 connection to SUMO 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<Double>
- Parameters:
status
- the status of the responseobjects
- the objects created by the configured readers- Returns:
- the final result constructed from the passed objects
-