Class VehicleSubscribeSurroundingVehicle
java.lang.Object
org.eclipse.mosaic.fed.sumo.bridge.libsumo.VehicleSubscribeSurroundingVehicle
- All Implemented Interfaces:
VehicleSubscribeSurroundingVehicle
public class VehicleSubscribeSurroundingVehicle
extends Object
implements VehicleSubscribeSurroundingVehicle
This class represents the SUMO command which allows to subscribe the vehicle to the application.
Several options for vehicle subscription are implemented in this class.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
VehicleSubscribeSurroundingVehicle
public VehicleSubscribeSurroundingVehicle()
-
-
Method Details
-
execute
public void execute(Bridge bridge, String vehicleId, long startTime, long endTime, double range) throws CommandException, InternalFederateException Description copied from interface:VehicleSubscribeSurroundingVehicle
This method executes the command with the given arguments in order to subscribe the vehicle to the application.- Specified by:
execute
in interfaceVehicleSubscribeSurroundingVehicle
- Parameters:
bridge
- Connection to SUMO.vehicleId
- The Id of the Vehicle.startTime
- The time to subscribe the vehicle.endTime
- The end time of the subscription of the vehicle in the application.- 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.
-