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.


Constructor Index

 o SimpleBroadcastLink(long, int, double, double, double, double, Vector)
Create a new link with the specified parameters

Method Index

 o AddNode(Node)
Add a node, maintains the list of connected nodes
 o ConnectedNodes()
Get the list of connected nodes
 o MTU()
Get the maximum number of data bytes to transmit
 o RemoveNode(Node)
Remove a node
 o TransmitPacket(LinkPacket, Node)
Transmit a packet on the link.

Constructors

 o 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

Methods

 o ConnectedNodes
 protected Enumeration ConnectedNodes()
Get the list of connected nodes

Returns:
an Enumeration of the currently connected nodes.
 o 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
 o MTU
 public int MTU()
Get the maximum number of data bytes to transmit

Returns:
the maximum transmission unit, in bytes
See Also:
MTU
 o AddNode
 public void AddNode(Node l)
Add a node, maintains the list of connected nodes

See Also:
AddNode
 o RemoveNode
 public void RemoveNode(Node l)
Remove a node

See Also:
RemoveNode

All Packages  Class Hierarchy  This Package  Previous  Next  Index