A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
addba-extension.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2023 Universita' degli Studi di Napoli Federico II
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: Stefano Avallone <stavallo@unina.it>
18
*/
19
20
#include "
addba-extension.h
"
21
22
namespace
ns3
23
{
24
25
void
26
AddbaExtension::Print
(std::ostream& os)
const
27
{
28
os <<
"extBufferSize="
<< +
m_extParamSet
.
extBufferSize
;
29
}
30
31
WifiInformationElementId
32
AddbaExtension::ElementId
()
const
33
{
34
return
IE_ADDBA_EXTENSION
;
35
}
36
37
uint16_t
38
AddbaExtension::GetInformationFieldSize
()
const
39
{
40
return
1U;
// ADDBA Extended Parameter Set field
41
}
42
43
void
44
AddbaExtension::SerializeInformationField
(
Buffer::Iterator
start
)
const
45
{
46
uint8_t extParamSet =
m_extParamSet
.
noFragment
| (
m_extParamSet
.
heFragmentOp
<< 1) |
47
(
m_extParamSet
.
extBufferSize
<< 5);
48
start
.WriteU8(extParamSet);
49
}
50
51
uint16_t
52
AddbaExtension::DeserializeInformationField
(
Buffer::Iterator
start
, uint16_t length)
53
{
54
auto
extParamSet =
start
.ReadU8();
55
m_extParamSet
.
noFragment
= extParamSet & 0x01;
56
m_extParamSet
.
heFragmentOp
= (extParamSet >> 1) & 0x03;
57
m_extParamSet
.
extBufferSize
= (extParamSet >> 5) & 0x07;
58
return
1;
59
}
60
61
}
// 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:44
ns3::AddbaExtension::ElementId
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
Definition:
addba-extension.cc:32
ns3::AddbaExtension::m_extParamSet
ExtParamSet m_extParamSet
ADDBA Extended Parameter Set field.
Definition:
addba-extension.h:53
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:52
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:38
ns3::AddbaExtension::Print
void Print(std::ostream &os) const override
Generate human-readable form of IE.
Definition:
addba-extension.cc:26
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:100
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:45
two-ray-to-three-gpp-ch-calibration.start
start
Definition:
two-ray-to-three-gpp-ch-calibration.py:520
ns3::AddbaExtension::ExtParamSet::extBufferSize
uint8_t extBufferSize
extended buffer size
Definition:
addba-extension.h:46
ns3::AddbaExtension::ExtParamSet::heFragmentOp
uint8_t heFragmentOp
indicates level of HE dynamic fragmentation (unsupported)
Definition:
addba-extension.h:44
ns3::AddbaExtension::ExtParamSet::noFragment
uint8_t noFragment
reserved when transmitted by HE STA to HE STA
Definition:
addba-extension.h:43
IE_ADDBA_EXTENSION
#define IE_ADDBA_EXTENSION
Definition:
wifi-information-element.h:192
src
wifi
model
addba-extension.cc
Generated on Sun Mar 3 2024 17:11:10 for ns-3 by
1.9.1