Phy802_15_4Timer Class Reference

#include <p802_15_4phy.h>

Inheritance diagram for Phy802_15_4Timer:

Handler Collaboration diagram for Phy802_15_4Timer:

Collaboration graph
[legend]

Detailed Description

Definition at line 102 of file p802_15_4phy.h.

Public Member Functions

virtual void cancel (void)
virtual void handle (Event *e)
 Phy802_15_4Timer (Phy802_15_4 *p, int tp)
virtual void start (double wtime)

Protected Attributes

bool active
Event nullEvent
Phy802_15_4phy
int type

Friends

class Phy802_15_4


Constructor & Destructor Documentation

Phy802_15_4Timer::Phy802_15_4Timer Phy802_15_4 p,
int  tp
[inline]
 

Definition at line 106 of file p802_15_4phy.h.

References active, phy, and type.

00106                                              : Handler()
00107     {
00108         phy = p;
00109         type = tp;
00110         active = false;
00111     }


Member Function Documentation

void Phy802_15_4Timer::cancel void   )  [virtual]
 

Definition at line 79 of file p802_15_4phy.cc.

References active, Scheduler::cancel(), Scheduler::instance(), and nullEvent.

Referenced by Phy802_15_4::PLME_SET_request(), and Phy802_15_4::PLME_SET_TRX_STATE_request().

00080 {
00081     active = false;
00082     Scheduler::instance().cancel(&nullEvent);
00083 }

Here is the call graph for this function:

void Phy802_15_4Timer::handle Event e  )  [virtual]
 

Implements Handler.

Definition at line 85 of file p802_15_4phy.cc.

References active, Phy802_15_4::CCAHandler(), Phy802_15_4::EDHandler(), phy, phyCCAHType, phyEDHType, phyRecvOverHType, phySendOverHType, phyTRXHType, Phy802_15_4::recvOverHandler(), Phy802_15_4::sendOverHandler(), Phy802_15_4::TRXHandler(), and type.

00086 {
00087     active = false;
00088     if (type == phyCCAHType)
00089         phy->CCAHandler();
00090     else if(type == phyEDHType)
00091         phy->EDHandler();
00092     else if(type == phyTRXHType)
00093         phy->TRXHandler();
00094     else if(type == phyRecvOverHType)
00095         phy->recvOverHandler((Packet *)e);
00096     else if(type == phySendOverHType)
00097         phy->sendOverHandler();
00098     else    
00099         assert(0);
00100 }

Here is the call graph for this function:

void Phy802_15_4Timer::start double  wtime  )  [virtual]
 

Definition at line 72 of file p802_15_4phy.cc.

References active, Scheduler::instance(), nullEvent, Scheduler::schedule(), and Event::uid_.

Referenced by Phy802_15_4::PD_DATA_request(), Phy802_15_4::PLME_CCA_request(), Phy802_15_4::PLME_ED_request(), Phy802_15_4::PLME_SET_TRX_STATE_request(), Phy802_15_4::recvOverHandler(), and Phy802_15_4::sendOverHandler().

00073 {
00074     active = true;
00075     nullEvent.uid_ = 0;
00076     Scheduler::instance().schedule(this,&nullEvent,wtime);
00077 }

Here is the call graph for this function:


Friends And Related Function Documentation

friend class Phy802_15_4 [friend]
 

Definition at line 104 of file p802_15_4phy.h.


Field Documentation

bool Phy802_15_4Timer::active [protected]
 

Definition at line 119 of file p802_15_4phy.h.

Referenced by cancel(), handle(), Phy802_15_4Timer(), Phy802_15_4::PLME_SET_TRX_STATE_request(), Phy802_15_4::recv(), and start().

Event Phy802_15_4Timer::nullEvent [protected]
 

Definition at line 120 of file p802_15_4phy.h.

Referenced by cancel(), and start().

Phy802_15_4* Phy802_15_4Timer::phy [protected]
 

Definition at line 117 of file p802_15_4phy.h.

Referenced by handle(), and Phy802_15_4Timer().

int Phy802_15_4Timer::type [protected]
 

Definition at line 118 of file p802_15_4phy.h.

Referenced by handle(), and Phy802_15_4Timer().


The documentation for this class was generated from the following files:
Generated on Tue Mar 6 17:25:01 2007 for ns2 Network Simulator 2.29 by  doxygen 1.4.6