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