|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectEdge
Edge stores the specifics about each edge in the topology. Edges can be temporarily disabled and they record when the next packet can be sent along the edge
| Constructor Summary | |
Edge(int a,
int b,
EdgeOptions options)
Create a live edge between nodes a and b |
|
| Method Summary | |
int |
getNodeA()
Returns node a |
int |
getNodeB()
Returns node b |
EdgeOptions |
getOptions()
|
boolean |
isEdge(int a,
int b)
|
boolean |
isLive()
|
long |
schedulePkt(int src,
int size,
long now)
Figure out when, in microseconds, a packet will arrive at the destination, given a link's bandwidth propogation delay characteristics. |
void |
setOptions(EdgeOptions options)
Sets the options for the edge |
void |
setState(boolean state)
Sets the state of the edge, either live or not live |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Edge(int a,
int b,
EdgeOptions options)
a - Int specifying a nodeb - Int specifying a nodeoptions - The edge options. That is, the delay, the loss rate and the bandwidth| Method Detail |
public long schedulePkt(int src,
int size,
long now)
throws java.lang.IllegalArgumentException
src - The src node that wants to send the packetsize - The size of the packet in bytesnow - The current time in microseconds
java.lang.IllegalArgumentException - Thrown if size is greater than Packet.MAX_PACKET_SIZE
public boolean isEdge(int a,
int b)
a - Int specifying a nodeb - Int specifying a node
public int getNodeA()
public int getNodeB()
public void setState(boolean state)
state - The state of the edge. True means livepublic boolean isLive()
public EdgeOptions getOptions()
public void setOptions(EdgeOptions options)
options - The edge options
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||