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 
28 
29 namespace ns3 {
30 
39 {
44  enum Method
45  {
46  NONE = 0,
49  };
50 
56  virtual ~WifiProtection ();
57 
62  virtual void Print (std::ostream &os) const = 0;
63 
64  const Method method;
66 };
67 
68 
75 {
77 
78  // Overridden from WifiProtection
79  void Print (std::ostream &os) const override;
80 };
81 
82 
89 {
91 
92  // Overridden from WifiProtection
93  void Print (std::ostream &os) const override;
94 
97 };
98 
99 
106 {
108 
109  // Overridden from WifiProtection
110  void Print (std::ostream &os) const override;
111 
113 };
114 
115 
123 std::ostream& operator<< (std::ostream& os, const WifiProtection* protection);
124 
125 } //namespace ns3
126 
127 #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...
WifiTxVector ctsTxVector
CTS TXVECTOR.
WifiProtection(Method m)
Constructor.
void Print(std::ostream &os) const override
Print the object contents.
WifiTxVector rtsTxVector
RTS TXVECTOR.
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition: angles.cc:137
void Print(std::ostream &os) const override
Print the object contents.
Time protectionTime
time required by the protection method
WifiProtection is an abstract base struct.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
WifiRtsCtsProtection specifies that RTS/CTS protection method is used.
virtual void Print(std::ostream &os) const =0
Print the object contents.
void Print(std::ostream &os) const override
Print the object contents.
WifiTxVector ctsTxVector
CTS TXVECTOR.
WifiCtsToSelfProtection specifies that CTS-to-self protection method is used.
WifiNoProtection specifies that no protection method is used.
const Method method
protection method
Method
Available protection methods.