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
ideal-wifi-manager.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2006 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
#ifndef IDEAL_WIFI_MANAGER_H
21
#define IDEAL_WIFI_MANAGER_H
22
23
#include <stdint.h>
24
#include <vector>
25
#include "
wifi-mode.h
"
26
#include "
wifi-remote-station-manager.h
"
27
28
namespace
ns3 {
29
45
class
IdealWifiManager
:
public
WifiRemoteStationManager
46
{
47
public
:
48
static
TypeId
GetTypeId
(
void
);
49
IdealWifiManager
();
50
virtual
~IdealWifiManager
();
51
52
virtual
void
SetupPhy
(
Ptr<WifiPhy>
phy);
53
54
private
:
55
// overriden from base class
56
virtual
WifiRemoteStation
*
DoCreateStation
(
void
)
const
;
57
virtual
void
DoReportRxOk
(
WifiRemoteStation
*station,
58
double
rxSnr,
WifiMode
txMode);
59
virtual
void
DoReportRtsFailed
(
WifiRemoteStation
*station);
60
virtual
void
DoReportDataFailed
(
WifiRemoteStation
*station);
61
virtual
void
DoReportRtsOk
(
WifiRemoteStation
*station,
62
double
ctsSnr,
WifiMode
ctsMode,
double
rtsSnr);
63
virtual
void
DoReportDataOk
(
WifiRemoteStation
*station,
64
double
ackSnr,
WifiMode
ackMode,
double
dataSnr);
65
virtual
void
DoReportFinalRtsFailed
(
WifiRemoteStation
*station);
66
virtual
void
DoReportFinalDataFailed
(
WifiRemoteStation
*station);
67
virtual
WifiMode
DoGetDataMode
(
WifiRemoteStation
*station, uint32_t size);
68
virtual
WifiMode
DoGetRtsMode
(
WifiRemoteStation
*station);
69
virtual
bool
IsLowLatency
(
void
)
const
;
70
71
// return the min snr needed to successfully transmit
72
// data with this mode at the specified ber.
73
double
GetSnrThreshold
(
WifiMode
mode)
const
;
74
void
AddModeSnrThreshold
(
WifiMode
mode,
double
ber);
75
76
typedef
std::vector<std::pair<double,WifiMode> >
Thresholds
;
77
78
double
m_ber
;
79
Thresholds
m_thresholds
;
80
double
m_minSnr
;
81
double
m_maxSnr
;
82
};
83
84
}
// namespace ns3
85
86
#endif
/* IDEAL_WIFI_MANAGER_H */
src
wifi
model
ideal-wifi-manager.h
Generated on Tue Oct 9 2012 16:45:48 for ns-3 by
1.8.1.2