A Discrete-Event Network Simulator
API
wifi-default-protection-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_DEFAULT_PROTECTION_MANAGER_H
21 #define WIFI_DEFAULT_PROTECTION_MANAGER_H
22 
24 
25 namespace ns3
26 {
27 
28 class WifiTxParameters;
29 class WifiMpdu;
30 class WifiMacHeader;
31 
39 {
40  public:
45  static TypeId GetTypeId();
46 
49 
50  std::unique_ptr<WifiProtection> TryAddMpdu(Ptr<const WifiMpdu> mpdu,
51  const WifiTxParameters& txParams) override;
52  std::unique_ptr<WifiProtection> TryAggregateMsdu(Ptr<const WifiMpdu> msdu,
53  const WifiTxParameters& txParams) override;
54 
55  protected:
64  virtual std::unique_ptr<WifiProtection> GetPsduProtection(const WifiMacHeader& hdr,
65  uint32_t size,
66  const WifiTxVector& txVector) const;
67 
68  private:
84  virtual std::unique_ptr<WifiProtection> TryAddMpduToMuPpdu(Ptr<const WifiMpdu> mpdu,
85  const WifiTxParameters& txParams);
86 
99  virtual std::unique_ptr<WifiProtection> TryUlMuTransmission(Ptr<const WifiMpdu> mpdu,
100  const WifiTxParameters& txParams);
101 
102  bool m_sendMuRts;
103 };
104 
105 } // namespace ns3
106 
107 #endif /* WIFI_DEFAULT_PROTECTION_MANAGER_H */
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
a unique identifier for an interface.
Definition: type-id.h:59
WifiDefaultProtectionManager is the default protection manager, which selects the protection method f...
std::unique_ptr< WifiProtection > TryAddMpdu(Ptr< const WifiMpdu > mpdu, const WifiTxParameters &txParams) override
Determine the protection method to use if the given MPDU is added to the current frame.
bool m_sendMuRts
true for sending an MU-RTS to protect DL MU PPDUs
std::unique_ptr< WifiProtection > TryAggregateMsdu(Ptr< const WifiMpdu > msdu, const WifiTxParameters &txParams) override
Determine the protection method to use if the given MSDU is aggregated to the current frame.
virtual std::unique_ptr< WifiProtection > TryUlMuTransmission(Ptr< const WifiMpdu > mpdu, const WifiTxParameters &txParams)
Calculate the protection method for the UL MU transmission solicited by the given Trigger Frame.
virtual std::unique_ptr< WifiProtection > TryAddMpduToMuPpdu(Ptr< const WifiMpdu > mpdu, const WifiTxParameters &txParams)
Calculate the protection method to use if the given MPDU is added to the current DL MU PPDU (represen...
virtual std::unique_ptr< WifiProtection > GetPsduProtection(const WifiMacHeader &hdr, uint32_t size, const WifiTxVector &txVector) const
Select the protection method for a single PSDU.
Implements the IEEE 802.11 MAC header.
WifiProtectionManager is an abstract base class.
This class stores the TX parameters (TX vector, protection mechanism, acknowledgment mechanism,...
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
Every class exported by the ns3 library is enclosed in the ns3 namespace.