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
block-ack-type.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2018
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: Sébastien Deronne <sebastien.deronne@gmail.com>
18
*/
19
20
#ifndef BLOCK_ACK_TYPE_H
21
#define BLOCK_ACK_TYPE_H
22
23
#include <cstdint>
24
#include <ostream>
25
#include <vector>
26
27
namespace
ns3
28
{
29
30
/**
31
* \ingroup wifi
32
* The different BlockAck variants.
33
*/
34
struct
BlockAckType
35
{
36
/**
37
* \enum Variant
38
* \brief The BlockAck variants
39
*/
40
enum
Variant
41
{
42
BASIC
,
43
COMPRESSED
,
44
EXTENDED_COMPRESSED
,
45
MULTI_TID
,
46
MULTI_STA
47
};
48
49
Variant
m_variant
;
//!< Block Ack variant
50
std::vector<uint8_t>
m_bitmapLen
;
//!< Length (bytes) of included bitmaps
51
52
/**
53
* Default constructor for BlockAckType.
54
*/
55
BlockAckType
();
56
/**
57
* Constructor for BlockAckType with given variant.
58
*
59
* \param v the Block Ack variant
60
*/
61
BlockAckType
(
Variant
v);
62
/**
63
* Constructor for BlockAckType with given variant
64
* and bitmap length.
65
*
66
* \param v the Block Ack variant
67
* \param l the length (bytes) of included bitmaps
68
*/
69
BlockAckType
(
Variant
v, std::vector<uint8_t> l);
70
};
71
72
/**
73
* \ingroup wifi
74
* The different BlockAckRequest variants.
75
*/
76
struct
BlockAckReqType
77
{
78
/**
79
* \enum Variant
80
* \brief The BlockAckReq variants
81
*/
82
enum
Variant
83
{
84
BASIC
,
85
COMPRESSED
,
86
EXTENDED_COMPRESSED
,
87
MULTI_TID
88
};
89
90
Variant
m_variant
;
//!< Block Ack Request variant
91
uint8_t
m_nSeqControls
;
//!< Number of included Starting Sequence Control fields.
92
//!< This member is added for future support of Multi-TID BARs
93
94
/**
95
* Default constructor for BlockAckReqType.
96
*/
97
BlockAckReqType
();
98
/**
99
* Constructor for BlockAckReqType with given variant.
100
*
101
* \param v the Block Ack Request variant
102
*/
103
BlockAckReqType
(
Variant
v);
104
/**
105
* Constructor for BlockAckReqType with given variant
106
* and number of SSC fields.
107
*
108
* \param v the Block Ack Request variant
109
* \param nSeqControls the number of included Starting Sequence Control fields
110
*/
111
BlockAckReqType
(
Variant
v, uint8_t nSeqControls);
112
};
113
114
/**
115
* Serialize BlockAckType to ostream in a human-readable form.
116
*
117
* \param os std::ostream
118
* \param type block ack type
119
* \return std::ostream
120
*/
121
std::ostream&
operator<<
(std::ostream& os,
const
BlockAckType
& type);
122
123
/**
124
* Serialize BlockAckReqType to ostream in a human-readable form.
125
*
126
* \param os std::ostream
127
* \param type block ack request type
128
* \return std::ostream
129
*/
130
std::ostream&
operator<<
(std::ostream& os,
const
BlockAckReqType
& type);
131
132
}
// namespace ns3
133
134
#endif
/* BLOCK_ACK_TYPE_H */
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition:
angles.cc:159
ns3::BlockAckReqType
The different BlockAckRequest variants.
Definition:
block-ack-type.h:77
ns3::BlockAckReqType::m_nSeqControls
uint8_t m_nSeqControls
Number of included Starting Sequence Control fields.
Definition:
block-ack-type.h:91
ns3::BlockAckReqType::BlockAckReqType
BlockAckReqType()
Default constructor for BlockAckReqType.
Definition:
block-ack-type.cc:77
ns3::BlockAckReqType::Variant
Variant
The BlockAckReq variants.
Definition:
block-ack-type.h:83
ns3::BlockAckReqType::EXTENDED_COMPRESSED
@ EXTENDED_COMPRESSED
Definition:
block-ack-type.h:86
ns3::BlockAckReqType::BASIC
@ BASIC
Definition:
block-ack-type.h:84
ns3::BlockAckReqType::MULTI_TID
@ MULTI_TID
Definition:
block-ack-type.h:87
ns3::BlockAckReqType::COMPRESSED
@ COMPRESSED
Definition:
block-ack-type.h:85
ns3::BlockAckReqType::m_variant
Variant m_variant
Block Ack Request variant.
Definition:
block-ack-type.h:90
ns3::BlockAckType
The different BlockAck variants.
Definition:
block-ack-type.h:35
ns3::BlockAckType::BlockAckType
BlockAckType()
Default constructor for BlockAckType.
Definition:
block-ack-type.cc:48
ns3::BlockAckType::Variant
Variant
The BlockAck variants.
Definition:
block-ack-type.h:41
ns3::BlockAckType::COMPRESSED
@ COMPRESSED
Definition:
block-ack-type.h:43
ns3::BlockAckType::MULTI_STA
@ MULTI_STA
Definition:
block-ack-type.h:46
ns3::BlockAckType::BASIC
@ BASIC
Definition:
block-ack-type.h:42
ns3::BlockAckType::MULTI_TID
@ MULTI_TID
Definition:
block-ack-type.h:45
ns3::BlockAckType::EXTENDED_COMPRESSED
@ EXTENDED_COMPRESSED
Definition:
block-ack-type.h:44
ns3::BlockAckType::m_variant
Variant m_variant
Block Ack variant.
Definition:
block-ack-type.h:49
ns3::BlockAckType::m_bitmapLen
std::vector< uint8_t > m_bitmapLen
Length (bytes) of included bitmaps.
Definition:
block-ack-type.h:50
src
wifi
model
block-ack-type.h
Generated on Mon Aug 12 2024 11:16:20 for ns-3 by
1.9.6