nlsr::tlv::LsdbStatus Class Reference

Data abstraction for LsdbStatus. More...

#include <lsdb-status.hpp>

Data Structures

class  Error
 

Public Types

typedef std::list< AdjacencyLsaAdjacencyLsaList
 
typedef std::list< CoordinateLsaCoordinateLsaList
 
typedef std::list< NameLsaNameLsaList
 

Public Member Functions

 LsdbStatus ()
 
 LsdbStatus (const ndn::Block &block)
 
const std::list< AdjacencyLsa > & getAdjacencyLsas () const
 
LsdbStatusaddAdjacencyLsa (const AdjacencyLsa &adjacencyLsa)
 
LsdbStatusclearAdjacencyLsas ()
 
bool hasAdjacencyLsas ()
 
const std::list< CoordinateLsa > & getCoordinateLsas () const
 
LsdbStatusaddCoordinateLsa (const CoordinateLsa &coordinateLsa)
 
LsdbStatusclearCoordinateLsas ()
 
bool hasCoordinateLsas ()
 
const std::list< NameLsa > & getNameLsas () const
 
LsdbStatusaddNameLsa (const NameLsa &nameLsa)
 
LsdbStatusclearNameLsas ()
 
bool hasNameLsas ()
 
template<ndn::encoding::Tag TAG>
size_t wireEncode (ndn::EncodingImpl< TAG > &block) const
 Encodes the LSA objects and some info for each LSA using the method in 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 one contained in the given block. More...
 

Detailed Description

Data abstraction for LsdbStatus.

LsdbStatus := LSDB-STATUS-TYPE TLV-LENGTH AdjacencyLsa* CoordinateLsa* NameLsa*

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

Definition at line 49 of file lsdb-status.hpp.

Member Typedef Documentation

◆ AdjacencyLsaList

Definition at line 62 of file lsdb-status.hpp.

◆ CoordinateLsaList

Definition at line 63 of file lsdb-status.hpp.

◆ NameLsaList

Definition at line 64 of file lsdb-status.hpp.

Constructor & Destructor Documentation

◆ LsdbStatus() [1/2]

nlsr::tlv::LsdbStatus::LsdbStatus ( )

Definition at line 36 of file lsdb-status.cpp.

◆ LsdbStatus() [2/2]

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

Definition at line 43 of file lsdb-status.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ addAdjacencyLsa()

LsdbStatus & nlsr::tlv::LsdbStatus::addAdjacencyLsa ( const AdjacencyLsa adjacencyLsa)

Definition at line 49 of file lsdb-status.cpp.

Here is the caller graph for this function:

◆ addCoordinateLsa()

LsdbStatus & nlsr::tlv::LsdbStatus::addCoordinateLsa ( const CoordinateLsa coordinateLsa)

Definition at line 66 of file lsdb-status.cpp.

Here is the caller graph for this function:

◆ addNameLsa()

LsdbStatus & nlsr::tlv::LsdbStatus::addNameLsa ( const NameLsa nameLsa)

Definition at line 83 of file lsdb-status.cpp.

Here is the caller graph for this function:

◆ clearAdjacencyLsas()

LsdbStatus & nlsr::tlv::LsdbStatus::clearAdjacencyLsas ( )

Definition at line 58 of file lsdb-status.cpp.

Here is the caller graph for this function:

◆ clearCoordinateLsas()

LsdbStatus & nlsr::tlv::LsdbStatus::clearCoordinateLsas ( )

Definition at line 75 of file lsdb-status.cpp.

Here is the caller graph for this function:

◆ clearNameLsas()

LsdbStatus & nlsr::tlv::LsdbStatus::clearNameLsas ( )

Definition at line 92 of file lsdb-status.cpp.

Here is the caller graph for this function:

◆ getAdjacencyLsas()

const std::list<AdjacencyLsa>& nlsr::tlv::LsdbStatus::getAdjacencyLsas ( ) const
inline

Definition at line 72 of file lsdb-status.hpp.

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

◆ getCoordinateLsas()

const std::list<CoordinateLsa>& nlsr::tlv::LsdbStatus::getCoordinateLsas ( ) const
inline

Definition at line 90 of file lsdb-status.hpp.

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

◆ getNameLsas()

const std::list<NameLsa>& nlsr::tlv::LsdbStatus::getNameLsas ( ) const
inline

Definition at line 108 of file lsdb-status.hpp.

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

◆ hasAdjacencyLsas()

bool nlsr::tlv::LsdbStatus::hasAdjacencyLsas ( )
inline

Definition at line 84 of file lsdb-status.hpp.

◆ hasCoordinateLsas()

bool nlsr::tlv::LsdbStatus::hasCoordinateLsas ( )
inline

Definition at line 102 of file lsdb-status.hpp.

◆ hasNameLsas()

bool nlsr::tlv::LsdbStatus::hasNameLsas ( )
inline

Definition at line 120 of file lsdb-status.hpp.

Here is the call graph for this function:

◆ wireDecode()

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

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

Definition at line 147 of file lsdb-status.cpp.

Here is the caller graph for this function:

◆ wireEncode() [1/2]

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

Encodes the LSA objects and some info for each LSA using the method in TAG.

This function will TLV-format the LSA objects and some LSA info using the implementation specified by TAG. Usually this is called with an estimator first to guess how long the buffer needs to be, then with an encoder to do the real work. This process is automated by the other wireEncode.

See also
LsdbStatus::wireEncode()

Definition at line 101 of file lsdb-status.cpp.

Here is the call graph for this function:

◆ wireEncode() [2/2]

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

Create a TLV encoding of this object.

Create a block containing the TLV encoding of this object. That involves two steps: estimating the size that the information will take up, and then creating a buffer of that size and encoding the information into it. Both steps are accomplished by LsdbStatus::wireEncode(ndn::EncodingImpl<TAG>&)

Definition at line 129 of file lsdb-status.cpp.

Here is the caller graph for this function: