Txc2 Class Reference

Inheritance diagram for Txc2:
cSimpleModule cModule cComponent cDefaultList cNoncopyableOwnedObject cOwnedObject noncopyable cNamedObject cObject

List of all members.

Protected Member Functions

virtual void initialize ()
virtual void handleMessage (cMessage *msg)

Detailed Description

In this class we add some debug messages to Txc1. When you run the simulation in the OMNeT++ GUI Tkenv, the output will appear in the main text window, and you can also open separate output windows for `tic' and `toc'.


Member Function Documentation

void Txc2::handleMessage ( cMessage msg  )  [protected, virtual]

Reimplemented from cSimpleModule.

00042 {
00043     // msg->getName() is name of the msg object, here it will be "tictocMsg".
00044     EV << "Received message `" << msg->getName() << "', sending it out again\n";
00045     send(msg, "out");
00046 }

void Txc2::initialize (  )  [protected, virtual]

Reimplemented from cComponent.

00031 {
00032     if (strcmp("tic", getName()) == 0)
00033     {
00034         // The `ev' object works like `cout' in C++.
00035         EV << "Sending initial message\n";
00036         cMessage *msg = new cMessage("tictocMsg");
00037         send(msg, "out");
00038     }
00039 }


The documentation for this class was generated from the following file:
Generated on Mon Jul 14 12:57:29 2014 for Tictoc Tutorial by  doxygen 1.6.3