dtn::LoggingRegistration Class Reference

#include <LoggingRegistration.h>

Inheritance diagram for dtn::LoggingRegistration:

dtn::Registration oasys::SerializableObject oasys::Logger

List of all members.


Detailed Description

A simple utility class used mostly for testing registrations.

When created, this sets up a new registration within the daemon, and for any bundles that arrive, outputs logs of the bundle header fields as well as the payload data (if ascii). The implementation is structured as a thread that blocks (forever) waiting for bundles to arrive on the registration's bundle list, then logging the bundles and looping again.

Definition at line 38 of file LoggingRegistration.h.


Public Member Functions

 LoggingRegistration (const EndpointIDPattern &endpoint)
void deliver_bundle (Bundle *bundle)
 Abstract hook for subclasses to deliver a bundle to this registration.

Constructor & Destructor Documentation

dtn::LoggingRegistration::LoggingRegistration ( const EndpointIDPattern endpoint  ) 

Definition at line 30 of file LoggingRegistration.cc.

References dtn::EndpointID::c_str(), log_info, oasys::Logger::logpathf(), dtn::Registration::regid_, and dtn::Registration::set_active().


Member Function Documentation

void dtn::LoggingRegistration::deliver_bundle ( Bundle bundle  )  [virtual]

Abstract hook for subclasses to deliver a bundle to this registration.

Implements dtn::Registration.

Definition at line 41 of file LoggingRegistration.cc.

References oasys::StringBuffer::c_str(), dtn::Bundle::format_verbose(), oasys::hex2str(), dtn::BundlePayload::length(), log_always, oasys::LOG_ALWAYS, oasys::Logger::log_multiline(), dtn::Bundle::payload_, payload_buf, dtn::BundleDaemon::post(), dtn::BundlePayload::read_data(), and oasys::str_isascii().


The documentation for this class was generated from the following files:
Generated on Sat Sep 8 08:43:47 2007 for DTN Reference Implementation by  doxygen 1.5.3