dtn::DTND Class Reference

List of all members.

Detailed Description

Thin class that implements the daemon itself.

Definition at line 70 of file dtnd.cc.

Public Member Functions

 DTND ()
int main (int argc, char *argv[])

Protected Member Functions

void get_options (int argc, char *argv[])
void daemonize ()
void notify_parent (char status)
void notify_and_exit (char status)
void seed_random ()
void init_log ()
void init_testcmd (int argc, char *argv[])
void run_console ()

Protected Attributes

bool daemonize_
int daemonize_pipe_ [2]
int random_seed_
bool random_seed_set_
std::string conf_file_
bool conf_file_set_
bool print_version_
std::string loglevelstr_
oasys::log_level_t loglevel_
std::string logfile_
TestCommandtestcmd_
oasys::ConsoleCommandconsolecmd_
oasys::StorageConfig storage_config_


Constructor & Destructor Documentation

dtn::DTND::DTND (  ) 

Definition at line 101 of file dtnd.cc.

References consolecmd_, daemonize_pipe_, oasys::StorageConfig::db_max_tx_, storage_config_, and testcmd_.


Member Function Documentation

int dtn::DTND::main ( int  argc,
char *  argv[] 
)

Definition at line 351 of file dtnd.cc.

References oasys::Thread::activate_start_barrier(), oasys::TCPServerThread::bind_listen_start(), dtn::DTNServer::close_datastore(), conf_file_, conf_file_set_, consolecmd_, daemonize(), dtn_version, get_options(), dtn::DTNServer::init(), oasys::TclCommandInterp::init(), oasys::FatalSignals::init(), oasys::StorageConfig::init_, dtn::DTNServer::init_datastore(), init_log(), init_testcmd(), dtn::TestCommand::initscript_, oasys::TclCommandInterp::instance(), dtn::APIServer::local_addr(), dtn::APIServer::local_port(), log_crit, log_err, log_info, log_notice, notify_and_exit(), notify_parent(), NOTREACHED, dtn::DTNServer::parse_conf_file(), print_version_, oasys::Thread::release_start_barrier(), run_console(), seed_random(), dtn::DTNServer::shutdown(), oasys::TclCommandInterp::shutdown(), dtn::DTNServer::start(), storage_config_, testcmd_, and oasys::StorageConfig::tidy_.

Referenced by main().

void dtn::DTND::get_options ( int  argc,
char *  argv[] 
) [protected]

Definition at line 130 of file dtnd.cc.

References oasys::Getopt::addopt(), oasys::ConsoleCommand::addr_, conf_file_, conf_file_set_, consolecmd_, daemonize_, dtn::TestCommand::fork_, oasys::Getopt::getopt(), dtn::TestCommand::id_, oasys::StorageConfig::init_, logfile_, loglevelstr_, oasys::ConsoleCommand::port_, print_version_, random_seed_, random_seed_set_, storage_config_, testcmd_, oasys::StorageConfig::tidy_, and oasys::Getopt::usage().

Referenced by main().

void dtn::DTND::daemonize (  )  [protected]

Definition at line 193 of file dtnd.cc.

References count, daemonize_, daemonize_pipe_, and errno.

Referenced by main().

void dtn::DTND::notify_parent ( char  status  )  [protected]

Definition at line 248 of file dtnd.cc.

References daemonize_, and daemonize_pipe_.

Referenced by main(), and notify_and_exit().

void dtn::DTND::notify_and_exit ( char  status  )  [protected]

Definition at line 258 of file dtnd.cc.

References notify_parent().

Referenced by init_log(), and main().

void dtn::DTND::seed_random (  )  [protected]

Definition at line 266 of file dtnd.cc.

References dtnsim::gettimeofday(), log_notice, random_seed_, random_seed_set_, and oasys::Random::seed().

Referenced by main().

void dtn::DTND::init_log (  )  [protected]

Definition at line 282 of file dtnd.cc.

References daemonize_, oasys::Log::init(), oasys::Log::instance(), oasys::LOG_INVALID, oasys::LOG_NOTICE, logfile_, loglevel_, loglevelstr_, notify_and_exit(), and oasys::str2level().

Referenced by main().

void dtn::DTND::init_testcmd ( int  argc,
char *  argv[] 
) [protected]

Definition at line 316 of file dtnd.cc.

References dtn::TestCommand::argv_, dtn::TestCommand::bind_vars(), oasys::TclCommandInterp::instance(), and testcmd_.

Referenced by main().

void dtn::DTND::run_console (  )  [protected]

Definition at line 329 of file dtnd.cc.

References oasys::ConsoleCommand::addr_, consolecmd_, daemonize_, oasys::TclCommandInterp::instance(), intoa, log_info, oasys::ConsoleCommand::port_, oasys::ConsoleCommand::prompt_, and oasys::ConsoleCommand::stdio_.

Referenced by main().


Member Data Documentation

bool dtn::DTND::daemonize_ [protected]

Definition at line 76 of file dtnd.cc.

Referenced by daemonize(), get_options(), init_log(), notify_parent(), and run_console().

int dtn::DTND::daemonize_pipe_[2] [protected]

Definition at line 77 of file dtnd.cc.

Referenced by daemonize(), DTND(), and notify_parent().

int dtn::DTND::random_seed_ [protected]

Definition at line 78 of file dtnd.cc.

Referenced by get_options(), and seed_random().

bool dtn::DTND::random_seed_set_ [protected]

Definition at line 79 of file dtnd.cc.

Referenced by get_options(), and seed_random().

std::string dtn::DTND::conf_file_ [protected]

Definition at line 80 of file dtnd.cc.

Referenced by get_options(), and main().

bool dtn::DTND::conf_file_set_ [protected]

Definition at line 81 of file dtnd.cc.

Referenced by get_options(), and main().

bool dtn::DTND::print_version_ [protected]

Definition at line 82 of file dtnd.cc.

Referenced by get_options(), and main().

std::string dtn::DTND::loglevelstr_ [protected]

Definition at line 83 of file dtnd.cc.

Referenced by get_options(), and init_log().

oasys::log_level_t dtn::DTND::loglevel_ [protected]

Definition at line 84 of file dtnd.cc.

Referenced by init_log().

std::string dtn::DTND::logfile_ [protected]

Definition at line 85 of file dtnd.cc.

Referenced by get_options(), and init_log().

TestCommand* dtn::DTND::testcmd_ [protected]

Definition at line 86 of file dtnd.cc.

Referenced by DTND(), get_options(), init_testcmd(), and main().

oasys::ConsoleCommand* dtn::DTND::consolecmd_ [protected]

Definition at line 87 of file dtnd.cc.

Referenced by DTND(), get_options(), main(), and run_console().

oasys::StorageConfig dtn::DTND::storage_config_ [protected]

Definition at line 88 of file dtnd.cc.

Referenced by DTND(), get_options(), and main().


The documentation for this class was generated from the following file:
Generated on Fri Dec 22 14:48:03 2006 for DTN Reference Implementation by  doxygen 1.5.1