Class EdgeOptions

java.lang.Object
  extended byEdgeOptions

public class EdgeOptions
extends java.lang.Object

   
 Class to represent the edge options: loss rate, delay and bandwidth
 


Constructor Summary
EdgeOptions()
          Initializes loss rate to 0.
 
Method Summary
 int getBW()
          Returns the bandwidth
 long getDelay()
          Returns the delay
 double getLossRate()
          Returns the loss rate
 void setBW(int bw)
          Sets the bandwidth
 void setDelay(long delay)
          Sets the delay
 void setLossRate(double lossRate)
          Sets the loss rate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EdgeOptions

public EdgeOptions()
Initializes loss rate to 0. Lossless link by default. Initializes delay to 1 millisecond and bandwidth to 10KB/s

Method Detail

setLossRate

public void setLossRate(double lossRate)
Sets the loss rate

Parameters:
lossRate - The new loss rate

setDelay

public void setDelay(long delay)
Sets the delay

Parameters:
delay - The new delay, in milliseconds

setBW

public void setBW(int bw)
Sets the bandwidth

Parameters:
bw - The new bandwidth, in KB/s

getLossRate

public double getLossRate()
Returns the loss rate

Returns:
The loss rate

getDelay

public long getDelay()
Returns the delay

Returns:
The delay in milliseconds

getBW

public int getBW()
Returns the bandwidth

Returns:
The bandwidth in KB/s