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
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
constant-rate-wifi-manager.cc
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2004,2005 INRIA
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: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19
*/
20
21
#include "
constant-rate-wifi-manager.h
"
22
23
#include "ns3/string.h"
24
#include "ns3/assert.h"
25
26
namespace
ns3 {
27
28
NS_OBJECT_ENSURE_REGISTERED
(ConstantRateWifiManager);
29
30
TypeId
31
ConstantRateWifiManager::GetTypeId
(
void
)
32
{
33
static
TypeId
tid =
TypeId
(
"ns3::ConstantRateWifiManager"
)
34
.
SetParent
<
WifiRemoteStationManager
> ()
35
.AddConstructor<ConstantRateWifiManager> ()
36
.AddAttribute (
"DataMode"
,
"The transmission mode to use for every data packet transmission"
,
37
StringValue
(
"OfdmRate6Mbps"
),
38
MakeWifiModeAccessor (&
ConstantRateWifiManager::m_dataMode
),
39
MakeWifiModeChecker ())
40
.AddAttribute (
"ControlMode"
,
"The transmission mode to use for every control packet transmission."
,
41
StringValue
(
"OfdmRate6Mbps"
),
42
MakeWifiModeAccessor (&
ConstantRateWifiManager::m_ctlMode
),
43
MakeWifiModeChecker ())
44
;
45
return
tid;
46
}
47
48
ConstantRateWifiManager::ConstantRateWifiManager
()
49
{
50
}
51
ConstantRateWifiManager::~ConstantRateWifiManager
()
52
{
53
}
54
55
56
WifiRemoteStation
*
57
ConstantRateWifiManager::DoCreateStation
(
void
)
const
58
{
59
WifiRemoteStation
*station =
new
WifiRemoteStation
();
60
return
station;
61
}
62
63
64
void
65
ConstantRateWifiManager::DoReportRxOk
(
WifiRemoteStation
*station,
66
double
rxSnr,
WifiMode
txMode)
67
{
68
}
69
void
70
ConstantRateWifiManager::DoReportRtsFailed
(
WifiRemoteStation
*station)
71
{
72
}
73
void
74
ConstantRateWifiManager::DoReportDataFailed
(
WifiRemoteStation
*station)
75
{
76
}
77
void
78
ConstantRateWifiManager::DoReportRtsOk
(
WifiRemoteStation
*st,
79
double
ctsSnr,
WifiMode
ctsMode,
double
rtsSnr)
80
{
81
}
82
void
83
ConstantRateWifiManager::DoReportDataOk
(
WifiRemoteStation
*st,
84
double
ackSnr,
WifiMode
ackMode,
double
dataSnr)
85
{
86
}
87
void
88
ConstantRateWifiManager::DoReportFinalRtsFailed
(
WifiRemoteStation
*station)
89
{
90
}
91
void
92
ConstantRateWifiManager::DoReportFinalDataFailed
(
WifiRemoteStation
*station)
93
{
94
}
95
96
WifiMode
97
ConstantRateWifiManager::DoGetDataMode
(
WifiRemoteStation
*st, uint32_t size)
98
{
99
return
m_dataMode
;
100
}
101
WifiMode
102
ConstantRateWifiManager::DoGetRtsMode
(
WifiRemoteStation
*st)
103
{
104
return
m_ctlMode
;
105
}
106
107
bool
108
ConstantRateWifiManager::IsLowLatency
(
void
)
const
109
{
110
return
true
;
111
}
112
113
}
// namespace ns3
src
wifi
model
constant-rate-wifi-manager.cc
Generated on Tue Oct 9 2012 16:45:48 for ns-3 by
1.8.1.2