#include <SnrEval80211.h>
Inheritance diagram for SnrEval80211:
Subclass of SnrEval. Basically the same except for some extra parameters of 802.11 and the duration of the packet that has to be computed differently as the modualtion of header and data part of the packet are different. This module forms a physical layer together with the Decider80211 module. The resluting physical layer is intended to be used together with the Mac80211 module.
Protected Member Functions | |
virtual void | initialize (int) |
Some extra parameters have to be read in. | |
virtual double | calcDuration (cMessage *) |
computes the duration of a 802.11 frame in seconds |
|
computes the duration of a 802.11 frame in seconds The duration of the packet is computed, with respect to the different bitrates of header and data. The header is sent with 1Mbit/s and the rest with the bitrate read in in initialize(). Reimplemented from BasicSnrEval. 00040 { 00041 EV << "bits without header: " << frame->length() - 00042 headerLength << ", bits header: " << headerLength << endl; 00043 return ((frame->length() - headerLength) / bitrate + headerLength / BITRATE_HEADER); 00044 }
|
|
Some extra parameters have to be read in.
Reimplemented from SnrEval. 00021 { 00022 SnrEval::initialize(stage); 00023 00024 if (stage == 0) 00025 { 00026 EV << "initializing stage 0\n"; 00027 if (bitrate != 1E+6 && bitrate != 2E+6 && bitrate != 5.5E+6 && bitrate != 11E+6) 00028 error("Wrong bitrate!! Please chose 1E+6, 2E+6, 5.5E+6 or 11E+6 as bitrate!!"); 00029 headerLength = 192; //has to be 192; this makes sure it is! 00030 } 00031 }
|