Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | Related Pages

SnrDecider Class Reference
[decider - decider modules]

a simple snr decider... More...

#include <SnrDecider.h>

Inherits BasicDecider.

Inherited by ErrAndCollDecider.

Inheritance diagram for SnrDecider:

Inheritance graph
[legend]
Collaboration diagram for SnrDecider:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Module_Class_Members (SnrDecider, BasicDecider, 0)
virtual void initialize (int)
 Initialization of the module and some variables.

Protected Member Functions

bool snrOverThreshold (const SnrList &) const
virtual void handleLowerMsg (AirFrame *, const SnrList &)
 In this function the decision whether a frame is received correctly or not is made.
virtual void handleSelfMsg (cMessage *msg)
 Handle self messages such as timer...

Protected Attributes

double snrThresholdLevel
 Level for decision [mW].

Detailed Description

a simple snr decider...

This decider simply takes a look at the sduList contained in the received PhySDU packet and checks whether one of the mentioned snr levels is lower than the snrThresholdLevel which has to be read in at the beginning of a simulation. (suggestion: from the omnetpp.ini file!)

Author:
Marc Löbbers, Andreas Koepke


Member Function Documentation

void SnrDecider::handleLowerMsg AirFrame *  ,
const SnrList
[protected, virtual]
 

In this function the decision whether a frame is received correctly or not is made.

Redefine this function if you want to process messages from the channel before they are forwarded to upper layers

In this function it has to be decided whether this message got lost or not. This can be done with a simple SNR threshold or with transformations of SNR into bit error probabilities...

Afterwrads the message has to be decapsulated (decapsMsg) and send to the MAC layer (sendUp)

just an example how to handle the snrList...:

bool correct = true; //check the entries in the snrList if a level greater than the //acceptable minimum occured: double min = 0.0000000000000001; // just a senseless example

for (SnrList::iterator iter = snrList.begin(); iter != snrList.end(); iter++){ if (iter->snr < min) correct = false; }

if (correct){ sendUp(frame); } else{ delete frame; }

Implements BasicDecider.

Reimplemented in ErrAndCollDecider.

virtual void SnrDecider::handleSelfMsg cMessage *  msg  )  [inline, protected, virtual]
 

Handle self messages such as timer...

Define this function if you want to timer or other kinds of self messages

Implements BasicDecider.

Reimplemented in ErrAndCollDecider.

void SnrDecider::initialize int  stage  )  [virtual]
 

Initialization of the module and some variables.

First we have to initialize the module from which we derived ours, in this case BasicModule.

Then we have to intialize the gates and - if necessary - some own variables.

Reimplemented from BasicDecider.

bool SnrDecider::snrOverThreshold const SnrList snrlist  )  const [protected]
 

Checks the received sduList (from the PhySDU header) if it contains an snr level above the threshold


Member Data Documentation

double SnrDecider::snrThresholdLevel [protected]
 

Level for decision [mW].

When a packet contains an snr level higher than snrThresholdLevel it will be considered as lost. This parameter has to be specified at the beginning of a simulation (omnetpp.ini) in dBm.


The documentation for this class was generated from the following files:
Generated on Fri Jan 12 08:30:20 2007 for Mobility Framework by  doxygen 1.4.4