A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
he-operation.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2017 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#ifndef HE_OPERATION_H
21#define HE_OPERATION_H
22
23#include "ns3/wifi-information-element.h"
24
25namespace ns3
26{
27
28/**
29 * \brief The HE Operation Information Element
30 * \ingroup wifi
31 *
32 * This class knows how to serialise and deserialise
33 * the HE Operation Information Element
34 */
36{
37 public:
39
40 // Implementations of pure virtual methods of WifiInformationElement
41 WifiInformationElementId ElementId() const override;
43 void Print(std::ostream& os) const override;
44
45 /**
46 * Set the HE Operation Parameters field in the HE Operation information element.
47 *
48 * \param ctrl the HE Operation Parameters field in the HE Operation information element
49 */
51 /**
52 * Set the Basic HE-MCS and NSS field in the HE Operation information element
53 * by specifying the tuple (<i>nss</i>, <i>maxMcs</i>).
54 *
55 * \param nss the NSS
56 * \param maxHeMcs the maximum supported HE-MCS value corresponding to that NSS
57 */
58 void SetMaxHeMcsPerNss(uint8_t nss, uint8_t maxHeMcs);
59
60 /**
61 * Return the HE Operation Parameters field in the HE Operation information element.
62 *
63 * \return the HE Operation Parameters field in the HE Operation information element
64 */
66 /**
67 * Return the Basic HE-MCS And Nss field in the HE Operation information element.
68 *
69 * \return the Basic HE-MCS And Nss field in the HE Operation information element
70 */
71 uint16_t GetBasicHeMcsAndNssSet() const;
72 /**
73 * Set the BSS color
74 * \param bssColor the BSS color value
75 */
76 void SetBssColor(uint8_t bssColor);
77 /**
78 * Get the BSS color
79 * \return the BSS color value
80 */
81 uint8_t GetBssColor() const;
82
83 private:
84 uint16_t GetInformationFieldSize() const override;
85 void SerializeInformationField(Buffer::Iterator start) const override;
86 uint16_t DeserializeInformationField(Buffer::Iterator start, uint16_t length) override;
87
88 // HE Operation Parameters fields
89 uint8_t m_bssColor; //!< BSS color
90 uint8_t m_defaultPEDuration; //!< default PE duration
91 uint8_t m_twtRequired; //!< TWT required
92 uint16_t m_heDurationBasedRtsThreshold; //!< HE duration based RTS threshold
93 uint8_t m_partialBssColor; //!< partial BSS color
94 uint8_t m_maxBssidIndicator; //!< max BSSID indicator
95 uint8_t m_txBssidIndicator; //!< TX BSSID indicator
96 uint8_t m_bssColorDisabled; //!< BSS color disabled
97 uint8_t m_dualBeacon; //!< Dual Beacon
98
99 // Basic HE-MCS and NSS Set
100 uint16_t m_basicHeMcsAndNssSet; ///< basic HE MCS NSS set
101
102 // TODO: VHT Operation Information subfields not defined in the standard yet.
103};
104
105} // namespace ns3
106
107#endif /* HE_OPERATION_H */
iterator in a Buffer instance
Definition: buffer.h:100
The HE Operation Information Element.
Definition: he-operation.h:36
void Print(std::ostream &os) const override
Generate human-readable form of IE.
Definition: he-operation.cc:52
void SetBssColor(uint8_t bssColor)
Set the BSS color.
uint8_t m_dualBeacon
Dual Beacon.
Definition: he-operation.h:97
void SetMaxHeMcsPerNss(uint8_t nss, uint8_t maxHeMcs)
Set the Basic HE-MCS and NSS field in the HE Operation information element by specifying the tuple (n...
Definition: he-operation.cc:94
uint8_t m_partialBssColor
partial BSS color
Definition: he-operation.h:93
WifiInformationElementId ElementIdExt() const override
Get the wifi information element ID extension.
Definition: he-operation.cc:46
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)
uint8_t m_maxBssidIndicator
max BSSID indicator
Definition: he-operation.h:94
uint8_t GetBssColor() const
Get the BSS color.
uint8_t m_twtRequired
TWT required.
Definition: he-operation.h:91
uint16_t GetInformationFieldSize() const override
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
Definition: he-operation.cc:58
uint8_t m_txBssidIndicator
TX BSSID indicator.
Definition: he-operation.h:95
uint8_t m_bssColor
BSS color.
Definition: he-operation.h:89
void SetHeOperationParameters(uint32_t ctrl)
Set the HE Operation Parameters field in the HE Operation information element.
Definition: he-operation.cc:64
uint8_t m_defaultPEDuration
default PE duration
Definition: he-operation.h:90
uint16_t m_basicHeMcsAndNssSet
basic HE MCS NSS set
Definition: he-operation.h:100
uint16_t m_heDurationBasedRtsThreshold
HE duration based RTS threshold.
Definition: he-operation.h:92
uint8_t m_bssColorDisabled
BSS color disabled.
Definition: he-operation.h:96
uint16_t GetBasicHeMcsAndNssSet() const
Return the Basic HE-MCS And Nss field in the HE Operation information element.
uint32_t GetHeOperationParameters() const
Return the HE Operation Parameters field in the HE Operation information element.
Definition: he-operation.cc:78
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
Definition: he-operation.cc:40
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.
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.