A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
addba-extension.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Universita' degli Studi di Napoli Federico II
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Stefano Avallone <stavallo@unina.it>
7 */
8
9#include "addba-extension.h"
10
11namespace ns3
12{
13
14void
15AddbaExtension::Print(std::ostream& os) const
16{
17 os << "extBufferSize=" << +m_extParamSet.extBufferSize;
18}
19
25
26uint16_t
28{
29 return 1U; // ADDBA Extended Parameter Set field
30}
31
32void
34{
35 uint8_t extParamSet = m_extParamSet.noFragment | (m_extParamSet.heFragmentOp << 1) |
37 start.WriteU8(extParamSet);
38}
39
40uint16_t
42{
43 auto extParamSet = start.ReadU8();
44 m_extParamSet.noFragment = extParamSet & 0x01;
45 m_extParamSet.heFragmentOp = (extParamSet >> 1) & 0x03;
46 m_extParamSet.extBufferSize = (extParamSet >> 5) & 0x07;
47 return 1;
48}
49
50} // namespace ns3
void SerializeInformationField(Buffer::Iterator start) const override
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
ExtParamSet m_extParamSet
ADDBA Extended Parameter Set field.
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)
uint16_t GetInformationFieldSize() const override
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
void Print(std::ostream &os) const override
Generate human-readable form of IE.
iterator in a Buffer instance
Definition buffer.h:89
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.
uint8_t extBufferSize
extended buffer size
uint8_t heFragmentOp
indicates level of HE dynamic fragmentation (unsupported)
uint8_t noFragment
reserved when transmitted by HE STA to HE STA
#define IE_ADDBA_EXTENSION