dtn::LoggingRegistration Class Reference

A simple utility class used mostly for testing registrations. More...

#include <LoggingRegistration.h>

Inheritance diagram for dtn::LoggingRegistration:

dtn::Registration

List of all members.

Public Member Functions

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


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.


Constructor & Destructor Documentation

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


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 44 of file LoggingRegistration.cc.

References buf, dtn::Bundle::format_verbose(), hex, len, dtn::BundlePayload::length(), dtn::Bundle::payload(), payload_buf, dtn::BundleDaemon::post(), and dtn::BundlePayload::read_data().


The documentation for this class was generated from the following files:

Generated on Fri Jan 30 09:43:14 2009 for DTN Reference Implementation by  doxygen 1.5.8