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
capability-information.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2006 INRIA
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
7
*/
8
9
#ifndef CAPABILITY_INFORMATION_H
10
#define CAPABILITY_INFORMATION_H
11
12
#include "ns3/buffer.h"
13
#include "ns3/wifi-export.h"
14
15
namespace
ns3
16
{
17
18
/**
19
* @ingroup wifi
20
*
21
* Capability information
22
*/
23
class
WIFI_EXPORT
CapabilityInformation
24
{
25
public
:
26
CapabilityInformation
();
27
28
/**
29
* Set the Extended Service Set (ESS) bit
30
* in the capability information field.
31
*/
32
void
SetEss
();
33
/**
34
* Set the Independent BSS (IBSS) bit
35
* in the capability information field.
36
*/
37
void
SetIbss
();
38
/**
39
* Set the short preamble bit
40
* in the capability information field.
41
*
42
* @param shortPreamble the short preamble bit
43
*
44
*/
45
void
SetShortPreamble
(
bool
shortPreamble);
46
/**
47
* Set the short slot time bit
48
* in the capability information field.
49
*
50
* @param shortSlotTime the short preamble bit
51
*
52
*/
53
void
SetShortSlotTime
(
bool
shortSlotTime);
54
/**
55
* Set the CF-Pollable bit
56
* in the capability information field.
57
*/
58
void
SetCfPollable
();
59
60
/**
61
* Set Critical Update flag (see IEEE 802.11be D5.0 9.4.1.4)
62
* @param flag critical update bit
63
*/
64
void
SetCriticalUpdate
(
bool
flag);
65
66
/**
67
* Check if the Extended Service Set (ESS) bit
68
* in the capability information field is set to 1.
69
*
70
* @return ESS bit in the capability information
71
* field is set to 1
72
*/
73
bool
IsEss
()
const
;
74
/**
75
* Check if the Independent BSS (IBSS) bit
76
* in the capability information field is set to 1.
77
*
78
* @return IBSS bit in the capability information
79
* field is set to 1
80
*/
81
bool
IsIbss
()
const
;
82
/**
83
* Check if the short preamble bit
84
* in the capability information field is set to 1.
85
*
86
* @return short preamble bit in the capability information
87
* field is set to 1
88
*/
89
bool
IsShortPreamble
()
const
;
90
/**
91
* Check if the short slot time
92
* in the capability information field is set to 1.
93
*
94
* @return short slot time bit in the capability information
95
* field is set to 1
96
*/
97
bool
IsShortSlotTime
()
const
;
98
/**
99
* Check if the CF-Pollable bit
100
* in the capability information field is set to 1.
101
*
102
* @return CF-Pollable bit in the capability information
103
* field is set to 1
104
*/
105
bool
IsCfPollable
()
const
;
106
107
/**
108
* Check if Critical Update bit is set to 1
109
*
110
* @return true if set to 1, false otherwise
111
*/
112
bool
IsCriticalUpdate
()
const
;
113
114
/**
115
* Return the serialized size of capability
116
* information.
117
*
118
* @return the serialized size
119
*/
120
uint32_t
GetSerializedSize
()
const
;
121
/**
122
* Serialize capability information to the given buffer.
123
*
124
* @param start an iterator to a buffer
125
* @return an iterator to a buffer after capability information
126
* was serialized
127
*/
128
Buffer::Iterator
Serialize
(
Buffer::Iterator
start)
const
;
129
/**
130
* Deserialize capability information from the given buffer.
131
*
132
* @param start an iterator to a buffer
133
* @return an iterator to a buffer after capability information
134
* was deserialized
135
*/
136
Buffer::Iterator
Deserialize
(
Buffer::Iterator
start);
137
138
private
:
139
/**
140
* Check if bit n is set to 1.
141
*
142
* @param n the bit position
143
*
144
* @return true if bit n is set to 1,
145
* false otherwise
146
*/
147
bool
Is
(uint8_t n)
const
;
148
/**
149
* Set bit n to 1.
150
*
151
* @param n the bit position
152
*/
153
void
Set
(uint8_t n);
154
/**
155
* Set bit n to 0.
156
*
157
* @param n the bit position
158
*/
159
void
Clear
(uint8_t n);
160
161
uint16_t
m_capability
;
///< capability
162
};
163
164
}
// namespace ns3
165
166
#endif
/* CAPABILITY_INFORMATION_H */
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition
buffer.h:109
ns3::CapabilityInformation::SetCriticalUpdate
void SetCriticalUpdate(bool flag)
Set Critical Update flag (see IEEE 802.11be D5.0 9.4.1.4).
Definition
capability-information.cc:58
ns3::CapabilityInformation::SetEss
void SetEss()
Set the Extended Service Set (ESS) bit in the capability information field.
Definition
capability-information.cc:20
ns3::CapabilityInformation::IsShortSlotTime
bool IsShortSlotTime() const
Check if the short slot time in the capability information field is set to 1.
Definition
capability-information.cc:85
ns3::CapabilityInformation::m_capability
uint16_t m_capability
capability
Definition
capability-information.h:161
ns3::CapabilityInformation::GetSerializedSize
uint32_t GetSerializedSize() const
Return the serialized size of capability information.
Definition
capability-information.cc:124
ns3::CapabilityInformation::CapabilityInformation
CapabilityInformation()
Definition
capability-information.cc:14
ns3::CapabilityInformation::SetCfPollable
void SetCfPollable()
Set the CF-Pollable bit in the capability information field.
Definition
capability-information.cc:52
ns3::CapabilityInformation::IsCriticalUpdate
bool IsCriticalUpdate() const
Check if Critical Update bit is set to 1.
Definition
capability-information.cc:97
ns3::CapabilityInformation::Serialize
Buffer::Iterator Serialize(Buffer::Iterator start) const
Serialize capability information to the given buffer.
Definition
capability-information.cc:130
ns3::CapabilityInformation::Set
void Set(uint8_t n)
Set bit n to 1.
Definition
capability-information.cc:103
ns3::CapabilityInformation::SetShortSlotTime
void SetShortSlotTime(bool shortSlotTime)
Set the short slot time bit in the capability information field.
Definition
capability-information.cc:43
ns3::CapabilityInformation::IsEss
bool IsEss() const
Check if the Extended Service Set (ESS) bit in the capability information field is set to 1.
Definition
capability-information.cc:67
ns3::CapabilityInformation::IsIbss
bool IsIbss() const
Check if the Independent BSS (IBSS) bit in the capability information field is set to 1.
Definition
capability-information.cc:73
ns3::CapabilityInformation::Clear
void Clear(uint8_t n)
Set bit n to 0.
Definition
capability-information.cc:110
ns3::CapabilityInformation::SetShortPreamble
void SetShortPreamble(bool shortPreamble)
Set the short preamble bit in the capability information field.
Definition
capability-information.cc:34
ns3::CapabilityInformation::Is
bool Is(uint8_t n) const
Check if bit n is set to 1.
Definition
capability-information.cc:117
ns3::CapabilityInformation::SetIbss
void SetIbss()
Set the Independent BSS (IBSS) bit in the capability information field.
Definition
capability-information.cc:27
ns3::CapabilityInformation::Deserialize
Buffer::Iterator Deserialize(Buffer::Iterator start)
Deserialize capability information from the given buffer.
Definition
capability-information.cc:137
ns3::CapabilityInformation::IsCfPollable
bool IsCfPollable() const
Check if the CF-Pollable bit in the capability information field is set to 1.
Definition
capability-information.cc:91
ns3::CapabilityInformation::IsShortPreamble
bool IsShortPreamble() const
Check if the short preamble bit in the capability information field is set to 1.
Definition
capability-information.cc:79
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
wifi
model
capability-information.h
Generated on
for ns-3 by
1.16.1