Public Member Functions | |
| RSU (int x, int y, int radius, boolean isEncrypted) | |
| void | sendMessages () | 
| void | sendBeacons () | 
| void | sendEncryptedBeacons () | 
| final void | receiveMessage (int sourceX, int sourceY, Message message) | 
| void | cleanup (int timePerStep) | 
| long | getRSUID () | 
| int | getX () | 
| int | getY () | 
| void | setRegion (Region region) | 
| Region | getRegion () | 
| int | getWifiRadius () | 
| int | getBeaconCountdown () | 
| int | getCommunicationCountdown () | 
| boolean | isEncrypted_ () | 
| KnownVehiclesList | getKnownVehiclesList_ () | 
Static Public Member Functions | |
| static void | setRegions (Region[][] regions) | 
| static void | setBeaconsEnabled (boolean state) | 
| static void | setCommunicationEnabled (boolean state) | 
| static void | setCommunicationInterval (int communicationInterval) | 
| static void | setBeaconInterval (int beaconInterval) | 
| static void | setBeaconMonitorZoneEnabled (boolean beaconMonitorEnabled) | 
| static void | setMonitoredMixZoneVariables (int beaconMonitorMinX, int beaconMonitorMaxX, int beaconMonitorMinY, int beaconMonitorMaxY) | 
| static boolean | isShowEncryptedBeaconsInMix_ () | 
| static void | setShowEncryptedBeaconsInMix_ (boolean showEncryptedBeaconsInMix_) | 
Static Public Attributes | |
| static ArrayDeque< Vehicle > | coloredVehicles = new ArrayDeque<Vehicle>() | 
| static RSU | lastSender = null | 
| static boolean | colorCleared = false | 
A Road-Side-Unit to send and receive WiFi signals.
      
  | 
  inline | 
Instantiates a new RSU.
| x | the x coordinate | 
| y | the y coordinate | 
| radius | the signal radius | 
| isEncrypted | if message is encrypted | 
      
  | 
  inline | 
Cleanup all outdated messages
| timePerStep | the actual time per step | 
      
  | 
  inline | 
Gets the current beacon countdown
      
  | 
  inline | 
Gets the current communication countdown
      
  | 
  inline | 
Returns the region the RSU is placed in
      
  | 
  inline | 
   Resets this rsu so that it can be reused.
public void reset(){
reset countdowns and other variables communicationCountdown_ = 0; knownVehiclesTimeoutCountdown_ = 0; beaconCountdown_ = (int)Math.round(x_)beaconInterval_; communicationCountdown_ = (int)Math.round(x_)communicationInterval_;
reset communication info knownVehiclesList_.clear(); knownMessages_.clear(); } /*
/** Returns the Road-Side-Unit id
      
  | 
  inline | 
Returns the wifi radius
      
  | 
  inline | 
Returns the x coordinate of the RSU
      
  | 
  inline | 
Returns the y coordinate of the RSU
      
  | 
  inline | 
Receive a message from a vehicle.
| sourceX | the x coordinate of the other vehicle | 
| sourceY | the y coordinate of the other vehicle | 
| message | the message | 
      
  | 
  inline | 
Find vehicles in neighborhood and send beacons to them. Please check the following conditions before calling this function:
      
  | 
  inline | 
Find vehicles in neighborhood and send beacons to them. Please check the following conditions before calling this function:
      
  | 
  inline | 
send messages to all vehicles in reach. Uses broadcast, because vehicles cannot send beacons to the RSUs(often to far away)
      
  | 
  inlinestatic | 
Sets a new value for the beacon interval. Common to all Road-Side-Units.
| beaconInterval | the new value | 
      
  | 
  inlinestatic | 
Sets if beacon zones should be monitored or not. Common to all RSUs.
| beaconMonitorEnabled | true to enable monitoring mix zones, else false  | 
      
  | 
  inlinestatic | 
Sets if beacons are enabled or not. Common to all Road-Side-Units.
| state | true to enable beacons, else false  | 
      
  | 
  inlinestatic | 
Sets if communication is enabled or not. Common to all Road-Side-Units.
| state | true to enable communication, else false  | 
      
  | 
  inlinestatic | 
Sets a new value for the communication interval. Common to all Road-Side-Units.
| communicationInterval | the new value | 
      
  | 
  inlinestatic | 
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.
| beaconMonitorMinX | the minimum x coordinate | 
| beaconMonitorMaxX | the maximum x coordinate | 
| beaconMonitorMinY | the minimum y coordinate | 
| beaconMonitorMaxY | the maximum y coordinate | 
      
  | 
  inline | 
Sets the region the RSU is placed
| region | the region | 
      
  | 
  inlinestatic | 
Sets the reference to all regions. Call this on map reload!
| regions | the array with all regions | 
      
  | 
  static | 
flag to clear vehicle color
saves all colored vehicles
 1.8.3.1