nlsr::ConfParameter Class Reference

A class to house all the configuration parameters for NLSR. More...

#include <conf-parameter.hpp>

Public Member Functions

 ConfParameter (ndn::Face &face, ndn::KeyChain &keyChain, const std::string &confFileName="nlsr.conf")
 
void addCertPath (const std::string &certPath)
 
void buildRouterAndSyncUserPrefix ()
 
AdjacencyListgetAdjacencyList ()
 
uint32_t getAdjLsaBuildInterval () const
 
const std::string & getConfFileName ()
 
const std::string & getConfFileNameDynamic () const
 
double getCorR () const
 
std::vector< double > getCorTheta () const
 
const ndn::time::seconds getFaceDatasetFetchInterval () const
 
uint32_t getFaceDatasetFetchTries () const
 
HyperbolicState getHyperbolicState () const
 
const std::unordered_set< std::string > & getIdCerts () const
 
uint32_t getInfoInterestInterval () const
 
uint32_t getInterestResendTime () const
 
uint32_t getInterestRetryNumber () const
 
const ndn::KeyChain & getKeyChain () const
 
const ndn::time::seconds & getLsaInterestLifetime () const
 
const ndn::Name & getLsaPrefix () const
 
uint32_t getLsaRefreshTime () const
 
uint32_t getMaxFacesPerPrefix () const
 
NamePrefixListgetNamePrefixList ()
 
const ndn::Name & getNetwork () const
 
ndn::security::ValidatorConfig & getPrefixUpdateValidator ()
 
uint32_t getRouterDeadInterval () const
 
const ndn::Name & getRouterName () const
 
const ndn::Name & getRouterPrefix () const
 
uint32_t getRoutingCalcInterval () const
 
const ndn::security::SigningInfo & getSigningInfo () const
 
const ndn::Name & getSiteName () const
 
const std::string & getStateFileDir () const
 
const ndn::time::milliseconds & getSyncInterestLifetime () const
 
const ndn::Name & getSyncPrefix () const
 
SyncProtocol getSyncProtocol () const
 
const ndn::Name & getSyncUserPrefix () const
 
ndn::security::ValidatorConfig & getValidator ()
 
std::optional< ndn::security::Certificate > initializeKey ()
 
void loadCertToValidator (const ndn::security::Certificate &cert)
 
void setAdjLsaBuildInterval (uint32_t interval)
 
void setConfFileNameDynamic (const std::string &confFileDynamic)
 
bool setCorR (double cr)
 
void setCorTheta (const std::vector< double > &ct)
 
void setFaceDatasetFetchInterval (uint32_t interval)
 
void setFaceDatasetFetchTries (uint32_t count)
 
void setHyperbolicState (HyperbolicState ihc)
 
void setInfoInterestInterval (uint32_t iii)
 
void setInterestResendTime (uint32_t irt)
 
void setInterestRetryNumber (uint32_t irn)
 
void setLsaInterestLifetime (const ndn::time::seconds &lifetime)
 
void setLsaRefreshTime (uint32_t lrt)
 
void setMaxFacesPerPrefix (uint32_t mfpp)
 
void setNetwork (const ndn::Name &networkName)
 
void setRouterDeadInterval (uint32_t rdt)
 
void setRouterName (const ndn::Name &routerName)
 
void setRoutingCalcInterval (uint32_t interval)
 
void setSiteName (const ndn::Name &siteName)
 
void setStateFileDir (const std::string &ssfd)
 
void setSyncInterestLifetime (uint32_t syncInterestLifetime)
 
void setSyncProtocol (SyncProtocol syncProtocol)
 
void writeLog ()
 Dump the current state of all attributes to the log. More...
 

Detailed Description

A class to house all the configuration parameters for NLSR.

This class is conceptually a singleton (but not mechanically) which is just a collection of attributes that serve as a separation-of-data for NLSR's configuration variables. NLSR refers to an instance of this class for all its configuration parameters. This object is typically populated by a ConfFileProcessor reading a configuration file.

See also
nlsr::ConfFileProcessor

Definition at line 129 of file conf-parameter.hpp.

Constructor & Destructor Documentation

◆ ConfParameter()

nlsr::ConfParameter::ConfParameter ( ndn::Face &  face,
ndn::KeyChain &  keyChain,
const std::string &  confFileName = "nlsr.conf" 
)

Definition at line 38 of file conf-parameter.cpp.

Member Function Documentation

◆ addCertPath()

void nlsr::ConfParameter::addCertPath ( const std::string &  certPath)
inline

Definition at line 461 of file conf-parameter.hpp.

◆ buildRouterAndSyncUserPrefix()

void nlsr::ConfParameter::buildRouterAndSyncUserPrefix ( )
inline

Definition at line 175 of file conf-parameter.hpp.

◆ getAdjacencyList()

AdjacencyList& nlsr::ConfParameter::getAdjacencyList ( )
inline

Definition at line 431 of file conf-parameter.hpp.

◆ getAdjLsaBuildInterval()

uint32_t nlsr::ConfParameter::getAdjLsaBuildInterval ( ) const
inline

Definition at line 253 of file conf-parameter.hpp.

◆ getConfFileName()

const std::string& nlsr::ConfParameter::getConfFileName ( )
inline

Definition at line 136 of file conf-parameter.hpp.

◆ getConfFileNameDynamic()

const std::string& nlsr::ConfParameter::getConfFileNameDynamic ( ) const
inline

Definition at line 413 of file conf-parameter.hpp.

◆ getCorR()

double nlsr::ConfParameter::getCorR ( ) const
inline

Definition at line 365 of file conf-parameter.hpp.

◆ getCorTheta()

std::vector<double> nlsr::ConfParameter::getCorTheta ( ) const
inline

Definition at line 377 of file conf-parameter.hpp.

◆ getFaceDatasetFetchInterval()

const ndn::time::seconds nlsr::ConfParameter::getFaceDatasetFetchInterval ( ) const
inline

Definition at line 301 of file conf-parameter.hpp.

◆ getFaceDatasetFetchTries()

uint32_t nlsr::ConfParameter::getFaceDatasetFetchTries ( ) const
inline

Definition at line 289 of file conf-parameter.hpp.

◆ getHyperbolicState()

HyperbolicState nlsr::ConfParameter::getHyperbolicState ( ) const
inline

Definition at line 349 of file conf-parameter.hpp.

◆ getIdCerts()

const std::unordered_set<std::string>& nlsr::ConfParameter::getIdCerts ( ) const
inline

Definition at line 467 of file conf-parameter.hpp.

◆ getInfoInterestInterval()

uint32_t nlsr::ConfParameter::getInfoInterestInterval ( ) const
inline

Definition at line 331 of file conf-parameter.hpp.

◆ getInterestResendTime()

uint32_t nlsr::ConfParameter::getInterestResendTime ( ) const
inline

Definition at line 325 of file conf-parameter.hpp.

◆ getInterestRetryNumber()

uint32_t nlsr::ConfParameter::getInterestRetryNumber ( ) const
inline

Definition at line 313 of file conf-parameter.hpp.

◆ getKeyChain()

const ndn::KeyChain& nlsr::ConfParameter::getKeyChain ( ) const
inline

Definition at line 473 of file conf-parameter.hpp.

◆ getLsaInterestLifetime()

const ndn::time::seconds& nlsr::ConfParameter::getLsaInterestLifetime ( ) const
inline

Definition at line 241 of file conf-parameter.hpp.

◆ getLsaPrefix()

const ndn::Name& nlsr::ConfParameter::getLsaPrefix ( ) const
inline

Definition at line 205 of file conf-parameter.hpp.

◆ getLsaRefreshTime()

uint32_t nlsr::ConfParameter::getLsaRefreshTime ( ) const
inline

Definition at line 229 of file conf-parameter.hpp.

◆ getMaxFacesPerPrefix()

uint32_t nlsr::ConfParameter::getMaxFacesPerPrefix ( ) const
inline

Definition at line 389 of file conf-parameter.hpp.

◆ getNamePrefixList()

NamePrefixList& nlsr::ConfParameter::getNamePrefixList ( )
inline

Definition at line 437 of file conf-parameter.hpp.

◆ getNetwork()

const ndn::Name& nlsr::ConfParameter::getNetwork ( ) const
inline

Definition at line 145 of file conf-parameter.hpp.

◆ getPrefixUpdateValidator()

ndn::security::ValidatorConfig& nlsr::ConfParameter::getPrefixUpdateValidator ( )
inline

Definition at line 449 of file conf-parameter.hpp.

◆ getRouterDeadInterval()

uint32_t nlsr::ConfParameter::getRouterDeadInterval ( ) const
inline

Definition at line 277 of file conf-parameter.hpp.

◆ getRouterName()

const ndn::Name& nlsr::ConfParameter::getRouterName ( ) const
inline

Definition at line 157 of file conf-parameter.hpp.

◆ getRouterPrefix()

const ndn::Name& nlsr::ConfParameter::getRouterPrefix ( ) const
inline

Definition at line 187 of file conf-parameter.hpp.

◆ getRoutingCalcInterval()

uint32_t nlsr::ConfParameter::getRoutingCalcInterval ( ) const
inline

Definition at line 265 of file conf-parameter.hpp.

◆ getSigningInfo()

const ndn::security::SigningInfo& nlsr::ConfParameter::getSigningInfo ( ) const
inline

Definition at line 455 of file conf-parameter.hpp.

◆ getSiteName()

const ndn::Name& nlsr::ConfParameter::getSiteName ( ) const
inline

Definition at line 169 of file conf-parameter.hpp.

◆ getStateFileDir()

const std::string& nlsr::ConfParameter::getStateFileDir ( ) const
inline

Definition at line 401 of file conf-parameter.hpp.

◆ getSyncInterestLifetime()

const ndn::time::milliseconds& nlsr::ConfParameter::getSyncInterestLifetime ( ) const
inline

Definition at line 425 of file conf-parameter.hpp.

◆ getSyncPrefix()

const ndn::Name& nlsr::ConfParameter::getSyncPrefix ( ) const
inline

Definition at line 199 of file conf-parameter.hpp.

◆ getSyncProtocol()

SyncProtocol nlsr::ConfParameter::getSyncProtocol ( ) const
inline

Definition at line 217 of file conf-parameter.hpp.

◆ getSyncUserPrefix()

const ndn::Name& nlsr::ConfParameter::getSyncUserPrefix ( ) const
inline

Definition at line 193 of file conf-parameter.hpp.

◆ getValidator()

ndn::security::ValidatorConfig& nlsr::ConfParameter::getValidator ( )
inline

Definition at line 443 of file conf-parameter.hpp.

◆ initializeKey()

std::optional< ndn::security::Certificate > nlsr::ConfParameter::initializeKey ( )

Definition at line 122 of file conf-parameter.cpp.

◆ loadCertToValidator()

void nlsr::ConfParameter::loadCertToValidator ( const ndn::security::Certificate &  cert)

Definition at line 114 of file conf-parameter.cpp.

◆ setAdjLsaBuildInterval()

void nlsr::ConfParameter::setAdjLsaBuildInterval ( uint32_t  interval)
inline

Definition at line 247 of file conf-parameter.hpp.

◆ setConfFileNameDynamic()

void nlsr::ConfParameter::setConfFileNameDynamic ( const std::string &  confFileDynamic)
inline

Definition at line 407 of file conf-parameter.hpp.

◆ setCorR()

bool nlsr::ConfParameter::setCorR ( double  cr)
inline

Definition at line 355 of file conf-parameter.hpp.

◆ setCorTheta()

void nlsr::ConfParameter::setCorTheta ( const std::vector< double > &  ct)
inline

Definition at line 371 of file conf-parameter.hpp.

◆ setFaceDatasetFetchInterval()

void nlsr::ConfParameter::setFaceDatasetFetchInterval ( uint32_t  interval)
inline

Definition at line 295 of file conf-parameter.hpp.

◆ setFaceDatasetFetchTries()

void nlsr::ConfParameter::setFaceDatasetFetchTries ( uint32_t  count)
inline

Definition at line 283 of file conf-parameter.hpp.

◆ setHyperbolicState()

void nlsr::ConfParameter::setHyperbolicState ( HyperbolicState  ihc)
inline

Definition at line 343 of file conf-parameter.hpp.

◆ setInfoInterestInterval()

void nlsr::ConfParameter::setInfoInterestInterval ( uint32_t  iii)
inline

Definition at line 337 of file conf-parameter.hpp.

◆ setInterestResendTime()

void nlsr::ConfParameter::setInterestResendTime ( uint32_t  irt)
inline

Definition at line 319 of file conf-parameter.hpp.

◆ setInterestRetryNumber()

void nlsr::ConfParameter::setInterestRetryNumber ( uint32_t  irn)
inline

Definition at line 307 of file conf-parameter.hpp.

◆ setLsaInterestLifetime()

void nlsr::ConfParameter::setLsaInterestLifetime ( const ndn::time::seconds &  lifetime)
inline

Definition at line 235 of file conf-parameter.hpp.

◆ setLsaRefreshTime()

void nlsr::ConfParameter::setLsaRefreshTime ( uint32_t  lrt)
inline

Definition at line 211 of file conf-parameter.hpp.

◆ setMaxFacesPerPrefix()

void nlsr::ConfParameter::setMaxFacesPerPrefix ( uint32_t  mfpp)
inline

Definition at line 383 of file conf-parameter.hpp.

◆ setNetwork()

void nlsr::ConfParameter::setNetwork ( const ndn::Name &  networkName)

Definition at line 95 of file conf-parameter.cpp.

◆ setRouterDeadInterval()

void nlsr::ConfParameter::setRouterDeadInterval ( uint32_t  rdt)
inline

Definition at line 271 of file conf-parameter.hpp.

◆ setRouterName()

void nlsr::ConfParameter::setRouterName ( const ndn::Name &  routerName)
inline

Definition at line 151 of file conf-parameter.hpp.

◆ setRoutingCalcInterval()

void nlsr::ConfParameter::setRoutingCalcInterval ( uint32_t  interval)
inline

Definition at line 259 of file conf-parameter.hpp.

◆ setSiteName()

void nlsr::ConfParameter::setSiteName ( const ndn::Name &  siteName)
inline

Definition at line 163 of file conf-parameter.hpp.

◆ setStateFileDir()

void nlsr::ConfParameter::setStateFileDir ( const std::string &  ssfd)
inline

Definition at line 395 of file conf-parameter.hpp.

◆ setSyncInterestLifetime()

void nlsr::ConfParameter::setSyncInterestLifetime ( uint32_t  syncInterestLifetime)
inline

Definition at line 419 of file conf-parameter.hpp.

◆ setSyncProtocol()

void nlsr::ConfParameter::setSyncProtocol ( SyncProtocol  syncProtocol)
inline

Definition at line 223 of file conf-parameter.hpp.

◆ writeLog()

void nlsr::ConfParameter::writeLog ( )

Dump the current state of all attributes to the log.

Definition at line 63 of file conf-parameter.cpp.