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
 
int32_t 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
 
uint32_t getSyncProtocol () const
 
const ndn::Name & getSyncUserPrefix () const
 
ndn::security::ValidatorConfig & getValidator ()
 
shared_ptr< 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 (int32_t 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 (int32_t 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 41 of file conf-parameter.cpp.

Member Function Documentation

◆ addCertPath()

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

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

+ Here is the caller graph for this function:

◆ buildRouterAndSyncUserPrefix()

void nlsr::ConfParameter::buildRouterAndSyncUserPrefix ( )
inline

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

+ Here is the caller graph for this function:

◆ getAdjacencyList()

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

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

+ Here is the caller graph for this function:

◆ getAdjLsaBuildInterval()

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

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

+ Here is the caller graph for this function:

◆ getConfFileName()

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

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

+ Here is the call graph for this function:

◆ getConfFileNameDynamic()

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

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

◆ getCorR()

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

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

+ Here is the caller graph for this function:

◆ getCorTheta()

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

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

+ Here is the caller graph for this function:

◆ getFaceDatasetFetchInterval()

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

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

+ Here is the caller graph for this function:

◆ getFaceDatasetFetchTries()

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

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

+ Here is the caller graph for this function:

◆ getHyperbolicState()

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

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

+ Here is the caller graph for this function:

◆ getIdCerts()

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

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

+ Here is the caller graph for this function:

◆ getInfoInterestInterval()

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

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

+ Here is the caller graph for this function:

◆ getInterestResendTime()

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

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

+ Here is the caller graph for this function:

◆ getInterestRetryNumber()

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

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

+ Here is the caller graph for this function:

◆ getKeyChain()

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

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

+ Here is the call graph for this function:

◆ getLsaInterestLifetime()

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

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

+ Here is the caller graph for this function:

◆ getLsaPrefix()

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

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

+ Here is the caller graph for this function:

◆ getLsaRefreshTime()

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

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

+ Here is the caller graph for this function:

◆ getMaxFacesPerPrefix()

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

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

+ Here is the caller graph for this function:

◆ getNamePrefixList()

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

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

+ Here is the caller graph for this function:

◆ getNetwork()

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

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

+ Here is the caller graph for this function:

◆ getPrefixUpdateValidator()

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

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

+ Here is the caller graph for this function:

◆ getRouterDeadInterval()

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

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

+ Here is the caller graph for this function:

◆ getRouterName()

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

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

◆ getRouterPrefix()

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

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

+ Here is the caller graph for this function:

◆ getRoutingCalcInterval()

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

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

◆ getSigningInfo()

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

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

+ Here is the caller graph for this function:

◆ getSiteName()

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

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

+ Here is the caller graph for this function:

◆ getStateFileDir()

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

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

+ Here is the caller graph for this function:

◆ getSyncInterestLifetime()

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

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

◆ getSyncPrefix()

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

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

+ Here is the caller graph for this function:

◆ getSyncProtocol()

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

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

◆ getSyncUserPrefix()

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

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

+ Here is the caller graph for this function:

◆ getValidator()

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

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

+ Here is the caller graph for this function:

◆ initializeKey()

shared_ptr< ndn::security::Certificate > nlsr::ConfParameter::initializeKey ( )

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

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

◆ loadCertToValidator()

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

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

+ Here is the caller graph for this function:

◆ setAdjLsaBuildInterval()

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

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

+ Here is the caller graph for this function:

◆ setConfFileNameDynamic()

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

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

+ Here is the caller graph for this function:

◆ setCorR()

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

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

+ Here is the caller graph for this function:

◆ setCorTheta()

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

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

+ Here is the caller graph for this function:

◆ setFaceDatasetFetchInterval()

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

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

+ Here is the caller graph for this function:

◆ setFaceDatasetFetchTries()

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

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

+ Here is the caller graph for this function:

◆ setHyperbolicState()

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

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

+ Here is the caller graph for this function:

◆ setInfoInterestInterval()

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

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

+ Here is the caller graph for this function:

◆ setInterestResendTime()

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

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

+ Here is the caller graph for this function:

◆ setInterestRetryNumber()

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

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

+ Here is the caller graph for this function:

◆ setLsaInterestLifetime()

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

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

+ Here is the caller graph for this function:

◆ setLsaRefreshTime()

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

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

+ Here is the caller graph for this function:

◆ setMaxFacesPerPrefix()

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

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

+ Here is the caller graph for this function:

◆ setNetwork()

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

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

+ Here is the caller graph for this function:

◆ setRouterDeadInterval()

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

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

+ Here is the caller graph for this function:

◆ setRouterName()

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

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

+ Here is the caller graph for this function:

◆ setRoutingCalcInterval()

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

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

+ Here is the caller graph for this function:

◆ setSiteName()

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

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

+ Here is the caller graph for this function:

◆ setStateFileDir()

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

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

+ Here is the caller graph for this function:

◆ setSyncInterestLifetime()

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

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

+ Here is the caller graph for this function:

◆ setSyncProtocol()

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

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

+ Here is the caller graph for this function:

◆ writeLog()

void nlsr::ConfParameter::writeLog ( )

Dump the current state of all attributes to the log.

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

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