|
IBR-DTNSuite 0.6
|
#include <StatisticLogger.h>


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 22 of file StatisticLogger.cpp.
References IBRCOMMON_LOGGER, and IBRCOMMON_LOGGER_ENDL.
| dtn::daemon::StatisticLogger::StatisticLogger | ( | LoggerType | type, |
| unsigned int | interval, | ||
| ibrcommon::File | file | ||
| ) |
Definition at line 29 of file StatisticLogger.cpp.
| dtn::daemon::StatisticLogger::~StatisticLogger | ( | ) | [virtual] |
Definition at line 35 of file StatisticLogger.cpp.
| void dtn::daemon::StatisticLogger::componentDown | ( | ) | [virtual] |
Implements dtn::daemon::IntegratedComponent.
Definition at line 107 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 | ( | ) | [virtual] |
Implements dtn::daemon::IntegratedComponent.
Definition at line 40 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, IBRCOMMON_LOGGER_ENDL, 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] |
Implements dtn::daemon::Component.
Definition at line 275 of file StatisticLogger.cpp.
| void dtn::daemon::StatisticLogger::raiseEvent | ( | const dtn::core::Event * | evt | ) | [virtual] |
Implements dtn::core::EventReceiver.
Definition at line 126 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(), LOGGER_UDP, and dtn::core::NODE_INFO_UPDATED.

| size_t dtn::daemon::StatisticLogger::timeout | ( | size_t | identifier | ) | [virtual] |
This method will be called if the timer timed out.
| timer | The reference to the timer which timed out. |
Implements ibrcommon::SimpleTimerCallback.
Definition at line 75 of file StatisticLogger.cpp.
References LOGGER_FILE_CSV, LOGGER_FILE_PLAIN, LOGGER_FILE_STAT, LOGGER_STDOUT, LOGGER_SYSLOG, and LOGGER_UDP.