#include <mac-multihop.h>
Inheritance diagram for PollAckHandler:


Public Member Functions | |
| PollAckHandler (MultihopMac *m) | |
| void | handle (Event *) |
Protected Attributes | |
| MultihopMac * | mac_ |
|
|
Definition at line 91 of file mac-multihop.h. References mac_.
00091 { mac_ = m; }
|
|
|
Implements Handler. Definition at line 150 of file mac-multihop.cc. References MultihopMac::backoffBase(), MultihopMac::backoffTime(), Scheduler::cancel(), MultihopMac::checkInterfaces(), Scheduler::instance(), mac_, MAC_IDLE, MAC_POLLING, MAC_SND, MultihopMac::mode(), MultihopMac::peer(), PollEvent::peerMac(), MultihopMac::pendingPE(), MultihopMac::pkt(), and MultihopMac::send().
00151 {
00152 PollEvent *pe = (PollEvent *) e;
00153 Scheduler& s = Scheduler::instance();
00154
00155 if (mac_->checkInterfaces(MAC_POLLING | MAC_IDLE)) {
00156 mac_->backoffTime(mac_->backoffBase());
00157 mac_->mode(MAC_SND);
00158 mac_->peer(pe->peerMac());
00159 s.cancel(mac_->pendingPE()); /* cancel pending timeout */
00160 free(mac_->pendingPE()); // and free the event
00161 mac_->pendingPE(NULL);
00162 mac_->send(mac_->pkt()); /* send saved packet */
00163 }
00164 }
|
Here is the call graph for this function:

|
|
Definition at line 94 of file mac-multihop.h. Referenced by handle(), and PollAckHandler(). |
1.3.3