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-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_PROTECTION_MANAGER_H
10
#define WIFI_PROTECTION_MANAGER_H
11
12
#include "
wifi-protection.h
"
13
14
#include "ns3/object.h"
15
16
#include <memory>
17
18
namespace
ns3
19
{
20
21
class
WifiTxParameters;
22
class
WifiMpdu;
23
class
WifiMac;
24
class
WifiRemoteStationManager;
25
26
/**
27
* \ingroup wifi
28
*
29
* WifiProtectionManager is an abstract base class. Each subclass defines a logic
30
* to select the protection method for a given frame.
31
*/
32
class
WifiProtectionManager
:
public
Object
33
{
34
public
:
35
/**
36
* \brief Get the type ID.
37
* \return the object TypeId
38
*/
39
static
TypeId
GetTypeId
();
40
WifiProtectionManager
();
41
~WifiProtectionManager
()
override
;
42
43
/**
44
* Set the MAC which is using this Protection Manager
45
*
46
* \param mac a pointer to the MAC
47
*/
48
void
SetWifiMac
(
Ptr<WifiMac>
mac);
49
/**
50
* Set the ID of the link this Protection Manager is associated with.
51
*
52
* \param linkId the ID of the link this Protection Manager is associated with
53
*/
54
void
SetLinkId
(uint8_t linkId);
55
56
/**
57
* Determine the protection method to use if the given MPDU is added to the current
58
* frame. Return a null pointer if the protection method is unchanged or the new
59
* protection method otherwise.
60
*
61
* \param mpdu the MPDU to be added to the current frame
62
* \param txParams the current TX parameters for the current frame
63
* \return a null pointer if the protection method is unchanged or the new
64
* protection method otherwise
65
*/
66
virtual
std::unique_ptr<WifiProtection>
TryAddMpdu
(
Ptr<const WifiMpdu>
mpdu,
67
const
WifiTxParameters
& txParams) = 0;
68
69
/**
70
* Determine the protection method to use if the given MSDU is aggregated to the
71
* current frame. Return a null pointer if the protection method is unchanged or
72
* the new protection method otherwise.
73
*
74
* \param msdu the MSDU to be aggregated to the current frame
75
* \param txParams the current TX parameters for the current frame
76
* \return a null pointer if the protection method is unchanged or the new
77
* protection method otherwise
78
*/
79
virtual
std::unique_ptr<WifiProtection>
TryAggregateMsdu
(
Ptr<const WifiMpdu>
msdu,
80
const
WifiTxParameters
& txParams) = 0;
81
82
protected
:
83
void
DoDispose
()
override
;
84
85
/**
86
* \return the remote station manager operating on our link
87
*/
88
Ptr<WifiRemoteStationManager>
GetWifiRemoteStationManager
()
const
;
89
90
/**
91
* Add a User Info field to the given MU-RTS Trigger Frame to solicit a CTS from
92
* the station with the given MAC address. The MU-RTS is intended to protect a data
93
* frame having the given TX width. The TX width of the solicited CTS is the minimum
94
* between the TX width of the protected data frame and the maximum width supported
95
* by the solicited station.
96
*
97
* \param muRts the MU-RTS Trigger Frame
98
* \param txWidth the TX width of the protected data frame
99
* \param receiver the MAC address of the solicited station
100
*/
101
void
AddUserInfoToMuRts
(
CtrlTriggerHeader
& muRts,
102
MHz_u
txWidth,
103
const
Mac48Address
& receiver)
const
;
104
105
Ptr<WifiMac>
m_mac
;
//!< MAC which is using this Protection Manager
106
uint8_t
m_linkId
;
//!< ID of the link this Protection Manager is operating on
107
};
108
109
}
// namespace ns3
110
111
#endif
/* WIFI_PROTECTION_MANAGER_H */
double
ns3::CtrlTriggerHeader
Headers for Trigger frames.
Definition
ctrl-headers.h:931
ns3::Mac48Address
an EUI-48 address
Definition
mac48-address.h:35
ns3::Object
A base class which provides memory management and object aggregation.
Definition
object.h:78
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::WifiProtectionManager
WifiProtectionManager is an abstract base class.
Definition
wifi-protection-manager.h:33
ns3::WifiProtectionManager::DoDispose
void DoDispose() override
Destructor implementation.
Definition
wifi-protection-manager.cc:43
ns3::WifiProtectionManager::WifiProtectionManager
WifiProtectionManager()
Definition
wifi-protection-manager.cc:31
ns3::WifiProtectionManager::TryAggregateMsdu
virtual std::unique_ptr< WifiProtection > TryAggregateMsdu(Ptr< const WifiMpdu > msdu, const WifiTxParameters &txParams)=0
Determine the protection method to use if the given MSDU is aggregated to the current frame.
ns3::WifiProtectionManager::~WifiProtectionManager
~WifiProtectionManager() override
Definition
wifi-protection-manager.cc:37
ns3::WifiProtectionManager::m_mac
Ptr< WifiMac > m_mac
MAC which is using this Protection Manager.
Definition
wifi-protection-manager.h:105
ns3::WifiProtectionManager::AddUserInfoToMuRts
void AddUserInfoToMuRts(CtrlTriggerHeader &muRts, MHz_u txWidth, const Mac48Address &receiver) const
Add a User Info field to the given MU-RTS Trigger Frame to solicit a CTS from the station with the gi...
Definition
wifi-protection-manager.cc:71
ns3::WifiProtectionManager::GetWifiRemoteStationManager
Ptr< WifiRemoteStationManager > GetWifiRemoteStationManager() const
Definition
wifi-protection-manager.cc:58
ns3::WifiProtectionManager::m_linkId
uint8_t m_linkId
ID of the link this Protection Manager is operating on.
Definition
wifi-protection-manager.h:106
ns3::WifiProtectionManager::TryAddMpdu
virtual std::unique_ptr< WifiProtection > TryAddMpdu(Ptr< const WifiMpdu > mpdu, const WifiTxParameters &txParams)=0
Determine the protection method to use if the given MPDU is added to the current frame.
ns3::WifiProtectionManager::SetLinkId
void SetLinkId(uint8_t linkId)
Set the ID of the link this Protection Manager is associated with.
Definition
wifi-protection-manager.cc:64
ns3::WifiProtectionManager::SetWifiMac
void SetWifiMac(Ptr< WifiMac > mac)
Set the MAC which is using this Protection Manager.
Definition
wifi-protection-manager.cc:51
ns3::WifiProtectionManager::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
wifi-protection-manager.cc:24
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.h
src
wifi
model
wifi-protection-manager.h
Generated on Fri Nov 8 2024 13:59:08 for ns-3 by
1.11.0