A Discrete-Event Network Simulator
API
wifi-protection.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_H
22 #define WIFI_PROTECTION_H
23 
24 #include "ns3/nstime.h"
25 #include "wifi-tx-vector.h"
26 #include "ctrl-headers.h"
27 #include <memory>
28 
29 
30 namespace ns3 {
31 
40 {
45  enum Method
46  {
47  NONE = 0,
50  };
51 
57  virtual ~WifiProtection ();
58 
63  virtual std::unique_ptr<WifiProtection> Copy (void) const = 0;
64 
69  virtual void Print (std::ostream &os) const = 0;
70 
71  const Method method;
73 };
74 
75 
82 {
84 
85  std::unique_ptr<WifiProtection> Copy (void) const override;
86  void Print (std::ostream &os) const override;
87 };
88 
89 
96 {
98 
99  std::unique_ptr<WifiProtection> Copy (void) const override;
100  void Print (std::ostream &os) const override;
101 
104 };
105 
106 
113 {
115 
116  std::unique_ptr<WifiProtection> Copy (void) const override;
117  void Print (std::ostream &os) const override;
118 
120 };
121 
122 
130 std::ostream& operator<< (std::ostream& os, const WifiProtection* protection);
131 
132 } //namespace ns3
133 
134 #endif /* WIFI_PROTECTION_H */
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
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:139
WifiCtsToSelfProtection specifies that CTS-to-self protection method is used.
std::unique_ptr< WifiProtection > Copy(void) const override
Clone this object.
WifiTxVector ctsTxVector
CTS TXVECTOR.
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(void) const override
Clone this object.
WifiProtection is an abstract base struct.
virtual std::unique_ptr< WifiProtection > Copy(void) const =0
Clone this object.
Time protectionTime
time required by the protection method
Method
Available protection methods.
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.
std::unique_ptr< WifiProtection > Copy(void) const override
Clone this object.
WifiTxVector ctsTxVector
CTS TXVECTOR.
WifiTxVector rtsTxVector
RTS TXVECTOR.