Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

devAP.h

Go to the documentation of this file.
00001 #include "dedevice.h"
00002 #include "devPkt.h"
00003 #include "probeband.h"
00004 #include "probebandslice.h"
00005 
00006 #ifndef __DEV_AP_H__
00007 #define __DEV_AP_H__
00008 
00009 #define DBG_EV_WIDTH 21
00010 
00017 
00018 // Access point
00019 
00021 
00035 class DevAP : public DEDevice
00036 {
00037 protected:
00038   
00040   DETime halfSlot;
00041   
00043   list<DevPkt*> queue;
00044 
00046   DETime RoundTripDelay;
00047   
00049   ProbeBand *theBandProbe;
00051   ProbeBandSlice *theBandSliceProbe;
00052   
00053 public:
00055   static void setup(ParamManager *Param, GlobalProbeManager *Results);
00056   
00058   void Initialize();
00059   
00061   DevAP(DESystem *_System);
00062 
00064   virtual const char *Type() const
00065   {
00066     return "DevAP";
00067   };
00068 
00070   void HEv_AP_Packet_Arrival(DevPkt* sender);
00071   
00073   void HEv_AP_SelfCheck();
00074 };
00075 
00076 
00077 // *****************************************************************************
00078 // **  Events
00079 
00081 
00084 class Ev_AP_Packet_Arrival : public DEEvent
00085 {
00086 protected:
00087   DevAP* theAP;
00088   DevPkt* sender;
00089   
00090 public:
00091   Ev_AP_Packet_Arrival(DevAP* _theAP, DevPkt* _sender)
00092   : DEEvent(), sender(_sender), theAP(_theAP)
00093   {};
00094   
00095   virtual const char *Type() const
00096   {
00097     return "Ev_AP_Packet_Arrival";
00098   };
00099   
00100   void Handler() { theAP->HEv_AP_Packet_Arrival(sender); };
00101   
00102   virtual void print(ostream &os) const
00103   {
00104     os << Time << ": " << setw(DBG_EV_WIDTH) << Type() << " from: " << *sender;
00105   };
00106 };
00107 
00108 
00110 
00113 class Ev_AP_SelfCheck : public DEEvent
00114 {
00115 protected:
00116   DevAP* theAP;
00117   
00118 public:
00119   Ev_AP_SelfCheck(DevAP* _theAP)
00120   : DEEvent(), theAP(_theAP)
00121   {};
00122   
00123   virtual const char *Type() const
00124   {
00125     return "Ev_AP_SelfCheck";
00126   };
00127   
00128   void Handler() { theAP->HEv_AP_SelfCheck(); };
00129   
00130   virtual void print(ostream &os) const
00131   {
00132     os << Time << ": " << setw(DBG_EV_WIDTH) << Type();
00133   };
00134 };
00135 
00136 
00137 #endif

Generated on Wed Dec 22 23:26:43 2004 for NePSing Slotted Aloha example by doxygen 1.3.9.1 ---- Hosted by SourceForge.net Logo