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 <stdint.h>
25 #include "wifi-mode.h"
26 #include "error-rate-model.h"
27 #include "dsss-error-rate-model.h"
28 
29 namespace ns3 {
30 
40 {
41 public:
42  static TypeId GetTypeId (void);
43 
45 
46  virtual double GetChunkSuccessRate (WifiMode mode, WifiTxVector txVector, double snr, uint32_t nbits) const;
47 
48 
49 private:
58  double CalculatePe (double p, uint32_t bValue) const;
66  double GetBpskBer (double snr) const;
74  double GetQpskBer (double snr) const;
82  double Get16QamBer (double snr) const;
90  double Get64QamBer (double snr) const;
97  double Get256QamBer (double snr) const;
107  double GetFecBpskBer (double snr, uint32_t nbits,
108  uint32_t bValue) const;
118  double GetFecQpskBer (double snr, uint32_t nbits,
119  uint32_t bValue) const;
129  double GetFec16QamBer (double snr, uint32_t nbits,
130  uint32_t bValue) const;
140  double GetFec64QamBer (double snr, uint32_t nbits,
141  uint32_t bValue) const;
150  double GetFec256QamBer (double snr, uint32_t nbits,
151  uint32_t bValue) const;
152 };
153 
154 } //namespace ns3
155 
156 #endif /* NIST_ERROR_RATE_MODEL_H */
double GetQpskBer(double snr) const
Return BER of QPSK at the given SNR.
static TypeId GetTypeId(void)
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
double GetFec64QamBer(double snr, uint32_t nbits, uint32_t bValue) const
Return BER of QAM64 at the given SNR after applying FEC.
double GetFec16QamBer(double snr, uint32_t nbits, uint32_t bValue) const
Return BER of QAM16 at the given SNR after applying FEC.
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:99
double GetFec256QamBer(double snr, uint32_t nbits, uint32_t bValue) const
Return BER of QAM256 at the given SNR after applying FEC.
the interface for Wifi's error models
double CalculatePe(double p, uint32_t bValue) const
Return the coded BER for the given p and b.
virtual double GetChunkSuccessRate(WifiMode mode, WifiTxVector txVector, double snr, uint32_t nbits) const
A pure virtual method that must be implemented in the subclass.
double Get16QamBer(double snr) const
Return BER of QAM16 at the given SNR.
A model for the error rate for different modulations.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
double GetFecQpskBer(double snr, uint32_t nbits, uint32_t bValue) const
Return BER of QPSK at the given SNR after applying FEC.
double Get64QamBer(double snr) const
Return BER of QAM64 at the given SNR.
double Get256QamBer(double snr) const
Return BER of QAM256 at the given SNR.
double GetFecBpskBer(double snr, uint32_t nbits, uint32_t bValue) const
Return BER of BPSK at the given SNR after applying FEC.
a unique identifier for an interface.
Definition: type-id.h:58
double GetBpskBer(double snr) const
Return BER of BPSK at the given SNR.