A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 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  */
20 #ifndef BLOCK_ACK_AGREEMENT_H
21 #define BLOCK_ACK_AGREEMENT_H
22 
23 #include "ns3/mac48-address.h"
24 #include "ns3/event-id.h"
25 
26 namespace ns3 {
32 {
33  friend class MacLow;
34 public:
42  BlockAckAgreement (Mac48Address peer, uint8_t tid);
49  void SetBufferSize (uint16_t bufferSize);
55  void SetTimeout (uint16_t timeout);
61  void SetStartingSequence (uint16_t seq);
65  void SetImmediateBlockAck (void);
69  void SetDelayedBlockAck (void);
75  void SetAmsduSupport (bool supported);
76 
82  uint8_t GetTid (void) const;
88  Mac48Address GetPeer (void) const;
94  uint16_t GetBufferSize (void) const;
100  uint16_t GetTimeout (void) const;
106  uint16_t GetStartingSequence (void) const;
112  uint16_t GetStartingSequenceControl (void) const;
119  bool IsImmediateBlockAck (void) const;
126  bool IsAmsduSupported (void) const;
127 
128 protected:
131  uint8_t m_blockAckPolicy; /* represents type of block ack: immediate or delayed */
132  uint8_t m_tid;
133  uint16_t m_bufferSize;
134  uint16_t m_timeout;
135  uint16_t m_startingSeq;
136 
138 };
139 
140 } // namespace ns3
141 
142 #endif /* BLOCK_ACK_AGREEMENT_H */
uint8_t GetTid(void) const
Return the Traffic ID (TID).
uint16_t GetTimeout(void) const
Return the timeout.
Mac48Address GetPeer(void) const
Return the peer address.
bool IsImmediateBlockAck(void) const
Check whether the current ACK policy is immediate block ACK.
ns3::Time timeout
uint16_t GetStartingSequence(void) const
Return the starting squence number.
bool IsAmsduSupported(void) const
Check whether A-MSDU is supported.
void SetStartingSequence(uint16_t seq)
Set starting sequence number.
an EUI-48 address
Definition: mac48-address.h:41
void SetDelayedBlockAck(void)
Set Block ACK policy to delayed ACK.
void SetAmsduSupport(bool supported)
Enable or disable A-MSDU support.
handle RTS/CTS/DATA/ACK transactions.
Definition: mac-low.h:411
Maintains information for a block ack agreement.
an identifier for simulation events.
Definition: event-id.h:46
void SetImmediateBlockAck(void)
Set Block ACK policy to immediate ACK.
void SetTimeout(uint16_t timeout)
Set timeout.
uint16_t GetStartingSequenceControl(void) const
Return the starting squence control.
void SetBufferSize(uint16_t bufferSize)
Set buffer size.
uint16_t GetBufferSize(void) const
Return the buffer size.