A Discrete-Event Network Simulator
API
nist-error-rate-model.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2010 The Boeing Company
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Gary Pei <guangyu.pei@boeing.com>
19  */
20 
21 #ifndef NIST_ERROR_RATE_MODEL_H
22 #define NIST_ERROR_RATE_MODEL_H
23 
24 #include "error-rate-model.h"
25 #include "wifi-mode.h"
26 
27 namespace ns3 {
28 
38 {
39 public:
44  static TypeId GetTypeId (void);
45 
47 
48 
49 private:
50  double DoGetChunkSuccessRate (WifiMode mode, const WifiTxVector& txVector, double snr, uint64_t nbits,
51  uint8_t numRxAntennas, WifiPpduField field, uint16_t staId) const override;
59  uint8_t GetBValue (WifiCodeRate codeRate) const;
68  double CalculatePe (double p, uint8_t bValue) const;
76  double GetBpskBer (double snr) const;
84  double GetQpskBer (double snr) const;
92  double GetQamBer (uint16_t constellationSize, double snr) const;
102  double GetFecBpskBer (double snr, uint64_t nbits, uint8_t bValue) const;
112  double GetFecQpskBer (double snr, uint64_t nbits, uint8_t bValue) const;
123  double GetFecQamBer (uint16_t constellationSize, double snr, uint64_t nbits, uint8_t bValue) const;
124 };
125 
126 } //namespace ns3
127 
128 #endif /* NIST_ERROR_RATE_MODEL_H */
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::NistErrorRateModel::GetFecBpskBer
double GetFecBpskBer(double snr, uint64_t nbits, uint8_t bValue) const
Return BER of BPSK at the given SNR after applying FEC.
Definition: nist-error-rate-model.cc:82
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::NistErrorRateModel::GetBValue
uint8_t GetBValue(WifiCodeRate codeRate) const
Return the bValue such that coding rate = bValue / (bValue + 1).
Definition: nist-error-rate-model.cc:199
ns3::WifiTxVector
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
Definition: wifi-tx-vector.h:71
ns3::NistErrorRateModel::GetBpskBer
double GetBpskBer(double snr) const
Return BER of BPSK at the given SNR.
Definition: nist-error-rate-model.cc:50
ns3::WifiCodeRate
uint16_t WifiCodeRate
These constants define the various convolutional coding rates used for the OFDM transmission modes in...
Definition: wifi-phy-common.h:45
ns3::WifiMode
represent a single transmission mode
Definition: wifi-mode.h:48
ns3::NistErrorRateModel::GetQamBer
double GetQamBer(uint16_t constellationSize, double snr) const
Return BER of QAM for a given constellation size at the given SNR.
Definition: nist-error-rate-model.cc:70
ns3::ErrorRateModel
the interface for Wifi's error models
Definition: error-rate-model.h:35
wifi-mode.h
ns3::WifiPpduField
WifiPpduField
The type of PPDU field (grouped for convenience)
Definition: wifi-phy-common.h:171
ns3::NistErrorRateModel::GetFecQamBer
double GetFecQamBer(uint16_t constellationSize, double snr, uint64_t nbits, uint8_t bValue) const
Return BER of QAM for a given constellation size at the given SNR after applying FEC.
Definition: nist-error-rate-model.cc:184
ns3::NistErrorRateModel::GetQpskBer
double GetQpskBer(double snr) const
Return BER of QPSK at the given SNR.
Definition: nist-error-rate-model.cc:60
ns3::NistErrorRateModel
A model for the error rate for different modulations.
Definition: nist-error-rate-model.h:38
ns3::NistErrorRateModel::NistErrorRateModel
NistErrorRateModel()
Definition: nist-error-rate-model.cc:45
ns3::NistErrorRateModel::CalculatePe
double CalculatePe(double p, uint8_t bValue) const
Return the coded BER for the given p and b.
Definition: nist-error-rate-model.cc:112
ns3::NistErrorRateModel::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: nist-error-rate-model.cc:35
error-rate-model.h
ns3::NistErrorRateModel::DoGetChunkSuccessRate
double DoGetChunkSuccessRate(WifiMode mode, const WifiTxVector &txVector, double snr, uint64_t nbits, uint8_t numRxAntennas, WifiPpduField field, uint16_t staId) const override
A pure virtual method that must be implemented in the subclass.
Definition: nist-error-rate-model.cc:220
ns3::NistErrorRateModel::GetFecQpskBer
double GetFecQpskBer(double snr, uint64_t nbits, uint8_t bValue) const
Return BER of QPSK at the given SNR after applying FEC.
Definition: nist-error-rate-model.cc:97