A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
ht-configuration.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2018 Sébastien Deronne
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Sébastien Deronne <sebastien.deronne@gmail.com>
18
*/
19
20
#include "
ht-configuration.h
"
21
22
#include "ns3/boolean.h"
23
#include "ns3/log.h"
24
#include "ns3/uinteger.h"
25
26
namespace
ns3
27
{
28
29
NS_LOG_COMPONENT_DEFINE
(
"HtConfiguration"
);
30
31
NS_OBJECT_ENSURE_REGISTERED
(HtConfiguration);
32
33
HtConfiguration::HtConfiguration
()
34
{
35
NS_LOG_FUNCTION
(
this
);
36
}
37
38
HtConfiguration::~HtConfiguration
()
39
{
40
NS_LOG_FUNCTION
(
this
);
41
}
42
43
TypeId
44
HtConfiguration::GetTypeId
()
45
{
46
static
ns3::TypeId
tid =
47
ns3::TypeId
(
"ns3::HtConfiguration"
)
48
.
SetParent
<
Object
>()
49
.SetGroupName(
"Wifi"
)
50
.AddConstructor<
HtConfiguration
>()
51
.AddAttribute(
"ShortGuardIntervalSupported"
,
52
"Whether or not short guard interval is supported."
,
53
BooleanValue
(
false
),
54
MakeBooleanAccessor
(&
HtConfiguration::GetShortGuardIntervalSupported
,
55
&
HtConfiguration::SetShortGuardIntervalSupported
),
56
MakeBooleanChecker
())
57
.AddAttribute(
"LdpcSupported"
,
58
"Whether or not LDPC coding is supported."
,
59
BooleanValue
(
false
),
60
MakeBooleanAccessor
(&
HtConfiguration::GetLdpcSupported
,
61
&
HtConfiguration::SetLdpcSupported
),
62
MakeBooleanChecker
())
63
.AddAttribute(
"Support40MHzOperation"
,
64
"Whether or not 40 MHz operation is to be supported."
,
65
BooleanValue
(
true
),
66
MakeBooleanAccessor
(&
HtConfiguration::Get40MHzOperationSupported
,
67
&
HtConfiguration::Set40MHzOperationSupported
),
68
MakeBooleanChecker
());
69
return
tid;
70
}
71
72
void
73
HtConfiguration::SetShortGuardIntervalSupported
(
bool
enable)
74
{
75
NS_LOG_FUNCTION
(
this
<< enable);
76
m_sgiSupported
= enable;
77
}
78
79
bool
80
HtConfiguration::GetShortGuardIntervalSupported
()
const
81
{
82
return
m_sgiSupported
;
83
}
84
85
void
86
HtConfiguration::SetLdpcSupported
(
bool
enable)
87
{
88
NS_LOG_FUNCTION
(
this
<< enable);
89
m_ldpcSupported
= enable;
90
}
91
92
bool
93
HtConfiguration::GetLdpcSupported
()
const
94
{
95
return
m_ldpcSupported
;
96
}
97
98
void
99
HtConfiguration::Set40MHzOperationSupported
(
bool
enable)
100
{
101
NS_LOG_FUNCTION
(
this
<< enable);
102
m_40MHzSupported
= enable;
103
}
104
105
bool
106
HtConfiguration::Get40MHzOperationSupported
()
const
107
{
108
return
m_40MHzSupported
;
109
}
110
111
}
// namespace ns3
ns3::BooleanValue
AttributeValue implementation for Boolean.
Definition:
boolean.h:37
ns3::HtConfiguration
HT configuration.
Definition:
ht-configuration.h:37
ns3::HtConfiguration::m_40MHzSupported
bool m_40MHzSupported
whether 40 MHz operation is supported
Definition:
ht-configuration.h:92
ns3::HtConfiguration::Get40MHzOperationSupported
bool Get40MHzOperationSupported() const
Definition:
ht-configuration.cc:106
ns3::HtConfiguration::GetShortGuardIntervalSupported
bool GetShortGuardIntervalSupported() const
Definition:
ht-configuration.cc:80
ns3::HtConfiguration::m_ldpcSupported
bool m_ldpcSupported
flag whether LDPC coding is supported
Definition:
ht-configuration.h:91
ns3::HtConfiguration::Set40MHzOperationSupported
void Set40MHzOperationSupported(bool enable)
Enable or disable 40 MHz operation support.
Definition:
ht-configuration.cc:99
ns3::HtConfiguration::SetShortGuardIntervalSupported
void SetShortGuardIntervalSupported(bool enable)
Enable or disable SGI support.
Definition:
ht-configuration.cc:73
ns3::HtConfiguration::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
ht-configuration.cc:44
ns3::HtConfiguration::HtConfiguration
HtConfiguration()
Definition:
ht-configuration.cc:33
ns3::HtConfiguration::~HtConfiguration
~HtConfiguration() override
Definition:
ht-configuration.cc:38
ns3::HtConfiguration::m_sgiSupported
bool m_sgiSupported
flag whether short guard interval is supported
Definition:
ht-configuration.h:90
ns3::HtConfiguration::SetLdpcSupported
void SetLdpcSupported(bool enable)
Enable or disable LDPC support.
Definition:
ht-configuration.cc:86
ns3::HtConfiguration::GetLdpcSupported
bool GetLdpcSupported() const
Definition:
ht-configuration.cc:93
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:89
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition:
type-id.cc:936
ns3::MakeBooleanAccessor
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Definition:
boolean.h:86
ns3::MakeBooleanChecker
Ptr< const AttributeChecker > MakeBooleanChecker()
Definition:
boolean.cc:124
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition:
log.h:202
NS_LOG_FUNCTION
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Definition:
log-macros-enabled.h:238
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition:
object-base.h:46
ht-configuration.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
wifi
model
ht
ht-configuration.cc
Generated on Sun Jul 2 2023 18:22:10 for ns-3 by
1.9.6