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
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected Void
constructResult
(Status status, Object... objects) This method is called during reading the command response when all readers have been executed.void
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 Details
-
LaneSetMaxSpeed
public LaneSetMaxSpeed()Creates a newLaneSetMaxSpeed
traci command.- See Also:
-
-
Method Details
-
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
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
-