A Discrete-Event Network Simulator
QKDNetSim v2.0 (NS-3 v3.41) @ (+)
API
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
wifi-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_PROTECTION_MANAGER_H
21 #define WIFI_PROTECTION_MANAGER_H
22 
23 #include "wifi-protection.h"
24 
25 #include "ns3/object.h"
26 
27 #include <memory>
28 
29 namespace ns3
30 {
31 
32 class WifiTxParameters;
33 class WifiMpdu;
34 class WifiMac;
35 class WifiRemoteStationManager;
36 
44 {
45  public:
50  static TypeId GetTypeId();
52  ~WifiProtectionManager() override;
53 
65  void SetLinkId(uint8_t linkId);
66 
77  virtual std::unique_ptr<WifiProtection> TryAddMpdu(Ptr<const WifiMpdu> mpdu,
78  const WifiTxParameters& txParams) = 0;
79 
90  virtual std::unique_ptr<WifiProtection> TryAggregateMsdu(Ptr<const WifiMpdu> msdu,
91  const WifiTxParameters& txParams) = 0;
92 
93  protected:
94  void DoDispose() override;
95 
100 
113  uint16_t txWidth,
114  const Mac48Address& receiver) const;
115 
117  uint8_t m_linkId;
118 };
119 
120 } // namespace ns3
121 
122 #endif /* WIFI_PROTECTION_MANAGER_H */
Headers for Trigger frames.
Definition: ctrl-headers.h:942
an EUI-48 address
Definition: mac48-address.h:46
A base class which provides memory management and object aggregation.
Definition: object.h:89
a unique identifier for an interface.
Definition: type-id.h:59
WifiProtectionManager is an abstract base class.
virtual std::unique_ptr< WifiProtection > TryAggregateMsdu(Ptr< const WifiMpdu > msdu, const WifiTxParameters &txParams)=0
Determine the protection method to use if the given MSDU is aggregated to the current frame.
void DoDispose() override
Destructor implementation.
Ptr< WifiMac > m_mac
MAC which is using this Protection Manager.
virtual std::unique_ptr< WifiProtection > TryAddMpdu(Ptr< const WifiMpdu > mpdu, const WifiTxParameters &txParams)=0
Determine the protection method to use if the given MPDU is added to the current frame.
void AddUserInfoToMuRts(CtrlTriggerHeader &muRts, uint16_t txWidth, const Mac48Address &receiver) const
Add a User Info field to the given MU-RTS Trigger Frame to solicit a CTS from the station with the gi...
Ptr< WifiRemoteStationManager > GetWifiRemoteStationManager() const
uint8_t m_linkId
ID of the link this Protection Manager is operating on.
void SetLinkId(uint8_t linkId)
Set the ID of the link this Protection Manager is associated with.
void SetWifiMac(Ptr< WifiMac > mac)
Set the MAC which is using this Protection Manager.
static TypeId GetTypeId()
Get the type ID.
This class stores the TX parameters (TX vector, protection mechanism, acknowledgment mechanism,...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
mac
Definition: third.py:92