Implements the StochasticErrorModel model, see the NED file for details.
More...
#include <StochasticErrorModel.h>
|
| | StochasticErrorModel () |
| |
| virtual std::ostream & | printToStream (std::ostream &stream, int level, int evFlags=0) const override |
| | Prints this object to the provided output stream. More...
|
| |
| 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...
|
| |
| virtual | ~IPrintableObject () |
| |
| virtual std::string | printToString () const |
| |
| virtual std::string | printToString (int level, int evFlags=0) const |
| |
| virtual std::string | getInfoStringRepresentation (int evFlags=0) const |
| |
| virtual std::string | getDetailStringRepresentation (int evFlags=0) const |
| |
| virtual std::string | getDebugStringRepresentation (int evFlags=0) const |
| |
| virtual std::string | getTraceStringRepresentation (int evFlags=0) const |
| |
| virtual std::string | getCompleteStringRepresentation (int evFlags=0) const |
| |
|
| enum | CorruptionMode {
CorruptionMode::CM_UNDEFINED = -1,
CorruptionMode::CM_PACKET,
CorruptionMode::CM_CHUNK,
CorruptionMode::CM_BYTE,
CorruptionMode::CM_BIT
} |
| |
| enum | SnirMode { SnirMode::SM_UNDEFINED = -1,
SnirMode::SM_MIN,
SnirMode::SM_MEAN
} |
| |
| enum | PrintLevel {
PRINT_LEVEL_TRACE,
PRINT_LEVEL_DEBUG,
PRINT_LEVEL_DETAIL,
PRINT_LEVEL_INFO,
PRINT_LEVEL_COMPLETE = INT_MIN
} |
| |
| enum | PrintFlag { PRINT_FLAG_FORMATTED = (1 << 0),
PRINT_FLAG_MULTILINE = (1 << 1)
} |
| |
Implements the StochasticErrorModel model, see the NED file for details.
◆ StochasticErrorModel()
| inet::physicallayer::StochasticErrorModel::StochasticErrorModel |
( |
| ) |
|
◆ computeBitErrorRate()
◆ computePacketErrorRate()
Returns the packet error rate based on SNIR, modulation, FEC encoding and any other physical layer characteristics.
Implements inet::physicallayer::IErrorModel.
47 const IReception *reception = snir->getReception();
49 double factor = reception->getDuration(part) / reception->getDuration();
53 const FlatTransmissionBase *flatTransmission = check_and_cast<const FlatTransmissionBase *>(reception->getTransmission());
55 double headerSuccessRate = pow(1.0 -
bitErrorRate,
b(flatTransmission->getHeaderLength()).get());
56 double dataSuccessRate = pow(1.0 -
bitErrorRate,
b(flatTransmission->getDataLength()).get());
59 return 1.0 - headerSuccessRate * dataSuccessRate;
63 return 1.0 - headerSuccessRate;
65 return 1.0 - dataSuccessRate;
◆ computeSymbolErrorRate()
◆ initialize()
| void inet::physicallayer::StochasticErrorModel::initialize |
( |
int |
stage | ) |
|
|
overrideprotectedvirtual |
◆ printToStream()
| std::ostream & inet::physicallayer::StochasticErrorModel::printToStream |
( |
std::ostream & |
stream, |
|
|
int |
level, |
|
|
int |
evFlags = 0 |
|
) |
| const |
|
overridevirtual |
Prints this object to the provided output stream.
Reimplemented from inet::IPrintableObject.
37 stream <<
"StochasticErrorModel"
◆ bitErrorRate
| double inet::physicallayer::StochasticErrorModel::bitErrorRate |
|
protected |
◆ packetErrorRate
| double inet::physicallayer::StochasticErrorModel::packetErrorRate |
|
protected |
◆ symbolErrorRate
| double inet::physicallayer::StochasticErrorModel::symbolErrorRate |
|
protected |
The documentation for this class was generated from the following files: