INET Framework for OMNeT++/OMNEST
inet::physicallayer::Ieee80211ErrorModelBase Class Referenceabstract

#include <Ieee80211ErrorModelBase.h>

Inheritance diagram for inet::physicallayer::Ieee80211ErrorModelBase:
inet::physicallayer::ErrorModelBase inet::physicallayer::IErrorModel inet::physicallayer::IPrintableObject inet::physicallayer::Ieee80211NistErrorModel inet::physicallayer::Ieee80211YansErrorModel

Public Member Functions

 Ieee80211ErrorModelBase ()
 
virtual double computePacketErrorRate (const ISNIR *snir, IRadioSignal::SignalPart part) const override
 Returns the packet error rate based on SNIR, modulation, FEC encoding and any other physical layer characteristics. More...
 
virtual double computeBitErrorRate (const ISNIR *snir, IRadioSignal::SignalPart part) const override
 Returns the bit error rate based on SNIR, modulation, FEC encoding and any other physical layer characteristics. More...
 
virtual double computeSymbolErrorRate (const ISNIR *snir, IRadioSignal::SignalPart part) const override
 Returns the symbol error rate based on SNIR, modulation, and any other physical layer characteristics. More...
 
- Public Member Functions inherited from inet::physicallayer::IPrintableObject
virtual ~IPrintableObject ()
 
virtual std::ostream & printToStream (std::ostream &stream, int level) const
 Prints this object to the provided output stream. More...
 
virtual std::string getInfoStringRepresentation () const
 
virtual std::string getDetailStringRepresentation () const
 
virtual std::string getDebugStringRepresentation () const
 
virtual std::string getTraceStringRepresentation () const
 
virtual std::string getCompleteStringRepresentation () const
 

Protected Member Functions

virtual double getHeaderSuccessRate (const IIeee80211Mode *mode, unsigned int bitLength, double snr) const =0
 
virtual double getDataSuccessRate (const IIeee80211Mode *mode, unsigned int bitLength, double snr) const =0
 

Additional Inherited Members

- Public Types inherited from inet::physicallayer::IPrintableObject
enum  PrintLevel {
  PRINT_LEVEL_TRACE, PRINT_LEVEL_DEBUG, PRINT_LEVEL_DETAIL, PRINT_LEVEL_INFO,
  PRINT_LEVEL_COMPLETE = INT_MIN
}
 

Constructor & Destructor Documentation

inet::physicallayer::Ieee80211ErrorModelBase::Ieee80211ErrorModelBase ( )
27 {
28 }

Member Function Documentation

double inet::physicallayer::Ieee80211ErrorModelBase::computeBitErrorRate ( const ISNIR snir,
IRadioSignal::SignalPart  part 
) const
overridevirtual

Returns the bit error rate based on SNIR, modulation, FEC encoding and any other physical layer characteristics.

Implements inet::physicallayer::IErrorModel.

54 {
55  Enter_Method_Silent();
56  return NaN;
57 }
#define NaN
Definition: INETMath.h:103
double inet::physicallayer::Ieee80211ErrorModelBase::computePacketErrorRate ( const ISNIR snir,
IRadioSignal::SignalPart  part 
) const
overridevirtual

Returns the packet error rate based on SNIR, modulation, FEC encoding and any other physical layer characteristics.

Implements inet::physicallayer::IErrorModel.

31 {
32  Enter_Method_Silent();
33  const ITransmission *transmission = snir->getReception()->getTransmission();
34  const FlatTransmissionBase *flatTransmission = check_and_cast<const FlatTransmissionBase *>(transmission);
35  const Ieee80211TransmissionBase *ieee80211Transmission = check_and_cast<const Ieee80211TransmissionBase *>(transmission);
36  const IIeee80211Mode *mode = ieee80211Transmission->getMode();
37  double headerSuccessRate = getHeaderSuccessRate(mode, flatTransmission->getHeaderBitLength(), snir->getMin());
38  double dataSuccessRate = getDataSuccessRate(mode, flatTransmission->getDataBitLength(), snir->getMin());
39  switch (part) {
41  return 1.0 - headerSuccessRate * dataSuccessRate;
43  return 0;
45  return 1.0 - headerSuccessRate;
47  return 1.0 - dataSuccessRate;
48  default:
49  throw cRuntimeError("Unknown signal part: '%s'", IRadioSignal::getSignalPartName(part));
50  }
51 }
virtual double getHeaderSuccessRate(const IIeee80211Mode *mode, unsigned int bitLength, double snr) const =0
virtual double getDataSuccessRate(const IIeee80211Mode *mode, unsigned int bitLength, double snr) const =0
static const char * getSignalPartName(SignalPart signalPart)
Returns the name of the provided signal part.
Definition: IRadioSignal.cc:33
double inet::physicallayer::Ieee80211ErrorModelBase::computeSymbolErrorRate ( const ISNIR snir,
IRadioSignal::SignalPart  part 
) const
overridevirtual

Returns the symbol error rate based on SNIR, modulation, and any other physical layer characteristics.

Implements inet::physicallayer::IErrorModel.

60 {
61  Enter_Method_Silent();
62  return NaN;
63 }
#define NaN
Definition: INETMath.h:103
virtual double inet::physicallayer::Ieee80211ErrorModelBase::getDataSuccessRate ( const IIeee80211Mode mode,
unsigned int  bitLength,
double  snr 
) const
protectedpure virtual
virtual double inet::physicallayer::Ieee80211ErrorModelBase::getHeaderSuccessRate ( const IIeee80211Mode mode,
unsigned int  bitLength,
double  snr 
) const
protectedpure virtual

The documentation for this class was generated from the following files: