#include <timer-handler.h>
Inheritance diagram for TimerHandler:


Public Types | |
| enum | TimerStatus { TIMER_IDLE, TIMER_PENDING, TIMER_HANDLING } |
Public Member Functions | |
| TimerHandler () | |
| void | sched (double delay) |
| void | resched (double delay) |
| void | cancel () |
| void | force_cancel () |
| int | status () |
Protected Member Functions | |
| virtual void | expire (Event *)=0 |
| virtual void | handle (Event *) |
Protected Attributes | |
| int | status_ |
| Event | event_ |
Private Member Functions | |
| void | _sched (double delay) |
| void | _cancel () |
|
|
Definition at line 66 of file timer-handler.h.
00066 { TIMER_IDLE, TIMER_PENDING, TIMER_HANDLING };
|
|
|
Definition at line 53 of file timer-handler.h. References status_, and TIMER_IDLE.
00053 : status_(TIMER_IDLE) { } |
|
|
Definition at line 81 of file timer-handler.h. References Scheduler::cancel(), event_, and Scheduler::instance(). Referenced by cancel(), force_cancel(), and resched().
00081 {
00082 (void)Scheduler::instance().cancel(&event_);
00083 // no need to free event_ since it's statically allocated
00084 }
|
Here is the call graph for this function:

|
|
Definition at line 78 of file timer-handler.h. References event_, Scheduler::instance(), and Scheduler::schedule(). Referenced by resched(), and sched().
00078 {
00079 (void)Scheduler::instance().schedule(this, &event_, delay);
00080 }
|
Here is the call graph for this function:

|
Here is the call graph for this function:

|
|
|
Definition at line 60 of file timer-handler.h. References _cancel(), status_, TIMER_IDLE, and TIMER_PENDING. Referenced by TcpAgent::cancel_rtx_timer(), TcpSessionAgent::cancel_rtx_timer(), TcpFsAgent::cancel_rtx_timer(), AbsTcpAgent::cancel_timer(), TcpAgent::cancel_timers(), TcpSessionAgent::cancel_timers(), FullTcpAgent::cancel_timers(), TcpFsAgent::cancel_timers(), SinkAgent::command(), UnslottedAlohaMac::end_of_contention(), GAFAgent::processDiscoveryMsg(), RTPAgent::rate_change(), TfrcAgent::stop(), RTPAgent::stop(), and SinkAgent::stop().
00060 { // cancel!
00061 if (status_ == TIMER_PENDING) {
00062 _cancel();
00063 status_ = TIMER_IDLE;
00064 }
00065 }
|
Here is the call graph for this function:

|
|
Implements Handler. Reimplemented in EmpFtpTrafSession, EmpWebPage, EmpWebTrafSession, HBTimer, WebPage, and WebTrafSession. Definition at line 69 of file timer-handler.cc. References abort(), expire(), status_, TIMER_HANDLING, TIMER_IDLE, and TIMER_PENDING. Referenced by WebTrafSession::handle(), WebPage::handle(), HBTimer::handle(), EmpWebTrafSession::handle(), EmpWebPage::handle(), and EmpFtpTrafSession::handle().
00070 {
00071 if (status_ != TIMER_PENDING) // sanity check
00072 abort();
00073 status_ = TIMER_HANDLING;
00074 expire(e);
00075 // if it wasn't rescheduled, it's done
00076 if (status_ == TIMER_HANDLING)
00077 status_ = TIMER_IDLE;
00078 }
|
Here is the call graph for this function:

|
Here is the call graph for this function:

|
Here is the call graph for this function:

|
|
|
Definition at line 75 of file timer-handler.h. Referenced by _cancel(), _sched(), WebPage::start(), and EmpWebPage::start(). |
|
|
Definition at line 74 of file timer-handler.h. Referenced by SmacTimer::busy(), cancel(), SmacCsTimer::checkToCancel(), force_cancel(), handle(), resched(), sched(), SmacCounterTimer::sched(), WebPage::start(), EmpWebPage::start(), status(), TimerHandler(), EmpFtpTrafSession::~EmpFtpTrafSession(), EmpWebTrafSession::~EmpWebTrafSession(), and WebTrafSession::~WebTrafSession(). |
1.3.3