dtn::FileConvergenceLayer::Scanner Class Reference

#include <FileConvergenceLayer.h>

Inheritance diagram for dtn::FileConvergenceLayer::Scanner:

dtn::CLInfo oasys::Logger oasys::Thread List of all members.

Detailed Description

Helper class (and thread) that periodically scans a directory for new bundle files.

Definition at line 93 of file FileConvergenceLayer.h.

Public Member Functions

 Scanner (int secs_per_scan, const std::string &dir)
 Constructor.
void stop ()
 Set the flag to ask it to stop next loop.

Protected Member Functions

void run ()
 Main thread function.

Protected Attributes

int secs_per_scan_
 scan interval
std::string dir_
 directory to scan for bundles.
bool run_
 keep running?


Constructor & Destructor Documentation

dtn::FileConvergenceLayer::Scanner::Scanner ( int  secs_per_scan,
const std::string &  dir 
)

Constructor.

Definition at line 308 of file FileConvergenceLayer.cc.

References oasys::Thread::DELETE_ON_EXIT, and oasys::Thread::set_flag().


Member Function Documentation

void dtn::FileConvergenceLayer::Scanner::stop (  ) 

Set the flag to ask it to stop next loop.

Definition at line 448 of file FileConvergenceLayer.cc.

References run_.

Referenced by dtn::FileConvergenceLayer::interface_down().

void dtn::FileConvergenceLayer::Scanner::run (  )  [protected, virtual]

Main thread function.

Implements oasys::Thread.

Definition at line 324 of file FileConvergenceLayer.cc.

References dtn::FileConvergenceLayer::CURRENT_VERSION, dir_, errno, dtn::EVENTSRC_PEER, fd, log_debug, log_err, log_info, log_warn, dtn::BundleProtocol::parse_header_blocks(), dtn::BundleDaemon::post(), oasys::IO::readall(), run_, and secs_per_scan_.


Member Data Documentation

int dtn::FileConvergenceLayer::Scanner::secs_per_scan_ [protected]

scan interval

Definition at line 111 of file FileConvergenceLayer.h.

Referenced by run().

std::string dtn::FileConvergenceLayer::Scanner::dir_ [protected]

directory to scan for bundles.

Definition at line 112 of file FileConvergenceLayer.h.

Referenced by run().

bool dtn::FileConvergenceLayer::Scanner::run_ [protected]

keep running?

Definition at line 113 of file FileConvergenceLayer.h.

Referenced by run(), and stop().


The documentation for this class was generated from the following files:
Generated on Fri Dec 22 14:48:04 2006 for DTN Reference Implementation by  doxygen 1.5.1