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

PollAckHandler Class Reference

#include <mac-multihop.h>

Inheritance diagram for PollAckHandler:

Inheritance graph
[legend]
Collaboration diagram for PollAckHandler:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PollAckHandler (MultihopMac *m)
void handle (Event *)

Protected Attributes

MultihopMacmac_

Constructor & Destructor Documentation

PollAckHandler::PollAckHandler MultihopMac m  )  [inline]
 

Definition at line 91 of file mac-multihop.h.

References mac_.

00091 { mac_ = m; }


Member Function Documentation

void PollAckHandler::handle Event  )  [virtual]
 

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:


Member Data Documentation

MultihopMac* PollAckHandler::mac_ [protected]
 

Definition at line 94 of file mac-multihop.h.

Referenced by handle(), and PollAckHandler().


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