IBR-DTNSuite  0.10
dtn::core::WallClock Class Reference

#include <WallClock.h>

Inheritance diagram for dtn::core::WallClock:
Inheritance graph
Collaboration diagram for dtn::core::WallClock:
Collaboration graph

Public Member Functions

 WallClock (const dtn::data::Timeout &frequency)
 
virtual ~WallClock ()
 
void sync ()
 
virtual size_t timeout (ibrcommon::Timer *)
 
virtual const std::string getName () const
 
- Public Member Functions inherited from ibrcommon::Conditional
 Conditional ()
 
virtual ~Conditional ()
 
void signal (bool broadcast=false) throw ()
 
void wait (size_t timeout=0) throw (ConditionalAbortException)
 
void wait (struct timespec *ts) throw (ConditionalAbortException)
 
void abort () throw ()
 
void reset () throw ()
 
- 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::daemon::IntegratedComponent
 IntegratedComponent ()
 
virtual ~IntegratedComponent ()
 
virtual void initialize () throw ()
 
virtual void startup () throw ()
 
virtual void terminate () throw ()
 
- Public Member Functions inherited from dtn::daemon::Component
virtual ~Component ()=0
 
- Public Member Functions inherited from ibrcommon::TimerCallback
virtual ~TimerCallback ()
 

Protected Member Functions

virtual void componentUp () throw ()
 
virtual void componentDown () throw ()
 

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 }
 
- Static Public Member Functions inherited from ibrcommon::Conditional
static void gettimeout (size_t timeout, struct timespec *hires) throw ()
 
- Protected Attributes inherited from ibrcommon::Mutex
pthread_mutex_t m_mutex
 
pthread_mutexattr_t m_attr
 

Detailed Description

Definition at line 35 of file WallClock.h.

Constructor & Destructor Documentation

dtn::core::WallClock::WallClock ( const dtn::data::Timeout frequency)

Constructor for the global Clock

Parameters
frequencySpecify the frequency for the clock tick in seconds.

Definition at line 32 of file WallClock.cpp.

dtn::core::WallClock::~WallClock ( )
virtual

Definition at line 36 of file WallClock.cpp.

Member Function Documentation

void dtn::core::WallClock::componentDown ( ) throw ()
protectedvirtual

Implements dtn::daemon::IntegratedComponent.

Definition at line 67 of file WallClock.cpp.

References ibrcommon::Timer::pause().

Here is the call graph for this function:

void dtn::core::WallClock::componentUp ( ) throw ()
protectedvirtual
const std::string dtn::core::WallClock::getName ( ) const
virtual
See Also
Component::getName()

Implements dtn::daemon::Component.

Definition at line 95 of file WallClock.cpp.

void dtn::core::WallClock::sync ( )

Blocks until the next clock tick happens.

Definition at line 40 of file WallClock.cpp.

References ibrcommon::Conditional::wait().

Here is the call graph for this function:

size_t dtn::core::WallClock::timeout ( ibrcommon::Timer )
virtual

timer callback method

See Also
TimerCallback::timeout()

Implements ibrcommon::TimerCallback.

Definition at line 72 of file WallClock.cpp.

References dtn::data::SDNV< E >::get(), dtn::utils::Clock::getTime(), dtn::utils::Clock::getUnixTimestamp(), dtn::core::TimeEvent::raise(), ibrcommon::Conditional::signal(), and dtn::core::TIME_SECOND_TICK.

Here is the call graph for this function:


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