nlsr::tlv::Adjacency Class Reference

Data abstraction for Adjacency. More...

#include <adjacency.hpp>

Data Structures

class  Error
 

Public Member Functions

 Adjacency ()
 
 Adjacency (const ndn::Block &block)
 
const ndn::Name & getName () const
 
AdjacencysetName (const ndn::Name &name)
 
const std::string & getUri () const
 
AdjacencysetUri (const std::string &uri)
 
uint64_t getCost () const
 
AdjacencysetCost (uint64_t cost)
 
template<ndn::encoding::Tag TAG>
size_t wireEncode (ndn::EncodingImpl< TAG > &block) const
 TLV-encode this object using the implementation in from TAG. More...
 
const ndn::Block & wireEncode () const
 Create a TLV encoding of this object. More...
 
void wireDecode (const ndn::Block &wire)
 Populate this object by decoding the object contained in the given block. More...
 

Detailed Description

Data abstraction for Adjacency.

Adjacency := ADJACENCY-TYPE TLV-LENGTH Name Uri Cost

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

Definition at line 44 of file adjacency.hpp.

Constructor & Destructor Documentation

◆ Adjacency() [1/2]

nlsr::tlv::Adjacency::Adjacency ( )

Definition at line 36 of file adjacency.cpp.

Here is the caller graph for this function:

◆ Adjacency() [2/2]

nlsr::tlv::Adjacency::Adjacency ( const ndn::Block &  block)
explicit

Definition at line 41 of file adjacency.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ getCost()

uint64_t nlsr::tlv::Adjacency::getCost ( ) const
inline

Definition at line 91 of file adjacency.hpp.

Here is the caller graph for this function:

◆ getName()

const ndn::Name& nlsr::tlv::Adjacency::getName ( ) const
inline

Definition at line 63 of file adjacency.hpp.

Here is the caller graph for this function:

◆ getUri()

const std::string& nlsr::tlv::Adjacency::getUri ( ) const
inline

Definition at line 77 of file adjacency.hpp.

Here is the caller graph for this function:

◆ setCost()

Adjacency& nlsr::tlv::Adjacency::setCost ( uint64_t  cost)
inline

Definition at line 97 of file adjacency.hpp.

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

◆ setName()

Adjacency& nlsr::tlv::Adjacency::setName ( const ndn::Name &  name)
inline

Definition at line 69 of file adjacency.hpp.

Here is the caller graph for this function:

◆ setUri()

Adjacency& nlsr::tlv::Adjacency::setUri ( const std::string &  uri)
inline

Definition at line 83 of file adjacency.hpp.

Here is the caller graph for this function:

◆ wireDecode()

void nlsr::tlv::Adjacency::wireDecode ( const ndn::Block &  wire)

Populate this object by decoding the object contained in the given block.

Definition at line 86 of file adjacency.cpp.

Here is the caller graph for this function:

◆ wireEncode() [1/2]

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

TLV-encode this object using the implementation in from TAG.

This method TLV-encodes this Adjacency object using the implementation given by TAG. Usually two implementations are provided: a size estimator and a real encoder, which are used in sequence to allocate the necessary block size and then encode it.

See also
Adjacency::wireEncode()

Definition at line 48 of file adjacency.cpp.

Here is the call graph for this function:

◆ wireEncode() [2/2]

const ndn::Block & nlsr::tlv::Adjacency::wireEncode ( ) const

Create a TLV encoding of this object.

This function automates the process of guessing the necessary size of a block containing this object, and then creating a block and putting the TLV encoding into it.

See also
Adjacency::wireEncode(ndn::EncodingImpl<TAG>&)

Definition at line 68 of file adjacency.cpp.

Here is the caller graph for this function: