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
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
11
namespace
ns3
12
{
13
14
void
15
AddbaExtension::Print
(std::ostream& os)
const
16
{
17
os <<
"extBufferSize="
<< +
m_extParamSet
.
extBufferSize
;
18
}
19
20
WifiInformationElementId
21
AddbaExtension::ElementId
()
const
22
{
23
return
IE_ADDBA_EXTENSION
;
24
}
25
26
uint16_t
27
AddbaExtension::GetInformationFieldSize
()
const
28
{
29
return
1U;
// ADDBA Extended Parameter Set field
30
}
31
32
void
33
AddbaExtension::SerializeInformationField
(
Buffer::Iterator
start)
const
34
{
35
uint8_t extParamSet =
m_extParamSet
.
noFragment
| (
m_extParamSet
.
heFragmentOp
<< 1) |
36
(
m_extParamSet
.
extBufferSize
<< 5);
37
start.WriteU8(extParamSet);
38
}
39
40
uint16_t
41
AddbaExtension::DeserializeInformationField
(
Buffer::Iterator
start, uint16_t length)
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
addba-extension.h
ns3::AddbaExtension::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
addba-extension.cc:33
ns3::AddbaExtension::ElementId
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
Definition
addba-extension.cc:21
ns3::AddbaExtension::m_extParamSet
ExtParamSet m_extParamSet
ADDBA Extended Parameter Set field.
Definition
addba-extension.h:42
ns3::AddbaExtension::DeserializeInformationField
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)
Definition
addba-extension.cc:41
ns3::AddbaExtension::GetInformationFieldSize
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
addba-extension.cc:27
ns3::AddbaExtension::Print
void Print(std::ostream &os) const override
Generate human-readable form of IE.
Definition
addba-extension.cc:15
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition
buffer.h:89
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::WifiInformationElementId
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
Definition
wifi-information-element.h:34
ns3::AddbaExtension::ExtParamSet::extBufferSize
uint8_t extBufferSize
extended buffer size
Definition
addba-extension.h:35
ns3::AddbaExtension::ExtParamSet::heFragmentOp
uint8_t heFragmentOp
indicates level of HE dynamic fragmentation (unsupported)
Definition
addba-extension.h:33
ns3::AddbaExtension::ExtParamSet::noFragment
uint8_t noFragment
reserved when transmitted by HE STA to HE STA
Definition
addba-extension.h:32
IE_ADDBA_EXTENSION
#define IE_ADDBA_EXTENSION
Definition
wifi-information-element.h:181
src
wifi
model
addba-extension.cc
Generated on Fri Nov 8 2024 13:59:07 for ns-3 by
1.11.0