Inheritance diagram for Txc1:

Private Member Functions | |
| Module_Class_Members (Txc1, cSimpleModule, 0) | |
| virtual void | initialize () |
| virtual void | handleMessage (cMessage *msg) |
|
|
Reimplemented from cSimpleModule. 00050 {
00051 // The handleMessage() method is called whenever a message arrives
00052 // at the module. Here, we just send it to the other module, through
00053 // gate `out'. Because both `tic' and `toc' does the same, the message
00054 // will bounce between the two.
00055 send(msg, "out");
00056 }
|
|
|
Reimplemented from cModule. 00034 {
00035 // Initialize is called at the beginning of the simulation.
00036 // To bootstrap the tic-toc-tic-toc process, one of the modules needs
00037 // to send the first message. Let this be `tic'.
00038
00039 // Am I Tic or Toc?
00040 if (strcmp("tic", name()) == 0)
00041 {
00042 // create and send first message on gate "out". "tictocMsg" is an
00043 // arbitrary string which will be the name of the message object.
00044 cMessage *msg = new cMessage("tictocMsg");
00045 send(msg, "out");
00046 }
00047 }
|
|
||||||||||||||||
|
|
1.3.9.1