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 "dsss-error-rate-model.h"
26 
27 namespace ns3 {
28 
38 {
39 public:
44  static TypeId GetTypeId (void);
45 
47 
48  double GetChunkSuccessRate (WifiMode mode, WifiTxVector txVector, double snr, uint32_t nbits) const;
49 
50 
51 private:
60  double CalculatePe (double p, uint32_t bValue) const;
68  double GetBpskBer (double snr) const;
76  double GetQpskBer (double snr) const;
84  double Get16QamBer (double snr) const;
92  double Get64QamBer (double snr) const;
99  double Get256QamBer (double snr) const;
106  double Get1024QamBer (double snr) const;
116  double GetFecBpskBer (double snr, uint32_t nbits,
117  uint32_t bValue) const;
127  double GetFecQpskBer (double snr, uint32_t nbits,
128  uint32_t bValue) const;
138  double GetFec16QamBer (double snr, uint32_t nbits,
139  uint32_t bValue) const;
149  double GetFec64QamBer (double snr, uint32_t nbits,
150  uint32_t bValue) const;
159  double GetFec256QamBer (double snr, uint32_t nbits,
160  uint32_t bValue) const;
169  double GetFec1024QamBer (double snr, uint32_t nbits,
170  uint32_t bValue) const;
171 };
172 
173 } //namespace ns3
174 
175 #endif /* NIST_ERROR_RATE_MODEL_H */
double GetQpskBer(double snr) const
Return BER of QPSK at the given SNR.
static TypeId GetTypeId(void)
Get the type ID.
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 Get1024QamBer(double snr) const
Return BER of QAM1024 at the given SNR.
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:97
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 GetFec1024QamBer(double snr, uint32_t nbits, uint32_t bValue) const
Return BER of QAM1024 at the given SNR after applying FEC.
double CalculatePe(double p, uint32_t bValue) const
Return the coded BER for the given p and b.
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.