IBR-DTNSuite  0.12
dtn::daemon::Configuration Class Reference

#include <Configuration.h>

Collaboration diagram for dtn::daemon::Configuration:
Collaboration graph

Classes

class  Daemon
 
class  Debug
 
class  DHT
 
class  Discovery
 
class  EMail
 
class  Extension
 
class  Logger
 
class  NetConfig
 
class  Network
 
class  OnChangeListener
 
class  P2P
 
class  ParameterNotFoundException
 
class  ParameterNotSetException
 
class  Security
 
class  TimeSync
 

Public Types

enum  RoutingExtension {
  DEFAULT_ROUTING = 0, EPIDEMIC_ROUTING = 1, FLOOD_ROUTING = 2, PROPHET_ROUTING = 3,
  NO_ROUTING = 4
}
 

Public Member Functions

void load (bool quiet=false)
 
void load (const std::string &filename, bool quiet=false)
 
void params (int argc, char *argv[])
 
std::string getNodename () const
 
ibrcommon::File getPath (string name) const
 
bool doAPI () const
 
Configuration::NetConfig getAPIInterface () const
 
ibrcommon::File getAPISocket () const
 
std::string version () const
 
std::string getStorage () const
 
bool getUsePersistentBundleSets () const
 
dtn::data::Size getLimit (const std::string &) const
 
const Configuration::DiscoverygetDiscovery () const
 
const Configuration::DebuggetDebug () const
 
const Configuration::LoggergetLogger () const
 
const Configuration::NetworkgetNetwork () const
 
const Configuration::SecuritygetSecurity () const
 
const Configuration::DaemongetDaemon () const
 
const Configuration::TimeSyncgetTimeSync () const
 
const Configuration::DHTgetDHT () const
 
const Configuration::P2PgetP2P () const
 
const Configuration::EMailgetEMail () const
 

Static Public Member Functions

static ConfigurationgetInstance (bool reset=false)
 

Detailed Description

This class contains the hole configuration for the daemon.

Definition at line 45 of file Configuration.h.

Member Enumeration Documentation

Enumerator
DEFAULT_ROUTING 
EPIDEMIC_ROUTING 
FLOOD_ROUTING 
PROPHET_ROUTING 
NO_ROUTING 

Definition at line 143 of file Configuration.h.

Member Function Documentation

bool dtn::daemon::Configuration::doAPI ( ) const

Enable/Disable the API interface.

Returns
True, if the API interface should be enabled.

Definition at line 966 of file Configuration.cpp.

ibrcommon::File dtn::daemon::Configuration::getAPISocket ( ) const

Definition at line 642 of file Configuration.cpp.

References ibrcommon::ConfigFile::read().

Here is the call graph for this function:

const Configuration::Daemon & dtn::daemon::Configuration::getDaemon ( ) const

Definition at line 161 of file Configuration.cpp.

Referenced by __daemon_run(), main(), and dtn::daemon::NativeEventLoop::run().

const Configuration::Debug & dtn::daemon::Configuration::getDebug ( ) const

Definition at line 141 of file Configuration.cpp.

Referenced by __daemon_run().

const Configuration::DHT & dtn::daemon::Configuration::getDHT ( ) const

Definition at line 171 of file Configuration.cpp.

const Configuration::Discovery & dtn::daemon::Configuration::getDiscovery ( ) const
const Configuration::EMail & dtn::daemon::Configuration::getEMail ( ) const
Configuration & dtn::daemon::Configuration::getInstance ( bool  reset = false)
static
dtn::data::Size dtn::daemon::Configuration::getLimit ( const std::string &  suffix) const

Returns a limit defined in the configuration file. The given string specify with limit is to return. If the string is "block", then the value of "limit_block" is returned.

Returns
A limit in bytes.

Definition at line 1036 of file Configuration.cpp.

References ibrcommon::ConfigFile::read().

Referenced by dtn::api::Registration::processIncomingBundle().

Here is the call graph for this function:

const Configuration::Logger & dtn::daemon::Configuration::getLogger ( ) const

Definition at line 146 of file Configuration.cpp.

Referenced by __daemon_run().

std::string dtn::daemon::Configuration::getNodename ( ) const

Returns the name of the node

Definition at line 532 of file Configuration.cpp.

References ibrcommon::ConfigFile::read().

Here is the call graph for this function:

const Configuration::P2P & dtn::daemon::Configuration::getP2P ( ) const

Definition at line 176 of file Configuration.cpp.

ibrcommon::File dtn::daemon::Configuration::getPath ( string  name) const

Generic command to get a specific path. If "name" is set to "foo" then the parameter "foo_path" is returned.

Parameters
nameThe prefix of the path to get.
Returns
The path as file object.

Definition at line 933 of file Configuration.cpp.

References ibrcommon::ConfigFile::read().

Here is the call graph for this function:

std::string dtn::daemon::Configuration::getStorage ( ) const

Get the type of bundle storage to use.

Returns

Definition at line 653 of file Configuration.cpp.

References ibrcommon::ConfigFile::read().

Here is the call graph for this function:

const Configuration::TimeSync & dtn::daemon::Configuration::getTimeSync ( ) const

Definition at line 166 of file Configuration.cpp.

Referenced by dtn::daemon::DTNTPWorker::DTNTPWorker().

bool dtn::daemon::Configuration::getUsePersistentBundleSets ( ) const

returns, whether Persistent BundleSets are used (stored in SQL database)

Definition at line 658 of file Configuration.cpp.

References ibrcommon::ConfigFile::read().

Here is the call graph for this function:

void dtn::daemon::Configuration::load ( bool  quiet = false)

load the configuration from a file

Definition at line 371 of file Configuration.cpp.

Referenced by __daemon_run(), and dtn::daemon::NativeDaemon::setConfigFile().

std::string dtn::daemon::Configuration::version ( ) const

Get the version of this daemon.

Returns
The version string.

Definition at line 66 of file Configuration.cpp.

References BUILD_NUMBER, and PACKAGE_VERSION.

Referenced by dtn::api::ApiServer::componentRun(), and params().


The documentation for this class was generated from the following files: