A Discrete-Event Network Simulator
API
wifi-protection.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_H
21 #define WIFI_PROTECTION_H
22 
23 #include "ctrl-headers.h"
24 #include "wifi-tx-vector.h"
25 
26 #include "ns3/nstime.h"
27 
28 #include <memory>
29 
30 namespace ns3
31 {
32 
41 {
46  enum Method
47  {
48  NONE = 0,
52  };
53 
59  virtual ~WifiProtection();
60 
65  virtual std::unique_ptr<WifiProtection> Copy() const = 0;
66 
71  virtual void Print(std::ostream& os) const = 0;
72 
73  const Method method;
75 };
76 
83 {
85 
86  std::unique_ptr<WifiProtection> Copy() const override;
87  void Print(std::ostream& os) const override;
88 };
89 
96 {
98 
99  std::unique_ptr<WifiProtection> Copy() const override;
100  void Print(std::ostream& os) const override;
101 
104 };
105 
112 {
114 
115  std::unique_ptr<WifiProtection> Copy() const override;
116  void Print(std::ostream& os) const override;
117 
119 };
120 
127 {
129 
130  // Overridden from WifiProtection
131  std::unique_ptr<WifiProtection> Copy() const override;
132  void Print(std::ostream& os) const override;
133 
136 };
137 
145 std::ostream& operator<<(std::ostream& os, const WifiProtection* protection);
146 
147 } // namespace ns3
148 
149 #endif /* WIFI_PROTECTION_H */
Headers for Trigger frames.
Definition: ctrl-headers.h:945
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition: angles.cc:129
WifiCtsToSelfProtection specifies that CTS-to-self protection method is used.
std::unique_ptr< WifiProtection > Copy() const override
Clone this object.
WifiTxVector ctsTxVector
CTS TXVECTOR.
void Print(std::ostream &os) const override
Print the object contents.
WifiMuRtsCtsProtection specifies that MU-RTS/CTS protection method is used.
CtrlTriggerHeader muRts
MU-RTS.
WifiTxVector muRtsTxVector
MU-RTS TXVECTOR.
std::unique_ptr< WifiProtection > Copy() const override
Clone this object.
void Print(std::ostream &os) const override
Print the object contents.
WifiNoProtection specifies that no protection method is used.
void Print(std::ostream &os) const override
Print the object contents.
std::unique_ptr< WifiProtection > Copy() const override
Clone this object.
WifiProtection is an abstract base struct.
Time protectionTime
time required by the protection method
Method
Available protection methods.
virtual std::unique_ptr< WifiProtection > Copy() const =0
Clone this object.
virtual void Print(std::ostream &os) const =0
Print the object contents.
const Method method
protection method
WifiProtection(Method m)
Constructor.
WifiRtsCtsProtection specifies that RTS/CTS protection method is used.
void Print(std::ostream &os) const override
Print the object contents.
WifiTxVector ctsTxVector
CTS TXVECTOR.
std::unique_ptr< WifiProtection > Copy() const override
Clone this object.
WifiTxVector rtsTxVector
RTS TXVECTOR.