#include <FileConvergenceLayer.h>
Inheritance diagram for dtn::FileConvergenceLayer::Scanner:
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? |
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().
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_.
int dtn::FileConvergenceLayer::Scanner::secs_per_scan_ [protected] |
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] |