A Discrete-Event Network Simulator
API
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
29namespace ns3
30{
31
32class WifiTxParameters;
33class WifiMpdu;
34class WifiMac;
35class 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
102 uint8_t m_linkId;
103};
104
105} // namespace ns3
106
107#endif /* WIFI_PROTECTION_MANAGER_H */
A base class which provides memory management and object aggregation.
Definition: object.h:89
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
a unique identifier for an interface.
Definition: type-id.h:60
WifiProtectionManager is an abstract base class.
void DoDispose() override
Destructor implementation.
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.
Ptr< WifiMac > m_mac
MAC which is using this Protection Manager.
Ptr< WifiRemoteStationManager > GetWifiRemoteStationManager() const
uint8_t m_linkId
ID of the link this Protection Manager is operating on.
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 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:85