author | Quincy Tse <quincy.tse@gmail.com> |
Mon, 07 Jun 2010 16:22:21 +0200 | |
changeset 6340 | fe24c9edacb6 |
parent 5951 | 083b4c1ec98d |
permissions | -rw-r--r-- |
5951
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
2 |
/* |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
3 |
* Copyright (c) 2009 MIRKO BANCHI |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
4 |
* |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
5 |
* This program is free software; you can redistribute it and/or modify |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation; |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
8 |
* |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
12 |
* GNU General Public License for more details. |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
13 |
* |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
17 |
* |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
18 |
* Author: Mirko Banchi <mk.banchi@gmail.com> |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
19 |
*/ |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
20 |
#ifndef BLOCK_ACK_AGREEMENT_H |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
21 |
#define BLOCK_ACK_AGREEMENT_H |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
22 |
|
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
23 |
#include "ns3/mac48-address.h" |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
24 |
#include "ns3/event-id.h" |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
25 |
|
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
26 |
namespace ns3 { |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
27 |
/** |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
28 |
* \brief Maintains information for a block ack agreement. |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
29 |
*/ |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
30 |
class BlockAckAgreement |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
31 |
{ |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
32 |
friend class MacLow; |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
33 |
public: |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
34 |
BlockAckAgreement (); |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
35 |
BlockAckAgreement (Mac48Address peer, uint8_t tid); |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
36 |
~BlockAckAgreement (); |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
37 |
void SetBufferSize (uint16_t bufferSize); |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
38 |
void SetTimeout (uint16_t timeout); |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
39 |
void SetStartingSequence (uint16_t seq); |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
40 |
void SetImmediateBlockAck (void); |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
41 |
void SetDelayedBlockAck (void); |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
42 |
void SetAmsduSupport (bool supported); |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
43 |
|
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
44 |
uint8_t GetTid (void) const; |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
45 |
Mac48Address GetPeer (void) const; |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
46 |
uint16_t GetBufferSize (void) const; |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
47 |
uint16_t GetTimeout (void) const; |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
48 |
uint16_t GetStartingSequence (void) const; |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
49 |
uint16_t GetStartingSequenceControl (void) const; |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
50 |
bool IsImmediateBlockAck (void) const; |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
51 |
bool IsAmsduSupported (void) const; |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
52 |
|
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
53 |
protected: |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
54 |
|
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
55 |
Mac48Address m_peer; |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
56 |
uint8_t m_amsduSupported; |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
57 |
uint8_t m_blockAckPolicy; /* represents type of block ack: immediate or delayed */ |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
58 |
uint8_t m_tid; |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
59 |
uint16_t m_bufferSize; |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
60 |
uint16_t m_timeout; |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
61 |
uint16_t m_startingSeq; |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
62 |
|
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
63 |
EventId m_inactivityEvent; |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
64 |
}; |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
65 |
|
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
66 |
} //namespace ns3 |
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
67 |
|
083b4c1ec98d
add BlockAckAgreement and OriginatorBlockAckAgreement objects
Mirko Banchi <mk.banchi@gmail.com>
parents:
diff
changeset
|
68 |
#endif /* BLOCK_ACK_AGREEMENT_H */ |