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
#include "ns3/wifi-export.h"
16
17
#include <memory>
18
19
namespace
ns3
20
{
21
22
class
WifiTxParameters
;
23
class
WifiMpdu
;
24
class
WifiPsdu
;
25
class
WifiMac
;
26
class
WifiRemoteStationManager
;
27
28
/**
29
* @ingroup wifi
30
*
31
* WifiAckManager is an abstract base class. Each subclass defines a logic
32
* to select the acknowledgment method for a given frame.
33
*/
34
class
WIFI_EXPORT
WifiAckManager
:
public
Object
35
{
36
public
:
37
/**
38
* @brief Get the type ID.
39
* @return the object TypeId
40
*/
41
static
TypeId
GetTypeId
();
42
WifiAckManager
();
43
~WifiAckManager
()
override
;
44
45
/**
46
* Set the MAC which is using this Acknowledgment Manager
47
*
48
* @param mac a pointer to the MAC
49
*/
50
void
SetWifiMac
(
Ptr<WifiMac>
mac);
51
/**
52
* Set the ID of the link this Acknowledgment Manager is associated with.
53
*
54
* @param linkId the ID of the link this Acknowledgment Manager is associated with
55
*/
56
void
SetLinkId
(uint8_t linkId);
57
58
/**
59
* Set the QoS Ack policy for the given MPDU, which must be a QoS data frame.
60
*
61
* @param item the MPDU
62
* @param acknowledgment the WifiAcknowledgment object storing the QoS Ack policy to set
63
*/
64
static
void
SetQosAckPolicy
(
Ptr<WifiMpdu>
item,
const
WifiAcknowledgment
* acknowledgment);
65
66
/**
67
* Set the QoS Ack policy for the given PSDU, which must include at least a QoS data frame.
68
*
69
* @param psdu the PSDU
70
* @param acknowledgment the WifiAcknowledgment object storing the QoS Ack policy to set
71
*/
72
static
void
SetQosAckPolicy
(
Ptr<WifiPsdu>
psdu,
const
WifiAcknowledgment
* acknowledgment);
73
74
/**
75
* Determine the acknowledgment method to use if the given MPDU is added to the current
76
* frame. Return a null pointer if the acknowledgment method is unchanged or the new
77
* acknowledgment method otherwise.
78
*
79
* @param mpdu the MPDU to be added to the current frame
80
* @param txParams the current TX parameters for the current frame
81
* @return a null pointer if the acknowledgment method is unchanged or the new
82
* acknowledgment method otherwise
83
*/
84
virtual
std::unique_ptr<WifiAcknowledgment>
TryAddMpdu
(
Ptr<const WifiMpdu>
mpdu,
85
const
WifiTxParameters
& txParams) = 0;
86
87
/**
88
* Determine the acknowledgment method to use if the given MSDU is aggregated to the current
89
* frame. Return a null pointer if the acknowledgment method is unchanged or the new
90
* acknowledgment method otherwise.
91
*
92
* @param msdu the MSDU to be aggregated to the current frame
93
* @param txParams the current TX parameters for the current frame
94
* @return a null pointer if the acknowledgment method is unchanged or the new
95
* acknowledgment method otherwise
96
*/
97
virtual
std::unique_ptr<WifiAcknowledgment>
TryAggregateMsdu
(
98
Ptr<const WifiMpdu>
msdu,
99
const
WifiTxParameters
& txParams) = 0;
100
101
protected
:
102
void
DoDispose
()
override
;
103
104
/**
105
* @return the remote station manager operating on our link
106
*/
107
Ptr<WifiRemoteStationManager>
GetWifiRemoteStationManager
()
const
;
108
109
Ptr<WifiMac>
m_mac
;
//!< MAC which is using this Acknowledgment Manager
110
uint8_t
m_linkId
;
//!< ID of the link this Acknowledgment Manager is operating on
111
};
112
113
}
// namespace ns3
114
115
#endif
/* WIFI_ACK_MANAGER_H */
ns3::Object::Object
Object()
Caller graph was not generated because of its size.
Definition
object.cc:93
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
ptr.h:70
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:50
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:110
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:109
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::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::WifiMac
base class for all MAC-level wifi objects.
Definition
wifi-mac.h:117
ns3::WifiMpdu
WifiMpdu stores a (const) packet along with a MAC header.
Definition
wifi-mpdu.h:52
ns3::WifiPsdu
WifiPsdu stores an MPDU, S-MPDU or A-MPDU, by keeping header(s) and payload(s) separate for each cons...
Definition
wifi-psdu.h:34
ns3::WifiRemoteStationManager
hold a list of per-remote-station state.
Definition
wifi-remote-station-manager.h:147
ns3::WifiTxParameters
This class stores the TX parameters (TX vector, protection mechanism, acknowledgment mechanism,...
Definition
wifi-tx-parameters.h:38
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:37
wifi-acknowledgment.h
src
wifi
model
wifi-ack-manager.h
Generated on
for ns-3 by
1.16.1