IBR-DTNSuite
0.8
|
#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 (ibrcommon::Timer *) |
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, and IBRCOMMON_LOGGER_ENDL.
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 | ( | ) | [virtual] |
Implements dtn::daemon::IntegratedComponent.
Definition at line 106 of file StatisticLogger.cpp.
References dtn::core::NodeEvent::className, dtn::core::BundleEvent::className, LOGGER_FILE_PLAIN, LOGGER_UDP, ibrcommon::Timer::pause(), and dtn::core::EventReceiver::unbindEvent().
void dtn::daemon::StatisticLogger::componentUp | ( | ) | [virtual] |
Implements dtn::daemon::IntegratedComponent.
Definition at line 39 of file StatisticLogger.cpp.
References ibrcommon::UnicastSocket::bind(), dtn::core::EventReceiver::bindEvent(), dtn::core::NodeEvent::className, dtn::core::BundleEvent::className, ibrcommon::File::exists(), ibrcommon::File::getPath(), IBRCOMMON_LOGGER, IBRCOMMON_LOGGER_ENDL, LOGGER_FILE_CSV, LOGGER_FILE_PLAIN, LOGGER_UDP, ibrcommon::Timer::set(), ibrcommon::JoinableThread::start(), and ibrcommon::Exception::what().
const std::string dtn::daemon::StatisticLogger::getName | ( | ) | const [virtual] |
Implements dtn::daemon::Component.
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::NodeEvent::getAction(), dtn::core::BundleEvent::getAction(), LOGGER_UDP, and dtn::core::NODE_INFO_UPDATED.
size_t dtn::daemon::StatisticLogger::timeout | ( | ibrcommon::Timer * | timer | ) | [virtual] |
This method will be called if the timer timed out.
timer | The reference to the timer which timed out. |
Timer::StopTimerException | if thrown will abort the timer |
Implements ibrcommon::TimerCallback.
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.