nlsr::Lsa Class Referenceabstract

#include <lsa.hpp>

Inheritance diagram for nlsr::Lsa:
[legend]
Collaboration diagram for nlsr::Lsa:
[legend]

Public Types

enum  Type {
  Type::ADJACENCY, Type::COORDINATE, Type::NAME, Type::BASE,
  Type::MOCK
}
 

Public Member Functions

virtual ~Lsa ()=default
 
virtual Type getType () const
 
void setLsSeqNo (uint32_t lsn)
 
uint32_t getLsSeqNo () const
 
const ndn::Name & getOrigRouter () const
 
void setOrigRouter (const ndn::Name &org)
 
const ndn::time::system_clock::TimePoint & getExpirationTimePoint () const
 
void setExpirationTimePoint (const ndn::time::system_clock::TimePoint &lt)
 
void setExpiringEventId (ndn::scheduler::EventId eid)
 
ndn::scheduler::EventId getExpiringEventId () const
 
virtual std::string serialize () const =0
 Return the data that this LSA represents. More...
 
const ndn::Name getKey () const
 Gets the key for this LSA. More...
 
virtual bool deserialize (const std::string &content) noexcept=0
 Populate this LSA with content from the string "content". More...
 
virtual void writeLog () const =0
 

Protected Member Functions

std::string getData () const
 
std::string toString () const
 
bool deserializeCommon (boost::tokenizer< boost::char_separator< char >>::iterator &iterator)
 

Protected Attributes

ndn::Name m_origRouter
 
uint32_t m_lsSeqNo = 0
 
ndn::time::system_clock::TimePoint m_expirationTimePoint
 
ndn::scheduler::EventId m_expiringEventId
 

Detailed Description

Definition at line 35 of file lsa.hpp.

Member Enumeration Documentation

enum nlsr::Lsa::Type
strong
Enumerator
ADJACENCY 
COORDINATE 
NAME 
BASE 
MOCK 

Definition at line 38 of file lsa.hpp.

Constructor & Destructor Documentation

virtual nlsr::Lsa::~Lsa ( )
virtualdefault

Member Function Documentation

virtual bool nlsr::Lsa::deserialize ( const std::string &  content)
pure virtualnoexcept

Populate this LSA with content from the string "content".

Parameters
contentThe string containing a valid serialization of LSA content.

This method populates "this" LSA with data from the string.

Implemented in nlsr::CoordinateLsa, nlsr::AdjLsa, and nlsr::NameLsa.

Here is the caller graph for this function:

bool nlsr::Lsa::deserializeCommon ( boost::tokenizer< boost::char_separator< char >>::iterator &  iterator)
protected

Definition at line 56 of file lsa.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string nlsr::Lsa::getData ( ) const
protected

Get data common to all LSA types.

This method should be called by all LSA classes in their serialize() method.

Definition at line 41 of file lsa.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const ndn::time::system_clock::TimePoint& nlsr::Lsa::getExpirationTimePoint ( ) const
inline

Definition at line 80 of file lsa.hpp.

Here is the caller graph for this function:

ndn::scheduler::EventId nlsr::Lsa::getExpiringEventId ( ) const
inline

Definition at line 98 of file lsa.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const ndn::Name nlsr::Lsa::getKey ( ) const

Gets the key for this LSA.

Format is: <router name>/<LSA type>\

Definition at line 50 of file lsa.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t nlsr::Lsa::getLsSeqNo ( ) const
inline

Definition at line 62 of file lsa.hpp.

Here is the caller graph for this function:

const ndn::Name& nlsr::Lsa::getOrigRouter ( ) const
inline

Definition at line 68 of file lsa.hpp.

Here is the caller graph for this function:

virtual Type nlsr::Lsa::getType ( ) const
inlinevirtual

Reimplemented in nlsr::CoordinateLsa, nlsr::AdjLsa, and nlsr::NameLsa.

Definition at line 50 of file lsa.hpp.

Here is the caller graph for this function:

virtual std::string nlsr::Lsa::serialize ( ) const
pure virtual

Return the data that this LSA represents.

Implemented in nlsr::CoordinateLsa, nlsr::AdjLsa, and nlsr::NameLsa.

Here is the caller graph for this function:

void nlsr::Lsa::setExpirationTimePoint ( const ndn::time::system_clock::TimePoint &  lt)
inline

Definition at line 86 of file lsa.hpp.

Here is the caller graph for this function:

void nlsr::Lsa::setExpiringEventId ( ndn::scheduler::EventId  eid)
inline

Definition at line 92 of file lsa.hpp.

Here is the caller graph for this function:

void nlsr::Lsa::setLsSeqNo ( uint32_t  lsn)
inline

Definition at line 56 of file lsa.hpp.

Here is the caller graph for this function:

void nlsr::Lsa::setOrigRouter ( const ndn::Name &  org)
inline

Definition at line 74 of file lsa.hpp.

std::string nlsr::Lsa::toString ( ) const
protected

Print data common to all LSA types.

Definition at line 350 of file lsa.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void nlsr::Lsa::writeLog ( ) const
pure virtual

Implemented in nlsr::CoordinateLsa, nlsr::AdjLsa, and nlsr::NameLsa.

Here is the caller graph for this function:

Field Documentation

ndn::time::system_clock::TimePoint nlsr::Lsa::m_expirationTimePoint
protected

Definition at line 146 of file lsa.hpp.

ndn::scheduler::EventId nlsr::Lsa::m_expiringEventId
protected

Definition at line 147 of file lsa.hpp.

uint32_t nlsr::Lsa::m_lsSeqNo = 0
protected

Definition at line 145 of file lsa.hpp.

ndn::Name nlsr::Lsa::m_origRouter
protected

Definition at line 144 of file lsa.hpp.