OverSim
|
#include <MessageObserver.h>
Classes | |
struct | MulticastGroup |
Public Member Functions | |
MessageObserver () | |
~MessageObserver () | |
void | initialize () |
void | finish () |
void | handleMessage (cMessage *msg) |
void | joinedGroup (int moduleId, OverlayKey groupId) |
Adds one to node count for group. | |
void | leftGroup (int moduleId, OverlayKey groupId) |
Subtracts one from node count for group. | |
void | sentMessage (ALMTestTracedMessage *msg) |
Counts n - 1 messages pending reception, where n is the size of the group to which the message is sent. | |
void | receivedMessage (ALMTestTracedMessage *msg) |
Counts one received message for group. | |
void | nodeDead (int moduleId) |
Notifies the observer that the node doesn't exist anymore. |
Private Types | |
typedef std::pair< int, OverlayKey > | NodeGroupPair |
typedef std::pair< int, long > | NodeMessagePair |
Private Attributes | |
simtime_t | creationTime |
std::map< OverlayKey, MulticastGroup > | groups |
std::map< NodeGroupPair, simtime_t > | joinedAt |
std::map< NodeMessagePair, simtime_t > | receivedAt |
cMessage * | gcTimer |
double | gcInterval |
double | cacheMaxAge |
int | numLooped |
GlobalStatistics * | globalStatistics |
Friends | |
std::ostream & | operator<< (std::ostream &os, MessageObserver::MulticastGroup const &mg) |
std::ostream & | operator<< (std::ostream &os, MessageObserver::NodeGroupPair const &ngp) |
Definition at line 30 of file MessageObserver.h.
|
private |
Definition at line 87 of file MessageObserver.h.
|
private |
Definition at line 89 of file MessageObserver.h.
MessageObserver::MessageObserver | ( | ) |
Definition at line 31 of file MessageObserver.cc.
MessageObserver::~MessageObserver | ( | ) |
Definition at line 38 of file MessageObserver.cc.
void MessageObserver::finish | ( | ) |
Definition at line 59 of file MessageObserver.cc.
void MessageObserver::handleMessage | ( | cMessage * | msg | ) |
Definition at line 90 of file MessageObserver.cc.
void MessageObserver::initialize | ( | ) |
Definition at line 42 of file MessageObserver.cc.
void MessageObserver::joinedGroup | ( | int | moduleId, |
OverlayKey | groupId | ||
) |
Adds one to node count for group.
Definition at line 112 of file MessageObserver.cc.
Referenced by ALMTest::joinGroup().
void MessageObserver::leftGroup | ( | int | moduleId, |
OverlayKey | groupId | ||
) |
Subtracts one from node count for group.
Definition at line 120 of file MessageObserver.cc.
Referenced by ALMTest::leaveGroup().
void MessageObserver::nodeDead | ( | int | moduleId | ) |
Notifies the observer that the node doesn't exist anymore.
Definition at line 196 of file MessageObserver.cc.
Referenced by ALMTest::finishApp().
void MessageObserver::receivedMessage | ( | ALMTestTracedMessage * | msg | ) |
Counts one received message for group.
Definition at line 159 of file MessageObserver.cc.
Referenced by ALMTest::handleMCast().
void MessageObserver::sentMessage | ( | ALMTestTracedMessage * | msg | ) |
Counts n - 1 messages pending reception, where n is the size of the group to which the message is sent.
Counts n - 1 messages pending reception, where n is the size of the group.
Definition at line 138 of file MessageObserver.cc.
Referenced by ALMTest::sendDataToGroup().
|
friend |
Definition at line 208 of file MessageObserver.cc.
|
friend |
Definition at line 213 of file MessageObserver.cc.
|
private |
Definition at line 107 of file MessageObserver.h.
Referenced by handleMessage(), initialize(), and MessageObserver().
|
private |
Definition at line 85 of file MessageObserver.h.
Referenced by finish(), and initialize().
|
private |
Definition at line 104 of file MessageObserver.h.
Referenced by handleMessage(), initialize(), and MessageObserver().
|
private |
Definition at line 101 of file MessageObserver.h.
Referenced by handleMessage(), initialize(), MessageObserver(), and ~MessageObserver().
|
private |
Definition at line 112 of file MessageObserver.h.
Referenced by finish(), and initialize().
|
private |
Definition at line 92 of file MessageObserver.h.
Referenced by finish(), initialize(), joinedGroup(), leftGroup(), nodeDead(), receivedMessage(), and sentMessage().
|
private |
Definition at line 95 of file MessageObserver.h.
Referenced by initialize(), joinedGroup(), leftGroup(), nodeDead(), and receivedMessage().
|
private |
Definition at line 110 of file MessageObserver.h.
Referenced by finish(), initialize(), MessageObserver(), and receivedMessage().
|
private |
Definition at line 98 of file MessageObserver.h.
Referenced by handleMessage(), initialize(), and receivedMessage().