#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.
{ return proximity; };
| Prox::operator simtime_t | ( | ) |
Definition at line 38 of file ProxNodeHandle.cc.
{ return (proximity >= MAXTIME_DBL)
? MAXTIME : proximity; };
| bool Prox::operator!= | ( | Prox | p | ) | const |
Definition at line 47 of file ProxNodeHandle.cc.
{ return !(*this == p); }
| bool Prox::operator== | ( | Prox | p | ) | const |
| std::ostream& operator<< | ( | std::ostream & | os, | |
| const Prox & | prox | |||
| ) | [friend] |
Definition at line 76 of file ProxNodeHandle.cc.
{
if (prox == Prox::PROX_SELF) os << "[self]";
else if (prox == Prox::PROX_UNKNOWN) os << "[unknown]";
else if (prox == Prox::PROX_TIMEOUT) os << "[timeout]";
else {
os << prox.proximity;
if (prox.accuracy != 1) os << " (a=" << prox.accuracy << ")";
}
return os;
}
| 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 Kademlia::findNode(), NeighborCache::getProx(), oversim::Chord::handleRpcFixfingersResponse(), operator<<(), BasePastry::pingNodes(), and Kademlia::routingAdd().
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(), Kademlia::proxCallback(), oversim::Chord::proxCallback(), BasePastry::proxCallback(), Kademlia::routingAdd(), and NeighborCache::setNodeTimeout().
const Prox Prox::PROX_UNKNOWN [static] |
Definition at line 36 of file ProxNodeHandle.h.
Referenced by NeighborCache::calcRttError(), NeighborCache::estimateProx(), Kademlia::findNode(), NeighborCache::getCoordinateBasedProx(), VivaldiCoordsInfo::getDistance(), EuclideanNcsNodeInfo::getDistance(), NeighborCache::getNcsBasedTimeout(), NeighborCache::getProx(), oversim::Chord::handleRpcFixfingersResponse(), Bamboo::lookupFinished(), operator<<(), BasePastry::pingNodes(), ProxExtractor< T >::prox(), and Kademlia::routingAdd().
| 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(), Kademlia::proxCallback(), oversim::Chord::proxCallback(), BasePastry::proxCallback(), and KademliaBucketEntry::setRtt().
1.7.1