A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
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
40
struct
WifiProtection
41
{
46
enum
Method
47
{
48
NONE
= 0,
49
RTS_CTS
,
50
CTS_TO_SELF
,
51
MU_RTS_CTS
52
};
53
58
WifiProtection
(
Method
m);
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
;
74
Time
protectionTime
;
75
};
76
82
struct
WifiNoProtection
:
public
WifiProtection
83
{
84
WifiNoProtection
();
85
86
std::unique_ptr<WifiProtection>
Copy
()
const override
;
87
void
Print
(std::ostream& os)
const override
;
88
};
89
95
struct
WifiRtsCtsProtection
:
public
WifiProtection
96
{
97
WifiRtsCtsProtection
();
98
99
std::unique_ptr<WifiProtection>
Copy
()
const override
;
100
void
Print
(std::ostream& os)
const override
;
101
102
WifiTxVector
rtsTxVector
;
103
WifiTxVector
ctsTxVector
;
104
};
105
111
struct
WifiCtsToSelfProtection
:
public
WifiProtection
112
{
113
WifiCtsToSelfProtection
();
114
115
std::unique_ptr<WifiProtection>
Copy
()
const override
;
116
void
Print
(std::ostream& os)
const override
;
117
118
WifiTxVector
ctsTxVector
;
119
};
120
126
struct
WifiMuRtsCtsProtection
:
public
WifiProtection
127
{
128
WifiMuRtsCtsProtection
();
129
130
// Overridden from WifiProtection
131
std::unique_ptr<WifiProtection>
Copy
()
const override
;
132
void
Print
(std::ostream& os)
const override
;
133
134
CtrlTriggerHeader
muRts
;
135
WifiTxVector
muRtsTxVector
;
136
};
137
145
std::ostream&
operator<<
(std::ostream& os,
const
WifiProtection
* protection);
146
147
}
// namespace ns3
148
149
#endif
/* WIFI_PROTECTION_H */
ns3::CtrlTriggerHeader
Headers for Trigger frames.
Definition:
ctrl-headers.h:942
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:105
ns3::WifiTxVector
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
Definition:
wifi-tx-vector.h:109
ctrl-headers.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition:
angles.cc:129
ns3::WifiCtsToSelfProtection
WifiCtsToSelfProtection specifies that CTS-to-self protection method is used.
Definition:
wifi-protection.h:112
ns3::WifiCtsToSelfProtection::Copy
std::unique_ptr< WifiProtection > Copy() const override
Clone this object.
Definition:
wifi-protection.cc:94
ns3::WifiCtsToSelfProtection::ctsTxVector
WifiTxVector ctsTxVector
CTS TXVECTOR.
Definition:
wifi-protection.h:118
ns3::WifiCtsToSelfProtection::Print
void Print(std::ostream &os) const override
Print the object contents.
Definition:
wifi-protection.cc:100
ns3::WifiCtsToSelfProtection::WifiCtsToSelfProtection
WifiCtsToSelfProtection()
Definition:
wifi-protection.cc:88
ns3::WifiMuRtsCtsProtection
WifiMuRtsCtsProtection specifies that MU-RTS/CTS protection method is used.
Definition:
wifi-protection.h:127
ns3::WifiMuRtsCtsProtection::muRts
CtrlTriggerHeader muRts
MU-RTS.
Definition:
wifi-protection.h:134
ns3::WifiMuRtsCtsProtection::muRtsTxVector
WifiTxVector muRtsTxVector
MU-RTS TXVECTOR.
Definition:
wifi-protection.h:135
ns3::WifiMuRtsCtsProtection::WifiMuRtsCtsProtection
WifiMuRtsCtsProtection()
Definition:
wifi-protection.cc:109
ns3::WifiMuRtsCtsProtection::Copy
std::unique_ptr< WifiProtection > Copy() const override
Clone this object.
Definition:
wifi-protection.cc:115
ns3::WifiMuRtsCtsProtection::Print
void Print(std::ostream &os) const override
Print the object contents.
Definition:
wifi-protection.cc:121
ns3::WifiNoProtection
WifiNoProtection specifies that no protection method is used.
Definition:
wifi-protection.h:83
ns3::WifiNoProtection::Print
void Print(std::ostream &os) const override
Print the object contents.
Definition:
wifi-protection.cc:58
ns3::WifiNoProtection::WifiNoProtection
WifiNoProtection()
Definition:
wifi-protection.cc:45
ns3::WifiNoProtection::Copy
std::unique_ptr< WifiProtection > Copy() const override
Clone this object.
Definition:
wifi-protection.cc:52
ns3::WifiProtection
WifiProtection is an abstract base struct.
Definition:
wifi-protection.h:41
ns3::WifiProtection::protectionTime
Time protectionTime
time required by the protection method
Definition:
wifi-protection.h:74
ns3::WifiProtection::~WifiProtection
virtual ~WifiProtection()
Definition:
wifi-protection.cc:37
ns3::WifiProtection::Copy
virtual std::unique_ptr< WifiProtection > Copy() const =0
Clone this object.
ns3::WifiProtection::Method
Method
Available protection methods.
Definition:
wifi-protection.h:47
ns3::WifiProtection::NONE
@ NONE
Definition:
wifi-protection.h:48
ns3::WifiProtection::CTS_TO_SELF
@ CTS_TO_SELF
Definition:
wifi-protection.h:50
ns3::WifiProtection::RTS_CTS
@ RTS_CTS
Definition:
wifi-protection.h:49
ns3::WifiProtection::MU_RTS_CTS
@ MU_RTS_CTS
Definition:
wifi-protection.h:51
ns3::WifiProtection::Print
virtual void Print(std::ostream &os) const =0
Print the object contents.
ns3::WifiProtection::method
const Method method
protection method
Definition:
wifi-protection.h:73
ns3::WifiRtsCtsProtection
WifiRtsCtsProtection specifies that RTS/CTS protection method is used.
Definition:
wifi-protection.h:96
ns3::WifiRtsCtsProtection::Print
void Print(std::ostream &os) const override
Print the object contents.
Definition:
wifi-protection.cc:79
ns3::WifiRtsCtsProtection::WifiRtsCtsProtection
WifiRtsCtsProtection()
Definition:
wifi-protection.cc:67
ns3::WifiRtsCtsProtection::ctsTxVector
WifiTxVector ctsTxVector
CTS TXVECTOR.
Definition:
wifi-protection.h:103
ns3::WifiRtsCtsProtection::Copy
std::unique_ptr< WifiProtection > Copy() const override
Clone this object.
Definition:
wifi-protection.cc:73
ns3::WifiRtsCtsProtection::rtsTxVector
WifiTxVector rtsTxVector
RTS TXVECTOR.
Definition:
wifi-protection.h:102
wifi-tx-vector.h
src
wifi
model
wifi-protection.h
Generated on Sun Jul 2 2023 18:22:14 for ns-3 by
1.9.6