nlsr::AdjacencyList Class Reference

#include <adjacency-list.hpp>

Public Types

typedef std::list< Adjacent >::const_iterator const_iterator
 
typedef std::list< Adjacent >::iterator iterator
 

Public Member Functions

const_iterator begin () const
 
const_iterator end () const
 
AdjacencyList::iterator findAdjacent (const ndn::Name &adjName)
 
AdjacencyList::iterator findAdjacent (uint64_t faceId)
 
AdjacencyList::iterator findAdjacent (const ndn::FaceUri &faceUri)
 
template<typename T = float>
void findAdjacent (const std::string &faceUri)
 Hack to stop developers from using this function. More...
 
Adjacent getAdjacent (const ndn::Name &adjName)
 
std::list< Adjacent > & getAdjList ()
 
const std::list< Adjacent > & getAdjList () const
 
uint64_t getFaceId (const ndn::FaceUri &faceUri)
 
int32_t getNumOfActiveNeighbor () const
 
Adjacent::Status getStatusOfNeighbor (const ndn::Name &neighbor) const
 
int32_t getTimedOutInterestCount (const ndn::Name &neighbor) const
 
void incrementTimedOutInterestCount (const ndn::Name &neighbor)
 
bool insert (Adjacent &adjacent)
 
bool isAdjLsaBuildable (const uint32_t interestRetryNo) const
 Determines whether this list can be used to build an adj. LSA. More...
 
bool isNeighbor (const ndn::Name &adjName) const
 
bool operator== (const AdjacencyList &adl) const
 
void reset ()
 
void setStatusOfNeighbor (const ndn::Name &neighbor, Adjacent::Status status)
 
void setTimedOutInterestCount (const ndn::Name &neighbor, uint32_t count)
 
size_t size () const
 
void writeLog ()
 

Detailed Description

Definition at line 33 of file adjacency-list.hpp.

Member Typedef Documentation

◆ const_iterator

Definition at line 36 of file adjacency-list.hpp.

◆ iterator

Definition at line 37 of file adjacency-list.hpp.

Member Function Documentation

◆ begin()

const_iterator nlsr::AdjacencyList::begin ( ) const
inline

Definition at line 135 of file adjacency-list.hpp.

+ Here is the caller graph for this function:

◆ end()

const_iterator nlsr::AdjacencyList::end ( ) const
inline

Definition at line 141 of file adjacency-list.hpp.

+ Here is the caller graph for this function:

◆ findAdjacent() [1/4]

AdjacencyList::iterator nlsr::AdjacencyList::findAdjacent ( const ndn::Name &  adjName)

Definition at line 197 of file adjacency-list.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ findAdjacent() [2/4]

AdjacencyList::iterator nlsr::AdjacencyList::findAdjacent ( uint64_t  faceId)

Definition at line 206 of file adjacency-list.cpp.

+ Here is the call graph for this function:

◆ findAdjacent() [3/4]

AdjacencyList::iterator nlsr::AdjacencyList::findAdjacent ( const ndn::FaceUri &  faceUri)

Definition at line 215 of file adjacency-list.cpp.

+ Here is the call graph for this function:

◆ findAdjacent() [4/4]

template<typename T = float>
void nlsr::AdjacencyList::findAdjacent ( const std::string &  faceUri)
inline

Hack to stop developers from using this function.

It is here so that faceUri cannot be passed in as string, converted to Name and findAdjacent(Name) be used. So when faceUri is passed as string this will cause a compile error

Definition at line 121 of file adjacency-list.hpp.

+ Here is the call graph for this function:

◆ getAdjacent()

Adjacent nlsr::AdjacencyList::getAdjacent ( const ndn::Name &  adjName)

Definition at line 46 of file adjacency-list.cpp.

+ Here is the caller graph for this function:

◆ getAdjList() [1/2]

std::list< Adjacent > & nlsr::AdjacencyList::getAdjList ( )

Definition at line 134 of file adjacency-list.cpp.

+ Here is the caller graph for this function:

◆ getAdjList() [2/2]

const std::list< Adjacent > & nlsr::AdjacencyList::getAdjList ( ) const

Definition at line 140 of file adjacency-list.cpp.

◆ getFaceId()

uint64_t nlsr::AdjacencyList::getFaceId ( const ndn::FaceUri &  faceUri)

Definition at line 224 of file adjacency-list.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNumOfActiveNeighbor()

int32_t nlsr::AdjacencyList::getNumOfActiveNeighbor ( ) const

Definition at line 169 of file adjacency-list.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStatusOfNeighbor()

Adjacent::Status nlsr::AdjacencyList::getStatusOfNeighbor ( const ndn::Name &  neighbor) const

Definition at line 112 of file adjacency-list.cpp.

+ Here is the caller graph for this function:

◆ getTimedOutInterestCount()

int32_t nlsr::AdjacencyList::getTimedOutInterestCount ( const ndn::Name &  neighbor) const

Definition at line 102 of file adjacency-list.cpp.

+ Here is the caller graph for this function:

◆ incrementTimedOutInterestCount()

void nlsr::AdjacencyList::incrementTimedOutInterestCount ( const ndn::Name &  neighbor)

Definition at line 82 of file adjacency-list.cpp.

+ Here is the caller graph for this function:

◆ insert()

bool nlsr::AdjacencyList::insert ( Adjacent adjacent)

Definition at line 35 of file adjacency-list.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isAdjLsaBuildable()

bool nlsr::AdjacencyList::isAdjLsaBuildable ( const uint32_t  interestRetryNo) const

Determines whether this list can be used to build an adj. LSA.

Parameters
interestRetryNoThe maximum number of hello-interest retries to contact a neighbor.
Returns
Returns a boolean indicating whether this list can be used to build an adj. LSA.

Determines whether this adjacency list object could be used to build an adjacency LSA. An LSA is buildable when the status of all neighbors is known. A neighbor's status is known when their status is ACTIVE, or INACTIVE and some number of hello interests (specified by nlsr::ConfParameter::getInterestRetryNumber()) have failed. To be explicit, a neighbor's status is unknown if we are still sending hello interests.

Definition at line 146 of file adjacency-list.cpp.

+ Here is the caller graph for this function:

◆ isNeighbor()

bool nlsr::AdjacencyList::isNeighbor ( const ndn::Name &  adjName) const

Definition at line 71 of file adjacency-list.cpp.

+ Here is the caller graph for this function:

◆ operator==()

bool nlsr::AdjacencyList::operator== ( const AdjacencyList adl) const

Definition at line 57 of file adjacency-list.cpp.

+ Here is the call graph for this function:

◆ reset()

void nlsr::AdjacencyList::reset ( )
inline

Definition at line 100 of file adjacency-list.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setStatusOfNeighbor()

void nlsr::AdjacencyList::setStatusOfNeighbor ( const ndn::Name &  neighbor,
Adjacent::Status  status 
)

Definition at line 125 of file adjacency-list.cpp.

+ Here is the caller graph for this function:

◆ setTimedOutInterestCount()

void nlsr::AdjacencyList::setTimedOutInterestCount ( const ndn::Name &  neighbor,
uint32_t  count 
)

Definition at line 92 of file adjacency-list.cpp.

+ Here is the caller graph for this function:

◆ size()

size_t nlsr::AdjacencyList::size ( ) const
inline

Definition at line 94 of file adjacency-list.hpp.

◆ writeLog()

void nlsr::AdjacencyList::writeLog ( )

Definition at line 235 of file adjacency-list.cpp.

+ Here is the caller graph for this function: