INET Framework for OMNeT++/OMNEST
|
decider module for the GilbertElliotSnr module More...
#include <ErrAndCollDecider.h>
Protected Member Functions | |
virtual void | handleLowerMsg (AirFrame *, SnrList &) |
In this function the decision whether a frame is received correctly or not is made. |
decider module for the GilbertElliotSnr module
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.
void ErrAndCollDecider::handleLowerMsg | ( | AirFrame * | frame, |
SnrList & | 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...
If you want to forward the message to upper layers please use sendUp which will decapsulate the MAC frame before sending
Reimplemented from SnrDecider.
{ if (snrOverThreshold(receivedList)) { if (af->hasBitError()) { EV << "Message got lost due to digital channel model BAD state\n"; delete af; } else { EV << "Message handed on to Mac\n"; sendUp(af); } } else { EV << "COLLISION!\n"; delete af; } }