OverSim
MessageObserver.cc File Reference
#include <assert.h>
#include <sstream>
#include <omnetpp.h>
#include <GlobalStatisticsAccess.h>
#include "MessageObserver.h"
#include "ALMTestTracedMessage_m.h"

Go to the source code of this file.

Functions

 Define_Module (MessageObserver)
std::ostream & operator<< (std::ostream &os, MessageObserver::MulticastGroup const &mg)
std::ostream & operator<< (std::ostream &os, MessageObserver::NodeGroupPair const &ngp)

Detailed Description

Author
Dimitar Toshev

Definition in file MessageObserver.cc.

Function Documentation

Define_Module ( MessageObserver  )
std::ostream& operator<< ( std::ostream &  os,
MessageObserver::MulticastGroup const &  mg 
)

Definition at line 208 of file MessageObserver.cc.

{
return os << "Nodes: " << mg.size << "; Messages Sent: " << mg.sent
<< ", Received: " << mg.received << ", Dropped: " << (mg.sent - mg.received);
}
std::ostream& operator<< ( std::ostream &  os,
MessageObserver::NodeGroupPair const &  ngp 
)

Definition at line 213 of file MessageObserver.cc.

{
cModule* module = OPP::cSimulation::getActiveSimulation()->getModule(ngp.first);
return os << "(" << (module != NULL ? module->getFullPath() : "Deleted node")
<< ", " << ngp.second << ")";
}