nlsr::Map Class Reference

#include <map.hpp>

Public Member Functions

 Map ()
 
void addEntry (const ndn::Name &rtrName)
 Add a map entry to this map. More...
 
template<typename IteratorType >
void createFromAdjLsdb (IteratorType begin, IteratorType end)
 
template<typename IteratorType >
void createFromCoordinateLsdb (IteratorType begin, IteratorType end)
 
std::optional< int32_t > getMappingNoByRouterName (const ndn::Name &rName)
 
size_t getMapSize () const
 
std::optional< ndn::Name > getRouterNameByMappingNo (int32_t mn) const
 
void writeLog ()
 

Detailed Description

Definition at line 61 of file map.hpp.

Constructor & Destructor Documentation

◆ Map()

nlsr::Map::Map ( )
inline

Definition at line 64 of file map.hpp.

Member Function Documentation

◆ addEntry()

void nlsr::Map::addEntry ( const ndn::Name &  rtrName)

Add a map entry to this map.

Parameters
rtrNameThe name of the router.

Adds a router to this map. Each entry is also given an arbitrary, ascending mappingNo (mapping number).

Definition at line 33 of file map.cpp.

◆ createFromAdjLsdb()

template<typename IteratorType >
void nlsr::Map::createFromAdjLsdb ( IteratorType  begin,
IteratorType  end 
)
inline

Populates the Map with AdjacencyLsas.

Note
IteratorType must an iterator type, and begin to end must represent a valid range.

Definition at line 84 of file map.hpp.

◆ createFromCoordinateLsdb()

template<typename IteratorType >
void nlsr::Map::createFromCoordinateLsdb ( IteratorType  begin,
IteratorType  end 
)
inline

Populates the Map with CoordinateLsas.

Note
IteratorType must an iterator type, and begin to end must represent a valid range.

Definition at line 102 of file map.hpp.

◆ getMappingNoByRouterName()

std::optional< int32_t > nlsr::Map::getMappingNoByRouterName ( const ndn::Name &  rName)

Definition at line 56 of file map.cpp.

◆ getMapSize()

size_t nlsr::Map::getMapSize ( ) const
inline

Definition at line 117 of file map.hpp.

◆ getRouterNameByMappingNo()

std::optional< ndn::Name > nlsr::Map::getRouterNameByMappingNo ( int32_t  mn) const

Definition at line 48 of file map.cpp.

◆ writeLog()

void nlsr::Map::writeLog ( )

Definition at line 64 of file map.cpp.