author | Sébastien Deronne <sebastien.deronne@gmail.com> |
Sat, 05 Sep 2015 11:37:49 +0200 | |
changeset 11640 | 8dfcbf71cb06 |
parent 11628 | 243b71de25a0 |
permissions | -rw-r--r-- |
10139 | 1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 |
/* |
|
3 |
* Copyright (c) 2009 MIRKO BANCHI |
|
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: Ghada Badawy <gbadawy@gmail.com> |
|
19 |
*/ |
|
11450
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
10139
diff
changeset
|
20 |
|
10139 | 21 |
#include "ht-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 |
HtWifiMacHelper::HtWifiMacHelper () |
|
31 |
{ |
|
32 |
} |
|
33 |
||
34 |
HtWifiMacHelper::~HtWifiMacHelper () |
|
35 |
{ |
|
36 |
} |
|
37 |
||
38 |
HtWifiMacHelper |
|
39 |
HtWifiMacHelper::Default (void) |
|
40 |
{ |
|
41 |
HtWifiMacHelper helper; |
|
42 |
||
43 |
helper.SetType ("ns3::StaWifiMac", |
|
44 |
"QosSupported", BooleanValue (true), |
|
45 |
"HtSupported", BooleanValue (true)); |
|
46 |
||
47 |
return helper; |
|
48 |
} |
|
49 |
||
11640
8dfcbf71cb06
Add helper to convert mcs values into datarate values
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
50 |
StringValue |
8dfcbf71cb06
Add helper to convert mcs values into datarate values
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
51 |
HtWifiMacHelper::DataRateForMcs (int mcs) |
8dfcbf71cb06
Add helper to convert mcs values into datarate values
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
52 |
{ |
8dfcbf71cb06
Add helper to convert mcs values into datarate values
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
53 |
std::stringstream sstmp; |
8dfcbf71cb06
Add helper to convert mcs values into datarate values
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
54 |
std::string strtmp, dataRate; |
8dfcbf71cb06
Add helper to convert mcs values into datarate values
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
55 |
|
8dfcbf71cb06
Add helper to convert mcs values into datarate values
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
56 |
sstmp << mcs; |
8dfcbf71cb06
Add helper to convert mcs values into datarate values
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
57 |
sstmp >> strtmp; |
8dfcbf71cb06
Add helper to convert mcs values into datarate values
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
58 |
dataRate = "HtMcs" + strtmp; |
8dfcbf71cb06
Add helper to convert mcs values into datarate values
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
59 |
|
8dfcbf71cb06
Add helper to convert mcs values into datarate values
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
60 |
return StringValue (dataRate); |
8dfcbf71cb06
Add helper to convert mcs values into datarate values
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
61 |
} |
8dfcbf71cb06
Add helper to convert mcs values into datarate values
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
11628
diff
changeset
|
62 |
|
11450
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
10139
diff
changeset
|
63 |
} //namespace ns3 |