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
* 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
* Author: Stefano Avallone <stavallo@unina.it>
18
*/
19
20
#ifndef WIFI_DEFAULT_PROTECTION_MANAGER_H
21
#define WIFI_DEFAULT_PROTECTION_MANAGER_H
22
23
#include "
wifi-protection-manager.h
"
24
25
namespace
ns3
26
{
27
28
class
WifiTxParameters;
29
class
WifiMpdu;
30
class
WifiMacHeader;
31
32
/**
33
* \ingroup wifi
34
*
35
* WifiDefaultProtectionManager is the default protection manager, which selects
36
* the protection method for a frame based on its size.
37
*/
38
class
WifiDefaultProtectionManager
:
public
WifiProtectionManager
39
{
40
public
:
41
/**
42
* \brief Get the type ID.
43
* \return the object TypeId
44
*/
45
static
TypeId
GetTypeId
();
46
47
WifiDefaultProtectionManager
();
48
~WifiDefaultProtectionManager
()
override
;
49
50
std::unique_ptr<WifiProtection>
TryAddMpdu
(
Ptr<const WifiMpdu>
mpdu,
51
const
WifiTxParameters
& txParams)
override
;
52
std::unique_ptr<WifiProtection>
TryAggregateMsdu
(
Ptr<const WifiMpdu>
msdu,
53
const
WifiTxParameters
& txParams)
override
;
54
55
protected
:
56
/**
57
* Select the protection method for a single PSDU.
58
*
59
* \param hdr the MAC header of the PSDU
60
* \param txParams the TX parameters describing the PSDU
61
* \return the selected protection method
62
*/
63
virtual
std::unique_ptr<WifiProtection>
GetPsduProtection
(
64
const
WifiMacHeader
& hdr,
65
const
WifiTxParameters
& txParams)
const
;
66
67
private
:
68
/**
69
* Calculate the protection method to use if the given MPDU is added to the
70
* current DL MU PPDU (represented by the given TX parameters). If the computed
71
* protection method is the same as the current one, a null pointer is
72
* returned. Otherwise, the computed protection method is returned.
73
* The TX width of the PPDU containing the MU-RTS is the same as the DL MU PPDU
74
* being protected. Each non-AP station is solicited to transmit a CTS occupying a
75
* bandwidth equal to the minimum between the TX width of the DL MU PPDU and the
76
* maximum channel width supported by the non-AP station.
77
*
78
* \param mpdu the given MPDU
79
* \param txParams the TX parameters describing the current DL MU PPDU
80
* \return the new protection method or a null pointer if the protection method
81
* is unchanged
82
*/
83
virtual
std::unique_ptr<WifiProtection>
TryAddMpduToMuPpdu
(
Ptr<const WifiMpdu>
mpdu,
84
const
WifiTxParameters
& txParams);
85
86
/**
87
* Calculate the protection method for the UL MU transmission solicited by the given
88
* Trigger Frame.
89
* The TX width of the PPDU containing the MU-RTS is the same as the TB PPDUs being
90
* solicited by the given Trigger Frame. Each non-AP station is solicited to transmit a CTS
91
* occupying a bandwidth equal to the minimum between the TX width of the PPDU containing
92
* the MU-RTS and the maximum channel width supported by the non-AP station.
93
*
94
* \param mpdu the given Trigger Frame
95
* \param txParams the current TX parameters (just the TXVECTOR needs to be set)
96
* \return the protection method for the UL MU transmission solicited by the given Trigger Frame
97
*/
98
virtual
std::unique_ptr<WifiProtection>
TryUlMuTransmission
(
Ptr<const WifiMpdu>
mpdu,
99
const
WifiTxParameters
& txParams);
100
101
bool
m_sendMuRts
;
//!< true for sending an MU-RTS to protect DL MU PPDUs
102
bool
m_singleRtsPerTxop
;
//!< true for using protection only once in a TXOP
103
};
104
105
}
// namespace ns3
106
107
#endif
/* WIFI_DEFAULT_PROTECTION_MANAGER_H */
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::WifiDefaultProtectionManager
WifiDefaultProtectionManager is the default protection manager, which selects the protection method f...
Definition:
wifi-default-protection-manager.h:39
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:77
ns3::WifiDefaultProtectionManager::~WifiDefaultProtectionManager
~WifiDefaultProtectionManager() override
Definition:
wifi-default-protection-manager.cc:71
ns3::WifiDefaultProtectionManager::m_sendMuRts
bool m_sendMuRts
true for sending an MU-RTS to protect DL MU PPDUs
Definition:
wifi-default-protection-manager.h:101
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:136
ns3::WifiDefaultProtectionManager::m_singleRtsPerTxop
bool m_singleRtsPerTxop
true for using protection only once in a TXOP
Definition:
wifi-default-protection-manager.h:102
ns3::WifiDefaultProtectionManager::WifiDefaultProtectionManager
WifiDefaultProtectionManager()
Definition:
wifi-default-protection-manager.cc:66
ns3::WifiDefaultProtectionManager::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
wifi-default-protection-manager.cc:43
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:343
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:174
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:232
ns3::WifiMacHeader
Implements the IEEE 802.11 MAC header.
Definition:
wifi-mac-header.h:98
ns3::WifiProtectionManager
WifiProtectionManager is an abstract base class.
Definition:
wifi-protection-manager.h:44
ns3::WifiTxParameters
This class stores the TX parameters (TX vector, protection mechanism, acknowledgment mechanism,...
Definition:
wifi-tx-parameters.h:48
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 Tue May 28 2024 23:40:34 for ns-3 by
1.9.6