A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
originator-block-ack-agreement.cc
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
* Authors: Mirko Banchi <mk.banchi@gmail.com>
19
* Tommaso Pecorella <tommaso.pecorella@unifi.it>
20
*/
21
22
#include "
originator-block-ack-agreement.h
"
23
24
namespace
ns3
{
25
26
OriginatorBlockAckAgreement::OriginatorBlockAckAgreement
(
Mac48Address
recipient, uint8_t tid)
27
:
BlockAckAgreement
(recipient, tid),
28
m_state (PENDING)
29
{
30
}
31
32
OriginatorBlockAckAgreement::~OriginatorBlockAckAgreement
()
33
{
34
}
35
36
void
37
OriginatorBlockAckAgreement::SetState
(
State
state)
38
{
39
m_state
= state;
40
}
41
42
bool
43
OriginatorBlockAckAgreement::IsPending
(
void
)
const
44
{
45
return
(
m_state
==
PENDING
) ? true :
false
;
46
}
47
48
bool
49
OriginatorBlockAckAgreement::IsEstablished
(
void
)
const
50
{
51
return
(
m_state
==
ESTABLISHED
) ? true :
false
;
52
}
53
54
bool
55
OriginatorBlockAckAgreement::IsRejected
(
void
)
const
56
{
57
return
(
m_state
==
REJECTED
) ? true :
false
;
58
}
59
60
bool
61
OriginatorBlockAckAgreement::IsNoReply
(
void
)
const
62
{
63
return
(
m_state
==
NO_REPLY
) ? true :
false
;
64
}
65
66
bool
67
OriginatorBlockAckAgreement::IsReset
(
void
)
const
68
{
69
return
(
m_state
==
RESET
) ? true :
false
;
70
}
71
72
}
//namespace ns3
ns3::OriginatorBlockAckAgreement::OriginatorBlockAckAgreement
OriginatorBlockAckAgreement(Mac48Address recipient, uint8_t tid)
Constructor.
Definition:
originator-block-ack-agreement.cc:26
ns3::OriginatorBlockAckAgreement::IsNoReply
bool IsNoReply(void) const
Check if the current state of this agreement is NO_REPLY.
Definition:
originator-block-ack-agreement.cc:61
ns3::OriginatorBlockAckAgreement::IsEstablished
bool IsEstablished(void) const
Check if the current state of this agreement is ESTABLISHED.
Definition:
originator-block-ack-agreement.cc:49
ns3::OriginatorBlockAckAgreement::IsPending
bool IsPending(void) const
Check if the current state of this agreement is PENDING.
Definition:
originator-block-ack-agreement.cc:43
ns3::OriginatorBlockAckAgreement::PENDING
Definition:
originator-block-ack-agreement.h:96
ns3::OriginatorBlockAckAgreement::IsRejected
bool IsRejected(void) const
Check if the current state of this agreement is REJECTED.
Definition:
originator-block-ack-agreement.cc:55
ns3::OriginatorBlockAckAgreement::~OriginatorBlockAckAgreement
~OriginatorBlockAckAgreement()
Definition:
originator-block-ack-agreement.cc:32
ns3::OriginatorBlockAckAgreement::NO_REPLY
Definition:
originator-block-ack-agreement.h:98
ns3::OriginatorBlockAckAgreement::SetState
void SetState(State state)
Set the current state.
Definition:
originator-block-ack-agreement.cc:37
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::Mac48Address
an EUI-48 address
Definition:
mac48-address.h:43
ns3::OriginatorBlockAckAgreement::State
State
Represents the state for this agreement.
Definition:
originator-block-ack-agreement.h:94
ns3::OriginatorBlockAckAgreement::RESET
Definition:
originator-block-ack-agreement.h:99
ns3::BlockAckAgreement
Maintains information for a block ack agreement.
Definition:
block-ack-agreement.h:32
ns3::OriginatorBlockAckAgreement::IsReset
bool IsReset(void) const
Check if the current state of this agreement is RESET.
Definition:
originator-block-ack-agreement.cc:67
ns3::OriginatorBlockAckAgreement::REJECTED
Definition:
originator-block-ack-agreement.h:100
ns3::OriginatorBlockAckAgreement::m_state
State m_state
state
Definition:
originator-block-ack-agreement.h:145
ns3::OriginatorBlockAckAgreement::ESTABLISHED
Definition:
originator-block-ack-agreement.h:97
originator-block-ack-agreement.h
src
wifi
model
originator-block-ack-agreement.cc
Generated on Wed Aug 21 2019 03:38:31 for ns-3 by
1.8.14