nlsr::Lsdb Class Reference

#include <lsdb.hpp>

+ Collaboration diagram for nlsr::Lsdb:

Classes

struct  byName
 
struct  byType
 
struct  enum_class_hash
 
struct  name_hash
 

Public Types

using LsaContainer = boost::multi_index_container< std::shared_ptr< Lsa >, bmi::indexed_by< bmi::hashed_unique< bmi::tag< byName >, bmi::composite_key< Lsa, bmi::const_mem_fun< Lsa, ndn::Name, &Lsa::getOriginRouterCopy >, 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, NamePrefixTable &namePrefixTable, RoutingTable &routingTable)
 
 ~Lsdb ()
 
void buildAndInstallOwnCoordinateLsa ()
 Builds a cor. LSA for this router and installs it into the LSDB. More...
 
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 getIsBuildAdjLsaSheduled () 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...
 
template<typename T >
void writeLog () const
 
void writeLog () const
 

Public Attributes

ndn::util::signal::Signal< Lsdb, const ndn::Data & > afterSegmentValidatedSignal
 
ndn::util::signal::Signal< Lsdb, Statistics::PacketTypelsaIncrementSignal
 

Detailed Description

Definition at line 58 of file lsdb.hpp.

Member Typedef Documentation

◆ 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, bmi::const_mem_fun<Lsa, ndn::Name, &Lsa::getOriginRouterCopy>, 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 164 of file lsdb.hpp.

Constructor & Destructor Documentation

◆ Lsdb()

nlsr::Lsdb::Lsdb ( ndn::Face &  face,
ndn::KeyChain &  keyChain,
ConfParameter confParam,
NamePrefixTable namePrefixTable,
RoutingTable routingTable 
)

Definition at line 35 of file lsdb.cpp.

+ Here is the call graph for this function:

◆ ~Lsdb()

nlsr::Lsdb::~Lsdb ( )
inline

Definition at line 64 of file lsdb.hpp.

Member Function Documentation

◆ buildAndInstallOwnCoordinateLsa()

void nlsr::Lsdb::buildAndInstallOwnCoordinateLsa ( )

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

Definition at line 77 of file lsdb.cpp.

+ Here is the call graph for this function:

◆ buildAndInstallOwnNameLsa()

void nlsr::Lsdb::buildAndInstallOwnNameLsa ( )

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

Definition at line 65 of file lsdb.cpp.

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

◆ doesLsaExist()

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

Returns whether the LSDB contains some LSA.

Definition at line 74 of file lsdb.hpp.

+ Here is the caller graph for this function:

◆ findLsa()

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

Definition at line 123 of file lsdb.hpp.

+ Here is the caller graph for this function:

◆ getIsBuildAdjLsaSheduled()

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

Definition at line 110 of file lsdb.hpp.

+ Here is the caller graph for this function:

◆ 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 169 of file lsdb.hpp.

+ Here is the caller graph for this function:

◆ getSync()

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

Definition at line 116 of file lsdb.hpp.

◆ processInterest()

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

Definition at line 142 of file lsdb.cpp.

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

◆ scheduleAdjLsaBuild()

void nlsr::Lsdb::scheduleAdjLsaBuild ( )

Schedules a build of this router's LSA.

Definition at line 94 of file lsdb.cpp.

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

◆ writeLog() [1/2]

template<typename T >
void nlsr::Lsdb::writeLog ( ) const

Definition at line 116 of file lsdb.cpp.

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

◆ writeLog() [2/2]

void nlsr::Lsdb::writeLog ( ) const

Definition at line 134 of file lsdb.cpp.

Member Data Documentation

◆ afterSegmentValidatedSignal

ndn::util::signal::Signal<Lsdb, const ndn::Data&> nlsr::Lsdb::afterSegmentValidatedSignal

Definition at line 329 of file lsdb.hpp.

◆ lsaIncrementSignal

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

Definition at line 328 of file lsdb.hpp.