A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
vht-wifi-mac-helper.cc
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2014 SEBASTIEN DERONNE
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: Sébastien Deronne <sebastien.deronne@gmail.com>
19
*/
20
21
#include "
vht-wifi-mac-helper.h
"
22
#include "ns3/wifi-mac.h"
23
#include "ns3/edca-txop-n.h"
24
#include "ns3/pointer.h"
25
#include "ns3/boolean.h"
26
#include "ns3/uinteger.h"
27
28
namespace
ns3
{
29
30
VhtWifiMacHelper::VhtWifiMacHelper
()
31
{
32
}
33
34
VhtWifiMacHelper::~VhtWifiMacHelper
()
35
{
36
}
37
38
VhtWifiMacHelper
39
VhtWifiMacHelper::Default
(
void
)
40
{
41
VhtWifiMacHelper
helper;
42
43
helper.
SetType
(
"ns3::StaWifiMac"
,
44
"QosSupported"
,
BooleanValue
(
true
),
45
"HtSupported"
,
BooleanValue
(
true
),
//by default, it also supports HT features
46
"VhtSupported"
,
BooleanValue
(
true
));
47
48
//MPDU aggregation is always supported
49
helper.
SetMpduAggregatorForAc
(
AC_VO
,
"ns3::MpduStandardAggregator"
);
50
helper.
SetMpduAggregatorForAc
(
AC_VI
,
"ns3::MpduStandardAggregator"
);
51
helper.
SetMpduAggregatorForAc
(
AC_BE
,
"ns3::MpduStandardAggregator"
);
52
helper.
SetMpduAggregatorForAc
(
AC_BK
,
"ns3::MpduStandardAggregator"
);
53
54
return
helper;
55
}
56
57
StringValue
58
VhtWifiMacHelper::DataRateForMcs
(
int
mcs)
59
{
60
std::stringstream sstmp;
61
std::string strtmp, dataRate;
62
63
sstmp << mcs;
64
sstmp >> strtmp;
65
dataRate =
"VhtMcs"
+ strtmp;
66
67
return
StringValue
(dataRate);
68
}
69
70
}
//namespace ns3
ns3::BooleanValue
AttributeValue implementation for Boolean.
Definition:
boolean.h:34
vht-wifi-mac-helper.h
ns3::StringValue
Hold variables of type string.
Definition:
string.h:41
ns3::QosWifiMacHelper::SetType
virtual void SetType(std::string type, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
Set the underlying type of the MAC and its attributes.
Definition:
qos-wifi-mac-helper.cc:56
ns3::VhtWifiMacHelper::DataRateForMcs
static StringValue DataRateForMcs(int mcs)
Converts a VHT MCS value into a DataRate value.
Definition:
vht-wifi-mac-helper.cc:58
ns3::VhtWifiMacHelper::~VhtWifiMacHelper
virtual ~VhtWifiMacHelper()
Definition:
vht-wifi-mac-helper.cc:34
ns3::AC_VI
Video.
Definition:
qos-utils.h:43
ns3::AC_VO
Voice.
Definition:
qos-utils.h:45
ns3::AC_BE
Best Effort.
Definition:
qos-utils.h:39
ns3::AC_BK
Background.
Definition:
qos-utils.h:41
ns3::QosWifiMacHelper::SetMpduAggregatorForAc
void SetMpduAggregatorForAc(enum AcIndex ac, std::string type, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue())
Set the class, type and attributes for the Mpdu aggregator.
Definition:
qos-wifi-mac-helper.cc:106
ns3::VhtWifiMacHelper::Default
static VhtWifiMacHelper Default(void)
Create a mac helper in a default working state.
Definition:
vht-wifi-mac-helper.cc:39
ns3::VhtWifiMacHelper
create VHT-enabled MAC layers for a ns3::WifiNetDevice.
Definition:
vht-wifi-mac-helper.h:38
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::VhtWifiMacHelper::VhtWifiMacHelper
VhtWifiMacHelper()
Create a VhtWifiMacHelper that is used to make life easier when working with Wifi devices using a QOS...
Definition:
vht-wifi-mac-helper.cc:30
src
wifi
helper
vht-wifi-mac-helper.cc
Generated on Wed Sep 30 2015 15:55:52 for ns-3 by
1.8.9.1