Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

imepTimer Class Reference

#include <imep.h>

Inheritance diagram for imepTimer:

Inheritance graph
[legend]
Collaboration diagram for imepTimer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 imepTimer (imepAgent *a, imepTimerType t)
void handle (Event *)
void start (double time)
void cancel ()
int busy ()
double timeLeft ()

Private Attributes

Event intr
int busy_
imepAgentagent
imepTimerType type_

Constructor & Destructor Documentation

imepTimer::imepTimer imepAgent a,
imepTimerType  t
[inline]
 

Definition at line 88 of file imep.h.

References agent, busy_, and type_.

00088 : busy_(0), agent(a), type_(t) {}


Member Function Documentation

int imepTimer::busy  )  [inline]
 

Definition at line 92 of file imep.h.

References busy_.

Referenced by imepAgent::handlerBeaconTimer(), imepAgent::recv_outgoing(), imepAgent::scheduleIncoming(), imepAgent::scheduleReXmit(), imepAgent::sendAck(), and imepAgent::sendHello().

00092 { return busy_; }

void imepTimer::cancel  ) 
 

Definition at line 67 of file imep_timers.cc.

References busy_, Scheduler::cancel(), Scheduler::instance(), and intr.

Referenced by imepAgent::handlerBeaconTimer(), and imepAgent::recv_outgoing().

00068 {
00069         assert(busy_ == 1);
00070         busy_ = 0;
00071         Scheduler::instance().cancel(&intr);
00072 }

Here is the call graph for this function:

void imepTimer::handle Event  )  [virtual]
 

Implements Handler.

Definition at line 52 of file imep_timers.cc.

References agent, busy_, imepAgent::handlerTimer(), and type_.

00053 {
00054         busy_ = 0;
00055         agent->handlerTimer(type_);
00056 }

Here is the call graph for this function:

void imepTimer::start double  time  ) 
 

Definition at line 59 of file imep_timers.cc.

References busy_, Scheduler::instance(), intr, and Scheduler::schedule().

Referenced by imepAgent::command(), imepAgent::handlerBeaconTimer(), imepAgent::handlerIncomingTimer(), imepAgent::handlerReXmitTimer(), imepAgent::recv_outgoing(), imepAgent::scheduleIncoming(), imepAgent::scheduleReXmit(), imepAgent::sendAck(), and imepAgent::sendHello().

00060 {
00061         assert(busy_ == 0);
00062         busy_ = 1;
00063         Scheduler::instance().schedule(this, &intr, time);
00064 }

Here is the call graph for this function:

double imepTimer::timeLeft  ) 
 

Definition at line 75 of file imep_timers.cc.

References busy_, CURRENT_TIME, intr, and Event::time_.

Referenced by imepAgent::recv_outgoing().

00076 {
00077         assert(busy_ == 1);
00078         return intr.time_ - CURRENT_TIME;
00079 }


Member Data Documentation

imepAgent* imepTimer::agent [private]
 

Definition at line 97 of file imep.h.

Referenced by handle(), and imepTimer().

int imepTimer::busy_ [private]
 

Definition at line 96 of file imep.h.

Referenced by busy(), cancel(), handle(), imepTimer(), start(), and timeLeft().

Event imepTimer::intr [private]
 

Definition at line 95 of file imep.h.

Referenced by cancel(), start(), and timeLeft().

imepTimerType imepTimer::type_ [private]
 

Definition at line 98 of file imep.h.

Referenced by handle(), and imepTimer().


The documentation for this class was generated from the following files:
Generated on Tue Apr 20 12:53:01 2004 for NS2.26SourcesOriginal by doxygen 1.3.3