A Discrete-Event Network Simulator
API
wifi-ack-manager.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2020 Universita' degli Studi di Napoli Federico II
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Stefano Avallone <stavallo@unina.it>
19  */
20 
21 #ifndef WIFI_ACK_MANAGER_H
22 #define WIFI_ACK_MANAGER_H
23 
24 #include "wifi-acknowledgment.h"
25 #include <memory>
26 #include "ns3/object.h"
27 
28 
29 namespace ns3 {
30 
31 class WifiTxParameters;
32 class WifiMacQueueItem;
33 class WifiPsdu;
34 class RegularWifiMac;
35 
42 class WifiAckManager : public Object
43 {
44 public:
49  static TypeId GetTypeId (void);
50  virtual ~WifiAckManager ();
51 
58 
65  static void SetQosAckPolicy (Ptr<WifiMacQueueItem> item, const WifiAcknowledgment* acknowledgment);
66 
73  static void SetQosAckPolicy (Ptr<WifiPsdu> psdu, const WifiAcknowledgment* acknowledgment);
74 
85  virtual std::unique_ptr<WifiAcknowledgment> TryAddMpdu (Ptr<const WifiMacQueueItem> mpdu,
86  const WifiTxParameters& txParams) = 0;
87 
98  virtual std::unique_ptr<WifiAcknowledgment> TryAggregateMsdu (Ptr<const WifiMacQueueItem> msdu,
99  const WifiTxParameters& txParams) = 0;
100 
101 protected:
102  virtual void DoDispose (void);
103 
105 };
106 
107 
108 
109 } //namespace ns3
110 
111 #endif /* WIFI_ACK_MANAGER_H */
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
virtual std::unique_ptr< WifiAcknowledgment > TryAggregateMsdu(Ptr< const WifiMacQueueItem > msdu, const WifiTxParameters &txParams)=0
Determine the acknowledgment method to use if the given MSDU is aggregated to the current frame...
WifiAcknowledgment is an abstract base struct.
virtual std::unique_ptr< WifiAcknowledgment > TryAddMpdu(Ptr< const WifiMacQueueItem > mpdu, const WifiTxParameters &txParams)=0
Determine the acknowledgment method to use if the given MPDU is added to the current frame...
void SetWifiMac(Ptr< RegularWifiMac > mac)
Set the MAC which is using this Acknowledgment Manager.
mac
Definition: third.py:99
WifiAckManager is an abstract base class.
virtual void DoDispose(void)
Destructor implementation.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static void SetQosAckPolicy(Ptr< WifiMacQueueItem > item, const WifiAcknowledgment *acknowledgment)
Set the QoS Ack policy for the given MPDU, which must be a QoS data frame.
static TypeId GetTypeId(void)
Get the type ID.
Ptr< RegularWifiMac > m_mac
MAC which is using this Acknowledgment Manager.
This class stores the TX parameters (TX vector, protection mechanism, acknowledgment mechanism...
A base class which provides memory management and object aggregation.
Definition: object.h:87
a unique identifier for an interface.
Definition: type-id.h:58