#include <mac-tdma.h>
Inheritance diagram for MacTdmaTimer:


Public Member Functions | |
| MacTdmaTimer (MacTdma *m, double s=0) | |
| virtual void | handle (Event *e)=0 |
| virtual void | start (Packet *p, double time) |
| virtual void | stop (Packet *p) |
| virtual void | pause (void) |
| virtual void | resume (void) |
| int | busy (void) |
| int | paused (void) |
| double | slottime (void) |
| double | expire (void) |
Protected Attributes | |
| MacTdma * | mac |
| int | busy_ |
| int | paused_ |
| Event | intr |
| double | stime |
| double | rtime |
| double | slottime_ |
|
||||||||||||
|
Definition at line 159 of file mac-tdma.h. References busy_, mac, paused_, rtime, slottime_, and stime.
|
|
|
Definition at line 170 of file mac-tdma.h. References busy_.
00170 { return busy_; }
|
|
|
Definition at line 173 of file mac-tdma.h. References Scheduler::clock(), Scheduler::instance(), rtime, and stime.
00173 {
00174 return ((stime + rtime) - Scheduler::instance().clock());
00175 }
|
Here is the call graph for this function:

|
|
Implements Handler. Implemented in SlotTdmaTimer, RxPktTdmaTimer, and TxPktTdmaTimer. |
|
|
Definition at line 167 of file mac-tdma.h.
00167 { assert(0); }
|
|
|
Definition at line 171 of file mac-tdma.h. References paused_.
00171 { return paused_; }
|
|
|
Definition at line 168 of file mac-tdma.h.
00168 { assert(0); }
|
|
|
Definition at line 172 of file mac-tdma.h. References slottime_.
00172 { return slottime_; }
|
|
||||||||||||
|
Definition at line 68 of file mac-tdma.cc. References busy_, Scheduler::clock(), Scheduler::instance(), paused_, rtime, Scheduler::schedule(), and stime. Referenced by MacTdma::MacTdma(), MacTdma::send(), MacTdma::sendUp(), and MacTdma::slotHandler().
|
Here is the call graph for this function:

|
|
Definition at line 82 of file mac-tdma.cc. References busy_, Scheduler::cancel(), Packet::free(), Scheduler::instance(), paused_, rtime, and stime.
00083 {
00084 Scheduler &s = Scheduler::instance();
00085 assert(busy_);
00086
00087 if(paused_ == 0)
00088 s.cancel((Event *)p);
00089
00090 // Should free the packet p.
00091 Packet::free(p);
00092
00093 busy_ = 0;
00094 paused_ = 0;
00095 stime = 0.0;
00096 rtime = 0.0;
00097 }
|
Here is the call graph for this function:

|
|
Definition at line 180 of file mac-tdma.h. Referenced by busy(), TxPktTdmaTimer::handle(), RxPktTdmaTimer::handle(), SlotTdmaTimer::handle(), MacTdmaTimer(), start(), and stop(). |
|
|
Definition at line 182 of file mac-tdma.h. |
|
|
Definition at line 179 of file mac-tdma.h. Referenced by TxPktTdmaTimer::handle(), RxPktTdmaTimer::handle(), SlotTdmaTimer::handle(), and MacTdmaTimer(). |
|
|
Definition at line 181 of file mac-tdma.h. Referenced by TxPktTdmaTimer::handle(), RxPktTdmaTimer::handle(), SlotTdmaTimer::handle(), MacTdmaTimer(), paused(), start(), and stop(). |
|
|
Definition at line 184 of file mac-tdma.h. Referenced by expire(), TxPktTdmaTimer::handle(), RxPktTdmaTimer::handle(), SlotTdmaTimer::handle(), MacTdmaTimer(), start(), and stop(). |
|
|
Definition at line 185 of file mac-tdma.h. Referenced by MacTdmaTimer(), and slottime(). |
|
|
Definition at line 183 of file mac-tdma.h. Referenced by expire(), TxPktTdmaTimer::handle(), RxPktTdmaTimer::handle(), SlotTdmaTimer::handle(), MacTdmaTimer(), start(), and stop(). |
1.3.3