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