|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectSim.Routing.AbstractRoutingAlgorithm
Sim.Routing.FloodingRoutingAlgorithm
public class FloodingRoutingAlgorithm
FloodingRoutingAlgorithm implements a simple routing algorithm where every user data packet is flooded to all nodes. A cache of seen packets prevents reflooding of the same packet (which prevents loops in the routing).
| Field Summary |
|---|
| Fields inherited from class Sim.Routing.AbstractRoutingAlgorithm |
|---|
myNode |
| Constructor Summary | |
|---|---|
FloodingRoutingAlgorithm()
|
|
| Method Summary | |
|---|---|
void |
arrived(HardwareFrame in)
Event when a HardwareFrame arrives destined for this Node that does not have a user Packet, or has a Packet not for this Node. |
void |
newPacket(Node dest,
Packet packet)
Event when a Node wants to send a new Packet. |
| Methods inherited from class Sim.Routing.AbstractRoutingAlgorithm |
|---|
attached, getTime, loopback, overheard, scheduleEvent, setSimulation, terminated |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FloodingRoutingAlgorithm()
| Method Detail |
|---|
public void newPacket(Node dest,
Packet packet)
newPacket in interface RoutingAlgorithmnewPacket in class AbstractRoutingAlgorithmdest - non-null Node as the destination (packet.getDest() == dest.getAddress())packet - user packet data to send, with a destination address not equal to the address for
the sending Node.public void arrived(HardwareFrame in)
arrived in interface RoutingAlgorithmarrived in class AbstractRoutingAlgorithmin - non-null HardwareFrame received
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||