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
public class VehicleTypeGetTau extends AbstractTraciCommand<Double> implements 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 Constructor Description VehicleTypeGetTau()
Creates a newVehicleTypeGetTau
traci command.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Double
constructResult(Status status, Object... objects)
This method is called during reading the command response when all readers have been executed.double
execute(Bridge bridge, String vehicleTypeId)
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 Detail
-
VehicleTypeGetTau
public VehicleTypeGetTau()
Creates a newVehicleTypeGetTau
traci command. Access needs to be public, because command is called using Reflection.- See Also:
- VehicleType Value Retrieval
-
-
Method Detail
-
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
protected Double 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<Double>
- Parameters:
status
- the status of the responseobjects
- the objects created by the configured readers- Returns:
- the final result constructed from the passed objects
-
-