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
wifi-tx-vector.cc
Go to the documentation of this file.
1
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2010 CTTC
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: Nicola Baldo <nbaldo@cttc.es>
19
* : Ghada Badawy <gbadawy@gmail.com>
20
*/
21
22
#include "ns3/wifi-tx-vector.h"
23
24
namespace
ns3 {
25
26
WifiTxVector::WifiTxVector
()
27
{
28
}
29
30
WifiTxVector::WifiTxVector
(
WifiMode
mode, uint8_t powerLevel, uint8_t retries,
bool
shortGuardInterval, uint8_t nss, uint8_t ness,
bool
stbc)
31
: m_mode (mode),
32
m_txPowerLevel (powerLevel),
33
m_retries (retries),
34
m_shortGuardInterval(shortGuardInterval),
35
m_nss(nss),
36
m_ness(ness),
37
m_stbc(stbc)
38
{
39
}
40
41
WifiMode
42
WifiTxVector::GetMode
(
void
)
const
43
{
44
return
m_mode
;
45
}
46
uint8_t
47
WifiTxVector::GetTxPowerLevel
(
void
)
const
48
{
49
return
m_txPowerLevel
;
50
}
51
uint8_t
52
WifiTxVector::GetRetries
(
void
)
const
53
{
54
return
m_retries
;
55
}
56
bool
57
WifiTxVector::IsShortGuardInterval
(
void
)
const
58
{
59
return
m_shortGuardInterval
;
60
}
61
uint8_t
62
WifiTxVector::GetNss
(
void
)
const
63
{
64
return
m_nss
;
65
}
66
uint8_t
67
WifiTxVector::GetNess
(
void
)
const
68
{
69
return
m_ness
;
70
}
71
bool
72
WifiTxVector::IsStbc
(
void
)
const
73
{
74
return
m_stbc
;
75
}
76
77
void
78
WifiTxVector::SetMode
(
WifiMode
mode)
79
{
80
m_mode
=mode;
81
}
82
void
83
WifiTxVector::SetTxPowerLevel
(uint8_t powerlevel)
84
{
85
m_txPowerLevel
=powerlevel;
86
}
87
void
88
WifiTxVector::SetRetries
(uint8_t retries)
89
{
90
m_retries
= retries;
91
}
92
void
93
WifiTxVector::SetShortGuardInterval
(
bool
guardinterval)
94
{
95
m_shortGuardInterval
=guardinterval;
96
}
97
void
98
WifiTxVector::SetNss
(uint8_t nss)
99
{
100
m_nss
= nss;
101
}
102
void
103
WifiTxVector::SetNess
(uint8_t ness)
104
{
105
m_ness
=ness;
106
}
107
void
108
WifiTxVector::SetStbc
(
bool
stbc)
109
{
110
m_stbc
=stbc;
111
}
112
113
std::ostream &
operator <<
( std::ostream &os,
const
WifiTxVector
&v)
114
{
115
os <<
"mode:"
<< v.
GetMode
() <<
" txpwrlvl:"
<< v.
GetTxPowerLevel
() <<
" retries:"
<< v.
GetRetries
() <<
" Short GI: "
<< v.
IsShortGuardInterval
() <<
" Nss: "
<< v.
GetNss
() <<
" Ness: "
<< v.
GetNess
() <<
" STBC: "
<< v.
IsStbc
();
116
return
os;
117
}
118
119
}
// namespace ns3
ns3::WifiTxVector::SetShortGuardInterval
void SetShortGuardInterval(bool guardinterval)
Sets if short gurad interval is being used.
Definition:
wifi-tx-vector.cc:93
ns3::WifiTxVector
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
Definition:
wifi-tx-vector.h:47
ns3::WifiTxVector::m_shortGuardInterval
bool m_shortGuardInterval
Definition:
wifi-tx-vector.h:147
ns3::WifiTxVector::SetStbc
void SetStbc(bool stbc)
Sets if STBC is being used.
Definition:
wifi-tx-vector.cc:108
ns3::WifiTxVector::IsShortGuardInterval
bool IsShortGuardInterval(void) const
Definition:
wifi-tx-vector.cc:57
ns3::WifiMode
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition:
wifi-mode.h:91
ns3::WifiTxVector::GetTxPowerLevel
uint8_t GetTxPowerLevel(void) const
Definition:
wifi-tx-vector.cc:47
ns3::WifiTxVector::WifiTxVector
WifiTxVector()
Definition:
wifi-tx-vector.cc:26
ns3::WifiTxVector::m_nss
uint8_t m_nss
Definition:
wifi-tx-vector.h:148
ns3::WifiTxVector::GetNess
uint8_t GetNess(void) const
Definition:
wifi-tx-vector.cc:67
ns3::WifiTxVector::IsStbc
bool IsStbc(void) const
Check if STBC is used or not.
Definition:
wifi-tx-vector.cc:72
ns3::WifiTxVector::m_retries
uint8_t m_retries
The DATA_RETRIES/RTS_RETRIES parameter for Click radiotap information.
Definition:
wifi-tx-vector.h:145
ns3::WifiTxVector::SetNss
void SetNss(uint8_t nss)
Sets the number of Nss refer to IEEE802.11n Table 20-28 for explanation and range.
Definition:
wifi-tx-vector.cc:98
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Definition:
angles.cc:43
ns3::WifiTxVector::SetTxPowerLevel
void SetTxPowerLevel(uint8_t powerlevel)
Sets the selected transmission power level.
Definition:
wifi-tx-vector.cc:83
ns3::WifiTxVector::m_stbc
bool m_stbc
Definition:
wifi-tx-vector.h:150
ns3::WifiTxVector::SetMode
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
Definition:
wifi-tx-vector.cc:78
ns3::WifiTxVector::GetNss
uint8_t GetNss(void) const
Definition:
wifi-tx-vector.cc:62
ns3::WifiTxVector::SetNess
void SetNess(uint8_t ness)
Sets the Ness number refer to IEEE802.11n Table 20-6 for explanation.
Definition:
wifi-tx-vector.cc:103
ns3::WifiTxVector::SetRetries
void SetRetries(uint8_t retries)
Sets the number of retries.
Definition:
wifi-tx-vector.cc:88
ns3::WifiTxVector::GetRetries
uint8_t GetRetries(void) const
Definition:
wifi-tx-vector.cc:52
ns3::WifiTxVector::m_ness
uint8_t m_ness
Definition:
wifi-tx-vector.h:149
ns3::WifiTxVector::GetMode
WifiMode GetMode(void) const
Definition:
wifi-tx-vector.cc:42
ns3::WifiTxVector::m_txPowerLevel
uint8_t m_txPowerLevel
The TXPWR_LEVEL parameter in Table 15-4.
Definition:
wifi-tx-vector.h:142
ns3::WifiTxVector::m_mode
WifiMode m_mode
The DATARATE parameter in Table 15-4.
Definition:
wifi-tx-vector.h:139
src
wifi
model
wifi-tx-vector.cc
Generated on Sat Apr 19 2014 14:07:12 for ns-3 by
1.8.6