IBR-DTNSuite  0.12
dtn::daemon::DTNTPWorker Class Reference

#include <DTNTPWorker.h>

Inheritance diagram for dtn::daemon::DTNTPWorker:
Inheritance graph
Collaboration diagram for dtn::daemon::DTNTPWorker:
Collaboration graph

Classes

class  TimeSyncMessage
 
class  TimeSyncState
 

Public Member Functions

 DTNTPWorker ()
 
virtual ~DTNTPWorker ()
 
void callbackBundleReceived (const Bundle &b)
 
void raiseEvent (const dtn::core::Event *evt) throw ()
 
void onUpdateBeacon (const ibrcommon::vinterface &iface, DiscoveryBeacon &announcement) throw (NoServiceHereException)
 
- Public Member Functions inherited from dtn::core::AbstractWorker
 AbstractWorker ()
 
virtual ~AbstractWorker ()
 
virtual const EID getWorkerURI () const
 
- Public Member Functions inherited from ibrcommon::Mutex
 Mutex (MUTEX_TYPE type=MUTEX_NORMAL)
 
virtual ~Mutex ()
 
virtual void trylock () throw (MutexException)
 
virtual void enter () throw (MutexException)
 
virtual void leave () throw (MutexException)
 
- Public Member Functions inherited from ibrcommon::MutexInterface
virtual ~MutexInterface ()=0
 
- Public Member Functions inherited from dtn::core::EventReceiver
virtual ~EventReceiver ()=0
 
- Public Member Functions inherited from dtn::net::DiscoveryBeaconHandler
virtual ~DiscoveryBeaconHandler ()=0
 
virtual void onAdvertiseBeacon (const ibrcommon::vinterface &iface, const DiscoveryBeacon &beacon) throw ()
 

Static Public Member Functions

static const TimeSyncStategetState ()
 

Additional Inherited Members

- Public Types inherited from ibrcommon::Mutex
enum  MUTEX_TYPE { MUTEX_NORMAL = PTHREAD_MUTEX_NORMAL, MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE, MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK }
 
- Protected Member Functions inherited from dtn::core::AbstractWorker
void initialize (const std::string &uri)
 
void transmit (const Bundle &bundle)
 
void shutdown ()
 
void subscribe (const dtn::data::EID &endpoint)
 
void unsubscribe (const dtn::data::EID &endpoint)
 
- Protected Attributes inherited from dtn::core::AbstractWorker
dtn::data::EID _eid
 

Detailed Description

Definition at line 35 of file DTNTPWorker.h.

Constructor & Destructor Documentation

dtn::daemon::DTNTPWorker::~DTNTPWorker ( )
virtual

Member Function Documentation

void dtn::daemon::DTNTPWorker::callbackBundleReceived ( const Bundle b)
virtual

This method is called every time a bundles is received for this endpoint.

Parameters
b

Implements dtn::core::AbstractWorker.

Definition at line 481 of file DTNTPWorker.cpp.

References dtn::data::Bundle::begin(), dtn::data::AgeBlock::BLOCK_TYPE, ibrcommon::BLOB::iostream::clear(), dtn::data::PrimaryBlock::destination, dtn::data::PrimaryBlock::DESTINATION_IS_SINGLETON, ibrcommon::MonotonicClock::diff(), dtn::data::Bundle::end(), dtn::data::Bundle::find(), dtn::data::SDNV< E >::get(), dtn::data::PayloadBlock::getBLOB(), dtn::data::AgeBlock::getMicroseconds(), dtn::data::EID::getNode(), dtn::utils::Clock::getRating(), dtn::data::AgeBlock::getSeconds(), dtn::data::EID::getString(), ibrcommon::MonotonicClock::gettime(), dtn::utils::Clock::gettimeofday(), IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_TAG, ibrcommon::LogLevel::info, ibrcommon::BLOB::iostream::iostream(), ibrcommon::BLOB::Reference::iostream(), dtn::data::PrimaryBlock::lifetime, dtn::core::BundleCore::local, dtn::data::PrimaryBlock::PRIORITY_BIT1, dtn::data::PrimaryBlock::PRIORITY_BIT2, dtn::data::Bundle::push_front(), dtn::data::PrimaryBlock::relabel(), dtn::data::EID::sameHost(), dtn::data::PrimaryBlock::set(), dtn::data::ScopeControlHopLimitBlock::setLimit(), dtn::data::BundleID::source, dtn::daemon::DTNTPWorker::TimeSyncMessage::TIMESYNC_REQUEST, dtn::daemon::DTNTPWorker::TimeSyncMessage::TIMESYNC_RESPONSE, dtn::utils::Clock::toDouble(), dtn::core::AbstractWorker::transmit(), and ibrcommon::LogLevel::warning.

Here is the call graph for this function:

const DTNTPWorker::TimeSyncState & dtn::daemon::DTNTPWorker::getState ( )
static

Get the global time sync state

Definition at line 666 of file DTNTPWorker.cpp.

void dtn::daemon::DTNTPWorker::onUpdateBeacon ( const ibrcommon::vinterface iface,
DiscoveryBeacon announcement 
)
throw (NoServiceHereException
)
virtual

This message is called by the discovery module.

Parameters
iface
name
data

Reimplemented from dtn::net::DiscoveryBeaconHandler.

Definition at line 383 of file DTNTPWorker.cpp.

References dtn::utils::Clock::getRating(), dtn::utils::Clock::getTime(), and dtn::data::SDNV< E >::toString().

Here is the call graph for this function:


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