A Discrete-Event Network Simulator
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 
23 
24 namespace ns3 {
25 
27  : BlockAckAgreement (recipient, tid),
28  m_state (PENDING)
29 {
30 }
31 
33 {
34 }
35 
36 void
38 {
39  m_state = state;
40 }
41 
42 bool
44 {
45  return (m_state == PENDING) ? true : false;
46 }
47 
48 bool
50 {
51  return (m_state == ESTABLISHED) ? true : false;
52 }
53 
54 bool
56 {
57  return (m_state == REJECTED) ? true : false;
58 }
59 
60 bool
62 {
63  return (m_state == NO_REPLY) ? true : false;
64 }
65 
66 bool
68 {
69  return (m_state == RESET) ? true : false;
70 }
71 
72 } //namespace ns3
OriginatorBlockAckAgreement(Mac48Address recipient, uint8_t tid)
Constructor.
bool IsNoReply(void) const
Check if the current state of this agreement is NO_REPLY.
bool IsEstablished(void) const
Check if the current state of this agreement is ESTABLISHED.
bool IsPending(void) const
Check if the current state of this agreement is PENDING.
bool IsRejected(void) const
Check if the current state of this agreement is REJECTED.
void SetState(State state)
Set the current state.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
an EUI-48 address
Definition: mac48-address.h:43
State
Represents the state for this agreement.
Maintains information for a block ack agreement.
bool IsReset(void) const
Check if the current state of this agreement is RESET.