Class EdgeOptions

java.lang.Object
  extended by EdgeOptions

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
 long getBT()
          Returns the buffering time
 int getBW()
          Returns the bandwidth
 long getDelay()
          Returns the delay
 double getLossRate()
          Returns the loss rate
 void setBT(long bt)
          Sets the buffering time
 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 B/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 B/s

getBT

public long getBT()
Returns the buffering time

Returns:
int

setBT

public void setBT(long bt)
Sets the buffering time

Parameters:
bt - int The new buffering time, in milliseconds