A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
block-ack-agreement.h
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:
36  BlockAckAgreement (Mac48Address peer, uint8_t tid);
38  void SetBufferSize (uint16_t bufferSize);
39  void SetTimeout (uint16_t timeout);
40  void SetStartingSequence (uint16_t seq);
41  void SetImmediateBlockAck (void);
42  void SetDelayedBlockAck (void);
43  void SetAmsduSupport (bool supported);
44 
45  uint8_t GetTid (void) const;
46  Mac48Address GetPeer (void) const;
47  uint16_t GetBufferSize (void) const;
48  uint16_t GetTimeout (void) const;
49  uint16_t GetStartingSequence (void) const;
50  uint16_t GetStartingSequenceControl (void) const;
51  bool IsImmediateBlockAck (void) const;
52  bool IsAmsduSupported (void) const;
53 
54 protected:
55  Mac48Address m_peer;
56  uint8_t m_amsduSupported;
57  uint8_t m_blockAckPolicy; /* represents type of block ack: immediate or delayed */
58  uint8_t m_tid;
59  uint16_t m_bufferSize;
60  uint16_t m_timeout;
61  uint16_t m_startingSeq;
62 
63  EventId m_inactivityEvent;
64 };
65 
66 } // namespace ns3
67 
68 #endif /* BLOCK_ACK_AGREEMENT_H */
an EUI-48 address
Definition: mac48-address.h:41
handle RTS/CTS/DATA/ACK transactions.
Definition: mac-low.h:379
Maintains information for a block ack agreement.
an identifier for simulation events.
Definition: event-id.h:46