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::m_sgiSupported
),
44
MakeBooleanChecker
())
45
.AddAttribute(
"LdpcSupported"
,
46
"Whether or not LDPC coding is supported."
,
47
BooleanValue
(
false
),
48
MakeBooleanAccessor
(&
HtConfiguration::m_ldpcSupported
),
49
MakeBooleanChecker
())
50
.AddAttribute(
"Support40MHzOperation"
,
51
"Whether or not 40 MHz operation is to be supported."
,
52
BooleanValue
(
true
),
53
MakeBooleanAccessor
(&
HtConfiguration::m_40MHzSupported
),
54
MakeBooleanChecker
());
55
return
tid;
56
}
57
58
void
59
HtConfiguration::SetShortGuardIntervalSupported
(
bool
enable)
60
{
61
NS_LOG_FUNCTION
(
this
<< enable);
62
m_sgiSupported
= enable;
63
}
64
65
bool
66
HtConfiguration::GetShortGuardIntervalSupported
()
const
67
{
68
return
m_sgiSupported
;
69
}
70
71
void
72
HtConfiguration::SetLdpcSupported
(
bool
enable)
73
{
74
NS_LOG_FUNCTION
(
this
<< enable);
75
m_ldpcSupported
= enable;
76
}
77
78
bool
79
HtConfiguration::GetLdpcSupported
()
const
80
{
81
return
m_ldpcSupported
;
82
}
83
84
void
85
HtConfiguration::Set40MHzOperationSupported
(
bool
enable)
86
{
87
NS_LOG_FUNCTION
(
this
<< enable);
88
m_40MHzSupported
= enable;
89
}
90
91
bool
92
HtConfiguration::Get40MHzOperationSupported
()
const
93
{
94
return
m_40MHzSupported
;
95
}
96
97
}
// namespace ns3
ns3::BooleanValue
AttributeValue implementation for Boolean.
Definition
boolean.h:26
ns3::HtConfiguration
HT configuration.
Definition
ht-configuration.h:27
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:92
ns3::HtConfiguration::GetShortGuardIntervalSupported
bool GetShortGuardIntervalSupported() const
Definition
ht-configuration.cc:66
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:85
ns3::HtConfiguration::SetShortGuardIntervalSupported
void SetShortGuardIntervalSupported(bool enable)
Enable or disable SGI support.
Definition
ht-configuration.cc:59
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:90
ns3::HtConfiguration::SetLdpcSupported
void SetLdpcSupported(bool enable)
Enable or disable LDPC support.
Definition
ht-configuration.cc:72
ns3::HtConfiguration::GetLdpcSupported
bool GetLdpcSupported() const
Definition
ht-configuration.cc:79
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:49
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition
type-id.cc:1001
ns3::MakeBooleanChecker
Ptr< const AttributeChecker > MakeBooleanChecker()
Definition
boolean.cc:113
ns3::MakeBooleanAccessor
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition
boolean.h:70
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.
src
wifi
model
ht
ht-configuration.cc
Generated on Mon Mar 17 2025 19:37:15 for ns-3 by
1.11.0