nlsr::Lsdb Class Reference

#include <lsdb.hpp>

+ Collaboration diagram for nlsr::Lsdb:

Classes

struct  byName
 
struct  byType
 
struct  enum_class_hash
 
struct  ExtractOriginRouter
 
struct  name_hash
 

Public Types

using AfterLsdbModified = ndn::signal::Signal< Lsdb, std::shared_ptr< Lsa >, LsdbUpdate, std::list< ndn::Name >, std::list< ndn::Name > >
 
using LsaContainer = boost::multi_index_container< std::shared_ptr< Lsa >, bmi::indexed_by< bmi::hashed_unique< bmi::tag< byName >, bmi::composite_key< Lsa, ExtractOriginRouter, bmi::const_mem_fun< Lsa, Lsa::Type, &Lsa::getType > >, bmi::composite_key_hash< name_hash, enum_class_hash > >, bmi::hashed_non_unique< bmi::tag< byType >, bmi::const_mem_fun< Lsa, Lsa::Type, &Lsa::getType >, enum_class_hash > > >
 

Public Member Functions

 Lsdb (ndn::Face &face, ndn::KeyChain &keyChain, ConfParameter &confParam)
 
 ~Lsdb ()
 
void buildAndInstallOwnNameLsa ()
 Builds a name LSA for this router and then installs it into the LSDB. More...
 
bool doesLsaExist (const ndn::Name &router, Lsa::Type lsaType)
 Returns whether the LSDB contains some LSA. More...
 
template<typename T >
std::shared_ptr< T > findLsa (const ndn::Name &router) const
 
bool getIsBuildAdjLsaScheduled () const
 
template<typename T >
std::pair< LsaContainer::index< Lsdb::byType >::type::iterator, LsaContainer::index< Lsdb::byType >::type::iterator > getLsdbIterator () const
 
SyncLogicHandlergetSync ()
 
void processInterest (const ndn::Name &name, const ndn::Interest &interest)
 
void scheduleAdjLsaBuild ()
 Schedules a build of this router's LSA. More...
 
void writeLog () const
 

Public Attributes

ndn::signal::Signal< Lsdb, ndn::Data > afterSegmentValidatedSignal
 
ndn::signal::Signal< Lsdb, Statistics::PacketTypelsaIncrementSignal
 
AfterLsdbModified onLsdbModified
 

Detailed Description

Definition at line 59 of file lsdb.hpp.

Member Typedef Documentation

◆ AfterLsdbModified

using nlsr::Lsdb::AfterLsdbModified = ndn::signal::Signal<Lsdb, std::shared_ptr<Lsa>, LsdbUpdate, std::list<ndn::Name>, std::list<ndn::Name> >

Definition at line 337 of file lsdb.hpp.

◆ LsaContainer

using nlsr::Lsdb::LsaContainer = boost::multi_index_container< std::shared_ptr<Lsa>, bmi::indexed_by< bmi::hashed_unique< bmi::tag<byName>, bmi::composite_key< Lsa, ExtractOriginRouter, bmi::const_mem_fun<Lsa, Lsa::Type, &Lsa::getType> >, bmi::composite_key_hash<name_hash, enum_class_hash> >, bmi::hashed_non_unique< bmi::tag<byType>, bmi::const_mem_fun<Lsa, Lsa::Type, &Lsa::getType>, enum_class_hash > > >

Definition at line 150 of file lsdb.hpp.

Constructor & Destructor Documentation

◆ Lsdb()

nlsr::Lsdb::Lsdb ( ndn::Face &  face,
ndn::KeyChain &  keyChain,
ConfParameter confParam 
)

Definition at line 34 of file lsdb.cpp.

◆ ~Lsdb()

nlsr::Lsdb::~Lsdb ( )

Definition at line 85 of file lsdb.cpp.

Member Function Documentation

◆ buildAndInstallOwnNameLsa()

void nlsr::Lsdb::buildAndInstallOwnNameLsa ( )

Builds a name LSA for this router and then installs it into the LSDB.

Definition at line 93 of file lsdb.cpp.

◆ doesLsaExist()

bool nlsr::Lsdb::doesLsaExist ( const ndn::Name &  router,
Lsa::Type  lsaType 
)
inline

Returns whether the LSDB contains some LSA.

Definition at line 69 of file lsdb.hpp.

◆ findLsa()

template<typename T >
std::shared_ptr<T> nlsr::Lsdb::findLsa ( const ndn::Name &  router) const
inline

Definition at line 116 of file lsdb.hpp.

◆ getIsBuildAdjLsaScheduled()

bool nlsr::Lsdb::getIsBuildAdjLsaScheduled ( ) const
inline

Definition at line 103 of file lsdb.hpp.

◆ getLsdbIterator()

template<typename T >
std::pair<LsaContainer::index<Lsdb::byType>::type::iterator, LsaContainer::index<Lsdb::byType>::type::iterator> nlsr::Lsdb::getLsdbIterator ( ) const
inline

Definition at line 173 of file lsdb.hpp.

◆ getSync()

SyncLogicHandler& nlsr::Lsdb::getSync ( )
inline

Definition at line 109 of file lsdb.hpp.

◆ processInterest()

void nlsr::Lsdb::processInterest ( const ndn::Name &  name,
const ndn::Interest &  interest 
)

Definition at line 162 of file lsdb.cpp.

◆ scheduleAdjLsaBuild()

void nlsr::Lsdb::scheduleAdjLsaBuild ( )

Schedules a build of this router's LSA.

Definition at line 122 of file lsdb.cpp.

◆ writeLog()

void nlsr::Lsdb::writeLog ( ) const

Definition at line 143 of file lsdb.cpp.

Member Data Documentation

◆ afterSegmentValidatedSignal

ndn::signal::Signal<Lsdb, ndn::Data> nlsr::Lsdb::afterSegmentValidatedSignal

Definition at line 336 of file lsdb.hpp.

◆ lsaIncrementSignal

ndn::signal::Signal<Lsdb, Statistics::PacketType> nlsr::Lsdb::lsaIncrementSignal

Definition at line 335 of file lsdb.hpp.

◆ onLsdbModified

AfterLsdbModified nlsr::Lsdb::onLsdbModified

Definition at line 339 of file lsdb.hpp.