A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
26
namespace
ns3
{
27
31
enum
BlockAckType
32
{
33
BASIC_BLOCK_ACK
,
34
COMPRESSED_BLOCK_ACK
,
35
MULTI_TID_BLOCK_ACK
36
};
37
50
class
CtrlBAckRequestHeader
:
public
Header
51
{
52
public
:
53
CtrlBAckRequestHeader
();
54
~CtrlBAckRequestHeader
();
59
static
TypeId
GetTypeId
(
void
);
60
TypeId
GetInstanceTypeId
(
void
)
const
;
61
void
Print
(std::ostream &os)
const
;
62
uint32_t
GetSerializedSize
(
void
)
const
;
63
void
Serialize
(
Buffer::Iterator
start
)
const
;
64
uint32_t
Deserialize
(
Buffer::Iterator
start);
65
71
void
SetHtImmediateAck
(
bool
immediateAck);
77
void
SetType
(
BlockAckType
type);
83
void
SetTidInfo
(uint8_t tid);
90
void
SetStartingSequence
(uint16_t seq);
91
98
bool
MustSendHtImmediateAck
(
void
)
const
;
104
uint8_t
GetTidInfo
(
void
)
const
;
110
uint16_t
GetStartingSequence
(
void
)
const
;
118
bool
IsBasic
(
void
)
const
;
126
bool
IsCompressed
(
void
)
const
;
133
bool
IsMultiTid
(
void
)
const
;
134
140
uint16_t
GetStartingSequenceControl
(
void
)
const
;
141
142
143
private
:
150
void
SetStartingSequenceControl
(uint16_t seqControl);
156
uint16_t
GetBarControl
(
void
)
const
;
162
void
SetBarControl
(uint16_t bar);
163
170
bool
m_barAckPolicy
;
171
bool
m_multiTid
;
172
bool
m_compressed
;
173
uint16_t
m_tidInfo
;
174
uint16_t
m_startingSeq
;
175
};
176
177
190
class
CtrlBAckResponseHeader
:
public
Header
191
{
192
public
:
193
CtrlBAckResponseHeader
();
194
~CtrlBAckResponseHeader
();
199
static
TypeId
GetTypeId
(
void
);
200
TypeId
GetInstanceTypeId
(
void
)
const
;
201
void
Print
(std::ostream &os)
const
;
202
uint32_t
GetSerializedSize
(
void
)
const
;
203
void
Serialize
(
Buffer::Iterator
start
)
const
;
204
uint32_t
Deserialize
(
Buffer::Iterator
start);
205
211
void
SetHtImmediateAck
(
bool
immediateAck);
217
void
SetType
(
BlockAckType
type);
223
void
SetTidInfo
(uint8_t tid);
230
void
SetStartingSequence
(uint16_t seq);
231
238
bool
MustSendHtImmediateAck
(
void
)
const
;
244
uint8_t
GetTidInfo
(
void
)
const
;
250
uint16_t
GetStartingSequence
(
void
)
const
;
258
bool
IsBasic
(
void
)
const
;
266
bool
IsCompressed
(
void
)
const
;
273
bool
IsMultiTid
(
void
)
const
;
274
281
void
SetReceivedPacket
(uint16_t seq);
289
void
SetReceivedFragment
(uint16_t seq, uint8_t frag);
298
bool
IsPacketReceived
(uint16_t seq)
const
;
309
bool
IsFragmentReceived
(uint16_t seq, uint8_t frag)
const
;
310
316
uint16_t
GetStartingSequenceControl
(
void
)
const
;
323
void
SetStartingSequenceControl
(uint16_t seqControl);
329
const
uint16_t*
GetBitmap
(
void
)
const
;
335
uint64_t
GetCompressedBitmap
(
void
)
const
;
336
340
void
ResetBitmap
(
void
);
341
342
343
private
:
349
uint16_t
GetBaControl
(
void
)
const
;
355
void
SetBaControl
(uint16_t bar);
356
363
Buffer::Iterator
SerializeBitmap
(
Buffer::Iterator
start)
const
;
370
Buffer::Iterator
DeserializeBitmap
(
Buffer::Iterator
start);
371
386
uint8_t
IndexInBitmap
(uint16_t seq)
const
;
387
395
bool
IsInBitmap
(uint16_t seq)
const
;
396
403
bool
m_baAckPolicy
;
404
bool
m_multiTid
;
405
bool
m_compressed
;
406
uint16_t
m_tidInfo
;
407
uint16_t
m_startingSeq
;
408
409
union
410
{
411
uint16_t
m_bitmap
[64];
412
uint64_t
m_compressedBitmap
;
413
}
bitmap
;
414
};
415
416
}
//namespace ns3
417
418
#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:55
ns3::CtrlBAckRequestHeader::m_compressed
bool m_compressed
compressed
Definition:
ctrl-headers.h:172
ns3::CtrlBAckRequestHeader::IsBasic
bool IsBasic(void) const
Check if the current ACK policy is basic (i.e.
Definition:
ctrl-headers.cc:236
ns3::CtrlBAckResponseHeader::GetStartingSequence
uint16_t GetStartingSequence(void) const
Return the starting sequence number.
Definition:
ctrl-headers.cc:427
ns3::CtrlBAckRequestHeader::CtrlBAckRequestHeader
CtrlBAckRequestHeader()
Definition:
ctrl-headers.cc:32
visualizer.core.start
def start()
Definition:
core.py:1790
ns3::CtrlBAckResponseHeader::SetStartingSequenceControl
void SetStartingSequenceControl(uint16_t seqControl)
Set the starting sequence control with the given sequence control value.
Definition:
ctrl-headers.cc:486
ns3::CtrlBAckRequestHeader::IsMultiTid
bool IsMultiTid(void) const
Check if the current ACK policy has multiple TID.
Definition:
ctrl-headers.cc:248
ns3::CtrlBAckRequestHeader::SetBarControl
void SetBarControl(uint16_t bar)
Set the Block ACK control.
Definition:
ctrl-headers.cc:155
ns3::CtrlBAckResponseHeader::IsPacketReceived
bool IsPacketReceived(uint16_t seq) const
Check if the packet with the given sequence number was ACKed in this Block ACK response.
Definition:
ctrl-headers.cc:622
ns3::MULTI_TID_BLOCK_ACK
Definition:
ctrl-headers.h:35
ns3::CtrlBAckResponseHeader::IsCompressed
bool IsCompressed(void) const
Check if the current ACK policy is compressed ACK and not multiple TID.
Definition:
ctrl-headers.cc:439
ns3::CtrlBAckRequestHeader::SetHtImmediateAck
void SetHtImmediateAck(bool immediateAck)
Enable or disable HT immediate ACK.
Definition:
ctrl-headers.cc:176
ns3::BlockAckType
BlockAckType
Enumeration for different block ACK policies.
Definition:
ctrl-headers.h:31
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:403
ns3::CtrlBAckResponseHeader::SetStartingSequence
void SetStartingSequence(uint16_t seq)
Set the starting sequence number from the given raw sequence control field.
Definition:
ctrl-headers.cc:408
ns3::CtrlBAckResponseHeader::SetTidInfo
void SetTidInfo(uint8_t tid)
Set Traffic ID (TID).
Definition:
ctrl-headers.cc:402
ns3::CtrlBAckRequestHeader::SetType
void SetType(BlockAckType type)
Set the block ACK type.
Definition:
ctrl-headers.cc:182
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:98
ns3::CtrlBAckResponseHeader::GetTidInfo
uint8_t GetTidInfo(void) const
Return the Traffic ID (TID).
Definition:
ctrl-headers.cc:420
ns3::CtrlBAckRequestHeader::Print
void Print(std::ostream &os) const
Definition:
ctrl-headers.cc:61
ns3::CtrlBAckResponseHeader::bitmap
union ns3::CtrlBAckResponseHeader::@72 bitmap
bitmap union type
ns3::CtrlBAckResponseHeader::~CtrlBAckResponseHeader
~CtrlBAckResponseHeader()
Definition:
ctrl-headers.cc:268
ns3::CtrlBAckResponseHeader::SetBaControl
void SetBaControl(uint16_t bar)
Set the block ACK control.
Definition:
ctrl-headers.cc:471
ns3::CtrlBAckRequestHeader::m_multiTid
bool m_multiTid
multi TID
Definition:
ctrl-headers.h:171
ns3::CtrlBAckResponseHeader::GetBaControl
uint16_t GetBaControl(void) const
Return the block ACK control.
Definition:
ctrl-headers.cc:451
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:170
ns3::CtrlBAckRequestHeader::GetSerializedSize
uint32_t GetSerializedSize(void) const
Definition:
ctrl-headers.cc:67
ns3::CtrlBAckRequestHeader::m_startingSeq
uint16_t m_startingSeq
starting seq
Definition:
ctrl-headers.h:174
ns3::CtrlBAckResponseHeader::IndexInBitmap
uint8_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:693
ns3::CtrlBAckResponseHeader
Headers for Block ack response.
Definition:
ctrl-headers.h:190
ns3::CtrlBAckRequestHeader::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
ctrl-headers.cc:44
ns3::CtrlBAckRequestHeader::GetStartingSequenceControl
uint16_t GetStartingSequenceControl(void) const
Return the starting sequence control.
Definition:
ctrl-headers.cc:164
ns3::CtrlBAckResponseHeader::m_tidInfo
uint16_t m_tidInfo
TID info.
Definition:
ctrl-headers.h:406
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 ACKed in this Block ACK re...
Definition:
ctrl-headers.cc:656
ns3::CtrlBAckResponseHeader::GetSerializedSize
uint32_t GetSerializedSize(void) const
Definition:
ctrl-headers.cc:296
ns3::CtrlBAckResponseHeader::CtrlBAckResponseHeader
CtrlBAckResponseHeader()
Definition:
ctrl-headers.cc:260
ns3::CtrlBAckResponseHeader::SerializeBitmap
Buffer::Iterator SerializeBitmap(Buffer::Iterator start) const
Serialize bitmap to the given buffer.
Definition:
ctrl-headers.cc:492
ns3::CtrlBAckRequestHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start)
Definition:
ctrl-headers.cc:112
ns3::CtrlBAckRequestHeader::SetTidInfo
void SetTidInfo(uint8_t tid)
Set Traffic ID (TID).
Definition:
ctrl-headers.cc:205
ns3::CtrlBAckRequestHeader::GetStartingSequence
uint16_t GetStartingSequence(void) const
Return the starting sequence number.
Definition:
ctrl-headers.cc:230
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:524
ns3::CtrlBAckResponseHeader::m_multiTid
bool m_multiTid
multi TID
Definition:
ctrl-headers.h:404
ns3::CtrlBAckResponseHeader::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
ctrl-headers.cc:273
ns3::CtrlBAckResponseHeader::IsBasic
bool IsBasic(void) const
Check if the current ACK policy is basic (i.e.
Definition:
ctrl-headers.cc:433
ns3::CtrlBAckResponseHeader::SetType
void SetType(BlockAckType type)
Set the block ACK type.
Definition:
ctrl-headers.cc:379
ns3::CtrlBAckResponseHeader::GetStartingSequenceControl
uint16_t GetStartingSequenceControl(void) const
Return the starting sequence control.
Definition:
ctrl-headers.cc:480
ns3::CtrlBAckResponseHeader::Serialize
void Serialize(Buffer::Iterator start) const
Definition:
ctrl-headers.cc:326
ns3::CtrlBAckResponseHeader::ResetBitmap
void ResetBitmap(void)
Reset the bitmap to 0.
Definition:
ctrl-headers.cc:727
ns3::CtrlBAckResponseHeader::IsInBitmap
bool IsInBitmap(uint16_t seq) const
Checks if sequence number seq can be acknowledged in the bitmap.
Definition:
ctrl-headers.cc:709
ns3::CtrlBAckResponseHeader::m_compressed
bool m_compressed
compressed
Definition:
ctrl-headers.h:405
ns3::CtrlBAckRequestHeader::GetTidInfo
uint8_t GetTidInfo(void) const
Return the Traffic ID (TID).
Definition:
ctrl-headers.cc:223
ns3::CtrlBAckRequestHeader::~CtrlBAckRequestHeader
~CtrlBAckRequestHeader()
Definition:
ctrl-headers.cc:39
ns3::CtrlBAckResponseHeader::m_startingSeq
uint16_t m_startingSeq
starting seq
Definition:
ctrl-headers.h:407
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:589
ns3::CtrlBAckResponseHeader::m_bitmap
uint16_t m_bitmap[64]
the block ack bitmap
Definition:
ctrl-headers.h:411
ns3::CtrlBAckResponseHeader::m_compressedBitmap
uint64_t m_compressedBitmap
the compressed block ack bitmap
Definition:
ctrl-headers.h:412
ns3::CtrlBAckRequestHeader::Serialize
void Serialize(Buffer::Iterator start) const
Definition:
ctrl-headers.cc:90
ns3::CtrlBAckRequestHeader::SetStartingSequenceControl
void SetStartingSequenceControl(uint16_t seqControl)
Set the starting sequence control with the given sequence control value.
Definition:
ctrl-headers.cc:170
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:556
ns3::CtrlBAckRequestHeader::GetBarControl
uint16_t GetBarControl(void) const
Return the Block ACK control.
Definition:
ctrl-headers.cc:135
ns3::CtrlBAckRequestHeader::MustSendHtImmediateAck
bool MustSendHtImmediateAck(void) const
Check if the current ACK policy is immediate.
Definition:
ctrl-headers.cc:217
ns3::COMPRESSED_BLOCK_ACK
Definition:
ctrl-headers.h:34
ns3::CtrlBAckResponseHeader::GetBitmap
const uint16_t * GetBitmap(void) const
Return the bitmap from the block ACK response header.
Definition:
ctrl-headers.cc:715
ns3::CtrlBAckResponseHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start)
Definition:
ctrl-headers.cc:349
ns3::CtrlBAckRequestHeader::m_tidInfo
uint16_t m_tidInfo
TID info.
Definition:
ctrl-headers.h:173
ns3::CtrlBAckResponseHeader::SetHtImmediateAck
void SetHtImmediateAck(bool immediateAck)
Enable or disable HT immediate ACK.
Definition:
ctrl-headers.cc:373
ns3::CtrlBAckResponseHeader::Print
void Print(std::ostream &os) const
Definition:
ctrl-headers.cc:290
ns3::CtrlBAckRequestHeader::IsCompressed
bool IsCompressed(void) const
Check if the current ACK policy is compressed ACK and not multiple TID.
Definition:
ctrl-headers.cc:242
ns3::CtrlBAckResponseHeader::MustSendHtImmediateAck
bool MustSendHtImmediateAck(void) const
Check if the current ACK policy is immediate.
Definition:
ctrl-headers.cc:414
ns3::CtrlBAckRequestHeader
Headers for Block ack request.
Definition:
ctrl-headers.h:50
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:211
ns3::CtrlBAckResponseHeader::IsMultiTid
bool IsMultiTid(void) const
Check if the current ACK policy has multiple TID.
Definition:
ctrl-headers.cc:445
ns3::BASIC_BLOCK_ACK
Definition:
ctrl-headers.h:33
ns3::CtrlBAckResponseHeader::GetInstanceTypeId
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition:
ctrl-headers.cc:284
ns3::CtrlBAckResponseHeader::GetCompressedBitmap
uint64_t GetCompressedBitmap(void) const
Return the compressed bitmap from the block ACK response header.
Definition:
ctrl-headers.cc:721
src
wifi
model
ctrl-headers.h
Generated on Wed Oct 11 2017 16:39:34 for ns-3 by
1.8.9.1