nlsr::tlv::LsaInfo Class Reference

Data abstraction for LsaInfo. More...

#include <lsa-info.hpp>

Collaboration diagram for nlsr::tlv::LsaInfo:
[legend]

Data Structures

class  Error
 

Public Member Functions

 LsaInfo ()
 
 LsaInfo (const ndn::Block &block)
 
const ndn::Name & getOriginRouter () const
 
LsaInfosetOriginRouter (const ndn::Name &name)
 
uint64_t getSequenceNumber () const
 
LsaInfosetSequenceNumber (uint64_t sequenceNumber)
 
const ndn::time::milliseconds & getExpirationPeriod () const
 
LsaInfosetExpirationPeriod (const ndn::time::milliseconds &expirationPeriod)
 
bool hasInfiniteExpirationPeriod () const
 
template<ndn::encoding::Tag TAG>
size_t wireEncode (ndn::EncodingImpl< TAG > &block) const
 Encodes LSA 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...
 

Static Public Attributes

static const ndn::time::milliseconds INFINITE_EXPIRATION_PERIOD
 

Detailed Description

Data abstraction for LsaInfo.

LsaInfo := LSA-TYPE TLV-LENGTH OriginRouter SequenceNumber ExpirationPeriod?

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

Definition at line 47 of file lsa-info.hpp.

Constructor & Destructor Documentation

◆ LsaInfo() [1/2]

nlsr::tlv::LsaInfo::LsaInfo ( )

Definition at line 38 of file lsa-info.cpp.

Here is the caller graph for this function:

◆ LsaInfo() [2/2]

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

Definition at line 45 of file lsa-info.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ getExpirationPeriod()

const ndn::time::milliseconds& nlsr::tlv::LsaInfo::getExpirationPeriod ( ) const
inline

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

Here is the caller graph for this function:

◆ getOriginRouter()

const ndn::Name& nlsr::tlv::LsaInfo::getOriginRouter ( ) const
inline

Definition at line 66 of file lsa-info.hpp.

Here is the caller graph for this function:

◆ getSequenceNumber()

uint64_t nlsr::tlv::LsaInfo::getSequenceNumber ( ) const
inline

Definition at line 80 of file lsa-info.hpp.

Here is the caller graph for this function:

◆ hasInfiniteExpirationPeriod()

bool nlsr::tlv::LsaInfo::hasInfiniteExpirationPeriod ( ) const
inline

Definition at line 113 of file lsa-info.hpp.

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

◆ setExpirationPeriod()

LsaInfo& nlsr::tlv::LsaInfo::setExpirationPeriod ( const ndn::time::milliseconds &  expirationPeriod)
inline

Definition at line 102 of file lsa-info.hpp.

◆ setOriginRouter()

LsaInfo& nlsr::tlv::LsaInfo::setOriginRouter ( const ndn::Name &  name)
inline

Definition at line 72 of file lsa-info.hpp.

◆ setSequenceNumber()

LsaInfo& nlsr::tlv::LsaInfo::setSequenceNumber ( uint64_t  sequenceNumber)
inline

Definition at line 86 of file lsa-info.hpp.

◆ wireDecode()

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

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

Definition at line 96 of file lsa-info.cpp.

Here is the caller graph for this function:

◆ wireEncode() [1/2]

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

Encodes LSA info using the method in TAG.

This function will TLV-format 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
LsaInfo::wireEncode()

Definition at line 52 of file lsa-info.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::LsaInfo::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 LsaInfo::wireEncode(ndn::EncodingImpl<TAG>&)

Definition at line 78 of file lsa-info.cpp.

Here is the caller graph for this function:

Field Documentation

◆ INFINITE_EXPIRATION_PERIOD

const ndn::time::milliseconds nlsr::tlv::LsaInfo::INFINITE_EXPIRATION_PERIOD
static

Definition at line 93 of file lsa-info.hpp.