nlsr::Adjacent Class Reference

A neighbor reachable over a Face. More...

#include <adjacent.hpp>

Collaboration diagram for nlsr::Adjacent:
[legend]

Public Types

enum  Status { STATUS_UNKNOWN = -1, STATUS_INACTIVE = 0, STATUS_ACTIVE = 1 }
 

Public Member Functions

 Adjacent ()
 
 Adjacent (const ndn::Name &an)
 
 Adjacent (const ndn::Name &an, const ndn::FaceUri &faceUri, double lc, Status s, uint32_t iton, uint64_t faceId)
 
const ndn::Name & getName () const
 
void setName (const ndn::Name &an)
 
const ndn::FaceUri & getFaceUri () const
 
void setFaceUri (const ndn::FaceUri &faceUri)
 
uint64_t getLinkCost () const
 
void setLinkCost (double lc)
 
Status getStatus () const
 
void setStatus (Status s)
 
uint32_t getInterestTimedOutNo () const
 
void setInterestTimedOutNo (uint32_t iton)
 
void setFaceId (uint64_t faceId)
 
uint64_t getFaceId () const
 
bool operator== (const Adjacent &adjacent) const
 Equality is when name, Face URI, and link cost are all equal. More...
 
bool operator!= (const Adjacent &adjacent) const
 
bool operator< (const Adjacent &adjacent) const
 
bool compare (const ndn::Name &adjacencyName)
 
bool compareFaceId (const uint64_t faceId)
 
bool compareFaceUri (const ndn::FaceUri &faceUri)
 
void writeLog ()
 

Static Public Attributes

static const float DEFAULT_LINK_COST = 10.0
 

Friends

std::ostream & operator<< (std::ostream &os, const Adjacent &adjacent)
 

Detailed Description

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.

Definition at line 38 of file adjacent.hpp.

Member Enumeration Documentation

Enumerator
STATUS_UNKNOWN 
STATUS_INACTIVE 
STATUS_ACTIVE 

Definition at line 42 of file adjacent.hpp.

Constructor & Destructor Documentation

nlsr::Adjacent::Adjacent ( )

Definition at line 35 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.

Member Function Documentation

bool nlsr::Adjacent::compare ( const ndn::Name &  adjacencyName)
inline

Definition at line 143 of file adjacent.hpp.

Here is the caller graph for this function:

bool nlsr::Adjacent::compareFaceId ( const uint64_t  faceId)
inline

Definition at line 149 of file adjacent.hpp.

Here is the caller graph for this function:

bool nlsr::Adjacent::compareFaceUri ( const ndn::FaceUri &  faceUri)
inline

Definition at line 155 of file adjacent.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

uint64_t nlsr::Adjacent::getFaceId ( ) const
inline

Definition at line 124 of file adjacent.hpp.

Here is the call graph for this function:

const ndn::FaceUri& nlsr::Adjacent::getFaceUri ( ) const
inline

Definition at line 69 of file adjacent.hpp.

Here is the caller graph for this function:

uint32_t nlsr::Adjacent::getInterestTimedOutNo ( ) const
inline

Definition at line 106 of file adjacent.hpp.

uint64_t nlsr::Adjacent::getLinkCost ( ) const
inline

Definition at line 81 of file adjacent.hpp.

Here is the caller graph for this function:

const ndn::Name& nlsr::Adjacent::getName ( ) const
inline

Definition at line 57 of file adjacent.hpp.

Here is the caller graph for this function:

Status nlsr::Adjacent::getStatus ( ) const
inline

Definition at line 94 of file adjacent.hpp.

bool nlsr::Adjacent::operator!= ( const Adjacent adjacent) const
inline

Definition at line 134 of file adjacent.hpp.

Here is the call graph for this function:

bool nlsr::Adjacent::operator< ( const Adjacent adjacent) const

Definition at line 76 of file adjacent.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool nlsr::Adjacent::operator== ( const Adjacent adjacent) const

Equality is when name, Face URI, and link cost are all equal.

Definition at line 67 of file adjacent.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nlsr::Adjacent::setFaceId ( uint64_t  faceId)
inline

Definition at line 118 of file adjacent.hpp.

void nlsr::Adjacent::setFaceUri ( const ndn::FaceUri &  faceUri)
inline

Definition at line 75 of file adjacent.hpp.

void nlsr::Adjacent::setInterestTimedOutNo ( uint32_t  iton)
inline

Definition at line 112 of file adjacent.hpp.

void nlsr::Adjacent::setLinkCost ( double  lc)
inline

Definition at line 88 of file adjacent.hpp.

void nlsr::Adjacent::setName ( const ndn::Name &  an)
inline

Definition at line 63 of file adjacent.hpp.

void nlsr::Adjacent::setStatus ( Status  s)
inline

Definition at line 100 of file adjacent.hpp.

void nlsr::Adjacent::writeLog ( )

Definition at line 92 of file adjacent.cpp.

Here is the caller graph for this function:

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const Adjacent adjacent 
)
friend

Definition at line 83 of file adjacent.cpp.

Field Documentation

const float nlsr::Adjacent::DEFAULT_LINK_COST = 10.0
static

Definition at line 164 of file adjacent.hpp.