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
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
originator-block-ack-agreement.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2009, 2010 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
* Author: Tommaso Pecorella <tommaso.pecorella@unifi.it>
20
*/
21
#ifndef ORIGINATOR_BLOCK_ACK_AGREEMENT_H
22
#define ORIGINATOR_BLOCK_ACK_AGREEMENT_H
23
24
#include "
block-ack-agreement.h
"
25
26
namespace
ns3 {
27
33
class
OriginatorBlockAckAgreement
:
public
BlockAckAgreement
34
{
35
friend
class
BlockAckManager
;
36
public
:
37
OriginatorBlockAckAgreement
();
38
OriginatorBlockAckAgreement
(
Mac48Address
recipient, uint8_t tid);
39
~OriginatorBlockAckAgreement
();
40
/* receive ADDBAResponse
41
* send ADDBARequest --------------- status code = success ---------------
42
* ----------------->| PENDING |------------------------>| ESTABLISHED |-----
43
* --------------- --------------- |
44
* | / ^ ^ |
45
* receive ADDBAResponse | receive BlockAck / | | | receive BlockAck
46
* status code = failure | retryPkts + queuePkts / | | | retryPkts + queuePkts
47
* v < / | | | >=
48
* --------------- blockAckThreshold / | | | blockAckThreshold
49
* | UNSUCCESSFUL | / | | |
50
* --------------- v | ----------|
51
* -------------- |
52
* | INACTIVE | |
53
* -------------- |
54
* send a MPDU (Normal Ack) | |
55
* retryPkts + queuePkts | |
56
* >= | |
57
* blockAckThreshold |----------------
58
*/
89
enum
State
90
{
91
PENDING
,
92
ESTABLISHED
,
93
INACTIVE
,
94
UNSUCCESSFUL
95
};
96
void
SetState
(
enum
State
state);
103
bool
IsPending
(
void
)
const
;
110
bool
IsEstablished
(
void
)
const
;
117
bool
IsInactive
(
void
)
const
;
124
bool
IsUnsuccessful
(
void
)
const
;
130
void
NotifyMpduTransmission
(uint16_t nextSeqNumber);
138
bool
IsBlockAckRequestNeeded
(
void
)
const
;
139
void
CompleteExchange
(
void
);
140
141
private
:
142
enum
State
m_state
;
143
uint16_t
m_sentMpdus
;
144
bool
m_needBlockAckReq
;
145
};
146
147
}
// namespace ns3
148
149
#endif
/* ORIGINATOR_BLOCK_ACK_AGREEMENT_H */
ns3::OriginatorBlockAckAgreement::m_sentMpdus
uint16_t m_sentMpdus
Definition:
originator-block-ack-agreement.h:143
ns3::OriginatorBlockAckAgreement
Maintains the state and information about transmitted MPDUs with ack policy block ack for an originat...
Definition:
originator-block-ack-agreement.h:33
ns3::OriginatorBlockAckAgreement::PENDING
Definition:
originator-block-ack-agreement.h:91
ns3::OriginatorBlockAckAgreement::IsInactive
bool IsInactive(void) const
Check if the current state of this agreement is INACTIVE.
Definition:
originator-block-ack-agreement.cc:63
ns3::OriginatorBlockAckAgreement::m_state
enum State m_state
Definition:
originator-block-ack-agreement.h:142
ns3::OriginatorBlockAckAgreement::~OriginatorBlockAckAgreement
~OriginatorBlockAckAgreement()
Definition:
originator-block-ack-agreement.cc:39
ns3::OriginatorBlockAckAgreement::IsBlockAckRequestNeeded
bool IsBlockAckRequestNeeded(void) const
Returns true if all packets for which a block ack was negotiated have been transmitted so a block ack...
Definition:
originator-block-ack-agreement.cc:85
ns3::OriginatorBlockAckAgreement::IsPending
bool IsPending(void) const
Check if the current state of this agreement is PENDING.
Definition:
originator-block-ack-agreement.cc:53
ns3::OriginatorBlockAckAgreement::INACTIVE
Definition:
originator-block-ack-agreement.h:93
ns3::OriginatorBlockAckAgreement::OriginatorBlockAckAgreement
OriginatorBlockAckAgreement()
Definition:
originator-block-ack-agreement.cc:25
ns3::OriginatorBlockAckAgreement::IsEstablished
bool IsEstablished(void) const
Check if the current state of this agreement is ESTABLISHED.
Definition:
originator-block-ack-agreement.cc:58
ns3::Mac48Address
an EUI-48 address
Definition:
mac48-address.h:41
block-ack-agreement.h
ns3::OriginatorBlockAckAgreement::State
State
Represents the state for this agreement.
Definition:
originator-block-ack-agreement.h:89
ns3::OriginatorBlockAckAgreement::IsUnsuccessful
bool IsUnsuccessful(void) const
Check if the current state of this agreement is UNSUCCESSFUL.
Definition:
originator-block-ack-agreement.cc:68
ns3::BlockAckAgreement
Maintains information for a block ack agreement.
Definition:
block-ack-agreement.h:31
ns3::OriginatorBlockAckAgreement::NotifyMpduTransmission
void NotifyMpduTransmission(uint16_t nextSeqNumber)
Notifies a packet's transmission with ack policy Block Ack.
Definition:
originator-block-ack-agreement.cc:73
ns3::OriginatorBlockAckAgreement::SetState
void SetState(enum State state)
Definition:
originator-block-ack-agreement.cc:43
ns3::OriginatorBlockAckAgreement::ESTABLISHED
Definition:
originator-block-ack-agreement.h:92
ns3::BlockAckManager
Manages all block ack agreements for an originator station.
Definition:
block-ack-manager.h:73
ns3::OriginatorBlockAckAgreement::UNSUCCESSFUL
Definition:
originator-block-ack-agreement.h:94
ns3::OriginatorBlockAckAgreement::m_needBlockAckReq
bool m_needBlockAckReq
Definition:
originator-block-ack-agreement.h:144
ns3::OriginatorBlockAckAgreement::CompleteExchange
void CompleteExchange(void)
Definition:
originator-block-ack-agreement.cc:90
src
wifi
model
originator-block-ack-agreement.h
Generated on Sat Apr 19 2014 14:07:11 for ns-3 by
1.8.6