A Discrete-Event Network Simulator
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
29namespace ns3
30{
31
32class WifiTxParameters;
33class WifiMpdu;
34class WifiPsdu;
35class WifiMac;
36class WifiRemoteStationManager;
37
44class WifiAckManager : public Object
45{
46 public:
51 static TypeId GetTypeId();
53 ~WifiAckManager() override;
54
60 void SetWifiMac(Ptr<WifiMac> mac);
66 void SetLinkId(uint8_t linkId);
67
74 static void SetQosAckPolicy(Ptr<WifiMpdu> item, const WifiAcknowledgment* acknowledgment);
75
82 static void SetQosAckPolicy(Ptr<WifiPsdu> psdu, const WifiAcknowledgment* acknowledgment);
83
94 virtual std::unique_ptr<WifiAcknowledgment> TryAddMpdu(Ptr<const WifiMpdu> mpdu,
95 const WifiTxParameters& txParams) = 0;
96
107 virtual std::unique_ptr<WifiAcknowledgment> TryAggregateMsdu(
109 const WifiTxParameters& txParams) = 0;
110
111 protected:
112 void DoDispose() override;
113
118
120 uint8_t m_linkId;
121};
122
123} // namespace ns3
124
125#endif /* WIFI_ACK_MANAGER_H */
A base class which provides memory management and object aggregation.
Definition: object.h:89
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
a unique identifier for an interface.
Definition: type-id.h:59
WifiAckManager is an abstract base class.
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.
uint8_t m_linkId
ID of the link this Acknowledgment Manager is operating on.
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.
Ptr< WifiMac > m_mac
MAC which is using this Acknowledgment Manager.
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.
Ptr< WifiRemoteStationManager > GetWifiRemoteStationManager() const
void DoDispose() override
Destructor implementation.
void SetLinkId(uint8_t linkId)
Set the ID of the link this Acknowledgment Manager is associated with.
void SetWifiMac(Ptr< WifiMac > mac)
Set the MAC which is using this Acknowledgment Manager.
static TypeId GetTypeId()
Get the type ID.
This class stores the TX parameters (TX vector, protection mechanism, acknowledgment mechanism,...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
WifiAcknowledgment is an abstract base struct.