#include <vector>
#include <map>
#include <algorithm>
#include <omnetpp.h>
#include <IPvXAddress.h>
#include <OverlayKey.h>
#include <NodeHandle.h>
#include <BaseOverlay.h>
#include "PastryTypes.h"
#include "PastryMessage_m.h"
#include "PastryRoutingTable.h"
#include "PastryLeafSet.h"
#include "PastryNeighborhoodSet.h"
Classes | |
class | Pastry |
Pastry overlay module. More... | |
Enumerations | |
enum | { INIT, JOIN, READY } |
protocol states More... | |
Functions | |
bool | stateMsgIsSmaller (const PastryStateMessage *msg1, const PastryStateMessage *msg2) |
predicate for comparing two pointers to PastryStateMessages based on their joinHopCount. | |
std::ostream & | operator<< (std::ostream &os, const PastryStateMsgProximity pr) |
anonymous enum |
std::ostream& operator<< | ( | std::ostream & | os, | |
const PastryStateMsgProximity | pr | |||
) |
01438 { 01439 os << "PastryStateMsgProximity {" << endl; 01440 os << " pr_rt {" << endl; 01441 for (std::vector<simtime_t>::const_iterator i = pr.pr_rt.begin(); 01442 i != pr.pr_rt.end(); ++i) 01443 { 01444 os << " " << *i << endl; 01445 } 01446 os << " }" << endl; 01447 os << " pr_ls {" << endl; 01448 for (std::vector<simtime_t>::const_iterator i = pr.pr_ls.begin(); 01449 i != pr.pr_ls.end(); ++i) 01450 { 01451 os << " " << *i << endl; 01452 } 01453 os << " }" << endl; 01454 os << " pr_ns {" << endl; 01455 for (std::vector<simtime_t>::const_iterator i = pr.pr_ns.begin(); 01456 i != pr.pr_ns.end(); ++i) 01457 { 01458 os << " " << *i << endl; 01459 } 01460 os << " }" << endl; 01461 os << "}" << endl; 01462 return os; 01463 }
bool stateMsgIsSmaller | ( | const PastryStateMessage * | msg1, | |
const PastryStateMessage * | msg2 | |||
) |
predicate for comparing two pointers to PastryStateMessages based on their joinHopCount.
Needed for sorting the received PastryStateMessages.
01433 { 01434 return (msg1->getJoinHopCount() < msg2->getJoinHopCount()); 01435 }