A neighbor reachable over a Face. More...
#include <adjacent.hpp>
Collaboration diagram for nlsr::Adjacent:Classes | |
| class | Error |
Public Types | |
| enum | Status { STATUS_UNKNOWN = -1 , STATUS_INACTIVE = 0 , STATUS_ACTIVE = 1 } |
Public Member Functions | |
| Adjacent () | |
| Adjacent (const ndn::Block &block) | |
| Adjacent (const ndn::Name &an) | |
| Adjacent (const ndn::Name &an, const ndn::FaceUri &faceUri, double lc, Status s, uint32_t iton, uint64_t faceId) | |
| bool | compare (const ndn::Name &adjacencyName) const |
| bool | compareFaceId (const uint64_t faceId) const |
| bool | compareFaceUri (const ndn::FaceUri &faceUri) const |
| uint64_t | getFaceId () const |
| const ndn::FaceUri & | getFaceUri () const |
| uint32_t | getInterestTimedOutNo () const |
| double | getLinkCost () const |
| const ndn::Name & | getName () const |
| Status | getStatus () const |
| bool | operator!= (const Adjacent &adjacent) const |
| bool | operator< (const Adjacent &adjacent) const |
| bool | operator== (const Adjacent &adjacent) const |
| Equality is when name, Face URI, and link cost are all equal. More... | |
| void | setFaceId (uint64_t faceId) |
| void | setFaceUri (const ndn::FaceUri &faceUri) |
| void | setInterestTimedOutNo (uint32_t iton) |
| void | setLinkCost (double lc) |
| void | setName (const ndn::Name &name) |
| void | setStatus (Status s) |
| void | wireDecode (const ndn::Block &wire) |
| const ndn::Block & | wireEncode () const |
| template<ndn::encoding::Tag TAG> | |
| size_t | wireEncode (ndn::EncodingImpl< TAG > &block) const |
Static Public Attributes | |
| static constexpr double | DEFAULT_LINK_COST = 10.0 |
| static constexpr double | NON_ADJACENT_COST = -12345.0 |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Adjacent &adjacent) |
A neighbor reachable over a Face.
Represents another node that we expect to be running NLSR that we should be able to reach over a direct Face connection.
Data abstraction for Adjacent Adjacent := ADJACENCY-TYPE TLV-LENGTH Name FaceUri LinkCost AdjacencyStatus AdjacencyInterestTimedOutNo
Definition at line 46 of file adjacent.hpp.
| Enumerator | |
|---|---|
| STATUS_UNKNOWN | |
| STATUS_INACTIVE | |
| STATUS_ACTIVE | |
Definition at line 55 of file adjacent.hpp.
| nlsr::Adjacent::Adjacent | ( | ) |
Definition at line 30 of file adjacent.cpp.
| nlsr::Adjacent::Adjacent | ( | const ndn::Block & | block | ) |
Definition at line 40 of file adjacent.cpp.
| nlsr::Adjacent::Adjacent | ( | const ndn::Name & | an | ) |
Definition at line 45 of file adjacent.cpp.
| nlsr::Adjacent::Adjacent | ( | const ndn::Name & | an, |
| const ndn::FaceUri & | faceUri, | ||
| double | lc, | ||
| Status | s, | ||
| uint32_t | iton, | ||
| uint64_t | faceId | ||
| ) |
Definition at line 55 of file adjacent.cpp.
|
inline |
Definition at line 158 of file adjacent.hpp.
|
inline |
Definition at line 164 of file adjacent.hpp.
|
inline |
Definition at line 170 of file adjacent.hpp.
|
inline |
Definition at line 139 of file adjacent.hpp.
|
inline |
Definition at line 85 of file adjacent.hpp.
|
inline |
Definition at line 120 of file adjacent.hpp.
|
inline |
Definition at line 98 of file adjacent.hpp.
|
inline |
Definition at line 72 of file adjacent.hpp.
|
inline |
Definition at line 107 of file adjacent.hpp.
|
inline |
Definition at line 149 of file adjacent.hpp.
| bool nlsr::Adjacent::operator< | ( | const Adjacent & | adjacent | ) | const |
Definition at line 167 of file adjacent.cpp.
| bool nlsr::Adjacent::operator== | ( | const Adjacent & | adjacent | ) | const |
Equality is when name, Face URI, and link cost are all equal.
Definition at line 160 of file adjacent.cpp.
|
inline |
Definition at line 133 of file adjacent.hpp.
|
inline |
Definition at line 91 of file adjacent.hpp.
|
inline |
Definition at line 126 of file adjacent.hpp.
| void nlsr::Adjacent::setLinkCost | ( | double | lc | ) |
Definition at line 67 of file adjacent.cpp.
|
inline |
Definition at line 78 of file adjacent.hpp.
|
inline |
Definition at line 113 of file adjacent.hpp.
| void nlsr::Adjacent::wireDecode | ( | const ndn::Block & | wire | ) |
Definition at line 118 of file adjacent.cpp.
| const ndn::Block & nlsr::Adjacent::wireEncode | ( | ) | const |
Definition at line 100 of file adjacent.cpp.
| size_t nlsr::Adjacent::wireEncode | ( | ndn::EncodingImpl< TAG > & | block | ) | const |
Definition at line 83 of file adjacent.cpp.
|
friend |
Definition at line 175 of file adjacent.cpp.
|
staticconstexpr |
Definition at line 186 of file adjacent.hpp.
|
staticconstexpr |
Definition at line 187 of file adjacent.hpp.