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 (const 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 32 of file adjacency-list.hpp.

Member Typedef Documentation

◆ const_iterator

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

◆ iterator

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

Member Function Documentation

◆ begin()

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

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

+ Here is the caller graph for this function:

◆ end()

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

Definition at line 140 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 194 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 203 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 212 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 120 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 43 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 131 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 137 of file adjacency-list.cpp.

◆ getFaceId()

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

Definition at line 221 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 166 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 109 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 99 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 79 of file adjacency-list.cpp.

+ Here is the caller graph for this function:

◆ insert()

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

Definition at line 32 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 143 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 68 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 54 of file adjacency-list.cpp.

+ Here is the call graph for this function:

◆ reset()

void nlsr::AdjacencyList::reset ( )
inline

Definition at line 99 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 122 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 89 of file adjacency-list.cpp.

+ Here is the caller graph for this function:

◆ size()

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

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

◆ writeLog()

void nlsr::AdjacencyList::writeLog ( )

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

+ Here is the caller graph for this function: