nlsr::tlv::AdjacencyLsa Class Reference

Data abstraction for AdjacencyLsa. More...

#include <adjacency-lsa.hpp>

Data Structures

class  Error
 

Public Types

typedef std::list< AdjacencyAdjacencyList
 
typedef AdjacencyList::const_iterator iterator
 

Public Member Functions

 AdjacencyLsa ()
 
 AdjacencyLsa (const ndn::Block &block)
 
const LsaInfogetLsaInfo () const
 
AdjacencyLsasetLsaInfo (const LsaInfo &lsaInfo)
 
bool hasAdjacencies () const
 
const std::list< Adjacency > & getAdjacencies () const
 
AdjacencyLsaaddAdjacency (const Adjacency &adjacency)
 
AdjacencyLsaclearAdjacencies ()
 
template<ndn::encoding::Tag TAG>
size_t wireEncode (ndn::EncodingImpl< TAG > &block) const
 Encodes the Adjacent objects and some info 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...
 
iterator begin () const
 
iterator end () const
 

Detailed Description

Data abstraction for AdjacencyLsa.

AdjacencyLsa := ADJACENCY-LSA-TYPE TLV-LENGTH LsaInfo Adjacency*

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

Definition at line 48 of file adjacency-lsa.hpp.

Member Typedef Documentation

◆ AdjacencyList

Definition at line 61 of file adjacency-lsa.hpp.

◆ iterator

Constructor & Destructor Documentation

◆ AdjacencyLsa() [1/2]

nlsr::tlv::AdjacencyLsa::AdjacencyLsa ( )

Definition at line 36 of file adjacency-lsa.cpp.

◆ AdjacencyLsa() [2/2]

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

Definition at line 41 of file adjacency-lsa.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ addAdjacency()

AdjacencyLsa& nlsr::tlv::AdjacencyLsa::addAdjacency ( const Adjacency adjacency)
inline

Definition at line 96 of file adjacency-lsa.hpp.

Here is the caller graph for this function:

◆ begin()

AdjacencyLsa::iterator nlsr::tlv::AdjacencyLsa::begin ( ) const
inline

Definition at line 159 of file adjacency-lsa.hpp.

Here is the caller graph for this function:

◆ clearAdjacencies()

AdjacencyLsa& nlsr::tlv::AdjacencyLsa::clearAdjacencies ( )
inline

Definition at line 105 of file adjacency-lsa.hpp.

Here is the call graph for this function:

◆ end()

AdjacencyLsa::iterator nlsr::tlv::AdjacencyLsa::end ( ) const
inline

Definition at line 165 of file adjacency-lsa.hpp.

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

◆ getAdjacencies()

const std::list<Adjacency>& nlsr::tlv::AdjacencyLsa::getAdjacencies ( ) const
inline

Definition at line 90 of file adjacency-lsa.hpp.

◆ getLsaInfo()

const LsaInfo& nlsr::tlv::AdjacencyLsa::getLsaInfo ( ) const
inline

Definition at line 70 of file adjacency-lsa.hpp.

Here is the caller graph for this function:

◆ hasAdjacencies()

bool nlsr::tlv::AdjacencyLsa::hasAdjacencies ( ) const
inline

Definition at line 84 of file adjacency-lsa.hpp.

◆ setLsaInfo()

AdjacencyLsa& nlsr::tlv::AdjacencyLsa::setLsaInfo ( const LsaInfo lsaInfo)
inline

Definition at line 76 of file adjacency-lsa.hpp.

Here is the caller graph for this function:

◆ wireDecode()

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

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

Definition at line 86 of file adjacency-lsa.cpp.

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

◆ wireEncode() [1/2]

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

Encodes the Adjacent objects and some info using the method in TAG.

This function will TLV-format the Adjacent objects and some LSA info using the implementation speciifed 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
AdjacencyLsa::wireEncode()

Definition at line 48 of file adjacency-lsa.cpp.

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

◆ wireEncode() [2/2]

const ndn::Block & nlsr::tlv::AdjacencyLsa::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 AdjacencyLsa::wireEncode(ndn::EncodingImpl<TAG>&)

Definition at line 68 of file adjacency-lsa.cpp.

Here is the caller graph for this function: