A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
block-ack-window.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2019 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
#ifndef BLOCK_ACK_WINDOW_H
21
#define BLOCK_ACK_WINDOW_H
22
23
#include <cstdint>
24
#include <vector>
25
26
namespace
ns3
27
{
28
57
class
BlockAckWindow
58
{
59
public
:
63
BlockAckWindow
();
70
void
Init
(uint16_t winStart, uint16_t winSize);
77
void
Reset
(uint16_t winStart);
83
uint16_t
GetWinStart
()
const
;
89
uint16_t
GetWinEnd
()
const
;
95
std::size_t
GetWinSize
()
const
;
105
std::vector<bool>::reference
At
(std::size_t distance);
115
std::vector<bool>::const_reference
At
(std::size_t distance)
const
;
121
void
Advance
(std::size_t count);
122
123
private
:
124
uint16_t
m_winStart
;
125
std::vector<bool>
m_window
;
126
std::size_t
m_head
;
127
};
128
129
}
// namespace ns3
130
131
#endif
/* BLOCK_ACK_WINDOW_H */
ns3::BlockAckWindow
Block ack window.
Definition:
block-ack-window.h:58
ns3::BlockAckWindow::Reset
void Reset(uint16_t winStart)
Reset the window by clearing all the elements and setting winStart to the given value.
Definition:
block-ack-window.cc:47
ns3::BlockAckWindow::BlockAckWindow
BlockAckWindow()
Constructor.
Definition:
block-ack-window.cc:31
ns3::BlockAckWindow::GetWinSize
std::size_t GetWinSize() const
Get the window size.
Definition:
block-ack-window.cc:65
ns3::BlockAckWindow::Advance
void Advance(std::size_t count)
Advance the current winStart by the given number of positions.
Definition:
block-ack-window.cc:87
ns3::BlockAckWindow::GetWinStart
uint16_t GetWinStart() const
Get the current winStart value.
Definition:
block-ack-window.cc:53
ns3::BlockAckWindow::GetWinEnd
uint16_t GetWinEnd() const
Get the current winEnd value.
Definition:
block-ack-window.cc:59
ns3::BlockAckWindow::m_winStart
uint16_t m_winStart
window start (sequence number)
Definition:
block-ack-window.h:124
ns3::BlockAckWindow::m_head
std::size_t m_head
index of winStart in the vector
Definition:
block-ack-window.h:126
ns3::BlockAckWindow::Init
void Init(uint16_t winStart, uint16_t winSize)
Initialize the window with the given starting sequence number and size.
Definition:
block-ack-window.cc:38
ns3::BlockAckWindow::m_window
std::vector< bool > m_window
window
Definition:
block-ack-window.h:125
ns3::BlockAckWindow::At
std::vector< bool >::reference At(std::size_t distance)
Get a reference to the element in the window having the given distance from the current winStart.
Definition:
block-ack-window.cc:71
anonymous_namespace{print-introspected-doxygen.cc}::reference
std::string reference
reference tag
Definition:
print-introspected-doxygen.cc:90
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
wifi
model
block-ack-window.h
Generated on Sun Mar 3 2024 17:11:10 for ns-3 by
1.9.1