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-ack-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_ACK_MANAGER_H
21
#define WIFI_ACK_MANAGER_H
22
23
#include "
wifi-acknowledgment.h
"
24
25
#include "ns3/object.h"
26
27
#include <memory>
28
29
namespace
ns3
30
{
31
32
class
WifiTxParameters;
33
class
WifiMpdu;
34
class
WifiPsdu;
35
class
WifiMac;
36
class
WifiRemoteStationManager;
37
38
/**
39
* \ingroup wifi
40
*
41
* WifiAckManager is an abstract base class. Each subclass defines a logic
42
* to select the acknowledgment method for a given frame.
43
*/
44
class
WifiAckManager
:
public
Object
45
{
46
public
:
47
/**
48
* \brief Get the type ID.
49
* \return the object TypeId
50
*/
51
static
TypeId
GetTypeId
();
52
WifiAckManager
();
53
~WifiAckManager
()
override
;
54
55
/**
56
* Set the MAC which is using this Acknowledgment Manager
57
*
58
* \param mac a pointer to the MAC
59
*/
60
void
SetWifiMac
(
Ptr<WifiMac>
mac);
61
/**
62
* Set the ID of the link this Acknowledgment Manager is associated with.
63
*
64
* \param linkId the ID of the link this Acknowledgment Manager is associated with
65
*/
66
void
SetLinkId
(uint8_t linkId);
67
68
/**
69
* Set the QoS Ack policy for the given MPDU, which must be a QoS data frame.
70
*
71
* \param item the MPDU
72
* \param acknowledgment the WifiAcknowledgment object storing the QoS Ack policy to set
73
*/
74
static
void
SetQosAckPolicy
(
Ptr<WifiMpdu>
item,
const
WifiAcknowledgment
* acknowledgment);
75
76
/**
77
* Set the QoS Ack policy for the given PSDU, which must include at least a QoS data frame.
78
*
79
* \param psdu the PSDU
80
* \param acknowledgment the WifiAcknowledgment object storing the QoS Ack policy to set
81
*/
82
static
void
SetQosAckPolicy
(
Ptr<WifiPsdu>
psdu,
const
WifiAcknowledgment
* acknowledgment);
83
84
/**
85
* Determine the acknowledgment method to use if the given MPDU is added to the current
86
* frame. Return a null pointer if the acknowledgment method is unchanged or the new
87
* acknowledgment method otherwise.
88
*
89
* \param mpdu the MPDU to be added to the current frame
90
* \param txParams the current TX parameters for the current frame
91
* \return a null pointer if the acknowledgment method is unchanged or the new
92
* acknowledgment method otherwise
93
*/
94
virtual
std::unique_ptr<WifiAcknowledgment>
TryAddMpdu
(
Ptr<const WifiMpdu>
mpdu,
95
const
WifiTxParameters
& txParams) = 0;
96
97
/**
98
* Determine the acknowledgment method to use if the given MSDU is aggregated to the current
99
* frame. Return a null pointer if the acknowledgment method is unchanged or the new
100
* acknowledgment method otherwise.
101
*
102
* \param msdu the MSDU to be aggregated to the current frame
103
* \param txParams the current TX parameters for the current frame
104
* \return a null pointer if the acknowledgment method is unchanged or the new
105
* acknowledgment method otherwise
106
*/
107
virtual
std::unique_ptr<WifiAcknowledgment>
TryAggregateMsdu
(
108
Ptr<const WifiMpdu>
msdu,
109
const
WifiTxParameters
& txParams) = 0;
110
111
protected
:
112
void
DoDispose
()
override
;
113
114
/**
115
* \return the remote station manager operating on our link
116
*/
117
Ptr<WifiRemoteStationManager>
GetWifiRemoteStationManager
()
const
;
118
119
Ptr<WifiMac>
m_mac
;
//!< MAC which is using this Acknowledgment Manager
120
uint8_t
m_linkId
;
//!< ID of the link this Acknowledgment Manager is operating on
121
};
122
123
}
// namespace ns3
124
125
#endif
/* WIFI_ACK_MANAGER_H */
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:89
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::WifiAckManager
WifiAckManager is an abstract base class.
Definition:
wifi-ack-manager.h:45
ns3::WifiAckManager::TryAddMpdu
virtual std::unique_ptr< WifiAcknowledgment > TryAddMpdu(Ptr< const WifiMpdu > mpdu, const WifiTxParameters &txParams)=0
Determine the acknowledgment method to use if the given MPDU is added to the current frame.
ns3::WifiAckManager::m_linkId
uint8_t m_linkId
ID of the link this Acknowledgment Manager is operating on.
Definition:
wifi-ack-manager.h:120
ns3::WifiAckManager::SetQosAckPolicy
static void SetQosAckPolicy(Ptr< WifiMpdu > item, const WifiAcknowledgment *acknowledgment)
Set the QoS Ack policy for the given MPDU, which must be a QoS data frame.
Definition:
wifi-ack-manager.cc:81
ns3::WifiAckManager::WifiAckManager
WifiAckManager()
Definition:
wifi-ack-manager.cc:41
ns3::WifiAckManager::m_mac
Ptr< WifiMac > m_mac
MAC which is using this Acknowledgment Manager.
Definition:
wifi-ack-manager.h:119
ns3::WifiAckManager::TryAggregateMsdu
virtual std::unique_ptr< WifiAcknowledgment > TryAggregateMsdu(Ptr< const WifiMpdu > msdu, const WifiTxParameters &txParams)=0
Determine the acknowledgment method to use if the given MSDU is aggregated to the current frame.
ns3::WifiAckManager::GetWifiRemoteStationManager
Ptr< WifiRemoteStationManager > GetWifiRemoteStationManager() const
Definition:
wifi-ack-manager.cc:68
ns3::WifiAckManager::DoDispose
void DoDispose() override
Destructor implementation.
Definition:
wifi-ack-manager.cc:53
ns3::WifiAckManager::~WifiAckManager
~WifiAckManager() override
Definition:
wifi-ack-manager.cc:47
ns3::WifiAckManager::SetLinkId
void SetLinkId(uint8_t linkId)
Set the ID of the link this Acknowledgment Manager is associated with.
Definition:
wifi-ack-manager.cc:74
ns3::WifiAckManager::SetWifiMac
void SetWifiMac(Ptr< WifiMac > mac)
Set the MAC which is using this Acknowledgment Manager.
Definition:
wifi-ack-manager.cc:61
ns3::WifiAckManager::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
wifi-ack-manager.cc:35
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.
ns3::WifiAcknowledgment
WifiAcknowledgment is an abstract base struct.
Definition:
wifi-acknowledgment.h:47
wifi-acknowledgment.h
src
wifi
model
wifi-ack-manager.h
Generated on Tue May 28 2024 23:40:32 for ns-3 by
1.9.6