A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
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
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2020 University of Washington
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
* Authors: Rohan Patidar <rpatidar@uw.edu>
19
* Sébastien Deronne <sebastien.deronne@gmail.com>
20
*/
21
22
#ifndef TABLE_BASED_ERROR_RATE_MODEL_H
23
#define TABLE_BASED_ERROR_RATE_MODEL_H
24
25
#include "ns3/error-rate-tables.h"
26
#include "
error-rate-model.h
"
27
#include "
wifi-mode.h
"
28
#include <optional>
29
30
namespace
ns3
{
31
32
class
WifiTxVector;
33
34
/*
35
* \ingroup wifi
36
* \brief the interface for the table-driven OFDM error model
37
*
38
*/
39
class
TableBasedErrorRateModel
:
public
ErrorRateModel
40
{
41
public
:
46
static
TypeId
GetTypeId
(
void
);
47
48
TableBasedErrorRateModel
();
49
~TableBasedErrorRateModel
();
50
56
static
std::optional<uint8_t>
GetMcsForMode
(
WifiMode
mode);
57
58
59
private
:
60
double
DoGetChunkSuccessRate
(
WifiMode
mode,
const
WifiTxVector
& txVector,
double
snr, uint64_t nbits,
61
uint8_t numRxAntennas,
WifiPpduField
field, uint16_t staId)
const override
;
62
70
double
RoundSnr
(
double
snr,
double
precision)
const
;
71
80
double
FetchFsr
(
WifiMode
mode,
const
WifiTxVector
& txVector,
double
snr, uint64_t nbits)
const
;
81
82
Ptr<ErrorRateModel>
m_fallbackErrorModel
;
83
84
uint64_t
m_threshold
;
85
};
86
87
}
//namespace ns3
88
89
#endif
/* TABLE_BASED_ERROR_RATE_MODEL_H */
ns3::ErrorRateModel
the interface for Wifi's error models
Definition:
error-rate-model.h:35
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:74
ns3::TableBasedErrorRateModel
Introspection did not find any typical Config paths.
Definition:
table-based-error-rate-model.h:40
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:82
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:85
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:147
ns3::TableBasedErrorRateModel::TableBasedErrorRateModel
TableBasedErrorRateModel()
Definition:
table-based-error-rate-model.cc:64
ns3::TableBasedErrorRateModel::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
table-based-error-rate-model.cc:44
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::~TableBasedErrorRateModel
~TableBasedErrorRateModel()
Definition:
table-based-error-rate-model.cc:69
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:77
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:84
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::WifiMode
represent a single transmission mode
Definition:
wifi-mode.h:48
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:86
error-rate-model.h
ns3::WifiPpduField
WifiPpduField
The type of PPDU field (grouped for convenience)
Definition:
wifi-phy-common.h:171
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 Tue Feb 6 2024 19:21:29 for ns-3 by
1.9.1