Pastry.h File Reference


Detailed Description

Author:
Felix Palmen

#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  Pastry
 Pastry overlay module. More...

Enumerations

enum  { INIT, JOIN, READY }
 protocol states More...

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)


Enumeration Type Documentation

anonymous enum

protocol states

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


Function Documentation

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

01650 {
01651     os << "PastryStateMsgProximity {" << endl;
01652     os << "  pr_rt {" << endl;
01653     for (std::vector<simtime_t>::const_iterator i = pr.pr_rt.begin();
01654          i != pr.pr_rt.end(); ++i) {
01655         os << "    " << *i << endl;
01656     }
01657     os << "  }" << endl;
01658     os << "  pr_ls {" << endl;
01659     for (std::vector<simtime_t>::const_iterator i = pr.pr_ls.begin();
01660          i != pr.pr_ls.end(); ++i) {
01661         os << "    " << *i << endl;
01662     }
01663     os << "  }" << endl;
01664     os << "  pr_ns {" << endl;
01665     for (std::vector<simtime_t>::const_iterator i = pr.pr_ns.begin();
01666          i != pr.pr_ns.end(); ++i) {
01667         os << "    " << *i << endl;
01668     }
01669     os << "  }" << endl;
01670     os << "}" << endl;
01671     return os;
01672 }

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.

01645 {
01646     return (hnd1.msg->getJoinHopCount() < hnd2.msg->getJoinHopCount());
01647 }


Generated on Thu Apr 17 13:19:27 2008 for ITM OverSim by  doxygen 1.5.3