A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
wifi-default-protection-manager.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2020 Universita' degli Studi di Napoli Federico II
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Stefano Avallone <stavallo@unina.it>
7
*/
8
9
#ifndef WIFI_DEFAULT_PROTECTION_MANAGER_H
10
#define WIFI_DEFAULT_PROTECTION_MANAGER_H
11
12
#include "
wifi-protection-manager.h
"
13
14
namespace
ns3
15
{
16
17
class
WifiTxParameters;
18
class
WifiMpdu;
19
class
WifiMacHeader;
20
21
/**
22
* \ingroup wifi
23
*
24
* WifiDefaultProtectionManager is the default protection manager, which selects
25
* the protection method for a frame based on its size.
26
*/
27
class
WifiDefaultProtectionManager
:
public
WifiProtectionManager
28
{
29
public
:
30
/**
31
* \brief Get the type ID.
32
* \return the object TypeId
33
*/
34
static
TypeId
GetTypeId
();
35
36
WifiDefaultProtectionManager
();
37
~WifiDefaultProtectionManager
()
override
;
38
39
std::unique_ptr<WifiProtection>
TryAddMpdu
(
Ptr<const WifiMpdu>
mpdu,
40
const
WifiTxParameters
& txParams)
override
;
41
std::unique_ptr<WifiProtection>
TryAggregateMsdu
(
Ptr<const WifiMpdu>
msdu,
42
const
WifiTxParameters
& txParams)
override
;
43
44
protected
:
45
/**
46
* Select the protection method for a single PSDU.
47
*
48
* \param hdr the MAC header of the PSDU
49
* \param txParams the TX parameters describing the PSDU
50
* \return the selected protection method
51
*/
52
virtual
std::unique_ptr<WifiProtection>
GetPsduProtection
(
53
const
WifiMacHeader
& hdr,
54
const
WifiTxParameters
& txParams)
const
;
55
56
private
:
57
/**
58
* Calculate the protection method to use if the given MPDU is added to the
59
* current DL MU PPDU (represented by the given TX parameters). If the computed
60
* protection method is the same as the current one, a null pointer is
61
* returned. Otherwise, the computed protection method is returned.
62
* The TX width of the PPDU containing the MU-RTS is the same as the DL MU PPDU
63
* being protected. Each non-AP station is solicited to transmit a CTS occupying a
64
* bandwidth equal to the minimum between the TX width of the DL MU PPDU and the
65
* maximum channel width supported by the non-AP station.
66
*
67
* \param mpdu the given MPDU
68
* \param txParams the TX parameters describing the current DL MU PPDU
69
* \return the new protection method or a null pointer if the protection method
70
* is unchanged
71
*/
72
virtual
std::unique_ptr<WifiProtection>
TryAddMpduToMuPpdu
(
Ptr<const WifiMpdu>
mpdu,
73
const
WifiTxParameters
& txParams);
74
75
/**
76
* Calculate the protection method for the UL MU transmission solicited by the given
77
* Trigger Frame.
78
* The TX width of the PPDU containing the MU-RTS is the same as the TB PPDUs being
79
* solicited by the given Trigger Frame. Each non-AP station is solicited to transmit a CTS
80
* occupying a bandwidth equal to the minimum between the TX width of the PPDU containing
81
* the MU-RTS and the maximum channel width supported by the non-AP station.
82
*
83
* \param mpdu the given Trigger Frame
84
* \param txParams the current TX parameters (just the TXVECTOR needs to be set)
85
* \return the protection method for the UL MU transmission solicited by the given Trigger Frame
86
*/
87
virtual
std::unique_ptr<WifiProtection>
TryUlMuTransmission
(
Ptr<const WifiMpdu>
mpdu,
88
const
WifiTxParameters
& txParams);
89
90
bool
m_sendMuRts
;
//!< true for sending an MU-RTS to protect DL MU PPDUs
91
bool
m_singleRtsPerTxop
;
//!< true for using protection only once in a TXOP
92
};
93
94
}
// namespace ns3
95
96
#endif
/* WIFI_DEFAULT_PROTECTION_MANAGER_H */
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3::WifiDefaultProtectionManager
WifiDefaultProtectionManager is the default protection manager, which selects the protection method f...
Definition
wifi-default-protection-manager.h:28
ns3::WifiDefaultProtectionManager::TryAddMpdu
std::unique_ptr< WifiProtection > TryAddMpdu(Ptr< const WifiMpdu > mpdu, const WifiTxParameters &txParams) override
Determine the protection method to use if the given MPDU is added to the current frame.
Definition
wifi-default-protection-manager.cc:66
ns3::WifiDefaultProtectionManager::~WifiDefaultProtectionManager
~WifiDefaultProtectionManager() override
Definition
wifi-default-protection-manager.cc:60
ns3::WifiDefaultProtectionManager::m_sendMuRts
bool m_sendMuRts
true for sending an MU-RTS to protect DL MU PPDUs
Definition
wifi-default-protection-manager.h:90
ns3::WifiDefaultProtectionManager::TryAggregateMsdu
std::unique_ptr< WifiProtection > TryAggregateMsdu(Ptr< const WifiMpdu > msdu, const WifiTxParameters &txParams) override
Determine the protection method to use if the given MSDU is aggregated to the current frame.
Definition
wifi-default-protection-manager.cc:125
ns3::WifiDefaultProtectionManager::m_singleRtsPerTxop
bool m_singleRtsPerTxop
true for using protection only once in a TXOP
Definition
wifi-default-protection-manager.h:91
ns3::WifiDefaultProtectionManager::WifiDefaultProtectionManager
WifiDefaultProtectionManager()
Definition
wifi-default-protection-manager.cc:55
ns3::WifiDefaultProtectionManager::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
wifi-default-protection-manager.cc:32
ns3::WifiDefaultProtectionManager::TryUlMuTransmission
virtual std::unique_ptr< WifiProtection > TryUlMuTransmission(Ptr< const WifiMpdu > mpdu, const WifiTxParameters &txParams)
Calculate the protection method for the UL MU transmission solicited by the given Trigger Frame.
Definition
wifi-default-protection-manager.cc:332
ns3::WifiDefaultProtectionManager::GetPsduProtection
virtual std::unique_ptr< WifiProtection > GetPsduProtection(const WifiMacHeader &hdr, const WifiTxParameters &txParams) const
Select the protection method for a single PSDU.
Definition
wifi-default-protection-manager.cc:163
ns3::WifiDefaultProtectionManager::TryAddMpduToMuPpdu
virtual std::unique_ptr< WifiProtection > TryAddMpduToMuPpdu(Ptr< const WifiMpdu > mpdu, const WifiTxParameters &txParams)
Calculate the protection method to use if the given MPDU is added to the current DL MU PPDU (represen...
Definition
wifi-default-protection-manager.cc:221
ns3::WifiMacHeader
Implements the IEEE 802.11 MAC header.
Definition
wifi-mac-header.h:87
ns3::WifiProtectionManager
WifiProtectionManager is an abstract base class.
Definition
wifi-protection-manager.h:33
ns3::WifiTxParameters
This class stores the TX parameters (TX vector, protection mechanism, acknowledgment mechanism,...
Definition
wifi-tx-parameters.h:37
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
wifi-protection-manager.h
src
wifi
model
wifi-default-protection-manager.h
Generated on Fri Nov 8 2024 13:59:08 for ns-3 by
1.11.0