nlsr::AdjacencyList Class Reference

#include <adjacency-list.hpp>

Public Types

using const_iterator = std::list< Adjacent >::const_iterator
 
using iterator = std::list< Adjacent >::iterator
 

Public Member Functions

const_iterator begin () const
 
const_iterator end () const
 
AdjacencyList::iterator findAdjacent (const ndn::FaceUri &faceUri)
 
AdjacencyList::iterator findAdjacent (const ndn::Name &adjName)
 
AdjacencyList::iterator findAdjacent (uint64_t faceId)
 
Adjacent getAdjacent (const ndn::Name &adjName) const
 
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 121 of file adjacency-list.hpp.

◆ end()

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

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

◆ findAdjacent() [1/3]

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

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

◆ findAdjacent() [2/3]

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

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

◆ findAdjacent() [3/3]

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

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

◆ getAdjacent()

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

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

◆ getAdjList() [1/2]

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

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

◆ getAdjList() [2/2]

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

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

◆ getFaceId()

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

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

◆ getNumOfActiveNeighbor()

int32_t nlsr::AdjacencyList::getNumOfActiveNeighbor ( ) const

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

◆ getStatusOfNeighbor()

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

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

◆ getTimedOutInterestCount()

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

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

◆ incrementTimedOutInterestCount()

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

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

◆ insert()

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

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

◆ 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 134 of file adjacency-list.cpp.

◆ isNeighbor()

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

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

◆ operator==()

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

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

◆ reset()

void nlsr::AdjacencyList::reset ( )
inline

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

◆ setStatusOfNeighbor()

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

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

◆ setTimedOutInterestCount()

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

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

◆ 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 206 of file adjacency-list.cpp.