Class EmulatedLink

java.lang.Object
  extended by EmulatedLink

public class EmulatedLink
extends java.lang.Object

A class for physical link emulation


Constructor Summary
EmulatedLink(EdgeOptions options)
          Create an emulated physical link
 
Method Summary
 long schedulePkt(Manager manager, int size, long now)
          Figure out when, in microseconds, a packet should be physically send out to the destination, given a link's bandwidth propogation delay characteristics.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmulatedLink

public EmulatedLink(EdgeOptions options)
Create an emulated physical link

Parameters:
options - EdgeOptions Options for this link
Method Detail

schedulePkt

public long schedulePkt(Manager manager,
                        int size,
                        long now)
Figure out when, in microseconds, a packet should be physically send out to the destination, given a link's bandwidth propogation delay characteristics.

Parameters:
manager - The manager that is scheduling the packet
size - The size of the packet in bytes
now - The current time in microseconds
Returns:
The time (in microseconds) when the packet should be physically send out to the destination. Returns -1 if the packet is dropped/lost