#include <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. |
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.
dtn::LoggingRegistration::LoggingRegistration | ( | const EndpointIDPattern & | endpoint | ) |
Definition at line 33 of file LoggingRegistration.cc.
References dtn::EndpointID::c_str(), dtn::Registration::regid_, and dtn::Registration::set_active().
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().