A Discrete-Event Network Simulator
API
eht-operation.h
Go to the documentation of this file.
1/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2022
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Sharan Naribole <sharan.naribole@gmail.com>
19 */
20
21#ifndef EHT_OPERATION_H
22#define EHT_OPERATION_H
23
24#include <ns3/wifi-information-element.h>
25
26#include <optional>
27#include <vector>
28
29namespace ns3
30{
31
33constexpr uint8_t WIFI_EHT_MAX_MCS_INDEX = 13;
35constexpr uint16_t WIFI_EHT_OP_PARAMS_SIZE_B = 1;
37constexpr uint16_t WIFI_EHT_OP_INFO_BASIC_SIZE_B = 3;
39constexpr uint16_t WIFI_EHT_DISABLED_SUBCH_BM_SIZE_B = 2;
41constexpr uint16_t WIFI_EHT_BASIC_MCS_NSS_SET_SIZE_B = 4;
43constexpr uint8_t WIFI_DEFAULT_EHT_MAX_NSS = 1;
45constexpr uint8_t WIFI_EHT_MAX_NSS_CONFIGURABLE = 8;
51constexpr uint8_t WIFI_DEFAULT_EHT_OP_PE_DUR = 0;
53constexpr uint8_t WIFI_DEFAULT_GRP_BU_IND_LIMIT = 0;
55constexpr uint8_t WIFI_DEFAULT_GRP_BU_EXP = 0;
56
67{
68 public:
74 {
85
91 void Serialize(Buffer::Iterator& start) const;
99 };
100
106 {
107 uint8_t channelWidth : 3;
108 };
109
115 {
117 uint8_t ccfs0;
118 uint8_t ccfs1;
119 std::optional<uint16_t> disabledSubchBm;
120
126 void Serialize(Buffer::Iterator& start) const;
134 uint16_t Deserialize(Buffer::Iterator start, bool disabledSubchBmPresent);
135 };
136
142 {
143 std::vector<uint8_t> maxRxNss{};
144 std::vector<uint8_t> maxTxNss{};
145
151 void Serialize(Buffer::Iterator& start) const;
159 };
160
161 EhtOperation();
162 WifiInformationElementId ElementId() const override;
163 WifiInformationElementId ElementIdExt() const override;
164
171 void SetMaxRxNss(uint8_t maxNss, uint8_t mcsStart, uint8_t mcsEnd);
178 void SetMaxTxNss(uint8_t maxNss, uint8_t mcsStart, uint8_t mcsEnd);
179
182 std::optional<EhtOpInfo> m_opInfo;
183
184 private:
185 uint16_t GetInformationFieldSize() const override;
187 uint16_t DeserializeInformationField(Buffer::Iterator start, uint16_t length) override;
188};
189
198std::ostream& operator<<(std::ostream& os, const EhtOperation& ehtOperation);
199
200} // namespace ns3
201
202#endif /* EHT_OPERATION_H */
iterator in a Buffer instance
Definition: buffer.h:100
EHT Operation Information Element.
Definition: eht-operation.h:67
void SetMaxTxNss(uint8_t maxNss, uint8_t mcsStart, uint8_t mcsEnd)
Set the max Tx NSS for input MCS index range.
void SetMaxRxNss(uint8_t maxNss, uint8_t mcsStart, uint8_t mcsEnd)
Set the max Rx NSS for input MCS index range.
EhtOpParams m_params
EHT Operation Parameters.
EhtBasicMcsNssSet m_mcsNssSet
Basic EHT-MCS and NSS set.
uint16_t DeserializeInformationField(Buffer::Iterator start, uint16_t length) override
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets)
WifiInformationElementId ElementIdExt() const override
Get the wifi information element ID extension.
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
uint16_t GetInformationFieldSize() const override
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
std::optional< EhtOpInfo > m_opInfo
EHT Operation Information.
void SerializeInformationField(Buffer::Iterator start) const override
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
Information element, as defined in 802.11-2007 standard.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
constexpr uint8_t WIFI_DEFAULT_EHT_OP_DIS_SUBCH_BM_PRESENT
Default Disabled Subch Bitmap Present.
Definition: eht-operation.h:49
constexpr uint16_t WIFI_EHT_OP_INFO_BASIC_SIZE_B
IEEE 802.11be D2.0 Figure 9-1002c.
Definition: eht-operation.h:37
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition: angles.cc:129
constexpr uint16_t WIFI_EHT_DISABLED_SUBCH_BM_SIZE_B
IEEE 802.11be D2.0 Figure 9-1002c.
Definition: eht-operation.h:39
constexpr uint8_t WIFI_DEFAULT_EHT_MAX_NSS
Default max Tx/Rx NSS.
Definition: eht-operation.h:43
constexpr uint8_t WIFI_EHT_MAX_MCS_INDEX
IEEE 802.11be D2.0 Figure 9-1002ai.
Definition: eht-operation.h:33
constexpr uint8_t WIFI_DEFAULT_EHT_OP_PE_DUR
Default PE Duration.
Definition: eht-operation.h:51
constexpr uint8_t WIFI_DEFAULT_GRP_BU_IND_LIMIT
Default Group Addressed BU Indication Limit.
Definition: eht-operation.h:53
constexpr uint16_t WIFI_EHT_BASIC_MCS_NSS_SET_SIZE_B
IEEE 802.11be D2.0 Figure 9-1002ai.
Definition: eht-operation.h:41
constexpr uint8_t WIFI_EHT_MAX_NSS_CONFIGURABLE
Max NSS configurable, 802.11be D2.0 Table 9-401m.
Definition: eht-operation.h:45
constexpr uint16_t WIFI_EHT_OP_PARAMS_SIZE_B
IEEE 802.11be D2.0 Figure 9-1002b.
Definition: eht-operation.h:35
constexpr uint8_t WIFI_DEFAULT_EHT_OP_INFO_PRESENT
Default EHT Operation Info Present.
Definition: eht-operation.h:47
constexpr uint8_t WIFI_DEFAULT_GRP_BU_EXP
Default Group Addressed BU Exponent.
Definition: eht-operation.h:55
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
Basic EHT-MCS and NSS Set subfield IEEE 802.11be D2.0 Figure 9-1002ai.
void Serialize(Buffer::Iterator &start) const
Serialize the Basic EHT-MCS and NSS Set subfield.
std::vector< uint8_t > maxRxNss
Max Rx NSS per MCS.
std::vector< uint8_t > maxTxNss
Max Tx NSS per MCS.
uint16_t Deserialize(Buffer::Iterator start)
Deserialize the Basic EHT-MCS and NSS Set subfield.
EHT Operation Information Control subfield IEEE 802.11be D2.0 Figure 9-1002D.
uint8_t channelWidth
EHT BSS bandwidth.
EHT Operation Information subfield IEEE 802.11be D2.0 Figure 9-1002c.
EhtOpControl control
Control subfield.
void Serialize(Buffer::Iterator &start) const
Serialize the EHT Operation Information subfield.
uint8_t ccfs1
Channel center frequency segment 1.
std::optional< uint16_t > disabledSubchBm
Disabled subchannel bitmap.
uint16_t Deserialize(Buffer::Iterator start, bool disabledSubchBmPresent)
Deserialize the EHT Operation Information subfield.
uint8_t ccfs0
Channel center frequency segment 0.
EHT Operation Parameters subfield IEEE 802.11be D2.0 Figure 9-1002b.
Definition: eht-operation.h:74
uint8_t defaultPeDur
EHT Default PE Duration.
Definition: eht-operation.h:80
void Serialize(Buffer::Iterator &start) const
Serialize the EHT Operation Parameters subfield.
uint8_t grpBuExp
Group Addressed BU Indication Exponent.
Definition: eht-operation.h:84
uint16_t Deserialize(Buffer::Iterator start)
Deserialize the EHT Operation Parameters subfield.
uint8_t opInfoPresent
EHT Operation Information Present.
Definition: eht-operation.h:76
uint8_t disabledSubchBmPresent
Disabled Subchannel Bitmap Present.
Definition: eht-operation.h:78
uint8_t grpBuIndLimit
Group Addressed BU Indication Limit.
Definition: eht-operation.h:82