IBR-DTN  1.0.0
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 983 of file Configuration.cpp.

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

Definition at line 654 of file Configuration.cpp.

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

Definition at line 162 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 142 of file Configuration.cpp.

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

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

Definition at line 172 of file Configuration.cpp.

const Configuration::Discovery & dtn::daemon::Configuration::getDiscovery ( ) const
const Configuration::EMail & dtn::daemon::Configuration::getEMail ( ) const
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 1058 of file Configuration.cpp.

Referenced by dtn::core::BundleCore::inject().

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

Definition at line 147 of file Configuration.cpp.

Referenced by __daemon_run().

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

Returns the name of the node

Definition at line 544 of file Configuration.cpp.

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

Definition at line 177 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 950 of file Configuration.cpp.

Referenced by dtn::routing::ProphetRoutingExtension::ProphetRoutingExtension().

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

Get the type of bundle storage to use.

Returns

Definition at line 665 of file Configuration.cpp.

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

Definition at line 167 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 670 of file Configuration.cpp.

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

load the configuration from a file

Definition at line 372 of file Configuration.cpp.

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

void dtn::daemon::Configuration::params ( int  argc,
char *  argv[] 
)
std::string dtn::daemon::Configuration::version ( ) const

Get the version of this daemon.

Returns
The version string.

Definition at line 67 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: