SnrEval80211 Class Reference

#include <SnrEval80211.h>

Inheritance diagram for SnrEval80211:

SnrEval BasicSnrEval ChannelAccess BasicModule INotifiable List of all members.

Detailed Description

A SnrEval for the 802.11b protocol.

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 modulation of header and data part of the packet are different. This module forms a physical layer together with the Decider80211 module. The resulting physical layer is intended to be used together with the Mac80211 module.

Author:
Marc Löbbers


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


Member Function Documentation

double SnrEval80211::calcDuration ( cMessage *  frame  )  [protected, virtual]

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 }

void SnrEval80211::initialize ( int   )  [protected, virtual]

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 bit rate for 802.11, valid values are 1E+6, 2E+6, 5.5E+6 or 11E+6");
00029         headerLength = 192;     //has to be 192; this makes sure it is!
00030     }
00031 }


The documentation for this class was generated from the following files:
Generated on Wed Apr 4 13:20:24 2007 for INET Framework for OMNeT++/OMNEST by  doxygen 1.4.7