Decider80211.h

00001 /*
00002  * Decider80211.h
00003  *
00004  *  Created on: 11.02.2009
00005  *      Author: karl wessel
00006  */
00007 
00008 #ifndef DECIDER80211_H_
00009 #define DECIDER80211_H_
00010 
00011 #include <BaseDecider.h>
00012 #include <Consts80211.h>
00013 
00029 class Decider80211: public BaseDecider {
00030 public:
00032   enum Decider80211ControlKinds {
00033     NOTHING = 22100,
00035     BITERROR,
00037     COLLISION,
00039     LAST_DECIDER_80211_CONTROL_KIND
00040   };
00041 protected:
00043   double snrThreshold;
00044 
00046   double centerFrequency;
00047 
00048 protected:
00049 
00057   virtual DeciderResult* checkIfSignalOk(AirFrame* frame);
00058 
00059   virtual simtime_t processNewSignal(AirFrame* frame);
00060 
00070   virtual simtime_t processSignalEnd(AirFrame* frame);
00071 
00073   bool packetOk(double snirMin, int lengthMPDU, double bitrate);
00074 
00084   virtual double calcChannelSenseRSSI(simtime_t start, simtime_t end);
00085 
00086 public:
00087 
00092   Decider80211(DeciderToPhyInterface* phy,
00093         double threshold,
00094         double sensitivity,
00095         int channel,
00096         int myIndex = -1,
00097         bool debug = false);
00098 
00099   virtual ~Decider80211() {};
00100 };
00101 
00102 #endif /* DECIDER80211_H_ */