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) |
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.
nlsr::NlsrRunner::NlsrRunner | ( | std::string & | configFileName, |
bool | isDaemonProcess | ||
) |
Definition at line 31 of file nlsr-runner.cpp.
|
static |
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.
Error | If the configuration file cannot be processed. NLSR is not started. |
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.