Class LaneSetMaxSpeed
- java.lang.Object
-
- org.eclipse.mosaic.fed.sumo.bridge.traci.AbstractTraciCommand<Void>
-
- org.eclipse.mosaic.fed.sumo.bridge.traci.LaneSetMaxSpeed
-
- All Implemented Interfaces:
LaneSetMaxSpeed
public class LaneSetMaxSpeed extends AbstractTraciCommand<Void> implements LaneSetMaxSpeed
This class represents the SUMO command which sets the maximum lane speed.
-
-
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 LaneSetMaxSpeed()
Creates a newLaneSetMaxSpeed
traci command.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Void
constructResult(Status status, Object... objects)
This method is called during reading the command response when all readers have been executed.void
execute(Bridge bridge, String laneId, double maxSpeed)
This method executes the command with the given arguments and sets the maximum lane speed.-
Methods inherited from class org.eclipse.mosaic.fed.sumo.bridge.traci.AbstractTraciCommand
execute, executeAndReturn, executeAndReturnList, read, write
-
-
-
-
Constructor Detail
-
LaneSetMaxSpeed
public LaneSetMaxSpeed()
Creates a newLaneSetMaxSpeed
traci command.- See Also:
- Lane State Change
-
-
Method Detail
-
execute
public void execute(Bridge bridge, String laneId, double maxSpeed) throws CommandException, InternalFederateException
This method executes the command with the given arguments and sets the maximum lane speed.- Specified by:
execute
in interfaceLaneSetMaxSpeed
- Parameters:
bridge
- Connection to SUMO.laneId
- Id of the lane.maxSpeed
- The maximum speed of the lane.- 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 Void 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<Void>
- Parameters:
status
- the status of the responseobjects
- the objects created by the configured readers- Returns:
- the final result constructed from the passed objects
-
-