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

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

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

Here is the caller graph for this function:

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

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:

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:

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:

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:

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

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

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

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

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

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

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

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

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

Here is the caller graph for this function:

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 caller graph for this function:

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 82 of file lsa-info.cpp.

Here is the caller graph for this function:

Field Documentation

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

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