00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef DECIDER_80211_H
00022 #define DECIDER_80211_H
00023
00024 #include <omnetpp.h>
00025
00026 #include <BasicLayer.h>
00027 #include <AirFrame80211_m.h>
00028 #include "Consts80211.h"
00029 #include "PhyControlInfo.h"
00030
00045 class Decider80211 : public BasicLayer
00046 {
00047 Module_Class_Members(Decider80211, BasicLayer,0);
00048
00049 public:
00051 virtual void initialize(int);
00052
00053 protected:
00058 virtual void handleLowerMsg(cMessage *msg);
00059
00063 virtual void handleUpperMsg(cMessage *msg) {
00064 error("Decider80211 does not handle messages from upper layers");
00065 }
00066
00067 virtual void handleSelfMsg(cMessage *msg) {
00068 error("Decider80211 does not handle selfmessages");
00069 }
00070
00074 virtual void handleLowerControl(cMessage *msg) {
00075 sendControlUp(msg);
00076 };
00077
00079 double dB2fraction(double);
00080
00082 bool packetOk(double, int, double bitrate);
00083
00084 #ifdef _WIN32
00085
00094 double erfc(double);
00095 #endif
00096
00097 protected:
00099 double bitrate;
00103 double snirThreshold;
00104
00105 };
00106 #endif
00107
00108