#include <smac.h>
Inheritance diagram for SmacRecvTimer:


Public Types | |
| enum | TimerStatus { TIMER_IDLE, TIMER_PENDING, TIMER_HANDLING } |
Public Member Functions | |
| SmacRecvTimer (SMAC *a) | |
| void | sched (double duration) |
| void | expire (Event *e) |
| double | timeToExpire () |
| int | busy () |
| void | resched (double delay) |
| void | cancel () |
| void | force_cancel () |
| int | status () |
Protected Member Functions | |
| virtual void | handle (Event *) |
Protected Attributes | |
| double | stime_ |
| double | rtime_ |
| SMAC * | a_ |
| int | status_ |
| Event | event_ |
|
|
Definition at line 66 of file timer-handler.h.
00066 { TIMER_IDLE, TIMER_PENDING, TIMER_HANDLING };
|
|
|
Definition at line 273 of file smac.h. References rtime_, and stime_.
|
|
|
Definition at line 64 of file smac.cc. References TimerHandler::status_, and TimerHandler::TIMER_PENDING. Referenced by SMAC::checkToSend(), SMAC::handleCounterTimer(), and SMAC::recv().
00065 {
00066 if (status_ != TIMER_PENDING)
00067 return 0;
00068 else
00069 return 1;
00070 }
|
|
Here is the call graph for this function:

|
|
Implements SmacTimer. Definition at line 76 of file smac.cc. References SmacTimer::a_, SMAC::handleRecvTimer(), rtime_, and stime_.
00076 {
00077 stime_ = rtime_ = 0;
00078 a_->handleRecvTimer();
00079 }
|
Here is the call graph for this function:

|
|
Definition at line 60 of file timer-handler.h. References TimerHandler::_cancel(), TimerHandler::status_, TimerHandler::TIMER_IDLE, and TimerHandler::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(), TimerHandler::expire(), TimerHandler::status_, TimerHandler::TIMER_HANDLING, TimerHandler::TIMER_IDLE, and TimerHandler::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:

|
|
Reimplemented from TimerHandler. Definition at line 81 of file smac.cc. References Scheduler::clock(), Scheduler::instance(), rtime_, TimerHandler::sched(), and stime_. Referenced by SMAC::recv().
00081 {
00082 TimerHandler::sched(time);
00083 stime_ = Scheduler::instance().clock();
00084 rtime_ = time;
00085 }
|
Here is the call graph for this function:

|
|
|
Definition at line 87 of file smac.cc. References Scheduler::clock(), Scheduler::instance(), rtime_, and stime_. Referenced by SMAC::collision().
00087 {
00088 return ((stime_ + rtime_) - Scheduler::instance().clock());
00089 }
|
Here is the call graph for this function:

|
|
Definition at line 260 of file smac.h. Referenced by SmacCounterTimer::expire(), SmacCsTimer::expire(), SmacNeighNavTimer::expire(), SmacNavTimer::expire(), SmacSendTimer::expire(), expire(), SmacGeneTimer::expire(), and SmacTimer::SmacTimer(). |
|
|
Definition at line 75 of file timer-handler.h. Referenced by TimerHandler::_cancel(), TimerHandler::_sched(), WebPage::start(), and EmpWebPage::start(). |
|
|
Definition at line 279 of file smac.h. Referenced by expire(), sched(), SmacRecvTimer(), and timeToExpire(). |
|
|
|
Definition at line 278 of file smac.h. Referenced by expire(), sched(), SmacRecvTimer(), and timeToExpire(). |
1.3.3