omnetpp.ini file. Each node will store an array that says which gate to send a message out for a specified destination node.
We use the routing tables by replacing the random gate code in the function forward_message() with the following lines:
// Gate selection from the routing table. TicTocMsg13 *ttmsg = check_and_cast<TicTocMsg13 *> (msg); int k = rt[ttmsg->getDestination()];When a message arrives at a node that is not its destination, it is forwarded via the gate specified in the routing table rather than via a random gate. Here are the files required to run this simulation: (Thanks to BrettPentland for suggesting and implementing this part of the tutorial.)
| Topic AddingASimpleRoutingTable . { Edit | Attach | Ref-By | Printable | Diffs | r1.1 | More } |
|
Revision r1.1 - 29 Sep 2005 - 00:04 GMT - AhmetSekercioglu Parents: WebHome > Tutorials |
Copyright © 1999-2003 by the contributing authors.
All material on this collaboration platform is the property of the contributing authors. Ideas, requests, problems regarding TWiki? Send feedback. |