39 , m_linkCost(DEFAULT_LINK_COST)
40 , m_status(STATUS_INACTIVE)
41 , m_interestTimedOutNo(0)
51 , m_interestTimedOutNo(0)
57 Status s, uint32_t iton, uint64_t faceId)
61 , m_interestTimedOutNo(iton)
75 BOOST_THROW_EXCEPTION(
ndn::tlv::Error(
"Neighbor's link-cost cannot be negative"));
84 return (m_name == adjacent.
getName()) &&
87 std::numeric_limits<double>::epsilon());
94 return std::tie(m_name, m_linkCost) <
95 std::tie(adjacent.
getName(), linkCost);
101 os <<
"Adjacent: " << adjacent.m_name <<
"\n Connecting FaceUri: " << adjacent.m_faceUri
102 <<
"\n Link cost: " << adjacent.m_linkCost <<
"\n Status: " << adjacent.m_status
103 <<
"\n Interest Timed Out: " << adjacent.m_interestTimedOutNo << std::endl;
const ndn::FaceUri & getFaceUri() const
const ndn::Name & getName() const
friend std::ostream & operator<<(std::ostream &os, const Adjacent &adjacent)
static const double DEFAULT_LINK_COST
static const double NON_ADJACENT_COST
Copyright (c) 2014-2018, The University of Memphis, Regents of the University of California.
#define INIT_LOGGER(name)
bool operator<(const Adjacent &adjacent) const
double getLinkCost() const
A neighbor reachable over a Face.
#define NLSR_LOG_ERROR(x)
Copyright (c) 2014-2019, The University of Memphis, Regents of the University of California, Arizona Board of Regents.
bool operator==(const Adjacent &adjacent) const
Equality is when name, Face URI, and link cost are all equal.
void setLinkCost(double lc)