A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
originator-block-ack-agreement.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009, 2010 MIRKO BANCHI
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: Mirko Banchi <mk.banchi@gmail.com>
18
* Author: Tommaso Pecorella <tommaso.pecorella@unifi.it>
19
*/
20
#ifndef ORIGINATOR_BLOCK_ACK_AGREEMENT_H
21
#define ORIGINATOR_BLOCK_ACK_AGREEMENT_H
22
23
#include "
block-ack-agreement.h
"
24
#include "
block-ack-window.h
"
25
26
class
OriginatorBlockAckWindowTest
;
27
28
namespace
ns3
29
{
30
31
class
WifiMpdu;
32
56
class
OriginatorBlockAckAgreement
:
public
BlockAckAgreement
57
{
59
friend
class
BlockAckManager
;
61
friend
class ::OriginatorBlockAckWindowTest;
62
63
public
:
70
OriginatorBlockAckAgreement
(
Mac48Address
recipient, uint8_t tid);
71
~OriginatorBlockAckAgreement
()
override
;
72
99
enum
State
100
{
101
PENDING
,
102
ESTABLISHED
,
103
NO_REPLY
,
104
RESET
,
105
REJECTED
106
};
107
113
void
SetState
(
State
state);
120
bool
IsPending
()
const
;
127
bool
IsEstablished
()
const
;
134
bool
IsNoReply
()
const
;
141
bool
IsReset
()
const
;
148
bool
IsRejected
()
const
;
149
157
uint16_t
GetStartingSequence
()
const override
;
158
166
std::size_t
GetDistance
(uint16_t seqNumber)
const
;
167
172
void
InitTxWindow
();
173
180
void
NotifyTransmittedMpdu
(
Ptr<const WifiMpdu>
mpdu);
187
void
NotifyAckedMpdu
(
Ptr<const WifiMpdu>
mpdu);
194
void
NotifyDiscardedMpdu
(
Ptr<const WifiMpdu>
mpdu);
195
196
private
:
201
void
AdvanceTxWindow
();
202
203
State
m_state
;
204
BlockAckWindow
m_txWindow
;
205
};
206
207
}
// namespace ns3
208
209
#endif
/* ORIGINATOR_BLOCK_ACK_AGREEMENT_H */
block-ack-agreement.h
block-ack-window.h
OriginatorBlockAckWindowTest
Test for the originator block ack window.
Definition:
block-ack-test-suite.cc:272
ns3::BlockAckAgreement
Maintains information for a block ack agreement.
Definition:
block-ack-agreement.h:35
ns3::BlockAckManager
Manages all block ack agreements for an originator station.
Definition:
block-ack-manager.h:52
ns3::BlockAckWindow
Block ack window.
Definition:
block-ack-window.h:58
ns3::Mac48Address
an EUI-48 address
Definition:
mac48-address.h:46
ns3::OriginatorBlockAckAgreement
Maintains the state and information about transmitted MPDUs with Ack Policy set to Block Ack for an o...
Definition:
originator-block-ack-agreement.h:57
ns3::OriginatorBlockAckAgreement::NotifyDiscardedMpdu
void NotifyDiscardedMpdu(Ptr< const WifiMpdu > mpdu)
Advance the transmit window beyond the MPDU that has been reported to be discarded.
Definition:
originator-block-ack-agreement.cc:161
ns3::OriginatorBlockAckAgreement::GetStartingSequence
uint16_t GetStartingSequence() const override
Return the starting sequence number of the transmit window, if a transmit window has been initialized...
Definition:
originator-block-ack-agreement.cc:80
ns3::OriginatorBlockAckAgreement::m_state
State m_state
state
Definition:
originator-block-ack-agreement.h:203
ns3::OriginatorBlockAckAgreement::m_txWindow
BlockAckWindow m_txWindow
originator's transmit window
Definition:
originator-block-ack-agreement.h:204
ns3::OriginatorBlockAckAgreement::NotifyTransmittedMpdu
void NotifyTransmittedMpdu(Ptr< const WifiMpdu > mpdu)
Advance the transmit window so as to include the transmitted MPDU, if the latter is not an old packet...
Definition:
originator-block-ack-agreement.cc:112
ns3::OriginatorBlockAckAgreement::NotifyAckedMpdu
void NotifyAckedMpdu(Ptr< const WifiMpdu > mpdu)
Record that the given MPDU has been acknowledged and advance the transmit window if possible.
Definition:
originator-block-ack-agreement.cc:138
ns3::OriginatorBlockAckAgreement::IsPending
bool IsPending() const
Check if the current state of this agreement is PENDING.
Definition:
originator-block-ack-agreement.cc:50
ns3::OriginatorBlockAckAgreement::IsReset
bool IsReset() const
Check if the current state of this agreement is RESET.
Definition:
originator-block-ack-agreement.cc:74
ns3::OriginatorBlockAckAgreement::AdvanceTxWindow
void AdvanceTxWindow()
Advance the transmit window so that the starting sequence number is the nearest unacknowledged MPDU.
Definition:
originator-block-ack-agreement.cc:103
ns3::OriginatorBlockAckAgreement::OriginatorBlockAckAgreement
OriginatorBlockAckAgreement(Mac48Address recipient, uint8_t tid)
Constructor.
Definition:
originator-block-ack-agreement.cc:33
ns3::OriginatorBlockAckAgreement::IsEstablished
bool IsEstablished() const
Check if the current state of this agreement is ESTABLISHED.
Definition:
originator-block-ack-agreement.cc:56
ns3::OriginatorBlockAckAgreement::SetState
void SetState(State state)
Set the current state.
Definition:
originator-block-ack-agreement.cc:44
ns3::OriginatorBlockAckAgreement::State
State
Represents the state for this agreement.
Definition:
originator-block-ack-agreement.h:100
ns3::OriginatorBlockAckAgreement::NO_REPLY
@ NO_REPLY
Definition:
originator-block-ack-agreement.h:103
ns3::OriginatorBlockAckAgreement::PENDING
@ PENDING
Definition:
originator-block-ack-agreement.h:101
ns3::OriginatorBlockAckAgreement::ESTABLISHED
@ ESTABLISHED
Definition:
originator-block-ack-agreement.h:102
ns3::OriginatorBlockAckAgreement::RESET
@ RESET
Definition:
originator-block-ack-agreement.h:104
ns3::OriginatorBlockAckAgreement::REJECTED
@ REJECTED
Definition:
originator-block-ack-agreement.h:105
ns3::OriginatorBlockAckAgreement::GetDistance
std::size_t GetDistance(uint16_t seqNumber) const
Get the distance between the current starting sequence number and the given sequence number.
Definition:
originator-block-ack-agreement.cc:91
ns3::OriginatorBlockAckAgreement::~OriginatorBlockAckAgreement
~OriginatorBlockAckAgreement() override
Definition:
originator-block-ack-agreement.cc:39
ns3::OriginatorBlockAckAgreement::IsNoReply
bool IsNoReply() const
Check if the current state of this agreement is NO_REPLY.
Definition:
originator-block-ack-agreement.cc:68
ns3::OriginatorBlockAckAgreement::IsRejected
bool IsRejected() const
Check if the current state of this agreement is REJECTED.
Definition:
originator-block-ack-agreement.cc:62
ns3::OriginatorBlockAckAgreement::InitTxWindow
void InitTxWindow()
Initialize the originator's transmit window by setting its size and starting sequence number equal to...
Definition:
originator-block-ack-agreement.cc:97
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
wifi
model
originator-block-ack-agreement.h
Generated on Sun Mar 3 2024 17:11:11 for ns-3 by
1.9.1