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.
  • Constructor Details

  • 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 interface LaneSetMaxSpeed
      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 class AbstractTraciCommand<Void>
      Parameters:
      status - the status of the response
      objects - the objects created by the configured readers
      Returns:
      the final result constructed from the passed objects