Pastry.cc File Reference


Detailed Description

Author:
Felix Palmen

#include <IPAddressResolver.h>
#include <IPvXAddress.h>
#include <InterfaceTable.h>
#include <IPv4InterfaceData.h>
#include <RpcMacros.h>
#include <InitStages.h>
#include "Pastry.h"

Functions

 Define_Module (Pastry)
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)


Function Documentation

Define_Module ( Pastry   ) 

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