A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
wifi-mac-helper.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2016
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: Sébastien Deronne <sebastien.deronne@gmail.com>
18
*/
19
20
#ifndef WIFI_MAC_HELPER_H
21
#define WIFI_MAC_HELPER_H
22
23
#include "ns3/object-factory.h"
24
#include "ns3/wifi-standards.h"
25
26
namespace
ns3
27
{
28
29
class
WifiMac;
30
class
WifiNetDevice;
31
47
class
WifiMacHelper
48
{
49
public
:
54
WifiMacHelper
();
58
virtual
~WifiMacHelper
();
59
68
template
<
typename
... Args>
69
void
SetType
(std::string
type
, Args&&...
args
);
70
78
template
<
typename
... Args>
79
void
SetAssocManager
(std::string
type
, Args&&...
args
);
80
88
template
<
typename
... Args>
89
void
SetMacQueueScheduler
(std::string
type
, Args&&...
args
);
90
98
template
<
typename
... Args>
99
void
SetProtectionManager
(std::string
type
, Args&&...
args
);
100
108
template
<
typename
... Args>
109
void
SetAckManager
(std::string
type
, Args&&...
args
);
110
119
template
<
typename
... Args>
120
void
SetMultiUserScheduler
(std::string
type
, Args&&...
args
);
121
129
virtual
Ptr<WifiMac>
Create
(
Ptr<WifiNetDevice>
device,
WifiStandard
standard)
const
;
130
131
protected
:
132
ObjectFactory
m_mac
;
133
ObjectFactory
m_assocManager
;
134
ObjectFactory
m_queueScheduler
;
135
ObjectFactory
m_protectionManager
;
136
ObjectFactory
m_ackManager
;
137
ObjectFactory
m_muScheduler
;
138
};
139
140
}
// namespace ns3
141
142
/***************************************************************
143
* Implementation of the templates declared above.
144
***************************************************************/
145
146
namespace
ns3
147
{
148
149
template
<
typename
... Args>
150
void
151
WifiMacHelper::SetType
(std::string
type
, Args&&...
args
)
152
{
153
m_mac
.
SetTypeId
(
type
);
154
m_mac
.
Set
(
args
...);
155
}
156
157
template
<
typename
... Args>
158
void
159
WifiMacHelper::SetAssocManager
(std::string
type
, Args&&...
args
)
160
{
161
m_assocManager
.
SetTypeId
(
type
);
162
m_assocManager
.
Set
(
args
...);
163
}
164
165
template
<
typename
... Args>
166
void
167
WifiMacHelper::SetMacQueueScheduler
(std::string
type
, Args&&...
args
)
168
{
169
m_queueScheduler
.
SetTypeId
(
type
);
170
m_queueScheduler
.
Set
(
args
...);
171
}
172
173
template
<
typename
... Args>
174
void
175
WifiMacHelper::SetProtectionManager
(std::string
type
, Args&&...
args
)
176
{
177
m_protectionManager
.
SetTypeId
(
type
);
178
m_protectionManager
.
Set
(
args
...);
179
}
180
181
template
<
typename
... Args>
182
void
183
WifiMacHelper::SetAckManager
(std::string
type
, Args&&...
args
)
184
{
185
m_ackManager
.
SetTypeId
(
type
);
186
m_ackManager
.
Set
(
args
...);
187
}
188
189
template
<
typename
... Args>
190
void
191
WifiMacHelper::SetMultiUserScheduler
(std::string
type
, Args&&...
args
)
192
{
193
m_muScheduler
.
SetTypeId
(
type
);
194
m_muScheduler
.
Set
(
args
...);
195
}
196
197
}
// namespace ns3
198
199
#endif
/* WIFI_MAC_HELPER_H */
ns3::ObjectFactory
Instantiate subclasses of ns3::Object.
Definition:
object-factory.h:48
ns3::ObjectFactory::Set
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
Definition:
object-factory.h:220
ns3::ObjectFactory::SetTypeId
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Definition:
object-factory.cc:42
ns3::Ptr< WifiMac >
ns3::WifiMacHelper
create MAC layers for a ns3::WifiNetDevice.
Definition:
wifi-mac-helper.h:48
ns3::WifiMacHelper::m_mac
ObjectFactory m_mac
MAC object factory.
Definition:
wifi-mac-helper.h:132
ns3::WifiMacHelper::m_queueScheduler
ObjectFactory m_queueScheduler
MAC queue scheduler.
Definition:
wifi-mac-helper.h:134
ns3::WifiMacHelper::SetAckManager
void SetAckManager(std::string type, Args &&... args)
Helper function used to set the Acknowledgment Manager.
Definition:
wifi-mac-helper.h:183
ns3::WifiMacHelper::~WifiMacHelper
virtual ~WifiMacHelper()
Destroy a WifiMacHelper.
Definition:
wifi-mac-helper.cc:45
ns3::WifiMacHelper::Create
virtual Ptr< WifiMac > Create(Ptr< WifiNetDevice > device, WifiStandard standard) const
Definition:
wifi-mac-helper.cc:50
ns3::WifiMacHelper::m_protectionManager
ObjectFactory m_protectionManager
Factory to create a protection manager.
Definition:
wifi-mac-helper.h:135
ns3::WifiMacHelper::m_muScheduler
ObjectFactory m_muScheduler
Multi-user Scheduler object factory.
Definition:
wifi-mac-helper.h:137
ns3::WifiMacHelper::SetProtectionManager
void SetProtectionManager(std::string type, Args &&... args)
Helper function used to set the Protection Manager.
Definition:
wifi-mac-helper.h:175
ns3::WifiMacHelper::SetMacQueueScheduler
void SetMacQueueScheduler(std::string type, Args &&... args)
Helper function used to set the MAC queue scheduler.
Definition:
wifi-mac-helper.h:167
ns3::WifiMacHelper::m_assocManager
ObjectFactory m_assocManager
Association Manager.
Definition:
wifi-mac-helper.h:133
ns3::WifiMacHelper::WifiMacHelper
WifiMacHelper()
Create a WifiMacHelper to make life easier for people who want to work with Wifi MAC layers.
Definition:
wifi-mac-helper.cc:34
ns3::WifiMacHelper::SetAssocManager
void SetAssocManager(std::string type, Args &&... args)
Helper function used to set the Association Manager.
Definition:
wifi-mac-helper.h:159
ns3::WifiMacHelper::SetMultiUserScheduler
void SetMultiUserScheduler(std::string type, Args &&... args)
Helper function used to set the Multi User Scheduler that can be aggregated to an HE AP's MAC.
Definition:
wifi-mac-helper.h:191
ns3::WifiMacHelper::m_ackManager
ObjectFactory m_ackManager
Factory to create an acknowledgment manager.
Definition:
wifi-mac-helper.h:136
ns3::WifiMacHelper::SetType
void SetType(std::string type, Args &&... args)
Definition:
wifi-mac-helper.h:151
ns3::WifiStandard
WifiStandard
Identifies the IEEE 802.11 specifications that a Wifi device can be configured to use.
Definition:
wifi-standards.h:38
check-style-clang-format.args
args
Definition:
check-style-clang-format.py:675
check-style-clang-format.type
type
Definition:
check-style-clang-format.py:657
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
wifi
helper
wifi-mac-helper.h
Generated on Fri Mar 31 2023 13:30:52 for ns-3 by
1.9.1