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 
)

01674 {
01675     os << "PastryStateMsgProximity {" << endl;
01676     os << "  pr_rt {" << endl;
01677     for (std::vector<simtime_t>::const_iterator i = pr.pr_rt.begin();
01678             i != pr.pr_rt.end(); ++i)
01679     {
01680         os << "    " << *i << endl;
01681     }
01682     os << "  }" << endl;
01683     os << "  pr_ls {" << endl;
01684     for (std::vector<simtime_t>::const_iterator i = pr.pr_ls.begin();
01685             i != pr.pr_ls.end(); ++i)
01686     {
01687         os << "    " << *i << endl;
01688     }
01689     os << "  }" << endl;
01690     os << "  pr_ns {" << endl;
01691     for (std::vector<simtime_t>::const_iterator i = pr.pr_ns.begin();
01692             i != pr.pr_ns.end(); ++i)
01693     {
01694         os << "    " << *i << endl;
01695     }
01696     os << "  }" << endl;
01697     os << "}" << endl;
01698     return os;
01699 }

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.

01669 {
01670     return (msg1->getJoinHopCount() < msg2->getJoinHopCount());
01671 }


Generated on Wed Sep 26 12:13:00 2007 for ITM OverSim by  doxygen 1.5.1