#include <ErrAndCollDecider.h>
Inherits SnrDecider.
Inheritance diagram for ErrAndCollDecider:
Protected Member Functions | |
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... | |
Private Member Functions | |
Module_Class_Members (ErrAndCollDecider, SnrDecider, 0) |
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!). If there is such a level the packet is considered to be lost due to a collision. On top of that the packet can also be lost due to the BAD state of the digital channel model model (see e.g. GilbertElliotSnr module). This module should be used in combination with digital channel modules like GilbertElliotSnr.
|
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; } Reimplemented from SnrDecider. |
|
Handle self messages such as timer... Define this function if you want to timer or other kinds of self messages Reimplemented from SnrDecider. |