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
29namespace ns3 {
30
31class WifiTxParameters;
32class WifiMacQueueItem;
33class WifiMac;
34
42{
43public:
48 static TypeId GetTypeId (void);
50 virtual ~WifiProtectionManager ();
51
63 void SetLinkId (uint8_t linkId);
64
75 virtual std::unique_ptr<WifiProtection> TryAddMpdu (Ptr<const WifiMacQueueItem> mpdu,
76 const WifiTxParameters& txParams) = 0;
77
88 virtual std::unique_ptr<WifiProtection> TryAggregateMsdu (Ptr<const WifiMacQueueItem> msdu,
89 const WifiTxParameters& txParams) = 0;
90
91protected:
92 virtual void DoDispose (void);
93
95 uint8_t m_linkId;
96};
97
98
99
100} //namespace ns3
101
102#endif /* WIFI_PROTECTION_MANAGER_H */
A base class which provides memory management and object aggregation.
Definition: object.h:88
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
a unique identifier for an interface.
Definition: type-id.h:59
WifiProtectionManager is an abstract base class.
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.
Ptr< WifiMac > m_mac
MAC which is using this Protection Manager.
static TypeId GetTypeId(void)
Get the type ID.
uint8_t m_linkId
ID of the link this Protection Manager is operating on.
virtual void DoDispose(void)
Destructor implementation.
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.
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.
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:87