A Discrete-Event Network Simulator
API
he-operation.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2017 S├ębastien Deronne
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: S├ębastien Deronne <sebastien.deronne@gmail.com>
19  */
20 
21 #ifndef HE_OPERATION_H
22 #define HE_OPERATION_H
23 
24 #include "ns3/wifi-information-element.h"
25 
26 namespace ns3 {
27 
36 {
37 public:
38  HeOperation ();
39 
40  // Implementations of pure virtual methods of WifiInformationElement
41  WifiInformationElementId ElementId () const override;
42  WifiInformationElementId ElementIdExt () const override;
43  uint8_t GetInformationFieldSize () const override;
44  void SerializeInformationField (Buffer::Iterator start) const override;
45  uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length) override;
46  /* This information element is a bit special in that it is only
47  included if the STA is a HE STA. To support this we
48  override the Serialize and GetSerializedSize methods of
49  WifiInformationElement. */
51  uint16_t GetSerializedSize () const override;
52 
58  void SetHeSupported (uint8_t heSupported);
59 
65  void SetHeOperationParameters (uint32_t ctrl);
73  void SetMaxHeMcsPerNss (uint8_t nss, uint8_t maxHeMcs);
74 
80  uint32_t GetHeOperationParameters (void) const;
86  uint16_t GetBasicHeMcsAndNssSet (void) const;
91  void SetBssColor (uint8_t bssColor);
96  uint8_t GetBssColor (void) const;
97 
98 
99 private:
100  //HE Operation Parameters fields
101  uint8_t m_bssColor;
103  uint8_t m_twtRequired;
109  uint8_t m_dualBeacon;
110 
111  //Basic HE-MCS and NSS Set
113 
114  //TODO: VHT Operation Information subfields not defined in the standard yet.
115 
117  uint8_t m_heSupported;
118 };
119 
128 std::ostream &operator << (std::ostream &os, const HeOperation &HeOperation);
129 
130 } //namespace ns3
131 
132 #endif /* HE_OPERATION_H */
ns3::HeOperation::GetHeOperationParameters
uint32_t GetHeOperationParameters(void) const
Return the HE Operation Parameters field in the HE Operation information element.
Definition: he-operation.cc:81
ns3::HeOperation::Serialize
Buffer::Iterator Serialize(Buffer::Iterator start) const override
Serialize entire IE including Element ID and length fields.
Definition: he-operation.cc:137
ns3::HeOperation::GetBasicHeMcsAndNssSet
uint16_t GetBasicHeMcsAndNssSet(void) const
Return the Basic HE-MCS And Nss field in the HE Operation information element.
Definition: he-operation.cc:117
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::HeOperation::SerializeInformationField
void SerializeInformationField(Buffer::Iterator start) const override
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
Definition: he-operation.cc:157
ns3::WifiInformationElement
Information element, as defined in 802.11-2007 standard.
Definition: wifi-information-element.h:234
ns3::HeOperation::m_bssColor
uint8_t m_bssColor
BSS color.
Definition: he-operation.h:101
ns3::HeOperation::GetInformationFieldSize
uint8_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:59
ns3::HeOperation::m_defaultPEDuration
uint8_t m_defaultPEDuration
default PE duration
Definition: he-operation.h:102
ns3::HeOperation::m_heDurationBasedRtsThreshold
uint16_t m_heDurationBasedRtsThreshold
HE duration based RTS threshold.
Definition: he-operation.h:104
ns3::HeOperation::GetSerializedSize
uint16_t GetSerializedSize() const override
Get the size of the serialized IE including Element ID and length fields.
Definition: he-operation.cc:147
ns3::HeOperation::SetBssColor
void SetBssColor(uint8_t bssColor)
Set the BSS color.
Definition: he-operation.cc:123
ns3::WifiInformationElementId
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
Definition: wifi-information-element.h:40
ns3::HeOperation::m_heSupported
uint8_t m_heSupported
This is used to decide whether this element should be added to the frame or not.
Definition: he-operation.h:117
ns3::HeOperation::SetHeOperationParameters
void SetHeOperationParameters(uint32_t ctrl)
Set the HE Operation Parameters field in the HE Operation information element.
Definition: he-operation.cc:67
visualizer.core.start
def start()
Definition: core.py:1855
ns3::HeOperation::ElementId
WifiInformationElementId ElementId() const override
Definition: he-operation.cc:41
ns3::HeOperation::SetMaxHeMcsPerNss
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:97
ns3::HeOperation::m_basicHeMcsAndNssSet
uint16_t m_basicHeMcsAndNssSet
basic HE MCS NSS set
Definition: he-operation.h:112
ns3::HeOperation
The HE Operation Information Element.
Definition: he-operation.h:36
ns3::HeOperation::GetBssColor
uint8_t GetBssColor(void) const
Get the BSS color.
Definition: he-operation.cc:131
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition: buffer.h:99
ns3::HeOperation::m_partialBssColor
uint8_t m_partialBssColor
partial BSS color
Definition: he-operation.h:105
ns3::HeOperation::m_txBssidIndicator
uint8_t m_txBssidIndicator
TX BSSID indicator.
Definition: he-operation.h:107
ns3::HeOperation::HeOperation
HeOperation()
Definition: he-operation.cc:25
ns3::HeOperation::DeserializeInformationField
uint8_t DeserializeInformationField(Buffer::Iterator start, uint8_t length) override
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets)
Definition: he-operation.cc:169
ns3::HeOperation::m_dualBeacon
uint8_t m_dualBeacon
Dual Beacon.
Definition: he-operation.h:109
ns3::HeOperation::m_twtRequired
uint8_t m_twtRequired
TWT required.
Definition: he-operation.h:103
ns3::HeOperation::m_bssColorDisabled
uint8_t m_bssColorDisabled
BSS color disabled.
Definition: he-operation.h:108
ns3::HeOperation::SetHeSupported
void SetHeSupported(uint8_t heSupported)
Set the HE supported information element.
Definition: he-operation.cc:53
ns3::HeOperation::m_maxBssidIndicator
uint8_t m_maxBssidIndicator
max BSSID indicator
Definition: he-operation.h:106
ns3::HeOperation::ElementIdExt
WifiInformationElementId ElementIdExt() const override
Definition: he-operation.cc:47
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition: angles.cc:137