A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
table-based-error-rate-model.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2020 University of Washington
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Authors: Rohan Patidar <rpatidar@uw.edu>
18
* Sébastien Deronne <sebastien.deronne@gmail.com>
19
*/
20
21
#ifndef TABLE_BASED_ERROR_RATE_MODEL_H
22
#define TABLE_BASED_ERROR_RATE_MODEL_H
23
24
#include "
error-rate-model.h
"
25
#include "
wifi-mode.h
"
26
27
#include "ns3/error-rate-tables.h"
28
29
#include <optional>
30
31
namespace
ns3
32
{
33
34
class
WifiTxVector;
35
36
/*
37
* \ingroup wifi
38
* \brief the interface for the table-driven OFDM error model
39
*
40
*/
41
class
TableBasedErrorRateModel
:
public
ErrorRateModel
42
{
43
public
:
48
static
TypeId
GetTypeId
();
49
50
TableBasedErrorRateModel
();
51
~TableBasedErrorRateModel
()
override
;
52
58
static
std::optional<uint8_t>
GetMcsForMode
(
WifiMode
mode);
59
60
private
:
61
double
DoGetChunkSuccessRate
(
WifiMode
mode,
62
const
WifiTxVector
& txVector,
63
double
snr,
64
uint64_t nbits,
65
uint8_t numRxAntennas,
66
WifiPpduField
field,
67
uint16_t staId)
const override
;
68
76
double
RoundSnr
(
double
snr,
double
precision)
const
;
77
86
double
FetchFsr
(
WifiMode
mode,
const
WifiTxVector
& txVector,
double
snr, uint64_t nbits)
const
;
87
88
Ptr<ErrorRateModel>
89
m_fallbackErrorModel
;
90
91
uint64_t
m_threshold
;
92
};
93
94
}
// namespace ns3
95
96
#endif
/* TABLE_BASED_ERROR_RATE_MODEL_H */
ns3::ErrorRateModel
the interface for Wifi's error models
Definition:
error-rate-model.h:36
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
ns3::TableBasedErrorRateModel
Definition:
table-based-error-rate-model.h:42
ns3::TableBasedErrorRateModel::m_fallbackErrorModel
Ptr< ErrorRateModel > m_fallbackErrorModel
Error rate model to fallback to if no value is found in the table.
Definition:
table-based-error-rate-model.h:89
ns3::TableBasedErrorRateModel::~TableBasedErrorRateModel
~TableBasedErrorRateModel() override
Definition:
table-based-error-rate-model.cc:73
ns3::TableBasedErrorRateModel::GetMcsForMode
static std::optional< uint8_t > GetMcsForMode(WifiMode mode)
Utility function to convert WifiMode to an MCS value.
Definition:
table-based-error-rate-model.cc:88
ns3::TableBasedErrorRateModel::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:
table-based-error-rate-model.cc:150
ns3::TableBasedErrorRateModel::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
table-based-error-rate-model.cc:47
ns3::TableBasedErrorRateModel::TableBasedErrorRateModel
TableBasedErrorRateModel()
Definition:
table-based-error-rate-model.cc:68
ns3::TableBasedErrorRateModel::FetchFsr
double FetchFsr(WifiMode mode, const WifiTxVector &txVector, double snr, uint64_t nbits) const
Fetch the frame success rate for a given Wi-Fi mode, TXVECTOR, SNR and frame size.
ns3::TableBasedErrorRateModel::RoundSnr
double RoundSnr(double snr, double precision) const
Round SNR (in dB) to the specified precision.
Definition:
table-based-error-rate-model.cc:80
ns3::TableBasedErrorRateModel::m_threshold
uint64_t m_threshold
Threshold in bytes over which the table for large size frames is used.
Definition:
table-based-error-rate-model.h:91
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::WifiMode
represent a single transmission mode
Definition:
wifi-mode.h:51
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:111
error-rate-model.h
ns3::WifiPpduField
WifiPpduField
The type of PPDU field (grouped for convenience)
Definition:
wifi-phy-common.h:307
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
wifi-mode.h
src
wifi
model
table-based-error-rate-model.h
Generated on Sun Mar 3 2024 17:11:11 for ns-3 by
1.9.1