All Packages Class Hierarchy This Package Previous Next Index
Class link.SimpleBroadcastLink
java.lang.Object
|
+----timer.TimerClient
|
+----link.SimpleBroadcastLink
- public class SimpleBroadcastLink
- extends TimerClient
- implements Link
A simple broadcast link that implements a randomized
delivery model. Behavior is like ethernet in the sense
that there is no observable latency, just the transmission
time.
-
SimpleBroadcastLink(long, int, double, double, double, double, Vector)
- Create a new link with the specified parameters
-
AddNode(Node)
- Add a node, maintains the list of connected nodes
-
ConnectedNodes()
- Get the list of connected nodes
-
MTU()
- Get the maximum number of data bytes to transmit
-
RemoveNode(Node)
- Remove a node
-
TransmitPacket(LinkPacket, Node)
- Transmit a packet on the link.
SimpleBroadcastLink
public SimpleBroadcastLink(long seed,
int mtu,
double bandwidthMean,
double bandwidthSD,
double bandwidthWalk,
double dropProb,
Vector downtime)
- Create a new link with the specified parameters
- Parameters:
- seed - the seed for the random number generator
- mtu - the maximum transmission unit, in bytes
- bandwidthMean - the long-term average bandwidth, in Mb/s
- bandwidthSD - the standard deviation on the bandwidth distribution
- bandwidthWalk - is the tendency towards random walks, from 0.0 to 1.0
- dropProb - is the probability that packets are dropped
- downtime - would be the intervals during which the link is
down, but this feature isn't implemented yet
ConnectedNodes
protected Enumeration ConnectedNodes()
- Get the list of connected nodes
- Returns:
- an Enumeration of the currently connected nodes.
TransmitPacket
public void TransmitPacket(LinkPacket p,
Node n)
- Transmit a packet on the link. Samples to find the transmit time,
then waits for that time and delivers the packet to all nodes
other than the transmitting node. While one node is
transmitting all others are blocked. Fair queuing is not
attempted.
- Parameters:
- p - the packet to transmit
- n - the node sending the packet
- See Also:
- TransmitPacket
MTU
public int MTU()
- Get the maximum number of data bytes to transmit
- Returns:
- the maximum transmission unit, in bytes
- See Also:
- MTU
AddNode
public void AddNode(Node l)
- Add a node, maintains the list of connected nodes
- See Also:
- AddNode
RemoveNode
public void RemoveNode(Node l)
- Remove a node
- See Also:
- RemoveNode
All Packages Class Hierarchy This Package Previous Next Index