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)
 
double 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) const
 
bool compareFaceId (const uint64_t faceId) const
 
bool compareFaceUri (const ndn::FaceUri &faceUri) const
 

Static Public Attributes

static const double DEFAULT_LINK_COST = 10.0
 
static const double NON_ADJACENT_COST = -12345
 

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

◆ Status

Enumerator
STATUS_UNKNOWN 
STATUS_INACTIVE 
STATUS_ACTIVE 

Definition at line 42 of file adjacent.hpp.

Constructor & Destructor Documentation

◆ Adjacent() [1/3]

nlsr::Adjacent::Adjacent ( )

Definition at line 36 of file adjacent.cpp.

◆ Adjacent() [2/3]

nlsr::Adjacent::Adjacent ( const ndn::Name &  an)

Definition at line 46 of file adjacent.cpp.

◆ Adjacent() [3/3]

nlsr::Adjacent::Adjacent ( const ndn::Name &  an,
const ndn::FaceUri &  faceUri,
double  lc,
Status  s,
uint32_t  iton,
uint64_t  faceId 
)

Definition at line 56 of file adjacent.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ compare()

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

Definition at line 139 of file adjacent.hpp.

Here is the caller graph for this function:

◆ compareFaceId()

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

Definition at line 145 of file adjacent.hpp.

Here is the caller graph for this function:

◆ compareFaceUri()

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

Definition at line 151 of file adjacent.hpp.

Here is the caller graph for this function:

◆ getFaceId()

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

Definition at line 120 of file adjacent.hpp.

Here is the call graph for this function:

◆ getFaceUri()

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

Definition at line 69 of file adjacent.hpp.

Here is the caller graph for this function:

◆ getInterestTimedOutNo()

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

Definition at line 102 of file adjacent.hpp.

◆ getLinkCost()

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

Definition at line 81 of file adjacent.hpp.

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

◆ getName()

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

Definition at line 57 of file adjacent.hpp.

Here is the caller graph for this function:

◆ getStatus()

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

Definition at line 90 of file adjacent.hpp.

◆ operator!=()

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

Definition at line 130 of file adjacent.hpp.

Here is the call graph for this function:

◆ operator<()

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

Definition at line 91 of file adjacent.cpp.

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

◆ operator==()

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

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

Definition at line 82 of file adjacent.cpp.

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

◆ setFaceId()

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

Definition at line 114 of file adjacent.hpp.

◆ setFaceUri()

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

Definition at line 75 of file adjacent.hpp.

◆ setInterestTimedOutNo()

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

Definition at line 108 of file adjacent.hpp.

◆ setLinkCost()

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

Definition at line 68 of file adjacent.cpp.

Here is the caller graph for this function:

◆ setName()

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

Definition at line 63 of file adjacent.hpp.

◆ setStatus()

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

Definition at line 96 of file adjacent.hpp.

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 99 of file adjacent.cpp.

Field Documentation

◆ DEFAULT_LINK_COST

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

Definition at line 157 of file adjacent.hpp.

◆ NON_ADJACENT_COST

const double nlsr::Adjacent::NON_ADJACENT_COST = -12345
static

Definition at line 158 of file adjacent.hpp.