nlsr::AdjLsa Class Reference

#include <lsa.hpp>

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

Public Types

typedef AdjacencyList::const_iterator const_iterator
 
enum  Type {
  Type::ADJACENCY, Type::COORDINATE, Type::NAME, Type::BASE,
  Type::MOCK
}
 

Public Member Functions

 AdjLsa ()
 
 AdjLsa (const ndn::Name &origR, uint32_t lsn, const ndn::time::system_clock::TimePoint &lt, uint32_t nl, AdjacencyList &adl)
 
Lsa::Type getType () const override
 
AdjacencyListgetAdl ()
 
const AdjacencyListgetAdl () const
 
void addAdjacent (Adjacent adj)
 
bool deserialize (const std::string &content) noexceptoverride
 Initializes this adj. LSA from the supplied content. More...
 
uint32_t getNoLink ()
 
bool isEqualContent (AdjLsa &alsa)
 
void addNptEntries (Nlsr &pnlsr)
 Installs this LSA's name prefixes into the NPT. More...
 
void removeNptEntries (Nlsr &pnlsr)
 
void writeLog () const override
 
const_iterator begin () const
 
const_iterator end () const
 
std::string serialize () const override
 Returns the data this adjacency LSA has. More...
 
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 (const ndn::EventId leei)
 
ndn::EventId getExpiringEventId () const
 
const ndn::Name getKey () const
 Gets the key for this LSA. More...
 

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
 
ndn::time::system_clock::TimePoint m_expirationTimePoint
 
ndn::EventId m_expiringEventId
 

Friends

std::ostream & operator<< (std::ostream &os, const AdjLsa &lsa)
 

Detailed Description

Definition at line 232 of file lsa.hpp.

Member Typedef Documentation

Member Enumeration Documentation

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

Definition at line 41 of file lsa.hpp.

Constructor & Destructor Documentation

nlsr::AdjLsa::AdjLsa ( )
inline

Definition at line 237 of file lsa.hpp.

nlsr::AdjLsa::AdjLsa ( const ndn::Name &  origR,
uint32_t  lsn,
const ndn::time::system_clock::TimePoint &  lt,
uint32_t  nl,
AdjacencyList adl 
)

Definition at line 199 of file lsa.cpp.

Here is the call graph for this function:

Member Function Documentation

void nlsr::AdjLsa::addAdjacent ( Adjacent  adj)
inline

Definition at line 264 of file lsa.hpp.

Here is the call graph for this function:

void nlsr::AdjLsa::addNptEntries ( Nlsr pnlsr)

Installs this LSA's name prefixes into the NPT.

Parameters
pnlsrThe NLSR top-level whose NPT you want to install the entries into.

Definition at line 264 of file lsa.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const_iterator nlsr::AdjLsa::begin ( ) const
inline

Definition at line 301 of file lsa.hpp.

bool nlsr::AdjLsa::deserialize ( const std::string &  content)
overridevirtualnoexcept

Initializes this adj. LSA from the supplied content.

Parameters
contentThe content that this LSA is to have, formatted according to getData().

Implements nlsr::Lsa.

Definition at line 235 of file lsa.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 56 of file lsa.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const_iterator nlsr::AdjLsa::end ( ) const
inline

Definition at line 307 of file lsa.hpp.

Here is the call graph for this function:

AdjacencyList& nlsr::AdjLsa::getAdl ( )
inline

Definition at line 252 of file lsa.hpp.

Here is the caller graph for this function:

const AdjacencyList& nlsr::AdjLsa::getAdl ( ) const
inline

Definition at line 258 of file lsa.hpp.

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

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
inlineinherited

Definition at line 88 of file lsa.hpp.

Here is the caller graph for this function:

ndn::EventId nlsr::Lsa::getExpiringEventId ( ) const
inlineinherited

Definition at line 106 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
inherited

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
inlineinherited

Definition at line 70 of file lsa.hpp.

Here is the caller graph for this function:

uint32_t nlsr::AdjLsa::getNoLink ( )
inline

Definition at line 278 of file lsa.hpp.

Here is the call graph for this function:

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

Definition at line 76 of file lsa.hpp.

Here is the caller graph for this function:

Lsa::Type nlsr::AdjLsa::getType ( ) const
inlineoverridevirtual

Reimplemented from nlsr::Lsa.

Definition at line 246 of file lsa.hpp.

bool nlsr::AdjLsa::isEqualContent ( AdjLsa alsa)

Definition at line 216 of file lsa.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nlsr::AdjLsa::removeNptEntries ( Nlsr pnlsr)

Definition at line 276 of file lsa.cpp.

Here is the call graph for this function:

std::string nlsr::AdjLsa::serialize ( ) const
overridevirtual

Returns the data this adjacency LSA has.

The format is: <original router>|adjacency|<seq. no.>|<exp. time>|<size>|<adjacency prefix 1>|<face uri 1>|<cost 1>|...|<adjacency prefix n>|<face uri n>|<cost n>|

Implements nlsr::Lsa.

Definition at line 222 of file lsa.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 94 of file lsa.hpp.

Here is the caller graph for this function:

void nlsr::Lsa::setExpiringEventId ( const ndn::EventId  leei)
inlineinherited

Definition at line 100 of file lsa.hpp.

Here is the caller graph for this function:

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

Definition at line 64 of file lsa.hpp.

Here is the caller graph for this function:

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

Definition at line 82 of file lsa.hpp.

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

Print data common to all LSA types.

Definition at line 365 of file lsa.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nlsr::AdjLsa::writeLog ( ) const
overridevirtual

Implements nlsr::Lsa.

Definition at line 284 of file lsa.cpp.

Here is the caller graph for this function:

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const AdjLsa lsa 
)
friend

Definition at line 290 of file lsa.cpp.

Field Documentation

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

Definition at line 154 of file lsa.hpp.

ndn::EventId nlsr::Lsa::m_expiringEventId
protectedinherited

Definition at line 155 of file lsa.hpp.

uint32_t nlsr::Lsa::m_lsSeqNo
protectedinherited

Definition at line 153 of file lsa.hpp.

ndn::Name nlsr::Lsa::m_origRouter
protectedinherited

Definition at line 152 of file lsa.hpp.