Pastry.h File Reference


Detailed Description

Author:
Felix Palmen

#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)


Enumeration Type Documentation

anonymous enum

protocol states

Enumerator:
INIT 
JOIN 
READY 
00048 {
00049     INIT,
00050     JOIN,
00051     READY,
00052 };


Function Documentation

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

01684 {
01685     os << "PastryStateMsgProximity {" << endl;
01686     os << "  pr_rt {" << endl;
01687     for (std::vector<simtime_t>::const_iterator i = pr.pr_rt.begin();
01688             i != pr.pr_rt.end(); ++i)
01689     {
01690         os << "    " << *i << endl;
01691     }
01692     os << "  }" << endl;
01693     os << "  pr_ls {" << endl;
01694     for (std::vector<simtime_t>::const_iterator i = pr.pr_ls.begin();
01695             i != pr.pr_ls.end(); ++i)
01696     {
01697         os << "    " << *i << endl;
01698     }
01699     os << "  }" << endl;
01700     os << "  pr_ns {" << endl;
01701     for (std::vector<simtime_t>::const_iterator i = pr.pr_ns.begin();
01702             i != pr.pr_ns.end(); ++i)
01703     {
01704         os << "    " << *i << endl;
01705     }
01706     os << "  }" << endl;
01707     os << "}" << endl;
01708     return os;
01709 }

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.

01679 {
01680     return (msg1->getJoinHopCount() < msg2->getJoinHopCount());
01681 }


Generated on Tue Jul 24 16:51:17 2007 for ITM OverSim by  doxygen 1.5.1