nlsr::Lsa Class Referenceabstract

Data abstraction for Lsa Lsa := LSA-TYPE TLV-LENGTH Name SequenceNumber ExpirationTimePoint. More...

#include <lsa.hpp>

+ Inheritance diagram for nlsr::Lsa:
+ Collaboration diagram for nlsr::Lsa:

Classes

class  Error
 

Public Types

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

Public Member Functions

virtual ~Lsa ()=default
 
const ndn::time::system_clock::TimePoint & getExpirationTimePoint () const
 
ndn::scheduler::EventId getExpiringEventId () const
 
const ndn::Name & getOriginRouter () const
 
ndn::Name getOriginRouterCopy () const
 
uint64_t getSeqNo () const
 
virtual Type getType () const =0
 
void setExpirationTimePoint (const ndn::time::system_clock::TimePoint &lt)
 
void setExpiringEventId (ndn::scheduler::EventId eid)
 
void setSeqNo (uint64_t seqNo)
 
virtual std::string toString () const
 
virtual const ndn::Block & wireEncode () const =0
 

Protected Member Functions

 Lsa (const ndn::Name &originRouter, uint64_t seqNo, ndn::time::system_clock::TimePoint expirationTimePoint)
 
 Lsa ()=default
 
void wireDecode (const ndn::Block &wire)
 
template<ndn::encoding::Tag TAG>
size_t wireEncode (ndn::EncodingImpl< TAG > &block) const
 

Protected Attributes

ndn::time::system_clock::TimePoint m_expirationTimePoint
 
ndn::scheduler::EventId m_expiringEventId
 
ndn::Name m_originRouter
 
uint64_t m_seqNo = 0
 
ndn::Block m_wire
 

Detailed Description

Data abstraction for Lsa Lsa := LSA-TYPE TLV-LENGTH Name SequenceNumber ExpirationTimePoint.

Definition at line 42 of file lsa.hpp.

Member Enumeration Documentation

◆ Type

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

Definition at line 55 of file lsa.hpp.

Constructor & Destructor Documentation

◆ Lsa() [1/2]

nlsr::Lsa::Lsa ( const ndn::Name &  originRouter,
uint64_t  seqNo,
ndn::time::system_clock::TimePoint  expirationTimePoint 
)
protected

Definition at line 30 of file lsa.cpp.

◆ Lsa() [2/2]

nlsr::Lsa::Lsa ( )
protecteddefault

◆ ~Lsa()

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

Member Function Documentation

◆ getExpirationTimePoint()

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

Definition at line 101 of file lsa.hpp.

+ Here is the caller graph for this function:

◆ getExpiringEventId()

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

Definition at line 120 of file lsa.hpp.

+ Here is the call graph for this function:

◆ getOriginRouter()

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

Definition at line 89 of file lsa.hpp.

+ Here is the caller graph for this function:

◆ getOriginRouterCopy()

ndn::Name nlsr::Lsa::getOriginRouterCopy ( ) const
inline

Definition at line 95 of file lsa.hpp.

◆ getSeqNo()

uint64_t nlsr::Lsa::getSeqNo ( ) const
inline

Definition at line 83 of file lsa.hpp.

+ Here is the caller graph for this function:

◆ getType()

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

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

+ Here is the caller graph for this function:

◆ setExpirationTimePoint()

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

Definition at line 107 of file lsa.hpp.

◆ setExpiringEventId()

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

Definition at line 114 of file lsa.hpp.

◆ setSeqNo()

void nlsr::Lsa::setSeqNo ( uint64_t  seqNo)
inline

Definition at line 76 of file lsa.hpp.

◆ toString()

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

Get data common to all LSA types.

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

Definition at line 141 of file lsa.cpp.

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

◆ wireDecode()

void nlsr::Lsa::wireDecode ( const ndn::Block &  wire)
protected

Definition at line 62 of file lsa.cpp.

+ Here is the caller graph for this function:

◆ wireEncode() [1/2]

virtual const ndn::Block& nlsr::Lsa::wireEncode ( ) const
pure virtual

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

+ Here is the caller graph for this function:

◆ wireEncode() [2/2]

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

Definition at line 40 of file lsa.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_expirationTimePoint

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

Definition at line 144 of file lsa.hpp.

◆ m_expiringEventId

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

Definition at line 145 of file lsa.hpp.

◆ m_originRouter

ndn::Name nlsr::Lsa::m_originRouter
protected

Definition at line 142 of file lsa.hpp.

◆ m_seqNo

uint64_t nlsr::Lsa::m_seqNo = 0
protected

Definition at line 143 of file lsa.hpp.

◆ m_wire

ndn::Block nlsr::Lsa::m_wire
mutableprotected

Definition at line 147 of file lsa.hpp.