A Discrete-Event Network Simulator
API
wifi-default-protection-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_PROTECTION_MANAGER_H
22 #define WIFI_DEFAULT_PROTECTION_MANAGER_H
23 
25 
26 
27 namespace ns3 {
28 
29 class WifiTxParameters;
30 class WifiMacQueueItem;
31 class WifiMacHeader;
32 
40 {
41 public:
46  static TypeId GetTypeId (void);
47 
50 
51  // Overridden from WifiProtectionManager
52  virtual std::unique_ptr<WifiProtection> TryAddMpdu (Ptr<const WifiMacQueueItem> mpdu,
53  const WifiTxParameters& txParams);
54  virtual std::unique_ptr<WifiProtection> TryAggregateMsdu (Ptr<const WifiMacQueueItem> msdu,
55  const WifiTxParameters& txParams);
56 
57 protected:
66  virtual std::unique_ptr<WifiProtection> GetPsduProtection (const WifiMacHeader& hdr, uint32_t size,
67  const WifiTxVector& txVector) const;
68 };
69 
70 } //namespace ns3
71 
72 #endif /* WIFI_DEFAULT_PROTECTION_MANAGER_H */
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
virtual std::unique_ptr< WifiProtection > GetPsduProtection(const WifiMacHeader &hdr, uint32_t size, const WifiTxVector &txVector) const
Select the protection method for a single PSDU.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
WifiDefaultProtectionManager is the default protection manager, which selects the protection method f...
virtual std::unique_ptr< WifiProtection > TryAddMpdu(Ptr< const WifiMacQueueItem > mpdu, const WifiTxParameters &txParams)
Determine the protection method to use if the given MPDU is added to the current frame.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static TypeId GetTypeId(void)
Get the type ID.
WifiProtectionManager is an abstract base class.
This class stores the TX parameters (TX vector, protection mechanism, acknowledgment mechanism...
virtual std::unique_ptr< WifiProtection > TryAggregateMsdu(Ptr< const WifiMacQueueItem > msdu, const WifiTxParameters &txParams)
Determine the protection method to use if the given MSDU is aggregated to the current frame...
a unique identifier for an interface.
Definition: type-id.h:58
Implements the IEEE 802.11 MAC header.