A Discrete-Event Network Simulator
API
wifi-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_PROTECTION_MANAGER_H
22 #define WIFI_PROTECTION_MANAGER_H
23 
24 #include "wifi-protection.h"
25 #include <memory>
26 #include "ns3/object.h"
27 
28 
29 namespace ns3 {
30 
31 class WifiTxParameters;
32 class WifiMacQueueItem;
33 class RegularWifiMac;
34 
42 {
43 public:
48  static TypeId GetTypeId (void);
49  virtual ~WifiProtectionManager ();
50 
57 
68  virtual std::unique_ptr<WifiProtection> TryAddMpdu (Ptr<const WifiMacQueueItem> mpdu,
69  const WifiTxParameters& txParams) = 0;
70 
81  virtual std::unique_ptr<WifiProtection> TryAggregateMsdu (Ptr<const WifiMacQueueItem> msdu,
82  const WifiTxParameters& txParams) = 0;
83 
84 protected:
85  virtual void DoDispose (void);
86 
88 };
89 
90 
91 
92 } //namespace ns3
93 
94 #endif /* WIFI_PROTECTION_MANAGER_H */
virtual std::unique_ptr< WifiProtection > TryAddMpdu(Ptr< const WifiMacQueueItem > mpdu, const WifiTxParameters &txParams)=0
Determine the protection method to use if the given MPDU is added to the current frame.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
virtual void DoDispose(void)
Destructor implementation.
virtual std::unique_ptr< WifiProtection > TryAggregateMsdu(Ptr< const WifiMacQueueItem > msdu, const WifiTxParameters &txParams)=0
Determine the protection method to use if the given MSDU is aggregated to the current frame...
void SetWifiMac(Ptr< RegularWifiMac > mac)
Set the MAC which is using this Protection Manager.
mac
Definition: third.py:99
Every class exported by the ns3 library is enclosed in the ns3 namespace.
WifiProtectionManager is an abstract base class.
static TypeId GetTypeId(void)
Get the type ID.
This class stores the TX parameters (TX vector, protection mechanism, acknowledgment mechanism...
Ptr< RegularWifiMac > m_mac
MAC which is using this Protection Manager.
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