nlsr::NextHop Class Reference

Data abstraction for Nexthop. More...

#include <nexthop.hpp>

+ Inheritance diagram for nlsr::NextHop:
+ Collaboration diagram for nlsr::NextHop:

Public Types

using Error = ndn::tlv::Error
 

Public Member Functions

 NextHop ()=default
 
 NextHop (const ndn::Block &block)
 
 NextHop (const ndn::FaceUri &cfu, double rc)
 
const ndn::FaceUri & getConnectingFaceUri () const
 
double getRouteCost () const
 
uint64_t getRouteCostAsAdjustedInteger () const
 
bool isHyperbolic () const
 
void setConnectingFaceUri (const ndn::FaceUri &cfu)
 
void setHyperbolic (bool b)
 
void setRouteCost (const double rc)
 
void wireDecode (const ndn::Block &wire)
 
const ndn::Block & wireEncode () const
 
template<ndn::encoding::Tag TAG>
size_t wireEncode (ndn::EncodingImpl< TAG > &block) const
 

Friends

bool operator< (const NextHop &lhs, const NextHop &rhs)
 
bool operator== (const NextHop &lhs, const NextHop &rhs)
 

Detailed Description

Data abstraction for Nexthop.

NextHop := NEXTHOP-TYPE TLV-LENGTH Uri Cost

See also
https://redmine.named-data.net/projects/nlsr/wiki/Routing_Table_Dataset

Definition at line 46 of file nexthop.hpp.

Member Typedef Documentation

◆ Error

using nlsr::NextHop::Error = ndn::tlv::Error

Definition at line 49 of file nexthop.hpp.

Constructor & Destructor Documentation

◆ NextHop() [1/3]

nlsr::NextHop::NextHop ( )
default

◆ NextHop() [2/3]

nlsr::NextHop::NextHop ( const ndn::FaceUri &  cfu,
double  rc 
)
inline

Definition at line 53 of file nexthop.hpp.

◆ NextHop() [3/3]

nlsr::NextHop::NextHop ( const ndn::Block &  block)
inlineexplicit

Definition at line 60 of file nexthop.hpp.

Member Function Documentation

◆ getConnectingFaceUri()

const ndn::FaceUri& nlsr::NextHop::getConnectingFaceUri ( ) const
inline

Definition at line 66 of file nexthop.hpp.

◆ getRouteCost()

double nlsr::NextHop::getRouteCost ( ) const
inline

Definition at line 92 of file nexthop.hpp.

◆ getRouteCostAsAdjustedInteger()

uint64_t nlsr::NextHop::getRouteCostAsAdjustedInteger ( ) const
inline

Definition at line 78 of file nexthop.hpp.

◆ isHyperbolic()

bool nlsr::NextHop::isHyperbolic ( ) const
inline

Definition at line 110 of file nexthop.hpp.

◆ setConnectingFaceUri()

void nlsr::NextHop::setConnectingFaceUri ( const ndn::FaceUri &  cfu)
inline

Definition at line 72 of file nexthop.hpp.

◆ setHyperbolic()

void nlsr::NextHop::setHyperbolic ( bool  b)
inline

Definition at line 104 of file nexthop.hpp.

◆ setRouteCost()

void nlsr::NextHop::setRouteCost ( const double  rc)
inline

Definition at line 98 of file nexthop.hpp.

◆ wireDecode()

void nlsr::NextHop::wireDecode ( const ndn::Block &  wire)

Definition at line 64 of file nexthop.cpp.

◆ wireEncode() [1/2]

const ndn::Block & nlsr::NextHop::wireEncode ( ) const

Definition at line 46 of file nexthop.cpp.

◆ wireEncode() [2/2]

template<ndn::encoding::Tag TAG>
size_t nlsr::NextHop::wireEncode ( ndn::EncodingImpl< TAG > &  block) const

Definition at line 30 of file nexthop.cpp.

Friends And Related Function Documentation

◆ operator<

bool operator< ( const NextHop lhs,
const NextHop rhs 
)
friend

Definition at line 137 of file nexthop.hpp.

◆ operator==

bool operator== ( const NextHop lhs,
const NextHop rhs 
)
friend

Definition at line 131 of file nexthop.hpp.