BasePastry.h File Reference

#include <vector>
#include <map>
#include <queue>
#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  BasePastry
struct  BasePastry::PingContext

Defines

#define DISCOVERY   JOINING_1

Functions

bool stateMsgIsSmaller (const PastryStateMsgHandle &hnd1, const PastryStateMsgHandle &hnd2)
 predicate for comparing two pointers to PastryStateMessages based on their joinHopCount.
std::ostream & operator<< (std::ostream &os, const PastryStateMsgProximity pr)


Define Documentation

#define DISCOVERY   JOINING_1


Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const PastryStateMsgProximity  pr 
)

01309 {
01310     os << "PastryStateMsgProximity {" << endl;
01311     os << "  pr_rt {" << endl;
01312     for (std::vector<simtime_t>::const_iterator i = pr.pr_rt.begin();
01313          i != pr.pr_rt.end(); ++i) {
01314         os << "    " << *i << endl;
01315     }
01316     os << "  }" << endl;
01317     os << "  pr_ls {" << endl;
01318     for (std::vector<simtime_t>::const_iterator i = pr.pr_ls.begin();
01319          i != pr.pr_ls.end(); ++i) {
01320         os << "    " << *i << endl;
01321     }
01322     os << "  }" << endl;
01323     os << "  pr_ns {" << endl;
01324     for (std::vector<simtime_t>::const_iterator i = pr.pr_ns.begin();
01325          i != pr.pr_ns.end(); ++i) {
01326         os << "    " << *i << endl;
01327     }
01328     os << "  }" << endl;
01329     os << "}" << endl;
01330     return os;
01331 }

bool stateMsgIsSmaller ( const PastryStateMsgHandle hnd1,
const PastryStateMsgHandle hnd2 
)

predicate for comparing two pointers to PastryStateMessages based on their joinHopCount.

Needed for sorting the received PastryStateMessages.

Referenced by Pastry::handleStateMessage(), Pastry::handleTimerEvent(), and Bamboo::handleTimerEvent().

01304 {
01305     return (hnd1.msg->getJoinHopCount() < hnd2.msg->getJoinHopCount());
01306 }


Generated on Fri Sep 19 13:05:05 2008 for ITM OverSim by  doxygen 1.5.5