A Discrete-Event Network Simulator
API
wifi-default-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_DEFAULT_ACK_MANAGER_H
22 #define WIFI_DEFAULT_ACK_MANAGER_H
23 
24 #include "wifi-ack-manager.h"
25 
26 
27 namespace ns3 {
28 
29 class WifiTxParameters;
30 class WifiMacQueueItem;
31 
38 {
39 public:
44  static TypeId GetTypeId (void);
45 
47  virtual ~WifiDefaultAckManager ();
48 
49  virtual std::unique_ptr<WifiAcknowledgment> TryAddMpdu (Ptr<const WifiMacQueueItem> mpdu,
50  const WifiTxParameters& txParams) override;
51  virtual std::unique_ptr<WifiAcknowledgment> TryAggregateMsdu (Ptr<const WifiMacQueueItem> msdu,
52  const WifiTxParameters& txParams) override;
53 
68  const WifiTxParameters& txParams) const;
69 
70 protected:
81  const WifiTxParameters& txParams) const;
82 private:
96  virtual std::unique_ptr<WifiAcknowledgment> GetAckInfoIfBarBaSequence (Ptr<const WifiMacQueueItem> mpdu,
97  const WifiTxParameters& txParams);
111  virtual std::unique_ptr<WifiAcknowledgment> GetAckInfoIfTfMuBar (Ptr<const WifiMacQueueItem> mpdu,
112  const WifiTxParameters& txParams);
127  virtual std::unique_ptr<WifiAcknowledgment> GetAckInfoIfAggregatedMuBar (Ptr<const WifiMacQueueItem> mpdu,
128  const WifiTxParameters& txParams);
129 
138  virtual std::unique_ptr<WifiAcknowledgment> TryUlMuTransmission (Ptr<const WifiMacQueueItem> mpdu,
139  const WifiTxParameters& txParams);
140 
142  double m_baThreshold;
145 };
146 
147 
148 
149 } //namespace ns3
150 
151 #endif /* WIFI_DEFAULT_ACK_MANAGER_H */
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::WifiDefaultAckManager::TryUlMuTransmission
virtual std::unique_ptr< WifiAcknowledgment > TryUlMuTransmission(Ptr< const WifiMacQueueItem > mpdu, const WifiTxParameters &txParams)
Calculate the acknowledgment method for the TB PPDUs solicited by the given Trigger Frame.
Definition: wifi-default-ack-manager.cc:638
ns3::WifiDefaultAckManager::m_maxMcsForBlockAckInTbPpdu
uint8_t m_maxMcsForBlockAckInTbPpdu
Max MCS used to send a BlockAck in a TB PPDU.
Definition: wifi-default-ack-manager.h:144
ns3::WifiDefaultAckManager::m_baThreshold
double m_baThreshold
Threshold to determine when a BlockAck must be requested.
Definition: wifi-default-ack-manager.h:142
ns3::WifiDefaultAckManager
WifiDefaultAckManager is the default ack manager.
Definition: wifi-default-ack-manager.h:38
ns3::WifiDefaultAckManager::TryAggregateMsdu
virtual std::unique_ptr< WifiAcknowledgment > TryAggregateMsdu(Ptr< const WifiMacQueueItem > msdu, const WifiTxParameters &txParams) override
Determine the acknowledgment method to use if the given MSDU is aggregated to the current frame.
Definition: wifi-default-ack-manager.cc:332
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::WifiDefaultAckManager::GetMaxDistFromStartingSeq
uint16_t GetMaxDistFromStartingSeq(Ptr< const WifiMacQueueItem > mpdu, const WifiTxParameters &txParams) const
Get the maximum distance between the starting sequence number of the Block Ack agreement which the gi...
Definition: wifi-default-ack-manager.cc:91
ns3::WifiDefaultAckManager::GetAckInfoIfTfMuBar
virtual std::unique_ptr< WifiAcknowledgment > GetAckInfoIfTfMuBar(Ptr< const WifiMacQueueItem > mpdu, const WifiTxParameters &txParams)
Compute the information about the acknowledgment of the current multi-user frame (as described by the...
Definition: wifi-default-ack-manager.cc:471
ns3::WifiTxParameters
This class stores the TX parameters (TX vector, protection mechanism, acknowledgment mechanism,...
Definition: wifi-tx-parameters.h:45
ns3::WifiDefaultAckManager::IsResponseNeeded
bool IsResponseNeeded(Ptr< const WifiMacQueueItem > mpdu, const WifiTxParameters &txParams) const
Determine whether the (A-)MPDU containing the given MPDU and the MPDUs (if any) included in the given...
Definition: wifi-default-ack-manager.cc:135
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
wifi-ack-manager.h
ns3::WifiDefaultAckManager::GetAckInfoIfAggregatedMuBar
virtual std::unique_ptr< WifiAcknowledgment > GetAckInfoIfAggregatedMuBar(Ptr< const WifiMacQueueItem > mpdu, const WifiTxParameters &txParams)
Compute the information about the acknowledgment of the current multi-user frame (as described by the...
Definition: wifi-default-ack-manager.cc:555
ns3::WifiDefaultAckManager::GetAckInfoIfBarBaSequence
virtual std::unique_ptr< WifiAcknowledgment > GetAckInfoIfBarBaSequence(Ptr< const WifiMacQueueItem > mpdu, const WifiTxParameters &txParams)
Compute the information about the acknowledgment of the current multi-user frame (as described by the...
Definition: wifi-default-ack-manager.cc:342
ns3::WifiAckManager
WifiAckManager is an abstract base class.
Definition: wifi-ack-manager.h:43
ns3::WifiDefaultAckManager::m_dlMuAckType
WifiAcknowledgment::Method m_dlMuAckType
Type of the ack sequence for DL MU PPDUs.
Definition: wifi-default-ack-manager.h:143
ns3::WifiDefaultAckManager::WifiDefaultAckManager
WifiDefaultAckManager()
Definition: wifi-default-ack-manager.cc:80
ns3::WifiDefaultAckManager::~WifiDefaultAckManager
virtual ~WifiDefaultAckManager()
Definition: wifi-default-ack-manager.cc:85
ns3::WifiAcknowledgment::Method
Method
Available acknowledgment methods.
Definition: wifi-acknowledgment.h:51
ns3::WifiDefaultAckManager::TryAddMpdu
virtual std::unique_ptr< WifiAcknowledgment > TryAddMpdu(Ptr< const WifiMacQueueItem > mpdu, const WifiTxParameters &txParams) override
Determine the acknowledgment method to use if the given MPDU is added to the current frame.
Definition: wifi-default-ack-manager.cc:167
ns3::WifiDefaultAckManager::m_useExplicitBar
bool m_useExplicitBar
true for sending BARs, false for using Implicit BAR policy
Definition: wifi-default-ack-manager.h:141
ns3::WifiDefaultAckManager::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: wifi-default-ack-manager.cc:41