prophet::Alarm Class Reference

#include <Alarm.h>

Inheritance diagram for prophet::Alarm:

dtn::ProphetTimer prophet::AlarmImpl

List of all members.


Detailed Description

Alarm registration.

Definition at line 68 of file Alarm.h.


Public Member Functions

 Alarm (ExpirationHandler *handler)
 Constructor.
virtual ~Alarm ()
 Destructor.
virtual void schedule (u_int milliseconds)=0
 How many milliseconds in the future to schedule this alarm.
virtual u_int time_remaining () const =0
 Milliseconds remaining until alarm expires.
virtual void cancel ()=0
 Disable the alarm; do not execute the handler.
virtual void timeout ()
 Invoke timeout handler.
virtual bool pending () const =0
 Accessors.
virtual bool cancelled () const =0
 Accessors.

Protected Attributes

ExpirationHandler *const handler_
 action to perform when alarm expires

Constructor & Destructor Documentation

prophet::Alarm::Alarm ( ExpirationHandler handler  )  [inline]

Constructor.

Definition at line 74 of file Alarm.h.

virtual prophet::Alarm::~Alarm (  )  [inline, virtual]

Destructor.

Definition at line 80 of file Alarm.h.


Member Function Documentation

virtual void prophet::Alarm::schedule ( u_int  milliseconds  )  [pure virtual]

How many milliseconds in the future to schedule this alarm.

Implemented in prophet::AlarmImpl, and dtn::ProphetTimer.

virtual u_int prophet::Alarm::time_remaining (  )  const [pure virtual]

Milliseconds remaining until alarm expires.

Implemented in prophet::AlarmImpl, and dtn::ProphetTimer.

Referenced by prophet::Encounter::time_remaining().

virtual void prophet::Alarm::cancel (  )  [pure virtual]

Disable the alarm; do not execute the handler.

It is expected that the host's timer implementation will cleanup a cancelled Alarm's memory ...

Implemented in prophet::AlarmImpl, and dtn::ProphetTimer.

virtual void prophet::Alarm::timeout (  )  [inline, virtual]

Invoke timeout handler.

It is expected that a successfully executed ExpirationHandler will clean up Alarm's memory

Definition at line 103 of file Alarm.h.

References prophet::ExpirationHandler::handle_timeout(), and handler_.

Referenced by dtn::ProphetTimer::timeout().

virtual bool prophet::Alarm::pending (  )  const [pure virtual]

Accessors.

Implemented in prophet::AlarmImpl, and dtn::ProphetTimer.

virtual bool prophet::Alarm::cancelled (  )  const [pure virtual]

Accessors.

Implemented in prophet::AlarmImpl, and dtn::ProphetTimer.


Member Data Documentation

action to perform when alarm expires

Definition at line 111 of file Alarm.h.

Referenced by timeout().


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

Generated on Mon Jul 21 14:12:22 2008 for DTN Reference Implementation by  doxygen 1.5.6