A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 #ifndef NIST_ERROR_RATE_MODEL_H
21 #define NIST_ERROR_RATE_MODEL_H
22 
23 #include <stdint.h>
24 #include "wifi-mode.h"
25 #include "error-rate-model.h"
26 #include "dsss-error-rate-model.h"
27 
28 namespace ns3 {
29 
39 {
40 public:
41  static TypeId GetTypeId (void);
42 
44 
45  virtual double GetChunkSuccessRate (WifiMode mode, double snr, uint32_t nbits) const;
46 
47 private:
55  double CalculatePe (double p, uint32_t bValue) const;
62  double GetBpskBer (double snr) const;
69  double GetQpskBer (double snr) const;
76  double Get16QamBer (double snr) const;
83  double Get64QamBer (double snr) const;
92  double GetFecBpskBer (double snr, uint32_t nbits,
93  uint32_t bValue) const;
102  double GetFecQpskBer (double snr, uint32_t nbits,
103  uint32_t bValue) const;
112  double GetFec16QamBer (double snr, uint32_t nbits,
113  uint32_t bValue) const;
122  double GetFec64QamBer (double snr, uint32_t nbits,
123  uint32_t bValue) const;
124 };
125 
126 
127 } // namespace ns3
128 
129 #endif /* NIST_ERROR_RATE_MODEL_H */
double GetQpskBer(double snr) const
Return BER of QPSK at the given SNR.
static TypeId GetTypeId(void)
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:91
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.
double Get16QamBer(double snr) const
Return BER of QAM16 at the given SNR.
A model for the error rate for different modulations.
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 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:49
virtual double GetChunkSuccessRate(WifiMode mode, double snr, uint32_t nbits) const
A pure virtual method that must be implemented in the subclass.
double GetBpskBer(double snr) const
Return BER of BPSK at the given SNR.