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 <NeighborCache.h>
#include "PastryTypes.h"
#include "PastryMessage_m.h"
#include "PastryRoutingTable.h"
#include "PastryLeafSet.h"
#include "PastryNeighborhoodSet.h"

Go to the source code of this file.

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)

Detailed Description

Author:
Felix Palmen, Gerhard Petruschat, Bernhard Heep

Definition in file BasePastry.h.


Define Documentation

#define DISCOVERY   JOINING_1

Function Documentation

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

Definition at line 1248 of file BasePastry.cc.

01249 {
01250     os << "PastryStateMsgProximity {" << endl;
01251     os << "  pr_rt {" << endl;
01252     for (std::vector<simtime_t>::const_iterator i = pr.pr_rt.begin();
01253          i != pr.pr_rt.end(); ++i) {
01254         os << "    " << *i << endl;
01255     }
01256     os << "  }" << endl;
01257     os << "  pr_ls {" << endl;
01258     for (std::vector<simtime_t>::const_iterator i = pr.pr_ls.begin();
01259          i != pr.pr_ls.end(); ++i) {
01260         os << "    " << *i << endl;
01261     }
01262     os << "  }" << endl;
01263     os << "  pr_ns {" << endl;
01264     for (std::vector<simtime_t>::const_iterator i = pr.pr_ns.begin();
01265          i != pr.pr_ns.end(); ++i) {
01266         os << "    " << *i << endl;
01267     }
01268     os << "  }" << endl;
01269     os << "}" << endl;
01270     return os;
01271 }

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.

Definition at line 1241 of file BasePastry.cc.

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

01243 {
01244     return (hnd1.msg->getJoinHopCount() < hnd2.msg->getJoinHopCount());
01245 }

Generated on Wed May 26 16:21:15 2010 for OverSim by  doxygen 1.6.3