|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvanetsim.scenario.RSU
public final class RSU
A Road-Side-Unit to send and receive WiFi signals.
| Field Summary | |
|---|---|
static boolean |
colorCleared
flag to clear vehicle color |
static ArrayDeque<Vehicle> |
coloredVehicles
saves all colored vehicles |
static RSU |
lastSender
|
| Constructor Summary | |
|---|---|
RSU(int x,
int y,
int radius,
boolean isEncrypted)
Instantiates a new RSU. |
|
| Method Summary | |
|---|---|
void |
cleanup(int timePerStep)
Cleanup all outdated messages |
int |
getBeaconCountdown()
Gets the current beacon countdown |
int |
getCommunicationCountdown()
Gets the current communication countdown |
KnownVehiclesList |
getKnownVehiclesList_()
|
Region |
getRegion()
Returns the region the RSU is placed in |
long |
getRSUID()
Resets this rsu so that it can be reused. |
int |
getWifiRadius()
Returns the wifi radius |
int |
getX()
Returns the x coordinate of the RSU |
int |
getY()
Returns the y coordinate of the RSU |
boolean |
isEncrypted_()
|
static boolean |
isShowEncryptedBeaconsInMix_()
|
void |
receiveMessage(int sourceX,
int sourceY,
Message message)
Receive a message from a vehicle. |
void |
sendBeacons()
Find vehicles in neighborhood and send beacons to them. |
void |
sendEncryptedBeacons()
Find vehicles in neighborhood and send beacons to them. |
void |
sendMessages()
send messages to all vehicles in reach. |
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. |
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. |
static void |
setMonitoredMixZoneVariables(int beaconMonitorMinX,
int beaconMonitorMaxX,
int beaconMonitorMinY,
int beaconMonitorMaxY)
Sets the values for the monitored beacon zone. |
void |
setRegion(Region region)
Sets the region the RSU is placed |
static void |
setRegions(Region[][] regions)
Sets the reference to all regions. |
static void |
setShowEncryptedBeaconsInMix_(boolean showEncryptedBeaconsInMix_)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static ArrayDeque<Vehicle> coloredVehicles
public static RSU lastSender
public static boolean colorCleared
| Constructor Detail |
|---|
public RSU(int x,
int y,
int radius,
boolean isEncrypted)
x - the x coordinatey - the y coordinateradius - the signal radiusisEncrypted - if message is encrypted| Method Detail |
|---|
public void sendMessages()
public void sendBeacons()
public void sendEncryptedBeacons()
public final void receiveMessage(int sourceX,
int sourceY,
Message message)
sourceX - the x coordinate of the other vehiclesourceY - the y coordinate of the other vehiclemessage - the messagepublic void cleanup(int timePerStep)
timePerStep - the actual time per steppublic long getRSUID()
public int getX()
public int getY()
public void setRegion(Region region)
region - the regionpublic Region getRegion()
public int getWifiRadius()
public int getBeaconCountdown()
public int getCommunicationCountdown()
public static void setRegions(Region[][] regions)
regions - the array with all regionspublic static void setBeaconsEnabled(boolean state)
state - true to enable beacons, else falsepublic static void setCommunicationEnabled(boolean state)
state - true to enable communication, else falsepublic static void setCommunicationInterval(int communicationInterval)
communicationInterval - the new valuepublic static void setBeaconInterval(int beaconInterval)
beaconInterval - the new valuepublic static void setBeaconMonitorZoneEnabled(boolean beaconMonitorEnabled)
beaconMonitorEnabled - true to enable monitoring mix zones, else false
public static void setMonitoredMixZoneVariables(int beaconMonitorMinX,
int beaconMonitorMaxX,
int beaconMonitorMinY,
int beaconMonitorMaxY)
setBeaconMonitorZoneEnabled(boolean) is set to true.
beaconMonitorMinX - the minimum x coordinatebeaconMonitorMaxX - the maximum x coordinatebeaconMonitorMinY - the minimum y coordinatebeaconMonitorMaxY - the maximum y coordinatepublic boolean isEncrypted_()
public KnownVehiclesList getKnownVehiclesList_()
public static boolean isShowEncryptedBeaconsInMix_()
public static void setShowEncryptedBeaconsInMix_(boolean showEncryptedBeaconsInMix_)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||