A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
wave-mac-helper.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2008 INRIA
3
* Copyright (c) 2009 MIRKO BANCHI
4
* Copyright (c) 2013 Dalian University of Technology
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 2 as
8
* published by the Free Software Foundation;
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
*
19
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
20
* Author: Mirko Banchi <mk.banchi@gmail.com>
21
* Author: Junling Bu <linlinjavaer@gmail.com>
22
*/
23
#ifndef WAVE_MAC_HELPER_H
24
#define WAVE_MAC_HELPER_H
25
#include "ns3/wifi-mac-helper.h"
26
27
namespace
ns3
28
{
29
34
class
NqosWaveMacHelper
:
public
WifiMacHelper
35
{
36
public
:
41
NqosWaveMacHelper
();
42
46
~NqosWaveMacHelper
()
override
;
52
static
NqosWaveMacHelper
Default
();
64
template
<
typename
... Ts>
65
void
SetType
(std::string
type
, Ts&&...
args
);
66
};
67
72
class
QosWaveMacHelper
:
public
WifiMacHelper
73
{
74
public
:
79
QosWaveMacHelper
();
80
84
~QosWaveMacHelper
()
override
;
85
90
static
QosWaveMacHelper
Default
();
91
103
template
<
typename
... Ts>
104
void
SetType
(std::string
type
, Ts&&...
args
);
105
};
106
107
/***************************************************************
108
* Implementation of the templates declared above.
109
***************************************************************/
110
111
template
<
typename
... Ts>
112
void
113
NqosWaveMacHelper::SetType
(std::string
type
, Ts&&...
args
)
114
{
115
if
(
type
!=
"ns3::OcbWifiMac"
)
116
{
117
NS_FATAL_ERROR
(
"QosWaveMacHelper shall set OcbWifiMac"
);
118
}
119
WifiMacHelper::SetType
(
"ns3::OcbWifiMac"
, std::forward<Ts>(
args
)...);
120
}
121
122
template
<
typename
... Ts>
123
void
124
QosWaveMacHelper::SetType
(std::string
type
, Ts&&...
args
)
125
{
126
if
(
type
!=
"ns3::OcbWifiMac"
)
127
{
128
NS_FATAL_ERROR
(
"QosWaveMacHelper shall set OcbWifiMac"
);
129
}
130
WifiMacHelper::SetType
(
"ns3::OcbWifiMac"
, std::forward<Ts>(
args
)...);
131
}
132
133
}
// namespace ns3
134
135
#endif
/* WAVE_MAC_HELPER_H */
ns3::NqosWaveMacHelper
Nqos Wave Mac Helper class.
Definition:
wave-mac-helper.h:35
ns3::NqosWaveMacHelper::SetType
void SetType(std::string type, Ts &&... args)
Definition:
wave-mac-helper.h:113
ns3::NqosWaveMacHelper::Default
static NqosWaveMacHelper Default()
Create a mac helper in a default working state.
Definition:
wave-mac-helper.cc:39
ns3::NqosWaveMacHelper::~NqosWaveMacHelper
~NqosWaveMacHelper() override
Destroy a NqosWaveMacHelper.
Definition:
wave-mac-helper.cc:34
ns3::NqosWaveMacHelper::NqosWaveMacHelper
NqosWaveMacHelper()
Create a NqosWaveMacHelper to make life easier for people who want to work with non-QOS Wave MAC laye...
Definition:
wave-mac-helper.cc:30
ns3::QosWaveMacHelper
Qos Wave Mac Helper class.
Definition:
wave-mac-helper.h:73
ns3::QosWaveMacHelper::QosWaveMacHelper
QosWaveMacHelper()
Create a QosWaveMacHelper that is used to make life easier when working with Wifi 802....
Definition:
wave-mac-helper.cc:51
ns3::QosWaveMacHelper::Default
static QosWaveMacHelper Default()
Create a mac helper in a default working state.
Definition:
wave-mac-helper.cc:60
ns3::QosWaveMacHelper::~QosWaveMacHelper
~QosWaveMacHelper() override
Destroy a QosWaveMacHelper.
Definition:
wave-mac-helper.cc:55
ns3::QosWaveMacHelper::SetType
void SetType(std::string type, Ts &&... args)
Definition:
wave-mac-helper.h:124
ns3::WifiMacHelper
create MAC layers for a ns3::WifiNetDevice.
Definition:
wifi-mac-helper.h:48
ns3::WifiMacHelper::SetType
void SetType(std::string type, Args &&... args)
Definition:
wifi-mac-helper.h:151
NS_FATAL_ERROR
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition:
fatal-error.h:179
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
wave
helper
wave-mac-helper.h
Generated on Fri Mar 31 2023 13:30:52 for ns-3 by
1.9.1