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
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Sébastien Deronne <sebastien.deronne@gmail.com>
7
*/
8
9
#include "
ht-configuration.h
"
10
11
#include "ns3/boolean.h"
12
#include "ns3/log.h"
13
#include "ns3/uinteger.h"
14
15
namespace
ns3
16
{
17
18
NS_LOG_COMPONENT_DEFINE
(
"HtConfiguration"
);
19
20
NS_OBJECT_ENSURE_REGISTERED
(HtConfiguration);
21
22
HtConfiguration::HtConfiguration
()
23
{
24
NS_LOG_FUNCTION
(
this
);
25
}
26
27
HtConfiguration::~HtConfiguration
()
28
{
29
NS_LOG_FUNCTION
(
this
);
30
}
31
32
TypeId
33
HtConfiguration::GetTypeId
()
34
{
35
static
ns3::TypeId
tid =
36
ns3::TypeId
(
"ns3::HtConfiguration"
)
37
.
SetParent
<
Object
>()
38
.SetGroupName(
"Wifi"
)
39
.AddConstructor<
HtConfiguration
>()
40
.AddAttribute(
"ShortGuardIntervalSupported"
,
41
"Whether or not short guard interval is supported."
,
42
BooleanValue
(
false
),
43
MakeBooleanAccessor
(&
HtConfiguration::GetShortGuardIntervalSupported
,
44
&
HtConfiguration::SetShortGuardIntervalSupported
),
45
MakeBooleanChecker
())
46
.AddAttribute(
"LdpcSupported"
,
47
"Whether or not LDPC coding is supported."
,
48
BooleanValue
(
false
),
49
MakeBooleanAccessor
(&
HtConfiguration::GetLdpcSupported
,
50
&
HtConfiguration::SetLdpcSupported
),
51
MakeBooleanChecker
())
52
.AddAttribute(
"Support40MHzOperation"
,
53
"Whether or not 40 MHz operation is to be supported."
,
54
BooleanValue
(
true
),
55
MakeBooleanAccessor
(&
HtConfiguration::Get40MHzOperationSupported
,
56
&
HtConfiguration::Set40MHzOperationSupported
),
57
MakeBooleanChecker
());
58
return
tid;
59
}
60
61
void
62
HtConfiguration::SetShortGuardIntervalSupported
(
bool
enable)
63
{
64
NS_LOG_FUNCTION
(
this
<< enable);
65
m_sgiSupported
= enable;
66
}
67
68
bool
69
HtConfiguration::GetShortGuardIntervalSupported
()
const
70
{
71
return
m_sgiSupported
;
72
}
73
74
void
75
HtConfiguration::SetLdpcSupported
(
bool
enable)
76
{
77
NS_LOG_FUNCTION
(
this
<< enable);
78
m_ldpcSupported
= enable;
79
}
80
81
bool
82
HtConfiguration::GetLdpcSupported
()
const
83
{
84
return
m_ldpcSupported
;
85
}
86
87
void
88
HtConfiguration::Set40MHzOperationSupported
(
bool
enable)
89
{
90
NS_LOG_FUNCTION
(
this
<< enable);
91
m_40MHzSupported
= enable;
92
}
93
94
bool
95
HtConfiguration::Get40MHzOperationSupported
()
const
96
{
97
return
m_40MHzSupported
;
98
}
99
100
}
// namespace ns3
ns3::BooleanValue
Definition
boolean.h:26
ns3::HtConfiguration
HT configuration.
Definition
ht-configuration.h:26
ns3::HtConfiguration::m_40MHzSupported
bool m_40MHzSupported
whether 40 MHz operation is supported
Definition
ht-configuration.h:81
ns3::HtConfiguration::Get40MHzOperationSupported
bool Get40MHzOperationSupported() const
Definition
ht-configuration.cc:95
ns3::HtConfiguration::GetShortGuardIntervalSupported
bool GetShortGuardIntervalSupported() const
Definition
ht-configuration.cc:69
ns3::HtConfiguration::m_ldpcSupported
bool m_ldpcSupported
flag whether LDPC coding is supported
Definition
ht-configuration.h:80
ns3::HtConfiguration::Set40MHzOperationSupported
void Set40MHzOperationSupported(bool enable)
Enable or disable 40 MHz operation support.
Definition
ht-configuration.cc:88
ns3::HtConfiguration::SetShortGuardIntervalSupported
void SetShortGuardIntervalSupported(bool enable)
Enable or disable SGI support.
Definition
ht-configuration.cc:62
ns3::HtConfiguration::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
ht-configuration.cc:33
ns3::HtConfiguration::HtConfiguration
HtConfiguration()
Definition
ht-configuration.cc:22
ns3::HtConfiguration::~HtConfiguration
~HtConfiguration() override
Definition
ht-configuration.cc:27
ns3::HtConfiguration::m_sgiSupported
bool m_sgiSupported
flag whether short guard interval is supported
Definition
ht-configuration.h:79
ns3::HtConfiguration::SetLdpcSupported
void SetLdpcSupported(bool enable)
Enable or disable LDPC support.
Definition
ht-configuration.cc:75
ns3::HtConfiguration::GetLdpcSupported
bool GetLdpcSupported() const
Definition
ht-configuration.cc:82
ns3::Object
A base class which provides memory management and object aggregation.
Definition
object.h:78
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition
type-id.cc:1001
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition
log.h:191
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:229
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition
object-base.h:35
ht-configuration.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::MakeBooleanChecker
Ptr< const AttributeChecker > MakeBooleanChecker()
Definition
boolean.cc:113
ns3::MakeBooleanAccessor
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Definition
boolean.h:70
src
wifi
model
ht
ht-configuration.cc
Generated on Fri Nov 8 2024 13:59:07 for ns-3 by
1.11.0