nlsr::NlsrRunner Class Reference

A wrapper class to instantiate and configure an NLSR object. More...

#include <nlsr-runner.hpp>

Data Structures

class  Error
 

Public Member Functions

 NlsrRunner (std::string &configFileName, bool isDaemonProcess)
 
void run ()
 Instantiate, configure, and start the NLSR process. More...
 

Static Public Member Functions

static void printUsage (const std::string &programName)
 

Detailed Description

A wrapper class to instantiate and configure an NLSR object.

As its name suggests, this class is responsible for running NLSR. It creates an nlsr::ConfFileProcessor to read a configuration file and uses that to configure and then start an NLSR process. It also initializes loggers and optionally daemonizes the NLSR process. This class only exists to provide this functionality, and there is no special reliance of NLSR on this class.

Definition at line 44 of file nlsr-runner.hpp.

Constructor & Destructor Documentation

nlsr::NlsrRunner::NlsrRunner ( std::string &  configFileName,
bool  isDaemonProcess 
)

Definition at line 31 of file nlsr-runner.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Function Documentation

void nlsr::NlsrRunner::printUsage ( const std::string &  programName)
static

Definition at line 85 of file nlsr-runner.cpp.

Here is the caller graph for this function:

void nlsr::NlsrRunner::run ( )

Instantiate, configure, and start the NLSR process.

Each NlsrRunner is uniquely paired to the Face it's instantiated with. This is not a factory-type class, but a one-to-one relationship. If one wants to create multiple NLSR classes, multiple NLSR runners need to be created, too.

Exceptions
ErrorIf the configuration file cannot be processed. NLSR is not started.
See also
Nlsr::canonizeNeighborUris

Because URI canonization needs to occur before initialization, we have to pass initialize as the finally() in neighbor canonization.

Definition at line 41 of file nlsr-runner.cpp.

Here is the call graph for this function:

Here is the caller graph for this function: