#include <ProxNodeHandle.h>
Public Member Functions | |
operator double () | |
operator simtime_t () | |
Prox () | |
Prox (simtime_t prox) | |
Prox (simtime_t prox, double acc) | |
Prox (double prox, double acc) | |
bool | operator== (Prox p) const |
bool | operator!= (Prox p) const |
Public Attributes | |
double | proximity |
double | accuracy |
Static Public Attributes | |
static const Prox | PROX_SELF |
static const Prox | PROX_UNKNOWN |
static const Prox | PROX_TIMEOUT |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Prox &prox) |
Definition at line 33 of file ProxNodeHandle.h.
Prox::Prox | ( | ) |
Definition at line 41 of file ProxNodeHandle.cc.
Prox::Prox | ( | simtime_t | prox | ) |
Definition at line 42 of file ProxNodeHandle.cc.
Prox::Prox | ( | simtime_t | prox, | |
double | acc | |||
) |
Definition at line 43 of file ProxNodeHandle.cc.
Prox::Prox | ( | double | prox, | |
double | acc | |||
) |
Definition at line 44 of file ProxNodeHandle.cc.
Prox::operator double | ( | ) |
Definition at line 37 of file ProxNodeHandle.cc.
00037 { return proximity; };
Prox::operator simtime_t | ( | ) |
Definition at line 38 of file ProxNodeHandle.cc.
00038 { return (proximity >= MAXTIME_DBL) 00039 ? MAXTIME : proximity; };
bool Prox::operator!= | ( | Prox | p | ) | const |
Definition at line 47 of file ProxNodeHandle.cc.
bool Prox::operator== | ( | Prox | p | ) | const |
std::ostream& operator<< | ( | std::ostream & | os, | |
const Prox & | prox | |||
) | [friend] |
Definition at line 76 of file ProxNodeHandle.cc.
00077 { 00078 if (prox == Prox::PROX_SELF) os << "[self]"; 00079 else if (prox == Prox::PROX_UNKNOWN) os << "[unknown]"; 00080 else if (prox == Prox::PROX_TIMEOUT) os << "[timeout]"; 00081 else { 00082 os << prox.proximity; 00083 if (prox.accuracy != 1) os << " (a=" << prox.accuracy << ")"; 00084 } 00085 return os; 00086 }
double Prox::accuracy |
Definition at line 41 of file ProxNodeHandle.h.
Referenced by StdProxComparator::compare(), NeighborCache::getNcsBasedTimeout(), KademliaBucketEntry::KademliaBucketEntry(), operator<<(), operator==(), and KademliaBucketEntry::setRtt().
const Prox Prox::PROX_SELF [static] |
Definition at line 35 of file ProxNodeHandle.h.
Referenced by NeighborCache::getProx(), oversim::Chord::handleRpcFixfingersResponse(), operator<<(), and BasePastry::pingNodes().
const Prox Prox::PROX_TIMEOUT [static] |
Definition at line 37 of file ProxNodeHandle.h.
Referenced by BasePastry::determineAliveTable(), NeighborCache::getNcsBasedTimeout(), NeighborCache::getProx(), oversim::Chord::handleRpcFixfingersResponse(), operator<<(), BasePastry::pingNodes(), oversim::Chord::proxCallback(), BasePastry::proxCallback(), and NeighborCache::setNodeTimeout().
const Prox Prox::PROX_UNKNOWN [static] |
Definition at line 36 of file ProxNodeHandle.h.
Referenced by NeighborCache::calcRttError(), NeighborCache::estimateProx(), NeighborCache::getCoordinateBasedProx(), VivaldiCoordsInfo::getDistance(), GnpNpsCoordsInfo::getDistance(), NeighborCache::getNcsBasedTimeout(), NeighborCache::getProx(), oversim::Chord::handleRpcFixfingersResponse(), Bamboo::lookupFinished(), operator<<(), BasePastry::pingNodes(), and ProxExtractor< T >::prox().
double Prox::proximity |
Definition at line 40 of file ProxNodeHandle.h.
Referenced by NeighborCache::calcRttError(), StdProxComparator::compare(), NeighborCache::getNcsBasedTimeout(), oversim::Chord::handleRpcFixfingersResponse(), KademliaBucketEntry::KademliaBucketEntry(), Bamboo::lookupFinished(), operator double(), operator simtime_t(), operator<<(), operator==(), BasePastry::pingNodes(), Vivaldi::processCoordinates(), oversim::Chord::proxCallback(), BasePastry::proxCallback(), and KademliaBucketEntry::setRtt().