#include <StatisticLogger.h>
Inherits dtn::daemon::IntegratedComponent, ibrcommon::SimpleTimerCallback, and dtn::core::EventReceiver.

Public Types | |
| enum | LoggerType { LOGGER_STDOUT = 0, LOGGER_SYSLOG = 1, LOGGER_UDP = 2, LOGGER_FILE_PLAIN = 10, LOGGER_FILE_CSV = 11, LOGGER_FILE_STAT = 12 } |
Public Member Functions | |
| StatisticLogger (LoggerType type, unsigned int interval, std::string address="127.0.0.1", unsigned int port=1234) | |
| StatisticLogger (LoggerType type, unsigned int interval, ibrcommon::File file) | |
| virtual | ~StatisticLogger () |
| void | componentUp () |
| void | componentDown () |
| size_t | timeout (size_t identifier) |
| void | raiseEvent (const dtn::core::Event *evt) |
| virtual const std::string | getName () const |
Definition at line 38 of file StatisticLogger.h.
| LOGGER_STDOUT | |
| LOGGER_SYSLOG | |
| LOGGER_UDP | |
| LOGGER_FILE_PLAIN | |
| LOGGER_FILE_CSV | |
| LOGGER_FILE_STAT |
Definition at line 41 of file StatisticLogger.h.
| dtn::daemon::StatisticLogger::StatisticLogger | ( | LoggerType | type, | |
| unsigned int | interval, | |||
| std::string | address = "127.0.0.1", |
|||
| unsigned int | port = 1234 | |||
| ) |
Definition at line 21 of file StatisticLogger.cpp.
References IBRCOMMON_LOGGER.
| dtn::daemon::StatisticLogger::StatisticLogger | ( | LoggerType | type, | |
| unsigned int | interval, | |||
| ibrcommon::File | file | |||
| ) |
Definition at line 28 of file StatisticLogger.cpp.
| dtn::daemon::StatisticLogger::~StatisticLogger | ( | ) | [virtual] |
Definition at line 34 of file StatisticLogger.cpp.
| void dtn::daemon::StatisticLogger::componentDown | ( | ) |
Definition at line 106 of file StatisticLogger.cpp.
References dtn::core::BundleEvent::className, dtn::core::NodeEvent::className, LOGGER_FILE_PLAIN, LOGGER_UDP, ibrcommon::SimpleTimer::remove(), and dtn::core::EventReceiver::unbindEvent().

| void dtn::daemon::StatisticLogger::componentUp | ( | ) |
Definition at line 39 of file StatisticLogger.cpp.
References ibrcommon::UnicastSocket::bind(), dtn::core::EventReceiver::bindEvent(), dtn::core::BundleEvent::className, dtn::core::NodeEvent::className, ibrcommon::File::exists(), ibrcommon::File::getPath(), IBRCOMMON_LOGGER, LOGGER_FILE_CSV, LOGGER_FILE_PLAIN, LOGGER_UDP, ibrcommon::SimpleTimer::set(), ibrcommon::JoinableThread::start(), and ibrcommon::Exception::what().

| const std::string dtn::daemon::StatisticLogger::getName | ( | ) | const [virtual] |
Definition at line 274 of file StatisticLogger.cpp.
| void dtn::daemon::StatisticLogger::raiseEvent | ( | const dtn::core::Event * | evt | ) | [virtual] |
Implements dtn::core::EventReceiver.
Definition at line 125 of file StatisticLogger.cpp.
References dtn::core::BUNDLE_DELIVERED, dtn::core::BUNDLE_FORWARDED, dtn::core::BUNDLE_RECEIVED, dtn::core::BundleEvent::getAction(), dtn::core::NodeEvent::getAction(), and LOGGER_UDP.

| size_t dtn::daemon::StatisticLogger::timeout | ( | size_t | identifier | ) |
Definition at line 74 of file StatisticLogger.cpp.
References LOGGER_FILE_CSV, LOGGER_FILE_PLAIN, LOGGER_FILE_STAT, LOGGER_STDOUT, LOGGER_SYSLOG, and LOGGER_UDP.
1.7.1