A Discrete-Event Network Simulator
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
26namespace ns3
27{
28
29NS_LOG_COMPONENT_DEFINE("HtConfiguration");
30
31NS_OBJECT_ENSURE_REGISTERED(HtConfiguration);
32
34{
35 NS_LOG_FUNCTION(this);
36}
37
39{
40 NS_LOG_FUNCTION(this);
41}
42
45{
46 static ns3::TypeId tid =
47 ns3::TypeId("ns3::HtConfiguration")
49 .SetGroupName("Wifi")
50 .AddConstructor<HtConfiguration>()
51 .AddAttribute("ShortGuardIntervalSupported",
52 "Whether or not short guard interval is supported.",
53 BooleanValue(false),
57 .AddAttribute("LdpcSupported",
58 "Whether or not LDPC coding is supported.",
59 BooleanValue(false),
63 .AddAttribute("Support40MHzOperation",
64 "Whether or not 40 MHz operation is to be supported.",
65 BooleanValue(true),
69 return tid;
70}
71
72void
74{
75 NS_LOG_FUNCTION(this << enable);
76 m_sgiSupported = enable;
77}
78
79bool
81{
82 return m_sgiSupported;
83}
84
85void
87{
88 NS_LOG_FUNCTION(this << enable);
89 m_ldpcSupported = enable;
90}
91
92bool
94{
95 return m_ldpcSupported;
96}
97
98void
100{
101 NS_LOG_FUNCTION(this << enable);
102 m_40MHzSupported = enable;
103}
104
105bool
107{
108 return m_40MHzSupported;
109}
110
111} // namespace ns3
AttributeValue implementation for Boolean.
Definition: boolean.h:37
HT configuration.
bool m_40MHzSupported
whether 40 MHz operation is supported
bool Get40MHzOperationSupported() const
bool GetShortGuardIntervalSupported() const
bool m_ldpcSupported
flag whether LDPC coding is supported
void Set40MHzOperationSupported(bool enable)
Enable or disable 40 MHz operation support.
void SetShortGuardIntervalSupported(bool enable)
Enable or disable SGI support.
static TypeId GetTypeId()
Get the type ID.
bool m_sgiSupported
flag whether short guard interval is supported
void SetLdpcSupported(bool enable)
Enable or disable LDPC support.
bool GetLdpcSupported() const
A base class which provides memory management and object aggregation.
Definition: object.h:89
a unique identifier for an interface.
Definition: type-id.h:59
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:936
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Definition: boolean.h:86
Ptr< const AttributeChecker > MakeBooleanChecker()
Definition: boolean.cc:124
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:46
Every class exported by the ns3 library is enclosed in the ns3 namespace.