A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
ctrl-headers.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2009 MIRKO BANCHI
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: Mirko Banchi <mk.banchi@gmail.com>
19
*/
20
21
#ifndef CTRL_HEADERS_H
22
#define CTRL_HEADERS_H
23
24
#include "ns3/header.h"
25
#include "
block-ack-type.h
"
26
27
namespace
ns3
{
28
41
class
CtrlBAckRequestHeader
:
public
Header
42
{
43
public
:
44
CtrlBAckRequestHeader
();
45
~CtrlBAckRequestHeader
();
50
static
TypeId
GetTypeId
(
void
);
51
TypeId
GetInstanceTypeId
(
void
)
const
;
52
void
Print
(std::ostream &os)
const
;
53
uint32_t
GetSerializedSize
(
void
)
const
;
54
void
Serialize
(
Buffer::Iterator
start
)
const
;
55
uint32_t
Deserialize
(
Buffer::Iterator
start
);
56
62
void
SetHtImmediateAck
(
bool
immediateAck);
68
void
SetType
(
BlockAckType
type);
74
void
SetTidInfo
(uint8_t tid);
81
void
SetStartingSequence
(uint16_t seq);
82
89
bool
MustSendHtImmediateAck
(
void
)
const
;
95
BlockAckType
GetType
(
void
)
const
;
101
uint8_t
GetTidInfo
(
void
)
const
;
107
uint16_t
GetStartingSequence
(
void
)
const
;
115
bool
IsBasic
(
void
)
const
;
123
bool
IsCompressed
(
void
)
const
;
130
bool
IsExtendedCompressed
(
void
)
const
;
137
bool
IsMultiTid
(
void
)
const
;
138
144
uint16_t
GetStartingSequenceControl
(
void
)
const
;
145
146
147
private
:
154
void
SetStartingSequenceControl
(uint16_t seqControl);
160
uint16_t
GetBarControl
(
void
)
const
;
166
void
SetBarControl
(uint16_t bar);
167
174
bool
m_barAckPolicy
;
175
BlockAckType
m_baType
;
176
uint16_t
m_tidInfo
;
177
uint16_t
m_startingSeq
;
178
};
179
180
193
class
CtrlBAckResponseHeader
:
public
Header
194
{
195
public
:
196
CtrlBAckResponseHeader
();
197
~CtrlBAckResponseHeader
();
202
static
TypeId
GetTypeId
(
void
);
203
TypeId
GetInstanceTypeId
(
void
)
const
;
204
void
Print
(std::ostream &os)
const
;
205
uint32_t
GetSerializedSize
(
void
)
const
;
206
void
Serialize
(
Buffer::Iterator
start
)
const
;
207
uint32_t
Deserialize
(
Buffer::Iterator
start
);
208
214
void
SetHtImmediateAck
(
bool
immediateAck);
220
void
SetType
(
BlockAckType
type);
226
void
SetTidInfo
(uint8_t tid);
233
void
SetStartingSequence
(uint16_t seq);
234
241
bool
MustSendHtImmediateAck
(
void
)
const
;
247
BlockAckType
GetType
(
void
)
const
;
253
uint8_t
GetTidInfo
(
void
)
const
;
259
uint16_t
GetStartingSequence
(
void
)
const
;
266
bool
IsBasic
(
void
)
const
;
273
bool
IsCompressed
(
void
)
const
;
280
bool
IsExtendedCompressed
(
void
)
const
;
287
bool
IsMultiTid
(
void
)
const
;
288
295
void
SetReceivedPacket
(uint16_t seq);
303
void
SetReceivedFragment
(uint16_t seq, uint8_t frag);
312
bool
IsPacketReceived
(uint16_t seq)
const
;
323
bool
IsFragmentReceived
(uint16_t seq, uint8_t frag)
const
;
324
330
uint16_t
GetStartingSequenceControl
(
void
)
const
;
337
void
SetStartingSequenceControl
(uint16_t seqControl);
343
const
uint16_t*
GetBitmap
(
void
)
const
;
349
uint64_t
GetCompressedBitmap
(
void
)
const
;
355
const
uint64_t*
GetExtendedCompressedBitmap
(
void
)
const
;
356
360
void
ResetBitmap
(
void
);
361
362
363
private
:
369
uint16_t
GetBaControl
(
void
)
const
;
375
void
SetBaControl
(uint16_t ba);
376
383
Buffer::Iterator
SerializeBitmap
(
Buffer::Iterator
start
)
const
;
390
Buffer::Iterator
DeserializeBitmap
(
Buffer::Iterator
start
);
391
406
uint16_t
IndexInBitmap
(uint16_t seq)
const
;
407
415
bool
IsInBitmap
(uint16_t seq)
const
;
416
423
bool
m_baAckPolicy
;
424
BlockAckType
m_baType
;
425
uint16_t
m_tidInfo
;
426
uint16_t
m_startingSeq
;
427
428
union
429
{
430
uint16_t
m_bitmap
[64];
431
uint64_t
m_compressedBitmap
;
432
uint64_t
m_extendedCompressedBitmap
[4];
433
}
bitmap
;
434
};
435
436
}
//namespace ns3
437
438
#endif
/* CTRL_HEADERS_H */
ns3::Header
Protocol header serialization and deserialization.
Definition:
header.h:42
ns3::CtrlBAckRequestHeader::GetInstanceTypeId
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition:
ctrl-headers.cc:54
ns3::CtrlBAckResponseHeader::GetTidInfo
uint8_t GetTidInfo(void) const
Return the Traffic ID (TID).
Definition:
ctrl-headers.cc:412
ns3::CtrlBAckResponseHeader::SerializeBitmap
Buffer::Iterator SerializeBitmap(Buffer::Iterator start) const
Serialize bitmap to the given buffer.
Definition:
ctrl-headers.cc:513
ns3::CtrlBAckResponseHeader::GetBaControl
uint16_t GetBaControl(void) const
Return the Block Ack control.
Definition:
ctrl-headers.cc:449
ns3::CtrlBAckRequestHeader::CtrlBAckRequestHeader
CtrlBAckRequestHeader()
Definition:
ctrl-headers.cc:32
visualizer.core.start
def start()
Definition:
core.py:1855
ns3::CtrlBAckResponseHeader::GetSerializedSize
uint32_t GetSerializedSize(void) const
Definition:
ctrl-headers.cc:305
ns3::CtrlBAckResponseHeader::SetStartingSequenceControl
void SetStartingSequenceControl(uint16_t seqControl)
Set the starting sequence control with the given sequence control value.
Definition:
ctrl-headers.cc:507
ns3::CtrlBAckRequestHeader::SetBarControl
void SetBarControl(uint16_t bar)
Set the Block Ack control.
Definition:
ctrl-headers.cc:156
ns3::CtrlBAckRequestHeader::SetHtImmediateAck
void SetHtImmediateAck(bool immediateAck)
Enable or disable HT immediate Ack.
Definition:
ctrl-headers.cc:191
block-ack-type.h
ns3::CtrlBAckResponseHeader::m_baAckPolicy
bool m_baAckPolicy
The LSB bit of the BA control field is used only for the HT (High Throughput) delayed block ack confi...
Definition:
ctrl-headers.h:423
ns3::CtrlBAckResponseHeader::SetStartingSequence
void SetStartingSequence(uint16_t seq)
Set the starting sequence number from the given raw sequence control field.
Definition:
ctrl-headers.cc:400
ns3::CtrlBAckResponseHeader::Serialize
void Serialize(Buffer::Iterator start) const
Definition:
ctrl-headers.cc:331
ns3::CtrlBAckResponseHeader::IsExtendedCompressed
bool IsExtendedCompressed(void) const
Check if the current BA policy is Extended Compressed Block Ack.
Definition:
ctrl-headers.cc:437
ns3::CtrlBAckResponseHeader::SetTidInfo
void SetTidInfo(uint8_t tid)
Set Traffic ID (TID).
Definition:
ctrl-headers.cc:394
ns3::CtrlBAckResponseHeader::IsBasic
bool IsBasic(void) const
Check if the current BA policy is Basic Block Ack.
Definition:
ctrl-headers.cc:425
ns3::CtrlBAckRequestHeader::SetType
void SetType(BlockAckType type)
Set the block ack type.
Definition:
ctrl-headers.cc:197
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:98
ns3::CtrlBAckRequestHeader::GetTidInfo
uint8_t GetTidInfo(void) const
Return the Traffic ID (TID).
Definition:
ctrl-headers.cc:227
ns3::CtrlBAckResponseHeader::bitmap
union ns3::CtrlBAckResponseHeader::@72 bitmap
bitmap union type
ns3::CtrlBAckResponseHeader::IsCompressed
bool IsCompressed(void) const
Check if the current BA policy is Compressed Block Ack.
Definition:
ctrl-headers.cc:431
ns3::CtrlBAckRequestHeader::MustSendHtImmediateAck
bool MustSendHtImmediateAck(void) const
Check if the current Ack Policy is immediate.
Definition:
ctrl-headers.cc:221
ns3::CtrlBAckResponseHeader::~CtrlBAckResponseHeader
~CtrlBAckResponseHeader()
Definition:
ctrl-headers.cc:277
ns3::CtrlBAckRequestHeader::m_barAckPolicy
bool m_barAckPolicy
The LSB bit of the BAR control field is used only for the HT (High Throughput) delayed block ack conf...
Definition:
ctrl-headers.h:174
ns3::CtrlBAckResponseHeader::GetStartingSequenceControl
uint16_t GetStartingSequenceControl(void) const
Return the starting sequence control.
Definition:
ctrl-headers.cc:501
ns3::CtrlBAckRequestHeader::Print
void Print(std::ostream &os) const
Definition:
ctrl-headers.cc:60
ns3::CtrlBAckResponseHeader::GetCompressedBitmap
uint64_t GetCompressedBitmap(void) const
Return the compressed bitmap from the BlockAck response header.
Definition:
ctrl-headers.cc:768
ns3::CtrlBAckRequestHeader::m_startingSeq
uint16_t m_startingSeq
starting sequence number
Definition:
ctrl-headers.h:177
ns3::CtrlBAckResponseHeader::IsPacketReceived
bool IsPacketReceived(uint16_t seq) const
Check if the packet with the given sequence number was acknowledged in this BlockAck response...
Definition:
ctrl-headers.cc:642
ns3::CtrlBAckResponseHeader
Headers for BlockAck response.
Definition:
ctrl-headers.h:193
ns3::CtrlBAckRequestHeader::GetSerializedSize
uint32_t GetSerializedSize(void) const
Definition:
ctrl-headers.cc:66
ns3::CtrlBAckRequestHeader::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
ctrl-headers.cc:43
ns3::CtrlBAckResponseHeader::m_tidInfo
uint16_t m_tidInfo
TID info.
Definition:
ctrl-headers.h:425
ns3::CtrlBAckRequestHeader::IsCompressed
bool IsCompressed(void) const
Check if the current Ack Policy is Compressed Block Ack and not multi-TID.
Definition:
ctrl-headers.cc:246
ns3::CtrlBAckRequestHeader::IsExtendedCompressed
bool IsExtendedCompressed(void) const
Check if the current Ack Policy is Extended Compressed Block Ack.
Definition:
ctrl-headers.cc:252
ns3::CtrlBAckResponseHeader::GetStartingSequence
uint16_t GetStartingSequence(void) const
Return the starting sequence number.
Definition:
ctrl-headers.cc:419
ns3::CtrlBAckResponseHeader::IndexInBitmap
uint16_t IndexInBitmap(uint16_t seq) const
This function is used to correctly index in both bitmap and compressed bitmap, one bit or one block o...
Definition:
ctrl-headers.cc:726
ns3::CtrlBAckResponseHeader::GetBitmap
const uint16_t * GetBitmap(void) const
Return the bitmap from the BlockAck response header.
Definition:
ctrl-headers.cc:762
ns3::CtrlBAckResponseHeader::CtrlBAckResponseHeader
CtrlBAckResponseHeader()
Definition:
ctrl-headers.cc:270
ns3::CtrlBAckRequestHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start)
Definition:
ctrl-headers.cc:109
ns3::CtrlBAckRequestHeader::SetTidInfo
void SetTidInfo(uint8_t tid)
Set Traffic ID (TID).
Definition:
ctrl-headers.cc:209
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::CtrlBAckResponseHeader::DeserializeBitmap
Buffer::Iterator DeserializeBitmap(Buffer::Iterator start)
Deserialize bitmap from the given buffer.
Definition:
ctrl-headers.cc:544
ns3::CtrlBAckResponseHeader::GetExtendedCompressedBitmap
const uint64_t * GetExtendedCompressedBitmap(void) const
Return the extended compressed bitmap from the BlockAck response header.
Definition:
ctrl-headers.cc:774
ns3::CtrlBAckResponseHeader::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
ctrl-headers.cc:282
ns3::CtrlBAckRequestHeader::GetType
BlockAckType GetType(void) const
Return the Block Ack type ID.
Definition:
ctrl-headers.cc:203
ns3::CtrlBAckResponseHeader::SetType
void SetType(BlockAckType type)
Set the block ack type.
Definition:
ctrl-headers.cc:382
ns3::CtrlBAckRequestHeader::IsMultiTid
bool IsMultiTid(void) const
Check if the current Ack Policy has Multi-TID Block Ack.
Definition:
ctrl-headers.cc:258
ns3::CtrlBAckRequestHeader::IsBasic
bool IsBasic(void) const
Check if the current Ack Policy is Basic Block Ack (i.e.
Definition:
ctrl-headers.cc:240
ns3::CtrlBAckRequestHeader::GetStartingSequence
uint16_t GetStartingSequence(void) const
Return the starting sequence number.
Definition:
ctrl-headers.cc:234
ns3::CtrlBAckResponseHeader::m_baType
BlockAckType m_baType
BA type.
Definition:
ctrl-headers.h:424
ns3::CtrlBAckResponseHeader::ResetBitmap
void ResetBitmap(void)
Reset the bitmap to 0.
Definition:
ctrl-headers.cc:780
ns3::CtrlBAckResponseHeader::IsFragmentReceived
bool IsFragmentReceived(uint16_t seq, uint8_t frag) const
Check if the packet with the given sequence number and fragment number was acknowledged in this Block...
Definition:
ctrl-headers.cc:684
ns3::CtrlBAckRequestHeader::~CtrlBAckRequestHeader
~CtrlBAckRequestHeader()
Definition:
ctrl-headers.cc:38
ns3::CtrlBAckResponseHeader::m_startingSeq
uint16_t m_startingSeq
starting sequence number
Definition:
ctrl-headers.h:426
ns3::CtrlBAckResponseHeader::SetReceivedFragment
void SetReceivedFragment(uint16_t seq, uint8_t frag)
Set the bitmap that the packet with the given sequence number and fragment number was received...
Definition:
ctrl-headers.cc:615
ns3::CtrlBAckResponseHeader::m_bitmap
uint16_t m_bitmap[64]
the basic BlockAck bitmap
Definition:
ctrl-headers.h:430
ns3::CtrlBAckResponseHeader::GetInstanceTypeId
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition:
ctrl-headers.cc:293
ns3::CtrlBAckResponseHeader::m_compressedBitmap
uint64_t m_compressedBitmap
the compressed BlockAck bitmap
Definition:
ctrl-headers.h:431
ns3::CtrlBAckRequestHeader::SetStartingSequenceControl
void SetStartingSequenceControl(uint16_t seqControl)
Set the starting sequence control with the given sequence control value.
Definition:
ctrl-headers.cc:185
ns3::CtrlBAckResponseHeader::SetReceivedPacket
void SetReceivedPacket(uint16_t seq)
Set the bitmap that the packet with the given sequence number was received.
Definition:
ctrl-headers.cc:575
ns3::CtrlBAckRequestHeader::GetBarControl
uint16_t GetBarControl(void) const
Return the Block Ack control.
Definition:
ctrl-headers.cc:131
ns3::CtrlBAckResponseHeader::IsInBitmap
bool IsInBitmap(uint16_t seq) const
Checks if sequence number seq can be acknowledged in the bitmap.
Definition:
ctrl-headers.cc:749
ns3::CtrlBAckResponseHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start)
Definition:
ctrl-headers.cc:353
ns3::CtrlBAckResponseHeader::m_extendedCompressedBitmap
uint64_t m_extendedCompressedBitmap[4]
the extended compressed BlockAck bitmap
Definition:
ctrl-headers.h:432
ns3::CtrlBAckRequestHeader::m_tidInfo
uint16_t m_tidInfo
TID info.
Definition:
ctrl-headers.h:176
ns3::CtrlBAckResponseHeader::IsMultiTid
bool IsMultiTid(void) const
Check if the current BA policy is Multi-TID Block Ack.
Definition:
ctrl-headers.cc:443
ns3::CtrlBAckRequestHeader::m_baType
BlockAckType m_baType
BA type.
Definition:
ctrl-headers.h:175
ns3::CtrlBAckResponseHeader::SetHtImmediateAck
void SetHtImmediateAck(bool immediateAck)
Enable or disable HT immediate Ack.
Definition:
ctrl-headers.cc:376
ns3::CtrlBAckResponseHeader::Print
void Print(std::ostream &os) const
Definition:
ctrl-headers.cc:299
ns3::CtrlBAckResponseHeader::GetType
BlockAckType GetType(void) const
Return the block ack type ID.
Definition:
ctrl-headers.cc:388
ns3::CtrlBAckRequestHeader::Serialize
void Serialize(Buffer::Iterator start) const
Definition:
ctrl-headers.cc:88
ns3::CtrlBAckRequestHeader
Headers for BlockAckRequest.
Definition:
ctrl-headers.h:41
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
ns3::CtrlBAckRequestHeader::SetStartingSequence
void SetStartingSequence(uint16_t seq)
Set the starting sequence number from the given raw sequence control field.
Definition:
ctrl-headers.cc:215
ns3::CtrlBAckRequestHeader::GetStartingSequenceControl
uint16_t GetStartingSequenceControl(void) const
Return the starting sequence control.
Definition:
ctrl-headers.cc:179
ns3::CtrlBAckResponseHeader::MustSendHtImmediateAck
bool MustSendHtImmediateAck(void) const
Check if the current Ack Policy is immediate.
Definition:
ctrl-headers.cc:406
ns3::CtrlBAckResponseHeader::SetBaControl
void SetBaControl(uint16_t ba)
Set the Block Ack control.
Definition:
ctrl-headers.cc:478
ns3::BlockAckType
BlockAckType
The different block ack policies.
Definition:
block-ack-type.h:30
src
wifi
model
ctrl-headers.h
Generated on Sat Jan 9 2021 14:08:52 for ns-3 by
1.8.14