Multicast Routing Modelling In OMNeT++
pimSM.cc
Go to the documentation of this file.
00001 
00009 #include "pimSM.h"
00010 
00011 
00012 Define_Module(pimSM);
00013 
00014 void pimSM::handleMessage(cMessage *msg)
00015 {
00016         EV << "PIMSM::handleMessage" << endl;
00017 
00018         // self message (timer)
00019         if (msg->isSelfMessage())
00020         {
00021            EV << "PIMSM::handleMessage:Timer" << endl;
00022            PIMTimer *timer = check_and_cast <PIMTimer *> (msg);
00023         }
00024         else if (dynamic_cast<PIMPacket *>(msg))
00025         {
00026            EV << "PIMSM::handleMessage: PIM-SM packet" << endl;
00027            PIMPacket *pkt = check_and_cast<PIMPacket *>(msg);
00028            EV << "Verze: " << pkt->getVersion() << ", typ: " << pkt->getType() << endl;
00029         }
00030         else
00031            EV << "PIMSM::handleMessage: Wrong message" << endl;
00032 }
00033 
00034 void pimSM::initialize(int stage)
00035 {
00036         ;
00037 }
00038