vanetsim.gui.helpers
Class VehicleType

java.lang.Object
  extended by vanetsim.gui.helpers.VehicleType

public class VehicleType
extends java.lang.Object


Constructor Summary
VehicleType(java.lang.String name, int vehicleLength, int maxSpeed, int minSpeed, int maxCommDist, int minCommDist, int maxBrakingRate, int minBrakingRate, int maxAccelerationRate, int minAccelerationRate, int minTimeDistance, int maxTimeDistance, int minPoliteness, int maxPoliteness, int maxWaittime, int minWaittime, boolean wifi, boolean emergencyVehicle, int color)
          Instantiates a new vehicle type.
 
Method Summary
 int getColor()
          Gets the color of the vehicle type
 int getMaxAccelerationRate()
          Gets the maximum acceleration rate of the vehicle type.
 int getMaxBrakingRate()
          Gets the maximum braking rate of the vehicle type.
 int getMaxCommDist()
          Gets the maximum communication distance of the vehicle type.
 int getMaxPoliteness()
           
 int getMaxSpeed()
          Gets the maximum speed of the vehicle type.
 int getMaxTimeDistance()
           
 int getMaxWaittime()
          Gets the maximum wait time of the vehicle type.
 int getMinAccelerationRate()
          Gets the minimum acceleration rate of the vehicle type.
 int getMinBrakingRate()
          Gets the minimum braking rate of the vehicle type.
 int getMinCommDist()
          Gets the minimum communication distance of the vehicle type.
 int getMinPoliteness()
           
 int getMinSpeed()
          Gets the minimum Speed of the vehicle type.
 int getMinTimeDistance()
           
 int getMinWaittime()
          Gets the minimum wait time of the vehicle type.
 java.lang.String getName()
          Gets the current name of the vehicle type.
 int getVehicleLength()
          Gets the vehicle length.
 boolean isEmergencyVehicle()
          Gets the emergency vehicle status of the vehicle type.
 boolean isWifi()
          Gets the wifi status of the vehicle type.
 void setColor(int color)
          Set the color.
 void setEmergencyVehicle(boolean emergencyVehicle)
          Set the emergency vehicle status.
 void setMaxAccelerationRate(int maxAccelerationRate)
          Set the maximum acceleration rate.
 void setMaxBrakingRate(int maxBrakingRate)
          Set the maximum braking rate.
 void setMaxCommDist(int maxCommDist)
          Set the maximum communication distance
 void setMaxPoliteness(int maxPoliteness_)
           
 void setMaxSpeed(int maxSpeed)
          Set the maximum speed
 void setMaxTimeDistance(int maxTimeDistance_)
           
 void setMaxWaittime(int maxWaittime)
          Set the maximum wait time
 void setMinAccelerationRate(int minAccelerationRate)
          Set the minimum acceleration rate.
 void setMinBrakingRate(int minBrakingRate)
          Set the minimum braking rate.
 void setMinCommDist(int minCommDist)
          Set the minimum communication distance
 void setMinPoliteness(int minPoliteness_)
           
 void setMinSpeed(int minSpeed)
          Set the minimum speed
 void setMinTimeDistance(int minTimeDistance_)
           
 void setMinWaittime(int minWaittime)
          Set the minimum wait time
 void setVehicleLength(int vehicleLength)
          Set the vehicle length.
 void setWifi(boolean wifi)
          Set the wifi status.
 java.lang.String toString()
          Gets the name of the vehicle type if the toString() function is called.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VehicleType

public VehicleType(java.lang.String name,
                   int vehicleLength,
                   int maxSpeed,
                   int minSpeed,
                   int maxCommDist,
                   int minCommDist,
                   int maxBrakingRate,
                   int minBrakingRate,
                   int maxAccelerationRate,
                   int minAccelerationRate,
                   int minTimeDistance,
                   int maxTimeDistance,
                   int minPoliteness,
                   int maxPoliteness,
                   int maxWaittime,
                   int minWaittime,
                   boolean wifi,
                   boolean emergencyVehicle,
                   int color)
Instantiates a new vehicle type.

Parameters:
name - name of the vehicle type
maxSpeed - the maximum speed of this vehicle type in cm/s
minSpeed - the minimum speed of this vehicle in cm/s
maxCommDist - the maximum communication distance in cm/s.
minCommDist - the minimum communication distance in cm/s.
maxBrakingRate - the maximum braking rate in cm/s^2.
minBrakingRate - the minimum braking rate in cm/s^2.
maxAccelerationRate - the maximum acceleration rate in cm/s^2.
minAccelerationRate - the minimum acceleration rate in cm/s^2.
maxWaittime - the maximum wait time in ms.
minWaittime - the minimum wait time in ms.
vehicleLength - the vehicle length in cm.
wifi - true: wifi is enabled in the vehicle type
emergencyVehicle - true: emergencyVehicle functions are enabled in the vehicle type
color - the color of the vehicle type
Method Detail

getName

public java.lang.String getName()
Gets the current name of the vehicle type.

Returns:
the name

getMaxSpeed

public int getMaxSpeed()
Gets the maximum speed of the vehicle type.

Returns:
maximum Speed

setMaxSpeed

public void setMaxSpeed(int maxSpeed)
Set the maximum speed

Parameters:
maxSpeed - the maximum speed in cm/s

getMinSpeed

public int getMinSpeed()
Gets the minimum Speed of the vehicle type.

Returns:
the minimum Speed

setMinSpeed

public void setMinSpeed(int minSpeed)
Set the minimum speed

Parameters:
minSpeed - the maximum speed in cm/s.

getMaxCommDist

public int getMaxCommDist()
Gets the maximum communication distance of the vehicle type.

Returns:
the maximum communication distance

setMaxCommDist

public void setMaxCommDist(int maxCommDist)
Set the maximum communication distance

Parameters:
maxCommDist - the maximum communication distance in cm.

getMinCommDist

public int getMinCommDist()
Gets the minimum communication distance of the vehicle type.

Returns:
the minimum communication distance

setMinCommDist

public void setMinCommDist(int minCommDist)
Set the minimum communication distance

Parameters:
minCommDist - the minimum communication distance in cm.

getMaxWaittime

public int getMaxWaittime()
Gets the maximum wait time of the vehicle type.

Returns:
the maximum wait time

setMaxWaittime

public void setMaxWaittime(int maxWaittime)
Set the maximum wait time

Parameters:
maxWaittime - the maximum wait time in ms.

getMinWaittime

public int getMinWaittime()
Gets the minimum wait time of the vehicle type.

Returns:
the minimum wait time

setMinWaittime

public void setMinWaittime(int minWaittime)
Set the minimum wait time

Parameters:
minWaittime - the minimum wait time in ms.

getColor

public int getColor()
Gets the color of the vehicle type

Returns:
the color

setColor

public void setColor(int color)
Set the color.

Parameters:
color - the rgb color

getMaxBrakingRate

public int getMaxBrakingRate()
Gets the maximum braking rate of the vehicle type.

Returns:
the maximum braking rate

setMaxBrakingRate

public void setMaxBrakingRate(int maxBrakingRate)
Set the maximum braking rate.

Parameters:
maxBrakingRate - the maximum braking rate in cm/s^2

getMinBrakingRate

public int getMinBrakingRate()
Gets the minimum braking rate of the vehicle type.

Returns:
the minimum braking rate

setMinBrakingRate

public void setMinBrakingRate(int minBrakingRate)
Set the minimum braking rate.

Parameters:
minBrakingRate - the minimum braking rate in cm/s^2

getMaxAccelerationRate

public int getMaxAccelerationRate()
Gets the maximum acceleration rate of the vehicle type.

Returns:
the maximum acceleration rate

setMaxAccelerationRate

public void setMaxAccelerationRate(int maxAccelerationRate)
Set the maximum acceleration rate.

Parameters:
maxAccelerationRate - the maximum acceleration rate in cm/s^2

getMinAccelerationRate

public int getMinAccelerationRate()
Gets the minimum acceleration rate of the vehicle type.

Returns:
the minimum acceleration rate

setMinAccelerationRate

public void setMinAccelerationRate(int minAccelerationRate)
Set the minimum acceleration rate.

Parameters:
minAccelerationRate - the minimum acceleration rate in cm/s^2

isWifi

public boolean isWifi()
Gets the wifi status of the vehicle type.

Returns:
true if wifi is enabled

setWifi

public void setWifi(boolean wifi)
Set the wifi status.

Parameters:
wifi - true wifi is enabled

isEmergencyVehicle

public boolean isEmergencyVehicle()
Gets the emergency vehicle status of the vehicle type.

Returns:
true if vehicle type is an emergency vehicle.

setEmergencyVehicle

public void setEmergencyVehicle(boolean emergencyVehicle)
Set the emergency vehicle status.

Parameters:
emergencyVehicle - true emergencyVehicle status is enabled.

getVehicleLength

public int getVehicleLength()
Gets the vehicle length.

Returns:
the vehicle length.

setVehicleLength

public void setVehicleLength(int vehicleLength)
Set the vehicle length.

Parameters:
vehicleLength - Length of the vehicle.

setMinTimeDistance

public void setMinTimeDistance(int minTimeDistance_)

getMinTimeDistance

public int getMinTimeDistance()

setMaxTimeDistance

public void setMaxTimeDistance(int maxTimeDistance_)

getMaxTimeDistance

public int getMaxTimeDistance()

setMinPoliteness

public void setMinPoliteness(int minPoliteness_)

getMinPoliteness

public int getMinPoliteness()

setMaxPoliteness

public void setMaxPoliteness(int maxPoliteness_)

getMaxPoliteness

public int getMaxPoliteness()

toString

public java.lang.String toString()
Gets the name of the vehicle type if the toString() function is called.

Overrides:
toString in class java.lang.Object
Returns:
name of the vehicle