vanetsim.scenario
Class Vehicle

java.lang.Object
  extended by vanetsim.scenario.LaneObject
      extended by vanetsim.scenario.Vehicle

public final class Vehicle
extends LaneObject

A vehicle which can move and communicate (if wifi is enabled).


Field Summary
 ArrayDeque<WayPoint> originalDestinations_
          The destinations this vehicle wants to visit.
 
Constructor Summary
Vehicle(ArrayDeque<WayPoint> destinations, int vehicleLength, int maxSpeed, int maxCommDist, boolean wiFiEnabled, boolean emergencyVehicle, int brakingRate, int accelerationRate, int timeDistance, int politeness, java.awt.Color color)
          Instantiates a new vehicle.
 
Method Summary
 void adjustSpeed(int timePerStep)
          Adjust the speed if reaching crossings or other cars.
 boolean calculateRoute(boolean careAboutDirection, boolean isReroute)
          (Re-)Calculates the route to the next destination.
 int getAccelerationRate()
          Gets the acceleration rate
static AttackRSU[] getArsuList()
           
static long getAttackedVehicleID_()
           
 int getBeaconCountdown()
          Gets the current beacon countdown
static int getBeaconInterval()
          Returns the interval between beacons.
static boolean getbeaconMonitorEnabled()
          Gets beacon monitor status
static int getbeaconMonitorMaxX()
          Gets beacon monitor maxX coordinate
static int getbeaconMonitorMaxY()
          Gets beacon monitor maxY coordinate
static int getbeaconMonitorMinX()
          Gets beacon monitor minX coordinate
static int getbeaconMonitorMinY()
          Gets beacon monitor minY coordinate
static boolean getBeaconsEnabled()
          Signals if beacons are enabled.
 int getBrakingRate()
          Gets the braking rate
 java.awt.Color getColor()
          Gets the vehicle color.
 int getCommunicationCountdown()
          Gets the current communication countdown
static boolean getCommunicationEnabled()
          Signals if communication is enabled.
static int getCommunicationInterval()
          Returns the interval between messages.
 Node getCurMixNode_()
           
 int getCurWaitTime()
          Gets the current wait time
 ArrayDeque<WayPoint> getDestinations()
          Gets the destinations of this vehicle.
 java.lang.String getHexID()
          Gets the ID used in beacons encoded in HEX so that it's shorter.
 long getID()
          Gets the vehicle ID
 int getIDsChanged()
          Returns how often this vehicle has changed it's ID (excluding the initial ID).
 KnownMessages getKnownMessages()
          Gets the special data structure with all known messages.
 KnownPenalties getKnownPenalties()
          Gets the special data structure with all known penalties.
 KnownRSUsList getKnownRSUsList()
          Gets the special data structure with all known RSUs.
 KnownVehiclesList getKnownVehiclesList()
          Gets the special data structure with all known vehicles.
 int getMaxCommDistance()
          Gets the maximum communication distance of this vehicle.
static int getMaximumCommunicationDistance()
          Returns the maximum communication distance.
static int getMaxMixZoneRadius()
          Gets the maximum mix zone radius used in the scenario.
 int getMaxSpeed()
          Gets the maximum speed of this vehicle.
 boolean getMayBeRecycled()
          Indicates if this vehicle may be reset and reused.
 int getMessagesCreated()
          Returns how many messages this vehicle has created.
static int getMinTravelTimeForRecycling()
          Gets the minimum time a vehicle needs to have traveled in order to be able to be recycled.
static int getMixZoneRadius()
          Returns the radius of the mix zones.
static boolean getMixZonesEnabled()
          Signals if mix zones are enabled.
static boolean getMixZonesFallbackEnabled()
          If the fallback mode shall be enabled in mix zones.
static boolean getMixZonesFallbackFloodingOnly()
          If the fallback mode only sends messages which are in flooding/broadcast mode.
 int getPoliteness()
           
static boolean getRecyclingEnabled()
          Signals if recycling of vehicles is enabled or not
 int getRegionX()
          Gets the regions x-coordinate in which this vehicle is found.
 int getRegionY()
          Gets the regions y-coordinate in which this vehicle is found.
static ReportingControlPanel getREPORT_PANEL()
          Gets the report panel for beacon monitoring
static ReportingControlPanel getReportingPanel()
           
 boolean[] getRouteDirections()
          Get the directions corresponding to the array returned getRouteStreets().
 int getRoutePosition()
          Gets the current position in the array returned by getRouteStreets() and getRouteDirections().
 Street[] getRouteStreets()
          Gets an array with all streets which will be visited until arriving at the next destination.
static int getRoutingMode()
          Returns the current routing mode.
 WayPoint getStartPoint()
          Gets the starting point of the vehicle.
static int getTIME_BETWEEN_SILENT_PERIODS()
           
static int getTIME_OF_SILENT_PERIODS()
           
 int getTimeDistance()
           
 long getTotalTravelDistance()
          The total distance traveled.
 int getTotalTravelTime()
          Gets how long this vehicle traveled.
 int getVehicleID()
          Gets the current ID of this vehicle.
 int getVehicleLength()
          Gets the vehicle length.
 int getWaittime()
          Gets the current waittime.
 boolean isActive()
          Returns if this vehicle is currently active.
static boolean isAttackerDataLogged_()
           
static boolean isAttackerEncryptedDataLogged_()
           
 boolean isEmergencyVehicle()
          Signals if vehicle is an emergency vehicle
static boolean isEncryptedBeaconsInMix_()
           
 boolean isInMixZone()
          Returns if this vehicle is currently in a mix zone.
static boolean isPrivacyDataLogged_()
           
static boolean isSilent_period()
           
static boolean isSilentPeriodsOn()
           
 boolean isWaitingForSignal_()
           
 boolean isWiFiEnabled()
          Returns if this vehicle has WiFi functionality.
 void move(int timePerStep)
          Move the vehicle one step forward.
 void moveAttacker()
          Move Attacker.
 void receiveMessage(int sourceX, int sourceY, Message message)
          Receive a message from another vehicle.
 void reset()
          Resets this vehicle so that it can be reused.
static void resetGlobalRandomGenerator()
          Resets the global random number generator
 void searchAttackedVehicle_()
          The attacked vehicle can«t be found.
 void sendBeacons()
          Find vehicles in neighborhood and send beacons to them.
 void sendEncryptedBeacons()
          Find vehicles nearest in neighborhood and send encrypted beacons to them.
 void sendMessages()
          Find vehicles in neighborhood and give information to them.
 void setAccelerationRate(int accelerationRate)
          Sets the acceleration rate
static void setArsuList(AttackRSU[] arsuList)
           
static void setAttackedVehicleID_(long attackedVehicleID_)
           
static void setAttackerDataLogged_(boolean attackerDataLogged_)
           
static void setAttackerEncryptedDataLogged_(boolean attackerEncryptedDataLogged_)
           
static void setBeaconInterval(int beaconInterval)
          Sets a new value for the beacon interval.
static void setBeaconMonitorZoneEnabled(boolean beaconMonitorEnabled)
          Sets if beacon zones should be monitored or not.
static void setBeaconsEnabled(boolean state)
          Sets if beacons are enabled or not.
 void setBrakingRate(int brakingRate)
          Sets the braking rate
 void setColor(java.awt.Color color)
          Sets the color
static void setCommunicationEnabled(boolean state)
          Sets if communication is enabled or not.
static void setCommunicationInterval(int communicationInterval)
          Sets a new value for the communication interval.
 void setCurMixNode_(Node curMixNode_)
           
 void setCurWaitTime(int curWaitTime)
          Sets the current wait time.
 void setEmergencyVehicle(boolean emergencyVehicle)
          Sets the emergency vehicle mode
static void setEncryptedBeaconsInMix_(boolean encryptedBeaconsInMix_)
           
 void setMaxCommDistance(int maxCommDistance)
          Sets the maximum communication distance
static void setMaximumCommunicationDistance(int maximumCommunicationDistance)
          Set the maximum communication distance.
static void setMaxMixZoneRadius(int maxMixZoneRadius)
          Set the maximum radius of the mix zones.
 void setMaxSpeed(int maxSpeed)
          Sets the maximum speed
static void setMinTravelTimeForRecycling(int minTravelTimeForRecycling)
          Sets the minimum time a vehicle needs to have traveled in order to be able to be recycled.
static void setMixZoneRadius(int mixZoneRadius)
          Set the default radius of the mix zones (in the common settings panel).
static void setMixZonesEnabled(boolean state)
          Sets if mix zones are enabled or not.
static void setMixZonesFallbackEnabled(boolean state)
          Sets if the fallback mode shall be enabled in mix zones.
static void setMixZonesFallbackFloodingOnly(boolean state)
          Sets if the fallback mode only sends messages which are in flooding/broadcast mode.
static void setMonitoredMixZoneVariables(int beaconMonitorMinX, int beaconMonitorMaxX, int beaconMonitorMinY, int beaconMonitorMaxY)
          Sets the values for the monitored beacon zone.
 void setPoliteness(int politeness_)
           
static void setPrivacyDataLogged_(boolean privacyDataLogged_)
           
static void setRecyclingEnabled(boolean state)
          Sets if recycling of vehicles is enabled or not.
 void setRegion(Region region)
          Sets the region in which this vehicle is found.
static void setRegions(Region[][] regions)
          Sets the reference to all regions.
static void setRoutingMode(int mode)
          Sets a new routing mode.
static void setSilent_period(boolean silent_period)
           
static void setSilentPeriodsOn(boolean silentPeriodsOn)
           
static void setTIME_BETWEEN_SILENT_PERIODS(int i)
           
static void setTIME_OF_SILENT_PERIODS(int i)
           
 void setTimeDistance(int timeDistance)
           
 void setVehicleLength(int vehicleLength)
          Sets the vehicle length
 void setWaitingForSignal_(boolean waitingForSignal_)
           
 void setWiFiEnabled(boolean wiFiEnabled)
          Set vehicle WiFi
 java.lang.String toString()
          Gets a substring of the Vehicle ID.
 
Methods inherited from class vanetsim.scenario.LaneObject
getCurDirection, getCurLane, getCurPosition, getCurSpeed, getCurStreet, getNext, getPrevious, getX, getY, setNext, setPrevious
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

originalDestinations_

public ArrayDeque<WayPoint> originalDestinations_
The destinations this vehicle wants to visit.

Constructor Detail

Vehicle

public Vehicle(ArrayDeque<WayPoint> destinations,
               int vehicleLength,
               int maxSpeed,
               int maxCommDist,
               boolean wiFiEnabled,
               boolean emergencyVehicle,
               int brakingRate,
               int accelerationRate,
               int timeDistance,
               int politeness,
               java.awt.Color color)
        throws java.text.ParseException
Instantiates a new vehicle. You will get an exception if the destinations don't contain at least two valid elements.
Elements are considered as invalid if

Parameters:
destinations - an ArrayDeque with at least 2 elements (start and target) indicating where to move.
vehicleLength - the vehicle length
maxSpeed - the maximum speed of this vehicle in cm/s
maxCommDist - the maximum distance in cm this vehicle can communicate
wiFiEnabled - true if this vehicle has a communication device (WiFi), else false
emergencyVehicle - true vehicle is an emergency vehicle
brakingRate - the braking rate in cm/s^2
accelerationRate - the acceleration rate in cm/s^2
color - the color of the vehicle, if empty the default (color.black) is used
Throws:
java.text.ParseException - an Exception indicating that you did not supply a valid destination list.
Method Detail

calculateRoute

public boolean calculateRoute(boolean careAboutDirection,
                              boolean isReroute)
(Re-)Calculates the route to the next destination.

Parameters:
careAboutDirection - true if the direction on the current street shall be used for calculation, false if the direction can be chosen freely
isReroute - true to indicate that this is a Rerouting. If it's a rerouting, a non-existent route does not lead to the vehicle getting inactive!
Returns:
true if new route has been found, else false (on error)

adjustSpeed

public void adjustSpeed(int timePerStep)
Adjust the speed if reaching crossings or other cars. It also checks if the vehicle should get active. Furthermore some cleanup in the known messages and vehicles is done and new jam messages are created if necessary.

Parameters:
timePerStep - the time per step in milliseconds

sendMessages

public void sendMessages()
Find vehicles in neighborhood and give information to them. Please check the following conditions before calling this function:


receiveMessage

public final void receiveMessage(int sourceX,
                                 int sourceY,
                                 Message message)
Receive a message from another vehicle.

Parameters:
sourceX - the x coordinate of the other vehicle
sourceY - the y coordinate of the other vehicle
message - the message

sendBeacons

public void sendBeacons()
Find vehicles in neighborhood and send beacons to them. Please check the following conditions before calling this function:


sendEncryptedBeacons

public void sendEncryptedBeacons()
Find vehicles nearest in neighborhood and send encrypted beacons to them. Please check the following conditions before calling this function:


move

public void move(int timePerStep)
Move the vehicle one step forward. Please check if the vehicle is active before calling this!

Parameters:
timePerStep - the time per step in milliseconds

moveAttacker

public final void moveAttacker()
Move Attacker.


searchAttackedVehicle_

public void searchAttackedVehicle_()
The attacked vehicle can«t be found. But it can«t be far because we received a beacon the last time. This method is only evoked one time per mix-zone so it doesn't need to be that efficient


reset

public void reset()
Resets this vehicle so that it can be reused. It will travel on the same route as last time!


resetGlobalRandomGenerator

public static void resetGlobalRandomGenerator()
Resets the global random number generator


toString

public java.lang.String toString()
Gets a substring of the Vehicle ID. Used in the EditOneVehicleControl.java chooseVehicle_ JCombobox.

Overrides:
toString in class java.lang.Object

getMayBeRecycled

public boolean getMayBeRecycled()
Indicates if this vehicle may be reset and reused.

Returns:
true if it may be reused, else false

getRouteStreets

public Street[] getRouteStreets()
Gets an array with all streets which will be visited until arriving at the next destination.

Returns:
the array with all streets

getRouteDirections

public boolean[] getRouteDirections()
Get the directions corresponding to the array returned getRouteStreets().

Returns:
the array with all directions

getRoutePosition

public int getRoutePosition()
Gets the current position in the array returned by getRouteStreets() and getRouteDirections().

Returns:
the position

getVehicleID

public int getVehicleID()
Gets the current ID of this vehicle. This ID might change if mixing is enabled!

Returns:
the ID

getCommunicationCountdown

public int getCommunicationCountdown()
Gets the current communication countdown

Returns:
the communication countdown

getBeaconCountdown

public int getBeaconCountdown()
Gets the current beacon countdown

Returns:
the beacon countdown

getStartPoint

public WayPoint getStartPoint()
Gets the starting point of the vehicle.

Returns:
the WayPoint

getRegionX

public int getRegionX()
Gets the regions x-coordinate in which this vehicle is found.

Returns:
An Integer representing the x-coordinate of the Region

getRegionY

public int getRegionY()
Gets the regions y-coordinate in which this vehicle is found.

Returns:
An Integer representing the y-coordinate of the Region

getMaxSpeed

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

Returns:
the maximum speed in cm/s

getWaittime

public int getWaittime()
Gets the current waittime.

Returns:
the current waittime in milliseconds

getDestinations

public ArrayDeque<WayPoint> getDestinations()
Gets the destinations of this vehicle.

Returns:
the ArrayDeque with all destinations

getMaxCommDistance

public int getMaxCommDistance()
Gets the maximum communication distance of this vehicle.

Returns:
the distance in cm

isActive

public boolean isActive()
Returns if this vehicle is currently active.

Returns:
true if it's active

isInMixZone

public boolean isInMixZone()
Returns if this vehicle is currently in a mix zone.

Returns:
true if it's in a mix zone

isWiFiEnabled

public boolean isWiFiEnabled()
Returns if this vehicle has WiFi functionality.

Returns:
true if it has WiFi

getKnownMessages

public KnownMessages getKnownMessages()
Gets the special data structure with all known messages.

Returns:
the data structure

getKnownPenalties

public KnownPenalties getKnownPenalties()
Gets the special data structure with all known penalties.

Returns:
the data structure

getKnownVehiclesList

public KnownVehiclesList getKnownVehiclesList()
Gets the special data structure with all known vehicles.

Returns:
the data structure

getKnownRSUsList

public KnownRSUsList getKnownRSUsList()
Gets the special data structure with all known RSUs.

Returns:
the data structure

getMessagesCreated

public int getMessagesCreated()
Returns how many messages this vehicle has created.

Returns:
the amount

getIDsChanged

public int getIDsChanged()
Returns how often this vehicle has changed it's ID (excluding the initial ID).

Returns:
the amount

getTotalTravelTime

public int getTotalTravelTime()
Gets how long this vehicle traveled. This excludes predefined waiting times but includes all other stops.

Returns:
the total time in milliseconds

getTotalTravelDistance

public long getTotalTravelDistance()
The total distance traveled. This is not completely exact but should suffice in most cases. Small aberration from the real value occur if this vehicle reaches a destination (which should not happen too often).

Returns:
the total distance in cm

setRegion

public void setRegion(Region region)
Sets the region in which this vehicle is found.

Parameters:
region - the region

getHexID

public java.lang.String getHexID()
Gets the ID used in beacons encoded in HEX so that it's shorter. If the vehicle is not wifi enabled, brackets are used to indicate this.

Returns:
the ID as an hex string

getCommunicationInterval

public static int getCommunicationInterval()
Returns the interval between messages.

Returns:
the interval in milliseconds

getBeaconInterval

public static int getBeaconInterval()
Returns the interval between beacons.

Returns:
the interval in milliseconds

getCommunicationEnabled

public static boolean getCommunicationEnabled()
Signals if communication is enabled.

Returns:
true if communication is enabled, else false

getRecyclingEnabled

public static boolean getRecyclingEnabled()
Signals if recycling of vehicles is enabled or not

Returns:
true if recycling is enabled, else false

getBeaconsEnabled

public static boolean getBeaconsEnabled()
Signals if beacons are enabled.

Returns:
true if beacons are enabled, else false

getMixZonesEnabled

public static boolean getMixZonesEnabled()
Signals if mix zones are enabled.

Returns:
true if mix zones are enabled, else false

getMixZonesFallbackEnabled

public static boolean getMixZonesFallbackEnabled()
If the fallback mode shall be enabled in mix zones. This fallback mode enables the beaconless communication inside mix zones.

Returns:
true if the fallback mode is enabled, else false

getMixZonesFallbackFloodingOnly

public static boolean getMixZonesFallbackFloodingOnly()
If the fallback mode only sends messages which are in flooding/broadcast mode.

Returns:
true if only flooding messages are sent, else false

getRoutingMode

public static int getRoutingMode()
Returns the current routing mode.

Returns:
the routing mode

getMaximumCommunicationDistance

public static int getMaximumCommunicationDistance()
Returns the maximum communication distance.

Returns:
the maximum communication distance in cm

getMinTravelTimeForRecycling

public static int getMinTravelTimeForRecycling()
Gets the minimum time a vehicle needs to have traveled in order to be able to be recycled. Vehicles which travel shorter than this time will NOT get recycled.

Returns:
the time in milliseconds

getMixZoneRadius

public static int getMixZoneRadius()
Returns the radius of the mix zones.

Returns:
the mix zone radius in cm

setMaxMixZoneRadius

public static void setMaxMixZoneRadius(int maxMixZoneRadius)
Set the maximum radius of the mix zones.

Parameters:
maxMixZoneRadius - the maximum radius of the mix zones in cm

getMaxMixZoneRadius

public static int getMaxMixZoneRadius()
Gets the maximum mix zone radius used in the scenario.

Returns:
maxMixZoneRadius_ the maximum mix zone radius in cm

setMixZoneRadius

public static void setMixZoneRadius(int mixZoneRadius)
Set the default radius of the mix zones (in the common settings panel).

Parameters:
mixZoneRadius - the radius of the mix zones in cm

setMinTravelTimeForRecycling

public static void setMinTravelTimeForRecycling(int minTravelTimeForRecycling)
Sets the minimum time a vehicle needs to have traveled in order to be able to be recycled. Vehicles which travel shorter than this time will NOT get recycled.

Parameters:
minTravelTimeForRecycling - the time in milliseconds

setMaximumCommunicationDistance

public static void setMaximumCommunicationDistance(int maximumCommunicationDistance)
Set the maximum communication distance.

Parameters:
maximumCommunicationDistance - the maximum communication distance in cm

setRegions

public static void setRegions(Region[][] regions)
Sets the reference to all regions. Call this on map reload!

Parameters:
regions - the array with all regions

setCommunicationInterval

public static void setCommunicationInterval(int communicationInterval)
Sets a new value for the communication interval. Common to all vehicles.

Parameters:
communicationInterval - the new value

setBeaconInterval

public static void setBeaconInterval(int beaconInterval)
Sets a new value for the beacon interval. Common to all vehicles.

Parameters:
beaconInterval - the new value

setCommunicationEnabled

public static void setCommunicationEnabled(boolean state)
Sets if communication is enabled or not. Common to all vehicles.

Parameters:
state - true to enable communication, else false

setRecyclingEnabled

public static void setRecyclingEnabled(boolean state)
Sets if recycling of vehicles is enabled or not. Common to all vehicles.

Parameters:
state - true to enable recycling, else false

setBeaconsEnabled

public static void setBeaconsEnabled(boolean state)
Sets if beacons are enabled or not. Common to all vehicles.

Parameters:
state - true to enable beacons, else false

setMixZonesEnabled

public static void setMixZonesEnabled(boolean state)
Sets if mix zones are enabled or not. Common to all vehicles.

Parameters:
state - true to enable mix zones, else false

setMixZonesFallbackEnabled

public static void setMixZonesFallbackEnabled(boolean state)
Sets if the fallback mode shall be enabled in mix zones. This fallback mode enables the beaconless communication inside mix zones.

Parameters:
state - true if the fallback mode is enabled, else false

setMixZonesFallbackFloodingOnly

public static void setMixZonesFallbackFloodingOnly(boolean state)
Sets if the fallback mode only sends messages which are in flooding/broadcast mode.

Parameters:
state - true if only flooding messages are sent, else false

setBeaconMonitorZoneEnabled

public static void setBeaconMonitorZoneEnabled(boolean beaconMonitorEnabled)
Sets if beacon zones should be monitored or not. Common to all vehicles.

Parameters:
beaconMonitorEnabled - true to enable monitoring mix zones, else false

getbeaconMonitorEnabled

public static boolean getbeaconMonitorEnabled()
Gets beacon monitor status

Returns:
beaconMonitorEnabled_ true if beacon monitor is enabled

setMonitoredMixZoneVariables

public static void setMonitoredMixZoneVariables(int beaconMonitorMinX,
                                                int beaconMonitorMaxX,
                                                int beaconMonitorMinY,
                                                int beaconMonitorMaxY)
Sets the values for the monitored beacon zone. A rectangular bounding box within the specified coordinates is monitored if setBeaconMonitorZoneEnabled(boolean) is set to true.

Parameters:
beaconMonitorMinX - the minimum x coordinate
beaconMonitorMaxX - the maximum x coordinate
beaconMonitorMinY - the minimum y coordinate
beaconMonitorMaxY - the maximum y coordinate

getbeaconMonitorMinX

public static int getbeaconMonitorMinX()
Gets beacon monitor minX coordinate

Returns:
beaconMonitorMinX_ the minX coordinate of the beacon monitor window

getbeaconMonitorMaxX

public static int getbeaconMonitorMaxX()
Gets beacon monitor maxX coordinate

Returns:
beaconMonitorMaxX_ the maxX coordinate of the beacon monitor window

getbeaconMonitorMinY

public static int getbeaconMonitorMinY()
Gets beacon monitor minY coordinate

Returns:
beaconMonitorMinY_ the minY coordinate of the beacon monitor window

getbeaconMonitorMaxY

public static int getbeaconMonitorMaxY()
Gets beacon monitor maxY coordinate

Returns:
beaconMonitorMaxY_ the maxY coordinate of the beacon monitor window

getREPORT_PANEL

public static ReportingControlPanel getREPORT_PANEL()
Gets the report panel for beacon monitoring

Returns:
REPORT_PANEL the beacon report panel

setRoutingMode

public static void setRoutingMode(int mode)
Sets a new routing mode. See the A_Star_Algor for details. Common to all vehicles.

Parameters:
mode - the new routing mode

getID

public long getID()
Gets the vehicle ID

Returns:
ID_ the vehicle ID

setWiFiEnabled

public void setWiFiEnabled(boolean wiFiEnabled)
Set vehicle WiFi

Parameters:
wiFiEnabled - true to enable WiFi for the vehicle

setMaxSpeed

public void setMaxSpeed(int maxSpeed)
Sets the maximum speed

Parameters:
maxSpeed - the speed in cm/s

setMaxCommDistance

public void setMaxCommDistance(int maxCommDistance)
Sets the maximum communication distance

Parameters:
maxCommDistance - the maximum communication distance in cm

setCurWaitTime

public void setCurWaitTime(int curWaitTime)
Sets the current wait time.

Parameters:
curWaitTime - the current wait time in ms.

getCurWaitTime

public int getCurWaitTime()
Gets the current wait time

Returns:
curWaitTime_ the current wait time

setColor

public void setColor(java.awt.Color color)
Sets the color

Parameters:
color - the new color

getColor

public java.awt.Color getColor()
Gets the vehicle color.

Returns:
color_ the vehicle color.

setBrakingRate

public void setBrakingRate(int brakingRate)
Sets the braking rate

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

getBrakingRate

public int getBrakingRate()
Gets the braking rate

Returns:
brakingRate_ the braking rate in cm/s^2

setAccelerationRate

public void setAccelerationRate(int accelerationRate)
Sets the acceleration rate

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

getAccelerationRate

public int getAccelerationRate()
Gets the acceleration rate

Returns:
accelerationRate_ the acceleration rate in cm/s^2

setEmergencyVehicle

public void setEmergencyVehicle(boolean emergencyVehicle)
Sets the emergency vehicle mode

Parameters:
emergencyVehicle - true to enable emergency mode

isEmergencyVehicle

public boolean isEmergencyVehicle()
Signals if vehicle is an emergency vehicle

Returns:
true if vehicle is an emergency vehicle

setVehicleLength

public void setVehicleLength(int vehicleLength)
Sets the vehicle length

Parameters:
vehicleLength - the vehicle length in cm.

getVehicleLength

public int getVehicleLength()
Gets the vehicle length.

Returns:
vehicleLength_ the vehicle length in cm.

getArsuList

public static AttackRSU[] getArsuList()

setArsuList

public static void setArsuList(AttackRSU[] arsuList)

isAttackerDataLogged_

public static boolean isAttackerDataLogged_()

setAttackerDataLogged_

public static void setAttackerDataLogged_(boolean attackerDataLogged_)

getAttackedVehicleID_

public static long getAttackedVehicleID_()

setAttackedVehicleID_

public static void setAttackedVehicleID_(long attackedVehicleID_)

isEncryptedBeaconsInMix_

public static boolean isEncryptedBeaconsInMix_()

setEncryptedBeaconsInMix_

public static void setEncryptedBeaconsInMix_(boolean encryptedBeaconsInMix_)

isAttackerEncryptedDataLogged_

public static boolean isAttackerEncryptedDataLogged_()

setAttackerEncryptedDataLogged_

public static void setAttackerEncryptedDataLogged_(boolean attackerEncryptedDataLogged_)

getCurMixNode_

public Node getCurMixNode_()

setCurMixNode_

public void setCurMixNode_(Node curMixNode_)

getReportingPanel

public static ReportingControlPanel getReportingPanel()

isWaitingForSignal_

public boolean isWaitingForSignal_()
Returns:
the waitingForSignal_

setWaitingForSignal_

public void setWaitingForSignal_(boolean waitingForSignal_)
Parameters:
waitingForSignal_ - the waitingForSignal_ to set

isPrivacyDataLogged_

public static boolean isPrivacyDataLogged_()

setPrivacyDataLogged_

public static void setPrivacyDataLogged_(boolean privacyDataLogged_)

setTimeDistance

public void setTimeDistance(int timeDistance)

getTimeDistance

public int getTimeDistance()

setPoliteness

public void setPoliteness(int politeness_)

getPoliteness

public int getPoliteness()

getTIME_BETWEEN_SILENT_PERIODS

public static int getTIME_BETWEEN_SILENT_PERIODS()

setTIME_BETWEEN_SILENT_PERIODS

public static void setTIME_BETWEEN_SILENT_PERIODS(int i)

getTIME_OF_SILENT_PERIODS

public static int getTIME_OF_SILENT_PERIODS()

setTIME_OF_SILENT_PERIODS

public static void setTIME_OF_SILENT_PERIODS(int i)

isSilent_period

public static boolean isSilent_period()

setSilent_period

public static void setSilent_period(boolean silent_period)

isSilentPeriodsOn

public static boolean isSilentPeriodsOn()

setSilentPeriodsOn

public static void setSilentPeriodsOn(boolean silentPeriodsOn)