nlsr::NextHop Class Reference

Data abstraction for Nexthop. More...

#include <nexthop.hpp>

Public Types

using Error = ndn::tlv::Error
 

Public Member Functions

 NextHop ()
 
 NextHop (const ndn::Block &block)
 
 NextHop (const std::string &cfu, double rc)
 
const std::string & getConnectingFaceUri () const
 
double getRouteCost () const
 
uint64_t getRouteCostAsAdjustedInteger () const
 
bool isHyperbolic () const
 
void setConnectingFaceUri (const std::string &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
 

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 43 of file nexthop.hpp.

Member Typedef Documentation

◆ Error

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

Definition at line 46 of file nexthop.hpp.

Constructor & Destructor Documentation

◆ NextHop() [1/3]

nlsr::NextHop::NextHop ( )
inline

Definition at line 48 of file nexthop.hpp.

◆ NextHop() [2/3]

nlsr::NextHop::NextHop ( const std::string &  cfu,
double  rc 
)
inline

Definition at line 55 of file nexthop.hpp.

◆ NextHop() [3/3]

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

Definition at line 62 of file nexthop.hpp.

Member Function Documentation

◆ getConnectingFaceUri()

const std::string& nlsr::NextHop::getConnectingFaceUri ( ) const
inline

Definition at line 68 of file nexthop.hpp.

◆ getRouteCost()

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

Definition at line 94 of file nexthop.hpp.

◆ getRouteCostAsAdjustedInteger()

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

Definition at line 80 of file nexthop.hpp.

◆ isHyperbolic()

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

Definition at line 112 of file nexthop.hpp.

◆ setConnectingFaceUri()

void nlsr::NextHop::setConnectingFaceUri ( const std::string &  cfu)
inline

Definition at line 74 of file nexthop.hpp.

◆ setHyperbolic()

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

Definition at line 106 of file nexthop.hpp.

◆ setRouteCost()

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

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