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

 AdjacencyList ()
 
 ~AdjacencyList ()
 
int32_t insert (Adjacent &adjacent)
 Inserts an adjacency into the list. More...
 
std::list< Adjacent > & getAdjList ()
 
const std::list< Adjacent > & getAdjList () const
 
bool isNeighbor (const ndn::Name &adjName) const
 
void incrementTimedOutInterestCount (const ndn::Name &neighbor)
 
int32_t getTimedOutInterestCount (const ndn::Name &neighbor) const
 
Adjacent::Status getStatusOfNeighbor (const ndn::Name &neighbor) const
 
void setStatusOfNeighbor (const ndn::Name &neighbor, Adjacent::Status status)
 
void setTimedOutInterestCount (const ndn::Name &neighbor, uint32_t count)
 
void addAdjacents (AdjacencyList &adl)
 Copies the adjacencies in a list to this one. More...
 
bool isAdjLsaBuildable (const uint32_t interestRetryNo) const
 Determines whether this list can be used to build an adj. LSA. More...
 
int32_t getNumOfActiveNeighbor () const
 
Adjacent getAdjacent (const ndn::Name &adjName)
 
bool operator== (const AdjacencyList &adl) const
 
size_t size () const
 
void reset ()
 
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...
 
uint64_t getFaceId (const ndn::FaceUri &faceUri)
 
void writeLog ()
 
const_iterator begin () const
 
const_iterator end () const
 

Detailed Description

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

Member Typedef Documentation

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

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

Constructor & Destructor Documentation

nlsr::AdjacencyList::AdjacencyList ( )

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

nlsr::AdjacencyList::~AdjacencyList ( )

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

Member Function Documentation

void nlsr::AdjacencyList::addAdjacents ( AdjacencyList adl)

Copies the adjacencies in a list to this one.

Parameters
adlThe adjacency list, the entries of which we want to copy into this object.

Copies the entries contained in one list into this object.

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

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

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

Here is the caller graph for this function:

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

Here is the call graph for this function:

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

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

Here is the call graph for this function:

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 146 of file adjacency-list.hpp.

Here is the call graph for this function:

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

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

Here is the caller graph for this function:

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

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

Here is the caller graph for this function:

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

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

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

int32_t nlsr::AdjacencyList::getNumOfActiveNeighbor ( ) const

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

Here is the caller graph for this function:

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

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

Here is the caller graph for this function:

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

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

Here is the caller graph for this function:

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

Inserts an adjacency into the list.

Parameters
adjacentThe adjacency that we want to add to this list.
Return values
0Indicates success.
1Indicates failure.

This function attempts to insert the supplied adjacency into this object, which is an adjacency list.

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

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

Here is the caller graph for this function:

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

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

Here is the call graph for this function:

void nlsr::AdjacencyList::reset ( )
inline

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

Here is the caller graph for this function:

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

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

Here is the caller graph for this function:

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

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

void nlsr::AdjacencyList::writeLog ( )

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

Here is the caller graph for this function: